@yartsun/hypershadow-widget 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,21 @@
1
- "use strict";var Kr=Object.defineProperty;var Nr=(i,e,t)=>e in i?Kr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var ue=(i,e,t)=>Nr(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");function fi(i){var e,t,s="";if(typeof i=="string"||typeof i=="number")s+=i;else if(typeof i=="object")if(Array.isArray(i)){var n=i.length;for(e=0;e<n;e++)i[e]&&(t=fi(i[e]))&&(s&&(s+=" "),s+=t)}else for(t in i)i[t]&&(s&&(s+=" "),s+=t);return s}function gi(){for(var i,e,t=0,s="",n=arguments.length;t<n;t++)(i=arguments[t])&&(e=fi(i))&&(s&&(s+=" "),s+=e);return s}const Vn=i=>typeof i=="boolean"?`${i}`:i===0?"0":i,In=gi,Fr=(i,e)=>t=>{var s;if((e==null?void 0:e.variants)==null)return In(i,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:n,defaultVariants:r}=e,o=Object.keys(n).map(u=>{const d=t==null?void 0:t[u],p=r==null?void 0:r[u];if(d===null)return null;const h=Vn(d)||Vn(p);return n[u][h]}),a=t&&Object.entries(t).reduce((u,d)=>{let[p,h]=d;return h===void 0||(u[p]=h),u},{}),c=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((u,d)=>{let{class:p,className:h,...m}=d;return Object.entries(m).every(g=>{let[f,y]=g;return Array.isArray(y)?y.includes({...r,...a}[f]):{...r,...a}[f]===y})?[...u,p,h]:u},[]);return In(i,o,c,t==null?void 0:t.class,t==null?void 0:t.className)};function pi(i){return i?i.flatMap(e=>e.type===l.Fragment?pi(e.children):[e]):[]}const Wr=l.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(i,{attrs:e,slots:t}){return()=>{var c;if(!t.default)return null;const s=pi(t.default()),n=s.findIndex(u=>u.type!==l.Comment);if(n===-1)return s;const r=s[n];(c=r.props)==null||delete c.ref;const o=r.props?l.mergeProps(e,r.props):e,a=l.cloneVNode({...r,props:{}},o);return s.length===1?a:(s[n]=a,s)}}}),$r=["area","img","input"],Ur=l.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(i,{attrs:e,slots:t}){const s=i.asChild?"template":i.as;return typeof s=="string"&&$r.includes(s)?()=>l.h(s,e):s!=="template"?()=>l.h(i.as,e,{default:t.default}):()=>l.h(Wr,e,{default:t.default})}}),ln="-",Hr=i=>{const e=Gr(i),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=i;return{getClassGroupId:o=>{const a=o.split(ln);return a[0]===""&&a.length!==1&&a.shift(),hi(a,e)||jr(o)},getConflictingClassGroupIds:(o,a)=>{const c=t[o]||[];return a&&s[o]?[...c,...s[o]]:c}}},hi=(i,e)=>{var o;if(i.length===0)return e.classGroupId;const t=i[0],s=e.nextPart.get(t),n=s?hi(i.slice(1),s):void 0;if(n)return n;if(e.validators.length===0)return;const r=i.join(ln);return(o=e.validators.find(({validator:a})=>a(r)))==null?void 0:o.classGroupId},Kn=/^\[(.+)\]$/,jr=i=>{if(Kn.test(i)){const e=Kn.exec(i)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Gr=i=>{const{theme:e,classGroups:t}=i,s={nextPart:new Map,validators:[]};for(const n in t)Ks(t[n],s,n,e);return s},Ks=(i,e,t,s)=>{i.forEach(n=>{if(typeof n=="string"){const r=n===""?e:Nn(e,n);r.classGroupId=t;return}if(typeof n=="function"){if(Zr(n)){Ks(n(s),e,t,s);return}e.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([r,o])=>{Ks(o,Nn(e,r),t,s)})})},Nn=(i,e)=>{let t=i;return e.split(ln).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},Zr=i=>i.isThemeGetter,qr=i=>{if(i<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,s=new Map;const n=(r,o)=>{t.set(r,o),e++,e>i&&(e=0,s=t,t=new Map)};return{get(r){let o=t.get(r);if(o!==void 0)return o;if((o=s.get(r))!==void 0)return n(r,o),o},set(r,o){t.has(r)?t.set(r,o):n(r,o)}}},Ns="!",Fs=":",Yr=Fs.length,Xr=i=>{const{prefix:e,experimentalParseClassName:t}=i;let s=n=>{const r=[];let o=0,a=0,c=0,u;for(let g=0;g<n.length;g++){let f=n[g];if(o===0&&a===0){if(f===Fs){r.push(n.slice(c,g)),c=g+Yr;continue}if(f==="/"){u=g;continue}}f==="["?o++:f==="]"?o--:f==="("?a++:f===")"&&a--}const d=r.length===0?n:n.substring(c),p=Jr(d),h=p!==d,m=u&&u>c?u-c:void 0;return{modifiers:r,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};if(e){const n=e+Fs,r=s;s=o=>o.startsWith(n)?r(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(t){const n=s;s=r=>t({className:r,parseClassName:n})}return s},Jr=i=>i.endsWith(Ns)?i.substring(0,i.length-1):i.startsWith(Ns)?i.substring(1):i,Qr=i=>{const e=Object.fromEntries(i.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const n=[];let r=[];return s.forEach(o=>{o[0]==="["||e[o]?(n.push(...r.sort(),o),r=[]):r.push(o)}),n.push(...r.sort()),n}},eo=i=>({cache:qr(i.cacheSize),parseClassName:Xr(i),sortModifiers:Qr(i),...Hr(i)}),to=/\s+/,so=(i,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:r}=e,o=[],a=i.trim().split(to);let c="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:p,modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:f}=t(d);if(p){c=d+(c.length>0?" "+c:c);continue}let y=!!f,_=s(y?g.substring(0,f):g);if(!_){if(!y){c=d+(c.length>0?" "+c:c);continue}if(_=s(g),!_){c=d+(c.length>0?" "+c:c);continue}y=!1}const b=r(h).join(":"),w=m?b+Ns:b,C=w+_;if(o.includes(C))continue;o.push(C);const v=n(_,y);for(let k=0;k<v.length;++k){const z=v[k];o.push(w+z)}c=d+(c.length>0?" "+c:c)}return c};function no(){let i=0,e,t,s="";for(;i<arguments.length;)(e=arguments[i++])&&(t=mi(e))&&(s&&(s+=" "),s+=t);return s}const mi=i=>{if(typeof i=="string")return i;let e,t="";for(let s=0;s<i.length;s++)i[s]&&(e=mi(i[s]))&&(t&&(t+=" "),t+=e);return t};function io(i,...e){let t,s,n,r=o;function o(c){const u=e.reduce((d,p)=>p(d),i());return t=eo(u),s=t.cache.get,n=t.cache.set,r=a,a(c)}function a(c){const u=s(c);if(u)return u;const d=so(c,t);return n(c,d),d}return function(){return r(no.apply(null,arguments))}}const ae=i=>{const e=t=>t[i]||[];return e.isThemeGetter=!0,e},yi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ro=/^\d+\/\d+$/,oo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ao=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,co=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,uo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xt=i=>ro.test(i),I=i=>!!i&&!Number.isNaN(Number(i)),st=i=>!!i&&Number.isInteger(Number(i)),Ms=i=>i.endsWith("%")&&I(i.slice(0,-1)),Ye=i=>oo.test(i),fo=()=>!0,go=i=>ao.test(i)&&!lo.test(i),bi=()=>!1,po=i=>co.test(i),ho=i=>uo.test(i),mo=i=>!B(i)&&!E(i),yo=i=>Vt(i,Ci,bi),B=i=>yi.test(i),ft=i=>Vt(i,xi,go),Rs=i=>Vt(i,Co,I),Fn=i=>Vt(i,vi,bi),wo=i=>Vt(i,_i,ho),ls=i=>Vt(i,Si,po),E=i=>wi.test(i),Wt=i=>It(i,xi),bo=i=>It(i,xo),Wn=i=>It(i,vi),vo=i=>It(i,Ci),_o=i=>It(i,_i),cs=i=>It(i,Si,!0),Vt=(i,e,t)=>{const s=yi.exec(i);return s?s[1]?e(s[1]):t(s[2]):!1},It=(i,e,t=!1)=>{const s=wi.exec(i);return s?s[1]?e(s[1]):t:!1},vi=i=>i==="position"||i==="percentage",_i=i=>i==="image"||i==="url",Ci=i=>i==="length"||i==="size"||i==="bg-size",xi=i=>i==="length",Co=i=>i==="number",xo=i=>i==="family-name",Si=i=>i==="shadow",So=()=>{const i=ae("color"),e=ae("font"),t=ae("text"),s=ae("font-weight"),n=ae("tracking"),r=ae("leading"),o=ae("breakpoint"),a=ae("container"),c=ae("spacing"),u=ae("radius"),d=ae("shadow"),p=ae("inset-shadow"),h=ae("text-shadow"),m=ae("drop-shadow"),g=ae("blur"),f=ae("perspective"),y=ae("aspect"),_=ae("ease"),b=ae("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...C(),E,B],k=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],x=()=>[E,B,c],T=()=>[xt,"full","auto",...x()],L=()=>[st,"none","subgrid",E,B],W=()=>["auto",{span:["full",st,E,B]},st,E,B],K=()=>[st,"auto",E,B],$=()=>["auto","min","max","fr",E,B],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...x()],j=()=>[xt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],D=()=>[i,E,B],G=()=>[...C(),Wn,Fn,{position:[E,B]}],Ke=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ce=()=>["auto","cover","contain",vo,yo,{size:[E,B]}],xe=()=>[Ms,Wt,ft],q=()=>["","none","full",u,E,B],U=()=>["",I,Wt,ft],me=()=>["solid","dashed","dotted","double"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>[I,Ms,Wn,Fn],qe=()=>["","none",g,E,B],Q=()=>["none",I,E,B],Ee=()=>["none",I,E,B],Nt=()=>[I,E,B],tt=()=>[xt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ye],breakpoint:[Ye],color:[fo],container:[Ye],"drop-shadow":[Ye],ease:["in","out","in-out"],font:[mo],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ye],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ye],shadow:[Ye],spacing:["px",I],text:[Ye],"text-shadow":[Ye],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xt,B,E,y]}],container:["container"],columns:[{columns:[I,B,E,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[st,"auto",E,B]}],basis:[{basis:[xt,"full","auto",a,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,xt,"auto","initial","none",B]}],grow:[{grow:["",I,E,B]}],shrink:[{shrink:["",I,E,B]}],order:[{order:[st,"first","last","none",E,B]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],w:[{w:[a,"screen",...j()]}],"min-w":[{"min-w":[a,"screen","none",...j()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",t,Wt,ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,E,Rs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ms,B]}],"font-family":[{font:[bo,B,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,E,B]}],"line-clamp":[{"line-clamp":[I,"none",E,Rs]}],leading:[{leading:[r,...x()]}],"list-image":[{"list-image":["none",E,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",E,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",E,ft]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[I,"auto",E,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",E,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",E,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:Ke()}],"bg-size":[{bg:Ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},st,E,B],radial:["",E,B],conic:[st,E,B]},_o,wo]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:xe()}],"gradient-via-pos":[{via:xe()}],"gradient-to-pos":[{to:xe()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,E,B]}],"outline-w":[{outline:["",I,Wt,ft]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",d,cs,ls]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",p,cs,ls]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[I,ft]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",h,cs,ls]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[I,E,B]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ze()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[E,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:Ke()}],"mask-size":[{mask:Ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",E,B]}],filter:[{filter:["","none",E,B]}],blur:[{blur:qe()}],brightness:[{brightness:[I,E,B]}],contrast:[{contrast:[I,E,B]}],"drop-shadow":[{"drop-shadow":["","none",m,cs,ls]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",I,E,B]}],"hue-rotate":[{"hue-rotate":[I,E,B]}],invert:[{invert:["",I,E,B]}],saturate:[{saturate:[I,E,B]}],sepia:[{sepia:["",I,E,B]}],"backdrop-filter":[{"backdrop-filter":["","none",E,B]}],"backdrop-blur":[{"backdrop-blur":qe()}],"backdrop-brightness":[{"backdrop-brightness":[I,E,B]}],"backdrop-contrast":[{"backdrop-contrast":[I,E,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,E,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,E,B]}],"backdrop-invert":[{"backdrop-invert":["",I,E,B]}],"backdrop-opacity":[{"backdrop-opacity":[I,E,B]}],"backdrop-saturate":[{"backdrop-saturate":[I,E,B]}],"backdrop-sepia":[{"backdrop-sepia":["",I,E,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",E,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",E,B]}],ease:[{ease:["linear","initial",_,E,B]}],delay:[{delay:[I,E,B]}],animate:[{animate:["none",b,E,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,E,B]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Nt()}],"skew-x":[{"skew-x":Nt()}],"skew-y":[{"skew-y":Nt()}],transform:[{transform:[E,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:tt()}],"translate-x":[{"translate-x":tt()}],"translate-y":[{"translate-y":tt()}],"translate-z":[{"translate-z":tt()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",E,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",E,B]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[I,Wt,ft,Rs]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ko=io(So);function cn(...i){return ko(gi(i))}const ot=l.defineComponent({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{type:[String,Object,Function],default:"button"}},setup(i){const e=i;return(t,s)=>(l.openBlock(),l.createBlock(l.unref(Ur),{"data-slot":"button",as:t.as,"as-child":t.asChild,class:l.normalizeClass(l.unref(cn)(l.unref(To)({variant:t.variant,size:t.size}),e.class))},{default:l.withCtx(()=>[l.renderSlot(t.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),To=Fr("tw:inline-flex tw:cursor-pointer tw:items-center tw:justify-center tw:whitespace-nowrap tw:text-sm tw:transition-all disabled:tw:pointer-events-none disabled:tw:opacity-50 [&_svg]:tw:pointer-events-none [&_svg:not([class*='size-'])]:tw:size-4 tw:shrink-0 [&_svg]:tw:shrink-0 tw:outline-none focus-visible:tw:border-ring focus-visible:tw:ring-ring/50 focus-visible:tw:ring-[3px] aria-invalid:tw:ring-destructive/20 dark:aria-invalid:tw:ring-destructive/40 aria-invalid:tw:border-destructive",{variants:{variant:{default:"tw:bg-primary tw:text-primary-foreground tw:shadow-xs hover:tw:bg-primary/90",destructive:"tw:bg-destructive tw:text-white tw:shadow-xs hover:tw:bg-destructive/90 focus-visible:tw:ring-destructive/20 dark:focus-visible:tw:ring-destructive/40 dark:tw:bg-destructive/60",outlined:"tw:border tw:bg-background tw:shadow-xs hover:tw:bg-accent hover:tw:text-accent-foreground dark:tw:bg-input/30 dark:tw:border-input dark:hover:tw:bg-input/50",secondary:"tw:bg-secondary tw:text-secondary-foreground tw:shadow-xs hover:tw:bg-secondary/80",ghost:"hover:tw:bg-accent hover:tw:text-accent-foreground dark:hover:tw:bg-accent/50",link:"tw:text-primary tw:underline-offset-4 hover:tw:underline",filled:"tw:border-transparent tw:bg-primary tw:text-primary-foreground [a&]:hover:tw:bg-primary/90",invisible:"tw:border-transparent tw:p-0! tw:bg-transparent tw:text-primary-foreground [a&]:hover:tw:bg-transparent"},size:{md:"tw:px-2 tw:py-1 tw:text-xs tw:h-6 tw:gap-1",sm:"tw:px-2 tw:py-1 tw:text-xs tw:h-5 tw:gap-1",lg:"tw:px-3 tw:py-1 tw:text-base tw:h-8 tw:gap-1",icon:"tw:size-9"}},defaultVariants:{variant:"default",size:"md"}}),zo={md:16};function ki(i){const e=i.getKey("settings.borderRadius")??16;return typeof e!="number"?zo.md:e}function Mo(i,e=8){if(i<=0)return 0;const t=i-e;return t<=0?4:Math.max(4,t)}function Xt(i,e=8){const t=ki(i);return{borderRadius:`${Mo(t,e)}px`}}const Ws=i=>i?i.replace(/<br>/g,"<br />").replace(/\n/g,"<br />"):"",Ro=["innerHTML"],Bo=["innerHTML"],Eo=["innerHTML"],Po=["width","height"],Do=`
1
+ "use strict";var Do=Object.defineProperty;var Lo=(r,e,t)=>e in r?Do(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var O=(r,e,t)=>Lo(r,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue");function Yr(r){var e,t,s="";if(typeof r=="string"||typeof r=="number")s+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=Yr(r[e]))&&(s&&(s+=" "),s+=t)}else for(t in r)r[t]&&(s&&(s+=" "),s+=t);return s}function Xr(){for(var r,e,t=0,s="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=Yr(r))&&(s&&(s+=" "),s+=e);return s}const gr=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,mr=Xr,Io=(r,e)=>t=>{var s;if((e==null?void 0:e.variants)==null)return mr(r,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:n,defaultVariants:i}=e,o=Object.keys(n).map(u=>{const d=t==null?void 0:t[u],f=i==null?void 0:i[u];if(d===null)return null;const g=gr(d)||gr(f);return n[u][g]}),a=t&&Object.entries(t).reduce((u,d)=>{let[f,g]=d;return g===void 0||(u[f]=g),u},{}),l=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((u,d)=>{let{class:f,className:g,...h}=d;return Object.entries(h).every(m=>{let[p,b]=m;return Array.isArray(b)?b.includes({...i,...a}[p]):{...i,...a}[p]===b})?[...u,f,g]:u},[]);return mr(r,o,l,t==null?void 0:t.class,t==null?void 0:t.className)};function Qr(r){return r?r.flatMap(e=>e.type===c.Fragment?Qr(e.children):[e]):[]}const Oo=c.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(r,{attrs:e,slots:t}){return()=>{var l;if(!t.default)return null;const s=Qr(t.default()),n=s.findIndex(u=>u.type!==c.Comment);if(n===-1)return s;const i=s[n];(l=i.props)==null||delete l.ref;const o=i.props?c.mergeProps(e,i.props):e,a=c.cloneVNode({...i,props:{}},o);return s.length===1?a:(s[n]=a,s)}}}),$o=["area","img","input"],Vo=c.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(r,{attrs:e,slots:t}){const s=r.asChild?"template":r.as;return typeof s=="string"&&$o.includes(s)?()=>c.h(s,e):s!=="template"?()=>c.h(r.as,e,{default:t.default}):()=>c.h(Oo,e,{default:t.default})}}),Bn="-",Ko=r=>{const e=Fo(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=r;return{getClassGroupId:o=>{const a=o.split(Bn);return a[0]===""&&a.length!==1&&a.shift(),Jr(a,e)||No(o)},getConflictingClassGroupIds:(o,a)=>{const l=t[o]||[];return a&&s[o]?[...l,...s[o]]:l}}},Jr=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],s=e.nextPart.get(t),n=s?Jr(r.slice(1),s):void 0;if(n)return n;if(e.validators.length===0)return;const i=r.join(Bn);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},wr=/^\[(.+)\]$/,No=r=>{if(wr.test(r)){const e=wr.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},Fo=r=>{const{theme:e,classGroups:t}=r,s={nextPart:new Map,validators:[]};for(const n in t)on(t[n],s,n,e);return s},on=(r,e,t,s)=>{r.forEach(n=>{if(typeof n=="string"){const i=n===""?e:br(e,n);i.classGroupId=t;return}if(typeof n=="function"){if(Uo(n)){on(n(s),e,t,s);return}e.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([i,o])=>{on(o,br(e,i),t,s)})})},br=(r,e)=>{let t=r;return e.split(Bn).forEach(s=>{t.nextPart.has(s)||t.nextPart.set(s,{nextPart:new Map,validators:[]}),t=t.nextPart.get(s)}),t},Uo=r=>r.isThemeGetter,Wo=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,s=new Map;const n=(i,o)=>{t.set(i,o),e++,e>r&&(e=0,s=t,t=new Map)};return{get(i){let o=t.get(i);if(o!==void 0)return o;if((o=s.get(i))!==void 0)return n(i,o),o},set(i,o){t.has(i)?t.set(i,o):n(i,o)}}},an="!",ln=":",Ho=ln.length,jo=r=>{const{prefix:e,experimentalParseClassName:t}=r;let s=n=>{const i=[];let o=0,a=0,l=0,u;for(let m=0;m<n.length;m++){let p=n[m];if(o===0&&a===0){if(p===ln){i.push(n.slice(l,m)),l=m+Ho;continue}if(p==="/"){u=m;continue}}p==="["?o++:p==="]"?o--:p==="("?a++:p===")"&&a--}const d=i.length===0?n:n.substring(l),f=qo(d),g=f!==d,h=u&&u>l?u-l:void 0;return{modifiers:i,hasImportantModifier:g,baseClassName:f,maybePostfixModifierPosition:h}};if(e){const n=e+ln,i=s;s=o=>o.startsWith(n)?i(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(t){const n=s;s=i=>t({className:i,parseClassName:n})}return s},qo=r=>r.endsWith(an)?r.substring(0,r.length-1):r.startsWith(an)?r.substring(1):r,Go=r=>{const e=Object.fromEntries(r.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const n=[];let i=[];return s.forEach(o=>{o[0]==="["||e[o]?(n.push(...i.sort(),o),i=[]):i.push(o)}),n.push(...i.sort()),n}},Zo=r=>({cache:Wo(r.cacheSize),parseClassName:jo(r),sortModifiers:Go(r),...Ko(r)}),Yo=/\s+/,Xo=(r,e)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:i}=e,o=[],a=r.trim().split(Yo);let l="";for(let u=a.length-1;u>=0;u-=1){const d=a[u],{isExternal:f,modifiers:g,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=t(d);if(f){l=d+(l.length>0?" "+l:l);continue}let b=!!p,k=s(b?m.substring(0,p):m);if(!k){if(!b){l=d+(l.length>0?" "+l:l);continue}if(k=s(m),!k){l=d+(l.length>0?" "+l:l);continue}b=!1}const v=i(g).join(":"),y=h?v+an:v,_=y+k;if(o.includes(_))continue;o.push(_);const w=n(k,b);for(let C=0;C<w.length;++C){const T=w[C];o.push(y+T)}l=d+(l.length>0?" "+l:l)}return l};function Qo(){let r=0,e,t,s="";for(;r<arguments.length;)(e=arguments[r++])&&(t=ei(e))&&(s&&(s+=" "),s+=t);return s}const ei=r=>{if(typeof r=="string")return r;let e,t="";for(let s=0;s<r.length;s++)r[s]&&(e=ei(r[s]))&&(t&&(t+=" "),t+=e);return t};function Jo(r,...e){let t,s,n,i=o;function o(l){const u=e.reduce((d,f)=>f(d),r());return t=Zo(u),s=t.cache.get,n=t.cache.set,i=a,a(l)}function a(l){const u=s(l);if(u)return u;const d=Xo(l,t);return n(l,d),d}return function(){return i(Qo.apply(null,arguments))}}const ue=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},ti=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,si=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ea=/^\d+\/\d+$/,ta=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,na=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ra=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ia=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bt=r=>ea.test(r),V=r=>!!r&&!Number.isNaN(Number(r)),ct=r=>!!r&&Number.isInteger(Number(r)),Gs=r=>r.endsWith("%")&&V(r.slice(0,-1)),tt=r=>ta.test(r),oa=()=>!0,aa=r=>sa.test(r)&&!na.test(r),ni=()=>!1,la=r=>ra.test(r),ca=r=>ia.test(r),ua=r=>!M(r)&&!B(r),da=r=>Ht(r,oi,ni),M=r=>ti.test(r),bt=r=>Ht(r,ai,aa),Zs=r=>Ht(r,ma,V),yr=r=>Ht(r,ri,ni),pa=r=>Ht(r,ii,ca),ks=r=>Ht(r,li,la),B=r=>si.test(r),Yt=r=>jt(r,ai),ha=r=>jt(r,wa),vr=r=>jt(r,ri),fa=r=>jt(r,oi),ga=r=>jt(r,ii),_s=r=>jt(r,li,!0),Ht=(r,e,t)=>{const s=ti.exec(r);return s?s[1]?e(s[1]):t(s[2]):!1},jt=(r,e,t=!1)=>{const s=si.exec(r);return s?s[1]?e(s[1]):t:!1},ri=r=>r==="position"||r==="percentage",ii=r=>r==="image"||r==="url",oi=r=>r==="length"||r==="size"||r==="bg-size",ai=r=>r==="length",ma=r=>r==="number",wa=r=>r==="family-name",li=r=>r==="shadow",ba=()=>{const r=ue("color"),e=ue("font"),t=ue("text"),s=ue("font-weight"),n=ue("tracking"),i=ue("leading"),o=ue("breakpoint"),a=ue("container"),l=ue("spacing"),u=ue("radius"),d=ue("shadow"),f=ue("inset-shadow"),g=ue("text-shadow"),h=ue("drop-shadow"),m=ue("blur"),p=ue("perspective"),b=ue("aspect"),k=ue("ease"),v=ue("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[..._(),B,M],C=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],x=()=>[B,M,l],z=()=>[Bt,"full","auto",...x()],D=()=>[ct,"none","subgrid",B,M],K=()=>["auto",{span:["full",ct,B,M]},ct,B,M],N=()=>[ct,"auto",B,M],W=()=>["auto","min","max","fr",B,M],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...x()],G=()=>[Bt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],A=()=>[r,B,M],Y=()=>[..._(),vr,yr,{position:[B,M]}],We=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Se=()=>["auto","cover","contain",fa,da,{size:[B,M]}],Te=()=>[Gs,Yt,bt],Q=()=>["","none","full",u,B,M],j=()=>["",V,Yt,bt],ye=()=>["solid","dashed","dotted","double"],Je=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>[V,Gs,vr,yr],et=()=>["","none",m,B,M],se=()=>["none",V,B,M],De=()=>["none",V,B,M],Gt=()=>[V,B,M],lt=()=>[Bt,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[tt],breakpoint:[tt],color:[oa],container:[tt],"drop-shadow":[tt],ease:["in","out","in-out"],font:[ua],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[tt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[tt],shadow:[tt],spacing:["px",V],text:[tt],"text-shadow":[tt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Bt,M,B,b]}],container:["container"],columns:[{columns:[V,M,B,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[ct,"auto",B,M]}],basis:[{basis:[Bt,"full","auto",a,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[V,Bt,"auto","initial","none",M]}],grow:[{grow:["",V,B,M]}],shrink:[{shrink:["",V,B,M]}],order:[{order:[ct,"first","last","none",B,M]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",t,Yt,bt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,B,Zs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gs,M]}],"font-family":[{font:[ha,M,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,B,M]}],"line-clamp":[{"line-clamp":[V,"none",B,Zs]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",B,M]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",B,M]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[V,"from-font","auto",B,bt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[V,"auto",B,M]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B,M]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",B,M]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:We()}],"bg-size":[{bg:Se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ct,B,M],radial:["",B,M],conic:[ct,B,M]},ga,pa]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Te()}],"gradient-via-pos":[{via:Te()}],"gradient-to-pos":[{to:Te()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:j()}],"border-w-x":[{"border-x":j()}],"border-w-y":[{"border-y":j()}],"border-w-s":[{"border-s":j()}],"border-w-e":[{"border-e":j()}],"border-w-t":[{"border-t":j()}],"border-w-r":[{"border-r":j()}],"border-w-b":[{"border-b":j()}],"border-w-l":[{"border-l":j()}],"divide-x":[{"divide-x":j()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":j()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[V,B,M]}],"outline-w":[{outline:["",V,Yt,bt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",d,_s,ks]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,_s,ks]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[V,bt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":j()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",g,_s,ks]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[V,B,M]}],"mix-blend":[{"mix-blend":[...Je(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Je()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[V]}],"mask-image-linear-from-pos":[{"mask-linear-from":$()}],"mask-image-linear-to-pos":[{"mask-linear-to":$()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":$()}],"mask-image-t-to-pos":[{"mask-t-to":$()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":$()}],"mask-image-r-to-pos":[{"mask-r-to":$()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":$()}],"mask-image-b-to-pos":[{"mask-b-to":$()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":$()}],"mask-image-l-to-pos":[{"mask-l-to":$()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":$()}],"mask-image-x-to-pos":[{"mask-x-to":$()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":$()}],"mask-image-y-to-pos":[{"mask-y-to":$()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[B,M]}],"mask-image-radial-from-pos":[{"mask-radial-from":$()}],"mask-image-radial-to-pos":[{"mask-radial-to":$()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[V]}],"mask-image-conic-from-pos":[{"mask-conic-from":$()}],"mask-image-conic-to-pos":[{"mask-conic-to":$()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:We()}],"mask-size":[{mask:Se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",B,M]}],filter:[{filter:["","none",B,M]}],blur:[{blur:et()}],brightness:[{brightness:[V,B,M]}],contrast:[{contrast:[V,B,M]}],"drop-shadow":[{"drop-shadow":["","none",h,_s,ks]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",V,B,M]}],"hue-rotate":[{"hue-rotate":[V,B,M]}],invert:[{invert:["",V,B,M]}],saturate:[{saturate:[V,B,M]}],sepia:[{sepia:["",V,B,M]}],"backdrop-filter":[{"backdrop-filter":["","none",B,M]}],"backdrop-blur":[{"backdrop-blur":et()}],"backdrop-brightness":[{"backdrop-brightness":[V,B,M]}],"backdrop-contrast":[{"backdrop-contrast":[V,B,M]}],"backdrop-grayscale":[{"backdrop-grayscale":["",V,B,M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,B,M]}],"backdrop-invert":[{"backdrop-invert":["",V,B,M]}],"backdrop-opacity":[{"backdrop-opacity":[V,B,M]}],"backdrop-saturate":[{"backdrop-saturate":[V,B,M]}],"backdrop-sepia":[{"backdrop-sepia":["",V,B,M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",B,M]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[V,"initial",B,M]}],ease:[{ease:["linear","initial",k,B,M]}],delay:[{delay:[V,B,M]}],animate:[{animate:["none",v,B,M]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,B,M]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:De()}],"scale-x":[{"scale-x":De()}],"scale-y":[{"scale-y":De()}],"scale-z":[{"scale-z":De()}],"scale-3d":["scale-3d"],skew:[{skew:Gt()}],"skew-x":[{"skew-x":Gt()}],"skew-y":[{"skew-y":Gt()}],transform:[{transform:[B,M,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:lt()}],"translate-x":[{"translate-x":lt()}],"translate-y":[{"translate-y":lt()}],"translate-z":[{"translate-z":lt()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B,M]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B,M]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[V,Yt,bt,Zs]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ya=Jo(ba);function Pn(...r){return ya(Xr(r))}const it=c.defineComponent({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{type:[String,Object,Function],default:"button"}},setup(r){const e=r;return(t,s)=>(c.openBlock(),c.createBlock(c.unref(Vo),{"data-slot":"button",as:t.as,"as-child":t.asChild,class:c.normalizeClass(c.unref(Pn)(c.unref(va)({variant:t.variant,size:t.size}),e.class))},{default:c.withCtx(()=>[c.renderSlot(t.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),va=Io("tw:inline-flex tw:cursor-pointer tw:items-center tw:justify-center tw:whitespace-nowrap tw:text-sm tw:transition-all disabled:tw:pointer-events-none disabled:tw:opacity-50 [&_svg]:tw:pointer-events-none [&_svg:not([class*='size-'])]:tw:size-4 tw:shrink-0 [&_svg]:tw:shrink-0 tw:outline-none focus-visible:tw:border-ring focus-visible:tw:ring-ring/50 focus-visible:tw:ring-[3px] aria-invalid:tw:ring-destructive/20 dark:aria-invalid:tw:ring-destructive/40 aria-invalid:tw:border-destructive",{variants:{variant:{default:"tw:bg-primary tw:text-primary-foreground tw:shadow-xs hover:tw:bg-primary/90",destructive:"tw:bg-destructive tw:text-white tw:shadow-xs hover:tw:bg-destructive/90 focus-visible:tw:ring-destructive/20 dark:focus-visible:tw:ring-destructive/40 dark:tw:bg-destructive/60",outlined:"tw:border tw:bg-background tw:shadow-xs hover:tw:bg-accent hover:tw:text-accent-foreground dark:tw:bg-input/30 dark:tw:border-input dark:hover:tw:bg-input/50",secondary:"tw:bg-secondary tw:text-secondary-foreground tw:shadow-xs hover:tw:bg-secondary/80",ghost:"hover:tw:bg-accent hover:tw:text-accent-foreground dark:hover:tw:bg-accent/50",link:"tw:text-primary tw:underline-offset-4 hover:tw:underline",filled:"tw:border-transparent tw:bg-primary tw:text-primary-foreground [a&]:hover:tw:bg-primary/90",invisible:"tw:border-transparent tw:p-0! tw:bg-transparent tw:text-primary-foreground [a&]:hover:tw:bg-transparent"},size:{md:"tw:px-2 tw:py-1 tw:text-xs tw:h-6 tw:gap-1",sm:"tw:px-2 tw:py-1 tw:text-xs tw:h-5 tw:gap-1",lg:"tw:px-3 tw:py-1 tw:text-base tw:h-8 tw:gap-1",icon:"tw:size-9"}},defaultVariants:{variant:"default",size:"md"}}),ka={md:16};function ci(r){const e=r.getKey("settings.borderRadius")??16;return typeof e!="number"?ka.md:e}function _a(r,e=8){if(r<=0)return 0;const t=r-e;return t<=0?4:Math.max(4,t)}function cs(r,e=8){const t=ci(r);return{borderRadius:`${_a(t,e)}px`}}const cn=r=>r?r.replace(/<br>/g,"<br />").replace(/\n/g,"<br />"):"",Ca=["innerHTML"],xa=["innerHTML"],Sa=["innerHTML"],Ta=["width","height"],za=`
2
2
  <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M21.76 16.42L15.36 4.9C14.5 3.35 13.31 2.5 12 2.5C10.69 2.5 9.49998 3.35 8.63998 4.9L2.23998 16.42C1.42998 17.89 1.33998 19.3 1.98998 20.41C2.63998 21.52 3.91998 22.13 5.59998 22.13H18.4C20.08 22.13 21.36 21.52 22.01 20.41C22.66 19.3 22.57 17.88 21.76 16.42ZM11.25 9.5C11.25 9.09 11.59 8.75 12 8.75C12.41 8.75 12.75 9.09 12.75 9.5V14.5C12.75 14.91 12.41 15.25 12 15.25C11.59 15.25 11.25 14.91 11.25 14.5V9.5ZM12.71 18.21C12.66 18.25 12.61 18.29 12.56 18.33C12.5 18.37 12.44 18.4 12.38 18.42C12.32 18.45 12.26 18.47 12.19 18.48C12.13 18.49 12.06 18.5 12 18.5C11.94 18.5 11.87 18.49 11.8 18.48C11.74 18.47 11.68 18.45 11.62 18.42C11.56 18.4 11.5 18.37 11.44 18.33C11.39 18.29 11.34 18.25 11.29 18.21C11.11 18.02 11 17.76 11 17.5C11 17.24 11.11 16.98 11.29 16.79C11.34 16.75 11.39 16.71 11.44 16.67C11.5 16.63 11.56 16.6 11.62 16.58C11.68 16.55 11.74 16.53 11.8 16.52C11.93 16.49 12.07 16.49 12.19 16.52C12.26 16.53 12.32 16.55 12.38 16.58C12.44 16.6 12.5 16.63 12.56 16.67C12.61 16.71 12.66 16.75 12.71 16.79C12.89 16.98 13 17.24 13 17.5C13 17.76 12.89 18.02 12.71 18.21Z" fill="currentColor"/>
4
- </svg>`,$s=l.defineComponent({__name:"ChatError",props:{warningElement:{},headlineText:{},descriptionText:{},resetButtonText:{},type:{},configDesignClass:{},borderOffset:{},restartChat:{type:Function}},setup(i){const e=i,t=l.computed(()=>{var c,u;return(c=e.configDesignClass)!=null&&c.getKey("settings.globalRoundingRadius")?Xt(e.configDesignClass,8):{borderRadius:((u=e.warningElement.resetButton)==null?void 0:u.borderRadius)+"px"}}),s=l.computed(()=>{var u;const c=(u=e.configDesignClass)!=null&&u.getKey("settings.globalRoundingRadius")?Xt(e.configDesignClass,8):{borderRadius:e.warningElement.content.borderRadius+"px"};return e.warningElement.warningStyle==="gradient"?{...c,"border-bottom-left-radius":"0px !important","border-bottom-right-radius":"0px !important"}:c}),n=l.computed(()=>{const c=e.warningElement.content.bgColor;if(e.warningElement.warningStyle==="gradient"){const u=c==null?void 0:c.match(/rgba?\(([^)]+)\)/);if(u){const[d,p,h]=u[1].split(",").map(m=>m.trim());return{background:`linear-gradient(180deg, ${c} 0%, rgba(${d}, ${p}, ${h}, 0) 100%)`}}else if(c!=null&&c.startsWith("#")){const d=c.replace("#",""),p=parseInt(d.substr(0,2),16),h=parseInt(d.substr(2,2),16),m=parseInt(d.substr(4,2),16);return{background:`linear-gradient(180deg, ${c} 0%, rgba(${p}, ${h}, ${m}, 0) 100%)`}}}else if(e.warningElement.warningStyle==="faded"){const u=c==null?void 0:c.match(/rgba?\(([^)]+)\)/);if(u){const[d,p,h]=u[1].split(",").map(m=>m.trim());return{backgroundColor:`rgba(${d}, ${p}, ${h}, 0.2)`,border:`1px solid ${c}`}}else if(c!=null&&c.startsWith("#")){const d=c.replace("#",""),p=parseInt(d.substr(0,2),16),h=parseInt(d.substr(2,2),16),m=parseInt(d.substr(4,2),16);return{backgroundColor:`rgba(${p}, ${h}, ${m}, 0.2)`,border:`1px solid ${c}`}}}return{backgroundColor:c}}),r=l.computed(()=>{var u,d,p;const c=((p=(d=(u=e.warningElement)==null?void 0:u.content)==null?void 0:d.icon)==null?void 0:p.src)||Do;try{const g=new DOMParser().parseFromString(String(c),"image/svg+xml").documentElement;return g.setAttribute("width","1em"),g.setAttribute("height","1em"),g.querySelectorAll("[fill], [stroke]").forEach(y=>{const _=y.getAttribute("fill");_&&_!=="none"&&!_.startsWith("url(")&&y.setAttribute("fill","currentColor");const b=y.getAttribute("stroke");b&&b!=="none"&&!b.startsWith("url(")&&y.setAttribute("stroke","currentColor")}),g.outerHTML}catch{return String(c)}}),o=l.computed(()=>e.type==="launchIssue"?"24px":"16px"),a=l.computed(()=>e.warningElement.resetButton?{backgroundColor:e.warningElement.resetButton.bgColor,color:e.warningElement.resetButton.color}:{});return(c,u)=>{var d,p,h,m,g,f,y,_,b,w,C;return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["tw:w-full tw:flex tw:items-center tw:flex-[1_0_0] tw:self-stretch",{"tw:flex-row tw:items-center tw:justify-between":c.type==="connectionIssue"||c.type==="reconnecting","tw:flex-col tw:items-center tw:justify-center tw:h-full":c.type==="launchIssue","tw:p-4":c.warningElement.warningStyle==="gradient","tw:p-2":c.warningElement.warningStyle!=="gradient"}]),style:l.normalizeStyle({...n.value,...s.value,paddingTop:(((d=c.warningElement.content)==null?void 0:d.verticalPadding)||null)+"px",paddingBottom:(((p=c.warningElement.content)==null?void 0:p.verticalPadding)||null)+"px"})},[l.createElementVNode("div",{class:l.normalizeClass(["tw:flex tw:gap-1 tw:items-center svg-inherit",{"tw:flex-row":c.type==="connectionIssue"||c.type==="reconnecting","tw:flex-col ":c.type==="launchIssue"}]),style:l.normalizeStyle({gap:(((h=c.warningElement.content)==null?void 0:h.verticalSpacing)||4)+"px"})},[(m=c.warningElement.content.icon)!=null&&m.showIcon?(l.openBlock(),l.createElementBlock("div",{key:0,style:l.normalizeStyle({color:((g=c.warningElement.content.icon)==null?void 0:g.color)||c.warningElement.content.color,fontSize:o.value,width:(((f=c.warningElement.content.icon)==null?void 0:f.size)||16)+"px",height:(((y=c.warningElement.content.icon)==null?void 0:y.size)||16)+"px"}),class:l.normalizeClass({"tw:w-4 tw:h-4 tw:animate-spin":c.type==="reconnecting"}),innerHTML:r.value},null,14,Ro)):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(["tw:transition-all tw:justify-center tw:text-center tw:leading-none",{"tw:text-left tw:text-xs":c.type==="connectionIssue"||c.type==="reconnecting","tw:text-center tw:text-sm":c.type==="launchIssue"}]),innerHTML:l.unref(Ws)(c.headlineText),style:l.normalizeStyle({color:((_=c.warningElement.content)==null?void 0:_.headlineColor)||c.warningElement.content.color,fontSize:(((b=c.warningElement.content)==null?void 0:b.headlineTextSize)||c.warningElement.content.fontSize)+"px"})},null,14,Bo),l.createElementVNode("p",{class:"tw:text-center tw:justify-center tw:text-xs tw:leading-none",style:l.normalizeStyle({color:c.warningElement.content.color,fontSize:(((w=c.warningElement.content)==null?void 0:w.subTextSize)||c.warningElement.content.fontSize)+"px"}),innerHTML:l.unref(Ws)(c.descriptionText)},null,12,Eo)],6),c.warningElement.resetButton?(l.openBlock(),l.createBlock(l.unref(ot),{key:0,size:(C=c.warningElement.resetButton)==null?void 0:C.size,class:l.normalizeClass([{"tw:mt-8":c.type==="launchIssue"||c.type==="reconnecting"}]),variant:"default",style:l.normalizeStyle([a.value,t.value]),onClick:c.restartChat},{default:l.withCtx(()=>{var v,k;return[((v=c.warningElement.resetButton)==null?void 0:v.showType)!=="text"?(l.openBlock(),l.createElementBlock("svg",{key:0,width:c.warningElement.resetButton.fontSize?c.warningElement.resetButton.fontSize+4:16,height:c.warningElement.resetButton.fontSize?c.warningElement.resetButton.fontSize+4:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:l.normalizeStyle({fill:c.warningElement.resetButton.color||"#2F2F31"})},u[0]||(u[0]=[l.createElementVNode("path",{d:"M10.7935 1.83337H5.20683C2.78016 1.83337 1.3335 3.28004 1.3335 5.70671V11.2867C1.3335 13.72 2.78016 15.1667 5.20683 15.1667H10.7868C13.2135 15.1667 14.6602 13.72 14.6602 11.2934V5.70671C14.6668 3.28004 13.2202 1.83337 10.7935 1.83337ZM8.00016 12.6667C6.80683 12.6667 5.8735 12.0734 5.24016 11.4867V11.96C5.24016 12.2334 5.0135 12.46 4.74016 12.46C4.46683 12.46 4.24016 12.2334 4.24016 11.96V10.1267C4.24016 9.85337 4.46683 9.62671 4.74016 9.62671H6.3935C6.66683 9.62671 6.8935 9.85337 6.8935 10.1267C6.8935 10.4 6.66683 10.6267 6.3935 10.6267H5.7935C6.28683 11.12 7.0535 11.6667 8.00016 11.6667C9.74683 11.6667 11.1668 10.2467 11.1668 8.50004C11.1668 8.22671 11.3935 8.00004 11.6668 8.00004C11.9402 8.00004 12.1668 8.22671 12.1668 8.50004C12.1668 10.8 10.3002 12.6667 8.00016 12.6667ZM12.1668 6.86004C12.1668 6.88004 12.1668 6.90004 12.1668 6.91337C12.1602 6.98671 12.1402 7.05337 12.1068 7.11337C12.0735 7.17337 12.0268 7.22671 11.9668 7.27337C11.9202 7.30671 11.8668 7.33337 11.8068 7.35337C11.7602 7.36671 11.7135 7.37337 11.6668 7.37337H10.0468C9.7735 7.37337 9.54683 7.14671 9.54683 6.87337C9.54683 6.60004 9.7735 6.37337 10.0468 6.37337H10.6002C10.0668 5.88004 9.20683 5.33337 8.0135 5.33337C6.26683 5.33337 4.84683 6.75337 4.84683 8.50004C4.84683 8.77337 4.62016 9.00004 4.34683 9.00004C4.0735 9.00004 3.8335 8.77337 3.8335 8.50004C3.8335 6.20004 5.70016 4.33337 8.00016 4.33337C9.4335 4.33337 10.4868 4.95337 11.1668 5.54671V5.04004C11.1668 4.76671 11.3935 4.54004 11.6668 4.54004C11.9402 4.54004 12.1668 4.76671 12.1668 5.04004V6.86004Z"},null,-1)]),12,Po)):l.createCommentVNode("",!0),((k=c.warningElement.resetButton)==null?void 0:k.showType)!=="icon"?(l.openBlock(),l.createElementBlock("span",{key:1,style:l.normalizeStyle({fontSize:c.warningElement.resetButton.fontSize+"px"})},l.toDisplayString(c.resetButtonText||"Restart"),5)):l.createCommentVNode("",!0)]}),_:1},8,["size","class","style","onClick"])):l.createCommentVNode("",!0)],6)}}});function Xe(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Ti(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}/*!
4
+ </svg>`,un=c.defineComponent({__name:"ChatError",props:{warningElement:{},headlineText:{},descriptionText:{},resetButtonText:{},type:{},configDesignClass:{},borderOffset:{},restartChat:{type:Function}},setup(r){const e=r,t=c.computed(()=>{var l,u;return(l=e.configDesignClass)!=null&&l.getKey("settings.globalRoundingRadius")?cs(e.configDesignClass,8):{borderRadius:((u=e.warningElement.resetButton)==null?void 0:u.borderRadius)+"px"}}),s=c.computed(()=>{var u;const l=(u=e.configDesignClass)!=null&&u.getKey("settings.globalRoundingRadius")?cs(e.configDesignClass,8):{borderRadius:e.warningElement.content.borderRadius+"px"};return e.warningElement.warningStyle==="gradient"?{...l,"border-bottom-left-radius":"0px !important","border-bottom-right-radius":"0px !important"}:l}),n=c.computed(()=>{const l=e.warningElement.content.bgColor;if(e.warningElement.warningStyle==="gradient"){const u=l==null?void 0:l.match(/rgba?\(([^)]+)\)/);if(u){const[d,f,g]=u[1].split(",").map(h=>h.trim());return{background:`linear-gradient(180deg, ${l} 0%, rgba(${d}, ${f}, ${g}, 0) 100%)`}}else if(l!=null&&l.startsWith("#")){const d=l.replace("#",""),f=parseInt(d.substr(0,2),16),g=parseInt(d.substr(2,2),16),h=parseInt(d.substr(4,2),16);return{background:`linear-gradient(180deg, ${l} 0%, rgba(${f}, ${g}, ${h}, 0) 100%)`}}}else if(e.warningElement.warningStyle==="faded"){const u=l==null?void 0:l.match(/rgba?\(([^)]+)\)/);if(u){const[d,f,g]=u[1].split(",").map(h=>h.trim());return{backgroundColor:`rgba(${d}, ${f}, ${g}, 0.2)`,border:`1px solid ${l}`}}else if(l!=null&&l.startsWith("#")){const d=l.replace("#",""),f=parseInt(d.substr(0,2),16),g=parseInt(d.substr(2,2),16),h=parseInt(d.substr(4,2),16);return{backgroundColor:`rgba(${f}, ${g}, ${h}, 0.2)`,border:`1px solid ${l}`}}}return{backgroundColor:l}}),i=c.computed(()=>{var u,d,f;const l=((f=(d=(u=e.warningElement)==null?void 0:u.content)==null?void 0:d.icon)==null?void 0:f.src)||za;try{const m=new DOMParser().parseFromString(String(l),"image/svg+xml").documentElement;return m.setAttribute("width","1em"),m.setAttribute("height","1em"),m.querySelectorAll("[fill], [stroke]").forEach(b=>{const k=b.getAttribute("fill");k&&k!=="none"&&!k.startsWith("url(")&&b.setAttribute("fill","currentColor");const v=b.getAttribute("stroke");v&&v!=="none"&&!v.startsWith("url(")&&b.setAttribute("stroke","currentColor")}),m.outerHTML}catch{return String(l)}}),o=c.computed(()=>e.type==="launchIssue"?"24px":"16px"),a=c.computed(()=>e.warningElement.resetButton?{backgroundColor:e.warningElement.resetButton.bgColor,color:e.warningElement.resetButton.color}:{});return(l,u)=>{var d,f,g,h,m,p,b,k,v,y,_;return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["tw:w-full tw:flex tw:items-center tw:flex-[1_0_0] tw:self-stretch",{"tw:flex-row tw:items-center tw:justify-between":l.type==="connectionIssue"||l.type==="reconnecting","tw:flex-col tw:items-center tw:justify-center tw:h-full":l.type==="launchIssue","tw:p-4":l.warningElement.warningStyle==="gradient","tw:p-2":l.warningElement.warningStyle!=="gradient"}]),style:c.normalizeStyle({...n.value,...s.value,paddingTop:(((d=l.warningElement.content)==null?void 0:d.verticalPadding)||null)+"px",paddingBottom:(((f=l.warningElement.content)==null?void 0:f.verticalPadding)||null)+"px"})},[c.createElementVNode("div",{class:c.normalizeClass(["tw:flex tw:gap-1 tw:items-center svg-inherit",{"tw:flex-row":l.type==="connectionIssue"||l.type==="reconnecting","tw:flex-col ":l.type==="launchIssue"}]),style:c.normalizeStyle({gap:(((g=l.warningElement.content)==null?void 0:g.verticalSpacing)||4)+"px"})},[(h=l.warningElement.content.icon)!=null&&h.showIcon?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle({color:((m=l.warningElement.content.icon)==null?void 0:m.color)||l.warningElement.content.color,fontSize:o.value,width:(((p=l.warningElement.content.icon)==null?void 0:p.size)||16)+"px",height:(((b=l.warningElement.content.icon)==null?void 0:b.size)||16)+"px"}),class:c.normalizeClass({"tw:w-4 tw:h-4 tw:animate-spin":l.type==="reconnecting"}),innerHTML:i.value},null,14,Ca)):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(["tw:transition-all tw:justify-center tw:text-center tw:leading-none",{"tw:text-left tw:text-xs":l.type==="connectionIssue"||l.type==="reconnecting","tw:text-center tw:text-sm":l.type==="launchIssue"}]),innerHTML:c.unref(cn)(l.headlineText),style:c.normalizeStyle({color:((k=l.warningElement.content)==null?void 0:k.headlineColor)||l.warningElement.content.color,fontSize:(((v=l.warningElement.content)==null?void 0:v.headlineTextSize)||l.warningElement.content.fontSize)+"px"})},null,14,xa),c.createElementVNode("p",{class:"tw:text-center tw:justify-center tw:text-xs tw:leading-none",style:c.normalizeStyle({color:l.warningElement.content.color,fontSize:(((y=l.warningElement.content)==null?void 0:y.subTextSize)||l.warningElement.content.fontSize)+"px"}),innerHTML:c.unref(cn)(l.descriptionText)},null,12,Sa)],6),l.warningElement.resetButton?(c.openBlock(),c.createBlock(c.unref(it),{key:0,size:(_=l.warningElement.resetButton)==null?void 0:_.size,class:c.normalizeClass([{"tw:mt-8":l.type==="launchIssue"||l.type==="reconnecting"}]),variant:"default",style:c.normalizeStyle([a.value,t.value]),onClick:l.restartChat},{default:c.withCtx(()=>{var w,C;return[((w=l.warningElement.resetButton)==null?void 0:w.showType)!=="text"?(c.openBlock(),c.createElementBlock("svg",{key:0,width:l.warningElement.resetButton.fontSize?l.warningElement.resetButton.fontSize+4:16,height:l.warningElement.resetButton.fontSize?l.warningElement.resetButton.fontSize+4:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:c.normalizeStyle({fill:l.warningElement.resetButton.color||"#2F2F31"})},u[0]||(u[0]=[c.createElementVNode("path",{d:"M10.7935 1.83337H5.20683C2.78016 1.83337 1.3335 3.28004 1.3335 5.70671V11.2867C1.3335 13.72 2.78016 15.1667 5.20683 15.1667H10.7868C13.2135 15.1667 14.6602 13.72 14.6602 11.2934V5.70671C14.6668 3.28004 13.2202 1.83337 10.7935 1.83337ZM8.00016 12.6667C6.80683 12.6667 5.8735 12.0734 5.24016 11.4867V11.96C5.24016 12.2334 5.0135 12.46 4.74016 12.46C4.46683 12.46 4.24016 12.2334 4.24016 11.96V10.1267C4.24016 9.85337 4.46683 9.62671 4.74016 9.62671H6.3935C6.66683 9.62671 6.8935 9.85337 6.8935 10.1267C6.8935 10.4 6.66683 10.6267 6.3935 10.6267H5.7935C6.28683 11.12 7.0535 11.6667 8.00016 11.6667C9.74683 11.6667 11.1668 10.2467 11.1668 8.50004C11.1668 8.22671 11.3935 8.00004 11.6668 8.00004C11.9402 8.00004 12.1668 8.22671 12.1668 8.50004C12.1668 10.8 10.3002 12.6667 8.00016 12.6667ZM12.1668 6.86004C12.1668 6.88004 12.1668 6.90004 12.1668 6.91337C12.1602 6.98671 12.1402 7.05337 12.1068 7.11337C12.0735 7.17337 12.0268 7.22671 11.9668 7.27337C11.9202 7.30671 11.8668 7.33337 11.8068 7.35337C11.7602 7.36671 11.7135 7.37337 11.6668 7.37337H10.0468C9.7735 7.37337 9.54683 7.14671 9.54683 6.87337C9.54683 6.60004 9.7735 6.37337 10.0468 6.37337H10.6002C10.0668 5.88004 9.20683 5.33337 8.0135 5.33337C6.26683 5.33337 4.84683 6.75337 4.84683 8.50004C4.84683 8.77337 4.62016 9.00004 4.34683 9.00004C4.0735 9.00004 3.8335 8.77337 3.8335 8.50004C3.8335 6.20004 5.70016 4.33337 8.00016 4.33337C9.4335 4.33337 10.4868 4.95337 11.1668 5.54671V5.04004C11.1668 4.76671 11.3935 4.54004 11.6668 4.54004C11.9402 4.54004 12.1668 4.76671 12.1668 5.04004V6.86004Z"},null,-1)]),12,Ta)):c.createCommentVNode("",!0),((C=l.warningElement.resetButton)==null?void 0:C.showType)!=="icon"?(c.openBlock(),c.createElementBlock("span",{key:1,style:c.normalizeStyle({fontSize:l.warningElement.resetButton.fontSize+"px"})},c.toDisplayString(l.resetButtonText||"Restart"),5)):c.createCommentVNode("",!0)]}),_:1},8,["size","class","style","onClick"])):c.createCommentVNode("",!0)],6)}}});function nt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function ui(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}/*!
5
5
  * GSAP 3.13.0
6
6
  * https://gsap.com
7
7
  *
8
8
  * @license Copyright 2008-2025, GreenSock. All rights reserved.
9
9
  * Subject to the terms at https://gsap.com/standard-license
10
10
  * @author: Jack Doyle, jack@greensock.com
11
- */var Me={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Et={duration:.5,overwrite:!1,delay:0},un,ce,X,He=1e8,fe=1/He,Us=Math.PI*2,Ao=Us/4,Lo=0,zi=Math.sqrt,Oo=Math.cos,Vo=Math.sin,le=function(e){return typeof e=="string"},ne=function(e){return typeof e=="function"},Qe=function(e){return typeof e=="number"},dn=function(e){return typeof e>"u"},je=function(e){return typeof e=="object"},ye=function(e){return e!==!1},fn=function(){return typeof window<"u"},us=function(e){return ne(e)||le(e)},Mi=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ge=Array.isArray,Hs=/(?:-?\.?\d|\.)+/gi,Ri=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Tt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Bs=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Bi=/[+-]=-?[.\d]+/,Ei=/[^,'"\[\]\s]+/gi,Io=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,te,We,js,gn,Re={},ps={},Pi,Di=function(e){return(ps=Pt(e,Re))&&_e},pn=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Jt=function(e,t){return!t&&console.warn(e)},Ai=function(e,t){return e&&(Re[e]=t)&&ps&&(ps[e]=t)||Re},Qt=function(){return 0},Ko={suppressEvents:!0,isStart:!0,kill:!1},ds={suppressEvents:!0,kill:!1},No={suppressEvents:!0},hn={},at=[],Gs={},Li,ke={},Es={},$n=30,fs=[],mn="",yn=function(e){var t=e[0],s,n;if(je(t)||ne(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(n=fs.length;n--&&!fs[n].targetTest(t););s=fs[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new rr(e[n],s)))||e.splice(n,1);return e},yt=function(e){return e._gsap||yn(Le(e))[0]._gsap},Oi=function(e,t,s){return(s=e[t])&&ne(s)?e[t]():dn(s)&&e.getAttribute&&e.getAttribute(t)||s},we=function(e,t){return(e=e.split(",")).forEach(t)||e},ie=function(e){return Math.round(e*1e5)/1e5||0},oe=function(e){return Math.round(e*1e7)/1e7||0},Mt=function(e,t){var s=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),s==="+"?e+n:s==="-"?e-n:s==="*"?e*n:e/n},Fo=function(e,t){for(var s=t.length,n=0;e.indexOf(t[n])<0&&++n<s;);return n<s},hs=function(){var e=at.length,t=at.slice(0),s,n;for(Gs={},at.length=0,s=0;s<e;s++)n=t[s],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},wn=function(e){return!!(e._initted||e._startAt||e.add)},Vi=function(e,t,s,n){at.length&&!ce&&hs(),e.render(t,s,!!(ce&&t<0&&wn(e))),at.length&&!ce&&hs()},Ii=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(Ei).length<2?t:le(e)?e.trim():e},Ki=function(e){return e},Be=function(e,t){for(var s in t)s in e||(e[s]=t[s]);return e},Wo=function(e){return function(t,s){for(var n in s)n in t||n==="duration"&&e||n==="ease"||(t[n]=s[n])}},Pt=function(e,t){for(var s in t)e[s]=t[s];return e},Un=function i(e,t){for(var s in t)s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(e[s]=je(t[s])?i(e[s]||(e[s]={}),t[s]):t[s]);return e},ms=function(e,t){var s={},n;for(n in e)n in t||(s[n]=e[n]);return s},Zt=function(e){var t=e.parent||te,s=e.keyframes?Wo(ge(e.keyframes)):Be;if(ye(e.inherit))for(;t;)s(e,t.vars.defaults),t=t.parent||t._dp;return e},$o=function(e,t){for(var s=e.length,n=s===t.length;n&&s--&&e[s]===t[s];);return s<0},Ni=function(e,t,s,n,r){var o=e[n],a;if(r)for(a=t[r];o&&o[r]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[s],e[s]=t),t._next?t._next._prev=t:e[n]=t,t._prev=o,t.parent=t._dp=e,t},_s=function(e,t,s,n){s===void 0&&(s="_first"),n===void 0&&(n="_last");var r=t._prev,o=t._next;r?r._next=o:e[s]===t&&(e[s]=o),o?o._prev=r:e[n]===t&&(e[n]=r),t._next=t._prev=t.parent=null},ct=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},wt=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},Uo=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Zs=function(e,t,s,n){return e._startAt&&(ce?e._startAt.revert(ds):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},Ho=function i(e){return!e||e._ts&&i(e.parent)},Hn=function(e){return e._repeat?Dt(e._tTime,e=e.duration()+e._rDelay)*e:0},Dt=function(e,t){var s=Math.floor(e=oe(e/t));return e&&s===e?s-1:s},ys=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Cs=function(e){return e._end=oe(e._start+(e._tDur/Math.abs(e._ts||e._rts||fe)||0))},xs=function(e,t){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=oe(s._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Cs(e),s._dirty||wt(s,e)),e},Fi=function(e,t){var s;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(s=ys(e.rawTime(),t),(!t._dur||rs(0,t.totalDuration(),s)-t._tTime>fe)&&t.render(s,!0)),wt(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(s=e;s._dp;)s.rawTime()>=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-1e-8}},$e=function(e,t,s,n){return t.parent&&ct(t),t._start=oe((Qe(s)?s:s||e!==te?Ae(e,s,t):e._time)+t._delay),t._end=oe(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Ni(e,t,"_first","_last",e._sort?"_start":0),qs(t)||(e._recent=t),n||Fi(e,t),e._ts<0&&xs(e,e._tTime),e},Wi=function(e,t){return(Re.ScrollTrigger||pn("scrollTrigger",t))&&Re.ScrollTrigger.create(t,e)},$i=function(e,t,s,n,r){if(vn(e,t,r),!e._initted)return 1;if(!s&&e._pt&&!ce&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Li!==Te.frame)return at.push(e),e._lazy=[r,n],1},jo=function i(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||i(t))},qs=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},Go=function(e,t,s,n){var r=e.ratio,o=t<0||!t&&(!e._start&&jo(e)&&!(!e._initted&&qs(e))||(e._ts<0||e._dp._ts<0)&&!qs(e))?0:1,a=e._rDelay,c=0,u,d,p;if(a&&e._repeat&&(c=rs(0,e._tDur,t),d=Dt(c,a),e._yoyo&&d&1&&(o=1-o),d!==Dt(e._tTime,a)&&(r=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==r||ce||n||e._zTime===fe||!t&&e._zTime){if(!e._initted&&$i(e,t,n,s,c))return;for(p=e._zTime,e._zTime=t||(s?fe:0),s||(s=t&&!p),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=c,u=e._pt;u;)u.r(o,u.d),u=u._next;t<0&&Zs(e,t,s,!0),e._onUpdate&&!s&&ze(e,"onUpdate"),c&&e._repeat&&!s&&e.parent&&ze(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&ct(e,1),!s&&!ce&&(ze(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Zo=function(e,t,s){var n;if(s>t)for(n=e._first;n&&n._start<=s;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=s;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},At=function(e,t,s,n){var r=e._repeat,o=oe(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=r?r<0?1e10:oe(o*(r+1)+e._rDelay*r):o,a>0&&!n&&xs(e,e._tTime=e._tDur*a),e.parent&&Cs(e),s||wt(e.parent,e),e},jn=function(e){return e instanceof he?wt(e):At(e,e._dur)},qo={_start:0,endTime:Qt,totalDuration:Qt},Ae=function i(e,t,s){var n=e.labels,r=e._recent||qo,o=e.duration()>=He?r.endTime(!1):e._dur,a,c,u;return le(t)&&(isNaN(t)||t in n)?(c=t.charAt(0),u=t.substr(-1)==="%",a=t.indexOf("="),c==="<"||c===">"?(a>=0&&(t=t.replace(/=/,"")),(c==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(a<0?r:s).totalDuration()/100:1)):a<0?(t in n||(n[t]=o),n[t]):(c=parseFloat(t.charAt(a-1)+t.substr(a+1)),u&&s&&(c=c/100*(ge(s)?s[0]:s).totalDuration()),a>1?i(e,t.substr(0,a-1),s)+c:o+c)):t==null?o:+t},qt=function(e,t,s){var n=Qe(t[1]),r=(n?2:1)+(e<2?0:1),o=t[r],a,c;if(n&&(o.duration=t[1]),o.parent=s,e){for(a=o,c=s;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=ye(c.vars.inherit)&&c.parent;o.immediateRender=ye(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[r-1]}return new re(t[0],o,t[r+1])},dt=function(e,t){return e||e===0?t(e):t},rs=function(e,t,s){return s<e?e:s>t?t:s},de=function(e,t){return!le(e)||!(t=Io.exec(e))?"":t[1]},Yo=function(e,t,s){return dt(s,function(n){return rs(e,t,n)})},Ys=[].slice,Ui=function(e,t){return e&&je(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&je(e[0]))&&!e.nodeType&&e!==We},Xo=function(e,t,s){return s===void 0&&(s=[]),e.forEach(function(n){var r;return le(n)&&!t||Ui(n,1)?(r=s).push.apply(r,Le(n)):s.push(n)})||s},Le=function(e,t,s){return X&&!t&&X.selector?X.selector(e):le(e)&&!s&&(js||!Lt())?Ys.call((t||gn).querySelectorAll(e),0):ge(e)?Xo(e,s):Ui(e)?Ys.call(e,0):e?[e]:[]},Xs=function(e){return e=Le(e)[0]||Jt("Invalid scope")||{},function(t){var s=e.current||e.nativeElement||e;return Le(t,s.querySelectorAll?s:s===e?Jt("Invalid scope")||gn.createElement("div"):e)}},Hi=function(e){return e.sort(function(){return .5-Math.random()})},ji=function(e){if(ne(e))return e;var t=je(e)?e:{each:e},s=bt(t.ease),n=t.from||0,r=parseFloat(t.base)||0,o={},a=n>0&&n<1,c=isNaN(n)||a,u=t.axis,d=n,p=n;return le(n)?d=p={center:.5,edges:.5,end:1}[n]||0:!a&&c&&(d=n[0],p=n[1]),function(h,m,g){var f=(g||t).length,y=o[f],_,b,w,C,v,k,z,x,T;if(!y){if(T=t.grid==="auto"?0:(t.grid||[1,He])[1],!T){for(z=-1e8;z<(z=g[T++].getBoundingClientRect().left)&&T<f;);T<f&&T--}for(y=o[f]=[],_=c?Math.min(T,f)*d-.5:n%T,b=T===He?0:c?f*p/T-.5:n/T|0,z=0,x=He,k=0;k<f;k++)w=k%T-_,C=b-(k/T|0),y[k]=v=u?Math.abs(u==="y"?C:w):zi(w*w+C*C),v>z&&(z=v),v<x&&(x=v);n==="random"&&Hi(y),y.max=z-x,y.min=x,y.v=f=(parseFloat(t.amount)||parseFloat(t.each)*(T>f?f-1:u?u==="y"?f/T:T:Math.max(T,f/T))||0)*(n==="edges"?-1:1),y.b=f<0?r-f:r,y.u=de(t.amount||t.each)||0,s=s&&f<0?sr(s):s}return f=(y[h]-y.min)/y.max||0,oe(y.b+(s?s(f):f)*y.v)+y.u}},Js=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var n=oe(Math.round(parseFloat(s)/e)*e*t);return(n-n%1)/t+(Qe(s)?0:de(s))}},Gi=function(e,t){var s=ge(e),n,r;return!s&&je(e)&&(n=s=e.radius||He,e.values?(e=Le(e.values),(r=!Qe(e[0]))&&(n*=n)):e=Js(e.increment)),dt(t,s?ne(e)?function(o){return r=e(o),Math.abs(r-o)<=n?r:o}:function(o){for(var a=parseFloat(r?o.x:o),c=parseFloat(r?o.y:0),u=He,d=0,p=e.length,h,m;p--;)r?(h=e[p].x-a,m=e[p].y-c,h=h*h+m*m):h=Math.abs(e[p]-a),h<u&&(u=h,d=p);return d=!n||u<=n?e[d]:o,r||d===o||Qe(o)?d:d+de(o)}:Js(e))},Zi=function(e,t,s,n){return dt(ge(e)?!t:s===!0?!!(s=0):!n,function(){return ge(e)?e[~~(Math.random()*e.length)]:(s=s||1e-5)&&(n=s<1?Math.pow(10,(s+"").length-2):1)&&Math.floor(Math.round((e-s/2+Math.random()*(t-e+s*.99))/s)*s*n)/n})},Jo=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return function(n){return t.reduce(function(r,o){return o(r)},n)}},Qo=function(e,t){return function(s){return e(parseFloat(s))+(t||de(s))}},ea=function(e,t,s){return Yi(e,t,0,1,s)},qi=function(e,t,s){return dt(s,function(n){return e[~~t(n)]})},ta=function i(e,t,s){var n=t-e;return ge(e)?qi(e,i(0,e.length),t):dt(s,function(r){return(n+(r-e)%n)%n+e})},sa=function i(e,t,s){var n=t-e,r=n*2;return ge(e)?qi(e,i(0,e.length-1),t):dt(s,function(o){return o=(r+(o-e)%r)%r||0,e+(o>n?r-o:o)})},es=function(e){for(var t=0,s="",n,r,o,a;~(n=e.indexOf("random(",t));)o=e.indexOf(")",n),a=e.charAt(n+7)==="[",r=e.substr(n+7,o-n-7).match(a?Ei:Hs),s+=e.substr(t,n-t)+Zi(a?r:+r[0],a?0:+r[1],+r[2]||1e-5),t=o+1;return s+e.substr(t,e.length-t)},Yi=function(e,t,s,n,r){var o=t-e,a=n-s;return dt(r,function(c){return s+((c-e)/o*a||0)})},na=function i(e,t,s,n){var r=isNaN(e+t)?0:function(m){return(1-m)*e+m*t};if(!r){var o=le(e),a={},c,u,d,p,h;if(s===!0&&(n=1)&&(s=null),o)e={p:e},t={p:t};else if(ge(e)&&!ge(t)){for(d=[],p=e.length,h=p-2,u=1;u<p;u++)d.push(i(e[u-1],e[u]));p--,r=function(g){g*=p;var f=Math.min(h,~~g);return d[f](g-f)},s=t}else n||(e=Pt(ge(e)?[]:{},e));if(!d){for(c in t)bn.call(a,e,c,"get",t[c]);r=function(g){return xn(g,a)||(o?e.p:e)}}}return dt(s,r)},Gn=function(e,t,s){var n=e.labels,r=He,o,a,c;for(o in n)a=n[o]-t,a<0==!!s&&a&&r>(a=Math.abs(a))&&(c=o,r=a);return c},ze=function(e,t,s){var n=e.vars,r=n[t],o=X,a=e._ctx,c,u,d;if(r)return c=n[t+"Params"],u=n.callbackScope||e,s&&at.length&&hs(),a&&(X=a),d=c?r.apply(u,c):r.call(u),X=o,d},jt=function(e){return ct(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ce),e.progress()<1&&ze(e,"onInterrupt"),e},zt,Xi=[],Ji=function(e){if(e)if(e=!e.name&&e.default||e,fn()||e.headless){var t=e.name,s=ne(e),n=t&&!s&&e.init?function(){this._props=[]}:e,r={init:Qt,render:xn,add:bn,kill:ba,modifier:wa,rawVars:0},o={targetTest:0,get:0,getSetter:Cn,aliases:{},register:0};if(Lt(),e!==n){if(ke[t])return;Be(n,Be(ms(e,r),o)),Pt(n.prototype,Pt(r,ms(e,o))),ke[n.prop=t]=n,e.targetTest&&(fs.push(n),hn[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}Ai(t,n),e.register&&e.register(_e,n,be)}else Xi.push(e)},Z=255,Gt={aqua:[0,Z,Z],lime:[0,Z,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Z],navy:[0,0,128],white:[Z,Z,Z],olive:[128,128,0],yellow:[Z,Z,0],orange:[Z,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Z,0,0],pink:[Z,192,203],cyan:[0,Z,Z],transparent:[Z,Z,Z,0]},Ps=function(e,t,s){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(s-t)*e*6:e<.5?s:e*3<2?t+(s-t)*(2/3-e)*6:t)*Z+.5|0},Qi=function(e,t,s){var n=e?Qe(e)?[e>>16,e>>8&Z,e&Z]:0:Gt.black,r,o,a,c,u,d,p,h,m,g;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Gt[e])n=Gt[e];else if(e.charAt(0)==="#"){if(e.length<6&&(r=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+r+r+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&Z,n&Z,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&Z,e&Z]}else if(e.substr(0,3)==="hsl"){if(n=g=e.match(Hs),!t)c=+n[0]%360/360,u=+n[1]/100,d=+n[2]/100,o=d<=.5?d*(u+1):d+u-d*u,r=d*2-o,n.length>3&&(n[3]*=1),n[0]=Ps(c+1/3,r,o),n[1]=Ps(c,r,o),n[2]=Ps(c-1/3,r,o);else if(~e.indexOf("="))return n=e.match(Ri),s&&n.length<4&&(n[3]=1),n}else n=e.match(Hs)||Gt.transparent;n=n.map(Number)}return t&&!g&&(r=n[0]/Z,o=n[1]/Z,a=n[2]/Z,p=Math.max(r,o,a),h=Math.min(r,o,a),d=(p+h)/2,p===h?c=u=0:(m=p-h,u=d>.5?m/(2-p-h):m/(p+h),c=p===r?(o-a)/m+(o<a?6:0):p===o?(a-r)/m+2:(r-o)/m+4,c*=60),n[0]=~~(c+.5),n[1]=~~(u*100+.5),n[2]=~~(d*100+.5)),s&&n.length<4&&(n[3]=1),n},er=function(e){var t=[],s=[],n=-1;return e.split(lt).forEach(function(r){var o=r.match(Tt)||[];t.push.apply(t,o),s.push(n+=o.length+1)}),t.c=s,t},Zn=function(e,t,s){var n="",r=(e+n).match(lt),o=t?"hsla(":"rgba(",a=0,c,u,d,p;if(!r)return e;if(r=r.map(function(h){return(h=Qi(h,t,1))&&o+(t?h[0]+","+h[1]+"%,"+h[2]+"%,"+h[3]:h.join(","))+")"}),s&&(d=er(e),c=s.c,c.join(n)!==d.c.join(n)))for(u=e.replace(lt,"1").split(Tt),p=u.length-1;a<p;a++)n+=u[a]+(~c.indexOf(a)?r.shift()||o+"0,0,0,0)":(d.length?d:r.length?r:s).shift());if(!u)for(u=e.split(lt),p=u.length-1;a<p;a++)n+=u[a]+r[a];return n+u[p]},lt=function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Gt)i+="|"+e+"\\b";return new RegExp(i+")","gi")}(),ia=/hsl[a]?\(/,tr=function(e){var t=e.join(" "),s;if(lt.lastIndex=0,lt.test(t))return s=ia.test(t),e[1]=Zn(e[1],s),e[0]=Zn(e[0],s,er(e[1])),!0},ts,Te=function(){var i=Date.now,e=500,t=33,s=i(),n=s,r=1e3/240,o=r,a=[],c,u,d,p,h,m,g=function f(y){var _=i()-n,b=y===!0,w,C,v,k;if((_>e||_<0)&&(s+=_-t),n+=_,v=n-s,w=v-o,(w>0||b)&&(k=++p.frame,h=v-p.time*1e3,p.time=v=v/1e3,o+=w+(w>=r?4:r-w),C=1),b||(c=u(f)),C)for(m=0;m<a.length;m++)a[m](v,h,k,y)};return p={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(y){return h/(1e3/(y||60))},wake:function(){Pi&&(!js&&fn()&&(We=js=window,gn=We.document||{},Re.gsap=_e,(We.gsapVersions||(We.gsapVersions=[])).push(_e.version),Di(ps||We.GreenSockGlobals||!We.gsap&&We||{}),Xi.forEach(Ji)),d=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&p.sleep(),u=d||function(y){return setTimeout(y,o-p.time*1e3+1|0)},ts=1,g(2))},sleep:function(){(d?cancelAnimationFrame:clearTimeout)(c),ts=0,u=Qt},lagSmoothing:function(y,_){e=y||1/0,t=Math.min(_||33,e)},fps:function(y){r=1e3/(y||240),o=p.time*1e3+r},add:function(y,_,b){var w=_?function(C,v,k,z){y(C,v,k,z),p.remove(w)}:y;return p.remove(y),a[b?"unshift":"push"](w),Lt(),w},remove:function(y,_){~(_=a.indexOf(y))&&a.splice(_,1)&&m>=_&&m--},_listeners:a},p}(),Lt=function(){return!ts&&Te.wake()},N={},ra=/^[\d.\-M][\d.\-,\s]/,oa=/["']/g,aa=function(e){for(var t={},s=e.substr(1,e.length-3).split(":"),n=s[0],r=1,o=s.length,a,c,u;r<o;r++)c=s[r],a=r!==o-1?c.lastIndexOf(","):c.length,u=c.substr(0,a),t[n]=isNaN(u)?u.replace(oa,"").trim():+u,n=c.substr(a+1).trim();return t},la=function(e){var t=e.indexOf("(")+1,s=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<s?e.indexOf(")",s+1):s)},ca=function(e){var t=(e+"").split("("),s=N[t[0]];return s&&t.length>1&&s.config?s.config.apply(null,~e.indexOf("{")?[aa(t[1])]:la(e).split(",").map(Ii)):N._CE&&ra.test(e)?N._CE("",e):s},sr=function(e){return function(t){return 1-e(1-t)}},nr=function i(e,t){for(var s=e._first,n;s;)s instanceof he?i(s,t):s.vars.yoyoEase&&(!s._yoyo||!s._repeat)&&s._yoyo!==t&&(s.timeline?i(s.timeline,t):(n=s._ease,s._ease=s._yEase,s._yEase=n,s._yoyo=t)),s=s._next},bt=function(e,t){return e&&(ne(e)?e:N[e]||ca(e))||t},Ct=function(e,t,s,n){s===void 0&&(s=function(c){return 1-t(1-c)}),n===void 0&&(n=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var r={easeIn:t,easeOut:s,easeInOut:n},o;return we(e,function(a){N[a]=Re[a]=r,N[o=a.toLowerCase()]=s;for(var c in r)N[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=N[a+"."+c]=r[c]}),r},ir=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Ds=function i(e,t,s){var n=t>=1?t:1,r=(s||(e?.3:.45))/(t<1?t:1),o=r/Us*(Math.asin(1/n)||0),a=function(d){return d===1?1:n*Math.pow(2,-10*d)*Vo((d-o)*r)+1},c=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:ir(a);return r=Us/r,c.config=function(u,d){return i(e,u,d)},c},As=function i(e,t){t===void 0&&(t=1.70158);var s=function(o){return o?--o*o*((t+1)*o+t)+1:0},n=e==="out"?s:e==="in"?function(r){return 1-s(1-r)}:ir(s);return n.config=function(r){return i(e,r)},n};we("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,e){var t=e<5?e+1:e;Ct(i+",Power"+(t-1),e?function(s){return Math.pow(s,t)}:function(s){return s},function(s){return 1-Math.pow(1-s,t)},function(s){return s<.5?Math.pow(s*2,t)/2:1-Math.pow((1-s)*2,t)/2})});N.Linear.easeNone=N.none=N.Linear.easeIn;Ct("Elastic",Ds("in"),Ds("out"),Ds());(function(i,e){var t=1/e,s=2*t,n=2.5*t,r=function(a){return a<t?i*a*a:a<s?i*Math.pow(a-1.5/e,2)+.75:a<n?i*(a-=2.25/e)*a+.9375:i*Math.pow(a-2.625/e,2)+.984375};Ct("Bounce",function(o){return 1-r(1-o)},r)})(7.5625,2.75);Ct("Expo",function(i){return Math.pow(2,10*(i-1))*i+i*i*i*i*i*i*(1-i)});Ct("Circ",function(i){return-(zi(1-i*i)-1)});Ct("Sine",function(i){return i===1?1:-Oo(i*Ao)+1});Ct("Back",As("in"),As("out"),As());N.SteppedEase=N.steps=Re.SteppedEase={config:function(e,t){e===void 0&&(e=1);var s=1/e,n=e+(t?0:1),r=t?1:0,o=1-fe;return function(a){return((n*rs(0,o,a)|0)+r)*s}}};Et.ease=N["quad.out"];we("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return mn+=i+","+i+"Params,"});var rr=function(e,t){this.id=Lo++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:Oi,this.set=t?t.getSetter:Cn},ss=function(){function i(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,At(this,+t.duration,1,1),this.data=t.data,X&&(this._ctx=X,X.data.push(this)),ts||Te.wake()}var e=i.prototype;return e.delay=function(s){return s||s===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+s-this._delay),this._delay=s,this):this._delay},e.duration=function(s){return arguments.length?this.totalDuration(this._repeat>0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,At(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,n){if(Lt(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(xs(this,s),!r._dp||r.parent||Fi(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s<this._tDur||this._ts<0&&s>0||!this._tDur&&!s)&&$e(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===fe||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),Vi(this,s,n)),this},e.time=function(s,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+Hn(this))%(this._dur+this._rDelay)||(s?this._dur:0),n):this._time},e.totalProgress=function(s,n){return arguments.length?this.totalTime(this.totalDuration()*s,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(s,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+Hn(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,n){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*r,n):this._repeat?Dt(this._tTime,r)+1:1},e.timeScale=function(s,n){if(!arguments.length)return this._rts===-1e-8?0:this._rts;if(this._rts===s)return this;var r=this.parent&&this._ts?ys(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-1e-8?0:this._rts,this.totalTime(rs(-Math.abs(this._delay),this.totalDuration(),r),n!==!1),Cs(this),Uo(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Lt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==fe&&(this._tTime-=fe)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=s;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&$e(n,this,s-this._delay),this}return this._start},e.endTime=function(s){return this._start+(ye(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var n=this.parent||this._dp;return n?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?ys(n.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=No);var n=ce;return ce=s,wn(this)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),ce=n,this},e.globalTime=function(s){for(var n=this,r=arguments.length?s:n.rawTime();n;)r=n._start+r/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(s):r},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,jn(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var n=this._time;return this._rDelay=s,jn(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,n){return this.totalTime(Ae(this,s),ye(n))},e.restart=function(s,n){return this.play().totalTime(s?-this._delay:0,ye(n)),this._dur||(this._zTime=-1e-8),this},e.play=function(s,n){return s!=null&&this.seek(s,n),this.reversed(!1).paused(!1)},e.reverse=function(s,n){return s!=null&&this.seek(s||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(s,n){return s!=null&&this.seek(s,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var s=this.parent||this._dp,n=this._start,r;return!!(!s||this._ts&&this._initted&&s.isActive()&&(r=s.rawTime(!0))>=n&&r<this.endTime(!0)-fe)},e.eventCallback=function(s,n,r){var o=this.vars;return arguments.length>1?(n?(o[s]=n,r&&(o[s+"Params"]=r),s==="onUpdate"&&(this._onUpdate=n)):delete o[s],this):o[s]},e.then=function(s){var n=this;return new Promise(function(r){var o=ne(s)?s:Ki,a=function(){var u=n.then;n.then=null,ne(o)&&(o=o(n))&&(o.then||o===n)&&(n.then=u),r(o),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?a():n._prom=a})},e.kill=function(){jt(this)},i}();Be(ss.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var he=function(i){Ti(e,i);function e(s,n){var r;return s===void 0&&(s={}),r=i.call(this,s)||this,r.labels={},r.smoothChildTiming=!!s.smoothChildTiming,r.autoRemoveChildren=!!s.autoRemoveChildren,r._sort=ye(s.sortChildren),te&&$e(s.parent||te,Xe(r),n),s.reversed&&r.reverse(),s.paused&&r.paused(!0),s.scrollTrigger&&Wi(Xe(r),s.scrollTrigger),r}var t=e.prototype;return t.to=function(n,r,o){return qt(0,arguments,this),this},t.from=function(n,r,o){return qt(1,arguments,this),this},t.fromTo=function(n,r,o,a){return qt(2,arguments,this),this},t.set=function(n,r,o){return r.duration=0,r.parent=this,Zt(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new re(n,r,Ae(this,o),1),this},t.call=function(n,r,o){return $e(this,re.delayedCall(0,n,r),o)},t.staggerTo=function(n,r,o,a,c,u,d){return o.duration=r,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=d,o.parent=this,new re(n,o,Ae(this,c)),this},t.staggerFrom=function(n,r,o,a,c,u,d){return o.runBackwards=1,Zt(o).immediateRender=ye(o.immediateRender),this.staggerTo(n,r,o,a,c,u,d)},t.staggerFromTo=function(n,r,o,a,c,u,d,p){return a.startAt=o,Zt(a).immediateRender=ye(a.immediateRender),this.staggerTo(n,r,a,c,u,d,p)},t.render=function(n,r,o){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,u=this._dur,d=n<=0?0:oe(n),p=this._zTime<0!=n<0&&(this._initted||!u),h,m,g,f,y,_,b,w,C,v,k,z;if(this!==te&&d>c&&n>=0&&(d=c),d!==this._tTime||o||p){if(a!==this._time&&u&&(d+=this._time-a,n+=this._time-a),h=d,C=this._start,w=this._ts,_=!w,p&&(u||(a=this._zTime),(n||!r)&&(this._zTime=n)),this._repeat){if(k=this._yoyo,y=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(y*100+n,r,o);if(h=oe(d%y),d===c?(f=this._repeat,h=u):(v=oe(d/y),f=~~v,f&&f===v&&(h=u,f--),h>u&&(h=u)),v=Dt(this._tTime,y),!a&&this._tTime&&v!==f&&this._tTime-v*y-this._dur<=0&&(v=f),k&&f&1&&(h=u-h,z=1),f!==v&&!this._lock){var x=k&&v&1,T=x===(k&&f&1);if(f<v&&(x=!x),a=x?0:d%u?u:d,this._lock=1,this.render(a||(z?0:oe(f*y)),r,!u)._lock=0,this._tTime=d,!r&&this.parent&&ze(this,"onRepeat"),this.vars.repeatRefresh&&!z&&(this.invalidate()._lock=1),a&&a!==this._time||_!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,c=this._tDur,T&&(this._lock=2,a=x?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!z&&this.invalidate()),this._lock=0,!this._ts&&!_)return this;nr(this,z)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(b=Zo(this,oe(a),oe(h)),b&&(d-=h-(h=b._start))),this._tTime=d,this._time=h,this._act=!w,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,a=0),!a&&d&&!r&&!v&&(ze(this,"onStart"),this._tTime!==d))return this;if(h>=a&&n>=0)for(m=this._first;m;){if(g=m._next,(m._act||h>=m._start)&&m._ts&&b!==m){if(m.parent!==this)return this.render(n,r,o);if(m.render(m._ts>0?(h-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(h-m._start)*m._ts,r,o),h!==this._time||!this._ts&&!_){b=0,g&&(d+=this._zTime=-1e-8);break}}m=g}else{m=this._last;for(var L=n<0?n:h;m;){if(g=m._prev,(m._act||L<=m._end)&&m._ts&&b!==m){if(m.parent!==this)return this.render(n,r,o);if(m.render(m._ts>0?(L-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(L-m._start)*m._ts,r,o||ce&&wn(m)),h!==this._time||!this._ts&&!_){b=0,g&&(d+=this._zTime=L?-1e-8:fe);break}}m=g}}if(b&&!r&&(this.pause(),b.render(h>=a?0:-1e-8)._zTime=h>=a?1:-1,this._ts))return this._start=C,Cs(this),this.render(n,r,o);this._onUpdate&&!r&&ze(this,"onUpdate",!0),(d===c&&this._tTime>=this.totalDuration()||!d&&a)&&(C===this._start||Math.abs(w)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(d===c&&this._ts>0||!d&&this._ts<0)&&ct(this,1),!r&&!(n<0&&!a)&&(d||a||!c)&&(ze(this,d===c&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(d<c&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,r){var o=this;if(Qe(r)||(r=Ae(this,r,n)),!(n instanceof ss)){if(ge(n))return n.forEach(function(a){return o.add(a,r)}),this;if(le(n))return this.addLabel(n,r);if(ne(n))n=re.delayedCall(0,n);else return this}return this!==n?$e(this,n,r):this},t.getChildren=function(n,r,o,a){n===void 0&&(n=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),a===void 0&&(a=-1e8);for(var c=[],u=this._first;u;)u._start>=a&&(u instanceof re?r&&c.push(u):(o&&c.push(u),n&&c.push.apply(c,u.getChildren(!0,r,o)))),u=u._next;return c},t.getById=function(n){for(var r=this.getChildren(1,1,1),o=r.length;o--;)if(r[o].vars.id===n)return r[o]},t.remove=function(n){return le(n)?this.removeLabel(n):ne(n)?this.killTweensOf(n):(n.parent===this&&_s(this,n),n===this._recent&&(this._recent=this._last),wt(this))},t.totalTime=function(n,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=oe(Te.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),i.prototype.totalTime.call(this,n,r),this._forcing=0,this):this._tTime},t.addLabel=function(n,r){return this.labels[n]=Ae(this,r),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,r,o){var a=re.delayedCall(0,r||Qt,o);return a.data="isPause",this._hasPause=1,$e(this,a,Ae(this,n))},t.removePause=function(n){var r=this._first;for(n=Ae(this,n);r;)r._start===n&&r.data==="isPause"&&ct(r),r=r._next},t.killTweensOf=function(n,r,o){for(var a=this.getTweensOf(n,o),c=a.length;c--;)nt!==a[c]&&a[c].kill(n,r);return this},t.getTweensOf=function(n,r){for(var o=[],a=Le(n),c=this._first,u=Qe(r),d;c;)c instanceof re?Fo(c._targets,a)&&(u?(!nt||c._initted&&c._ts)&&c.globalTime(0)<=r&&c.globalTime(c.totalDuration())>r:!r||c.isActive())&&o.push(c):(d=c.getTweensOf(a,r)).length&&o.push.apply(o,d),c=c._next;return o},t.tweenTo=function(n,r){r=r||{};var o=this,a=Ae(o,n),c=r,u=c.startAt,d=c.onStart,p=c.onStartParams,h=c.immediateRender,m,g=re.to(o,Be({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:r.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale())||fe,onStart:function(){if(o.pause(),!m){var y=r.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());g._dur!==y&&At(g,y,0,1).render(g._time,!0,!0),m=1}d&&d.apply(g,p||[])}},r));return h?g.render(0):g},t.tweenFromTo=function(n,r,o){return this.tweenTo(r,Be({startAt:{time:Ae(this,n)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),Gn(this,Ae(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),Gn(this,Ae(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+fe)},t.shiftChildren=function(n,r,o){o===void 0&&(o=0);for(var a=this._first,c=this.labels,u;a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(r)for(u in c)c[u]>=o&&(c[u]+=n);return wt(this)},t.invalidate=function(n){var r=this._first;for(this._lock=0;r;)r.invalidate(n),r=r._next;return i.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var r=this._first,o;r;)o=r._next,this.remove(r),r=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),wt(this)},t.totalDuration=function(n){var r=0,o=this,a=o._last,c=He,u,d,p;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(p=o.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),d=a._start,d>c&&o._sort&&a._ts&&!o._lock?(o._lock=1,$e(o,a,d-a._delay,1)._lock=0):c=d,d<0&&a._ts&&(r-=d,(!p&&!o._dp||p&&p.smoothChildTiming)&&(o._start+=d/o._ts,o._time-=d,o._tTime-=d),o.shiftChildren(-d,!1,-1/0),c=0),a._end>r&&a._ts&&(r=a._end),a=u;At(o,o===te&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(n){if(te._ts&&(Vi(te,ys(n,te)),Li=Te.frame),Te.frame>=$n){$n+=Me.autoSleep||120;var r=te._first;if((!r||!r._ts)&&Me.autoSleep&&Te._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||Te.sleep()}}},e}(ss);Be(he.prototype,{_lock:0,_hasPause:0,_forcing:0});var ua=function(e,t,s,n,r,o,a){var c=new be(this._pt,e,t,0,1,dr,null,r),u=0,d=0,p,h,m,g,f,y,_,b;for(c.b=s,c.e=n,s+="",n+="",(_=~n.indexOf("random("))&&(n=es(n)),o&&(b=[s,n],o(b,e,t),s=b[0],n=b[1]),h=s.match(Bs)||[];p=Bs.exec(n);)g=p[0],f=n.substring(u,p.index),m?m=(m+1)%5:f.substr(-5)==="rgba("&&(m=1),g!==h[d++]&&(y=parseFloat(h[d-1])||0,c._pt={_next:c._pt,p:f||d===1?f:",",s:y,c:g.charAt(1)==="="?Mt(y,g)-y:parseFloat(g)-y,m:m&&m<4?Math.round:0},u=Bs.lastIndex);return c.c=u<n.length?n.substring(u,n.length):"",c.fp=a,(Bi.test(n)||_)&&(c.e=0),this._pt=c,c},bn=function(e,t,s,n,r,o,a,c,u,d){ne(n)&&(n=n(r||0,e,o));var p=e[t],h=s!=="get"?s:ne(p)?u?e[t.indexOf("set")||!ne(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():p,m=ne(p)?u?ha:cr:_n,g;if(le(n)&&(~n.indexOf("random(")&&(n=es(n)),n.charAt(1)==="="&&(g=Mt(h,n)+(de(h)||0),(g||g===0)&&(n=g))),!d||h!==n||Qs)return!isNaN(h*n)&&n!==""?(g=new be(this._pt,e,t,+h||0,n-(h||0),typeof p=="boolean"?ya:ur,0,m),u&&(g.fp=u),a&&g.modifier(a,this,e),this._pt=g):(!p&&!(t in e)&&pn(t,n),ua.call(this,e,t,h,n,m,c||Me.stringFilter,u))},da=function(e,t,s,n,r){if(ne(e)&&(e=Yt(e,r,t,s,n)),!je(e)||e.style&&e.nodeType||ge(e)||Mi(e))return le(e)?Yt(e,r,t,s,n):e;var o={},a;for(a in e)o[a]=Yt(e[a],r,t,s,n);return o},or=function(e,t,s,n,r,o){var a,c,u,d;if(ke[e]&&(a=new ke[e]).init(r,a.rawVars?t[e]:da(t[e],n,r,o,s),s,n,o)!==!1&&(s._pt=c=new be(s._pt,r,e,0,1,a.render,a,0,a.priority),s!==zt))for(u=s._ptLookup[s._targets.indexOf(r)],d=a._props.length;d--;)u[a._props[d]]=c;return a},nt,Qs,vn=function i(e,t,s){var n=e.vars,r=n.ease,o=n.startAt,a=n.immediateRender,c=n.lazy,u=n.onUpdate,d=n.runBackwards,p=n.yoyoEase,h=n.keyframes,m=n.autoRevert,g=e._dur,f=e._startAt,y=e._targets,_=e.parent,b=_&&_.data==="nested"?_.vars.targets:y,w=e._overwrite==="auto"&&!un,C=e.timeline,v,k,z,x,T,L,W,K,$,J,P,F,j;if(C&&(!h||!r)&&(r="none"),e._ease=bt(r,Et.ease),e._yEase=p?sr(bt(p===!0?r:p,Et.ease)):0,p&&e._yoyo&&!e._repeat&&(p=e._yEase,e._yEase=e._ease,e._ease=p),e._from=!C&&!!n.runBackwards,!C||h&&!n.stagger){if(K=y[0]?yt(y[0]).harness:0,F=K&&n[K.prop],v=ms(n,hn),f&&(f._zTime<0&&f.progress(1),t<0&&d&&a&&!m?f.render(-1,!0):f.revert(d&&g?ds:Ko),f._lazy=0),o){if(ct(e._startAt=re.set(y,Be({data:"isStart",overwrite:!1,parent:_,immediateRender:!0,lazy:!f&&ye(c),startAt:null,delay:0,onUpdate:u&&function(){return ze(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ce||!a&&!m)&&e._startAt.revert(ds),a&&g&&t<=0&&s<=0){t&&(e._zTime=t);return}}else if(d&&g&&!f){if(t&&(a=!1),z=Be({overwrite:!1,data:"isFromStart",lazy:a&&!f&&ye(c),immediateRender:a,stagger:0,parent:_},v),F&&(z[K.prop]=F),ct(e._startAt=re.set(y,z)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(ce?e._startAt.revert(ds):e._startAt.render(-1,!0)),e._zTime=t,!a)i(e._startAt,fe,fe);else if(!t)return}for(e._pt=e._ptCache=0,c=g&&ye(c)||c&&!g,k=0;k<y.length;k++){if(T=y[k],W=T._gsap||yn(y)[k]._gsap,e._ptLookup[k]=J={},Gs[W.id]&&at.length&&hs(),P=b===y?k:b.indexOf(T),K&&($=new K).init(T,F||v,e,P,b)!==!1&&(e._pt=x=new be(e._pt,T,$.name,0,1,$.render,$,0,$.priority),$._props.forEach(function(D){J[D]=x}),$.priority&&(L=1)),!K||F)for(z in v)ke[z]&&($=or(z,v,e,P,T,b))?$.priority&&(L=1):J[z]=x=bn.call(e,T,z,"get",v[z],P,b,0,n.stringFilter);e._op&&e._op[k]&&e.kill(T,e._op[k]),w&&e._pt&&(nt=e,te.killTweensOf(T,J,e.globalTime(t)),j=!e.parent,nt=0),e._pt&&c&&(Gs[W.id]=1)}L&&fr(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!j,h&&t<=0&&C.render(He,!0,!0)},fa=function(e,t,s,n,r,o,a,c){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],d,p,h,m;if(!u)for(u=e._ptCache[t]=[],h=e._ptLookup,m=e._targets.length;m--;){if(d=h[m][t],d&&d.d&&d.d._pt)for(d=d.d._pt;d&&d.p!==t&&d.fp!==t;)d=d._next;if(!d)return Qs=1,e.vars[t]="+=0",vn(e,a),Qs=0,c?Jt(t+" not eligible for reset"):1;u.push(d)}for(m=u.length;m--;)p=u[m],d=p._pt||p,d.s=(n||n===0)&&!r?n:d.s+(n||0)+o*d.c,d.c=s-d.s,p.e&&(p.e=ie(s)+de(p.e)),p.b&&(p.b=d.s+de(p.b))},ga=function(e,t){var s=e[0]?yt(e[0]).harness:0,n=s&&s.aliases,r,o,a,c;if(!n)return t;r=Pt({},t);for(o in n)if(o in r)for(c=n[o].split(","),a=c.length;a--;)r[c[a]]=r[o];return r},pa=function(e,t,s,n){var r=t.ease||n||"power1.inOut",o,a;if(ge(t))a=s[e]||(s[e]=[]),t.forEach(function(c,u){return a.push({t:u/(t.length-1)*100,v:c,e:r})});else for(o in t)a=s[o]||(s[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:r})},Yt=function(e,t,s,n,r){return ne(e)?e.call(t,s,n,r):le(e)&&~e.indexOf("random(")?es(e):e},ar=mn+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",lr={};we(ar+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return lr[i]=1});var re=function(i){Ti(e,i);function e(s,n,r,o){var a;typeof n=="number"&&(r.duration=n,n=r,r=null),a=i.call(this,o?n:Zt(n))||this;var c=a.vars,u=c.duration,d=c.delay,p=c.immediateRender,h=c.stagger,m=c.overwrite,g=c.keyframes,f=c.defaults,y=c.scrollTrigger,_=c.yoyoEase,b=n.parent||te,w=(ge(s)||Mi(s)?Qe(s[0]):"length"in n)?[s]:Le(s),C,v,k,z,x,T,L,W;if(a._targets=w.length?yn(w):Jt("GSAP target "+s+" not found. https://gsap.com",!Me.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=m,g||h||us(u)||us(d)){if(n=a.vars,C=a.timeline=new he({data:"nested",defaults:f||{},targets:b&&b.data==="nested"?b.vars.targets:w}),C.kill(),C.parent=C._dp=Xe(a),C._start=0,h||us(u)||us(d)){if(z=w.length,L=h&&ji(h),je(h))for(x in h)~ar.indexOf(x)&&(W||(W={}),W[x]=h[x]);for(v=0;v<z;v++)k=ms(n,lr),k.stagger=0,_&&(k.yoyoEase=_),W&&Pt(k,W),T=w[v],k.duration=+Yt(u,Xe(a),v,T,w),k.delay=(+Yt(d,Xe(a),v,T,w)||0)-a._delay,!h&&z===1&&k.delay&&(a._delay=d=k.delay,a._start+=d,k.delay=0),C.to(T,k,L?L(v,T,w):0),C._ease=N.none;C.duration()?u=d=0:a.timeline=0}else if(g){Zt(Be(C.vars.defaults,{ease:"none"})),C._ease=bt(g.ease||n.ease||"none");var K=0,$,J,P;if(ge(g))g.forEach(function(F){return C.to(w,F,">")}),C.duration();else{k={};for(x in g)x==="ease"||x==="easeEach"||pa(x,g[x],k,g.easeEach);for(x in k)for($=k[x].sort(function(F,j){return F.t-j.t}),K=0,v=0;v<$.length;v++)J=$[v],P={ease:J.e,duration:(J.t-(v?$[v-1].t:0))/100*u},P[x]=J.v,C.to(w,P,K),K+=P.duration;C.duration()<u&&C.to({},{duration:u-C.duration()})}}u||a.duration(u=C.duration())}else a.timeline=0;return m===!0&&!un&&(nt=Xe(a),te.killTweensOf(w),nt=0),$e(b,Xe(a),r),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(p||!u&&!g&&a._start===oe(b._time)&&ye(p)&&Ho(Xe(a))&&b.data!=="nested")&&(a._tTime=-1e-8,a.render(Math.max(0,-d)||0)),y&&Wi(Xe(a),y),a}var t=e.prototype;return t.render=function(n,r,o){var a=this._time,c=this._tDur,u=this._dur,d=n<0,p=n>c-fe&&!d?c:n<fe?0:n,h,m,g,f,y,_,b,w,C;if(!u)Go(this,n,r,o);else if(p!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==d||this._lazy){if(h=p,w=this.timeline,this._repeat){if(f=u+this._rDelay,this._repeat<-1&&d)return this.totalTime(f*100+n,r,o);if(h=oe(p%f),p===c?(g=this._repeat,h=u):(y=oe(p/f),g=~~y,g&&g===y?(h=u,g--):h>u&&(h=u)),_=this._yoyo&&g&1,_&&(C=this._yEase,h=u-h),y=Dt(this._tTime,f),h===a&&!o&&this._initted&&g===y)return this._tTime=p,this;g!==y&&(w&&this._yEase&&nr(w,_),this.vars.repeatRefresh&&!_&&!this._lock&&h!==f&&this._initted&&(this._lock=o=1,this.render(oe(f*g),!0).invalidate()._lock=0))}if(!this._initted){if($i(this,d?n:h,o,r,p))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&g!==y))return this;if(u!==this._dur)return this.render(n,r,o)}if(this._tTime=p,this._time=h,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=b=(C||this._ease)(h/u),this._from&&(this.ratio=b=1-b),!a&&p&&!r&&!y&&(ze(this,"onStart"),this._tTime!==p))return this;for(m=this._pt;m;)m.r(b,m.d),m=m._next;w&&w.render(n<0?n:w._dur*w._ease(h/this._dur),r,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!r&&(d&&Zs(this,n,r,o),ze(this,"onUpdate")),this._repeat&&g!==y&&this.vars.onRepeat&&!r&&this.parent&&ze(this,"onRepeat"),(p===this._tDur||!p)&&this._tTime===p&&(d&&!this._onUpdate&&Zs(this,n,!0,!0),(n||!u)&&(p===this._tDur&&this._ts>0||!p&&this._ts<0)&&ct(this,1),!r&&!(d&&!a)&&(p||a||_)&&(ze(this,p===c?"onComplete":"onReverseComplete",!0),this._prom&&!(p<c&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),i.prototype.invalidate.call(this,n)},t.resetTo=function(n,r,o,a,c){ts||Te.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),d;return this._initted||vn(this,u),d=this._ease(u/this._dur),fa(this,n,r,o,a,d,u,c)?this.resetTo(n,r,o,a,1):(xs(this,0),this.parent||Ni(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,r){if(r===void 0&&(r="all"),!n&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?jt(this):this.scrollTrigger&&this.scrollTrigger.kill(!!ce),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,r,nt&&nt.vars.overwrite!==!0)._first||jt(this),this.parent&&o!==this.timeline.totalDuration()&&At(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,c=n?Le(n):a,u=this._ptLookup,d=this._pt,p,h,m,g,f,y,_;if((!r||r==="all")&&$o(a,c))return r==="all"&&(this._pt=0),jt(this);for(p=this._op=this._op||[],r!=="all"&&(le(r)&&(f={},we(r,function(b){return f[b]=1}),r=f),r=ga(a,r)),_=a.length;_--;)if(~c.indexOf(a[_])){h=u[_],r==="all"?(p[_]=r,g=h,m={}):(m=p[_]=p[_]||{},g=r);for(f in g)y=h&&h[f],y&&((!("kill"in y.d)||y.d.kill(f)===!0)&&_s(this,y,"_pt"),delete h[f]),m!=="all"&&(m[f]=1)}return this._initted&&!this._pt&&d&&jt(this),this},e.to=function(n,r){return new e(n,r,arguments[2])},e.from=function(n,r){return qt(1,arguments)},e.delayedCall=function(n,r,o,a){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:r,onReverseComplete:r,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(n,r,o){return qt(2,arguments)},e.set=function(n,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(n,r)},e.killTweensOf=function(n,r,o){return te.killTweensOf(n,r,o)},e}(ss);Be(re.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});we("staggerTo,staggerFrom,staggerFromTo",function(i){re[i]=function(){var e=new he,t=Ys.call(arguments,0);return t.splice(i==="staggerFromTo"?5:4,0,0),e[i].apply(e,t)}});var _n=function(e,t,s){return e[t]=s},cr=function(e,t,s){return e[t](s)},ha=function(e,t,s,n){return e[t](n.fp,s)},ma=function(e,t,s){return e.setAttribute(t,s)},Cn=function(e,t){return ne(e[t])?cr:dn(e[t])&&e.setAttribute?ma:_n},ur=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},ya=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},dr=function(e,t){var s=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;s;)n=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+n,s=s._next;n+=t.c}t.set(t.t,t.p,n,t)},xn=function(e,t){for(var s=t._pt;s;)s.r(e,s.d),s=s._next},wa=function(e,t,s,n){for(var r=this._pt,o;r;)o=r._next,r.p===n&&r.modifier(e,t,s),r=o},ba=function(e){for(var t=this._pt,s,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?_s(this,t,"_pt"):t.dep||(s=1),t=n;return!s},va=function(e,t,s,n){n.mSet(e,t,n.m.call(n.tween,s,n.mt),n)},fr=function(e){for(var t=e._pt,s,n,r,o;t;){for(s=t._next,n=r;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:o)?t._prev._next=t:r=t,(t._next=n)?n._prev=t:o=t,t=s}e._pt=r},be=function(){function i(t,s,n,r,o,a,c,u,d){this.t=s,this.s=r,this.c=o,this.p=n,this.r=a||ur,this.d=c||this,this.set=u||_n,this.pr=d||0,this._next=t,t&&(t._prev=this)}var e=i.prototype;return e.modifier=function(s,n,r){this.mSet=this.mSet||this.set,this.set=va,this.m=s,this.mt=r,this.tween=n},i}();we(mn+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(i){return hn[i]=1});Re.TweenMax=Re.TweenLite=re;Re.TimelineLite=Re.TimelineMax=he;te=new he({sortChildren:!1,defaults:Et,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Me.stringFilter=tr;var vt=[],gs={},_a=[],qn=0,Ca=0,Ls=function(e){return(gs[e]||_a).map(function(t){return t()})},en=function(){var e=Date.now(),t=[];e-qn>2&&(Ls("matchMediaInit"),vt.forEach(function(s){var n=s.queries,r=s.conditions,o,a,c,u;for(a in n)o=We.matchMedia(n[a]).matches,o&&(c=1),o!==r[a]&&(r[a]=o,u=1);u&&(s.revert(),c&&t.push(s))}),Ls("matchMediaRevert"),t.forEach(function(s){return s.onMatch(s,function(n){return s.add(null,n)})}),qn=e,Ls("matchMedia"))},gr=function(){function i(t,s){this.selector=s&&Xs(s),this.data=[],this._r=[],this.isReverted=!1,this.id=Ca++,t&&this.add(t)}var e=i.prototype;return e.add=function(s,n,r){ne(s)&&(r=n,n=s,s=ne);var o=this,a=function(){var u=X,d=o.selector,p;return u&&u!==o&&u.data.push(o),r&&(o.selector=Xs(r)),X=o,p=n.apply(o,arguments),ne(p)&&o._r.push(p),X=u,o.selector=d,o.isReverted=!1,p};return o.last=a,s===ne?a(o,function(c){return o.add(null,c)}):s?o[s]=a:a},e.ignore=function(s){var n=X;X=null,s(this),X=n},e.getTweens=function(){var s=[];return this.data.forEach(function(n){return n instanceof i?s.push.apply(s,n.getTweens()):n instanceof re&&!(n.parent&&n.parent.data==="nested")&&s.push(n)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,n){var r=this;if(s?function(){for(var a=r.getTweens(),c=r.data.length,u;c--;)u=r.data[c],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(d){return a.splice(a.indexOf(d),1)}));for(a.map(function(d){return{g:d._dur||d._delay||d._sat&&!d._sat.vars.immediateRender?d.globalTime(0):-1/0,t:d}}).sort(function(d,p){return p.g-d.g||-1/0}).forEach(function(d){return d.t.revert(s)}),c=r.data.length;c--;)u=r.data[c],u instanceof he?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof re)&&u.revert&&u.revert(s);r._r.forEach(function(d){return d(s,r)}),r.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),n)for(var o=vt.length;o--;)vt[o].id===this.id&&vt.splice(o,1)},e.revert=function(s){this.kill(s||{})},i}(),xa=function(){function i(t){this.contexts=[],this.scope=t,X&&X.data.push(this)}var e=i.prototype;return e.add=function(s,n,r){je(s)||(s={matches:s});var o=new gr(0,r||this.scope),a=o.conditions={},c,u,d;X&&!o.selector&&(o.selector=X.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=s;for(u in s)u==="all"?d=1:(c=We.matchMedia(s[u]),c&&(vt.indexOf(o)<0&&vt.push(o),(a[u]=c.matches)&&(d=1),c.addListener?c.addListener(en):c.addEventListener("change",en)));return d&&n(o,function(p){return o.add(null,p)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(n){return n.kill(s,!0)})},i}(),ws={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];t.forEach(function(n){return Ji(n)})},timeline:function(e){return new he(e)},getTweensOf:function(e,t){return te.getTweensOf(e,t)},getProperty:function(e,t,s,n){le(e)&&(e=Le(e)[0]);var r=yt(e||{}).get,o=s?Ki:Ii;return s==="native"&&(s=""),e&&(t?o((ke[t]&&ke[t].get||r)(e,t,s,n)):function(a,c,u){return o((ke[a]&&ke[a].get||r)(e,a,c,u))})},quickSetter:function(e,t,s){if(e=Le(e),e.length>1){var n=e.map(function(d){return _e.quickSetter(d,t,s)}),r=n.length;return function(d){for(var p=r;p--;)n[p](d)}}e=e[0]||{};var o=ke[t],a=yt(e),c=a.harness&&(a.harness.aliases||{})[t]||t,u=o?function(d){var p=new o;zt._pt=0,p.init(e,s?d+s:d,zt,0,[e]),p.render(1,p),zt._pt&&xn(1,zt)}:a.set(e,c);return o?u:function(d){return u(e,c,s?d+s:d,a,1)}},quickTo:function(e,t,s){var n,r=_e.to(e,Be((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),s||{})),o=function(c,u,d){return r.resetTo(t,c,u,d)};return o.tween=r,o},isTweening:function(e){return te.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=bt(e.ease,Et.ease)),Un(Et,e||{})},config:function(e){return Un(Me,e||{})},registerEffect:function(e){var t=e.name,s=e.effect,n=e.plugins,r=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!ke[a]&&!Re[a]&&Jt(t+" effect requires "+a+" plugin.")}),Es[t]=function(a,c,u){return s(Le(a),Be(c||{},r),u)},o&&(he.prototype[t]=function(a,c,u){return this.add(Es[t](a,je(c)?c:(u=c)&&{},this),u)})},registerEase:function(e,t){N[e]=bt(t)},parseEase:function(e,t){return arguments.length?bt(e,t):N},getById:function(e){return te.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var s=new he(e),n,r;for(s.smoothChildTiming=ye(e.smoothChildTiming),te.remove(s),s._dp=0,s._time=s._tTime=te._time,n=te._first;n;)r=n._next,(t||!(!n._dur&&n instanceof re&&n.vars.onComplete===n._targets[0]))&&$e(s,n,n._start-n._delay),n=r;return $e(te,s,0),s},context:function(e,t){return e?new gr(e,t):X},matchMedia:function(e){return new xa(e)},matchMediaRefresh:function(){return vt.forEach(function(e){var t=e.conditions,s,n;for(n in t)t[n]&&(t[n]=!1,s=1);s&&e.revert()})||en()},addEventListener:function(e,t){var s=gs[e]||(gs[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=gs[e],n=s&&s.indexOf(t);n>=0&&s.splice(n,1)},utils:{wrap:ta,wrapYoyo:sa,distribute:ji,random:Zi,snap:Gi,normalize:ea,getUnit:de,clamp:Yo,splitColor:Qi,toArray:Le,selector:Xs,mapRange:Yi,pipe:Jo,unitize:Qo,interpolate:na,shuffle:Hi},install:Di,effects:Es,ticker:Te,updateRoot:he.updateRoot,plugins:ke,globalTimeline:te,core:{PropTween:be,globals:Ai,Tween:re,Timeline:he,Animation:ss,getCache:yt,_removeLinkedListItem:_s,reverting:function(){return ce},context:function(e){return e&&X&&(X.data.push(e),e._ctx=X),X},suppressOverwrites:function(e){return un=e}}};we("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return ws[i]=re[i]});Te.add(he.updateRoot);zt=ws.to({},{duration:0});var Sa=function(e,t){for(var s=e._pt;s&&s.p!==t&&s.op!==t&&s.fp!==t;)s=s._next;return s},ka=function(e,t){var s=e._targets,n,r,o;for(n in t)for(r=s.length;r--;)o=e._ptLookup[r][n],o&&(o=o.d)&&(o._pt&&(o=Sa(o,n)),o&&o.modifier&&o.modifier(t[n],e,s[r],n))},Os=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,r,o){o._onInit=function(a){var c,u;if(le(r)&&(c={},we(r,function(d){return c[d]=1}),r=c),t){c={};for(u in r)c[u]=t(r[u]);r=c}ka(a,r)}}}},_e=ws.registerPlugin({name:"attr",init:function(e,t,s,n,r){var o,a,c;this.tween=s;for(o in t)c=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(c||0)+"",t[o],n,r,0,0,o),a.op=o,a.b=c,this._props.push(o)},render:function(e,t){for(var s=t._pt;s;)ce?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",headless:1,init:function(e,t){for(var s=t.length;s--;)this.add(e,s,e[s]||0,t[s],0,0,0,0,0,1)}},Os("roundProps",Js),Os("modifiers"),Os("snap",Gi))||ws;re.version=he.version=_e.version="3.13.0";Pi=1;fn()&&Lt();N.Power0;N.Power1;N.Power2;N.Power3;N.Power4;N.Linear;N.Quad;N.Cubic;N.Quart;N.Quint;N.Strong;N.Elastic;N.Back;N.SteppedEase;N.Bounce;N.Sine;N.Expo;N.Circ;/*!
11
+ */var Be={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Vt={duration:.5,overwrite:!1,delay:0},An,pe,ee,Ye=1e8,fe=1/Ye,dn=Math.PI*2,Ra=dn/4,Ea=0,di=Math.sqrt,Ma=Math.cos,Ba=Math.sin,de=function(e){return typeof e=="string"},oe=function(e){return typeof e=="function"},ot=function(e){return typeof e=="number"},Dn=function(e){return typeof e>"u"},Xe=function(e){return typeof e=="object"},ve=function(e){return e!==!1},Ln=function(){return typeof window<"u"},Cs=function(e){return oe(e)||de(e)},pi=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ge=Array.isArray,pn=/(?:-?\.?\d|\.)+/gi,hi=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Dt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ys=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,fi=/[+-]=-?[.\d]+/,gi=/[^,'"\[\]\s]+/gi,Pa=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,re,qe,hn,In,Pe={},Es={},mi,wi=function(e){return(Es=Kt(e,Pe))&&xe},On=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},us=function(e,t){return!t&&console.warn(e)},bi=function(e,t){return e&&(Pe[e]=t)&&Es&&(Es[e]=t)||Pe},ds=function(){return 0},Aa={suppressEvents:!0,isStart:!0,kill:!1},Ts={suppressEvents:!0,kill:!1},Da={suppressEvents:!0},$n={},ht=[],fn={},yi,Re={},Xs={},kr=30,zs=[],Vn="",Kn=function(e){var t=e[0],s,n;if(Xe(t)||oe(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(n=zs.length;n--&&!zs[n].targetTest(t););s=zs[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new Ui(e[n],s)))||e.splice(n,1);return e},Ct=function(e){return e._gsap||Kn($e(e))[0]._gsap},vi=function(e,t,s){return(s=e[t])&&oe(s)?e[t]():Dn(s)&&e.getAttribute&&e.getAttribute(t)||s},ke=function(e,t){return(e=e.split(",")).forEach(t)||e},ae=function(e){return Math.round(e*1e5)/1e5||0},ce=function(e){return Math.round(e*1e7)/1e7||0},It=function(e,t){var s=t.charAt(0),n=parseFloat(t.substr(2));return e=parseFloat(e),s==="+"?e+n:s==="-"?e-n:s==="*"?e*n:e/n},La=function(e,t){for(var s=t.length,n=0;e.indexOf(t[n])<0&&++n<s;);return n<s},Ms=function(){var e=ht.length,t=ht.slice(0),s,n;for(fn={},ht.length=0,s=0;s<e;s++)n=t[s],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},Nn=function(e){return!!(e._initted||e._startAt||e.add)},ki=function(e,t,s,n){ht.length&&!pe&&Ms(),e.render(t,s,!!(pe&&t<0&&Nn(e))),ht.length&&!pe&&Ms()},_i=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(gi).length<2?t:de(e)?e.trim():e},Ci=function(e){return e},Ae=function(e,t){for(var s in t)s in e||(e[s]=t[s]);return e},Ia=function(e){return function(t,s){for(var n in s)n in t||n==="duration"&&e||n==="ease"||(t[n]=s[n])}},Kt=function(e,t){for(var s in t)e[s]=t[s];return e},_r=function r(e,t){for(var s in t)s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(e[s]=Xe(t[s])?r(e[s]||(e[s]={}),t[s]):t[s]);return e},Bs=function(e,t){var s={},n;for(n in e)n in t||(s[n]=e[n]);return s},is=function(e){var t=e.parent||re,s=e.keyframes?Ia(ge(e.keyframes)):Ae;if(ve(e.inherit))for(;t;)s(e,t.vars.defaults),t=t.parent||t._dp;return e},Oa=function(e,t){for(var s=e.length,n=s===t.length;n&&s--&&e[s]===t[s];);return s<0},xi=function(e,t,s,n,i){var o=e[n],a;if(i)for(a=t[i];o&&o[i]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[s],e[s]=t),t._next?t._next._prev=t:e[n]=t,t._prev=o,t.parent=t._dp=e,t},Vs=function(e,t,s,n){s===void 0&&(s="_first"),n===void 0&&(n="_last");var i=t._prev,o=t._next;i?i._next=o:e[s]===t&&(e[s]=o),o?o._prev=i:e[n]===t&&(e[n]=i),t._next=t._prev=t.parent=null},gt=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},xt=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},$a=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},gn=function(e,t,s,n){return e._startAt&&(pe?e._startAt.revert(Ts):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,n))},Va=function r(e){return!e||e._ts&&r(e.parent)},Cr=function(e){return e._repeat?Nt(e._tTime,e=e.duration()+e._rDelay)*e:0},Nt=function(e,t){var s=Math.floor(e=ce(e/t));return e&&s===e?s-1:s},Ps=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Ks=function(e){return e._end=ce(e._start+(e._tDur/Math.abs(e._ts||e._rts||fe)||0))},Ns=function(e,t){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=ce(s._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Ks(e),s._dirty||xt(s,e)),e},Si=function(e,t){var s;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(s=Ps(e.rawTime(),t),(!t._dur||ws(0,t.totalDuration(),s)-t._tTime>fe)&&t.render(s,!0)),xt(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(s=e;s._dp;)s.rawTime()>=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-1e-8}},Ge=function(e,t,s,n){return t.parent&&gt(t),t._start=ce((ot(s)?s:s||e!==re?Oe(e,s,t):e._time)+t._delay),t._end=ce(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),xi(e,t,"_first","_last",e._sort?"_start":0),mn(t)||(e._recent=t),n||Si(e,t),e._ts<0&&Ns(e,e._tTime),e},Ti=function(e,t){return(Pe.ScrollTrigger||On("scrollTrigger",t))&&Pe.ScrollTrigger.create(t,e)},zi=function(e,t,s,n,i){if(Un(e,t,i),!e._initted)return 1;if(!s&&e._pt&&!pe&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&yi!==Ee.frame)return ht.push(e),e._lazy=[i,n],1},Ka=function r(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||r(t))},mn=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},Na=function(e,t,s,n){var i=e.ratio,o=t<0||!t&&(!e._start&&Ka(e)&&!(!e._initted&&mn(e))||(e._ts<0||e._dp._ts<0)&&!mn(e))?0:1,a=e._rDelay,l=0,u,d,f;if(a&&e._repeat&&(l=ws(0,e._tDur,t),d=Nt(l,a),e._yoyo&&d&1&&(o=1-o),d!==Nt(e._tTime,a)&&(i=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==i||pe||n||e._zTime===fe||!t&&e._zTime){if(!e._initted&&zi(e,t,n,s,l))return;for(f=e._zTime,e._zTime=t||(s?fe:0),s||(s=t&&!f),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,u=e._pt;u;)u.r(o,u.d),u=u._next;t<0&&gn(e,t,s,!0),e._onUpdate&&!s&&Me(e,"onUpdate"),l&&e._repeat&&!s&&e.parent&&Me(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&gt(e,1),!s&&!pe&&(Me(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Fa=function(e,t,s){var n;if(s>t)for(n=e._first;n&&n._start<=s;){if(n.data==="isPause"&&n._start>t)return n;n=n._next}else for(n=e._last;n&&n._start>=s;){if(n.data==="isPause"&&n._start<t)return n;n=n._prev}},Ft=function(e,t,s,n){var i=e._repeat,o=ce(t)||0,a=e._tTime/e._tDur;return a&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=i?i<0?1e10:ce(o*(i+1)+e._rDelay*i):o,a>0&&!n&&Ns(e,e._tTime=e._tDur*a),e.parent&&Ks(e),s||xt(e.parent,e),e},xr=function(e){return e instanceof we?xt(e):Ft(e,e._dur)},Ua={_start:0,endTime:ds,totalDuration:ds},Oe=function r(e,t,s){var n=e.labels,i=e._recent||Ua,o=e.duration()>=Ye?i.endTime(!1):e._dur,a,l,u;return de(t)&&(isNaN(t)||t in n)?(l=t.charAt(0),u=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?i._start:i.endTime(i._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(a<0?i:s).totalDuration()/100:1)):a<0?(t in n||(n[t]=o),n[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),u&&s&&(l=l/100*(ge(s)?s[0]:s).totalDuration()),a>1?r(e,t.substr(0,a-1),s)+l:o+l)):t==null?o:+t},os=function(e,t,s){var n=ot(t[1]),i=(n?2:1)+(e<2?0:1),o=t[i],a,l;if(n&&(o.duration=t[1]),o.parent=s,e){for(a=o,l=s;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=ve(l.vars.inherit)&&l.parent;o.immediateRender=ve(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[i-1]}return new le(t[0],o,t[i+1])},wt=function(e,t){return e||e===0?t(e):t},ws=function(e,t,s){return s<e?e:s>t?t:s},he=function(e,t){return!de(e)||!(t=Pa.exec(e))?"":t[1]},Wa=function(e,t,s){return wt(s,function(n){return ws(e,t,n)})},wn=[].slice,Ri=function(e,t){return e&&Xe(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Xe(e[0]))&&!e.nodeType&&e!==qe},Ha=function(e,t,s){return s===void 0&&(s=[]),e.forEach(function(n){var i;return de(n)&&!t||Ri(n,1)?(i=s).push.apply(i,$e(n)):s.push(n)})||s},$e=function(e,t,s){return ee&&!t&&ee.selector?ee.selector(e):de(e)&&!s&&(hn||!Ut())?wn.call((t||In).querySelectorAll(e),0):ge(e)?Ha(e,s):Ri(e)?wn.call(e,0):e?[e]:[]},bn=function(e){return e=$e(e)[0]||us("Invalid scope")||{},function(t){var s=e.current||e.nativeElement||e;return $e(t,s.querySelectorAll?s:s===e?us("Invalid scope")||In.createElement("div"):e)}},Ei=function(e){return e.sort(function(){return .5-Math.random()})},Mi=function(e){if(oe(e))return e;var t=Xe(e)?e:{each:e},s=St(t.ease),n=t.from||0,i=parseFloat(t.base)||0,o={},a=n>0&&n<1,l=isNaN(n)||a,u=t.axis,d=n,f=n;return de(n)?d=f={center:.5,edges:.5,end:1}[n]||0:!a&&l&&(d=n[0],f=n[1]),function(g,h,m){var p=(m||t).length,b=o[p],k,v,y,_,w,C,T,x,z;if(!b){if(z=t.grid==="auto"?0:(t.grid||[1,Ye])[1],!z){for(T=-1e8;T<(T=m[z++].getBoundingClientRect().left)&&z<p;);z<p&&z--}for(b=o[p]=[],k=l?Math.min(z,p)*d-.5:n%z,v=z===Ye?0:l?p*f/z-.5:n/z|0,T=0,x=Ye,C=0;C<p;C++)y=C%z-k,_=v-(C/z|0),b[C]=w=u?Math.abs(u==="y"?_:y):di(y*y+_*_),w>T&&(T=w),w<x&&(x=w);n==="random"&&Ei(b),b.max=T-x,b.min=x,b.v=p=(parseFloat(t.amount)||parseFloat(t.each)*(z>p?p-1:u?u==="y"?p/z:z:Math.max(z,p/z))||0)*(n==="edges"?-1:1),b.b=p<0?i-p:i,b.u=he(t.amount||t.each)||0,s=s&&p<0?Ki(s):s}return p=(b[g]-b.min)/b.max||0,ce(b.b+(s?s(p):p)*b.v)+b.u}},yn=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var n=ce(Math.round(parseFloat(s)/e)*e*t);return(n-n%1)/t+(ot(s)?0:he(s))}},Bi=function(e,t){var s=ge(e),n,i;return!s&&Xe(e)&&(n=s=e.radius||Ye,e.values?(e=$e(e.values),(i=!ot(e[0]))&&(n*=n)):e=yn(e.increment)),wt(t,s?oe(e)?function(o){return i=e(o),Math.abs(i-o)<=n?i:o}:function(o){for(var a=parseFloat(i?o.x:o),l=parseFloat(i?o.y:0),u=Ye,d=0,f=e.length,g,h;f--;)i?(g=e[f].x-a,h=e[f].y-l,g=g*g+h*h):g=Math.abs(e[f]-a),g<u&&(u=g,d=f);return d=!n||u<=n?e[d]:o,i||d===o||ot(o)?d:d+he(o)}:yn(e))},Pi=function(e,t,s,n){return wt(ge(e)?!t:s===!0?!!(s=0):!n,function(){return ge(e)?e[~~(Math.random()*e.length)]:(s=s||1e-5)&&(n=s<1?Math.pow(10,(s+"").length-2):1)&&Math.floor(Math.round((e-s/2+Math.random()*(t-e+s*.99))/s)*s*n)/n})},ja=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return function(n){return t.reduce(function(i,o){return o(i)},n)}},qa=function(e,t){return function(s){return e(parseFloat(s))+(t||he(s))}},Ga=function(e,t,s){return Di(e,t,0,1,s)},Ai=function(e,t,s){return wt(s,function(n){return e[~~t(n)]})},Za=function r(e,t,s){var n=t-e;return ge(e)?Ai(e,r(0,e.length),t):wt(s,function(i){return(n+(i-e)%n)%n+e})},Ya=function r(e,t,s){var n=t-e,i=n*2;return ge(e)?Ai(e,r(0,e.length-1),t):wt(s,function(o){return o=(i+(o-e)%i)%i||0,e+(o>n?i-o:o)})},ps=function(e){for(var t=0,s="",n,i,o,a;~(n=e.indexOf("random(",t));)o=e.indexOf(")",n),a=e.charAt(n+7)==="[",i=e.substr(n+7,o-n-7).match(a?gi:pn),s+=e.substr(t,n-t)+Pi(a?i:+i[0],a?0:+i[1],+i[2]||1e-5),t=o+1;return s+e.substr(t,e.length-t)},Di=function(e,t,s,n,i){var o=t-e,a=n-s;return wt(i,function(l){return s+((l-e)/o*a||0)})},Xa=function r(e,t,s,n){var i=isNaN(e+t)?0:function(h){return(1-h)*e+h*t};if(!i){var o=de(e),a={},l,u,d,f,g;if(s===!0&&(n=1)&&(s=null),o)e={p:e},t={p:t};else if(ge(e)&&!ge(t)){for(d=[],f=e.length,g=f-2,u=1;u<f;u++)d.push(r(e[u-1],e[u]));f--,i=function(m){m*=f;var p=Math.min(g,~~m);return d[p](m-p)},s=t}else n||(e=Kt(ge(e)?[]:{},e));if(!d){for(l in t)Fn.call(a,e,l,"get",t[l]);i=function(m){return jn(m,a)||(o?e.p:e)}}}return wt(s,i)},Sr=function(e,t,s){var n=e.labels,i=Ye,o,a,l;for(o in n)a=n[o]-t,a<0==!!s&&a&&i>(a=Math.abs(a))&&(l=o,i=a);return l},Me=function(e,t,s){var n=e.vars,i=n[t],o=ee,a=e._ctx,l,u,d;if(i)return l=n[t+"Params"],u=n.callbackScope||e,s&&ht.length&&Ms(),a&&(ee=a),d=l?i.apply(u,l):i.call(u),ee=o,d},ss=function(e){return gt(e),e.scrollTrigger&&e.scrollTrigger.kill(!!pe),e.progress()<1&&Me(e,"onInterrupt"),e},Lt,Li=[],Ii=function(e){if(e)if(e=!e.name&&e.default||e,Ln()||e.headless){var t=e.name,s=oe(e),n=t&&!s&&e.init?function(){this._props=[]}:e,i={init:ds,render:jn,add:Fn,kill:hl,modifier:pl,rawVars:0},o={targetTest:0,get:0,getSetter:Hn,aliases:{},register:0};if(Ut(),e!==n){if(Re[t])return;Ae(n,Ae(Bs(e,i),o)),Kt(n.prototype,Kt(i,Bs(e,o))),Re[n.prop=t]=n,e.targetTest&&(zs.push(n),$n[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}bi(t,n),e.register&&e.register(xe,n,_e)}else Li.push(e)},X=255,ns={aqua:[0,X,X],lime:[0,X,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,X],navy:[0,0,128],white:[X,X,X],olive:[128,128,0],yellow:[X,X,0],orange:[X,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[X,0,0],pink:[X,192,203],cyan:[0,X,X],transparent:[X,X,X,0]},Qs=function(e,t,s){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(s-t)*e*6:e<.5?s:e*3<2?t+(s-t)*(2/3-e)*6:t)*X+.5|0},Oi=function(e,t,s){var n=e?ot(e)?[e>>16,e>>8&X,e&X]:0:ns.black,i,o,a,l,u,d,f,g,h,m;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),ns[e])n=ns[e];else if(e.charAt(0)==="#"){if(e.length<6&&(i=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+i+i+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&X,n&X,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&X,e&X]}else if(e.substr(0,3)==="hsl"){if(n=m=e.match(pn),!t)l=+n[0]%360/360,u=+n[1]/100,d=+n[2]/100,o=d<=.5?d*(u+1):d+u-d*u,i=d*2-o,n.length>3&&(n[3]*=1),n[0]=Qs(l+1/3,i,o),n[1]=Qs(l,i,o),n[2]=Qs(l-1/3,i,o);else if(~e.indexOf("="))return n=e.match(hi),s&&n.length<4&&(n[3]=1),n}else n=e.match(pn)||ns.transparent;n=n.map(Number)}return t&&!m&&(i=n[0]/X,o=n[1]/X,a=n[2]/X,f=Math.max(i,o,a),g=Math.min(i,o,a),d=(f+g)/2,f===g?l=u=0:(h=f-g,u=d>.5?h/(2-f-g):h/(f+g),l=f===i?(o-a)/h+(o<a?6:0):f===o?(a-i)/h+2:(i-o)/h+4,l*=60),n[0]=~~(l+.5),n[1]=~~(u*100+.5),n[2]=~~(d*100+.5)),s&&n.length<4&&(n[3]=1),n},$i=function(e){var t=[],s=[],n=-1;return e.split(ft).forEach(function(i){var o=i.match(Dt)||[];t.push.apply(t,o),s.push(n+=o.length+1)}),t.c=s,t},Tr=function(e,t,s){var n="",i=(e+n).match(ft),o=t?"hsla(":"rgba(",a=0,l,u,d,f;if(!i)return e;if(i=i.map(function(g){return(g=Oi(g,t,1))&&o+(t?g[0]+","+g[1]+"%,"+g[2]+"%,"+g[3]:g.join(","))+")"}),s&&(d=$i(e),l=s.c,l.join(n)!==d.c.join(n)))for(u=e.replace(ft,"1").split(Dt),f=u.length-1;a<f;a++)n+=u[a]+(~l.indexOf(a)?i.shift()||o+"0,0,0,0)":(d.length?d:i.length?i:s).shift());if(!u)for(u=e.split(ft),f=u.length-1;a<f;a++)n+=u[a]+i[a];return n+u[f]},ft=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in ns)r+="|"+e+"\\b";return new RegExp(r+")","gi")}(),Qa=/hsl[a]?\(/,Vi=function(e){var t=e.join(" "),s;if(ft.lastIndex=0,ft.test(t))return s=Qa.test(t),e[1]=Tr(e[1],s),e[0]=Tr(e[0],s,$i(e[1])),!0},hs,Ee=function(){var r=Date.now,e=500,t=33,s=r(),n=s,i=1e3/240,o=i,a=[],l,u,d,f,g,h,m=function p(b){var k=r()-n,v=b===!0,y,_,w,C;if((k>e||k<0)&&(s+=k-t),n+=k,w=n-s,y=w-o,(y>0||v)&&(C=++f.frame,g=w-f.time*1e3,f.time=w=w/1e3,o+=y+(y>=i?4:i-y),_=1),v||(l=u(p)),_)for(h=0;h<a.length;h++)a[h](w,g,C,b)};return f={time:0,frame:0,tick:function(){m(!0)},deltaRatio:function(b){return g/(1e3/(b||60))},wake:function(){mi&&(!hn&&Ln()&&(qe=hn=window,In=qe.document||{},Pe.gsap=xe,(qe.gsapVersions||(qe.gsapVersions=[])).push(xe.version),wi(Es||qe.GreenSockGlobals||!qe.gsap&&qe||{}),Li.forEach(Ii)),d=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),u=d||function(b){return setTimeout(b,o-f.time*1e3+1|0)},hs=1,m(2))},sleep:function(){(d?cancelAnimationFrame:clearTimeout)(l),hs=0,u=ds},lagSmoothing:function(b,k){e=b||1/0,t=Math.min(k||33,e)},fps:function(b){i=1e3/(b||240),o=f.time*1e3+i},add:function(b,k,v){var y=k?function(_,w,C,T){b(_,w,C,T),f.remove(y)}:b;return f.remove(b),a[v?"unshift":"push"](y),Ut(),y},remove:function(b,k){~(k=a.indexOf(b))&&a.splice(k,1)&&h>=k&&h--},_listeners:a},f}(),Ut=function(){return!hs&&Ee.wake()},F={},Ja=/^[\d.\-M][\d.\-,\s]/,el=/["']/g,tl=function(e){for(var t={},s=e.substr(1,e.length-3).split(":"),n=s[0],i=1,o=s.length,a,l,u;i<o;i++)l=s[i],a=i!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,a),t[n]=isNaN(u)?u.replace(el,"").trim():+u,n=l.substr(a+1).trim();return t},sl=function(e){var t=e.indexOf("(")+1,s=e.indexOf(")"),n=e.indexOf("(",t);return e.substring(t,~n&&n<s?e.indexOf(")",s+1):s)},nl=function(e){var t=(e+"").split("("),s=F[t[0]];return s&&t.length>1&&s.config?s.config.apply(null,~e.indexOf("{")?[tl(t[1])]:sl(e).split(",").map(_i)):F._CE&&Ja.test(e)?F._CE("",e):s},Ki=function(e){return function(t){return 1-e(1-t)}},Ni=function r(e,t){for(var s=e._first,n;s;)s instanceof we?r(s,t):s.vars.yoyoEase&&(!s._yoyo||!s._repeat)&&s._yoyo!==t&&(s.timeline?r(s.timeline,t):(n=s._ease,s._ease=s._yEase,s._yEase=n,s._yoyo=t)),s=s._next},St=function(e,t){return e&&(oe(e)?e:F[e]||nl(e))||t},Et=function(e,t,s,n){s===void 0&&(s=function(l){return 1-t(1-l)}),n===void 0&&(n=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var i={easeIn:t,easeOut:s,easeInOut:n},o;return ke(e,function(a){F[a]=Pe[a]=i,F[o=a.toLowerCase()]=s;for(var l in i)F[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=F[a+"."+l]=i[l]}),i},Fi=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},Js=function r(e,t,s){var n=t>=1?t:1,i=(s||(e?.3:.45))/(t<1?t:1),o=i/dn*(Math.asin(1/n)||0),a=function(d){return d===1?1:n*Math.pow(2,-10*d)*Ba((d-o)*i)+1},l=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:Fi(a);return i=dn/i,l.config=function(u,d){return r(e,u,d)},l},en=function r(e,t){t===void 0&&(t=1.70158);var s=function(o){return o?--o*o*((t+1)*o+t)+1:0},n=e==="out"?s:e==="in"?function(i){return 1-s(1-i)}:Fi(s);return n.config=function(i){return r(e,i)},n};ke("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,e){var t=e<5?e+1:e;Et(r+",Power"+(t-1),e?function(s){return Math.pow(s,t)}:function(s){return s},function(s){return 1-Math.pow(1-s,t)},function(s){return s<.5?Math.pow(s*2,t)/2:1-Math.pow((1-s)*2,t)/2})});F.Linear.easeNone=F.none=F.Linear.easeIn;Et("Elastic",Js("in"),Js("out"),Js());(function(r,e){var t=1/e,s=2*t,n=2.5*t,i=function(a){return a<t?r*a*a:a<s?r*Math.pow(a-1.5/e,2)+.75:a<n?r*(a-=2.25/e)*a+.9375:r*Math.pow(a-2.625/e,2)+.984375};Et("Bounce",function(o){return 1-i(1-o)},i)})(7.5625,2.75);Et("Expo",function(r){return Math.pow(2,10*(r-1))*r+r*r*r*r*r*r*(1-r)});Et("Circ",function(r){return-(di(1-r*r)-1)});Et("Sine",function(r){return r===1?1:-Ma(r*Ra)+1});Et("Back",en("in"),en("out"),en());F.SteppedEase=F.steps=Pe.SteppedEase={config:function(e,t){e===void 0&&(e=1);var s=1/e,n=e+(t?0:1),i=t?1:0,o=1-fe;return function(a){return((n*ws(0,o,a)|0)+i)*s}}};Vt.ease=F["quad.out"];ke("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return Vn+=r+","+r+"Params,"});var Ui=function(e,t){this.id=Ea++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:vi,this.set=t?t.getSetter:Hn},fs=function(){function r(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Ft(this,+t.duration,1,1),this.data=t.data,ee&&(this._ctx=ee,ee.data.push(this)),hs||Ee.wake()}var e=r.prototype;return e.delay=function(s){return s||s===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+s-this._delay),this._delay=s,this):this._delay},e.duration=function(s){return arguments.length?this.totalDuration(this._repeat>0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,Ft(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,n){if(Ut(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Ns(this,s),!i._dp||i.parent||Si(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s<this._tDur||this._ts<0&&s>0||!this._tDur&&!s)&&Ge(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===fe||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),ki(this,s,n)),this},e.time=function(s,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+Cr(this))%(this._dur+this._rDelay)||(s?this._dur:0),n):this._time},e.totalProgress=function(s,n){return arguments.length?this.totalTime(this.totalDuration()*s,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(s,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+Cr(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,n){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*i,n):this._repeat?Nt(this._tTime,i)+1:1},e.timeScale=function(s,n){if(!arguments.length)return this._rts===-1e-8?0:this._rts;if(this._rts===s)return this;var i=this.parent&&this._ts?Ps(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-1e-8?0:this._rts,this.totalTime(ws(-Math.abs(this._delay),this.totalDuration(),i),n!==!1),Ks(this),$a(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ut(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==fe&&(this._tTime-=fe)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=s;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&Ge(n,this,s-this._delay),this}return this._start},e.endTime=function(s){return this._start+(ve(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var n=this.parent||this._dp;return n?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ps(n.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=Da);var n=pe;return pe=s,Nn(this)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),pe=n,this},e.globalTime=function(s){for(var n=this,i=arguments.length?s:n.rawTime();n;)i=n._start+i/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(s):i},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,xr(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var n=this._time;return this._rDelay=s,xr(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,n){return this.totalTime(Oe(this,s),ve(n))},e.restart=function(s,n){return this.play().totalTime(s?-this._delay:0,ve(n)),this._dur||(this._zTime=-1e-8),this},e.play=function(s,n){return s!=null&&this.seek(s,n),this.reversed(!1).paused(!1)},e.reverse=function(s,n){return s!=null&&this.seek(s||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(s,n){return s!=null&&this.seek(s,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var s=this.parent||this._dp,n=this._start,i;return!!(!s||this._ts&&this._initted&&s.isActive()&&(i=s.rawTime(!0))>=n&&i<this.endTime(!0)-fe)},e.eventCallback=function(s,n,i){var o=this.vars;return arguments.length>1?(n?(o[s]=n,i&&(o[s+"Params"]=i),s==="onUpdate"&&(this._onUpdate=n)):delete o[s],this):o[s]},e.then=function(s){var n=this;return new Promise(function(i){var o=oe(s)?s:Ci,a=function(){var u=n.then;n.then=null,oe(o)&&(o=o(n))&&(o.then||o===n)&&(n.then=u),i(o),n.then=u};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?a():n._prom=a})},e.kill=function(){ss(this)},r}();Ae(fs.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var we=function(r){ui(e,r);function e(s,n){var i;return s===void 0&&(s={}),i=r.call(this,s)||this,i.labels={},i.smoothChildTiming=!!s.smoothChildTiming,i.autoRemoveChildren=!!s.autoRemoveChildren,i._sort=ve(s.sortChildren),re&&Ge(s.parent||re,nt(i),n),s.reversed&&i.reverse(),s.paused&&i.paused(!0),s.scrollTrigger&&Ti(nt(i),s.scrollTrigger),i}var t=e.prototype;return t.to=function(n,i,o){return os(0,arguments,this),this},t.from=function(n,i,o){return os(1,arguments,this),this},t.fromTo=function(n,i,o,a){return os(2,arguments,this),this},t.set=function(n,i,o){return i.duration=0,i.parent=this,is(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new le(n,i,Oe(this,o),1),this},t.call=function(n,i,o){return Ge(this,le.delayedCall(0,n,i),o)},t.staggerTo=function(n,i,o,a,l,u,d){return o.duration=i,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=d,o.parent=this,new le(n,o,Oe(this,l)),this},t.staggerFrom=function(n,i,o,a,l,u,d){return o.runBackwards=1,is(o).immediateRender=ve(o.immediateRender),this.staggerTo(n,i,o,a,l,u,d)},t.staggerFromTo=function(n,i,o,a,l,u,d,f){return a.startAt=o,is(a).immediateRender=ve(a.immediateRender),this.staggerTo(n,i,a,l,u,d,f)},t.render=function(n,i,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,d=n<=0?0:ce(n),f=this._zTime<0!=n<0&&(this._initted||!u),g,h,m,p,b,k,v,y,_,w,C,T;if(this!==re&&d>l&&n>=0&&(d=l),d!==this._tTime||o||f){if(a!==this._time&&u&&(d+=this._time-a,n+=this._time-a),g=d,_=this._start,y=this._ts,k=!y,f&&(u||(a=this._zTime),(n||!i)&&(this._zTime=n)),this._repeat){if(C=this._yoyo,b=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(b*100+n,i,o);if(g=ce(d%b),d===l?(p=this._repeat,g=u):(w=ce(d/b),p=~~w,p&&p===w&&(g=u,p--),g>u&&(g=u)),w=Nt(this._tTime,b),!a&&this._tTime&&w!==p&&this._tTime-w*b-this._dur<=0&&(w=p),C&&p&1&&(g=u-g,T=1),p!==w&&!this._lock){var x=C&&w&1,z=x===(C&&p&1);if(p<w&&(x=!x),a=x?0:d%u?u:d,this._lock=1,this.render(a||(T?0:ce(p*b)),i,!u)._lock=0,this._tTime=d,!i&&this.parent&&Me(this,"onRepeat"),this.vars.repeatRefresh&&!T&&(this.invalidate()._lock=1),a&&a!==this._time||k!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,z&&(this._lock=2,a=x?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!T&&this.invalidate()),this._lock=0,!this._ts&&!k)return this;Ni(this,T)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(v=Fa(this,ce(a),ce(g)),v&&(d-=g-(g=v._start))),this._tTime=d,this._time=g,this._act=!y,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,a=0),!a&&d&&!i&&!w&&(Me(this,"onStart"),this._tTime!==d))return this;if(g>=a&&n>=0)for(h=this._first;h;){if(m=h._next,(h._act||g>=h._start)&&h._ts&&v!==h){if(h.parent!==this)return this.render(n,i,o);if(h.render(h._ts>0?(g-h._start)*h._ts:(h._dirty?h.totalDuration():h._tDur)+(g-h._start)*h._ts,i,o),g!==this._time||!this._ts&&!k){v=0,m&&(d+=this._zTime=-1e-8);break}}h=m}else{h=this._last;for(var D=n<0?n:g;h;){if(m=h._prev,(h._act||D<=h._end)&&h._ts&&v!==h){if(h.parent!==this)return this.render(n,i,o);if(h.render(h._ts>0?(D-h._start)*h._ts:(h._dirty?h.totalDuration():h._tDur)+(D-h._start)*h._ts,i,o||pe&&Nn(h)),g!==this._time||!this._ts&&!k){v=0,m&&(d+=this._zTime=D?-1e-8:fe);break}}h=m}}if(v&&!i&&(this.pause(),v.render(g>=a?0:-1e-8)._zTime=g>=a?1:-1,this._ts))return this._start=_,Ks(this),this.render(n,i,o);this._onUpdate&&!i&&Me(this,"onUpdate",!0),(d===l&&this._tTime>=this.totalDuration()||!d&&a)&&(_===this._start||Math.abs(y)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(d===l&&this._ts>0||!d&&this._ts<0)&&gt(this,1),!i&&!(n<0&&!a)&&(d||a||!l)&&(Me(this,d===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(n,i){var o=this;if(ot(i)||(i=Oe(this,i,n)),!(n instanceof fs)){if(ge(n))return n.forEach(function(a){return o.add(a,i)}),this;if(de(n))return this.addLabel(n,i);if(oe(n))n=le.delayedCall(0,n);else return this}return this!==n?Ge(this,n,i):this},t.getChildren=function(n,i,o,a){n===void 0&&(n=!0),i===void 0&&(i=!0),o===void 0&&(o=!0),a===void 0&&(a=-1e8);for(var l=[],u=this._first;u;)u._start>=a&&(u instanceof le?i&&l.push(u):(o&&l.push(u),n&&l.push.apply(l,u.getChildren(!0,i,o)))),u=u._next;return l},t.getById=function(n){for(var i=this.getChildren(1,1,1),o=i.length;o--;)if(i[o].vars.id===n)return i[o]},t.remove=function(n){return de(n)?this.removeLabel(n):oe(n)?this.killTweensOf(n):(n.parent===this&&Vs(this,n),n===this._recent&&(this._recent=this._last),xt(this))},t.totalTime=function(n,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ce(Ee.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),r.prototype.totalTime.call(this,n,i),this._forcing=0,this):this._tTime},t.addLabel=function(n,i){return this.labels[n]=Oe(this,i),this},t.removeLabel=function(n){return delete this.labels[n],this},t.addPause=function(n,i,o){var a=le.delayedCall(0,i||ds,o);return a.data="isPause",this._hasPause=1,Ge(this,a,Oe(this,n))},t.removePause=function(n){var i=this._first;for(n=Oe(this,n);i;)i._start===n&&i.data==="isPause"&&gt(i),i=i._next},t.killTweensOf=function(n,i,o){for(var a=this.getTweensOf(n,o),l=a.length;l--;)ut!==a[l]&&a[l].kill(n,i);return this},t.getTweensOf=function(n,i){for(var o=[],a=$e(n),l=this._first,u=ot(i),d;l;)l instanceof le?La(l._targets,a)&&(u?(!ut||l._initted&&l._ts)&&l.globalTime(0)<=i&&l.globalTime(l.totalDuration())>i:!i||l.isActive())&&o.push(l):(d=l.getTweensOf(a,i)).length&&o.push.apply(o,d),l=l._next;return o},t.tweenTo=function(n,i){i=i||{};var o=this,a=Oe(o,n),l=i,u=l.startAt,d=l.onStart,f=l.onStartParams,g=l.immediateRender,h,m=le.to(o,Ae({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:i.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale())||fe,onStart:function(){if(o.pause(),!h){var b=i.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());m._dur!==b&&Ft(m,b,0,1).render(m._time,!0,!0),h=1}d&&d.apply(m,f||[])}},i));return g?m.render(0):m},t.tweenFromTo=function(n,i,o){return this.tweenTo(i,Ae({startAt:{time:Oe(this,n)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(n){return n===void 0&&(n=this._time),Sr(this,Oe(this,n))},t.previousLabel=function(n){return n===void 0&&(n=this._time),Sr(this,Oe(this,n),1)},t.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+fe)},t.shiftChildren=function(n,i,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,u;a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(i)for(u in l)l[u]>=o&&(l[u]+=n);return xt(this)},t.invalidate=function(n){var i=this._first;for(this._lock=0;i;)i.invalidate(n),i=i._next;return r.prototype.invalidate.call(this,n)},t.clear=function(n){n===void 0&&(n=!0);for(var i=this._first,o;i;)o=i._next,this.remove(i),i=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),xt(this)},t.totalDuration=function(n){var i=0,o=this,a=o._last,l=Ye,u,d,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(f=o.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),d=a._start,d>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Ge(o,a,d-a._delay,1)._lock=0):l=d,d<0&&a._ts&&(i-=d,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=d/o._ts,o._time-=d,o._tTime-=d),o.shiftChildren(-d,!1,-1/0),l=0),a._end>i&&a._ts&&(i=a._end),a=u;Ft(o,o===re&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(n){if(re._ts&&(ki(re,Ps(n,re)),yi=Ee.frame),Ee.frame>=kr){kr+=Be.autoSleep||120;var i=re._first;if((!i||!i._ts)&&Be.autoSleep&&Ee._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||Ee.sleep()}}},e}(fs);Ae(we.prototype,{_lock:0,_hasPause:0,_forcing:0});var rl=function(e,t,s,n,i,o,a){var l=new _e(this._pt,e,t,0,1,Zi,null,i),u=0,d=0,f,g,h,m,p,b,k,v;for(l.b=s,l.e=n,s+="",n+="",(k=~n.indexOf("random("))&&(n=ps(n)),o&&(v=[s,n],o(v,e,t),s=v[0],n=v[1]),g=s.match(Ys)||[];f=Ys.exec(n);)m=f[0],p=n.substring(u,f.index),h?h=(h+1)%5:p.substr(-5)==="rgba("&&(h=1),m!==g[d++]&&(b=parseFloat(g[d-1])||0,l._pt={_next:l._pt,p:p||d===1?p:",",s:b,c:m.charAt(1)==="="?It(b,m)-b:parseFloat(m)-b,m:h&&h<4?Math.round:0},u=Ys.lastIndex);return l.c=u<n.length?n.substring(u,n.length):"",l.fp=a,(fi.test(n)||k)&&(l.e=0),this._pt=l,l},Fn=function(e,t,s,n,i,o,a,l,u,d){oe(n)&&(n=n(i||0,e,o));var f=e[t],g=s!=="get"?s:oe(f)?u?e[t.indexOf("set")||!oe(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():f,h=oe(f)?u?cl:qi:Wn,m;if(de(n)&&(~n.indexOf("random(")&&(n=ps(n)),n.charAt(1)==="="&&(m=It(g,n)+(he(g)||0),(m||m===0)&&(n=m))),!d||g!==n||vn)return!isNaN(g*n)&&n!==""?(m=new _e(this._pt,e,t,+g||0,n-(g||0),typeof f=="boolean"?dl:Gi,0,h),u&&(m.fp=u),a&&m.modifier(a,this,e),this._pt=m):(!f&&!(t in e)&&On(t,n),rl.call(this,e,t,g,n,h,l||Be.stringFilter,u))},il=function(e,t,s,n,i){if(oe(e)&&(e=as(e,i,t,s,n)),!Xe(e)||e.style&&e.nodeType||ge(e)||pi(e))return de(e)?as(e,i,t,s,n):e;var o={},a;for(a in e)o[a]=as(e[a],i,t,s,n);return o},Wi=function(e,t,s,n,i,o){var a,l,u,d;if(Re[e]&&(a=new Re[e]).init(i,a.rawVars?t[e]:il(t[e],n,i,o,s),s,n,o)!==!1&&(s._pt=l=new _e(s._pt,i,e,0,1,a.render,a,0,a.priority),s!==Lt))for(u=s._ptLookup[s._targets.indexOf(i)],d=a._props.length;d--;)u[a._props[d]]=l;return a},ut,vn,Un=function r(e,t,s){var n=e.vars,i=n.ease,o=n.startAt,a=n.immediateRender,l=n.lazy,u=n.onUpdate,d=n.runBackwards,f=n.yoyoEase,g=n.keyframes,h=n.autoRevert,m=e._dur,p=e._startAt,b=e._targets,k=e.parent,v=k&&k.data==="nested"?k.vars.targets:b,y=e._overwrite==="auto"&&!An,_=e.timeline,w,C,T,x,z,D,K,N,W,te,P,U,G;if(_&&(!g||!i)&&(i="none"),e._ease=St(i,Vt.ease),e._yEase=f?Ki(St(f===!0?i:f,Vt.ease)):0,f&&e._yoyo&&!e._repeat&&(f=e._yEase,e._yEase=e._ease,e._ease=f),e._from=!_&&!!n.runBackwards,!_||g&&!n.stagger){if(N=b[0]?Ct(b[0]).harness:0,U=N&&n[N.prop],w=Bs(n,$n),p&&(p._zTime<0&&p.progress(1),t<0&&d&&a&&!h?p.render(-1,!0):p.revert(d&&m?Ts:Aa),p._lazy=0),o){if(gt(e._startAt=le.set(b,Ae({data:"isStart",overwrite:!1,parent:k,immediateRender:!0,lazy:!p&&ve(l),startAt:null,delay:0,onUpdate:u&&function(){return Me(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(pe||!a&&!h)&&e._startAt.revert(Ts),a&&m&&t<=0&&s<=0){t&&(e._zTime=t);return}}else if(d&&m&&!p){if(t&&(a=!1),T=Ae({overwrite:!1,data:"isFromStart",lazy:a&&!p&&ve(l),immediateRender:a,stagger:0,parent:k},w),U&&(T[N.prop]=U),gt(e._startAt=le.set(b,T)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(pe?e._startAt.revert(Ts):e._startAt.render(-1,!0)),e._zTime=t,!a)r(e._startAt,fe,fe);else if(!t)return}for(e._pt=e._ptCache=0,l=m&&ve(l)||l&&!m,C=0;C<b.length;C++){if(z=b[C],K=z._gsap||Kn(b)[C]._gsap,e._ptLookup[C]=te={},fn[K.id]&&ht.length&&Ms(),P=v===b?C:v.indexOf(z),N&&(W=new N).init(z,U||w,e,P,v)!==!1&&(e._pt=x=new _e(e._pt,z,W.name,0,1,W.render,W,0,W.priority),W._props.forEach(function(A){te[A]=x}),W.priority&&(D=1)),!N||U)for(T in w)Re[T]&&(W=Wi(T,w,e,P,z,v))?W.priority&&(D=1):te[T]=x=Fn.call(e,z,T,"get",w[T],P,v,0,n.stringFilter);e._op&&e._op[C]&&e.kill(z,e._op[C]),y&&e._pt&&(ut=e,re.killTweensOf(z,te,e.globalTime(t)),G=!e.parent,ut=0),e._pt&&l&&(fn[K.id]=1)}D&&Yi(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!G,g&&t<=0&&_.render(Ye,!0,!0)},ol=function(e,t,s,n,i,o,a,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],d,f,g,h;if(!u)for(u=e._ptCache[t]=[],g=e._ptLookup,h=e._targets.length;h--;){if(d=g[h][t],d&&d.d&&d.d._pt)for(d=d.d._pt;d&&d.p!==t&&d.fp!==t;)d=d._next;if(!d)return vn=1,e.vars[t]="+=0",Un(e,a),vn=0,l?us(t+" not eligible for reset"):1;u.push(d)}for(h=u.length;h--;)f=u[h],d=f._pt||f,d.s=(n||n===0)&&!i?n:d.s+(n||0)+o*d.c,d.c=s-d.s,f.e&&(f.e=ae(s)+he(f.e)),f.b&&(f.b=d.s+he(f.b))},al=function(e,t){var s=e[0]?Ct(e[0]).harness:0,n=s&&s.aliases,i,o,a,l;if(!n)return t;i=Kt({},t);for(o in n)if(o in i)for(l=n[o].split(","),a=l.length;a--;)i[l[a]]=i[o];return i},ll=function(e,t,s,n){var i=t.ease||n||"power1.inOut",o,a;if(ge(t))a=s[e]||(s[e]=[]),t.forEach(function(l,u){return a.push({t:u/(t.length-1)*100,v:l,e:i})});else for(o in t)a=s[o]||(s[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:i})},as=function(e,t,s,n,i){return oe(e)?e.call(t,s,n,i):de(e)&&~e.indexOf("random(")?ps(e):e},Hi=Vn+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",ji={};ke(Hi+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return ji[r]=1});var le=function(r){ui(e,r);function e(s,n,i,o){var a;typeof n=="number"&&(i.duration=n,n=i,i=null),a=r.call(this,o?n:is(n))||this;var l=a.vars,u=l.duration,d=l.delay,f=l.immediateRender,g=l.stagger,h=l.overwrite,m=l.keyframes,p=l.defaults,b=l.scrollTrigger,k=l.yoyoEase,v=n.parent||re,y=(ge(s)||pi(s)?ot(s[0]):"length"in n)?[s]:$e(s),_,w,C,T,x,z,D,K;if(a._targets=y.length?Kn(y):us("GSAP target "+s+" not found. https://gsap.com",!Be.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=h,m||g||Cs(u)||Cs(d)){if(n=a.vars,_=a.timeline=new we({data:"nested",defaults:p||{},targets:v&&v.data==="nested"?v.vars.targets:y}),_.kill(),_.parent=_._dp=nt(a),_._start=0,g||Cs(u)||Cs(d)){if(T=y.length,D=g&&Mi(g),Xe(g))for(x in g)~Hi.indexOf(x)&&(K||(K={}),K[x]=g[x]);for(w=0;w<T;w++)C=Bs(n,ji),C.stagger=0,k&&(C.yoyoEase=k),K&&Kt(C,K),z=y[w],C.duration=+as(u,nt(a),w,z,y),C.delay=(+as(d,nt(a),w,z,y)||0)-a._delay,!g&&T===1&&C.delay&&(a._delay=d=C.delay,a._start+=d,C.delay=0),_.to(z,C,D?D(w,z,y):0),_._ease=F.none;_.duration()?u=d=0:a.timeline=0}else if(m){is(Ae(_.vars.defaults,{ease:"none"})),_._ease=St(m.ease||n.ease||"none");var N=0,W,te,P;if(ge(m))m.forEach(function(U){return _.to(y,U,">")}),_.duration();else{C={};for(x in m)x==="ease"||x==="easeEach"||ll(x,m[x],C,m.easeEach);for(x in C)for(W=C[x].sort(function(U,G){return U.t-G.t}),N=0,w=0;w<W.length;w++)te=W[w],P={ease:te.e,duration:(te.t-(w?W[w-1].t:0))/100*u},P[x]=te.v,_.to(y,P,N),N+=P.duration;_.duration()<u&&_.to({},{duration:u-_.duration()})}}u||a.duration(u=_.duration())}else a.timeline=0;return h===!0&&!An&&(ut=nt(a),re.killTweensOf(y),ut=0),Ge(v,nt(a),i),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(f||!u&&!m&&a._start===ce(v._time)&&ve(f)&&Va(nt(a))&&v.data!=="nested")&&(a._tTime=-1e-8,a.render(Math.max(0,-d)||0)),b&&Ti(nt(a),b),a}var t=e.prototype;return t.render=function(n,i,o){var a=this._time,l=this._tDur,u=this._dur,d=n<0,f=n>l-fe&&!d?l:n<fe?0:n,g,h,m,p,b,k,v,y,_;if(!u)Na(this,n,i,o);else if(f!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==d||this._lazy){if(g=f,y=this.timeline,this._repeat){if(p=u+this._rDelay,this._repeat<-1&&d)return this.totalTime(p*100+n,i,o);if(g=ce(f%p),f===l?(m=this._repeat,g=u):(b=ce(f/p),m=~~b,m&&m===b?(g=u,m--):g>u&&(g=u)),k=this._yoyo&&m&1,k&&(_=this._yEase,g=u-g),b=Nt(this._tTime,p),g===a&&!o&&this._initted&&m===b)return this._tTime=f,this;m!==b&&(y&&this._yEase&&Ni(y,k),this.vars.repeatRefresh&&!k&&!this._lock&&g!==p&&this._initted&&(this._lock=o=1,this.render(ce(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(zi(this,d?n:g,o,i,f))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==b))return this;if(u!==this._dur)return this.render(n,i,o)}if(this._tTime=f,this._time=g,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=v=(_||this._ease)(g/u),this._from&&(this.ratio=v=1-v),!a&&f&&!i&&!b&&(Me(this,"onStart"),this._tTime!==f))return this;for(h=this._pt;h;)h.r(v,h.d),h=h._next;y&&y.render(n<0?n:y._dur*y._ease(g/this._dur),i,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!i&&(d&&gn(this,n,i,o),Me(this,"onUpdate")),this._repeat&&m!==b&&this.vars.onRepeat&&!i&&this.parent&&Me(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(d&&!this._onUpdate&&gn(this,n,!0,!0),(n||!u)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&gt(this,1),!i&&!(d&&!a)&&(f||a||k)&&(Me(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),r.prototype.invalidate.call(this,n)},t.resetTo=function(n,i,o,a,l){hs||Ee.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),d;return this._initted||Un(this,u),d=this._ease(u/this._dur),ol(this,n,i,o,a,d,u,l)?this.resetTo(n,i,o,a,1):(Ns(this,0),this.parent||xi(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(n,i){if(i===void 0&&(i="all"),!n&&(!i||i==="all"))return this._lazy=this._pt=0,this.parent?ss(this):this.scrollTrigger&&this.scrollTrigger.kill(!!pe),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,i,ut&&ut.vars.overwrite!==!0)._first||ss(this),this.parent&&o!==this.timeline.totalDuration()&&Ft(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=n?$e(n):a,u=this._ptLookup,d=this._pt,f,g,h,m,p,b,k;if((!i||i==="all")&&Oa(a,l))return i==="all"&&(this._pt=0),ss(this);for(f=this._op=this._op||[],i!=="all"&&(de(i)&&(p={},ke(i,function(v){return p[v]=1}),i=p),i=al(a,i)),k=a.length;k--;)if(~l.indexOf(a[k])){g=u[k],i==="all"?(f[k]=i,m=g,h={}):(h=f[k]=f[k]||{},m=i);for(p in m)b=g&&g[p],b&&((!("kill"in b.d)||b.d.kill(p)===!0)&&Vs(this,b,"_pt"),delete g[p]),h!=="all"&&(h[p]=1)}return this._initted&&!this._pt&&d&&ss(this),this},e.to=function(n,i){return new e(n,i,arguments[2])},e.from=function(n,i){return os(1,arguments)},e.delayedCall=function(n,i,o,a){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:i,onReverseComplete:i,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(n,i,o){return os(2,arguments)},e.set=function(n,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(n,i)},e.killTweensOf=function(n,i,o){return re.killTweensOf(n,i,o)},e}(fs);Ae(le.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ke("staggerTo,staggerFrom,staggerFromTo",function(r){le[r]=function(){var e=new we,t=wn.call(arguments,0);return t.splice(r==="staggerFromTo"?5:4,0,0),e[r].apply(e,t)}});var Wn=function(e,t,s){return e[t]=s},qi=function(e,t,s){return e[t](s)},cl=function(e,t,s,n){return e[t](n.fp,s)},ul=function(e,t,s){return e.setAttribute(t,s)},Hn=function(e,t){return oe(e[t])?qi:Dn(e[t])&&e.setAttribute?ul:Wn},Gi=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},dl=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Zi=function(e,t){var s=t._pt,n="";if(!e&&t.b)n=t.b;else if(e===1&&t.e)n=t.e;else{for(;s;)n=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+n,s=s._next;n+=t.c}t.set(t.t,t.p,n,t)},jn=function(e,t){for(var s=t._pt;s;)s.r(e,s.d),s=s._next},pl=function(e,t,s,n){for(var i=this._pt,o;i;)o=i._next,i.p===n&&i.modifier(e,t,s),i=o},hl=function(e){for(var t=this._pt,s,n;t;)n=t._next,t.p===e&&!t.op||t.op===e?Vs(this,t,"_pt"):t.dep||(s=1),t=n;return!s},fl=function(e,t,s,n){n.mSet(e,t,n.m.call(n.tween,s,n.mt),n)},Yi=function(e){for(var t=e._pt,s,n,i,o;t;){for(s=t._next,n=i;n&&n.pr>t.pr;)n=n._next;(t._prev=n?n._prev:o)?t._prev._next=t:i=t,(t._next=n)?n._prev=t:o=t,t=s}e._pt=i},_e=function(){function r(t,s,n,i,o,a,l,u,d){this.t=s,this.s=i,this.c=o,this.p=n,this.r=a||Gi,this.d=l||this,this.set=u||Wn,this.pr=d||0,this._next=t,t&&(t._prev=this)}var e=r.prototype;return e.modifier=function(s,n,i){this.mSet=this.mSet||this.set,this.set=fl,this.m=s,this.mt=i,this.tween=n},r}();ke(Vn+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(r){return $n[r]=1});Pe.TweenMax=Pe.TweenLite=le;Pe.TimelineLite=Pe.TimelineMax=we;re=new we({sortChildren:!1,defaults:Vt,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Be.stringFilter=Vi;var Tt=[],Rs={},gl=[],zr=0,ml=0,tn=function(e){return(Rs[e]||gl).map(function(t){return t()})},kn=function(){var e=Date.now(),t=[];e-zr>2&&(tn("matchMediaInit"),Tt.forEach(function(s){var n=s.queries,i=s.conditions,o,a,l,u;for(a in n)o=qe.matchMedia(n[a]).matches,o&&(l=1),o!==i[a]&&(i[a]=o,u=1);u&&(s.revert(),l&&t.push(s))}),tn("matchMediaRevert"),t.forEach(function(s){return s.onMatch(s,function(n){return s.add(null,n)})}),zr=e,tn("matchMedia"))},Xi=function(){function r(t,s){this.selector=s&&bn(s),this.data=[],this._r=[],this.isReverted=!1,this.id=ml++,t&&this.add(t)}var e=r.prototype;return e.add=function(s,n,i){oe(s)&&(i=n,n=s,s=oe);var o=this,a=function(){var u=ee,d=o.selector,f;return u&&u!==o&&u.data.push(o),i&&(o.selector=bn(i)),ee=o,f=n.apply(o,arguments),oe(f)&&o._r.push(f),ee=u,o.selector=d,o.isReverted=!1,f};return o.last=a,s===oe?a(o,function(l){return o.add(null,l)}):s?o[s]=a:a},e.ignore=function(s){var n=ee;ee=null,s(this),ee=n},e.getTweens=function(){var s=[];return this.data.forEach(function(n){return n instanceof r?s.push.apply(s,n.getTweens()):n instanceof le&&!(n.parent&&n.parent.data==="nested")&&s.push(n)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,n){var i=this;if(s?function(){for(var a=i.getTweens(),l=i.data.length,u;l--;)u=i.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(d){return a.splice(a.indexOf(d),1)}));for(a.map(function(d){return{g:d._dur||d._delay||d._sat&&!d._sat.vars.immediateRender?d.globalTime(0):-1/0,t:d}}).sort(function(d,f){return f.g-d.g||-1/0}).forEach(function(d){return d.t.revert(s)}),l=i.data.length;l--;)u=i.data[l],u instanceof we?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof le)&&u.revert&&u.revert(s);i._r.forEach(function(d){return d(s,i)}),i.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),n)for(var o=Tt.length;o--;)Tt[o].id===this.id&&Tt.splice(o,1)},e.revert=function(s){this.kill(s||{})},r}(),wl=function(){function r(t){this.contexts=[],this.scope=t,ee&&ee.data.push(this)}var e=r.prototype;return e.add=function(s,n,i){Xe(s)||(s={matches:s});var o=new Xi(0,i||this.scope),a=o.conditions={},l,u,d;ee&&!o.selector&&(o.selector=ee.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=s;for(u in s)u==="all"?d=1:(l=qe.matchMedia(s[u]),l&&(Tt.indexOf(o)<0&&Tt.push(o),(a[u]=l.matches)&&(d=1),l.addListener?l.addListener(kn):l.addEventListener("change",kn)));return d&&n(o,function(f){return o.add(null,f)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(n){return n.kill(s,!0)})},r}(),As={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];t.forEach(function(n){return Ii(n)})},timeline:function(e){return new we(e)},getTweensOf:function(e,t){return re.getTweensOf(e,t)},getProperty:function(e,t,s,n){de(e)&&(e=$e(e)[0]);var i=Ct(e||{}).get,o=s?Ci:_i;return s==="native"&&(s=""),e&&(t?o((Re[t]&&Re[t].get||i)(e,t,s,n)):function(a,l,u){return o((Re[a]&&Re[a].get||i)(e,a,l,u))})},quickSetter:function(e,t,s){if(e=$e(e),e.length>1){var n=e.map(function(d){return xe.quickSetter(d,t,s)}),i=n.length;return function(d){for(var f=i;f--;)n[f](d)}}e=e[0]||{};var o=Re[t],a=Ct(e),l=a.harness&&(a.harness.aliases||{})[t]||t,u=o?function(d){var f=new o;Lt._pt=0,f.init(e,s?d+s:d,Lt,0,[e]),f.render(1,f),Lt._pt&&jn(1,Lt)}:a.set(e,l);return o?u:function(d){return u(e,l,s?d+s:d,a,1)}},quickTo:function(e,t,s){var n,i=xe.to(e,Ae((n={},n[t]="+=0.1",n.paused=!0,n.stagger=0,n),s||{})),o=function(l,u,d){return i.resetTo(t,l,u,d)};return o.tween=i,o},isTweening:function(e){return re.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=St(e.ease,Vt.ease)),_r(Vt,e||{})},config:function(e){return _r(Be,e||{})},registerEffect:function(e){var t=e.name,s=e.effect,n=e.plugins,i=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!Re[a]&&!Pe[a]&&us(t+" effect requires "+a+" plugin.")}),Xs[t]=function(a,l,u){return s($e(a),Ae(l||{},i),u)},o&&(we.prototype[t]=function(a,l,u){return this.add(Xs[t](a,Xe(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){F[e]=St(t)},parseEase:function(e,t){return arguments.length?St(e,t):F},getById:function(e){return re.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var s=new we(e),n,i;for(s.smoothChildTiming=ve(e.smoothChildTiming),re.remove(s),s._dp=0,s._time=s._tTime=re._time,n=re._first;n;)i=n._next,(t||!(!n._dur&&n instanceof le&&n.vars.onComplete===n._targets[0]))&&Ge(s,n,n._start-n._delay),n=i;return Ge(re,s,0),s},context:function(e,t){return e?new Xi(e,t):ee},matchMedia:function(e){return new wl(e)},matchMediaRefresh:function(){return Tt.forEach(function(e){var t=e.conditions,s,n;for(n in t)t[n]&&(t[n]=!1,s=1);s&&e.revert()})||kn()},addEventListener:function(e,t){var s=Rs[e]||(Rs[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=Rs[e],n=s&&s.indexOf(t);n>=0&&s.splice(n,1)},utils:{wrap:Za,wrapYoyo:Ya,distribute:Mi,random:Pi,snap:Bi,normalize:Ga,getUnit:he,clamp:Wa,splitColor:Oi,toArray:$e,selector:bn,mapRange:Di,pipe:ja,unitize:qa,interpolate:Xa,shuffle:Ei},install:wi,effects:Xs,ticker:Ee,updateRoot:we.updateRoot,plugins:Re,globalTimeline:re,core:{PropTween:_e,globals:bi,Tween:le,Timeline:we,Animation:fs,getCache:Ct,_removeLinkedListItem:Vs,reverting:function(){return pe},context:function(e){return e&&ee&&(ee.data.push(e),e._ctx=ee),ee},suppressOverwrites:function(e){return An=e}}};ke("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return As[r]=le[r]});Ee.add(we.updateRoot);Lt=As.to({},{duration:0});var bl=function(e,t){for(var s=e._pt;s&&s.p!==t&&s.op!==t&&s.fp!==t;)s=s._next;return s},yl=function(e,t){var s=e._targets,n,i,o;for(n in t)for(i=s.length;i--;)o=e._ptLookup[i][n],o&&(o=o.d)&&(o._pt&&(o=bl(o,n)),o&&o.modifier&&o.modifier(t[n],e,s[i],n))},sn=function(e,t){return{name:e,headless:1,rawVars:1,init:function(n,i,o){o._onInit=function(a){var l,u;if(de(i)&&(l={},ke(i,function(d){return l[d]=1}),i=l),t){l={};for(u in i)l[u]=t(i[u]);i=l}yl(a,i)}}}},xe=As.registerPlugin({name:"attr",init:function(e,t,s,n,i){var o,a,l;this.tween=s;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],n,i,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var s=t._pt;s;)pe?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",headless:1,init:function(e,t){for(var s=t.length;s--;)this.add(e,s,e[s]||0,t[s],0,0,0,0,0,1)}},sn("roundProps",yn),sn("modifiers"),sn("snap",Bi))||As;le.version=we.version=xe.version="3.13.0";mi=1;Ln()&&Ut();F.Power0;F.Power1;F.Power2;F.Power3;F.Power4;F.Linear;F.Quad;F.Cubic;F.Quart;F.Quint;F.Strong;F.Elastic;F.Back;F.SteppedEase;F.Bounce;F.Sine;F.Expo;F.Circ;/*!
12
12
  * CSSPlugin 3.13.0
13
13
  * https://gsap.com
14
14
  *
15
15
  * Copyright 2008-2025, GreenSock. All rights reserved.
16
16
  * Subject to the terms at https://gsap.com/standard-license
17
17
  * @author: Jack Doyle, jack@greensock.com
18
- */var Yn,it,Rt,Sn,mt,Xn,kn,Ta=function(){return typeof window<"u"},et={},ht=180/Math.PI,Bt=Math.PI/180,St=Math.atan2,Jn=1e8,Tn=/([A-Z])/g,za=/(left|right|width|margin|padding|x)/i,Ma=/[\s,\(]\S/,Ue={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},tn=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Ra=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Ba=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Ea=function(e,t){var s=t.s+t.c*e;t.set(t.t,t.p,~~(s+(s<0?-.5:.5))+t.u,t)},pr=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},hr=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Pa=function(e,t,s){return e.style[t]=s},Da=function(e,t,s){return e.style.setProperty(t,s)},Aa=function(e,t,s){return e._gsap[t]=s},La=function(e,t,s){return e._gsap.scaleX=e._gsap.scaleY=s},Oa=function(e,t,s,n,r){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(r,o)},Va=function(e,t,s,n,r){var o=e._gsap;o[t]=s,o.renderTransform(r,o)},se="transform",ve=se+"Origin",Ia=function i(e,t){var s=this,n=this.target,r=n.style,o=n._gsap;if(e in et&&r){if(this.tfm=this.tfm||{},e!=="transform")e=Ue[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return s.tfm[a]=Je(n,a)}):this.tfm[e]=o.x?o[e]:Je(n,e),e===ve&&(this.tfm.zOrigin=o.zOrigin);else return Ue.transform.split(",").forEach(function(a){return i.call(s,a,t)});if(this.props.indexOf(se)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(ve,t,"")),e=se}(r||t)&&this.props.push(e,t,r[e])},mr=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Ka=function(){var e=this.props,t=this.target,s=t.style,n=t._gsap,r,o;for(r=0;r<e.length;r+=3)e[r+1]?e[r+1]===2?t[e[r]](e[r+2]):t[e[r]]=e[r+2]:e[r+2]?s[e[r]]=e[r+2]:s.removeProperty(e[r].substr(0,2)==="--"?e[r]:e[r].replace(Tn,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),r=kn(),(!r||!r.isStart)&&!s[se]&&(mr(s),n.zOrigin&&s[ve]&&(s[ve]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},yr=function(e,t){var s={target:e,props:[],revert:Ka,save:Ia};return e._gsap||_e.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return s.save(n)}),s},wr,sn=function(e,t){var s=it.createElementNS?it.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):it.createElement(e);return s&&s.style?s:it.createElement(e)},Oe=function i(e,t,s){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(Tn,"-$1").toLowerCase())||n.getPropertyValue(t)||!s&&i(e,Ot(t)||t,1)||""},Qn="O,Moz,ms,Ms,Webkit".split(","),Ot=function(e,t,s){var n=t||mt,r=n.style,o=5;if(e in r&&!s)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(Qn[o]+e in r););return o<0?null:(o===3?"ms":o>=0?Qn[o]:"")+e},nn=function(){Ta()&&window.document&&(Yn=window,it=Yn.document,Rt=it.documentElement,mt=sn("div")||{style:{}},sn("div"),se=Ot(se),ve=se+"Origin",mt.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",wr=!!Ot("perspective"),kn=_e.core.reverting,Sn=1)},ei=function(e){var t=e.ownerSVGElement,s=sn("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),r;n.style.display="block",s.appendChild(n),Rt.appendChild(s);try{r=n.getBBox()}catch{}return s.removeChild(n),Rt.removeChild(s),r},ti=function(e,t){for(var s=t.length;s--;)if(e.hasAttribute(t[s]))return e.getAttribute(t[s])},br=function(e){var t,s;try{t=e.getBBox()}catch{t=ei(e),s=1}return t&&(t.width||t.height)||s||(t=ei(e)),t&&!t.width&&!t.x&&!t.y?{x:+ti(e,["x","cx","x1"])||0,y:+ti(e,["y","cy","y1"])||0,width:0,height:0}:t},vr=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&br(e))},_t=function(e,t){if(t){var s=e.style,n;t in et&&t!==ve&&(t=se),s.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),s.removeProperty(n==="--"?t:t.replace(Tn,"-$1").toLowerCase())):s.removeAttribute(t)}},rt=function(e,t,s,n,r,o){var a=new be(e._pt,t,s,0,1,o?hr:pr);return e._pt=a,a.b=n,a.e=r,e._props.push(s),a},si={deg:1,rad:1,turn:1},Na={grid:1,flex:1},ut=function i(e,t,s,n){var r=parseFloat(s)||0,o=(s+"").trim().substr((r+"").length)||"px",a=mt.style,c=za.test(t),u=e.tagName.toLowerCase()==="svg",d=(u?"client":"offset")+(c?"Width":"Height"),p=100,h=n==="px",m=n==="%",g,f,y,_;if(n===o||!r||si[n]||si[o])return r;if(o!=="px"&&!h&&(r=i(e,t,s,"px")),_=e.getCTM&&vr(e),(m||o==="%")&&(et[t]||~t.indexOf("adius")))return g=_?e.getBBox()[c?"width":"height"]:e[d],ie(m?r/g*p:r/100*g);if(a[c?"width":"height"]=p+(h?o:n),f=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!u?e:e.parentNode,_&&(f=(e.ownerSVGElement||{}).parentNode),(!f||f===it||!f.appendChild)&&(f=it.body),y=f._gsap,y&&m&&y.width&&c&&y.time===Te.time&&!y.uncache)return ie(r/y.width*p);if(m&&(t==="height"||t==="width")){var b=e.style[t];e.style[t]=p+n,g=e[d],b?e.style[t]=b:_t(e,t)}else(m||o==="%")&&!Na[Oe(f,"display")]&&(a.position=Oe(e,"position")),f===e&&(a.position="static"),f.appendChild(mt),g=mt[d],f.removeChild(mt),a.position="absolute";return c&&m&&(y=yt(f),y.time=Te.time,y.width=f[d]),ie(h?g*r/p:g&&r?p/g*r:0)},Je=function(e,t,s,n){var r;return Sn||nn(),t in Ue&&t!=="transform"&&(t=Ue[t],~t.indexOf(",")&&(t=t.split(",")[0])),et[t]&&t!=="transform"?(r=is(e,n),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:vs(Oe(e,ve))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||n||~(r+"").indexOf("calc("))&&(r=bs[t]&&bs[t](e,t,s)||Oe(e,t)||Oi(e,t)||(t==="opacity"?1:0))),s&&!~(r+"").trim().indexOf(" ")?ut(e,t,r,s)+s:r},Fa=function(e,t,s,n){if(!s||s==="none"){var r=Ot(t,e,1),o=r&&Oe(e,r,1);o&&o!==s?(t=r,s=o):t==="borderColor"&&(s=Oe(e,"borderTopColor"))}var a=new be(this._pt,e.style,t,0,1,dr),c=0,u=0,d,p,h,m,g,f,y,_,b,w,C,v;if(a.b=s,a.e=n,s+="",n+="",n.substring(0,6)==="var(--"&&(n=Oe(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(f=e.style[t],e.style[t]=n,n=Oe(e,t)||n,f?e.style[t]=f:_t(e,t)),d=[s,n],tr(d),s=d[0],n=d[1],h=s.match(Tt)||[],v=n.match(Tt)||[],v.length){for(;p=Tt.exec(n);)y=p[0],b=n.substring(c,p.index),g?g=(g+1)%5:(b.substr(-5)==="rgba("||b.substr(-5)==="hsla(")&&(g=1),y!==(f=h[u++]||"")&&(m=parseFloat(f)||0,C=f.substr((m+"").length),y.charAt(1)==="="&&(y=Mt(m,y)+C),_=parseFloat(y),w=y.substr((_+"").length),c=Tt.lastIndex-w.length,w||(w=w||Me.units[t]||C,c===n.length&&(n+=w,a.e+=w)),C!==w&&(m=ut(e,t,f,w)||0),a._pt={_next:a._pt,p:b||u===1?b:",",s:m,c:_-m,m:g&&g<4||t==="zIndex"?Math.round:0});a.c=c<n.length?n.substring(c,n.length):""}else a.r=t==="display"&&n==="none"?hr:pr;return Bi.test(n)&&(a.e=0),this._pt=a,a},ni={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Wa=function(e){var t=e.split(" "),s=t[0],n=t[1]||"50%";return(s==="top"||s==="bottom"||n==="left"||n==="right")&&(e=s,s=n,n=e),t[0]=ni[s]||s,t[1]=ni[n]||n,t.join(" ")},$a=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var s=t.t,n=s.style,r=t.u,o=s._gsap,a,c,u;if(r==="all"||r===!0)n.cssText="",c=1;else for(r=r.split(","),u=r.length;--u>-1;)a=r[u],et[a]&&(c=1,a=a==="transformOrigin"?ve:se),_t(s,a);c&&(_t(s,se),o&&(o.svg&&s.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",is(s,1),o.uncache=1,mr(n)))}},bs={clearProps:function(e,t,s,n,r){if(r.data!=="isFromStart"){var o=e._pt=new be(e._pt,t,s,0,0,$a);return o.u=n,o.pr=-10,o.tween=r,e._props.push(s),1}}},ns=[1,0,0,1,0,0],_r={},Cr=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},ii=function(e){var t=Oe(e,se);return Cr(t)?ns:t.substr(7).match(Ri).map(ie)},zn=function(e,t){var s=e._gsap||yt(e),n=e.style,r=ii(e),o,a,c,u;return s.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,r=[c.a,c.b,c.c,c.d,c.e,c.f],r.join(",")==="1,0,0,1,0,0"?ns:r):(r===ns&&!e.offsetParent&&e!==Rt&&!s.svg&&(c=n.display,n.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,a=e.nextElementSibling,Rt.appendChild(e)),r=ii(e),c?n.display=c:_t(e,"display"),u&&(a?o.insertBefore(e,a):o?o.appendChild(e):Rt.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},rn=function(e,t,s,n,r,o){var a=e._gsap,c=r||zn(e,!0),u=a.xOrigin||0,d=a.yOrigin||0,p=a.xOffset||0,h=a.yOffset||0,m=c[0],g=c[1],f=c[2],y=c[3],_=c[4],b=c[5],w=t.split(" "),C=parseFloat(w[0])||0,v=parseFloat(w[1])||0,k,z,x,T;s?c!==ns&&(z=m*y-g*f)&&(x=C*(y/z)+v*(-f/z)+(f*b-y*_)/z,T=C*(-g/z)+v*(m/z)-(m*b-g*_)/z,C=x,v=T):(k=br(e),C=k.x+(~w[0].indexOf("%")?C/100*k.width:C),v=k.y+(~(w[1]||w[0]).indexOf("%")?v/100*k.height:v)),n||n!==!1&&a.smooth?(_=C-u,b=v-d,a.xOffset=p+(_*m+b*f)-_,a.yOffset=h+(_*g+b*y)-b):a.xOffset=a.yOffset=0,a.xOrigin=C,a.yOrigin=v,a.smooth=!!n,a.origin=t,a.originIsAbsolute=!!s,e.style[ve]="0px 0px",o&&(rt(o,a,"xOrigin",u,C),rt(o,a,"yOrigin",d,v),rt(o,a,"xOffset",p,a.xOffset),rt(o,a,"yOffset",h,a.yOffset)),e.setAttribute("data-svg-origin",C+" "+v)},is=function(e,t){var s=e._gsap||new rr(e);if("x"in s&&!t&&!s.uncache)return s;var n=e.style,r=s.scaleX<0,o="px",a="deg",c=getComputedStyle(e),u=Oe(e,ve)||"0",d,p,h,m,g,f,y,_,b,w,C,v,k,z,x,T,L,W,K,$,J,P,F,j,D,G,Ke,Ce,xe,q,U,me;return d=p=h=f=y=_=b=w=C=0,m=g=1,s.svg=!!(e.getCTM&&vr(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(n[se]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[se]!=="none"?c[se]:"")),n.scale=n.rotate=n.translate="none"),z=zn(e,s.svg),s.svg&&(s.uncache?(D=e.getBBox(),u=s.xOrigin-D.x+"px "+(s.yOrigin-D.y)+"px",j=""):j=!t&&e.getAttribute("data-svg-origin"),rn(e,j||u,!!j||s.originIsAbsolute,s.smooth!==!1,z)),v=s.xOrigin||0,k=s.yOrigin||0,z!==ns&&(W=z[0],K=z[1],$=z[2],J=z[3],d=P=z[4],p=F=z[5],z.length===6?(m=Math.sqrt(W*W+K*K),g=Math.sqrt(J*J+$*$),f=W||K?St(K,W)*ht:0,b=$||J?St($,J)*ht+f:0,b&&(g*=Math.abs(Math.cos(b*Bt))),s.svg&&(d-=v-(v*W+k*$),p-=k-(v*K+k*J))):(me=z[6],q=z[7],Ke=z[8],Ce=z[9],xe=z[10],U=z[11],d=z[12],p=z[13],h=z[14],x=St(me,xe),y=x*ht,x&&(T=Math.cos(-x),L=Math.sin(-x),j=P*T+Ke*L,D=F*T+Ce*L,G=me*T+xe*L,Ke=P*-L+Ke*T,Ce=F*-L+Ce*T,xe=me*-L+xe*T,U=q*-L+U*T,P=j,F=D,me=G),x=St(-$,xe),_=x*ht,x&&(T=Math.cos(-x),L=Math.sin(-x),j=W*T-Ke*L,D=K*T-Ce*L,G=$*T-xe*L,U=J*L+U*T,W=j,K=D,$=G),x=St(K,W),f=x*ht,x&&(T=Math.cos(x),L=Math.sin(x),j=W*T+K*L,D=P*T+F*L,K=K*T-W*L,F=F*T-P*L,W=j,P=D),y&&Math.abs(y)+Math.abs(f)>359.9&&(y=f=0,_=180-_),m=ie(Math.sqrt(W*W+K*K+$*$)),g=ie(Math.sqrt(F*F+me*me)),x=St(P,F),b=Math.abs(x)>2e-4?x*ht:0,C=U?1/(U<0?-U:U):0),s.svg&&(j=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!Cr(Oe(e,se)),j&&e.setAttribute("transform",j))),Math.abs(b)>90&&Math.abs(b)<270&&(r?(m*=-1,b+=f<=0?180:-180,f+=f<=0?180:-180):(g*=-1,b+=b<=0?180:-180)),t=t||s.uncache,s.x=d-((s.xPercent=d&&(!t&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-d)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+o,s.y=p-((s.yPercent=p&&(!t&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-p)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+o,s.z=h+o,s.scaleX=ie(m),s.scaleY=ie(g),s.rotation=ie(f)+a,s.rotationX=ie(y)+a,s.rotationY=ie(_)+a,s.skewX=b+a,s.skewY=w+a,s.transformPerspective=C+o,(s.zOrigin=parseFloat(u.split(" ")[2])||!t&&s.zOrigin||0)&&(n[ve]=vs(u)),s.xOffset=s.yOffset=0,s.force3D=Me.force3D,s.renderTransform=s.svg?Ha:wr?xr:Ua,s.uncache=0,s},vs=function(e){return(e=e.split(" "))[0]+" "+e[1]},Vs=function(e,t,s){var n=de(t);return ie(parseFloat(t)+parseFloat(ut(e,"x",s+"px",n)))+n},Ua=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,xr(e,t)},gt="0deg",$t="0px",pt=") ",xr=function(e,t){var s=t||this,n=s.xPercent,r=s.yPercent,o=s.x,a=s.y,c=s.z,u=s.rotation,d=s.rotationY,p=s.rotationX,h=s.skewX,m=s.skewY,g=s.scaleX,f=s.scaleY,y=s.transformPerspective,_=s.force3D,b=s.target,w=s.zOrigin,C="",v=_==="auto"&&e&&e!==1||_===!0;if(w&&(p!==gt||d!==gt)){var k=parseFloat(d)*Bt,z=Math.sin(k),x=Math.cos(k),T;k=parseFloat(p)*Bt,T=Math.cos(k),o=Vs(b,o,z*T*-w),a=Vs(b,a,-Math.sin(k)*-w),c=Vs(b,c,x*T*-w+w)}y!==$t&&(C+="perspective("+y+pt),(n||r)&&(C+="translate("+n+"%, "+r+"%) "),(v||o!==$t||a!==$t||c!==$t)&&(C+=c!==$t||v?"translate3d("+o+", "+a+", "+c+") ":"translate("+o+", "+a+pt),u!==gt&&(C+="rotate("+u+pt),d!==gt&&(C+="rotateY("+d+pt),p!==gt&&(C+="rotateX("+p+pt),(h!==gt||m!==gt)&&(C+="skew("+h+", "+m+pt),(g!==1||f!==1)&&(C+="scale("+g+", "+f+pt),b.style[se]=C||"translate(0, 0)"},Ha=function(e,t){var s=t||this,n=s.xPercent,r=s.yPercent,o=s.x,a=s.y,c=s.rotation,u=s.skewX,d=s.skewY,p=s.scaleX,h=s.scaleY,m=s.target,g=s.xOrigin,f=s.yOrigin,y=s.xOffset,_=s.yOffset,b=s.forceCSS,w=parseFloat(o),C=parseFloat(a),v,k,z,x,T;c=parseFloat(c),u=parseFloat(u),d=parseFloat(d),d&&(d=parseFloat(d),u+=d,c+=d),c||u?(c*=Bt,u*=Bt,v=Math.cos(c)*p,k=Math.sin(c)*p,z=Math.sin(c-u)*-h,x=Math.cos(c-u)*h,u&&(d*=Bt,T=Math.tan(u-d),T=Math.sqrt(1+T*T),z*=T,x*=T,d&&(T=Math.tan(d),T=Math.sqrt(1+T*T),v*=T,k*=T)),v=ie(v),k=ie(k),z=ie(z),x=ie(x)):(v=p,x=h,k=z=0),(w&&!~(o+"").indexOf("px")||C&&!~(a+"").indexOf("px"))&&(w=ut(m,"x",o,"px"),C=ut(m,"y",a,"px")),(g||f||y||_)&&(w=ie(w+g-(g*v+f*z)+y),C=ie(C+f-(g*k+f*x)+_)),(n||r)&&(T=m.getBBox(),w=ie(w+n/100*T.width),C=ie(C+r/100*T.height)),T="matrix("+v+","+k+","+z+","+x+","+w+","+C+")",m.setAttribute("transform",T),b&&(m.style[se]=T)},ja=function(e,t,s,n,r){var o=360,a=le(r),c=parseFloat(r)*(a&&~r.indexOf("rad")?ht:1),u=c-n,d=n+u+"deg",p,h;return a&&(p=r.split("_")[1],p==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-360)),p==="cw"&&u<0?u=(u+o*Jn)%o-~~(u/o)*o:p==="ccw"&&u>0&&(u=(u-o*Jn)%o-~~(u/o)*o)),e._pt=h=new be(e._pt,t,s,n,u,Ra),h.e=d,h.u="deg",e._props.push(s),h},ri=function(e,t){for(var s in t)e[s]=t[s];return e},Ga=function(e,t,s){var n=ri({},s._gsap),r="perspective,force3D,transformOrigin,svgOrigin",o=s.style,a,c,u,d,p,h,m,g;n.svg?(u=s.getAttribute("transform"),s.setAttribute("transform",""),o[se]=t,a=is(s,1),_t(s,se),s.setAttribute("transform",u)):(u=getComputedStyle(s)[se],o[se]=t,a=is(s,1),o[se]=u);for(c in et)u=n[c],d=a[c],u!==d&&r.indexOf(c)<0&&(m=de(u),g=de(d),p=m!==g?ut(s,c,u,g):parseFloat(u),h=parseFloat(d),e._pt=new be(e._pt,a,c,p,h-p,tn),e._pt.u=g||0,e._props.push(c));ri(a,n)};we("padding,margin,Width,Radius",function(i,e){var t="Top",s="Right",n="Bottom",r="Left",o=(e<3?[t,s,n,r]:[t+r,t+s,n+s,n+r]).map(function(a){return e<2?i+a:"border"+a+i});bs[e>1?"border"+i:i]=function(a,c,u,d,p){var h,m;if(arguments.length<4)return h=o.map(function(g){return Je(a,g,u)}),m=h.join(" "),m.split(h[0]).length===5?h[0]:m;h=(d+"").split(" "),m={},o.forEach(function(g,f){return m[g]=h[f]=h[f]||h[(f-1)/2|0]}),a.init(c,m,p)}});var Sr={name:"css",register:nn,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,s,n,r){var o=this._props,a=e.style,c=s.vars.startAt,u,d,p,h,m,g,f,y,_,b,w,C,v,k,z,x;Sn||nn(),this.styles=this.styles||yr(e),x=this.styles.props,this.tween=s;for(f in t)if(f!=="autoRound"&&(d=t[f],!(ke[f]&&or(f,t,s,n,e,r)))){if(m=typeof d,g=bs[f],m==="function"&&(d=d.call(s,n,e,r),m=typeof d),m==="string"&&~d.indexOf("random(")&&(d=es(d)),g)g(this,e,f,d,s)&&(z=1);else if(f.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(f)+"").trim(),d+="",lt.lastIndex=0,lt.test(u)||(y=de(u),_=de(d)),_?y!==_&&(u=ut(e,f,u,_)+_):y&&(d+=y),this.add(a,"setProperty",u,d,n,r,0,0,f),o.push(f),x.push(f,0,a[f]);else if(m!=="undefined"){if(c&&f in c?(u=typeof c[f]=="function"?c[f].call(s,n,e,r):c[f],le(u)&&~u.indexOf("random(")&&(u=es(u)),de(u+"")||u==="auto"||(u+=Me.units[f]||de(Je(e,f))||""),(u+"").charAt(1)==="="&&(u=Je(e,f))):u=Je(e,f),h=parseFloat(u),b=m==="string"&&d.charAt(1)==="="&&d.substr(0,2),b&&(d=d.substr(2)),p=parseFloat(d),f in Ue&&(f==="autoAlpha"&&(h===1&&Je(e,"visibility")==="hidden"&&p&&(h=0),x.push("visibility",0,a.visibility),rt(this,a,"visibility",h?"inherit":"hidden",p?"inherit":"hidden",!p)),f!=="scale"&&f!=="transform"&&(f=Ue[f],~f.indexOf(",")&&(f=f.split(",")[0]))),w=f in et,w){if(this.styles.save(f),m==="string"&&d.substring(0,6)==="var(--"&&(d=Oe(e,d.substring(4,d.indexOf(")"))),p=parseFloat(d)),C||(v=e._gsap,v.renderTransform&&!t.parseTransform||is(e,t.parseTransform),k=t.smoothOrigin!==!1&&v.smooth,C=this._pt=new be(this._pt,a,se,0,1,v.renderTransform,v,0,-1),C.dep=1),f==="scale")this._pt=new be(this._pt,v,"scaleY",v.scaleY,(b?Mt(v.scaleY,b+p):p)-v.scaleY||0,tn),this._pt.u=0,o.push("scaleY",f),f+="X";else if(f==="transformOrigin"){x.push(ve,0,a[ve]),d=Wa(d),v.svg?rn(e,d,0,k,0,this):(_=parseFloat(d.split(" ")[2])||0,_!==v.zOrigin&&rt(this,v,"zOrigin",v.zOrigin,_),rt(this,a,f,vs(u),vs(d)));continue}else if(f==="svgOrigin"){rn(e,d,1,k,0,this);continue}else if(f in _r){ja(this,v,f,h,b?Mt(h,b+d):d);continue}else if(f==="smoothOrigin"){rt(this,v,"smooth",v.smooth,d);continue}else if(f==="force3D"){v[f]=d;continue}else if(f==="transform"){Ga(this,d,e);continue}}else f in a||(f=Ot(f)||f);if(w||(p||p===0)&&(h||h===0)&&!Ma.test(d)&&f in a)y=(u+"").substr((h+"").length),p||(p=0),_=de(d)||(f in Me.units?Me.units[f]:y),y!==_&&(h=ut(e,f,u,_)),this._pt=new be(this._pt,w?v:a,f,h,(b?Mt(h,b+p):p)-h,!w&&(_==="px"||f==="zIndex")&&t.autoRound!==!1?Ea:tn),this._pt.u=_||0,y!==_&&_!=="%"&&(this._pt.b=u,this._pt.r=Ba);else if(f in a)Fa.call(this,e,f,u,b?b+d:d);else if(f in e)this.add(e,f,u||e[f],b?b+d:d,n,r);else if(f!=="parseTransform"){pn(f,d);continue}w||(f in a?x.push(f,0,a[f]):typeof e[f]=="function"?x.push(f,2,e[f]()):x.push(f,1,u||e[f])),o.push(f)}}z&&fr(this)},render:function(e,t){if(t.tween._time||!kn())for(var s=t._pt;s;)s.r(e,s.d),s=s._next;else t.styles.revert()},get:Je,aliases:Ue,getSetter:function(e,t,s){var n=Ue[t];return n&&n.indexOf(",")<0&&(t=n),t in et&&t!==ve&&(e._gsap.x||Je(e,"x"))?s&&Xn===s?t==="scale"?La:Aa:(Xn=s||{})&&(t==="scale"?Oa:Va):e.style&&!dn(e.style[t])?Pa:~t.indexOf("-")?Da:Cn(e,t)},core:{_removeProperty:_t,_getMatrix:zn}};_e.utils.checkPrefix=Ot;_e.core.getStyleSaver=yr;(function(i,e,t,s){var n=we(i+","+e+","+t,function(r){et[r]=1});we(e,function(r){Me.units[r]="deg",_r[r]=1}),Ue[n[13]]=i+","+e,we(s,function(r){var o=r.split(":");Ue[o[1]]=n[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");we("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){Me.units[i]="px"});_e.registerPlugin(Sr);var H=_e.registerPlugin(Sr)||_e;H.core.Tween;const oi={sm:{fontSize:12,sidePadding:8,verticalSpacing:4,borderRadius:8},md:{fontSize:14,sidePadding:12,verticalSpacing:8,borderRadius:10},lg:{fontSize:16,sidePadding:16,verticalSpacing:12,borderRadius:12}};function kt(i){if(i!=null)return`${i}px`}function kr(i){return Math.max(0,Math.min(1,i))}function Tr(i){if(!i)return;const e=i.trim();if(/^#([0-9a-fA-F]{3}){1,2}$/.test(e)){let s=0,n=0,r=0;return e.length===4?(s=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),r=parseInt(e[3]+e[3],16)):(s=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),r=parseInt(e.slice(5,7),16)),{r:s,g:n,b:r}}const t=e.match(/^rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i);if(t)return{r:Number(t[1]),g:Number(t[2]),b:Number(t[3])}}function Is(i){const t=Math.max(0,Math.min(255,Math.round(i))).toString(16);return t.length===1?`0${t}`:t}function zr(i){if(i)return`#${Is(i.r)}${Is(i.g)}${Is(i.b)}`}function ai(i,e=.12){const t=Tr(i);if(!t)return i;const s=kr(e);return zr({r:t.r+(255-t.r)*s,g:t.g+(255-t.g)*s,b:t.b+(255-t.b)*s})}function Za(i,e=.12){const t=Tr(i);if(!t)return i;const s=kr(e);return zr({r:t.r*(1-s),g:t.g*(1-s),b:t.b*(1-s)})}function qa(i,e){if(i)switch(e){case"gradient":{const t=ai(i,.08)||i,s=Za(i,.12)||i;return`linear-gradient(180deg, ${t} 0%, ${s} 100%)`}case"bubble":return`radial-gradient(120% 120% at 10% 0%, ${ai(i,.14)||i} 0%, ${i} 60%)`;default:return i}}function Ya(i,e){return{...i?oi[i]:oi.md,...void 0}}function Xa(i,e){const t=Ya(i.size),s=i.color,n=qa(i.bgColor??(e==null?void 0:e.fallbackColor),i.bgType),r=kt(i.fontSize??t.fontSize),o=kt(i.borderRadius??t.borderRadius),a=kt(i.verticalPadding),c=kt(i.sidePadding);let u;i.borderWidth&&i.borderWidth>0?u=`${i.borderWidth}px solid ${i.borderColor||(e==null?void 0:e.fallbackColor)||"currentColor"}`:i.borderColor&&!i.borderWidth&&(u=`1px solid ${i.borderColor}`);const d=i.width?i.width+(i.borderWidth??0):void 0,p=i.height?i.height+(i.borderWidth??0):void 0,h={color:s,background:n,fontSize:r,borderRadius:o,width:kt(d),height:kt(p),padding:a&&c?`${a} ${c}`:void 0,border:u},m={};for(const g in h){const f=h[g];f!=null&&f!==""&&(m[g]=String(f))}return m}const Ja=["innerHTML"],Qa=["src"],el=l.defineComponent({__name:"ChatCollapsed",props:{element:{},toggleChat:{type:Function}},setup(i){const e=i,t=l.computed(()=>e.element),s=l.computed(()=>Xa(t.value)),n=l.computed(()=>{const a=e.element.logo;return a?a.includes("<svg"):!1}),r=l.computed(()=>{const a=e.element.logo;return a&&a.replace('width="',"").replace('height="',"").replace('"',""),a}),o=l.computed(()=>{var c;const a=(c=e.element.icon)==null?void 0:c.size;return a?a+"px":void 0});return(a,c)=>(l.openBlock(),l.createElementBlock("div",{style:l.normalizeStyle([s.value,{"box-sizing":"content-box"}]),class:"chat-collapsed tw:transition-all tw:flex tw:cursor-pointer tw:items-center tw:justify-center",onClick:c[0]||(c[0]=(...u)=>a.toggleChat&&a.toggleChat(...u))},[n.value?(l.openBlock(),l.createElementBlock("span",{key:0,class:"hs-collapsed-logo tw:transition-all",innerHTML:r.value,style:l.normalizeStyle({width:o.value,height:o.value})},null,12,Ja)):r.value?(l.openBlock(),l.createElementBlock("img",{key:1,class:"tw:transition-all",src:r.value,alt:"logo",style:l.normalizeStyle({width:o.value,height:o.value})},null,12,Qa)):l.createCommentVNode("",!0)],4))}}),Ve={schema:{version:"1.0",required:["settings","texts","sections"]},settings:{bgChat:"#434345",gapMessageLine:12,fontFamily:"MacPaw Fixel",borderRadius:12,launchView:"closed",letterSpacing:0,logo:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.22048 12.26L8.71413 11.1293C9.1535 10.1231 9.94426 9.32209 10.9307 8.88424L12.2895 8.28107C12.7215 8.08931 12.7215 7.46082 12.2895 7.26906L10.9731 6.68472C9.9613 6.23561 9.15637 5.40496 8.72453 4.3644L8.22447 3.15941C8.0389 2.71224 7.42105 2.71224 7.23548 3.15941L6.7354 4.36439C6.30357 5.40496 5.49861 6.23561 4.48686 6.68472L3.17045 7.26906C2.73843 7.46082 2.73843 8.08931 3.17045 8.28107L4.5293 8.88424C5.51569 9.32209 6.30646 10.1231 6.7458 11.1293L7.23948 12.26C7.42924 12.6946 8.03069 12.6946 8.22048 12.26ZM13.1632 15.0131L13.302 14.6949C13.5495 14.1275 13.9953 13.6758 14.5515 13.4287L14.9792 13.2386C15.2106 13.1358 15.2106 12.7996 14.9792 12.6969L14.5754 12.5174C14.0049 12.264 13.5511 11.7955 13.3078 11.2089L13.1653 10.865C13.0659 10.6254 12.7346 10.6254 12.6352 10.865L12.4927 11.2089C12.2494 11.7955 11.7957 12.264 11.2251 12.5174L10.8213 12.6969C10.59 12.7996 10.59 13.1358 10.8213 13.2386L11.249 13.4287C11.8053 13.6758 12.251 14.1275 12.4985 14.6949L12.6374 15.0131C12.739 15.246 13.0615 15.246 13.1632 15.0131Z" fill="currentColor"/></svg>',fontWeight:500,lineHeight:1.2,loader:"dots",globalRoundingRadius:!0,theme:"light",mode:"collapsed",position:"bottomRight",size:{width:435,height:450},offset:{x:24,y:36}},texts:{welcomeMessage:`🖖 Hi there — I’m your assistant for finding documents, tracking access, and making sense of your files.
18
+ */var Rr,dt,Ot,qn,_t,Er,Gn,vl=function(){return typeof window<"u"},at={},kt=180/Math.PI,$t=Math.PI/180,Pt=Math.atan2,Mr=1e8,Zn=/([A-Z])/g,kl=/(left|right|width|margin|padding|x)/i,_l=/[\s,\(]\S/,Ze={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_n=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Cl=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},xl=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Sl=function(e,t){var s=t.s+t.c*e;t.set(t.t,t.p,~~(s+(s<0?-.5:.5))+t.u,t)},Qi=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Ji=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Tl=function(e,t,s){return e.style[t]=s},zl=function(e,t,s){return e.style.setProperty(t,s)},Rl=function(e,t,s){return e._gsap[t]=s},El=function(e,t,s){return e._gsap.scaleX=e._gsap.scaleY=s},Ml=function(e,t,s,n,i){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(i,o)},Bl=function(e,t,s,n,i){var o=e._gsap;o[t]=s,o.renderTransform(i,o)},ie="transform",Ce=ie+"Origin",Pl=function r(e,t){var s=this,n=this.target,i=n.style,o=n._gsap;if(e in at&&i){if(this.tfm=this.tfm||{},e!=="transform")e=Ze[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return s.tfm[a]=rt(n,a)}):this.tfm[e]=o.x?o[e]:rt(n,e),e===Ce&&(this.tfm.zOrigin=o.zOrigin);else return Ze.transform.split(",").forEach(function(a){return r.call(s,a,t)});if(this.props.indexOf(ie)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(Ce,t,"")),e=ie}(i||t)&&this.props.push(e,t,i[e])},eo=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},Al=function(){var e=this.props,t=this.target,s=t.style,n=t._gsap,i,o;for(i=0;i<e.length;i+=3)e[i+1]?e[i+1]===2?t[e[i]](e[i+2]):t[e[i]]=e[i+2]:e[i+2]?s[e[i]]=e[i+2]:s.removeProperty(e[i].substr(0,2)==="--"?e[i]:e[i].replace(Zn,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),i=Gn(),(!i||!i.isStart)&&!s[ie]&&(eo(s),n.zOrigin&&s[Ce]&&(s[Ce]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},to=function(e,t){var s={target:e,props:[],revert:Al,save:Pl};return e._gsap||xe.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(n){return s.save(n)}),s},so,Cn=function(e,t){var s=dt.createElementNS?dt.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):dt.createElement(e);return s&&s.style?s:dt.createElement(e)},Ve=function r(e,t,s){var n=getComputedStyle(e);return n[t]||n.getPropertyValue(t.replace(Zn,"-$1").toLowerCase())||n.getPropertyValue(t)||!s&&r(e,Wt(t)||t,1)||""},Br="O,Moz,ms,Ms,Webkit".split(","),Wt=function(e,t,s){var n=t||_t,i=n.style,o=5;if(e in i&&!s)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(Br[o]+e in i););return o<0?null:(o===3?"ms":o>=0?Br[o]:"")+e},xn=function(){vl()&&window.document&&(Rr=window,dt=Rr.document,Ot=dt.documentElement,_t=Cn("div")||{style:{}},Cn("div"),ie=Wt(ie),Ce=ie+"Origin",_t.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",so=!!Wt("perspective"),Gn=xe.core.reverting,qn=1)},Pr=function(e){var t=e.ownerSVGElement,s=Cn("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),i;n.style.display="block",s.appendChild(n),Ot.appendChild(s);try{i=n.getBBox()}catch{}return s.removeChild(n),Ot.removeChild(s),i},Ar=function(e,t){for(var s=t.length;s--;)if(e.hasAttribute(t[s]))return e.getAttribute(t[s])},no=function(e){var t,s;try{t=e.getBBox()}catch{t=Pr(e),s=1}return t&&(t.width||t.height)||s||(t=Pr(e)),t&&!t.width&&!t.x&&!t.y?{x:+Ar(e,["x","cx","x1"])||0,y:+Ar(e,["y","cy","y1"])||0,width:0,height:0}:t},ro=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&no(e))},zt=function(e,t){if(t){var s=e.style,n;t in at&&t!==Ce&&(t=ie),s.removeProperty?(n=t.substr(0,2),(n==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),s.removeProperty(n==="--"?t:t.replace(Zn,"-$1").toLowerCase())):s.removeAttribute(t)}},pt=function(e,t,s,n,i,o){var a=new _e(e._pt,t,s,0,1,o?Ji:Qi);return e._pt=a,a.b=n,a.e=i,e._props.push(s),a},Dr={deg:1,rad:1,turn:1},Dl={grid:1,flex:1},mt=function r(e,t,s,n){var i=parseFloat(s)||0,o=(s+"").trim().substr((i+"").length)||"px",a=_t.style,l=kl.test(t),u=e.tagName.toLowerCase()==="svg",d=(u?"client":"offset")+(l?"Width":"Height"),f=100,g=n==="px",h=n==="%",m,p,b,k;if(n===o||!i||Dr[n]||Dr[o])return i;if(o!=="px"&&!g&&(i=r(e,t,s,"px")),k=e.getCTM&&ro(e),(h||o==="%")&&(at[t]||~t.indexOf("adius")))return m=k?e.getBBox()[l?"width":"height"]:e[d],ae(h?i/m*f:i/100*m);if(a[l?"width":"height"]=f+(g?o:n),p=n!=="rem"&&~t.indexOf("adius")||n==="em"&&e.appendChild&&!u?e:e.parentNode,k&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===dt||!p.appendChild)&&(p=dt.body),b=p._gsap,b&&h&&b.width&&l&&b.time===Ee.time&&!b.uncache)return ae(i/b.width*f);if(h&&(t==="height"||t==="width")){var v=e.style[t];e.style[t]=f+n,m=e[d],v?e.style[t]=v:zt(e,t)}else(h||o==="%")&&!Dl[Ve(p,"display")]&&(a.position=Ve(e,"position")),p===e&&(a.position="static"),p.appendChild(_t),m=_t[d],p.removeChild(_t),a.position="absolute";return l&&h&&(b=Ct(p),b.time=Ee.time,b.width=p[d]),ae(g?m*i/f:m&&i?f/m*i:0)},rt=function(e,t,s,n){var i;return qn||xn(),t in Ze&&t!=="transform"&&(t=Ze[t],~t.indexOf(",")&&(t=t.split(",")[0])),at[t]&&t!=="transform"?(i=ms(e,n),i=t!=="transformOrigin"?i[t]:i.svg?i.origin:Ls(Ve(e,Ce))+" "+i.zOrigin+"px"):(i=e.style[t],(!i||i==="auto"||n||~(i+"").indexOf("calc("))&&(i=Ds[t]&&Ds[t](e,t,s)||Ve(e,t)||vi(e,t)||(t==="opacity"?1:0))),s&&!~(i+"").trim().indexOf(" ")?mt(e,t,i,s)+s:i},Ll=function(e,t,s,n){if(!s||s==="none"){var i=Wt(t,e,1),o=i&&Ve(e,i,1);o&&o!==s?(t=i,s=o):t==="borderColor"&&(s=Ve(e,"borderTopColor"))}var a=new _e(this._pt,e.style,t,0,1,Zi),l=0,u=0,d,f,g,h,m,p,b,k,v,y,_,w;if(a.b=s,a.e=n,s+="",n+="",n.substring(0,6)==="var(--"&&(n=Ve(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(p=e.style[t],e.style[t]=n,n=Ve(e,t)||n,p?e.style[t]=p:zt(e,t)),d=[s,n],Vi(d),s=d[0],n=d[1],g=s.match(Dt)||[],w=n.match(Dt)||[],w.length){for(;f=Dt.exec(n);)b=f[0],v=n.substring(l,f.index),m?m=(m+1)%5:(v.substr(-5)==="rgba("||v.substr(-5)==="hsla(")&&(m=1),b!==(p=g[u++]||"")&&(h=parseFloat(p)||0,_=p.substr((h+"").length),b.charAt(1)==="="&&(b=It(h,b)+_),k=parseFloat(b),y=b.substr((k+"").length),l=Dt.lastIndex-y.length,y||(y=y||Be.units[t]||_,l===n.length&&(n+=y,a.e+=y)),_!==y&&(h=mt(e,t,p,y)||0),a._pt={_next:a._pt,p:v||u===1?v:",",s:h,c:k-h,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=l<n.length?n.substring(l,n.length):""}else a.r=t==="display"&&n==="none"?Ji:Qi;return fi.test(n)&&(a.e=0),this._pt=a,a},Lr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},Il=function(e){var t=e.split(" "),s=t[0],n=t[1]||"50%";return(s==="top"||s==="bottom"||n==="left"||n==="right")&&(e=s,s=n,n=e),t[0]=Lr[s]||s,t[1]=Lr[n]||n,t.join(" ")},Ol=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var s=t.t,n=s.style,i=t.u,o=s._gsap,a,l,u;if(i==="all"||i===!0)n.cssText="",l=1;else for(i=i.split(","),u=i.length;--u>-1;)a=i[u],at[a]&&(l=1,a=a==="transformOrigin"?Ce:ie),zt(s,a);l&&(zt(s,ie),o&&(o.svg&&s.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",ms(s,1),o.uncache=1,eo(n)))}},Ds={clearProps:function(e,t,s,n,i){if(i.data!=="isFromStart"){var o=e._pt=new _e(e._pt,t,s,0,0,Ol);return o.u=n,o.pr=-10,o.tween=i,e._props.push(s),1}}},gs=[1,0,0,1,0,0],io={},oo=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},Ir=function(e){var t=Ve(e,ie);return oo(t)?gs:t.substr(7).match(hi).map(ae)},Yn=function(e,t){var s=e._gsap||Ct(e),n=e.style,i=Ir(e),o,a,l,u;return s.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,i=[l.a,l.b,l.c,l.d,l.e,l.f],i.join(",")==="1,0,0,1,0,0"?gs:i):(i===gs&&!e.offsetParent&&e!==Ot&&!s.svg&&(l=n.display,n.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,a=e.nextElementSibling,Ot.appendChild(e)),i=Ir(e),l?n.display=l:zt(e,"display"),u&&(a?o.insertBefore(e,a):o?o.appendChild(e):Ot.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},Sn=function(e,t,s,n,i,o){var a=e._gsap,l=i||Yn(e,!0),u=a.xOrigin||0,d=a.yOrigin||0,f=a.xOffset||0,g=a.yOffset||0,h=l[0],m=l[1],p=l[2],b=l[3],k=l[4],v=l[5],y=t.split(" "),_=parseFloat(y[0])||0,w=parseFloat(y[1])||0,C,T,x,z;s?l!==gs&&(T=h*b-m*p)&&(x=_*(b/T)+w*(-p/T)+(p*v-b*k)/T,z=_*(-m/T)+w*(h/T)-(h*v-m*k)/T,_=x,w=z):(C=no(e),_=C.x+(~y[0].indexOf("%")?_/100*C.width:_),w=C.y+(~(y[1]||y[0]).indexOf("%")?w/100*C.height:w)),n||n!==!1&&a.smooth?(k=_-u,v=w-d,a.xOffset=f+(k*h+v*p)-k,a.yOffset=g+(k*m+v*b)-v):a.xOffset=a.yOffset=0,a.xOrigin=_,a.yOrigin=w,a.smooth=!!n,a.origin=t,a.originIsAbsolute=!!s,e.style[Ce]="0px 0px",o&&(pt(o,a,"xOrigin",u,_),pt(o,a,"yOrigin",d,w),pt(o,a,"xOffset",f,a.xOffset),pt(o,a,"yOffset",g,a.yOffset)),e.setAttribute("data-svg-origin",_+" "+w)},ms=function(e,t){var s=e._gsap||new Ui(e);if("x"in s&&!t&&!s.uncache)return s;var n=e.style,i=s.scaleX<0,o="px",a="deg",l=getComputedStyle(e),u=Ve(e,Ce)||"0",d,f,g,h,m,p,b,k,v,y,_,w,C,T,x,z,D,K,N,W,te,P,U,G,A,Y,We,Se,Te,Q,j,ye;return d=f=g=p=b=k=v=y=_=0,h=m=1,s.svg=!!(e.getCTM&&ro(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[ie]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[ie]!=="none"?l[ie]:"")),n.scale=n.rotate=n.translate="none"),T=Yn(e,s.svg),s.svg&&(s.uncache?(A=e.getBBox(),u=s.xOrigin-A.x+"px "+(s.yOrigin-A.y)+"px",G=""):G=!t&&e.getAttribute("data-svg-origin"),Sn(e,G||u,!!G||s.originIsAbsolute,s.smooth!==!1,T)),w=s.xOrigin||0,C=s.yOrigin||0,T!==gs&&(K=T[0],N=T[1],W=T[2],te=T[3],d=P=T[4],f=U=T[5],T.length===6?(h=Math.sqrt(K*K+N*N),m=Math.sqrt(te*te+W*W),p=K||N?Pt(N,K)*kt:0,v=W||te?Pt(W,te)*kt+p:0,v&&(m*=Math.abs(Math.cos(v*$t))),s.svg&&(d-=w-(w*K+C*W),f-=C-(w*N+C*te))):(ye=T[6],Q=T[7],We=T[8],Se=T[9],Te=T[10],j=T[11],d=T[12],f=T[13],g=T[14],x=Pt(ye,Te),b=x*kt,x&&(z=Math.cos(-x),D=Math.sin(-x),G=P*z+We*D,A=U*z+Se*D,Y=ye*z+Te*D,We=P*-D+We*z,Se=U*-D+Se*z,Te=ye*-D+Te*z,j=Q*-D+j*z,P=G,U=A,ye=Y),x=Pt(-W,Te),k=x*kt,x&&(z=Math.cos(-x),D=Math.sin(-x),G=K*z-We*D,A=N*z-Se*D,Y=W*z-Te*D,j=te*D+j*z,K=G,N=A,W=Y),x=Pt(N,K),p=x*kt,x&&(z=Math.cos(x),D=Math.sin(x),G=K*z+N*D,A=P*z+U*D,N=N*z-K*D,U=U*z-P*D,K=G,P=A),b&&Math.abs(b)+Math.abs(p)>359.9&&(b=p=0,k=180-k),h=ae(Math.sqrt(K*K+N*N+W*W)),m=ae(Math.sqrt(U*U+ye*ye)),x=Pt(P,U),v=Math.abs(x)>2e-4?x*kt:0,_=j?1/(j<0?-j:j):0),s.svg&&(G=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!oo(Ve(e,ie)),G&&e.setAttribute("transform",G))),Math.abs(v)>90&&Math.abs(v)<270&&(i?(h*=-1,v+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,v+=v<=0?180:-180)),t=t||s.uncache,s.x=d-((s.xPercent=d&&(!t&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-d)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+o,s.y=f-((s.yPercent=f&&(!t&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-f)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+o,s.z=g+o,s.scaleX=ae(h),s.scaleY=ae(m),s.rotation=ae(p)+a,s.rotationX=ae(b)+a,s.rotationY=ae(k)+a,s.skewX=v+a,s.skewY=y+a,s.transformPerspective=_+o,(s.zOrigin=parseFloat(u.split(" ")[2])||!t&&s.zOrigin||0)&&(n[Ce]=Ls(u)),s.xOffset=s.yOffset=0,s.force3D=Be.force3D,s.renderTransform=s.svg?Vl:so?ao:$l,s.uncache=0,s},Ls=function(e){return(e=e.split(" "))[0]+" "+e[1]},nn=function(e,t,s){var n=he(t);return ae(parseFloat(t)+parseFloat(mt(e,"x",s+"px",n)))+n},$l=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,ao(e,t)},yt="0deg",Xt="0px",vt=") ",ao=function(e,t){var s=t||this,n=s.xPercent,i=s.yPercent,o=s.x,a=s.y,l=s.z,u=s.rotation,d=s.rotationY,f=s.rotationX,g=s.skewX,h=s.skewY,m=s.scaleX,p=s.scaleY,b=s.transformPerspective,k=s.force3D,v=s.target,y=s.zOrigin,_="",w=k==="auto"&&e&&e!==1||k===!0;if(y&&(f!==yt||d!==yt)){var C=parseFloat(d)*$t,T=Math.sin(C),x=Math.cos(C),z;C=parseFloat(f)*$t,z=Math.cos(C),o=nn(v,o,T*z*-y),a=nn(v,a,-Math.sin(C)*-y),l=nn(v,l,x*z*-y+y)}b!==Xt&&(_+="perspective("+b+vt),(n||i)&&(_+="translate("+n+"%, "+i+"%) "),(w||o!==Xt||a!==Xt||l!==Xt)&&(_+=l!==Xt||w?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+vt),u!==yt&&(_+="rotate("+u+vt),d!==yt&&(_+="rotateY("+d+vt),f!==yt&&(_+="rotateX("+f+vt),(g!==yt||h!==yt)&&(_+="skew("+g+", "+h+vt),(m!==1||p!==1)&&(_+="scale("+m+", "+p+vt),v.style[ie]=_||"translate(0, 0)"},Vl=function(e,t){var s=t||this,n=s.xPercent,i=s.yPercent,o=s.x,a=s.y,l=s.rotation,u=s.skewX,d=s.skewY,f=s.scaleX,g=s.scaleY,h=s.target,m=s.xOrigin,p=s.yOrigin,b=s.xOffset,k=s.yOffset,v=s.forceCSS,y=parseFloat(o),_=parseFloat(a),w,C,T,x,z;l=parseFloat(l),u=parseFloat(u),d=parseFloat(d),d&&(d=parseFloat(d),u+=d,l+=d),l||u?(l*=$t,u*=$t,w=Math.cos(l)*f,C=Math.sin(l)*f,T=Math.sin(l-u)*-g,x=Math.cos(l-u)*g,u&&(d*=$t,z=Math.tan(u-d),z=Math.sqrt(1+z*z),T*=z,x*=z,d&&(z=Math.tan(d),z=Math.sqrt(1+z*z),w*=z,C*=z)),w=ae(w),C=ae(C),T=ae(T),x=ae(x)):(w=f,x=g,C=T=0),(y&&!~(o+"").indexOf("px")||_&&!~(a+"").indexOf("px"))&&(y=mt(h,"x",o,"px"),_=mt(h,"y",a,"px")),(m||p||b||k)&&(y=ae(y+m-(m*w+p*T)+b),_=ae(_+p-(m*C+p*x)+k)),(n||i)&&(z=h.getBBox(),y=ae(y+n/100*z.width),_=ae(_+i/100*z.height)),z="matrix("+w+","+C+","+T+","+x+","+y+","+_+")",h.setAttribute("transform",z),v&&(h.style[ie]=z)},Kl=function(e,t,s,n,i){var o=360,a=de(i),l=parseFloat(i)*(a&&~i.indexOf("rad")?kt:1),u=l-n,d=n+u+"deg",f,g;return a&&(f=i.split("_")[1],f==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-360)),f==="cw"&&u<0?u=(u+o*Mr)%o-~~(u/o)*o:f==="ccw"&&u>0&&(u=(u-o*Mr)%o-~~(u/o)*o)),e._pt=g=new _e(e._pt,t,s,n,u,Cl),g.e=d,g.u="deg",e._props.push(s),g},Or=function(e,t){for(var s in t)e[s]=t[s];return e},Nl=function(e,t,s){var n=Or({},s._gsap),i="perspective,force3D,transformOrigin,svgOrigin",o=s.style,a,l,u,d,f,g,h,m;n.svg?(u=s.getAttribute("transform"),s.setAttribute("transform",""),o[ie]=t,a=ms(s,1),zt(s,ie),s.setAttribute("transform",u)):(u=getComputedStyle(s)[ie],o[ie]=t,a=ms(s,1),o[ie]=u);for(l in at)u=n[l],d=a[l],u!==d&&i.indexOf(l)<0&&(h=he(u),m=he(d),f=h!==m?mt(s,l,u,m):parseFloat(u),g=parseFloat(d),e._pt=new _e(e._pt,a,l,f,g-f,_n),e._pt.u=m||0,e._props.push(l));Or(a,n)};ke("padding,margin,Width,Radius",function(r,e){var t="Top",s="Right",n="Bottom",i="Left",o=(e<3?[t,s,n,i]:[t+i,t+s,n+s,n+i]).map(function(a){return e<2?r+a:"border"+a+r});Ds[e>1?"border"+r:r]=function(a,l,u,d,f){var g,h;if(arguments.length<4)return g=o.map(function(m){return rt(a,m,u)}),h=g.join(" "),h.split(g[0]).length===5?g[0]:h;g=(d+"").split(" "),h={},o.forEach(function(m,p){return h[m]=g[p]=g[p]||g[(p-1)/2|0]}),a.init(l,h,f)}});var lo={name:"css",register:xn,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,s,n,i){var o=this._props,a=e.style,l=s.vars.startAt,u,d,f,g,h,m,p,b,k,v,y,_,w,C,T,x;qn||xn(),this.styles=this.styles||to(e),x=this.styles.props,this.tween=s;for(p in t)if(p!=="autoRound"&&(d=t[p],!(Re[p]&&Wi(p,t,s,n,e,i)))){if(h=typeof d,m=Ds[p],h==="function"&&(d=d.call(s,n,e,i),h=typeof d),h==="string"&&~d.indexOf("random(")&&(d=ps(d)),m)m(this,e,p,d,s)&&(T=1);else if(p.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(p)+"").trim(),d+="",ft.lastIndex=0,ft.test(u)||(b=he(u),k=he(d)),k?b!==k&&(u=mt(e,p,u,k)+k):b&&(d+=b),this.add(a,"setProperty",u,d,n,i,0,0,p),o.push(p),x.push(p,0,a[p]);else if(h!=="undefined"){if(l&&p in l?(u=typeof l[p]=="function"?l[p].call(s,n,e,i):l[p],de(u)&&~u.indexOf("random(")&&(u=ps(u)),he(u+"")||u==="auto"||(u+=Be.units[p]||he(rt(e,p))||""),(u+"").charAt(1)==="="&&(u=rt(e,p))):u=rt(e,p),g=parseFloat(u),v=h==="string"&&d.charAt(1)==="="&&d.substr(0,2),v&&(d=d.substr(2)),f=parseFloat(d),p in Ze&&(p==="autoAlpha"&&(g===1&&rt(e,"visibility")==="hidden"&&f&&(g=0),x.push("visibility",0,a.visibility),pt(this,a,"visibility",g?"inherit":"hidden",f?"inherit":"hidden",!f)),p!=="scale"&&p!=="transform"&&(p=Ze[p],~p.indexOf(",")&&(p=p.split(",")[0]))),y=p in at,y){if(this.styles.save(p),h==="string"&&d.substring(0,6)==="var(--"&&(d=Ve(e,d.substring(4,d.indexOf(")"))),f=parseFloat(d)),_||(w=e._gsap,w.renderTransform&&!t.parseTransform||ms(e,t.parseTransform),C=t.smoothOrigin!==!1&&w.smooth,_=this._pt=new _e(this._pt,a,ie,0,1,w.renderTransform,w,0,-1),_.dep=1),p==="scale")this._pt=new _e(this._pt,w,"scaleY",w.scaleY,(v?It(w.scaleY,v+f):f)-w.scaleY||0,_n),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){x.push(Ce,0,a[Ce]),d=Il(d),w.svg?Sn(e,d,0,C,0,this):(k=parseFloat(d.split(" ")[2])||0,k!==w.zOrigin&&pt(this,w,"zOrigin",w.zOrigin,k),pt(this,a,p,Ls(u),Ls(d)));continue}else if(p==="svgOrigin"){Sn(e,d,1,C,0,this);continue}else if(p in io){Kl(this,w,p,g,v?It(g,v+d):d);continue}else if(p==="smoothOrigin"){pt(this,w,"smooth",w.smooth,d);continue}else if(p==="force3D"){w[p]=d;continue}else if(p==="transform"){Nl(this,d,e);continue}}else p in a||(p=Wt(p)||p);if(y||(f||f===0)&&(g||g===0)&&!_l.test(d)&&p in a)b=(u+"").substr((g+"").length),f||(f=0),k=he(d)||(p in Be.units?Be.units[p]:b),b!==k&&(g=mt(e,p,u,k)),this._pt=new _e(this._pt,y?w:a,p,g,(v?It(g,v+f):f)-g,!y&&(k==="px"||p==="zIndex")&&t.autoRound!==!1?Sl:_n),this._pt.u=k||0,b!==k&&k!=="%"&&(this._pt.b=u,this._pt.r=xl);else if(p in a)Ll.call(this,e,p,u,v?v+d:d);else if(p in e)this.add(e,p,u||e[p],v?v+d:d,n,i);else if(p!=="parseTransform"){On(p,d);continue}y||(p in a?x.push(p,0,a[p]):typeof e[p]=="function"?x.push(p,2,e[p]()):x.push(p,1,u||e[p])),o.push(p)}}T&&Yi(this)},render:function(e,t){if(t.tween._time||!Gn())for(var s=t._pt;s;)s.r(e,s.d),s=s._next;else t.styles.revert()},get:rt,aliases:Ze,getSetter:function(e,t,s){var n=Ze[t];return n&&n.indexOf(",")<0&&(t=n),t in at&&t!==Ce&&(e._gsap.x||rt(e,"x"))?s&&Er===s?t==="scale"?El:Rl:(Er=s||{})&&(t==="scale"?Ml:Bl):e.style&&!Dn(e.style[t])?Tl:~t.indexOf("-")?zl:Hn(e,t)},core:{_removeProperty:zt,_getMatrix:Yn}};xe.utils.checkPrefix=Wt;xe.core.getStyleSaver=to;(function(r,e,t,s){var n=ke(r+","+e+","+t,function(i){at[i]=1});ke(e,function(i){Be.units[i]="deg",io[i]=1}),Ze[n[13]]=r+","+e,ke(s,function(i){var o=i.split(":");Ze[o[1]]=n[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ke("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){Be.units[r]="px"});xe.registerPlugin(lo);var q=xe.registerPlugin(lo)||xe;q.core.Tween;const $r={sm:{fontSize:12,sidePadding:8,verticalSpacing:4,borderRadius:8},md:{fontSize:14,sidePadding:12,verticalSpacing:8,borderRadius:10},lg:{fontSize:16,sidePadding:16,verticalSpacing:12,borderRadius:12}};function At(r){if(r!=null)return`${r}px`}function co(r){return Math.max(0,Math.min(1,r))}function uo(r){if(!r)return;const e=r.trim();if(/^#([0-9a-fA-F]{3}){1,2}$/.test(e)){let s=0,n=0,i=0;return e.length===4?(s=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16)):(s=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16)),{r:s,g:n,b:i}}const t=e.match(/^rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i);if(t)return{r:Number(t[1]),g:Number(t[2]),b:Number(t[3])}}function rn(r){const t=Math.max(0,Math.min(255,Math.round(r))).toString(16);return t.length===1?`0${t}`:t}function po(r){if(r)return`#${rn(r.r)}${rn(r.g)}${rn(r.b)}`}function Vr(r,e=.12){const t=uo(r);if(!t)return r;const s=co(e);return po({r:t.r+(255-t.r)*s,g:t.g+(255-t.g)*s,b:t.b+(255-t.b)*s})}function Fl(r,e=.12){const t=uo(r);if(!t)return r;const s=co(e);return po({r:t.r*(1-s),g:t.g*(1-s),b:t.b*(1-s)})}function Ul(r,e){if(r)switch(e){case"gradient":{const t=Vr(r,.08)||r,s=Fl(r,.12)||r;return`linear-gradient(180deg, ${t} 0%, ${s} 100%)`}case"bubble":return`radial-gradient(120% 120% at 10% 0%, ${Vr(r,.14)||r} 0%, ${r} 60%)`;default:return r}}function Wl(r,e){return{...r?$r[r]:$r.md,...void 0}}function Hl(r,e){const t=Wl(r.size),s=r.color,n=Ul(r.bgColor??(e==null?void 0:e.fallbackColor),r.bgType),i=At(r.fontSize??t.fontSize),o=At(r.borderRadius??t.borderRadius),a=At(r.verticalPadding),l=At(r.sidePadding);let u;r.borderWidth&&r.borderWidth>0?u=`${r.borderWidth}px solid ${r.borderColor||(e==null?void 0:e.fallbackColor)||"currentColor"}`:r.borderColor&&!r.borderWidth&&(u=`1px solid ${r.borderColor}`);const d=r.width?r.width+(r.borderWidth??0):void 0,f=r.height?r.height+(r.borderWidth??0):void 0,g={color:s,background:n,fontSize:i,borderRadius:o,width:At(d),height:At(f),padding:a&&l?`${a} ${l}`:void 0,border:u},h={};for(const m in g){const p=g[m];p!=null&&p!==""&&(h[m]=String(p))}return h}const jl=["innerHTML"],ql=["src"],Gl=c.defineComponent({__name:"ChatCollapsed",props:{element:{},toggleChat:{type:Function}},setup(r){const e=r,t=c.computed(()=>e.element),s=c.computed(()=>Hl(t.value)),n=c.computed(()=>{const a=e.element.logo;return a?a.includes("<svg"):!1}),i=c.computed(()=>{const a=e.element.logo;return a&&a.replace('width="',"").replace('height="',"").replace('"',""),a}),o=c.computed(()=>{var l;const a=(l=e.element.icon)==null?void 0:l.size;return a?a+"px":void 0});return(a,l)=>(c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle([s.value,{"box-sizing":"content-box"}]),class:"chat-collapsed tw:transition-all tw:flex tw:cursor-pointer tw:items-center tw:justify-center",onClick:l[0]||(l[0]=(...u)=>a.toggleChat&&a.toggleChat(...u))},[n.value?(c.openBlock(),c.createElementBlock("span",{key:0,class:"hs-collapsed-logo tw:transition-all",innerHTML:i.value,style:c.normalizeStyle({width:o.value,height:o.value})},null,12,jl)):i.value?(c.openBlock(),c.createElementBlock("img",{key:1,class:"tw:transition-all",src:i.value,alt:"logo",style:c.normalizeStyle({width:o.value,height:o.value})},null,12,ql)):c.createCommentVNode("",!0)],4))}}),Fe={schema:{version:"1.0",required:["settings","texts","sections"]},settings:{bgChat:"#434345",gapMessageLine:12,fontFamily:"MacPaw Fixel",borderRadius:12,launchView:"closed",letterSpacing:0,logo:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.22048 12.26L8.71413 11.1293C9.1535 10.1231 9.94426 9.32209 10.9307 8.88424L12.2895 8.28107C12.7215 8.08931 12.7215 7.46082 12.2895 7.26906L10.9731 6.68472C9.9613 6.23561 9.15637 5.40496 8.72453 4.3644L8.22447 3.15941C8.0389 2.71224 7.42105 2.71224 7.23548 3.15941L6.7354 4.36439C6.30357 5.40496 5.49861 6.23561 4.48686 6.68472L3.17045 7.26906C2.73843 7.46082 2.73843 8.08931 3.17045 8.28107L4.5293 8.88424C5.51569 9.32209 6.30646 10.1231 6.7458 11.1293L7.23948 12.26C7.42924 12.6946 8.03069 12.6946 8.22048 12.26ZM13.1632 15.0131L13.302 14.6949C13.5495 14.1275 13.9953 13.6758 14.5515 13.4287L14.9792 13.2386C15.2106 13.1358 15.2106 12.7996 14.9792 12.6969L14.5754 12.5174C14.0049 12.264 13.5511 11.7955 13.3078 11.2089L13.1653 10.865C13.0659 10.6254 12.7346 10.6254 12.6352 10.865L12.4927 11.2089C12.2494 11.7955 11.7957 12.264 11.2251 12.5174L10.8213 12.6969C10.59 12.7996 10.59 13.1358 10.8213 13.2386L11.249 13.4287C11.8053 13.6758 12.251 14.1275 12.4985 14.6949L12.6374 15.0131C12.739 15.246 13.0615 15.246 13.1632 15.0131Z" fill="currentColor"/></svg>',fontWeight:500,lineHeight:1.2,loader:"dots",globalRoundingRadius:!0,theme:"light",mode:"collapsed",position:"bottomRight",size:{width:435,height:450},offset:{x:24,y:36}},texts:{welcomeMessage:`🖖 Hi there — I’m your assistant for finding documents, tracking access, and making sense of your files.
19
19
 
20
20
  How can I help?`,widgetTitle:"HyperShadow",launchIssueTitle:"There was a glitch",launchIssueText:"Please restart the chat, it should work",issueText:"Something went wrong, please restart",reconnectText:"Connection issue, trying to reconnect",inputPlaceholder:"Type question",disableInputText:"Can’t send a message while processing the previous request",disclaimer:"AI-Copilot makes mistakes, please don’t consider 100% accurate",typingLoader:"AI-Co-pilot typing",sendButton:"Send"},sections:{colapsed:{color:"#fff",bgColor:"#7D52F4",width:56,height:56,borderRadius:50,borderWidth:8,borderColor:"rgba(29, 29, 31, 0.90)",logo:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.22048 12.26L8.71413 11.1293C9.1535 10.1231 9.94426 9.32209 10.9307 8.88424L12.2895 8.28107C12.7215 8.08931 12.7215 7.46082 12.2895 7.26906L10.9731 6.68472C9.9613 6.23561 9.15637 5.40496 8.72453 4.3644L8.22447 3.15941C8.0389 2.71224 7.42105 2.71224 7.23548 3.15941L6.7354 4.36439C6.30357 5.40496 5.49861 6.23561 4.48686 6.68472L3.17045 7.26906C2.73843 7.46082 2.73843 8.08931 3.17045 8.28107L4.5293 8.88424C5.51569 9.32209 6.30646 10.1231 6.7458 11.1293L7.23948 12.26C7.42924 12.6946 8.03069 12.6946 8.22048 12.26ZM13.1632 15.0131L13.302 14.6949C13.5495 14.1275 13.9953 13.6758 14.5515 13.4287L14.9792 13.2386C15.2106 13.1358 15.2106 12.7996 14.9792 12.6969L14.5754 12.5174C14.0049 12.264 13.5511 11.7955 13.3078 11.2089L13.1653 10.865C13.0659 10.6254 12.7346 10.6254 12.6352 10.865L12.4927 11.2089C12.2494 11.7955 11.7957 12.264 11.2251 12.5174L10.8213 12.6969C10.59 12.7996 10.59 13.1358 10.8213 13.2386L11.249 13.4287C11.8053 13.6758 12.251 14.1275 12.4985 14.6949L12.6374 15.0131C12.739 15.246 13.0615 15.246 13.1632 15.0131Z" fill="currentColor"/></svg>',icon:{showIcon:!0,size:18}},warnings:{launchIssue:{warningStyle:"faded",content:{icon:{showIcon:!0,src:'<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21.76 16.42L15.36 4.9C14.5 3.35 13.31 2.5 12 2.5C10.69 2.5 9.5 3.35 8.64 4.9L2.24 16.42C1.43 17.89 1.34 19.3 1.99 20.41C2.64 21.52 3.92 22.13 5.6 22.13H18.4C20.08 22.13 21.36 21.52 22.01 20.41C22.66 19.3 22.57 17.88 21.76 16.42ZM12.71 18.21C12.66 18.25 12.61 18.29 12.56 18.33C12.5 18.37 12.44 18.4 12.38 18.42C12.32 18.45 12.26 18.47 12.19 18.48C12.13 18.49 12.06 18.5 12 18.5C11.94 18.5 11.87 18.49 11.8 18.48C11.74 18.47 11.68 18.45 11.62 18.42C11.56 18.4 11.5 18.37 11.44 18.33C11.39 18.29 11.34 18.25 11.29 18.21C11.11 18.02 11 17.76 11 17.5C11 17.24 11.11 16.98 11.29 16.79C11.34 16.75 11.39 16.71 11.44 16.67C11.5 16.63 11.56 16.6 11.62 16.58C11.68 16.55 11.74 16.53 11.8 16.52C11.93 16.49 12.07 16.49 12.19 16.52C12.26 16.53 12.32 16.55 12.38 16.58C12.44 16.6 12.5 16.63 12.56 16.67C12.61 16.71 12.66 16.75 12.71 16.79C12.89 16.98 13 17.24 13 17.5C13 17.76 12.89 18.02 12.71 18.21ZM11.25 9.5C11.25 9.09 11.59 8.75 12 8.75C12.41 8.75 12.75 9.09 12.75 9.5V14.5C12.75 14.91 12.41 15.25 12 15.25C11.59 15.25 11.25 14.91 11.25 14.5V9.5Z" fill="currentColor"/></svg>',color:"#FFCC77",size:24},bgColor:"#8A7045",verticalSpacing:4,sidePadding:8,headlineColor:"#f9c97c",color:"#fff",headlineTextSize:12,subTextSize:12},resetButton:{bgType:"filled",showType:"both",borderRadius:12,size:"md",color:"#2e2e30",bgColor:"#e5e1dd",fontSize:12,icon:{showIcon:!0,src:'<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.793 1.83301H5.20634C2.77967 1.83301 1.33301 3.27967 1.33301 5.70634V11.2863C1.33301 13.7197 2.77967 15.1663 5.20634 15.1663H10.7863C13.213 15.1663 14.6597 13.7197 14.6597 11.293V5.70634C14.6663 3.27967 13.2197 1.83301 10.793 1.83301ZM7.99967 12.6663C6.80634 12.6663 5.87301 12.073 5.23967 11.4863V11.9597C5.23967 12.233 5.01301 12.4597 4.73967 12.4597C4.46634 12.4597 4.23967 12.233 4.23967 11.9597V10.1263C4.23967 9.85301 4.46634 9.62634 4.73967 9.62634H6.39301C6.66634 9.62634 6.89301 9.85301 6.89301 10.1263C6.89301 10.3997 6.66634 10.6263 6.39301 10.6263H5.79301C6.28634 11.1197 7.05301 11.6663 7.99967 11.6663C9.74634 11.6663 11.1663 10.2463 11.1663 8.49967C11.1663 8.22634 11.393 7.99967 11.6663 7.99967C11.9397 7.99967 12.1663 8.22634 12.1663 8.49967C12.1663 10.7997 10.2997 12.6663 7.99967 12.6663ZM12.1663 6.85967C12.1663 6.87967 12.1663 6.89967 12.1663 6.91301C12.1597 6.98634 12.1397 7.05301 12.1063 7.11301C12.073 7.17301 12.0263 7.22634 11.9663 7.27301C11.9197 7.30634 11.8663 7.33301 11.8063 7.35301C11.7597 7.36634 11.713 7.37301 11.6663 7.37301H10.0463C9.77301 7.37301 9.54634 7.14634 9.54634 6.87301C9.54634 6.59967 9.77301 6.37301 10.0463 6.37301H10.5997C10.0663 5.87967 9.20634 5.33301 8.01301 5.33301C6.26634 5.33301 4.84634 6.75301 4.84634 8.49967C4.84634 8.77301 4.61967 8.99967 4.34634 8.99967C4.07301 8.99967 3.83301 8.77301 3.83301 8.49967C3.83301 6.19967 5.69967 4.33301 7.99967 4.33301C9.43301 4.33301 10.4863 4.95301 11.1663 5.54634V5.03967C11.1663 4.76634 11.393 4.53967 11.6663 4.53967C11.9397 4.53967 12.1663 4.76634 12.1663 5.03967V6.85967Z" fill="currentColor"/></svg>',color:"#2e2e30",size:16}}},connectionIssue:{warningStyle:"faded",content:{icon:{showIcon:!0,src:`<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
21
21
  <path d="M21.76 16.42L15.36 4.9C14.5 3.35 13.31 2.5 12 2.5C10.69 2.5 9.49998 3.35 8.63998 4.9L2.23998 16.42C1.42998 17.89 1.33998 19.3 1.98998 20.41C2.63998 21.52 3.91998 22.13 5.59998 22.13H18.4C20.08 22.13 21.36 21.52 22.01 20.41C22.66 19.3 22.57 17.88 21.76 16.42ZM11.25 9.5C11.25 9.09 11.59 8.75 12 8.75C12.41 8.75 12.75 9.09 12.75 9.5V14.5C12.75 14.91 12.41 15.25 12 15.25C11.59 15.25 11.25 14.91 11.25 14.5V9.5ZM12.71 18.21C12.66 18.25 12.61 18.29 12.56 18.33C12.5 18.37 12.44 18.4 12.38 18.42C12.32 18.45 12.26 18.47 12.19 18.48C12.13 18.49 12.06 18.5 12 18.5C11.94 18.5 11.87 18.49 11.8 18.48C11.74 18.47 11.68 18.45 11.62 18.42C11.56 18.4 11.5 18.37 11.44 18.33C11.39 18.29 11.34 18.25 11.29 18.21C11.11 18.02 11 17.76 11 17.5C11 17.24 11.11 16.98 11.29 16.79C11.34 16.75 11.39 16.71 11.44 16.67C11.5 16.63 11.56 16.6 11.62 16.58C11.68 16.55 11.74 16.53 11.8 16.52C11.93 16.49 12.07 16.49 12.19 16.52C12.26 16.53 12.32 16.55 12.38 16.58C12.44 16.6 12.5 16.63 12.56 16.67C12.61 16.71 12.66 16.75 12.71 16.79C12.89 16.98 13 17.24 13 17.5C13 17.76 12.89 18.02 12.71 18.21Z" fill="#FFCC77"/>
@@ -23,4 +23,62 @@ How can I help?`,widgetTitle:"HyperShadow",launchIssueTitle:"There was a glitch"
23
23
  <path d="M4 4.02667C3.06667 5.08667 2.5 6.48 2.5 8C2.5 11.3133 5.18667 14 8.5 14C11.8133 14 14.5 11.3133 14.5 8C14.5 4.68667 11.8133 2 8.5 2C8.02667 2 7.56667 2.05333 7.12667 2.16" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
24
24
  </svg>`,color:"#FFF",size:16}}},disableInputIssue:{warningStyle:"gradient",content:{bgColor:"#8A7045",color:"#fff",icon:{showIcon:!0,src:`<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
25
25
  <path d="M4 4.02667C3.06667 5.08667 2.5 6.48 2.5 8C2.5 11.3133 5.18667 14 8.5 14C11.8133 14 14.5 11.3133 14.5 8C14.5 4.68667 11.8133 2 8.5 2C8.02667 2 7.56667 2.05333 7.12667 2.16" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
26
- </svg>`,color:"#FFF"}}}},loader:{typingLoader:{color:"#8E8E8F",bgColor:"#2F2F31"},completeStep:{verticalSpacing:8,fontSize:12,color:"#8E8E8F",icon:{showIcon:!0,src:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.4" d="M7.99967 14.6666C11.6816 14.6666 14.6663 11.6818 14.6663 7.99992C14.6663 4.31802 11.6816 1.33325 7.99967 1.33325C4.31778 1.33325 1.33301 4.31802 1.33301 7.99992C1.33301 11.6818 4.31778 14.6666 7.99967 14.6666Z" fill="currentColor"></path><path d="M7.05297 10.3867C6.91964 10.3867 6.79297 10.3334 6.69964 10.2401L4.81297 8.3534C4.61964 8.16007 4.61964 7.84007 4.81297 7.64673C5.0063 7.4534 5.3263 7.4534 5.51964 7.64673L7.05297 9.18007L10.4796 5.7534C10.673 5.56007 10.993 5.56007 11.1863 5.7534C11.3796 5.94673 11.3796 6.26673 11.1863 6.46006L7.4063 10.2401C7.31297 10.3334 7.1863 10.3867 7.05297 10.3867Z" fill="currentColor"></path></svg>',color:"#8E8E8F",size:16}},activeStep:{fontSize:12,color:"#FFF",icon:{showIcon:!0,src:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 4.02667C2.56667 5.08667 2 6.48 2 8C2 11.3133 4.68667 14 8 14C11.3133 14 14 11.3133 14 8C14 4.68667 11.3133 2 8 2C7.52667 2 7.06667 2.05333 6.62667 2.16" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>',color:"#fff",size:16}}},top:{params:{size:"md",bgColor:"#5E4AC6",bgStyle:"gradient",paddingVertical:8,paddingHorizontal:8,chipStyle:"filled",buttonStyle:"filled"},chipWidgetTitle:{color:"#fff",bgColor:"#5E4AC6",borderRadius:12,showType:"both"},buttons:{color:"#BBBBBD",bgColor:"#2F2F31",borderRadius:12,showType:"both"}},inside:{params:{size:"md",sidePadding:8,verticalPadding:8},welcomeMessage:{color:"#fff",bgType:"gradient",fontSize:14,size:"md",borderRadius:12,borderWidth:1,bgColor:"#595959"},messageUser:{color:"#F9F8F8",bgColor:"#F8F8F933",bgType:"bubble",borderRadius:12,fontSize:14,size:"md",borderWidth:1,borderColor:"#595959"},messageBot:{color:"#fff",bgColor:"#5E4AC6",bgType:"plain",borderRadius:12,fontSize:14,size:"md",borderWidth:1,borderColor:"#595959"},activeSnippet:{params:{buttonType:"both",buttonStyle:"filled",size:"md"},element:{color:"#fff",bgColor:"#373739",borderRadius:12,borderWidth:1,borderColor:"#595959",verticalSpacing:8,sidePadding:8,fontSize:12},headerChip:{color:"#fff",bgColor:"#69696A",borderRadius:12,size:"md",fontSize:12,bgType:"filled"},propertyColor:"rgba(255, 255, 255, 0.30)",valueColor:"#fff",yesButton:{color:"#fff",bgColor:"#12A150",borderRadius:12,fontSize:12},noButton:{color:"#fff",bgColor:"#C20E4D",borderRadius:12,fontSize:12}}},bottom:{params:{size:"md",disclaimerShow:!1},inputSend:{size:"md",color:"#EEECEC",bgColor:"#373739",borderColor:"#595959",borderWidth:1,inputStyle:"inside",bgType:"plain",paddingVertical:8,paddingHorizontal:8,sidePadding:8,fontSize:12,borderRadius:8},btnSend:{color:"#1E1E1E",bgColor:"rgba(255, 255, 255, 0.50)",showType:"both",borderWidth:1,borderColor:"#595959",borderRadius:50,size:"md",fontSize:12,icon:{showIcon:!0,src:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 2.56445C9.01973 2.56449 9.03453 2.57164 9.04395 2.58105L13.5967 7.13379C13.606 7.14324 13.6133 7.15811 13.6133 7.17773C13.6132 7.19738 13.606 7.21226 13.5967 7.22168L13.5898 7.22754L13.584 7.23438C13.5865 7.23164 13.5864 7.23284 13.5801 7.23535C13.5732 7.23801 13.5633 7.24018 13.5527 7.24023C13.5431 7.24023 13.5351 7.23862 13.5293 7.23633C13.524 7.23419 13.5171 7.22992 13.5088 7.22168L9 2.71289L4.49121 7.22168C4.48176 7.23107 4.46699 7.23828 4.44727 7.23828C4.42752 7.23826 4.41275 7.23109 4.40332 7.22168C4.3939 7.21226 4.38676 7.19747 4.38672 7.17773C4.38672 7.15801 4.39393 7.14324 4.40332 7.13379L8.95605 2.58105C8.9655 2.57167 8.98027 2.56445 9 2.56445Z" stroke="currentColor"/><path d="M9 2.68994C9.01306 2.68994 9.02868 2.69518 9.04297 2.70947C9.05726 2.72376 9.0625 2.73938 9.0625 2.75244V15.3745C9.0625 15.3875 9.0571 15.4032 9.04297 15.4175C9.02868 15.4318 9.01306 15.437 9 15.437C8.98694 15.437 8.97132 15.4318 8.95703 15.4175C8.9429 15.4032 8.9375 15.3875 8.9375 15.3745V2.75244C8.9375 2.73938 8.94274 2.72376 8.95703 2.70947C8.97132 2.69518 8.98694 2.68994 9 2.68994Z" fill="currentColor" stroke="currentColor"/></svg>',color:"#fff",size:18}},disclaimer:{color:"#fff",bgColor:"#FF0000",height:20,fontSize:12}}}};class Kt{canApply(e){return e.fromVersion===this.appliesTo.from&&e.toVersion===this.appliesTo.to}rollback(e){return{success:!1,errors:[`Rollback not implemented for strategy: ${this.name}`],warnings:[],modified:!1}}createSuccessResult(e,t=[]){return{success:!0,data:e,errors:[],warnings:t,modified:!0}}createErrorResult(e,t){return{success:!1,data:t,errors:e,warnings:[],modified:!1}}}class tl extends Kt{constructor(){super(...arguments),this.name="AddSettingsFieldsV1toV2",this.description="Добавляет новые поля loader, buttonStyle, buttonType в settings",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[],n={...t.settings,loader:Ve.settings.loader};return s.push(`Добавлены поля loader: '${n.loader}'`),this.createSuccessResult({...t,settings:n},s)}catch(t){return this.createErrorResult([`Ошибка при добавлении полей settings: ${t}`])}}}class sl extends Kt{constructor(){super(...arguments),this.name="AddChipStyleV1toV2",this.description="Добавляет поле chipStyle в sections.top.params",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.top.params={...t.sections.top.params,chipStyle:Ve.sections.top.params.chipStyle},s.push(`Добавлено поле chipStyle: '${Ve.sections.top.params.chipStyle}' в sections.top.params`),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении chipStyle: ${t}`])}}}class nl extends Kt{constructor(){super(...arguments),this.name="AddMessageBgTypeV1toV2",this.description="Добавляет поле bgType в messageUser и messageBot",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.inside.messageUser={...t.sections.inside.messageUser,bgType:Ve.sections.inside.messageUser.bgType},t.sections.inside.messageBot={...t.sections.inside.messageBot,bgType:Ve.sections.inside.messageBot.bgType},s.push("Добавлены поля bgType для messageUser и messageBot"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении bgType для сообщений: ${t}`])}}}class il extends Kt{constructor(){super(...arguments),this.name="AddActionButtonsV1toV2",this.description="Добавляет кнопки aprooveButton и rejectButton в inside секцию",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.inside={...t.sections.inside},s.push("Добавлены кнопки aprooveButton и rejectButton"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении кнопок действий: ${t}`])}}}class rl extends Kt{constructor(){super(...arguments),this.name="EnhanceInputSendV1toV2",this.description="Добавляет borderStyle, inputStyle, bgType в inputSend",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.bottom.inputSend={...t.sections.bottom.inputSend,borderStyle:{borderColor:Ve.sections.bottom.inputSend.borderColor,borderWidth:Ve.sections.bottom.inputSend.borderWidth},inputStyle:Ve.sections.bottom.inputSend.inputStyle,bgType:Ve.sections.bottom.inputSend.bgType},s.push("Расширен inputSend с новыми полями borderStyle, inputStyle, bgType"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при расширении inputSend: ${t}`])}}}class ol extends Kt{constructor(){super(...arguments),this.name="AddBottomElementsV1toV2",this.description="Добавляет warningAlert и disclaimer в bottom секцию",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.bottom={...t.sections.bottom},s.push("Добавлены warningAlert и disclaimer в bottom секцию"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении элементов bottom: ${t}`])}}}new tl,new sl,new nl,new il,new rl,new ol;const Fe=i=>typeof i=="string"&&i.length>=0,li=i=>typeof i=="number"&&!Number.isNaN(i),Ut=(i,e)=>typeof i=="string"&&e.includes(i);function al(i){var u,d,p,h,m,g,f;const e=[];if(!i||typeof i!="object")return{isValid:!1,errors:["config: must be an object"]};const t=i.settings||{};li(t.letterSpacing)||t.letterSpacing===void 0||e.push("settings.letterSpacing: number"),Fe(t.bgChat)||t.bgChat===void 0||e.push("settings.bgChat: string"),Fe(t.fontFamily)||t.fontFamily===void 0||e.push("settings.fontFamily: string"),li(t.fontWeight)||t.fontWeight===void 0||e.push("settings.fontWeight: number"),t.logo===void 0||Fe(t.logo)||e.push("settings.logo: string (svg or url)"),t.widgetTitle===void 0||Fe(t.widgetTitle)||e.push("settings.widgetTitle: string"),t.position===void 0&&e.push("settings.position: undefined");const s=i.texts||{};s.launchIssueTitle===void 0||Fe(s.launchIssueTitle)||e.push("texts.launchIssueTitle: string"),s.issueText===void 0||Fe(s.issueText)||e.push("texts.issueText: string"),s.widgetTitle===void 0||Fe(s.widgetTitle)||e.push("texts.widgetTitle: string"),s.hideText===void 0||Fe(s.hideText)||e.push("texts.hideText: string");const n=((u=i.sections)==null?void 0:u.top)||{},r=n.params||{};r.size===void 0||Ut(r.size,["sm","md","lg"])||e.push("sections.top.params.size: sm|md|lg"),r.chipStyle===void 0||Ut(r.chipStyle,["filled","outlined","invisible"])||e.push("sections.top.params.chipStyle: filled|outlined|invisible"),r.buttonStyle===void 0||Ut(r.buttonStyle,["filled","outlined","invisible"])||e.push("sections.top.params.buttonStyle: filled|outlined|invisible"),r.buttonType===void 0||Ut(r.buttonType,["icon","text","both"])||e.push("sections.top.params.buttonType: icon|text|both"),((d=n==null?void 0:n.chipWidgetTitle)==null?void 0:d.color)===void 0||Fe((p=n==null?void 0:n.chipWidgetTitle)==null?void 0:p.color)||e.push("sections.top.chipWidgetTitle.color: string"),((h=n==null?void 0:n.chipWidgetTitle)==null?void 0:h.bgColor)===void 0||Fe((m=n==null?void 0:n.chipWidgetTitle)==null?void 0:m.bgColor)||e.push("sections.top.chipWidgetTitle.bgColor: string"),(n==null?void 0:n.btnClose)===void 0||typeof(n==null?void 0:n.btnClose)=="object"||e.push("sections.top.btnClose: object");const a=(((g=i.sections)==null?void 0:g.bottom)||{}).params||{};a.size===void 0||Ut(a.size,["sm","md","lg"])||e.push("sections.bottom.params.size: sm|md|lg");const c=((f=i.sections)==null?void 0:f.warnings)||{};return c.launchIssue===void 0||typeof c.launchIssue=="object"||e.push("sections.warnings.launchIssue: object"),c.connectionIssue===void 0||typeof c.connectionIssue=="object"||e.push("sections.warnings.connectionIssue: object"),{isValid:e.length===0,errors:e}}class ll{constructor(e){ue(this,"config");this.config=e}getFlatRecursiveConfig(e,t="",s={}){for(const n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const r=e[n],o=t?`${t}.${n}`:n;r!==null&&typeof r=="object"&&!Array.isArray(r)?this.getFlatRecursiveConfig(r,o,s):s[o]=r}return s}get configFlat(){return this.getFlatRecursiveConfig(this.config)}getConfig(){return this.config}getKey(e){return this.configFlat[e]??void 0}getKeyObject(e){return e.split(".").reduce((t,s)=>t&&t[s]!==void 0?t[s]:"undefined",this.config)}}const on={sm:"tw:h-[20px] tw:px-1.5 tw:py-0 tw:[font-size:10px] [&_svg]:tw:size-4",md:"tw:h-[24px] tw:px-2 tw:py-1 tw:text-xs [&_svg]:tw:size-4.5",lg:"tw:h-[28px] tw:px-3 tw:py-1 tw:text-sm [&_svg]:tw:size-5"};function an(i){return i==="sm"||i==="md"||i==="lg"?on[i]:on.md}function Mn(i,e){try{const s={top:"sections.top.params.size",inside:"sections.inside.params.size",bottom:"sections.bottom.params.size"}[e],n=i==null?void 0:i.getKey(s);return an(n)}catch{return on.md}}const cl=["aria-expanded"],ul=["innerHTML"],dl=["src","alt"],fl={key:2},gl={key:0,class:"tw:flex tw:items-center tw:w-full tw:justify-end tw:gap-1.5 header-buttons"},pl=["width","height"],hl={key:1},ml=["width","height"],yl={key:1},wl=l.defineComponent({__name:"ChatHeader",props:{isChatOpen:{type:Boolean},toggleChat:{type:Function},configDesignClass:{},sectionBorderRadius:{},mainBorderRadius:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},restartChat:{type:Function}},setup(i){const e=i,t=l.computed(()=>e.configDesignClass.getKeyObject("sections.top.params")),s=l.computed(()=>Mn(e.configDesignClass,"top")),n=l.computed(()=>{let f="";switch(t.value.bgStyle){case"gradient":f=`linear-gradient(180deg, ${t.value.bgColor} 0%, ${e.configDesignClass.getKey("settings.bgChat")} 100%)`;break;case"filled":f=t.value.bgColor;break;case"invisible":f="transparent";break;default:f="transparent";break}return{borderTopLeftRadius:`${e.mainBorderRadius}px`,borderTopRightRadius:`${e.mainBorderRadius}px`,background:f,padding:`${t.value.paddingVertical}px ${t.value.paddingHorizontal}px`}}),r=l.computed(()=>{const f=e.configDesignClass.getKey("texts.widgetTitle"),y=e.configDesignClass.getKey("settings.widgetTitle");return f&&f!=="undefined"?f:y&&y!=="undefined"?y:""}),o=l.computed(()=>e.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")),a=l.computed(()=>{const f=e.configDesignClass.getKey("sections.top.params.chipStyle"),y=e.configDesignClass.getKey("sections.top.chipWidgetTitle.color"),_=e.configDesignClass.getKey("sections.top.chipWidgetTitle.bgColor"),b=f==="outlined",w=f==="filled",C=f==="invisible";return{borderRadius:e.configDesignClass.getKey("settings.globalRoundingRadius")?e.sectionBorderRadius.borderRadius:e.configDesignClass.getKey("sections.top.chipWidgetTitle.borderRadius")+"px",color:y,border:b?`1px solid ${_}`:"none",padding:C?"0px":null,"background-color":w?_:"transparent"}}),c=l.computed(()=>e.configDesignClass.getKey("sections.top.buttons.showType")),u=l.computed(()=>{const f=e.configDesignClass.getKey("sections.top.buttons.showType");return f&&f!=="undefined"?f:"icon"}),d=l.computed(()=>{const f=e.configDesignClass.getKeyObject("sections.top.buttons");return{color:(f==null?void 0:f.color)??"#fff",bgColor:(f==null?void 0:f.bgColor)??"#000"}}),p=l.computed(()=>{const f=e.configDesignClass.getKey("sections.top.params.buttonStyle"),y=f==="outlined",_=f==="invisible",b=d.value;return{borderRadius:e.configDesignClass.getKey("settings.globalRoundingRadius")?e.sectionBorderRadius.borderRadius:e.configDesignClass.getKey("sections.top.buttons.borderRadius")+"px",color:b.color,border:y?`1px solid ${b.bgColor}`:"none",padding:_?"0px":null,"background-color":_?"transparent":f==="filled"?b.bgColor:"transparent"}}),h=l.computed(()=>{const f=e.configDesignClass.getKey("texts.hideText");return f&&f!=="undefined"?f:"Hide"}),m=l.computed(()=>e.configDesignClass.getKey("settings.logo").includes("<svg")),g=l.computed(()=>e.configDesignClass.getKey("settings.logo"));return(f,y)=>(l.openBlock(),l.createElementBlock("div",{onClick:y[0]||(y[0]=(..._)=>f.toggleChat&&f.toggleChat(..._)),class:"chat-action tw:transition-all tw:cursor-pointer tw:flex tw:items-center tw:w-full tw:justify-start tw:overflow-hidden",style:l.normalizeStyle(n.value),role:"button","aria-expanded":f.isChatOpen},[l.createVNode(l.unref(ot),{class:l.normalizeClass(["tw:transition-all tw:flex tw:items-center tw:shadow-none header-title",s.value]),variant:o.value,size:f.configDesignClass.getKey("sections.top.params.size"),style:l.normalizeStyle(a.value),type:"button","aria-label":r.value,title:r.value},{default:l.withCtx(()=>[m.value&&f.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["header-logo",f.configDesignClass.getKey("sections.top.params.size")]),innerHTML:g.value},null,10,ul)):g.value&&f.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(l.openBlock(),l.createElementBlock("img",{key:1,src:g.value,alt:f.configDesignClass.getKey("sections.top.iconWidget.alt"),class:l.normalizeClass(f.configDesignClass.getKey("sections.top.params.size")==="sm"?"tw:w-3 tw:h-3":"tw:w-4 tw:h-4")},null,10,dl)):l.createCommentVNode("",!0),f.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="icon"?(l.openBlock(),l.createElementBlock("span",fl,l.toDisplayString(r.value),1)):l.createCommentVNode("",!0)]),_:1},8,["class","variant","size","style","aria-label","title"]),f.isChatOpen?(l.openBlock(),l.createElementBlock("div",gl,[l.createVNode(l.unref(ot),{variant:c.value,class:l.normalizeClass(["tw:transition-all",[s.value]]),size:f.configDesignClass.getKey("sections.top.params.size"),style:l.normalizeStyle(p.value),type:"button","aria-label":h.value,title:h.value,onClick:l.withModifiers(f.restartChat,["stop"])},{default:l.withCtx(()=>[u.value!=="text"?(l.openBlock(),l.createElementBlock("svg",{key:0,width:f.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",height:f.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y[1]||(y[1]=[l.createElementVNode("path",{d:"M10.7935 1.33333H5.20683C2.78016 1.33333 1.3335 2.77999 1.3335 5.20666V10.7867C1.3335 13.22 2.78016 14.6667 5.20683 14.6667H10.7868C13.2135 14.6667 14.6602 13.22 14.6602 10.7933V5.20666C14.6668 2.77999 13.2202 1.33333 10.7935 1.33333ZM8.00016 12.1667C6.80683 12.1667 5.8735 11.5733 5.24016 10.9867V11.46C5.24016 11.7333 5.0135 11.96 4.74016 11.96C4.46683 11.96 4.24016 11.7333 4.24016 11.46V9.62666C4.24016 9.35333 4.46683 9.12666 4.74016 9.12666H6.3935C6.66683 9.12666 6.8935 9.35333 6.8935 9.62666C6.8935 9.89999 6.66683 10.1267 6.3935 10.1267H5.7935C6.28683 10.62 7.0535 11.1667 8.00016 11.1667C9.74683 11.1667 11.1668 9.74666 11.1668 8C11.1668 7.72666 11.3935 7.5 11.6668 7.5C11.9402 7.5 12.1668 7.72666 12.1668 8C12.1668 10.3 10.3002 12.1667 8.00016 12.1667ZM12.1668 6.35999C12.1668 6.37999 12.1668 6.39999 12.1668 6.41333C12.1602 6.48666 12.1402 6.55333 12.1068 6.61333C12.0735 6.67333 12.0268 6.72666 11.9668 6.77333C11.9202 6.80666 11.8668 6.83333 11.8068 6.85333C11.7602 6.86666 11.7135 6.87333 11.6668 6.87333H10.0468C9.7735 6.87333 9.54683 6.64666 9.54683 6.37333C9.54683 6.1 9.7735 5.87333 10.0468 5.87333H10.6002C10.0668 5.38 9.20683 4.83333 8.0135 4.83333C6.26683 4.83333 4.84683 6.25333 4.84683 8C4.84683 8.27333 4.62016 8.5 4.34683 8.5C4.0735 8.5 3.8335 8.27333 3.8335 8C3.8335 5.7 5.70016 3.83333 8.00016 3.83333C9.4335 3.83333 10.4868 4.45333 11.1668 5.04666V4.53999C11.1668 4.26666 11.3935 4.03999 11.6668 4.03999C11.9402 4.03999 12.1668 4.26666 12.1668 4.53999V6.35999Z",fill:"currentColor"},null,-1)]),8,pl)):l.createCommentVNode("",!0),u.value!=="icon"?(l.openBlock(),l.createElementBlock("span",hl," Restart ")):l.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"]),l.createVNode(l.unref(ot),{variant:c.value,class:l.normalizeClass(["tw:transition-all",[s.value]]),size:f.configDesignClass.getKey("sections.top.params.size"),style:l.normalizeStyle(p.value),type:"button","aria-label":h.value,title:h.value,onClick:l.withModifiers(f.toggleChat,["stop"])},{default:l.withCtx(()=>[u.value!=="text"?(l.openBlock(),l.createElementBlock("svg",{key:0,width:f.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",height:f.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},y[2]||(y[2]=[l.createElementVNode("path",{d:"M10.7935 1.33337H5.20683C2.78016 1.33337 1.3335 2.78004 1.3335 5.20671V10.7867C1.3335 13.22 2.78016 14.6667 5.20683 14.6667H10.7868C13.2135 14.6667 14.6602 13.22 14.6602 10.7934V5.20671C14.6668 2.78004 13.2202 1.33337 10.7935 1.33337ZM12.3335 10.9334C12.3335 11.9334 11.9335 12.3334 10.9335 12.3334H8.40016C7.40016 12.3334 7.00016 11.9334 7.00016 10.9334V9.73337C7.00016 8.73337 7.40016 8.33337 8.40016 8.33337H10.9335C11.9335 8.33337 12.3335 8.73337 12.3335 9.73337V10.9334Z",fill:"currentColor"},null,-1)]),8,ml)):l.createCommentVNode("",!0),u.value!=="icon"?(l.openBlock(),l.createElementBlock("span",yl,l.toDisplayString(h.value),1)):l.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"])])):l.createCommentVNode("",!0)],12,cl))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bl=i=>typeof i<"u";function vl(i){return JSON.parse(JSON.stringify(i))}function Mr(i,e,t,s={}){var n,r,o;const{clone:a=!1,passive:c=!1,eventName:u,deep:d=!1,defaultValue:p,shouldEmit:h}=s,m=l.getCurrentInstance(),g=t||(m==null?void 0:m.emit)||((n=m==null?void 0:m.$emit)==null?void 0:n.bind(m))||((o=(r=m==null?void 0:m.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(m==null?void 0:m.proxy));let f=u;e||(e="modelValue"),f=f||`update:${e.toString()}`;const y=w=>a?typeof a=="function"?a(w):vl(w):w,_=()=>bl(i[e])?y(i[e]):p,b=w=>{h?h(w)&&g(f,w):g(f,w)};if(c){const w=_(),C=l.ref(w);let v=!1;return l.watch(()=>i[e],k=>{v||(v=!0,C.value=y(k),l.nextTick(()=>v=!1))}),l.watch(C,k=>{!v&&(k!==i[e]||d)&&b(k)},{deep:d}),C}else return l.computed({get(){return _()},set(w){b(w)}})}const _l=l.defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=i,n=Mr(t,"modelValue",e,{passive:!0,defaultValue:t.defaultValue});return(r,o)=>l.withDirectives((l.openBlock(),l.createElementBlock("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>l.isRef(n)?n.value=a:null),style:{resize:"none"},"data-slot":"textarea",class:l.normalizeClass(l.unref(cn)("tw:md:text-sm",t.class))},null,2)),[[l.vModelText,l.unref(n)]])}}),Cl={key:0,class:"tw:transition-all tw:w-full"},xl={key:0,class:"svg-icon"},Sl=["innerHTML"],kl={key:1},Tl=l.defineComponent({__name:"ChatBottom",props:{isProduction:{type:Boolean},configDesignClass:{},messageText:{},sendMessage:{type:Function},sectionBorderRadius:{},classSize:{},isInputDisabled:{type:Boolean},showReconnectNotice:{type:Boolean},restartChat:{type:Function},isStreaming:{type:Boolean}},emits:["update:messageText","trace"],setup(i,{emit:e}){const t=i,s=()=>{t.sendMessage()},r=Mr(t,"messageText",e,{passive:!0}),o=l.computed(()=>{var g;return((g=t.configDesignClass)==null?void 0:g.getKey("sections.bottom.inputSend.inputStyle"))==="stacked"}),a=l.computed(()=>Mn(t.configDesignClass,"bottom")),c=l.computed(()=>{const g=t.configDesignClass.getKey("texts.topWarningText");return g&&g!=="undefined"?g:""}),u=l.computed(()=>{const g=t.configDesignClass.getKey("texts.disableInputText");return g&&g!=="undefined"?g:""}),d=l.computed(()=>t.configDesignClass.getKey("sections.bottom.inputSend.size")),p=l.computed(()=>t.isInputDisabled&&u.value?u.value:c.value||t.configDesignClass.getKey("texts.reconnectText")||"Reconnecting..."),h=l.computed(()=>t.configDesignClass.getKey("sections.bottom.btnSend.icon.showIcon")?t.configDesignClass.getKey("sections.bottom.btnSend.icon.src"):null),m=l.computed(()=>{const g=t.configDesignClass.getKey("texts.disclaimerText"),f=t.configDesignClass.getKey("texts.disclaimer"),y=g&&g!=="undefined"?g:f,b=!!t.configDesignClass.getKey("sections.bottom.params.disclaimerShow");return y&&y!=="undefined"&&b?y:""});return(g,f)=>(l.openBlock(),l.createElementBlock("div",null,[g.isProduction?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"tw:flex tw:flex-row tw:gap-2",style:l.normalizeStyle({padding:o.value?"0":"0 "+g.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px"})},[l.createVNode(l.unref(ot),{type:"button",style:l.normalizeStyle({backgroundColor:"#27272A",borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"}),class:"tw:flex-shrink-1 tw:flex-grow-1","aria-label":"Copy last message",title:"Copy last message",onClick:f[0]||(f[0]=l.withModifiers(y=>g.$emit("trace",{action:"copyLast"}),["stop"]))},{default:l.withCtx(()=>f[3]||(f[3]=[l.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l.createElementVNode("path",{opacity:"0.4",d:"M17.5 5.83464V14.168C17.5 16.668 16.25 18.3346 13.3333 18.3346H7.5C8.50833 17.5763 9.16667 16.3596 9.16667 15.0013C9.16667 12.7013 7.3 10.8346 5 10.8346C4.05833 10.8346 3.19167 11.143 2.5 11.668V5.83464C2.5 3.33464 3.75 1.66797 6.66667 1.66797H13.3333C16.25 1.66797 17.5 3.33464 17.5 5.83464Z",fill:"white"}),l.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.084 3.125C12.4292 3.125 12.709 3.40482 12.709 3.75V5.41667C12.709 5.98816 13.1792 6.45833 13.7507 6.45833H15.4173C15.7625 6.45833 16.0423 6.73816 16.0423 7.08333C16.0423 7.42851 15.7625 7.70833 15.4173 7.70833H13.7507C12.4888 7.70833 11.459 6.67851 11.459 5.41667V3.75C11.459 3.40482 11.7388 3.125 12.084 3.125Z",fill:"white"}),l.createElementVNode("path",{d:"M5.00065 10.832C2.70065 10.832 0.833984 12.6987 0.833984 14.9987C0.833984 17.2987 2.70065 19.1654 5.00065 19.1654C7.30065 19.1654 9.16732 17.2987 9.16732 14.9987C9.16732 12.6987 7.30065 10.832 5.00065 10.832ZM4.30065 16.057C4.50899 16.2654 4.50899 16.607 4.30065 16.8237C4.19232 16.932 4.05899 16.982 3.91733 16.982C3.77566 16.982 3.64231 16.932 3.53398 16.8237L2.09233 15.382C1.88399 15.1737 1.88399 14.832 2.09233 14.6153L3.53398 13.1737C3.74231 12.9654 4.08399 12.9654 4.30065 13.1737C4.50899 13.382 4.50899 13.7237 4.30065 13.9403L3.24233 14.9987L4.30065 16.057ZM7.90066 15.382L6.45898 16.8237C6.35065 16.932 6.21733 16.982 6.07566 16.982C5.93399 16.982 5.80064 16.932 5.69231 16.8237C5.48397 16.6154 5.48397 16.2737 5.69231 16.057L6.75066 14.9987L5.69231 13.9403C5.48397 13.732 5.48397 13.3904 5.69231 13.1737C5.90064 12.9654 6.24232 12.9654 6.45898 13.1737L7.90066 14.6153C8.10899 14.832 8.10899 15.1654 7.90066 15.382Z",fill:"white"})],-1),l.createTextVNode(" Log last function call ")])),_:1,__:[3]},8,["style"]),l.createVNode(l.unref(ot),{type:"button",class:"tw:flex-shrink-1 tw:flex-grow-1",style:l.normalizeStyle({backgroundColor:"#27272A",borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"}),"aria-label":"Copy all",title:"Copy all",onClick:f[1]||(f[1]=l.withModifiers(y=>g.$emit("trace",{action:"copyAll"}),["stop"]))},{default:l.withCtx(()=>f[4]||(f[4]=[l.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l.createElementVNode("path",{opacity:"0.4",d:"M17.5 5.83464V14.168C17.5 16.668 16.25 18.3346 13.3333 18.3346H6.66667C3.75 18.3346 2.5 16.668 2.5 14.168V5.83464C2.5 3.33464 3.75 1.66797 6.66667 1.66797H13.3333C16.25 1.66797 17.5 3.33464 17.5 5.83464Z",fill:"white"}),l.createElementVNode("path",{d:"M15.4173 7.70833H13.7507C12.484 7.70833 11.459 6.68333 11.459 5.41667V3.75C11.459 3.40833 11.7423 3.125 12.084 3.125C12.4257 3.125 12.709 3.40833 12.709 3.75V5.41667C12.709 5.99167 13.1757 6.45833 13.7507 6.45833H15.4173C15.759 6.45833 16.0423 6.74167 16.0423 7.08333C16.0423 7.425 15.759 7.70833 15.4173 7.70833Z",fill:"white"}),l.createElementVNode("path",{d:"M8.33255 14.7922C8.17422 14.7922 8.01589 14.7339 7.89089 14.6089L6.22422 12.9422C5.98255 12.7006 5.98255 12.3005 6.22422 12.0589L7.89089 10.3922C8.13255 10.1505 8.53255 10.1505 8.77422 10.3922C9.01588 10.6339 9.01588 11.0339 8.77422 11.2756L7.54922 12.5005L8.77422 13.7255C9.01588 13.9672 9.01588 14.3672 8.77422 14.6089C8.64922 14.7339 8.49088 14.7922 8.33255 14.7922Z",fill:"white"}),l.createElementVNode("path",{d:"M11.6659 14.7922C11.5076 14.7922 11.3492 14.7339 11.2242 14.6089C10.9826 14.3672 10.9826 13.9672 11.2242 13.7255L12.4492 12.5005L11.2242 11.2756C10.9826 11.0339 10.9826 10.6339 11.2242 10.3922C11.4659 10.1505 11.8659 10.1505 12.1076 10.3922L13.7742 12.0589C14.0159 12.3005 14.0159 12.7006 13.7742 12.9422L12.1076 14.6089C11.9826 14.7339 11.8242 14.7922 11.6659 14.7922Z",fill:"white"})],-1),l.createTextVNode(" Log all function calls ")])),_:1,__:[4]},8,["style"])],4)),l.createElementVNode("div",{class:"tw:transition-all tw:flex tw:flex-col tw:items-center tw:relative tw:mt-2",style:l.normalizeStyle({padding:o.value?"0":"0 "+g.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px"})},[g.showReconnectNotice||c.value||g.isInputDisabled?(l.openBlock(),l.createElementBlock("div",Cl,[l.createVNode($s,{class:"tw:rounded-b-none tw:mx-0 tw:flex tw:justify-center tw:item s-center tw:px-2 tw:py-2",type:"reconnecting",configDesignClass:g.configDesignClass,headlineText:p.value,restartChat:g.restartChat,warningElement:g.isInputDisabled?g.configDesignClass.getKeyObject("sections.warnings.disableInputIssue"):g.configDesignClass.getKeyObject("sections.warnings.reconnectIssue")},null,8,["configDesignClass","headlineText","restartChat","warningElement"])])):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(["message-input tw:transition-all tw:flex-1 tw:w-full tw:p-0 tw:gap-[10px] tw:flex",[g.classSize,o.value?"tw:flex-col tw:items-stretch tw:justify-between":" tw:items-end",d.value==="sm"?"tw:items-center":""]]),style:l.normalizeStyle({...o.value?{borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px",borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}:{borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"},"background-color":g.configDesignClass.getKey("sections.bottom.inputSend.bgColor"),"margin-bottom":o.value?"0px":g.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px",border:o.value?"none":`${g.configDesignClass.getKey("sections.bottom.inputSend.borderWidth")}px solid ${g.configDesignClass.getKey("sections.bottom.inputSend.borderColor")}`})},[(l.openBlock(),l.createBlock(l.unref(_l),{class:l.normalizeClass(["tw:transition-all",["tw:w-full tw:outline-none tw:border-0 focus:tw:outline-none",o.value?"tw:h-auto rounded-none":"h-full"]]),placeholder:g.configDesignClass.getKey("texts.inputPlaceholder")||"Type question",rows:d.value==="sm"?1:d.value==="md"?2:3,key:g.configDesignClass.getKey("sections.bottom.inputSend.color"),modelValue:l.unref(r),"onUpdate:modelValue":f[2]||(f[2]=y=>l.isRef(r)?r.value=y:null),onKeyup:l.withKeys(l.withModifiers(s,["exact"]),["enter"]),style:l.normalizeStyle({color:g.configDesignClass.getKey("sections.bottom.inputSend.color"),fontSize:g.configDesignClass.getKey("sections.bottom.inputSend.fontSize")+"px",lineHeight:g.configDesignClass.getKey("settings.lineHeight"),padding:g.configDesignClass.getKey("sections.bottom.inputSend.paddingVertical")+"px "+g.configDesignClass.getKey("sections.bottom.inputSend.paddingHorizontal")+"px",height:g.configDesignClass.getKey("sections.bottom.inputSend.height")+"px"})},null,8,["placeholder","rows","modelValue","onKeyup","class","style"])),l.createElementVNode("div",{class:l.normalizeClass(o.value?"tw:flex tw:flex-row-reverse tw:justify-between tw:items-center tw:gap-2 tw:pl-3":"tw:flex tw:ml-auto"),style:l.normalizeStyle({marginBottom:g.configDesignClass.getKey("sections.bottom.inputSend.paddingVertical")+"px",marginRight:g.configDesignClass.getKey("sections.bottom.inputSend.paddingHorizontal")+"px"})},[l.createVNode(l.unref(ot),{class:l.normalizeClass(["tw:transition-all",["btn-send tw:bg-transparent tw:shadow-none tw:flex-shrink-0 tw:items-center tw:gap-1",g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="icon"?"tw:rounded-full":a.value,o.value?"tw:self-end":"tw:ml-auto",{"tw:opacity-50":l.unref(r).trim()===""||g.isInputDisabled},{"tw:px-3 tw:py-2":g.configDesignClass.getKey("sections.bottom.btnSend.size")==="md"},{"tw:px-2 tw:py-1":g.configDesignClass.getKey("sections.bottom.btnSend.size")==="sm"},{"tw:px-4 tw:py-3":g.configDesignClass.getKey("sections.bottom.btnSend.size")==="lg"}]]),size:g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="icon"?"icon":g.configDesignClass.getKey("sections.bottom.params.size"),onClick:s,style:l.normalizeStyle({...g.configDesignClass.getKey("sections.bottom.btnSend.type")==="icon"?{borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.btnSend.borderRadius")+"px"}:{borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.bottom.btnSend.borderRadius")+"px"},color:g.configDesignClass.getKey("sections.bottom.btnSend.color"),"background-color":g.configDesignClass.getKey("sections.bottom.btnSend.bgColor"),fontSize:g.configDesignClass.getKey("sections.bottom.btnSend.fontSize")+"px",border:g.configDesignClass.getKey("sections.bottom.btnSend.borderWidth")+"px solid "+g.configDesignClass.getKey("sections.bottom.btnSend.borderColor")}),disabled:g.isInputDisabled},{default:l.withCtx(()=>[h.value?(l.openBlock(),l.createElementBlock("div",xl,[l.createElementVNode("div",{innerHTML:h.value,style:l.normalizeStyle({color:g.configDesignClass.getKey("sections.bottom.btnSend.color"),width:g.configDesignClass.getKey("sections.bottom.btnSend.icon.size")+"px",height:g.configDesignClass.getKey("sections.bottom.btnSend.icon.size")+"px"})},null,12,Sl)])):l.createCommentVNode("",!0),g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="text"||g.configDesignClass.getKey("sections.bottom.btnSend.showType")==="both"?(l.openBlock(),l.createElementBlock("span",kl,l.toDisplayString(g.configDesignClass.getKey("texts.sendButton")),1)):l.createCommentVNode("",!0)]),_:1},8,["size","class","style","disabled"]),o.value&&m.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"tw:text-[11px] tw:text-white/50 tw:flex tw:items-center",style:l.normalizeStyle({...g.sectionBorderRadius,fontSize:g.configDesignClass.getKey("sections.bottom.disclaimer.fontSize")+"px",height:g.configDesignClass.getKey("sections.bottom.disclaimer.height")+"px",color:g.configDesignClass.getKey("sections.bottom.disclaimer.color")})},l.toDisplayString(m.value),5)):l.createCommentVNode("",!0)],6)],6),!o.value&&m.value?(l.openBlock(),l.createElementBlock("div",{key:1,class:"tw:px-2 tw:text-white/50 tw:mb-2 tw:flex tw:items-center tw:justify-center",style:l.normalizeStyle({...g.sectionBorderRadius,fontSize:g.configDesignClass.getKey("sections.bottom.disclaimer.fontSize")+"px",height:g.configDesignClass.getKey("sections.bottom.disclaimer.height")+"px",color:g.configDesignClass.getKey("sections.bottom.disclaimer.color")})},l.toDisplayString(m.value),5)):l.createCommentVNode("",!0)],4)]))}});var ee=(i=>(i.Collapsed="collapsed",i.EmptyChat="empty",i.Messages="messages",i.ActionSnippet="action_snippet",i.LaunchIssue="launch_issue",i.ConnectionIssue="connection_issue",i.ReconnectingAttempt="reconnecting_attempt",i.InputBlocked="input_blocked",i.ActionLoader="action_loader",i.TracesMessage="traces_message",i.TracesWithMeta="traces_with_meta",i))(ee||{}),Rr=(i=>(i.UserMessage="Give me some action",i))(Rr||{});class Ie{base(e){return{isChatOpen:!0,isChatActive:!0,messages:[],isConnectionError:!1,isProcessError:!1,isReconnectError:!1,isInputDisabled:!1,showWelcome:!1,blockSocket:!0,traceLastShown:!1,...e}}}class zl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.Collapsed)}getState(){return this.base({isChatOpen:!1})}}class ci extends Ie{constructor(){super(...arguments);ue(this,"type",ee.EmptyChat)}getState(){return this.base({showWelcome:!0,messages:[]})}}class Ml extends Ie{constructor(){super(...arguments);ue(this,"type",ee.Messages)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=(s==null?void 0:s.botMessageText)??"What sort of action do you want?";return this.base({showWelcome:!0,messages:[{text:n,isUser:!0},{text:r,isUser:!1},{text:"Sort of action",isUser:!0}]})}}class Rl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.ActionSnippet)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action";return this.base({showWelcome:!1,messages:[{text:n,isUser:!0},{snippet:{sequence:"38952101547613990",id:"38496103561174822",data:{actionCancel:{text:"Cancel"},actionConfirm:{text:"Confirm"},title:{text:"Do you really want to get the available contacts list?"}}},isUser:!1}]})}}class Bl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.LaunchIssue)}getState(){return this.base({isConnectionError:!0})}}class El extends Ie{constructor(){super(...arguments);ue(this,"type",ee.ConnectionIssue)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isProcessError:!0,showWelcome:r,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Pl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.ReconnectingAttempt)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isReconnectError:!0,showReconnectNotice:!0,showWelcome:r,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Dl extends Ie{constructor(){super(...arguments);ue(this,"type",ee.InputBlocked)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isReconnectError:!0,showReconnectNotice:!0,isInputDisabled:!0,showWelcome:r,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Al extends Ie{constructor(){super(...arguments);ue(this,"type",ee.ActionLoader)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action";return this.base({showWelcome:!0,messages:[{text:n,isUser:!0}]})}}class Ll extends Ie{constructor(){super(...arguments);ue(this,"type",ee.TracesMessage)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"],o=[{text:n,isUser:!0},{text:r[0],isUser:!1,isSystem:!0,type:"trace"},{text:r[1],isUser:!1,isSystem:!0,type:"trace"},{text:r[2],isUser:!1,isSystem:!0,type:"trace"}];return this.base({showWelcome:!0,messages:o})}}class Ol extends Ie{constructor(){super(...arguments);ue(this,"type",ee.TracesWithMeta)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",r=(s==null?void 0:s.traceSteps)??["Step One","API Schema Requested","API Call Conducted","API Call Conducted"],o=[{text:n,isUser:!0},{text:r[0],isUser:!1,isSystem:!0,type:"trace",meta:{step:1}},{text:r[1],isUser:!1,isSystem:!0,type:"trace",meta:{step:2,json:{status:"requested",endpoint:"/v1/schema"}}},{text:r[2],isUser:!1,isSystem:!0,type:"trace",meta:{step:3,json:{status:"ok",code:200}}},{text:r[3],isUser:!1,isSystem:!0,type:"trace"}];return this.base({showWelcome:!0,messages:o})}}class Vl{static create(e){switch(e){case ee.Collapsed:case"collapsed":return new zl;case ee.EmptyChat:case"empty":return new ci;case ee.Messages:case"messages":return new Ml;case ee.ActionSnippet:case"action_snippet":return new Rl;case ee.LaunchIssue:case"launch_issue":return new Bl;case ee.ConnectionIssue:case"connection_issue":return new El;case ee.ReconnectingAttempt:case"reconnecting_attempt":return new Pl;case ee.InputBlocked:case"input_blocked":return new Dl;case ee.ActionLoader:case"action_loader":return new Al;case ee.TracesMessage:case"traces_message":return new Ll;case ee.TracesWithMeta:case"traces_with_meta":return new Ol;default:return new ci}}}class ui{static getScenarioFromUrl(){try{return new URLSearchParams(window.location.search).get("scenario")??void 0}catch{return}}static getState(e,t,s){return{...Vl.create(e).getState(t,s),...s??{}}}}const Il={key:"message",class:"tw:transition-all message-text"},Kl=l.defineComponent({__name:"MessageBot",props:{message:{},welcomeColor:{},color:{},bgColor:{},size:{},bgType:{},fontSize:{},borderWidth:{},borderColor:{},configDesignClass:{}},setup(i){const e=i,t=l.computed(()=>{switch(e.size){case"sm":return e.bgType==="bubble"?" tw:min-h-[25px] tw:py-1 tw:px-2 ":"";case"md":return e.bgType==="bubble"?" tw:min-h-[33px] tw:py-2 tw:px-3":"";case"lg":return e.bgType==="bubble"?" tw:min-h-[40px] tw:py-3 tw:px-4":""}});return(s,n)=>{var r,o,a;return l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["message-item tw:transition-all tw:text-white tw:w-fit tw:whitespace-break-spaces tw:transition-colors tw:duration-[250ms] tw:ease-[ease]",[t.value,{"item-primary":!((r=s.message.chunk)!=null&&r.start)}]]),style:l.normalizeStyle({color:(o=s.message.chunk)!=null&&o.start?"#2F2F31":s.color,"background-color":(a=s.message.chunk)!=null&&a.start?"transparent":s.bgType==="bubble"?s.bgColor:"transparent","font-size":s.fontSize+"px",border:s.bgType==="bubble"?s.borderWidth+"px solid "+s.borderColor:"none"})},[l.createElementVNode("div",Il,l.toDisplayString(s.message.text),1)],6)}}}),Br=(i,e)=>{const t=i.__vccOpts||i;for(const[s,n]of e)t[s]=n;return t},Nl=Br(Kl,[["__scopeId","data-v-121f4dbb"]]),Fl=l.defineComponent({__name:"MessageUser",props:{message:{},isFirst:{type:Boolean},color:{},bgColor:{},borderWidth:{},borderColor:{},fontSize:{},size:{},bgType:{},configDesignClass:{}},setup(i){const e=i,t=l.computed(()=>{switch(e.size){case"sm":return e.bgType==="bubble"?" tw:min-h-[25px] tw:py-1 tw:px-2 ":"";case"md":return e.bgType==="bubble"?" tw:min-h-[33px] tw:py-2 tw:px-3":"";case"lg":return e.bgType==="bubble"?" tw:min-h-[40px] tw:py-3 tw:px-4":""}}),s=l.computed(()=>e.bgType==="bubble"?e.borderWidth+"px solid "+e.borderColor:"none");return(n,r)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["message-item tw:transition-all tw:w-fit tw:whitespace-break-spaces item-secondary tw:ml-auto",[t.value,{"tw:mt-[5px] !tw:bg-transparent":n.isFirst}]]),style:l.normalizeStyle({color:n.color,"background-color":n.bgType==="bubble"?n.bgColor:"transparent",border:s.value,"font-size":n.fontSize+"px"})},l.toDisplayString(n.message.text),7))}}),Wl=["innerHTML"],$l={key:"dots",class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Ul={key:"dots-pulse",class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Hl={key:"circle-pulse",class:"circle-pulse"},jl={key:"circle-pulse-1",class:"circle-pulse-1"},Gl=["data-text"],Zl=l.defineComponent({__name:"LoadingMessage",props:{loader:{},text:{},message:{},configDesignClass:{},paused:{type:Boolean}},setup(i){const e=i,t=l.ref(null),s=l.ref(!1);let n=null;const r=()=>{const a=t.value;if(!a)return;const c=a.closest("li");if(!c)return;const u=c.nextElementSibling;if(!u){s.value=!1;return}const d=u.getAttribute("data-component")==="MessageBot"||typeof u.matches=="function"&&u.matches('[data-component="MessageBot"]')||!!u.querySelector('[data-component="MessageBot"]');s.value=d};l.onMounted(()=>{l.nextTick(r);const a=t.value,c=a==null?void 0:a.closest("ul");c&&(n=new MutationObserver(()=>r()),n.observe(c,{childList:!0,subtree:!0}))}),l.onBeforeUnmount(()=>{n&&n.disconnect()}),l.watch(()=>e.text,()=>l.nextTick(r));const o=l.computed(()=>!!e.paused||s.value);return(a,c)=>(l.openBlock(),l.createElementBlock("li",{key:"loading",ref_key:"rootRef",ref:t,class:"message-text-loading tw:flex tw:items-center tw:justify-start tw:gap-3"},[l.createVNode(l.Transition,{name:"fade",mode:"out-in"},{default:l.withCtx(()=>[o.value?(l.openBlock(),l.createElementBlock("div",{key:"complete-step-icon",innerHTML:a.configDesignClass.getKey("sections.loader.completeStep.icon.src"),class:"svg-inherit",style:l.normalizeStyle({color:a.configDesignClass.getKey("sections.loader.completeStep.icon.color"),height:a.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px",width:a.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px"})},null,12,Wl)):!a.loader||a.loader==="dots"?(l.openBlock(),l.createElementBlock("div",$l,c[0]||(c[0]=[l.createElementVNode("div",{class:"loading-dot tw:rounded-full"},null,-1),l.createElementVNode("div",{class:"loading-dot loading-dot-delay-1 tw:rounded-full"},null,-1),l.createElementVNode("div",{class:"loading-dot loading-dot-delay-2 tw:rounded-full"},null,-1),l.createElementVNode("div",{class:"loading-dot loading-dot-delay-3 tw:rounded-full"},null,-1)]))):a.loader==="dots-pulse"?(l.openBlock(),l.createElementBlock("div",Ul,c[1]||(c[1]=[l.createElementVNode("span",{class:"dot-pulse dot-1"},null,-1),l.createElementVNode("span",{class:"dot-pulse dot-2"},null,-1),l.createElementVNode("span",{class:"dot-pulse dot-3"},null,-1)]))):a.loader==="circle-pulse"?(l.openBlock(),l.createElementBlock("div",Hl,c[2]||(c[2]=[l.createElementVNode("span",{class:"ring ring-1"},null,-1),l.createElementVNode("span",{class:"ring ring-2"},null,-1)]))):a.loader==="circle-pulse-1"?(l.openBlock(),l.createElementBlock("div",jl,c[3]||(c[3]=[l.createElementVNode("span",{class:"ripple r1"},null,-1),l.createElementVNode("span",{class:"ripple r2"},null,-1),l.createElementVNode("span",{class:"center"},null,-1)]))):l.createCommentVNode("",!0)]),_:1}),l.createVNode(l.Transition,{name:"fade-text",mode:"out-in"},{default:l.withCtx(()=>{var u,d,p,h;return[(l.openBlock(),l.createElementBlock("span",{class:l.normalizeClass(["tw:transition-all tw:text-sm",{"typing-shimmer":!o.value}]),key:a.text,"data-text":(u=a.message)!=null&&u.text?(d=a.message)==null?void 0:d.text:a.text,style:l.normalizeStyle({color:a.configDesignClass.getKey("sections.loader.typingLoader.color")})},l.toDisplayString(o.value?"Thinking completed":(p=a.message)!=null&&p.text?(h=a.message)==null?void 0:h.text:a.text),15,Gl))]}),_:1})],512))}}),di=Br(Zl,[["__scopeId","data-v-bb55e057"]]),ql=["data-height"],Yl={class:"tw:transition-all tw:flex tw:flex-col tw:items-center tw:gap-1 tw:px-1"},Xl=["innerHTML"],Jl={class:"tw:transition-all tw:flex tw:items-center tw:gap-2"},Ql=l.defineComponent({__name:"MessageSystem",props:{message:{},welcomeColor:{},color:{},bgColor:{},size:{},configDesignClass:{},activeMessage:{type:Boolean},bgType:{},isLast:{type:Boolean},traceLastShown:{type:Boolean},index:{}},setup(i){const e=i,t=l.computed(()=>e.index===3&&e.traceLastShown||e.isLast),s=l.computed(()=>{switch(e.size){case"sm":return"tw:text-xs";case"md":return"tw:text-xs";case"lg":return"tw:text-base"}}),n=l.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.src"):e.configDesignClass.getKey("sections.loader.completeStep.icon.src")),r=l.computed(()=>e.configDesignClass.getKey("sections.loader.activeStep.color")),o=l.computed(()=>e.configDesignClass.getKey("sections.loader.completeStep.color")),a=l.computed(()=>t.value?r.value:o.value),c=l.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.color"):e.configDesignClass.getKey("sections.loader.completeStep.icon.color")),u=l.computed(()=>Mn(e.configDesignClass,"inside"));return(d,p)=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["message-system tw:text-left tw:relative tw:w-full tw:text-white tw:w-fit tw:whitespace-break-spaces tw:transition-colors tw:duration-[250ms] tw:ease-[ease]",s.value]),"data-height":d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing"),style:l.normalizeStyle({"padding-top":d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing")+"px"})},[l.createElementVNode("hr",{class:"tw:w-[1px] tw:bg-white tw:opacity-20 tw:absolute",style:l.normalizeStyle([{display:"none"},{height:d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing")-2+"px",left:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")/2+4+"px",top:"0px"}])},null,4),l.createElementVNode("div",{key:"message",class:l.normalizeClass(["message-text flex tw:transition-all tw:space-between tw:gap-3 tw:flex tw:items-center tw:align-center",{"tw:mb-0":d.isLast}])},[l.createElementVNode("div",Yl,[l.createElementVNode("div",{innerHTML:n.value,class:l.normalizeClass(["svg-inherit",{"tw:animate-spin":t.value}]),style:l.normalizeStyle({color:c.value,height:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px",width:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px"})},null,14,Xl)]),l.createElementVNode("div",Jl,[d.message.meta?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("p",{key:0,style:l.normalizeStyle({color:a.value,"font-size":d.configDesignClass.getKey("sections.loader.completeStep.fontSize")+"px"})},l.toDisplayString(d.message.text),5)),d.message.meta?(l.openBlock(),l.createBlock(l.unref(ot),{key:1,style:l.normalizeStyle({color:e.activeMessage?"rgba(255, 255, 255, 0.60)":"#3F3F46",background:e.activeMessage?"#2F2F31":"#ECEDEE",border:e.activeMessage?"none":"1px solid #fff"}),class:l.normalizeClass(["tw:flex tw:items-center tw:gap-1 tw:rounded-md tw:shadow-xs",u.value])},{default:l.withCtx(()=>[p[0]||(p[0]=l.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[l.createElementVNode("path",{d:"M10.7935 1.33301H5.20683C2.78016 1.33301 1.3335 2.77967 1.3335 5.20634V10.7863C1.3335 13.2197 2.78016 14.6663 5.20683 14.6663H10.7868C13.2135 14.6663 14.6602 13.2197 14.6602 10.793V5.20634C14.6668 2.77967 13.2202 1.33301 10.7935 1.33301ZM6.62683 8.84634C6.1735 9.52634 5.54683 10.0797 4.8135 10.4463C4.74683 10.4797 4.66683 10.4997 4.5935 10.4997C4.40683 10.4997 4.2335 10.3997 4.14683 10.2263C4.02016 9.97967 4.12016 9.67967 4.3735 9.55301C4.9535 9.26634 5.44683 8.82634 5.80016 8.29301C5.92016 8.11301 5.92016 7.88634 5.80016 7.70634C5.44016 7.17301 4.94683 6.73301 4.3735 6.44634C4.12016 6.32634 4.02016 6.02634 4.14683 5.77301C4.26683 5.52634 4.56683 5.42634 4.8135 5.55301C5.54683 5.91967 6.1735 6.47301 6.62683 7.15301C6.9735 7.66634 6.9735 8.33301 6.62683 8.84634ZM11.3335 10.4997H8.66683C8.3935 10.4997 8.16683 10.273 8.16683 9.99967C8.16683 9.72634 8.3935 9.49967 8.66683 9.49967H11.3335C11.6068 9.49967 11.8335 9.72634 11.8335 9.99967C11.8335 10.273 11.6068 10.4997 11.3335 10.4997Z",fill:"currentColor"})],-1)),l.createElementVNode("span",null,l.toDisplayString(d.message.text),1)]),_:1,__:[0]},8,["style","class"])):l.createCommentVNode("",!0)])],2)],14,ql))}});class ec{constructor(e,t){ue(this,"structure");ue(this,"options");ue(this,"html","");this.structure=e,this.options={escape:(t==null?void 0:t.escape)??!0,whitelistStyles:(t==null?void 0:t.whitelistStyles)??["color","background","borderColor","borderRadius"]}}build(e){return this.html=this.renderLayout(this.structure.layout,this.structure.bindings||{},e),this}buildStyle(e){return Object.entries(e).forEach(([t,s])=>{const n=new RegExp(`data-visual="${this.escapeRegExp(t)}"`,"g"),r=Object.entries(s.style).map(([o,a])=>`${o}: ${a};`).join("");this.html=this.html.replace(n,`class="${s.class}" style="${r}"`)}),this}result(){return this.html}renderLayout(e,t,s){let n=e;return t&&(Object.entries(t).forEach(([r,o])=>{var c,u;const a=new RegExp(`\\{${this.escapeRegExp(r)}\\}`,"g");if(o.type==="text"){const d=(c=s==null?void 0:s[r])==null?void 0:c.text;n=n.replace(a,this.safeText(typeof d=="string"||typeof d=="number"?String(d):""));return}if(o.type==="button"){const d=(u=s==null?void 0:s[r])==null?void 0:u.text;n=n.replace(a,this.safeText(typeof d=="string"||typeof d=="number"?String(d):""));return}if(o.type==="repeater"){const d=Array.isArray(s==null?void 0:s[r])?s[r]:[],p=o.layout||"",h=o.bindings||{},m=d.map(g=>this.renderLayout(p,h,g)).join("");n=n.replace(a,m);return}}),n=n.replace(/style=\"([^\"]*)\"/g,(r,o)=>{const a=o.split(";").map(c=>c.trim()).filter(Boolean).filter(c=>{const[u]=c.split(":");return this.options.whitelistStyles.includes((u||"").trim())}).join("; ");return`style="${this.safeAttr(a)}"`})),n}safeText(e){return this.options.escape?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/'/g,"&#39;"):e}safeAttr(e){return this.safeText(e)}escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}const tc={layout:'<div class="tw:flex tw:flex-col" data-visual="container"><div><span data-visual="headerChip">Action</span></div><div class="tw:flex tw:mb-2 tw:mt-2 tw:text-xs"><div data-visual="title">{title}</div></div><div class="tw:flex tw:gap-1"><button data-cb="confirm" data-visual="actionConfirm" class="tw:flex-1">{actionConfirm}</button><button data-cb="cancel" data-visual="actionCancel" class="tw:flex-1">{actionCancel}</button></div></div>',bindings:{title:{type:"text"},actionConfirm:{type:"button"},actionCancel:{type:"button"}}};function sc(i){const e=l.computed(()=>{const w=i==null?void 0:i.getKeyObject("sections.inside.activeSnippet"),C=i==null?void 0:i.getKeyObject("sections.activeSnippet"),v=w&&w!=="undefined"?w:C;return v&&v!=="undefined"?v:{}}),t=(w,C)=>{if(!C)return w;switch(C){case"outlined":return{color:w.background,background:"transparent",border:`1px solid ${w.borderColor||w.background}`};case"invisible":return{color:w.background,background:"transparent"};default:return w}},s=l.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.bgColor")),n=l.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.color")),r=l.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.sidePadding")),o=l.computed(()=>i==null?void 0:i.getKey("sections.inside.activeSnippet.element.verticalSpacing")),a=l.computed(()=>(i==null?void 0:i.getKey("sections.inside.activeSnippet.element.borderWidth"))+"px solid "+(i==null?void 0:i.getKey("sections.inside.activeSnippet.element.borderColor"))),c=l.computed(()=>{var w,C,v,k,z,x,T,L;return{color:(C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.color,background:(k=(v=e.value)==null?void 0:v.headerChip)==null?void 0:k.bgColor,borderColor:(x=(z=e.value)==null?void 0:z.headerChip)==null?void 0:x.borderColor,bgColor:(L=(T=e.value)==null?void 0:T.headerChip)==null?void 0:L.bgColor}}),u=l.computed(()=>{var w,C;return t(c.value,(C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.bgType)}),d=l.computed(()=>{var w,C,v,k;return{...u.value,"border-radius":i!=null&&i.getKey("settings.globalRoundingRadius")?Xt(i,2).borderRadius:((C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.borderRadius)+"px","font-size":((k=(v=e.value)==null?void 0:v.headerChip)==null?void 0:k.fontSize)+"px"}}),p=l.computed(()=>{var w;return(w=e.value)==null?void 0:w.propertyColor}),h=l.computed(()=>{var w;return(w=e.value)==null?void 0:w.valueColor}),m=l.computed(()=>{var w,C,v,k;return{color:(C=(w=e.value)==null?void 0:w.yesButton)==null?void 0:C.color,background:(k=(v=e.value)==null?void 0:v.yesButton)==null?void 0:k.bgColor}}),g=l.computed(()=>{var w,C,v,k;return{color:(C=(w=e.value)==null?void 0:w.noButton)==null?void 0:C.color,background:(k=(v=e.value)==null?void 0:v.noButton)==null?void 0:k.bgColor}}),f=l.computed(()=>{const w=i==null?void 0:i.getKey("sections.inside.activeSnippet.params.size"),C=i==null?void 0:i.getKey("sections.inside.params.size");return an(w!=="undefined"?w:C)}),y=l.computed(()=>{const w=i==null?void 0:i.getKey("sections.inside.activeSnippet.headerChip.size");return an(w)}),_=w=>{const C=(w.id||"").toLowerCase(),k=C==="confirm"||C==="yes"?m.value:g.value,z=i==null?void 0:i.getKey("sections.inside.activeSnippet.params.buttonStyle");return t(k,z)},b=l.computed(()=>i!=null&&i.getKey("settings.globalRoundingRadius")?Xt(i,8):{borderRadius:(i==null?void 0:i.getKey("sections.inside.activeSnippet.element.borderRadius"))+"px"});return{containerBg:s,containerColor:n,sidePadding:r,verticalSpacing:o,headerChip:d,propertyColor:p,border:a,valueColor:h,yesButton:m,noButton:g,buttonStyle:_,getButtonStyle:t,actionBtnSizeClass:f,buttonRadiusStyle:b,chipSizeClass:y}}const nc=["innerHTML"],ic=l.defineComponent({__name:"DynamicSnippet",props:{structure:{},data:{},message:{},configDesignClass:{}},emits:["action"],setup(i,{emit:e}){const t=i,{containerBg:s,containerColor:n,headerChip:r,yesButton:o,noButton:a,actionBtnSizeClass:c,buttonRadiusStyle:u,verticalSpacing:d,sidePadding:p,valueColor:h,getButtonStyle:m,border:g,chipSizeClass:f}=sc(t.configDesignClass),y=l.computed(()=>{var k;return(k=t.configDesignClass)==null?void 0:k.getKey("sections.inside.activeSnippet.params.buttonStyle")}),_=l.computed(()=>{var k,z;return{background:s.value,color:n.value,"border-radius":(k=t.configDesignClass)!=null&&k.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((z=t.configDesignClass)==null?void 0:z.getKey("sections.inside.activeSnippet.element.borderRadius"))+"px",border:g.value,padding:`${p.value}px`,gap:`${d.value}px`}}),b=l.computed(()=>{var k,z,x,T,L,W,K;return{container:{style:_.value},headerChip:{style:r.value,class:f.value},actionConfirm:{class:c.value,style:{...m(o.value,y.value),flex:"1","line-height":"1","border-radius":(k=t.configDesignClass)!=null&&k.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((z=t.configDesignClass)==null?void 0:z.getKey("sections.inside.activeSnippet.yesButton.borderRadius"))+"px","font-size":((x=t.configDesignClass)==null?void 0:x.getKey("sections.inside.activeSnippet.yesButton.fontSize"))+"px"}},title:{style:{color:h.value,"font-size":((T=t.configDesignClass)==null?void 0:T.getKey("sections.inside.activeSnippet.element.fontSize"))+"px"}},actionCancel:{class:c.value,style:{...m(a.value,y.value),flex:"1","line-height":"1","border-radius":(L=t.configDesignClass)!=null&&L.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((W=t.configDesignClass)==null?void 0:W.getKey("sections.inside.activeSnippet.yesButton.borderRadius"))+"px","font-size":((K=t.configDesignClass)==null?void 0:K.getKey("sections.inside.activeSnippet.yesButton.fontSize"))+"px"}}}}),w=e,C=l.computed(()=>new ec(t.structure).build(t.data).buildStyle(b.value).result()),v=k=>{var L;const z=k.target;if(!z)return;const x=z.closest("[data-cb]"),T=x==null?void 0:x.getAttribute("data-cb");T&&((L=t.message.snippet)!=null&&L.sequence)&&w("action",T,t.message.snippet.sequence)};return(k,z)=>(l.openBlock(),l.createElementBlock("div",{class:"tw:mt-1 tw:mb-1 tw:max-w-[65%]",onClick:v,innerHTML:C.value},null,8,nc))}}),rc=["innerHTML"],oc=l.defineComponent({__name:"MessageList",props:{messages:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},showWelcome:{type:Boolean},sectionBorderRadius:{},isLoading:{type:Boolean},isStreaming:{type:Boolean},configDesignClass:{},activeMessage:{},traceLastShown:{type:Boolean},isProduction:{type:Boolean}},emits:["handleClickMessage","handleSnippetAction"],setup(i,{emit:e}){const t=l.ref(null),s=i,n=e,r=g=>{g.meta&&n("handleClickMessage",g)},o=l.computed(()=>s.messages.filter((g,f,y)=>{var _;return s.isProduction?!(g.type==="usageTokensByAI"||g.isSystem&&((_=y[f+1])!=null&&_.isSystem)):!0}));l.watch(s.messages,()=>{c()&&a()},{deep:!0});const a=()=>{l.nextTick(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})},c=()=>{if(!t.value)return!0;const g=t.value;return g.scrollHeight-g.scrollTop-g.clientHeight<=24},u=()=>{},d=g=>{const f=g.replace("#",""),y=parseInt(f.substr(0,2),16),_=parseInt(f.substr(2,2),16),b=parseInt(f.substr(4,2),16),w=Math.max(0,y-12),C=Math.max(0,_-12),v=Math.max(0,b-12);return`linear-gradient(180deg, rgba(${w}, ${C}, ${v}, 0.95) 0%, rgba(0,0,0, 0) 100%)`},p=l.computed(()=>{switch(s.configDesignClass.getKey("sections.inside.welcomeMessage.size")){case"sm":return"tw:px-1.5 tw:py-2.5";case"md":return"tw:px-3 tw:py-4";case"lg":return"tw:px-4.5 tw:py-5.5"}}),h=l.computed(()=>s.configDesignClass.getKey("sections.inside.welcomeMessage.bgType")==="gradient"?d(s.configDesignClass.getKey("sections.inside.welcomeMessage.bgColor")):s.configDesignClass.getKey("sections.inside.welcomeMessage.bgType")==="bubble"?s.configDesignClass.getKey("sections.inside.welcomeMessage.bgColor"):"transparent"),m=g=>s.configDesignClass.getKey("settings.globalRoundingRadius")?s.sectionBorderRadius.borderRadius:s.configDesignClass.getKey(g?"sections.inside.messageUser.borderRadius":"sections.inside.messageBot.borderRadius")+"px";return(g,f)=>(l.openBlock(),l.createElementBlock("ul",{class:"message-list tw:transition-all tw:overflow-y-scroll tw:flex-1 tw:list-none tw:pb-4",ref_key:"messageListRef",ref:t,onScroll:u},[g.showWelcome?(l.openBlock(),l.createElementBlock("li",{key:0,class:l.normalizeClass(["tw:transition-all",["tw:text-"+(g.configDesignClass.getKey("sections.inside.params.size")==="sm"?"xs":g.configDesignClass.getKey("sections.inside.params.size")==="md"?"sm":"base")]]),style:l.normalizeStyle({color:g.configDesignClass.getKey("sections.inside.messageUser.color"),"margin-bottom":`${g.configDesignClass.getKey("settings.gapMessageLine")}px`})},[l.createElementVNode("div",{key:"message",class:l.normalizeClass(["tw:transition-all",p.value]),style:l.normalizeStyle({borderRadius:g.configDesignClass.getKey("settings.globalRoundingRadius")?g.sectionBorderRadius.borderRadius:g.configDesignClass.getKey("sections.inside.welcomeMessage.borderRadius")+"px",color:g.configDesignClass.getKey("sections.inside.welcomeMessage.color"),background:h.value,lineHeight:g.configDesignClass.getKey("settings.lineHeight"),fontSize:g.configDesignClass.getKey("sections.inside.welcomeMessage.fontSize")+"px",letterSpacing:g.configDesignClass.getKey("settings.letterSpacing")+"px"})},[l.createElementVNode("div",{innerHTML:l.unref(Ws)(g.configDesignClass.getKey("texts.welcomeMessage"))},null,8,rc)],6)],6)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,(y,_)=>{var b;return l.openBlock(),l.createElementBlock(l.Fragment,{key:_},[y.snippet?(l.openBlock(),l.createBlock(ic,{key:0,structure:l.unref(tc),data:y.snippet.data,message:y,configDesignClass:g.configDesignClass,onAction:f[0]||(f[0]=(w,C)=>n("handleSnippetAction",w,C))},null,8,["structure","data","message","configDesignClass"])):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(y.isUser?Fl:y.isSystem?g.isProduction?di:Ql:Nl),{key:1,message:y,"data-component":y.isSystem?g.isProduction?"LoadingMessage":"MessageSystem":"MessageBot",style:l.normalizeStyle({borderRadius:m(y.isUser),"margin-top":`${(b=o.value[_-1])!=null&&b.isSystem&&!y.isSystem?"12px":"0px"}`,"margin-bottom":`${y.isSystem?"2px":g.configDesignClass.getKey("settings.gapMessageLine")+"px"}`,lineHeight:g.configDesignClass.getKey("settings.lineHeight"),letterSpacing:g.configDesignClass.getKey("settings.letterSpacing")+"px"}),loader:g.configDesignClass.getKey("settings.loader"),color:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.color"):g.configDesignClass.getKey("sections.inside.messageBot.color"),welcomeColor:g.configDesignClass.getKey("sections.inside.messageUser.color"),bgType:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.bgType"):g.configDesignClass.getKey("sections.inside.messageBot.bgType"),bgColor:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.bgColor"):g.configDesignClass.getKey("sections.inside.messageBot.bgColor"),size:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.size"):g.configDesignClass.getKey("sections.inside.messageBot.size"),fontSize:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.fontSize"):g.configDesignClass.getKey("sections.inside.messageBot.fontSize"),borderWidth:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.borderWidth"):g.configDesignClass.getKey("sections.inside.messageBot.borderWidth"),borderColor:y.isUser?g.configDesignClass.getKey("sections.inside.messageUser.borderColor"):g.configDesignClass.getKey("sections.inside.messageBot.borderColor"),index:_,traceLastShown:g.traceLastShown,configDesignClass:g.configDesignClass,activeMessage:g.activeMessage===y,isLast:_===o.value.length-1,onClick:w=>r(y)},null,8,["message","data-component","style","loader","color","welcomeColor","bgType","bgColor","size","fontSize","borderWidth","borderColor","index","traceLastShown","configDesignClass","activeMessage","isLast","onClick"]))],64)}),128)),g.isLoading?(l.openBlock(),l.createBlock(di,{key:1,class:l.normalizeClass({"tw:mt-8":g.traceLastShown}),loader:g.configDesignClass.getKey("settings.loader"),configDesignClass:g.configDesignClass,text:g.configDesignClass.getKey("texts.typingLoader")},null,8,["class","loader","configDesignClass","text"])):l.createCommentVNode("",!0),l.renderSlot(g.$slots,"footer")],544))}}),ac=l.defineComponent({__name:"ChatMessagesContainer",props:{messages:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},sectionBorderRadius:{},isLoading:{type:Boolean},isStreaming:{type:Boolean},configDesignClass:{},activeMessage:{},showWelcome:{type:Boolean},isProcessError:{type:Boolean},restartChat:{type:Function},traceLastShown:{type:Boolean},isProduction:{type:Boolean}},emits:["handleClickMessage","update:activeMessage","handleSnippetAction"],setup(i,{emit:e}){const t=i,s=e,n=l.computed({get:()=>t.activeMessage,set:r=>s("update:activeMessage",r)});return(r,o)=>(l.openBlock(),l.createElementBlock("div",{class:"tw:transition-all tw:flex tw:flex-col tw:justify-between tw:w-full tw:min-h-0",style:l.normalizeStyle([{flex:"1 1 0"},{paddingLeft:(r.configDesignClass.getKey("sections.inside.params.sidePadding")??8)+"px",paddingRight:(r.configDesignClass.getKey("sections.inside.params.sidePadding")??8)+"px",paddingTop:(r.configDesignClass.getKey("sections.inside.params.verticalPadding")??8)/2+"px"}])},[l.createVNode(oc,{messages:r.messages,isPreview:r.isPreview,isEmbedded:r.isEmbedded,configDesignClass:r.configDesignClass,isLoading:r.isLoading,isStreaming:r.isStreaming,isProduction:r.isProduction,sectionBorderRadius:r.sectionBorderRadius,showWelcome:r.showWelcome,activeMessage:n.value,"onUpdate:activeMessage":o[0]||(o[0]=a=>n.value=a),traceLastShown:r.traceLastShown,onHandleClickMessage:o[1]||(o[1]=a=>r.$emit("handleClickMessage",a)),onHandleSnippetAction:o[2]||(o[2]=(a,c)=>s("handleSnippetAction",a,c))},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","isStreaming","isProduction","sectionBorderRadius","showWelcome","activeMessage","traceLastShown"])],4))}}),lc={key:0,class:"chat tw:w-full tw:h-full tw:flex tw:pt-0 tw:relative",style:{overflow:"hidden"}},cc={key:0,class:"tw:w-full tw:h-full"},uc={key:1,class:"messages tw:transition-all tw:flex tw:flex-col tw:justify-between tw:w-full"},Ht=0,dc=l.defineComponent({__name:"ChatWrapper",props:{link:{},isEmbedded:{type:Boolean},isPreview:{type:Boolean},configWidget:{},configLink:{},scenario:{},scenarioOptions:{},widgetId:{},isProduction:{type:Boolean}},emits:["trace","choose-trace","restart-chat"],setup(i,{expose:e,emit:t}){const s=t,n=l.ref(!1),r=l.ref(!1),o=l.ref(null),a=l.ref(!1),c=l.ref(!1),u=l.ref(!1),d=l.ref(!1),p=l.ref(!0),h=l.ref(!1),m=l.ref(!1),g=l.ref(!1),f=l.ref(0),y=l.ref(!1),_=l.ref(null),b=i,w=async()=>{if(!(b.isPreview||b.scenario))try{s("restart-chat"),Dr(),await os()}catch(S){console.error("Failed to restart chat connection",S)}},C=l.computed(()=>{const S=P.value.getKey("settings.position"),M=P.value.getKey("settings.offset.x"),R=P.value.getKey("settings.offset.y"),O=G.value?P.value.getKey("settings.size.width"):P.value.getKey("sections.colapsed.width"),Y=G.value?P.value.getKey("settings.size.height"):P.value.getKey("sections.colapsed.height");return{...{...S==="topLeft"?{top:R+"px",left:M+"px"}:{},...S==="topRight"?{top:R+"px",right:M+"px"}:{},...S==="bottomLeft"?{bottom:R+"px",left:M+"px"}:{},...S==="bottomRight"?{bottom:R+"px",right:M+"px"}:{},...S==="top"?{top:R+"px",left:"50%",transform:"translateX(-50%)"}:{},...S==="bottom"?{bottom:R+"px",left:"50%",transform:"translateX(-50%)"}:{},...S==="left"?{left:M+"px",top:"50%",transform:"translateY(-50%)"}:{},...S==="right"?{right:M+"px",top:"50%",transform:"translateY(-50%)"}:{}},width:G.value&&!U.value?O+"px":void 0,height:G.value||U.value?Y+"px":void 0}}),v=()=>{if(b.configLink)return b.configLink;const M=new URLSearchParams(window.location.search).get("config");if(M)return M},k=l.ref(null),z=l.ref(null),x=l.ref(null),T=()=>x.value?x.value:v()?z.value:b.configWidget?b.configWidget:Ve,L=l.computed(()=>{const S=T(),{isValid:M,errors:R}=al(S);return M?S:(console.warn("[HSW] Invalid widget config, falling back to DEFAULT_CONFIG:",R),Ve)}),W=S=>{k.value=S,s("choose-trace",{action:S.type,messages:[S]})},K=async()=>{s("choose-trace",{action:"copyAll",messages:V.value})},$=async()=>{if(V.value.length===0){s("choose-trace",{action:"copyLast",messages:[]});return}let S=-1;for(let R=V.value.length-1;R>=0;R--)if(V.value[R].isUser){S=R;break}const M=S>=0?S:0;s("choose-trace",{action:"copyLast",messages:V.value.slice(M)})},J=async S=>{switch(S.action){case"copyLast":await $();break;case"copyIteration":await $();break;case"copyAll":await K();break}},P=l.computed(()=>new ll(L.value)),F=l.computed(()=>ki(P.value)),j=l.computed(()=>Xt(P.value,8)),D=l.computed(()=>{switch(P.value.getKey("sections.bottom.params.size")){case"sm":return"tw:min-h-[25px]";case"md":return"tw:min-h-[45px]";case"lg":return"tw:min-h-[60px]"}}),G=l.ref(!0),Ke=()=>{const S=o.value;if(!S)return{width:56,height:56};const M=S.querySelector(".chat-action");if(!M)return{width:56,height:56};const R=M.getBoundingClientRect();return{width:Math.max(1,R.width),height:Math.max(1,R.height)}},Ce=l.ref(!1),xe=async S=>{if(Ce.value)return;Ce.value=!0;const M=o.value;if(!M||S===G.value)return;const R=M.querySelector(".chatWrapper"),O=R==null?void 0:R.querySelector(".chat");if(S){const Y=M.querySelector(".chat-collapsed");Y&&(H.killTweensOf(Y),H.to(Y,{opacity:1,duration:.15,ease:"power2.in"}));const{height:pe,width:Ne}=Ke();await new Promise(as=>setTimeout(as,150)),G.value=!0,await l.nextTick();const De=Math.max(pe||0,Ne||0)||56;H.killTweensOf(M),O&&H.killTweensOf(O),R&&H.killTweensOf(R),H.set(M,{width:De,height:De,overflow:"hidden",opacity:0,willChange:"width, height, opacity"}),R&&H.set(R,{opacity:0,willChange:"opacity"}),O&&H.set(O,{opacity:0,willChange:"opacity"}),H.set(M,{width:De,height:De,overflow:"hidden",opacity:0,willChange:"width, height, opacity"}),H.to(M,{width:P.value.getKey("settings.size.width"),height:P.value.getKey("settings.size.height"),opacity:1,duration:.4,ease:"power2.out",onComplete:()=>{H.set(M,{clearProps:"overflow,position,left,top,xPercent,yPercent,marginTop,willChange,opacity"}),Ce.value=!1}}),R&&H.to(R,{opacity:1,duration:.3,delay:.35,ease:"power2.out",onComplete:()=>{H.set(R,{clearProps:"willChange,opacity"})}}),O&&H.to(O,{opacity:1,duration:.3,delay:.15,ease:"power2.out",onComplete:()=>{H.set(O,{clearProps:"willChange"})}})}else{const Y=P.value.getKey("sections.colapsed.height")+P.value.getKey("sections.colapsed.borderWidth")*2;H.killTweensOf(M),O&&H.killTweensOf(O),R&&H.killTweensOf(R),H.set(M,{width:P.value.getKey("settings.size.width"),height:P.value.getKey("settings.size.height"),overflow:"hidden",willChange:"width, height, opacity"}),R&&(H.set(R,{willChange:"opacity"}),H.to(R,{opacity:0,duration:.5,ease:"power3.inOut",onComplete:()=>{H.set(R,{clearProps:"willChange,opacity"})}})),O&&(H.set(O,{willChange:"opacity"}),H.to(O,{opacity:0,duration:.2,ease:"power2.in",onComplete:()=>{H.set(O,{clearProps:"willChange"})}})),H.to(M,{width:Y,height:Y,opacity:0,duration:.35,marginTop:0,ease:"power2.inOut",onComplete:()=>{G.value=!1,l.nextTick().then(()=>{const pe=M.querySelector(".chat-collapsed");pe&&(H.set(pe,{opacity:0}),H.to(pe,{opacity:1,duration:.25,ease:"power2.out"})),H.set(M,{opacity:1})}),H.set(M,{clearProps:"overflow,position,left,top,xPercent,yPercent,marginTop,willChange"}),Ce.value=!1}})}},q=l.ref(b.isPreview||!1),U=l.ref(b.isEmbedded||!1);l.watch(()=>b.isEmbedded,S=>{U.value=S});const me=l.ref(!!b.isPreview),Ze=l.ref(b.widgetId||`hsw-${Math.random().toString(36).slice(2,10)}`),V=l.ref([]),qe=l.ref("");let Q=null,Ee=0;const Nt=l.computed(()=>V.value.length>0&&V.value[V.value.length-1].isUser===!0||c.value),tt=l.ref(null),Er=(S,M)=>{console.log("handleSnippetAction",S,M),Bn({action:{sequence:M,command:S,data:{}}})},Pe=S=>{var M;if(S.chunkId&&S.text){const R=V.value[V.value.length-1];R.chunkId===S.chunkId?((M=S.chunk)!=null&&M.start?R.text="":R.text+=S.text,R.chunk.start=!1):V.value.push(S)}else V.value.push(S)},Ft=(()=>{if(b.link)return b.link;const M=new URLSearchParams(window.location.search).get("link");if(M)return M;const O=new URLSearchParams(window.location.hash.substring(1)).get("link");if(O)return O;try{const Y="ws://localhost:8080/client/widget-chat/v1/ws/?token=KOUNf8Nk4P7DpAhamBZWqyfW5Jf5gJpxw6UN0un7WnBEs2IxMZBEmvKOix9NfWYwCDKIAmi5b0o9HxFvZukXstLJRoYkVcp2eRWb3NA4lC7BEuSMik4_9wTJCBNpMEOTAxeTulrhWPUN4FGnKCJz7D52";if(Y)return Y}catch(Y){console.warn("Environment variables not available:",Y)}return console.log("Using fallback link: ws://localhost:3000"),"ws://localhost:3000"})(),Rn=()=>{if(Ee>=Ht){Pe({text:`Failed to connect after ${Ht} attempts. Please check your connection.`,isUser:!1});return}Ee++,console.log(`Reconnection attempt ${Ee}/${Ht}`),setTimeout(()=>{Ss()},2e3*Ee)},Pr=()=>{Pe({text:Rr.UserMessage,isUser:!0}),Pe({text:"{Agent response message}",isUser:!1})},Ss=()=>{try{if(!Ft||typeof Ft!="string"){console.error("Invalid WebSocket link:",Ft),Pe({text:"Error: Invalid WebSocket URL",isUser:!1});return}if(console.log("Attempting to connect to:",Ft),Q=new WebSocket(Ft),!Q){console.error("Failed to create WebSocket instance");return}Q.onmessage=S=>{var M,R,O,Y,pe,Ne,De,as,Ln,On;try{const A=JSON.parse(S.data);if(A.snippet)return Pe({snippet:{...A.snippet,data:JSON.parse(A.snippet.data||"{}")},isUser:!1,isSystem:!0,isError:!1});if(A.error)return Pe({text:A.error.message,isUser:!1,isSystem:!0,isError:!0});if((M=A==null?void 0:A.textChunk)!=null&&M.start&&(y.value=!0,_.value=(R=A==null?void 0:A.textChunk)==null?void 0:R.start,Pe({text:"",isUser:!1,chunkId:(O=A==null?void 0:A.textChunk)==null?void 0:O.start,chunk:A==null?void 0:A.textChunk})),(Y=A==null?void 0:A.textChunk)!=null&&Y.end||(pe=A==null?void 0:A.textChunk)!=null&&pe.start){(Ne=A==null?void 0:A.textChunk)!=null&&Ne.end&&_.value&&((De=A==null?void 0:A.textChunk)==null?void 0:De.end)===_.value&&(y.value=!1,_.value=null);return}(as=A==null?void 0:A.textChunk)!=null&&as.text&&Pe({text:A.textChunk.text,isUser:!1,chunkId:(Ln=A==null?void 0:A.textChunk)==null?void 0:Ln.id}),A!=null&&A.trace&&Pe({text:A.trace.message,isUser:!1,isSystem:!0,meta:A.trace.meta,time:A.trace.time,type:A.trace.type}),(On=A==null?void 0:A.trace)!=null&&On.meta&&!b.isProduction&&s("trace",{action:A.trace.type,messages:[A.trace]})}catch(A){console.error("Error parsing WebSocket message:",A),Pe({text:"Error: Failed to parse server response",isUser:!1})}},Q.onopen=()=>{Ee=0},Q.onclose=S=>{console.log("Connection closed",S);let M=`Connection closed (${S.code})`;switch(S.code){case 1e3:M="Connection closed normally";break;case 1001:M="Connection closed: going away";break;case 1006:if(d.value=!0,Ee<Ht&&!q.value){Rn();return}break;case 1011:M="Connection closed: server error";break;default:u.value=!0}console.log(M)},Q.onerror=S=>{console.error("WebSocket connection error:",S),a.value=!0,Pe({text:"Connection error: Unable to connect to chat server",isUser:!1,isSystem:!0,isError:!0}),Ee<Ht&&!q.value&&Rn()}}catch(S){console.error("Error connecting to socket server:",S),Pe({text:`Connection error: ${S instanceof Error?S.message:"Unknown error"}`,isUser:!1,isSystem:!0,isError:!0})}},Dr=()=>{Q&&Q.close(),Q=null};l.onUnmounted(()=>{Q&&Q.close()});const ks=S=>{(b.isPreview||b.scenario)&&!S||xe(!G.value)},Ar=()=>{if(!(b.isPreview||b.scenario)&&qe.value.trim()!==""){if(b.isProduction&&V.value.length>0){const S=V.value[V.value.length-1];S.isSystem===!0&&!S.isError&&!S.snippet&&V.value.pop()}V.value.push({text:qe.value,isUser:!0}),y.value=!0,Bn({message:qe.value}),qe.value=""}},Bn=S=>{Q&&Q.send(JSON.stringify(S))},En=()=>{try{const S=P.value.getKey("settings.fontFamily")||"MacPaw Fixel",M=`https://fonts.googleapis.com/css2?family=${S.replace(/\s+/g,"+")}:wght@300;400;500;600;700&display=swap`,R=document.createElement("link");R.rel="preload",R.as="style",R.href=M,document.head.appendChild(R);const O=document.createElement("link");O.rel="stylesheet",O.href=M,O.setAttribute("data-google-font","true"),document.head.appendChild(O),o.value&&(o.value.style.fontFamily=`"${S}", sans-serif`)}catch(S){console.error("Error loading font:",S)}},Pn=()=>{const S=P.value.getKey("settings.fontWeight")||400;o.value&&(o.value.style.fontWeight=S)};r.value=!0,l.watch(()=>P.value.getKey("settings.fontFamily"),()=>{En()}),l.watch(()=>P.value.getKey("settings.fontWeight"),()=>{Pn()});const Lr=async()=>{if(v()){const M=await(await fetch(v()+"config")).json();z.value=M,n.value=!0}else n.value=!0},Ts=(S,M,R)=>new Promise(O=>{const Y=performance.now(),pe=Ne=>{const De=Math.min(1,(Ne-Y)/R);f.value=S+(M-S)*De,De<1?requestAnimationFrame(pe):O()};requestAnimationFrame(pe)}),Dn=async S=>{g.value=!0,f.value=0,await l.nextTick(),await Ts(0,.3,500),S(),await Ts(.3,.6,200),f.value=.6,await new Promise(M=>setTimeout(M,100)),await Ts(.6,0,500),g.value=!1},Or=async(S=25)=>{const M=V.value.filter(O=>!O.isUser&&!O.isSystem&&O.text);if(!M.length)return;const R=M.map(O=>O.text||"");M.forEach(O=>O.text="");for(let O=0;O<M.length;O++){const Y=M[O],pe=R[O];for(let Ne=0;Ne<pe.length;Ne++)Y.text=pe.slice(0,Ne+1),await new Promise(De=>setTimeout(De,S))}},zs=async(S,M)=>{await Dn(()=>{const R=ui.getState(S,P.value,M||b.scenarioOptions);if(G.value=R.isChatOpen,V.value=R.messages,c.value=R.traceLastShown,a.value=R.isConnectionError,u.value=R.isProcessError,d.value=R.isReconnectError,h.value=R.isInputDisabled,p.value=R.showWelcome,m.value=R.showReconnectNotice??!1,tt.value=R.snippet??null,q.value=!0,Q){try{Q.close()}catch{}Q=null}}),Or()},os=async()=>{await Dn(()=>{q.value=me.value,p.value=!0,h.value=!1,m.value=!1,a.value=!1,u.value=!1,d.value=!1,V.value=[],q.value||(!Q||Q.readyState!==1)&&Ss()})};l.onMounted(async()=>{await Lr(),En(),Pn();const S=b.scenario??ui.getScenarioFromUrl();if(S){await zs(S);return}if(b.isPreview){Pr();return}Ss()}),l.watch(()=>b.scenario,async S=>{S?await zs(S):await os()});const Se={id:Ze,setScenario:async(S,M)=>{await zs(S,M)},clearScenario:async()=>{await os()},toggleChat:()=>{ks(!0)},setOpen:S=>{G.value=S},setActive:S=>{S&&!G.value&&(G.value=!0)},setInputDisabled:S=>{h.value=S},setShowReconnectNotice:S=>{m.value=S},setMessages:S=>{V.value=Array.isArray(S)?S:[]},pushMessage:S=>{V.value.push(S)},setSnippet:S=>{tt.value=S??null},resetToLive:async()=>{await os()},setConfig:S=>{x.value=JSON.parse(JSON.stringify(S))},getConfig:()=>L.value},Vr=()=>{const S=window;S.hswWidgets=S.hswWidgets||{},S.hswWidgets[Ze.value]=Se,window.dispatchEvent(new CustomEvent("hsw:ready",{detail:{widgetId:Ze.value}}))},Ir=()=>{const S=window;S.hswWidgets&&S.hswWidgets[Ze.value]&&delete S.hswWidgets[Ze.value]},An=async S=>{var Y;const M=S,R=(Y=M.detail)==null?void 0:Y.widgetId;if(R&&R!==Ze.value)return;const{action:O}=M.detail;switch(O){case"setScenario":await Se.setScenario(M.detail.payload.type,M.detail.payload.options);break;case"clearScenario":await Se.clearScenario();break;case"setOpen":Se.setOpen(M.detail.payload);break;case"setActive":Se.setActive(M.detail.payload);break;case"setInputDisabled":Se.setInputDisabled(M.detail.payload);break;case"setShowReconnectNotice":Se.setShowReconnectNotice(M.detail.payload);break;case"setMessages":Se.setMessages(M.detail.payload);break;case"pushMessage":Se.pushMessage(M.detail.payload);break;case"setSnippet":Se.setSnippet(M.detail.payload);break;case"resetToLive":await Se.resetToLive();break;case"setConfig":Se.setConfig(M.detail.payload);break}};return l.onMounted(()=>{Vr(),window.addEventListener("hsw:control",An)}),l.onUnmounted(()=>{Ir(),window.removeEventListener("hsw:control",An)}),e(Se),(S,M)=>n.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["tw:z-[999] tw:flex tw:justify-end component-isolator tw:transition-all",{"tw:fixed":!U.value,"tw:w-full":G.value}]),style:l.normalizeStyle({letterSpacing:P.value.getKey("settings.letterSpacing")+"px",...C.value}),ref_key:"chatWrapperRef",ref:o},[l.withDirectives(l.createVNode(el,{toggleChat:ks,element:P.value.getKeyObject("sections.colapsed")},null,8,["element"]),[[l.vShow,!G.value]]),l.withDirectives(l.createElementVNode("div",{class:l.normalizeClass(["chatWrapper tw:w-full tw:backdrop-blur-[22px] tw:flex tw:items-center tw:border-0 tw:flex-col",[{"tw:h-auto tw:shadow-2xl chat-active":G.value,"tw:shadow-lg tw:w-fit":!G.value,"chat-embedded tw:w-full tw:h-full tw:static tw:top-0 tw:left-0":U.value}]]),style:l.normalizeStyle({background:P.value.getKey("settings.bgChat"),borderRadius:`${String(F.value)}px`})},[l.createVNode(wl,{isChatOpen:G.value,toggleChat:ks,configDesignClass:P.value,sectionBorderRadius:j.value,mainBorderRadius:F.value,isPreview:q.value,isEmbedded:U.value,isProduction:S.isProduction||!1,restartChat:w},null,8,["isChatOpen","configDesignClass","sectionBorderRadius","mainBorderRadius","isPreview","isEmbedded","isProduction"]),G.value?(l.openBlock(),l.createElementBlock("div",lc,[a.value?(l.openBlock(),l.createElementBlock("div",cc,[l.createElementVNode("div",{class:"tw:absolute tw:left-0 tw:top-0 tw:w-full tw:h-full",style:l.normalizeStyle({padding:P.value.getKey("sections.warnings.launchIssue.content.sidePadding")+"px"})},[l.createVNode($s,{type:"launchIssue",class:"tw:h-full",headlineText:P.value.getKey("texts.launchIssueTitle"),descriptionText:P.value.getKeyObject("texts.launchIssueText"),warningElement:P.value.getKeyObject("sections.warnings.launchIssue"),configDesignClass:P.value,isProcessError:u.value,restartChat:w},null,8,["headlineText","descriptionText","warningElement","configDesignClass","isProcessError"])],4)])):(l.openBlock(),l.createElementBlock("div",uc,[l.createVNode(ac,{messages:V.value,isPreview:q.value,isEmbedded:U.value,configDesignClass:P.value,isLoading:Nt.value,isStreaming:y.value,isProduction:S.isProduction,sectionBorderRadius:j.value,showWelcome:p.value,activeMessage:k.value,"onUpdate:activeMessage":M[0]||(M[0]=R=>k.value=R),isProcessError:u.value,snippet:tt.value,traceLastShown:c.value,onHandleClickMessage:W,onHandleSnippetAction:Er,restartChat:w},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","isStreaming","isProduction","sectionBorderRadius","showWelcome","activeMessage","isProcessError","snippet","traceLastShown"]),u.value?(l.openBlock(),l.createElementBlock("div",{key:0,style:l.normalizeStyle({padding:P.value.getKey("sections.warnings.connectionIssue.content.sidePadding")+"px"})},[l.createVNode($s,{type:"connectionIssue",headlineText:P.value.getKey("texts.issueText"),configDesignClass:P.value,warningElement:P.value.getKeyObject("sections.warnings.connectionIssue"),restartChat:w},null,8,["headlineText","configDesignClass","warningElement"])],4)):(l.openBlock(),l.createBlock(Tl,{key:1,messageText:qe.value,"onUpdate:messageText":M[1]||(M[1]=R=>qe.value=R),isProduction:S.isProduction||!1,configDesignClass:P.value,sectionBorderRadius:j.value,classSize:D.value,sendMessage:Ar,isInputDisabled:h.value,showReconnectNotice:m.value,restartChat:w,isStreaming:y.value,onTrace:J},null,8,["messageText","isProduction","configDesignClass","sectionBorderRadius","classSize","isInputDisabled","showReconnectNotice","isStreaming"]))]))])):l.createCommentVNode("",!0),l.createVNode(l.Transition,{name:"fade"},{default:l.withCtx(()=>[g.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"tw:absolute tw:inset-0 tw:backdrop-blur-[40px] tw:z-[1000]",style:l.normalizeStyle({borderRadius:`${String(F.value)}px`,backgroundColor:`rgba(0,0,0, ${f.value})`})},null,4)):l.createCommentVNode("",!0)]),_:1})],6),[[l.vShow,r.value&&G.value]])],6)):l.createCommentVNode("",!0)}}),Ge=i=>{const e=window,t=i||Object.keys(e.hswWidgets||{})[0];if(!e.hswWidgets||!e.hswWidgets[t])throw new Error("HSW widget API not ready. Wait for hsw:ready event or pass correct widgetId");return e.hswWidgets[t]},fc=async(i,e,t)=>Ge(t).setScenario(i,e),gc=async i=>Ge(i).clearScenario(),pc=(i,e)=>Ge(e).setOpen(i),hc=(i,e)=>Ge(e).setActive(i),mc=(i,e)=>Ge(e).setInputDisabled(i),yc=(i,e)=>Ge(e).setShowReconnectNotice(i),wc=(i,e)=>Ge(e).setMessages(i),bc=(i,e)=>Ge(e).pushMessage(i),vc=(i,e)=>Ge(e).setSnippet(i),_c=async i=>Ge(i).resetToLive();exports.ChatWrapper=dc;exports.clearScenario=gc;exports.cn=cn;exports.pushMessage=bc;exports.resetToLive=_c;exports.setActive=hc;exports.setInputDisabled=mc;exports.setMessages=wc;exports.setOpen=pc;exports.setScenario=fc;exports.setShowReconnectNotice=yc;exports.setSnippet=vc;
26
+ </svg>`,color:"#FFF"}}}},loader:{typingLoader:{color:"#8E8E8F",bgColor:"#2F2F31"},completeStep:{verticalSpacing:8,fontSize:12,color:"#8E8E8F",icon:{showIcon:!0,src:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity="0.4" d="M7.99967 14.6666C11.6816 14.6666 14.6663 11.6818 14.6663 7.99992C14.6663 4.31802 11.6816 1.33325 7.99967 1.33325C4.31778 1.33325 1.33301 4.31802 1.33301 7.99992C1.33301 11.6818 4.31778 14.6666 7.99967 14.6666Z" fill="currentColor"></path><path d="M7.05297 10.3867C6.91964 10.3867 6.79297 10.3334 6.69964 10.2401L4.81297 8.3534C4.61964 8.16007 4.61964 7.84007 4.81297 7.64673C5.0063 7.4534 5.3263 7.4534 5.51964 7.64673L7.05297 9.18007L10.4796 5.7534C10.673 5.56007 10.993 5.56007 11.1863 5.7534C11.3796 5.94673 11.3796 6.26673 11.1863 6.46006L7.4063 10.2401C7.31297 10.3334 7.1863 10.3867 7.05297 10.3867Z" fill="currentColor"></path></svg>',color:"#8E8E8F",size:16}},activeStep:{fontSize:12,color:"#FFF",icon:{showIcon:!0,src:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 4.02667C2.56667 5.08667 2 6.48 2 8C2 11.3133 4.68667 14 8 14C11.3133 14 14 11.3133 14 8C14 4.68667 11.3133 2 8 2C7.52667 2 7.06667 2.05333 6.62667 2.16" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/></svg>',color:"#fff",size:16}}},top:{params:{size:"md",bgColor:"#5E4AC6",bgStyle:"gradient",paddingVertical:8,paddingHorizontal:8,chipStyle:"filled",buttonStyle:"filled"},chipWidgetTitle:{color:"#fff",bgColor:"#5E4AC6",borderRadius:12,showType:"both"},buttons:{color:"#BBBBBD",bgColor:"#2F2F31",borderRadius:12,showType:"both"}},inside:{params:{size:"md",sidePadding:8,verticalPadding:8},welcomeMessage:{color:"#fff",bgType:"gradient",fontSize:14,size:"md",borderRadius:12,borderWidth:1,bgColor:"#595959"},messageUser:{color:"#F9F8F8",bgColor:"#F8F8F933",bgType:"bubble",borderRadius:12,fontSize:14,size:"md",borderWidth:1,borderColor:"#595959"},messageBot:{color:"#fff",bgColor:"#5E4AC6",bgType:"plain",borderRadius:12,fontSize:14,size:"md",borderWidth:1,borderColor:"#595959"},activeSnippet:{params:{buttonType:"both",buttonStyle:"filled",size:"md"},element:{color:"#fff",bgColor:"#373739",borderRadius:12,borderWidth:1,borderColor:"#595959",verticalSpacing:8,sidePadding:8,fontSize:12},headerChip:{color:"#fff",bgColor:"#69696A",borderRadius:12,size:"md",fontSize:12,bgType:"filled"},propertyColor:"rgba(255, 255, 255, 0.30)",valueColor:"#fff",yesButton:{color:"#fff",bgColor:"#12A150",borderRadius:12,fontSize:12},noButton:{color:"#fff",bgColor:"#C20E4D",borderRadius:12,fontSize:12}}},bottom:{params:{size:"md",disclaimerShow:!1},inputSend:{size:"md",color:"#EEECEC",bgColor:"#373739",borderColor:"#595959",borderWidth:1,inputStyle:"inside",bgType:"plain",paddingVertical:8,paddingHorizontal:8,sidePadding:8,fontSize:12,borderRadius:8},btnSend:{color:"#1E1E1E",bgColor:"rgba(255, 255, 255, 0.50)",showType:"both",borderWidth:1,borderColor:"#595959",borderRadius:50,size:"md",fontSize:12,icon:{showIcon:!0,src:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 2.56445C9.01973 2.56449 9.03453 2.57164 9.04395 2.58105L13.5967 7.13379C13.606 7.14324 13.6133 7.15811 13.6133 7.17773C13.6132 7.19738 13.606 7.21226 13.5967 7.22168L13.5898 7.22754L13.584 7.23438C13.5865 7.23164 13.5864 7.23284 13.5801 7.23535C13.5732 7.23801 13.5633 7.24018 13.5527 7.24023C13.5431 7.24023 13.5351 7.23862 13.5293 7.23633C13.524 7.23419 13.5171 7.22992 13.5088 7.22168L9 2.71289L4.49121 7.22168C4.48176 7.23107 4.46699 7.23828 4.44727 7.23828C4.42752 7.23826 4.41275 7.23109 4.40332 7.22168C4.3939 7.21226 4.38676 7.19747 4.38672 7.17773C4.38672 7.15801 4.39393 7.14324 4.40332 7.13379L8.95605 2.58105C8.9655 2.57167 8.98027 2.56445 9 2.56445Z" stroke="currentColor"/><path d="M9 2.68994C9.01306 2.68994 9.02868 2.69518 9.04297 2.70947C9.05726 2.72376 9.0625 2.73938 9.0625 2.75244V15.3745C9.0625 15.3875 9.0571 15.4032 9.04297 15.4175C9.02868 15.4318 9.01306 15.437 9 15.437C8.98694 15.437 8.97132 15.4318 8.95703 15.4175C8.9429 15.4032 8.9375 15.3875 8.9375 15.3745V2.75244C8.9375 2.73938 8.94274 2.72376 8.95703 2.70947C8.97132 2.69518 8.98694 2.68994 9 2.68994Z" fill="currentColor" stroke="currentColor"/></svg>',color:"#fff",size:18}},disclaimer:{color:"#fff",bgColor:"#FF0000",height:20,fontSize:12}}}};class qt{canApply(e){return e.fromVersion===this.appliesTo.from&&e.toVersion===this.appliesTo.to}rollback(e){return{success:!1,errors:[`Rollback not implemented for strategy: ${this.name}`],warnings:[],modified:!1}}createSuccessResult(e,t=[]){return{success:!0,data:e,errors:[],warnings:t,modified:!0}}createErrorResult(e,t){return{success:!1,data:t,errors:e,warnings:[],modified:!1}}}class Zl extends qt{constructor(){super(...arguments),this.name="AddSettingsFieldsV1toV2",this.description="Добавляет новые поля loader, buttonStyle, buttonType в settings",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[],n={...t.settings,loader:Fe.settings.loader};return s.push(`Добавлены поля loader: '${n.loader}'`),this.createSuccessResult({...t,settings:n},s)}catch(t){return this.createErrorResult([`Ошибка при добавлении полей settings: ${t}`])}}}class Yl extends qt{constructor(){super(...arguments),this.name="AddChipStyleV1toV2",this.description="Добавляет поле chipStyle в sections.top.params",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.top.params={...t.sections.top.params,chipStyle:Fe.sections.top.params.chipStyle},s.push(`Добавлено поле chipStyle: '${Fe.sections.top.params.chipStyle}' в sections.top.params`),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении chipStyle: ${t}`])}}}class Xl extends qt{constructor(){super(...arguments),this.name="AddMessageBgTypeV1toV2",this.description="Добавляет поле bgType в messageUser и messageBot",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.inside.messageUser={...t.sections.inside.messageUser,bgType:Fe.sections.inside.messageUser.bgType},t.sections.inside.messageBot={...t.sections.inside.messageBot,bgType:Fe.sections.inside.messageBot.bgType},s.push("Добавлены поля bgType для messageUser и messageBot"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении bgType для сообщений: ${t}`])}}}class Ql extends qt{constructor(){super(...arguments),this.name="AddActionButtonsV1toV2",this.description="Добавляет кнопки aprooveButton и rejectButton в inside секцию",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.inside={...t.sections.inside},s.push("Добавлены кнопки aprooveButton и rejectButton"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении кнопок действий: ${t}`])}}}class Jl extends qt{constructor(){super(...arguments),this.name="EnhanceInputSendV1toV2",this.description="Добавляет borderStyle, inputStyle, bgType в inputSend",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.bottom.inputSend={...t.sections.bottom.inputSend,borderStyle:{borderColor:Fe.sections.bottom.inputSend.borderColor,borderWidth:Fe.sections.bottom.inputSend.borderWidth},inputStyle:Fe.sections.bottom.inputSend.inputStyle,bgType:Fe.sections.bottom.inputSend.bgType},s.push("Расширен inputSend с новыми полями borderStyle, inputStyle, bgType"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при расширении inputSend: ${t}`])}}}class ec extends qt{constructor(){super(...arguments),this.name="AddBottomElementsV1toV2",this.description="Добавляет warningAlert и disclaimer в bottom секцию",this.appliesTo={from:"1.0",to:"2.0"}}apply(e){try{const t={...e.config},s=[];return t.sections.bottom={...t.sections.bottom},s.push("Добавлены warningAlert и disclaimer в bottom секцию"),this.createSuccessResult(t,s)}catch(t){return this.createErrorResult([`Ошибка при добавлении элементов bottom: ${t}`])}}}new Zl,new Yl,new Xl,new Ql,new Jl,new ec;const je=r=>typeof r=="string"&&r.length>=0,Kr=r=>typeof r=="number"&&!Number.isNaN(r),Qt=(r,e)=>typeof r=="string"&&e.includes(r);function tc(r){var u,d,f,g,h,m,p;const e=[];if(!r||typeof r!="object")return{isValid:!1,errors:["config: must be an object"]};const t=r.settings||{};Kr(t.letterSpacing)||t.letterSpacing===void 0||e.push("settings.letterSpacing: number"),je(t.bgChat)||t.bgChat===void 0||e.push("settings.bgChat: string"),je(t.fontFamily)||t.fontFamily===void 0||e.push("settings.fontFamily: string"),Kr(t.fontWeight)||t.fontWeight===void 0||e.push("settings.fontWeight: number"),t.logo===void 0||je(t.logo)||e.push("settings.logo: string (svg or url)"),t.widgetTitle===void 0||je(t.widgetTitle)||e.push("settings.widgetTitle: string"),t.position===void 0&&e.push("settings.position: undefined");const s=r.texts||{};s.launchIssueTitle===void 0||je(s.launchIssueTitle)||e.push("texts.launchIssueTitle: string"),s.issueText===void 0||je(s.issueText)||e.push("texts.issueText: string"),s.widgetTitle===void 0||je(s.widgetTitle)||e.push("texts.widgetTitle: string"),s.hideText===void 0||je(s.hideText)||e.push("texts.hideText: string");const n=((u=r.sections)==null?void 0:u.top)||{},i=n.params||{};i.size===void 0||Qt(i.size,["sm","md","lg"])||e.push("sections.top.params.size: sm|md|lg"),i.chipStyle===void 0||Qt(i.chipStyle,["filled","outlined","invisible"])||e.push("sections.top.params.chipStyle: filled|outlined|invisible"),i.buttonStyle===void 0||Qt(i.buttonStyle,["filled","outlined","invisible"])||e.push("sections.top.params.buttonStyle: filled|outlined|invisible"),i.buttonType===void 0||Qt(i.buttonType,["icon","text","both"])||e.push("sections.top.params.buttonType: icon|text|both"),((d=n==null?void 0:n.chipWidgetTitle)==null?void 0:d.color)===void 0||je((f=n==null?void 0:n.chipWidgetTitle)==null?void 0:f.color)||e.push("sections.top.chipWidgetTitle.color: string"),((g=n==null?void 0:n.chipWidgetTitle)==null?void 0:g.bgColor)===void 0||je((h=n==null?void 0:n.chipWidgetTitle)==null?void 0:h.bgColor)||e.push("sections.top.chipWidgetTitle.bgColor: string"),(n==null?void 0:n.btnClose)===void 0||typeof(n==null?void 0:n.btnClose)=="object"||e.push("sections.top.btnClose: object");const a=(((m=r.sections)==null?void 0:m.bottom)||{}).params||{};a.size===void 0||Qt(a.size,["sm","md","lg"])||e.push("sections.bottom.params.size: sm|md|lg");const l=((p=r.sections)==null?void 0:p.warnings)||{};return l.launchIssue===void 0||typeof l.launchIssue=="object"||e.push("sections.warnings.launchIssue: object"),l.connectionIssue===void 0||typeof l.connectionIssue=="object"||e.push("sections.warnings.connectionIssue: object"),{isValid:e.length===0,errors:e}}class sc{constructor(e){O(this,"config");this.config=e}getFlatRecursiveConfig(e,t="",s={}){for(const n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const i=e[n],o=t?`${t}.${n}`:n;i!==null&&typeof i=="object"&&!Array.isArray(i)?this.getFlatRecursiveConfig(i,o,s):s[o]=i}return s}get configFlat(){return this.getFlatRecursiveConfig(this.config)}getConfig(){return this.config}getKey(e){return this.configFlat[e]??void 0}getKeyObject(e){return e.split(".").reduce((t,s)=>t&&t[s]!==void 0?t[s]:"undefined",this.config)}}const Tn={sm:"tw:h-[20px] tw:px-1.5 tw:py-0 tw:[font-size:10px] [&_svg]:tw:size-4",md:"tw:h-[24px] tw:px-2 tw:py-1 tw:text-xs [&_svg]:tw:size-4.5",lg:"tw:h-[28px] tw:px-3 tw:py-1 tw:text-sm [&_svg]:tw:size-5"};function zn(r){return r==="sm"||r==="md"||r==="lg"?Tn[r]:Tn.md}function Xn(r,e){try{const s={top:"sections.top.params.size",inside:"sections.inside.params.size",bottom:"sections.bottom.params.size"}[e],n=r==null?void 0:r.getKey(s);return zn(n)}catch{return Tn.md}}const nc=["aria-expanded"],rc=["innerHTML"],ic=["src","alt"],oc={key:2},ac={key:0,class:"tw:flex tw:items-center tw:w-full tw:justify-end tw:gap-1.5 header-buttons"},lc=["width","height"],cc={key:1},uc=["width","height"],dc={key:1},pc=c.defineComponent({__name:"ChatHeader",props:{isChatOpen:{type:Boolean},toggleChat:{type:Function},configDesignClass:{},sectionBorderRadius:{},mainBorderRadius:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},restartChat:{type:Function}},setup(r){const e=r,t=c.computed(()=>e.configDesignClass.getKeyObject("sections.top.params")),s=c.computed(()=>Xn(e.configDesignClass,"top")),n=c.computed(()=>{let p="";switch(t.value.bgStyle){case"gradient":p=`linear-gradient(180deg, ${t.value.bgColor} 0%, ${e.configDesignClass.getKey("settings.bgChat")} 100%)`;break;case"filled":p=t.value.bgColor;break;case"invisible":p="transparent";break;default:p="transparent";break}return{borderTopLeftRadius:`${e.mainBorderRadius}px`,borderTopRightRadius:`${e.mainBorderRadius}px`,background:p,padding:`${t.value.paddingVertical}px ${t.value.paddingHorizontal}px`}}),i=c.computed(()=>{const p=e.configDesignClass.getKey("texts.widgetTitle"),b=e.configDesignClass.getKey("settings.widgetTitle");return p&&p!=="undefined"?p:b&&b!=="undefined"?b:""}),o=c.computed(()=>e.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")),a=c.computed(()=>{const p=e.configDesignClass.getKey("sections.top.params.chipStyle"),b=e.configDesignClass.getKey("sections.top.chipWidgetTitle.color"),k=e.configDesignClass.getKey("sections.top.chipWidgetTitle.bgColor"),v=p==="outlined",y=p==="filled",_=p==="invisible";return{borderRadius:e.configDesignClass.getKey("settings.globalRoundingRadius")?e.sectionBorderRadius.borderRadius:e.configDesignClass.getKey("sections.top.chipWidgetTitle.borderRadius")+"px",color:b,border:v?`1px solid ${k}`:"none",padding:_?"0px":null,"background-color":y?k:"transparent"}}),l=c.computed(()=>e.configDesignClass.getKey("sections.top.buttons.showType")),u=c.computed(()=>{const p=e.configDesignClass.getKey("sections.top.buttons.showType");return p&&p!=="undefined"?p:"icon"}),d=c.computed(()=>{const p=e.configDesignClass.getKeyObject("sections.top.buttons");return{color:(p==null?void 0:p.color)??"#fff",bgColor:(p==null?void 0:p.bgColor)??"#000"}}),f=c.computed(()=>{const p=e.configDesignClass.getKey("sections.top.params.buttonStyle"),b=p==="outlined",k=p==="invisible",v=d.value;return{borderRadius:e.configDesignClass.getKey("settings.globalRoundingRadius")?e.sectionBorderRadius.borderRadius:e.configDesignClass.getKey("sections.top.buttons.borderRadius")+"px",color:v.color,border:b?`1px solid ${v.bgColor}`:"none",padding:k?"0px":null,"background-color":k?"transparent":p==="filled"?v.bgColor:"transparent"}}),g=c.computed(()=>{const p=e.configDesignClass.getKey("texts.hideText");return p&&p!=="undefined"?p:"Hide"}),h=c.computed(()=>e.configDesignClass.getKey("settings.logo").includes("<svg")),m=c.computed(()=>e.configDesignClass.getKey("settings.logo"));return(p,b)=>(c.openBlock(),c.createElementBlock("div",{onClick:b[0]||(b[0]=(...k)=>p.toggleChat&&p.toggleChat(...k)),class:"chat-action tw:transition-all tw:cursor-pointer tw:flex tw:items-center tw:w-full tw:justify-start tw:overflow-hidden",style:c.normalizeStyle(n.value),role:"button","aria-expanded":p.isChatOpen},[c.createVNode(c.unref(it),{class:c.normalizeClass(["tw:transition-all tw:flex tw:items-center tw:shadow-none header-title",s.value]),variant:o.value,size:p.configDesignClass.getKey("sections.top.params.size"),style:c.normalizeStyle(a.value),type:"button","aria-label":i.value,title:i.value},{default:c.withCtx(()=>[h.value&&p.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["header-logo",p.configDesignClass.getKey("sections.top.params.size")]),innerHTML:m.value},null,10,rc)):m.value&&p.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="text"?(c.openBlock(),c.createElementBlock("img",{key:1,src:m.value,alt:p.configDesignClass.getKey("sections.top.iconWidget.alt"),class:c.normalizeClass(p.configDesignClass.getKey("sections.top.params.size")==="sm"?"tw:w-3 tw:h-3":"tw:w-4 tw:h-4")},null,10,ic)):c.createCommentVNode("",!0),p.configDesignClass.getKey("sections.top.chipWidgetTitle.showType")!=="icon"?(c.openBlock(),c.createElementBlock("span",oc,c.toDisplayString(i.value),1)):c.createCommentVNode("",!0)]),_:1},8,["class","variant","size","style","aria-label","title"]),p.isChatOpen?(c.openBlock(),c.createElementBlock("div",ac,[c.createVNode(c.unref(it),{variant:l.value,class:c.normalizeClass(["tw:transition-all",[s.value]]),size:p.configDesignClass.getKey("sections.top.params.size"),style:c.normalizeStyle(f.value),type:"button","aria-label":g.value,title:g.value,onClick:c.withModifiers(p.restartChat,["stop"])},{default:c.withCtx(()=>[u.value!=="text"?(c.openBlock(),c.createElementBlock("svg",{key:0,width:p.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",height:p.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b[1]||(b[1]=[c.createElementVNode("path",{d:"M10.7935 1.33333H5.20683C2.78016 1.33333 1.3335 2.77999 1.3335 5.20666V10.7867C1.3335 13.22 2.78016 14.6667 5.20683 14.6667H10.7868C13.2135 14.6667 14.6602 13.22 14.6602 10.7933V5.20666C14.6668 2.77999 13.2202 1.33333 10.7935 1.33333ZM8.00016 12.1667C6.80683 12.1667 5.8735 11.5733 5.24016 10.9867V11.46C5.24016 11.7333 5.0135 11.96 4.74016 11.96C4.46683 11.96 4.24016 11.7333 4.24016 11.46V9.62666C4.24016 9.35333 4.46683 9.12666 4.74016 9.12666H6.3935C6.66683 9.12666 6.8935 9.35333 6.8935 9.62666C6.8935 9.89999 6.66683 10.1267 6.3935 10.1267H5.7935C6.28683 10.62 7.0535 11.1667 8.00016 11.1667C9.74683 11.1667 11.1668 9.74666 11.1668 8C11.1668 7.72666 11.3935 7.5 11.6668 7.5C11.9402 7.5 12.1668 7.72666 12.1668 8C12.1668 10.3 10.3002 12.1667 8.00016 12.1667ZM12.1668 6.35999C12.1668 6.37999 12.1668 6.39999 12.1668 6.41333C12.1602 6.48666 12.1402 6.55333 12.1068 6.61333C12.0735 6.67333 12.0268 6.72666 11.9668 6.77333C11.9202 6.80666 11.8668 6.83333 11.8068 6.85333C11.7602 6.86666 11.7135 6.87333 11.6668 6.87333H10.0468C9.7735 6.87333 9.54683 6.64666 9.54683 6.37333C9.54683 6.1 9.7735 5.87333 10.0468 5.87333H10.6002C10.0668 5.38 9.20683 4.83333 8.0135 4.83333C6.26683 4.83333 4.84683 6.25333 4.84683 8C4.84683 8.27333 4.62016 8.5 4.34683 8.5C4.0735 8.5 3.8335 8.27333 3.8335 8C3.8335 5.7 5.70016 3.83333 8.00016 3.83333C9.4335 3.83333 10.4868 4.45333 11.1668 5.04666V4.53999C11.1668 4.26666 11.3935 4.03999 11.6668 4.03999C11.9402 4.03999 12.1668 4.26666 12.1668 4.53999V6.35999Z",fill:"currentColor"},null,-1)]),8,lc)):c.createCommentVNode("",!0),u.value!=="icon"?(c.openBlock(),c.createElementBlock("span",cc," Restart ")):c.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"]),c.createVNode(c.unref(it),{variant:l.value,class:c.normalizeClass(["tw:transition-all",[s.value]]),size:p.configDesignClass.getKey("sections.top.params.size"),style:c.normalizeStyle(f.value),type:"button","aria-label":g.value,title:g.value,onClick:c.withModifiers(p.toggleChat,["stop"])},{default:c.withCtx(()=>[u.value!=="text"?(c.openBlock(),c.createElementBlock("svg",{key:0,width:p.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",height:p.configDesignClass.getKey("sections.top.params.size")==="sm"?"12":"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},b[2]||(b[2]=[c.createElementVNode("path",{d:"M10.7935 1.33337H5.20683C2.78016 1.33337 1.3335 2.78004 1.3335 5.20671V10.7867C1.3335 13.22 2.78016 14.6667 5.20683 14.6667H10.7868C13.2135 14.6667 14.6602 13.22 14.6602 10.7934V5.20671C14.6668 2.78004 13.2202 1.33337 10.7935 1.33337ZM12.3335 10.9334C12.3335 11.9334 11.9335 12.3334 10.9335 12.3334H8.40016C7.40016 12.3334 7.00016 11.9334 7.00016 10.9334V9.73337C7.00016 8.73337 7.40016 8.33337 8.40016 8.33337H10.9335C11.9335 8.33337 12.3335 8.73337 12.3335 9.73337V10.9334Z",fill:"currentColor"},null,-1)]),8,uc)):c.createCommentVNode("",!0),u.value!=="icon"?(c.openBlock(),c.createElementBlock("span",dc,c.toDisplayString(g.value),1)):c.createCommentVNode("",!0)]),_:1},8,["variant","class","size","style","aria-label","title","onClick"])])):c.createCommentVNode("",!0)],12,nc))}});typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const hc=r=>typeof r<"u";function fc(r){return JSON.parse(JSON.stringify(r))}function ho(r,e,t,s={}){var n,i,o;const{clone:a=!1,passive:l=!1,eventName:u,deep:d=!1,defaultValue:f,shouldEmit:g}=s,h=c.getCurrentInstance(),m=t||(h==null?void 0:h.emit)||((n=h==null?void 0:h.$emit)==null?void 0:n.bind(h))||((o=(i=h==null?void 0:h.proxy)==null?void 0:i.$emit)==null?void 0:o.bind(h==null?void 0:h.proxy));let p=u;e||(e="modelValue"),p=p||`update:${e.toString()}`;const b=y=>a?typeof a=="function"?a(y):fc(y):y,k=()=>hc(r[e])?b(r[e]):f,v=y=>{g?g(y)&&m(p,y):m(p,y)};if(l){const y=k(),_=c.ref(y);let w=!1;return c.watch(()=>r[e],C=>{w||(w=!0,_.value=b(C),c.nextTick(()=>w=!1))}),c.watch(_,C=>{!w&&(C!==r[e]||d)&&v(C)},{deep:d}),_}else return c.computed({get(){return k()},set(y){v(y)}})}const gc=c.defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=ho(t,"modelValue",e,{passive:!0,defaultValue:t.defaultValue});return(i,o)=>c.withDirectives((c.openBlock(),c.createElementBlock("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>c.isRef(n)?n.value=a:null),style:{resize:"none"},"data-slot":"textarea",class:c.normalizeClass(c.unref(Pn)("tw:md:text-sm",t.class))},null,2)),[[c.vModelText,c.unref(n)]])}});function mc(r){var y;const e=()=>c.unref(r.transcribeUrl),t=c.ref(!1),s=c.ref(!1),n=c.ref(!0),i=c.ref(null),o=c.ref(0);let a=null,l=[],u=null,d=null;const f=r.maxDuration;(typeof navigator>"u"||!((y=navigator.mediaDevices)!=null&&y.getUserMedia))&&(n.value=!1);const g=()=>{const _=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus","audio/ogg"];for(const w of _)if(MediaRecorder.isTypeSupported(w))return w;return"audio/webm"},h=async()=>{var _;if(!(!n.value||t.value))try{i.value=null,l=[],o.value=0,u=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,sampleRate:16e3}});const w=g();a=new MediaRecorder(u,{mimeType:w}),a.ondataavailable=C=>{C.data.size>0&&l.push(C.data)},a.onstop=async()=>{d&&(clearInterval(d),d=null);const C=new Blob(l,{type:w});u&&(u.getTracks().forEach(T=>T.stop()),u=null),await b(C)},a.onerror=()=>{i.value="Recording error",m()},a.start(250),t.value=!0,d=setInterval(()=>{o.value++,o.value>=f&&m()},1e3)}catch(w){w.name==="NotAllowedError"?i.value="Microphone access denied":w.name==="NotFoundError"?i.value="No microphone found":i.value=w.message||"Failed to start recording",i.value&&((_=r.onError)==null||_.call(r,i.value))}},m=()=>{a&&t.value&&(a.stop(),t.value=!1)},p=()=>{t.value?m():h()},b=async _=>{var C,T,x;s.value=!0,i.value=null;const w=e();if(!w){i.value="Transcribe URL not configured",(C=r.onError)==null||C.call(r,i.value),s.value=!1;return}try{const z=new FormData;z.append("audio",_,"recording.webm");const D=await fetch(w,{method:"POST",body:z});if(!D.ok)throw new Error(`HTTP ${D.status}`);const K=await D.json();if(K.success&&K.text)(T=r.onTranscript)==null||T.call(r,K.text);else throw new Error(K.error||"Transcription failed")}catch(z){i.value=z.message||"Transcription failed",i.value&&((x=r.onError)==null||x.call(r,i.value))}finally{s.value=!1}},k=c.computed(()=>{const _=Math.floor(o.value/60),w=o.value%60;return`${_}:${w.toString().padStart(2,"0")}`}),v=c.computed(()=>t.value||s.value);return{isRecording:t,isTranscribing:s,isSupported:n,isBusy:v,error:i,recordingDuration:o,formattedDuration:k,startRecording:h,stopRecording:m,toggleRecording:p}}const wc={key:0,class:"tw:transition-all tw:w-full"},bc={key:0,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},yc={key:1,width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},vc={key:2,width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",class:"tw:animate-spin"},kc={key:3,class:"tw:absolute tw:-top-6 tw:left-1/2 tw:-translate-x-1/2 tw:text-xs tw:text-white tw:bg-red-500 tw:px-2 tw:py-0.5 tw:rounded-full tw:whitespace-nowrap"},_c={key:0,class:"svg-icon"},Cc=["innerHTML"],xc={key:1},Sc=c.defineComponent({__name:"ChatBottom",props:{isProduction:{type:Boolean},configDesignClass:{},messageText:{},sendMessage:{type:Function},sectionBorderRadius:{},classSize:{},isInputDisabled:{type:Boolean},showReconnectNotice:{type:Boolean},restartChat:{type:Function},isStreaming:{type:Boolean},transcribeUrl:{}},emits:["update:messageText","trace"],setup(r,{emit:e}){const t=r,s=c.computed(()=>{var w;return t.transcribeUrl||((w=t.configDesignClass)==null?void 0:w.getKey("settings.transcribeUrl"))||""}),n=c.computed(()=>!!s.value),{isRecording:i,isTranscribing:o,isSupported:a,formattedDuration:l,toggleRecording:u}=mc({transcribeUrl:s,maxDuration:60,onTranscript:w=>{g.value=w},onError:w=>{console.error("Voice recording error:",w)}}),d=()=>{t.sendMessage()},g=ho(t,"messageText",e,{passive:!0}),h=c.computed(()=>{var w;return((w=t.configDesignClass)==null?void 0:w.getKey("sections.bottom.inputSend.inputStyle"))==="stacked"}),m=c.computed(()=>Xn(t.configDesignClass,"bottom")),p=c.computed(()=>{const w=t.configDesignClass.getKey("texts.topWarningText");return w&&w!=="undefined"?w:""}),b=c.computed(()=>{const w=t.configDesignClass.getKey("texts.disableInputText");return w&&w!=="undefined"?w:""}),k=c.computed(()=>t.configDesignClass.getKey("sections.bottom.inputSend.size")),v=c.computed(()=>t.isInputDisabled&&b.value?b.value:p.value||t.configDesignClass.getKey("texts.reconnectText")||"Reconnecting..."),y=c.computed(()=>t.configDesignClass.getKey("sections.bottom.btnSend.icon.showIcon")?t.configDesignClass.getKey("sections.bottom.btnSend.icon.src"):null),_=c.computed(()=>{const w=t.configDesignClass.getKey("texts.disclaimerText"),C=t.configDesignClass.getKey("texts.disclaimer"),T=w&&w!=="undefined"?w:C,z=!!t.configDesignClass.getKey("sections.bottom.params.disclaimerShow");return T&&T!=="undefined"&&z?T:""});return c.onMounted(()=>{console.log("ChatBottom mounted"),console.log(t),console.log(n,a)}),(w,C)=>(c.openBlock(),c.createElementBlock("div",null,[w.isProduction?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:"tw:flex tw:flex-row tw:gap-2",style:c.normalizeStyle({padding:h.value?"0":"0 "+w.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px"})},[c.createVNode(c.unref(it),{type:"button",style:c.normalizeStyle({backgroundColor:"#27272A",borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"}),class:"tw:flex-shrink-1 tw:flex-grow-1","aria-label":"Copy last message",title:"Copy last message",onClick:C[0]||(C[0]=c.withModifiers(T=>w.$emit("trace",{action:"copyLast"}),["stop"]))},{default:c.withCtx(()=>C[3]||(C[3]=[c.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c.createElementVNode("path",{opacity:"0.4",d:"M17.5 5.83464V14.168C17.5 16.668 16.25 18.3346 13.3333 18.3346H7.5C8.50833 17.5763 9.16667 16.3596 9.16667 15.0013C9.16667 12.7013 7.3 10.8346 5 10.8346C4.05833 10.8346 3.19167 11.143 2.5 11.668V5.83464C2.5 3.33464 3.75 1.66797 6.66667 1.66797H13.3333C16.25 1.66797 17.5 3.33464 17.5 5.83464Z",fill:"white"}),c.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.084 3.125C12.4292 3.125 12.709 3.40482 12.709 3.75V5.41667C12.709 5.98816 13.1792 6.45833 13.7507 6.45833H15.4173C15.7625 6.45833 16.0423 6.73816 16.0423 7.08333C16.0423 7.42851 15.7625 7.70833 15.4173 7.70833H13.7507C12.4888 7.70833 11.459 6.67851 11.459 5.41667V3.75C11.459 3.40482 11.7388 3.125 12.084 3.125Z",fill:"white"}),c.createElementVNode("path",{d:"M5.00065 10.832C2.70065 10.832 0.833984 12.6987 0.833984 14.9987C0.833984 17.2987 2.70065 19.1654 5.00065 19.1654C7.30065 19.1654 9.16732 17.2987 9.16732 14.9987C9.16732 12.6987 7.30065 10.832 5.00065 10.832ZM4.30065 16.057C4.50899 16.2654 4.50899 16.607 4.30065 16.8237C4.19232 16.932 4.05899 16.982 3.91733 16.982C3.77566 16.982 3.64231 16.932 3.53398 16.8237L2.09233 15.382C1.88399 15.1737 1.88399 14.832 2.09233 14.6153L3.53398 13.1737C3.74231 12.9654 4.08399 12.9654 4.30065 13.1737C4.50899 13.382 4.50899 13.7237 4.30065 13.9403L3.24233 14.9987L4.30065 16.057ZM7.90066 15.382L6.45898 16.8237C6.35065 16.932 6.21733 16.982 6.07566 16.982C5.93399 16.982 5.80064 16.932 5.69231 16.8237C5.48397 16.6154 5.48397 16.2737 5.69231 16.057L6.75066 14.9987L5.69231 13.9403C5.48397 13.732 5.48397 13.3904 5.69231 13.1737C5.90064 12.9654 6.24232 12.9654 6.45898 13.1737L7.90066 14.6153C8.10899 14.832 8.10899 15.1654 7.90066 15.382Z",fill:"white"})],-1),c.createTextVNode(" Log last function call ")])),_:1,__:[3]},8,["style"]),c.createVNode(c.unref(it),{type:"button",class:"tw:flex-shrink-1 tw:flex-grow-1",style:c.normalizeStyle({backgroundColor:"#27272A",borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"}),"aria-label":"Copy all",title:"Copy all",onClick:C[1]||(C[1]=c.withModifiers(T=>w.$emit("trace",{action:"copyAll"}),["stop"]))},{default:c.withCtx(()=>C[4]||(C[4]=[c.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c.createElementVNode("path",{opacity:"0.4",d:"M17.5 5.83464V14.168C17.5 16.668 16.25 18.3346 13.3333 18.3346H6.66667C3.75 18.3346 2.5 16.668 2.5 14.168V5.83464C2.5 3.33464 3.75 1.66797 6.66667 1.66797H13.3333C16.25 1.66797 17.5 3.33464 17.5 5.83464Z",fill:"white"}),c.createElementVNode("path",{d:"M15.4173 7.70833H13.7507C12.484 7.70833 11.459 6.68333 11.459 5.41667V3.75C11.459 3.40833 11.7423 3.125 12.084 3.125C12.4257 3.125 12.709 3.40833 12.709 3.75V5.41667C12.709 5.99167 13.1757 6.45833 13.7507 6.45833H15.4173C15.759 6.45833 16.0423 6.74167 16.0423 7.08333C16.0423 7.425 15.759 7.70833 15.4173 7.70833Z",fill:"white"}),c.createElementVNode("path",{d:"M8.33255 14.7922C8.17422 14.7922 8.01589 14.7339 7.89089 14.6089L6.22422 12.9422C5.98255 12.7006 5.98255 12.3005 6.22422 12.0589L7.89089 10.3922C8.13255 10.1505 8.53255 10.1505 8.77422 10.3922C9.01588 10.6339 9.01588 11.0339 8.77422 11.2756L7.54922 12.5005L8.77422 13.7255C9.01588 13.9672 9.01588 14.3672 8.77422 14.6089C8.64922 14.7339 8.49088 14.7922 8.33255 14.7922Z",fill:"white"}),c.createElementVNode("path",{d:"M11.6659 14.7922C11.5076 14.7922 11.3492 14.7339 11.2242 14.6089C10.9826 14.3672 10.9826 13.9672 11.2242 13.7255L12.4492 12.5005L11.2242 11.2756C10.9826 11.0339 10.9826 10.6339 11.2242 10.3922C11.4659 10.1505 11.8659 10.1505 12.1076 10.3922L13.7742 12.0589C14.0159 12.3005 14.0159 12.7006 13.7742 12.9422L12.1076 14.6089C11.9826 14.7339 11.8242 14.7922 11.6659 14.7922Z",fill:"white"})],-1),c.createTextVNode(" Log all function calls ")])),_:1,__:[4]},8,["style"])],4)),c.createElementVNode("div",{class:"tw:transition-all tw:flex tw:flex-col tw:items-center tw:relative tw:mt-2",style:c.normalizeStyle({padding:h.value?"0":"0 "+w.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px"})},[w.showReconnectNotice||p.value||w.isInputDisabled?(c.openBlock(),c.createElementBlock("div",wc,[c.createVNode(un,{class:"tw:rounded-b-none tw:mx-0 tw:flex tw:justify-center tw:item s-center tw:px-2 tw:py-2",type:"reconnecting",configDesignClass:w.configDesignClass,headlineText:v.value,restartChat:w.restartChat,warningElement:w.isInputDisabled?w.configDesignClass.getKeyObject("sections.warnings.disableInputIssue"):w.configDesignClass.getKeyObject("sections.warnings.reconnectIssue")},null,8,["configDesignClass","headlineText","restartChat","warningElement"])])):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass(["message-input tw:transition-all tw:flex-1 tw:w-full tw:p-0 tw:gap-[10px] tw:flex",[w.classSize,h.value?"tw:flex-col tw:items-stretch tw:justify-between":" tw:items-end",k.value==="sm"?"tw:items-center":""]]),style:c.normalizeStyle({...h.value?{borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px",borderTopLeftRadius:"0px",borderTopRightRadius:"0px"}:{borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.inputSend.borderRadius")+"px"},"background-color":w.configDesignClass.getKey("sections.bottom.inputSend.bgColor"),"margin-bottom":h.value?"0px":w.configDesignClass.getKey("sections.bottom.inputSend.sidePadding")+"px",border:h.value?"none":`${w.configDesignClass.getKey("sections.bottom.inputSend.borderWidth")}px solid ${w.configDesignClass.getKey("sections.bottom.inputSend.borderColor")}`})},[(c.openBlock(),c.createBlock(c.unref(gc),{class:c.normalizeClass(["tw:transition-all",["tw:w-full tw:outline-none tw:border-0 focus:tw:outline-none",h.value?"tw:h-auto rounded-none":"h-full"]]),placeholder:w.configDesignClass.getKey("texts.inputPlaceholder")||"Type question",rows:k.value==="sm"?1:k.value==="md"?2:3,key:w.configDesignClass.getKey("sections.bottom.inputSend.color"),modelValue:c.unref(g),"onUpdate:modelValue":C[2]||(C[2]=T=>c.isRef(g)?g.value=T:null),onKeyup:c.withKeys(c.withModifiers(d,["exact"]),["enter"]),style:c.normalizeStyle({color:w.configDesignClass.getKey("sections.bottom.inputSend.color"),fontSize:w.configDesignClass.getKey("sections.bottom.inputSend.fontSize")+"px",lineHeight:w.configDesignClass.getKey("settings.lineHeight"),padding:w.configDesignClass.getKey("sections.bottom.inputSend.paddingVertical")+"px "+w.configDesignClass.getKey("sections.bottom.inputSend.paddingHorizontal")+"px",height:w.configDesignClass.getKey("sections.bottom.inputSend.height")+"px"})},null,8,["placeholder","rows","modelValue","onKeyup","class","style"])),c.createElementVNode("div",{class:c.normalizeClass(h.value?"tw:flex tw:flex-row-reverse tw:justify-between tw:items-center tw:gap-2 tw:pl-3":"tw:flex tw:ml-auto tw:items-center tw:gap-2"),style:c.normalizeStyle({marginBottom:w.configDesignClass.getKey("sections.bottom.inputSend.paddingVertical")+"px",marginRight:w.configDesignClass.getKey("sections.bottom.inputSend.paddingHorizontal")+"px"})},[n.value&&c.unref(a)?(c.openBlock(),c.createBlock(c.unref(it),{key:0,type:"button",class:c.normalizeClass(["btn-voice tw:relative tw:flex-shrink-0 tw:rounded-full tw:p-2 tw:transition-all tw:duration-200",c.unref(i)?"tw:bg-red-500 voice-recording":"tw:bg-white/10 hover:tw:bg-white/20",{"tw:opacity-50 tw:cursor-not-allowed":c.unref(o)||w.isInputDisabled}]),style:c.normalizeStyle({color:c.unref(i)?"#fff":w.configDesignClass.getKey("sections.bottom.inputSend.color")||"#fff"}),disabled:c.unref(o)||w.isInputDisabled,onClick:c.unref(u),title:c.unref(i)?"Stop recording":"Start voice input"},{default:c.withCtx(()=>[!c.unref(i)&&!c.unref(o)?(c.openBlock(),c.createElementBlock("svg",bc,C[5]||(C[5]=[c.createElementVNode("path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"},null,-1),c.createElementVNode("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),c.createElementVNode("line",{x1:"12",x2:"12",y1:"19",y2:"22"},null,-1)]))):c.unref(i)?(c.openBlock(),c.createElementBlock("svg",yc,C[6]||(C[6]=[c.createElementVNode("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)]))):(c.openBlock(),c.createElementBlock("svg",vc,C[7]||(C[7]=[c.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"2",opacity:"0.25"},null,-1),c.createElementVNode("path",{d:"M12 2a10 10 0 0 1 10 10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]))),c.unref(i)?(c.openBlock(),c.createElementBlock("span",kc,c.toDisplayString(c.unref(l)),1)):c.createCommentVNode("",!0)]),_:1},8,["class","style","disabled","onClick","title"])):c.createCommentVNode("",!0),c.createVNode(c.unref(it),{class:c.normalizeClass(["tw:transition-all",["btn-send tw:bg-transparent tw:shadow-none tw:flex-shrink-0 tw:items-center tw:gap-1",w.configDesignClass.getKey("sections.bottom.btnSend.showType")==="icon"?"tw:rounded-full":m.value,h.value?"tw:self-end":"tw:ml-auto",{"tw:opacity-50":c.unref(g).trim()===""||w.isInputDisabled},{"tw:px-3 tw:py-2":w.configDesignClass.getKey("sections.bottom.btnSend.size")==="md"},{"tw:px-2 tw:py-1":w.configDesignClass.getKey("sections.bottom.btnSend.size")==="sm"},{"tw:px-4 tw:py-3":w.configDesignClass.getKey("sections.bottom.btnSend.size")==="lg"}]]),size:w.configDesignClass.getKey("sections.bottom.btnSend.showType")==="icon"?"icon":w.configDesignClass.getKey("sections.bottom.params.size"),onClick:d,style:c.normalizeStyle({...w.configDesignClass.getKey("sections.bottom.btnSend.type")==="icon"?{borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.btnSend.borderRadius")+"px"}:{borderRadius:w.configDesignClass.getKey("settings.globalRoundingRadius")?w.sectionBorderRadius.borderRadius:w.configDesignClass.getKey("sections.bottom.btnSend.borderRadius")+"px"},color:w.configDesignClass.getKey("sections.bottom.btnSend.color"),"background-color":w.configDesignClass.getKey("sections.bottom.btnSend.bgColor"),fontSize:w.configDesignClass.getKey("sections.bottom.btnSend.fontSize")+"px",border:w.configDesignClass.getKey("sections.bottom.btnSend.borderWidth")+"px solid "+w.configDesignClass.getKey("sections.bottom.btnSend.borderColor")}),disabled:w.isInputDisabled},{default:c.withCtx(()=>[y.value?(c.openBlock(),c.createElementBlock("div",_c,[c.createElementVNode("div",{innerHTML:y.value,style:c.normalizeStyle({color:w.configDesignClass.getKey("sections.bottom.btnSend.color"),width:w.configDesignClass.getKey("sections.bottom.btnSend.icon.size")+"px",height:w.configDesignClass.getKey("sections.bottom.btnSend.icon.size")+"px"})},null,12,Cc)])):c.createCommentVNode("",!0),w.configDesignClass.getKey("sections.bottom.btnSend.showType")==="text"||w.configDesignClass.getKey("sections.bottom.btnSend.showType")==="both"?(c.openBlock(),c.createElementBlock("span",xc,c.toDisplayString(w.configDesignClass.getKey("texts.sendButton")),1)):c.createCommentVNode("",!0)]),_:1},8,["size","class","style","disabled"]),h.value&&_.value?(c.openBlock(),c.createElementBlock("div",{key:1,class:"tw:text-[11px] tw:text-white/50 tw:flex tw:items-center",style:c.normalizeStyle({...w.sectionBorderRadius,fontSize:w.configDesignClass.getKey("sections.bottom.disclaimer.fontSize")+"px",height:w.configDesignClass.getKey("sections.bottom.disclaimer.height")+"px",color:w.configDesignClass.getKey("sections.bottom.disclaimer.color")})},c.toDisplayString(_.value),5)):c.createCommentVNode("",!0)],6)],6),!h.value&&_.value?(c.openBlock(),c.createElementBlock("div",{key:1,class:"tw:px-2 tw:text-white/50 tw:mb-2 tw:flex tw:items-center tw:justify-center",style:c.normalizeStyle({...w.sectionBorderRadius,fontSize:w.configDesignClass.getKey("sections.bottom.disclaimer.fontSize")+"px",height:w.configDesignClass.getKey("sections.bottom.disclaimer.height")+"px",color:w.configDesignClass.getKey("sections.bottom.disclaimer.color")})},c.toDisplayString(_.value),5)):c.createCommentVNode("",!0)],4)]))}});var ne=(r=>(r.Collapsed="collapsed",r.EmptyChat="empty",r.Messages="messages",r.ActionSnippet="action_snippet",r.LaunchIssue="launch_issue",r.ConnectionIssue="connection_issue",r.ReconnectingAttempt="reconnecting_attempt",r.InputBlocked="input_blocked",r.ActionLoader="action_loader",r.TracesMessage="traces_message",r.TracesWithMeta="traces_with_meta",r))(ne||{}),fo=(r=>(r.UserMessage="Give me some action",r))(fo||{});class Ue{base(e){return{isChatOpen:!0,isChatActive:!0,messages:[],isConnectionError:!1,isProcessError:!1,isReconnectError:!1,isInputDisabled:!1,showWelcome:!1,blockSocket:!0,traceLastShown:!1,...e}}}class Tc extends Ue{constructor(){super(...arguments);O(this,"type",ne.Collapsed)}getState(){return this.base({isChatOpen:!1})}}class Nr extends Ue{constructor(){super(...arguments);O(this,"type",ne.EmptyChat)}getState(){return this.base({showWelcome:!0,messages:[]})}}class zc extends Ue{constructor(){super(...arguments);O(this,"type",ne.Messages)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=(s==null?void 0:s.botMessageText)??"What sort of action do you want?";return this.base({showWelcome:!0,messages:[{text:n,isUser:!0},{text:i,isUser:!1},{text:"Sort of action",isUser:!0}]})}}class Rc extends Ue{constructor(){super(...arguments);O(this,"type",ne.ActionSnippet)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action";return this.base({showWelcome:!1,messages:[{text:n,isUser:!0},{snippet:{sequence:"38952101547613990",id:"38496103561174822",data:{actionCancel:{text:"Cancel"},actionConfirm:{text:"Confirm"},title:{text:"Do you really want to get the available contacts list?"}}},isUser:!1}]})}}class Ec extends Ue{constructor(){super(...arguments);O(this,"type",ne.LaunchIssue)}getState(){return this.base({isConnectionError:!0})}}class Mc extends Ue{constructor(){super(...arguments);O(this,"type",ne.ConnectionIssue)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isProcessError:!0,showWelcome:i,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Bc extends Ue{constructor(){super(...arguments);O(this,"type",ne.ReconnectingAttempt)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isReconnectError:!0,showReconnectNotice:!0,showWelcome:i,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Pc extends Ue{constructor(){super(...arguments);O(this,"type",ne.InputBlocked)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=!0,o=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"];return this.base({isReconnectError:!0,showReconnectNotice:!0,isInputDisabled:!0,showWelcome:i,messages:[{text:n,isUser:!0},{text:o[0],isUser:!1,isSystem:!0,type:"trace"},{text:o[1],isUser:!1,isSystem:!0,type:"trace"},{text:o[2],isUser:!1,isSystem:!0,type:"trace"}]})}}class Ac extends Ue{constructor(){super(...arguments);O(this,"type",ne.ActionLoader)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action";return this.base({showWelcome:!0,messages:[{text:n,isUser:!0}]})}}class Dc extends Ue{constructor(){super(...arguments);O(this,"type",ne.TracesMessage)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=(s==null?void 0:s.traceSteps)??["Step One","Step Two","Step three"],o=[{text:n,isUser:!0},{text:i[0],isUser:!1,isSystem:!0,type:"trace"},{text:i[1],isUser:!1,isSystem:!0,type:"trace"},{text:i[2],isUser:!1,isSystem:!0,type:"trace"}];return this.base({showWelcome:!0,messages:o})}}class Lc extends Ue{constructor(){super(...arguments);O(this,"type",ne.TracesWithMeta)}getState(t,s){const n=(s==null?void 0:s.userMessageText)??"Give me some action",i=(s==null?void 0:s.traceSteps)??["Step One","API Schema Requested","API Call Conducted","API Call Conducted"],o=[{text:n,isUser:!0},{text:i[0],isUser:!1,isSystem:!0,type:"trace",meta:{step:1}},{text:i[1],isUser:!1,isSystem:!0,type:"trace",meta:{step:2,json:{status:"requested",endpoint:"/v1/schema"}}},{text:i[2],isUser:!1,isSystem:!0,type:"trace",meta:{step:3,json:{status:"ok",code:200}}},{text:i[3],isUser:!1,isSystem:!0,type:"trace"}];return this.base({showWelcome:!0,messages:o})}}class Ic{static create(e){switch(e){case ne.Collapsed:case"collapsed":return new Tc;case ne.EmptyChat:case"empty":return new Nr;case ne.Messages:case"messages":return new zc;case ne.ActionSnippet:case"action_snippet":return new Rc;case ne.LaunchIssue:case"launch_issue":return new Ec;case ne.ConnectionIssue:case"connection_issue":return new Mc;case ne.ReconnectingAttempt:case"reconnecting_attempt":return new Bc;case ne.InputBlocked:case"input_blocked":return new Pc;case ne.ActionLoader:case"action_loader":return new Ac;case ne.TracesMessage:case"traces_message":return new Dc;case ne.TracesWithMeta:case"traces_with_meta":return new Lc;default:return new Nr}}}class Fr{static getScenarioFromUrl(){try{return new URLSearchParams(window.location.search).get("scenario")??void 0}catch{return}}static getState(e,t,s){return{...Ic.create(e).getState(t,s),...s??{}}}}function Oc(r){const e=c.ref(!1),t=c.ref(!1),s=c.ref(null);let n=null,i=null;const o=()=>c.unref(r.ttsUrl),a=()=>{n&&(n.pause(),n.src="",n=null),i&&(URL.revokeObjectURL(i),i=null)},l=async h=>{const m=o();if(!m)throw s.value="TTS URL not configured",new Error(s.value);if(!(h!=null&&h.trim()))throw s.value="No text to speak",new Error(s.value);f(),t.value=!0,s.value=null;try{const p=await fetch(m,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:h.trim(),voice:r.voice||"nova"})});if(!p.ok){const k=await p.json().catch(()=>({}));throw new Error(k.error||`TTS request failed: ${p.status}`)}const b=await p.blob();return i=URL.createObjectURL(b),new Promise((k,v)=>{n=new Audio(i),n.onplay=()=>{e.value=!0,t.value=!1},n.onended=()=>{e.value=!1,a(),k()},n.onerror=()=>{e.value=!1,t.value=!1,s.value="Audio playback failed",a(),v(s.value)},n.play().catch(y=>{t.value=!1,s.value=y.message,v(y)})})}catch(p){throw t.value=!1,s.value=p.message||"TTS failed",p}},u=()=>{n&&e.value&&(n.pause(),e.value=!1)},d=()=>{n&&!e.value&&(n.play(),e.value=!0)},f=()=>{e.value=!1,t.value=!1,a()},g=h=>{e.value?u():n&&n.paused&&n.currentTime>0?d():h&&l(h)};return c.onUnmounted(()=>{f()}),{isSpeaking:e,isLoading:t,error:s,speak:l,pause:u,resume:d,stop:f,toggle:g}}const $c="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpolygon%20points='11%205%206%209%202%209%202%2015%206%2015%2011%2019%2011%205'/%3e%3cpath%20d='M15.54%208.46a5%205%200%200%201%200%207.07'/%3e%3cpath%20d='M19.07%204.93a10%2010%200%200%201%200%2014.14'/%3e%3c/svg%3e",Vc="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpolygon%20points='11%205%206%209%202%209%202%2015%206%2015%2011%2019%2011%205'/%3e%3cline%20x1='22'%20y1='9'%20x2='16'%20y2='15'/%3e%3cline%20x1='16'%20y1='9'%20x2='22'%20y2='15'/%3e%3c/svg%3e";function Qn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mt=Qn();function go(r){Mt=r}var ls={exec:()=>null};function H(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(n,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(be.caret,"$1"),t=t.replace(n,o),s},getRegex:()=>new RegExp(t,e)};return s}var Kc=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),be={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Nc=/^(?:[ \t]*(?:\n|$))+/,Fc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Uc=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,bs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Jn=/(?:[*+-]|\d{1,9}[.)])/,mo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,wo=H(mo).replace(/bull/g,Jn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Hc=H(mo).replace(/bull/g,Jn).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),er=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,jc=/^[^\n]+/,tr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,qc=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",tr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gc=H(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Jn).getRegex(),Fs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",sr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zc=H("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",sr).replace("tag",Fs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bo=H(er).replace("hr",bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fs).getRegex(),Yc=H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bo).getRegex(),nr={blockquote:Yc,code:Fc,def:qc,fences:Uc,heading:Wc,hr:bs,html:Zc,lheading:wo,list:Gc,newline:Nc,paragraph:bo,table:ls,text:jc},Ur=H("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fs).getRegex(),Xc={...nr,lheading:Hc,table:Ur,paragraph:H(er).replace("hr",bs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ur).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fs).getRegex()},Qc={...nr,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",sr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ls,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(er).replace("hr",bs).replace("heading",` *#{1,6} *[^
27
+ ]`).replace("lheading",wo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Jc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,eu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yo=/^( {2,}|\\)\n(?!\s*$)/,tu=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Us=/[\p{P}\p{S}]/u,rr=/[\s\p{P}\p{S}]/u,vo=/[^\s\p{P}\p{S}]/u,su=H(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,rr).getRegex(),ko=/(?!~)[\p{P}\p{S}]/u,nu=/(?!~)[\s\p{P}\p{S}]/u,ru=/(?:[^\s\p{P}\p{S}]|~)/u,iu=H(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Kc?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),_o=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ou=H(_o,"u").replace(/punct/g,Us).getRegex(),au=H(_o,"u").replace(/punct/g,ko).getRegex(),Co="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",lu=H(Co,"gu").replace(/notPunctSpace/g,vo).replace(/punctSpace/g,rr).replace(/punct/g,Us).getRegex(),cu=H(Co,"gu").replace(/notPunctSpace/g,ru).replace(/punctSpace/g,nu).replace(/punct/g,ko).getRegex(),uu=H("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,vo).replace(/punctSpace/g,rr).replace(/punct/g,Us).getRegex(),du=H(/\\(punct)/,"gu").replace(/punct/g,Us).getRegex(),pu=H(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),hu=H(sr).replace("(?:-->|$)","-->").getRegex(),fu=H("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",hu).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Is=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,gu=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Is).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xo=H(/^!?\[(label)\]\[(ref)\]/).replace("label",Is).replace("ref",tr).getRegex(),So=H(/^!?\[(ref)\](?:\[\])?/).replace("ref",tr).getRegex(),mu=H("reflink|nolink(?!\\()","g").replace("reflink",xo).replace("nolink",So).getRegex(),Wr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ir={_backpedal:ls,anyPunctuation:du,autolink:pu,blockSkip:iu,br:yo,code:eu,del:ls,emStrongLDelim:ou,emStrongRDelimAst:lu,emStrongRDelimUnd:uu,escape:Jc,link:gu,nolink:So,punctuation:su,reflink:xo,reflinkSearch:mu,tag:fu,text:tu,url:ls},wu={...ir,link:H(/^!?\[(label)\]\((.*?)\)/).replace("label",Is).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Is).getRegex()},Rn={...ir,emStrongRDelimAst:cu,emStrongLDelim:au,url:H(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Wr).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:H(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Wr).getRegex()},bu={...Rn,br:H(yo).replace("{2,}","*").getRegex(),text:H(Rn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xs={normal:nr,gfm:Xc,pedantic:Qc},Jt={normal:ir,gfm:Rn,breaks:bu,pedantic:wu},yu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Hr=r=>yu[r];function st(r,e){if(e){if(be.escapeTest.test(r))return r.replace(be.escapeReplace,Hr)}else if(be.escapeTestNoEncode.test(r))return r.replace(be.escapeReplaceNoEncode,Hr);return r}function jr(r){try{r=encodeURI(r).replace(be.percentDecode,"%")}catch{return null}return r}function qr(r,e){var i;let t=r.replace(be.findPipe,(o,a,l)=>{let u=!1,d=a;for(;--d>=0&&l[d]==="\\";)u=!u;return u?"|":" |"}),s=t.split(be.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(be.slashPipe,"|");return s}function es(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s&&r.charAt(s-n-1)===e;)n++;return r.slice(0,s-n)}function vu(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function Gr(r,e,t,s,n){let i=e.href,o=e.title||null,a=r[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,l}function ku(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
28
+ `).map(i=>{let o=i.match(t.other.beginningSpace);if(o===null)return i;let[a]=o;return a.length>=n.length?i.slice(n.length):i}).join(`
29
+ `)}var Os=class{constructor(r){O(this,"options");O(this,"rules");O(this,"lexer");this.options=r||Mt}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:es(t,`
30
+ `)}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=ku(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=es(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(t=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:es(e[0],`
31
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=es(e[0],`
32
+ `).split(`
33
+ `),s="",n="",i=[];for(;t.length>0;){let o=!1,a=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))a.push(t[l]),o=!0;else if(!o)a.push(t[l]);else break;t=t.slice(l);let u=a.join(`
34
+ `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
35
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
36
+ ${u}`:u,n=n?`${n}
37
+ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,t.length===0)break;let g=i.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let h=g,m=h.raw+`
38
+ `+t.join(`
39
+ `),p=this.blockquote(m);i[i.length-1]=p,s=s.substring(0,s.length-h.raw.length)+p.raw,n=n.substring(0,n.length-h.text.length)+p.text;break}else if((g==null?void 0:g.type)==="list"){let h=g,m=h.raw+`
40
+ `+t.join(`
41
+ `),p=this.list(m);i[i.length-1]=p,s=s.substring(0,s.length-g.raw.length)+p.raw,n=n.substring(0,n.length-h.raw.length)+p.raw,t=m.substring(i.at(-1).raw.length).split(`
42
+ `);continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(r){var t,s;let e=this.rules.block.list.exec(r);if(e){let n=e[1].trim(),i=n.length>1,o={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let a=this.rules.other.listItemRegex(n),l=!1;for(;r;){let d=!1,f="",g="";if(!(e=a.exec(r))||this.rules.block.hr.test(r))break;f=e[0],r=r.substring(f.length);let h=e[2].split(`
43
+ `,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),m=r.split(`
44
+ `,1)[0],p=!h.trim(),b=0;if(this.options.pedantic?(b=2,g=h.trimStart()):p?b=e[1].length+1:(b=e[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,g=h.slice(b),b+=e[1].length),p&&this.rules.other.blankLine.test(m)&&(f+=m+`
45
+ `,r=r.substring(m.length+1),d=!0),!d){let k=this.rules.other.nextBulletRegex(b),v=this.rules.other.hrRegex(b),y=this.rules.other.fencesBeginRegex(b),_=this.rules.other.headingBeginRegex(b),w=this.rules.other.htmlBeginRegex(b);for(;r;){let C=r.split(`
46
+ `,1)[0],T;if(m=C,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),T=m):T=m.replace(this.rules.other.tabCharGlobal," "),y.test(m)||_.test(m)||w.test(m)||k.test(m)||v.test(m))break;if(T.search(this.rules.other.nonSpaceChar)>=b||!m.trim())g+=`
47
+ `+T.slice(b);else{if(p||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||y.test(h)||_.test(h)||v.test(h))break;g+=`
48
+ `+m}!p&&!m.trim()&&(p=!0),f+=C+`
49
+ `,r=r.substring(C.length+1),h=T.slice(b)}}o.loose||(l?o.loose=!0:this.rules.other.doubleBlankLine.test(f)&&(l=!0)),o.items.push({type:"list_item",raw:f,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),o.raw+=f}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d of o.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((t=d.tokens[0])==null?void 0:t.type)==="text"||((s=d.tokens[0])==null?void 0:s.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}}let f=this.rules.other.listTaskCheckbox.exec(d.raw);if(f){let g={type:"checkbox",raw:f[0]+" ",checked:f[0]!=="[ ]"};d.checked=g.checked,o.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=g.raw+d.tokens[0].raw,d.tokens[0].text=g.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(g)):d.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):d.tokens.unshift(g)}}if(!o.loose){let f=d.tokens.filter(h=>h.type==="space"),g=f.length>0&&f.some(h=>this.rules.other.anyLine.test(h.raw));o.loose=g}}if(o.loose)for(let d of o.items){d.loose=!0;for(let f of d.tokens)f.type==="text"&&(f.type="paragraph")}return o}}html(r){let e=this.rules.block.html.exec(r);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:s,title:n}}}table(r){var o;let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=qr(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
50
+ `):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<t.length;a++)i.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:i.align[a]});for(let a of n)i.rows.push(qr(a,i.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[u]})));return i}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
51
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let i=es(t.slice(0,-1),"\\");if((t.length-i.length)%2===0)return}else{let i=vu(e[2],"()");if(i===-2)return;if(i>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],n=i[3])}else n=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),Gr(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[s.toLowerCase()];if(!n){let i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return Gr(t,n,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||s[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,i,o,a=n,l=0,u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*r.length+n);(s=u.exec(e))!=null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(o=[...i].length,s[3]||s[4]){a+=o;continue}else if((s[5]||s[6])&&n%3&&!((n+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let d=[...s[0]][0].length,f=r.slice(0,n+s.index+d+o);if(Math.min(n,o)%2){let h=f.slice(1,-1);return{type:"em",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}let g=f.slice(2,-2);return{type:"strong",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r){let e=this.rules.inline.del.exec(r);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,tokens:[{type:"text",raw:t,text:t}]}}}url(r){var t;let e;if(e=this.rules.inline.url.exec(r)){let s,n;if(e[2]==="@")s=e[0],n="mailto:"+s;else{let i;do i=e[0],e[0]=((t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])??"";while(i!==e[0]);s=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:s,href:n,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Ke=class En{constructor(e){O(this,"tokens");O(this,"options");O(this,"state");O(this,"inlineQueue");O(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Mt,this.options.tokenizer=this.options.tokenizer||new Os,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:be,block:xs.normal,inline:Jt.normal};this.options.pedantic?(t.block=xs.pedantic,t.inline=Jt.pedantic):this.options.gfm&&(t.block=xs.gfm,this.options.breaks?t.inline=Jt.breaks:t.inline=Jt.gfm),this.tokenizer.rules=t}static get rules(){return{block:xs,inline:Jt}}static lex(e,t){return new En(t).lex(e)}static lexInline(e,t){return new En(t).inlineTokens(e)}lex(e){e=e.replace(be.carriageReturn,`
52
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){var n,i,o;for(this.options.pedantic&&(e=e.replace(be.tabCharGlobal," ").replace(be.spaceLine,""));e;){let a;if((i=(n=this.options.extensions)==null?void 0:n.block)!=null&&i.some(u=>(a=u.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let u=t.at(-1);a.raw.length===1&&u!==void 0?u.raw+=`
53
+ `:t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
54
+ `)?"":`
55
+ `)+a.raw,u.text+=`
56
+ `+a.text,this.inlineQueue.at(-1).src=u.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
57
+ `)?"":`
58
+ `)+a.raw,u.text+=`
59
+ `+a.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let l=e;if((o=this.options.extensions)!=null&&o.startBlock){let u=1/0,d=e.slice(1),f;this.options.extensions.startBlock.forEach(g=>{f=g.call({lexer:this},d),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){let u=t.at(-1);s&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(`
60
+ `)?"":`
61
+ `)+a.raw,u.text+=`
62
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(a),s=l.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
63
+ `)?"":`
64
+ `)+a.raw,u.text+=`
65
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(a);continue}if(e){let u="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var l,u,d,f,g;let s=e,n=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)h.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)i=n[2]?n[2].length:0,s=s.slice(0,n.index+i)+"["+"a".repeat(n[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=((u=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:u.call({lexer:this},s))??s;let o=!1,a="";for(;e;){o||(a=""),o=!1;let h;if((f=(d=this.options.extensions)==null?void 0:d.inline)!=null&&f.some(p=>(h=p.call({lexer:this},e,t))?(e=e.substring(h.raw.length),t.push(h),!0):!1))continue;if(h=this.tokenizer.escape(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.tag(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.link(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(h.raw.length);let p=t.at(-1);h.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(h=this.tokenizer.emStrong(e,s,a)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.codespan(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.br(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.del(e)){e=e.substring(h.raw.length),t.push(h);continue}if(h=this.tokenizer.autolink(e)){e=e.substring(h.raw.length),t.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(e))){e=e.substring(h.raw.length),t.push(h);continue}let m=e;if((g=this.options.extensions)!=null&&g.startInline){let p=1/0,b=e.slice(1),k;this.options.extensions.startInline.forEach(v=>{k=v.call({lexer:this},b),typeof k=="number"&&k>=0&&(p=Math.min(p,k))}),p<1/0&&p>=0&&(m=e.substring(0,p+1))}if(h=this.tokenizer.inlineText(m)){e=e.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(a=h.raw.slice(-1)),o=!0;let p=t.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=h.raw,p.text+=h.text):t.push(h);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},$s=class{constructor(r){O(this,"options");O(this,"parser");this.options=r||Mt}space(r){return""}code({text:r,lang:e,escaped:t}){var i;let s=(i=(e||"").match(be.notSpaceStart))==null?void 0:i[0],n=r.replace(be.endingNewline,"")+`
66
+ `;return s?'<pre><code class="language-'+st(s)+'">'+(t?n:st(n,!0))+`</code></pre>
67
+ `:"<pre><code>"+(t?n:st(n,!0))+`</code></pre>
68
+ `}blockquote({tokens:r}){return`<blockquote>
69
+ ${this.parser.parse(r)}</blockquote>
70
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
71
+ `}hr(r){return`<hr>
72
+ `}list(r){let e=r.ordered,t=r.start,s="";for(let o=0;o<r.items.length;o++){let a=r.items[o];s+=this.listitem(a)}let n=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+n+i+`>
73
+ `+s+"</"+n+`>
74
+ `}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
75
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
76
+ `}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let s="";for(let n=0;n<r.rows.length;n++){let i=r.rows[n];t="";for(let o=0;o<i.length;o++)t+=this.tablecell(i[o]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
77
+ <thead>
78
+ `+e+`</thead>
79
+ `+s+`</table>
80
+ `}tablerow({text:r}){return`<tr>
81
+ ${r}</tr>
82
+ `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
83
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${st(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,tokens:t}){let s=this.parser.parseInline(t),n=jr(r);if(n===null)return s;r=n;let i='<a href="'+r+'"';return e&&(i+=' title="'+st(e)+'"'),i+=">"+s+"</a>",i}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let n=jr(r);if(n===null)return st(t);r=n;let i=`<img src="${r}" alt="${t}"`;return e&&(i+=` title="${st(e)}"`),i+=">",i}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:st(r.text)}},or=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},Ne=class Mn{constructor(e){O(this,"options");O(this,"renderer");O(this,"textRenderer");this.options=e||Mt,this.options.renderer=this.options.renderer||new $s,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new or}static parse(e,t){return new Mn(t).parse(e)}static parseInline(e,t){return new Mn(t).parseInline(e)}parse(e){var s,n;let t="";for(let i=0;i<e.length;i++){let o=e[i];if((n=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&n[o.type]){let l=o,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){t+=u||"";continue}}let a=o;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return t}parseInline(e,t=this.renderer){var n,i;let s="";for(let o=0;o<e.length;o++){let a=e[o];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[a.type]){let u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=u||"";continue}}let l=a;switch(l.type){case"escape":{s+=t.text(l);break}case"html":{s+=t.html(l);break}case"link":{s+=t.link(l);break}case"image":{s+=t.image(l);break}case"checkbox":{s+=t.checkbox(l);break}case"strong":{s+=t.strong(l);break}case"em":{s+=t.em(l);break}case"codespan":{s+=t.codespan(l);break}case"br":{s+=t.br(l);break}case"del":{s+=t.del(l);break}case"text":{s+=t.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return s}},Ss,rs=(Ss=class{constructor(r){O(this,"options");O(this,"block");this.options=r||Mt}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(){return this.block?Ke.lex:Ke.lexInline}provideParser(){return this.block?Ne.parse:Ne.parseInline}},O(Ss,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),O(Ss,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ss),_u=class{constructor(...r){O(this,"defaults",Qn());O(this,"options",this.setOptions);O(this,"parse",this.parseMarkdown(!0));O(this,"parseInline",this.parseMarkdown(!1));O(this,"Parser",Ne);O(this,"Renderer",$s);O(this,"TextRenderer",or);O(this,"Lexer",Ke);O(this,"Tokenizer",Os);O(this,"Hooks",rs);this.use(...r)}walkTokens(r,e){var s,n;let t=[];for(let i of r)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let o=i;for(let a of o.header)t=t.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let l of a)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{let o=i;t=t.concat(this.walkTokens(o.items,e));break}default:{let o=i;(n=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&n[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let l=o[a].flat(1/0);t=t.concat(this.walkTokens(l,e))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=e.renderers[n.name];i?e.renderers[n.name]=function(...o){let a=n.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[n.level];i?i.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),t.renderer){let n=this.defaults.renderer||new $s(this.defaults);for(let i in t.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,a=t.renderer[o],l=n[o];n[o]=(...u)=>{let d=a.apply(n,u);return d===!1&&(d=l.apply(n,u)),d||""}}s.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Os(this.defaults);for(let i in t.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,a=t.tokenizer[o],l=n[o];n[o]=(...u)=>{let d=a.apply(n,u);return d===!1&&(d=l.apply(n,u)),d}}s.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new rs;for(let i in t.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,a=t.hooks[o],l=n[o];rs.passThroughHooks.has(i)?n[o]=u=>{if(this.defaults.async&&rs.passThroughHooksRespectAsync.has(i))return(async()=>{let f=await a.call(n,u);return l.call(n,f)})();let d=a.call(n,u);return l.call(n,d)}:n[o]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await a.apply(n,u);return f===!1&&(f=await l.apply(n,u)),f})();let d=a.apply(n,u);return d===!1&&(d=l.apply(n,u)),d}}s.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,i=t.walkTokens;s.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),n&&(a=a.concat(n.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return Ke.lex(r,e??this.defaults)}parser(r,e){return Ne.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},n={...this.defaults,...s},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let o=n.hooks?await n.hooks.preprocess(e):e,a=await(n.hooks?await n.hooks.provideLexer():r?Ke.lex:Ke.lexInline)(o,n),l=n.hooks?await n.hooks.processAllTokens(a):a;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let u=await(n.hooks?await n.hooks.provideParser():r?Ne.parse:Ne.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(u):u})().catch(i);try{n.hooks&&(e=n.hooks.preprocess(e));let o=(n.hooks?n.hooks.provideLexer():r?Ke.lex:Ke.lexInline)(e,n);n.hooks&&(o=n.hooks.processAllTokens(o)),n.walkTokens&&this.walkTokens(o,n.walkTokens);let a=(n.hooks?n.hooks.provideParser():r?Ne.parse:Ne.parseInline)(o,n);return n.hooks&&(a=n.hooks.postprocess(a)),a}catch(o){return i(o)}}}onError(r,e){return t=>{if(t.message+=`
84
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+st(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},Rt=new _u;function Z(r,e){return Rt.parse(r,e)}Z.options=Z.setOptions=function(r){return Rt.setOptions(r),Z.defaults=Rt.defaults,go(Z.defaults),Z};Z.getDefaults=Qn;Z.defaults=Mt;Z.use=function(...r){return Rt.use(...r),Z.defaults=Rt.defaults,go(Z.defaults),Z};Z.walkTokens=function(r,e){return Rt.walkTokens(r,e)};Z.parseInline=Rt.parseInline;Z.Parser=Ne;Z.parser=Ne.parse;Z.Renderer=$s;Z.TextRenderer=or;Z.Lexer=Ke;Z.lexer=Ke.lex;Z.Tokenizer=Os;Z.Hooks=rs;Z.parse=Z;Z.options;Z.setOptions;Z.use;Z.walkTokens;Z.parseInline;Ne.parse;Ke.lex;const Cu={key:"message",class:"message-text tw:flex tw:items-end tw:gap-1 tw:transition-all"},xu=["innerHTML"],Su=["title","disabled"],Tu=c.defineComponent({__name:"MessageBot",props:{message:{},welcomeColor:{},color:{},bgColor:{},size:{},bgType:{},fontSize:{},borderWidth:{},borderColor:{},configDesignClass:{},ttsUrl:{}},setup(r){Z.setOptions({breaks:!0,gfm:!0});const e=r,t=c.computed(()=>{var g;return e.ttsUrl||((g=e.configDesignClass)==null?void 0:g.getKey("settings.ttsUrl"))||""}),s=c.computed(()=>!!t.value),{speak:n,stop:i,isSpeaking:o,isLoading:a}=Oc({ttsUrl:t,voice:"nova"}),l=c.ref(!1),u=()=>{o.value?i():e.message.text&&n(e.message.text)},d=c.computed(()=>{switch(e.size){case"sm":return e.bgType==="bubble"?" tw:min-h-[25px] tw:py-1 tw:px-2 ":"";case"md":return e.bgType==="bubble"?" tw:min-h-[33px] tw:py-2 tw:px-3":"";case"lg":return e.bgType==="bubble"?" tw:min-h-[40px] tw:py-3 tw:px-4":""}}),f=c.computed(()=>e.message.text?Z.parse(e.message.text):"");return(g,h)=>{var m,p,b,k;return c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(["message-item tw:transition-all tw:text-white tw:w-fit tw:whitespace-break-spaces tw:transition-colors tw:duration-[250ms] tw:ease-[ease]",[d.value,{"item-primary":!((m=g.message.chunk)!=null&&m.start)}]]),style:c.normalizeStyle({color:(p=g.message.chunk)!=null&&p.start?"#2F2F31":g.color,"background-color":(b=g.message.chunk)!=null&&b.start?"transparent":g.bgType==="bubble"?g.bgColor:"transparent","font-size":g.fontSize+"px",border:g.bgType==="bubble"?g.borderWidth+"px solid "+g.borderColor:"none"}),onMouseenter:h[0]||(h[0]=v=>l.value=!0),onMouseleave:h[1]||(h[1]=v=>l.value=!1)},[c.createElementVNode("div",Cu,[c.createElementVNode("span",{class:"tw:flex-1 markdown-content",innerHTML:f.value},null,8,xu),s.value&&g.message.text&&!((k=g.message.chunk)!=null&&k.start)?(c.openBlock(),c.createElementBlock("button",{key:0,class:c.normalizeClass(["tts-button tw:flex-shrink-0 tw:opacity-0 tw:transition-opacity tw:duration-200 tw:p-0.5 tw:rounded hover:tw:bg-white/10 tw:self-end",{"tw:opacity-100":l.value||c.unref(o)||c.unref(a),"tts-speaking":c.unref(o),"tts-loading":c.unref(a)}]),onClick:c.withModifiers(u,["stop"]),title:c.unref(a)?"Loading...":c.unref(o)?"Stop":"Speak",disabled:c.unref(a)},[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(c.unref(o)?c.unref(Vc):c.unref($c)),{class:"tw:w-3.5 tw:h-3.5",style:c.normalizeStyle({color:g.color,opacity:.6})},null,8,["style"]))],10,Su)):c.createCommentVNode("",!0)])],38)}}}),zu=c.defineComponent({__name:"MessageUser",props:{message:{},isFirst:{type:Boolean},color:{},bgColor:{},borderWidth:{},borderColor:{},fontSize:{},size:{},bgType:{},configDesignClass:{}},setup(r){const e=r,t=c.computed(()=>{switch(e.size){case"sm":return e.bgType==="bubble"?" tw:min-h-[25px] tw:py-1 tw:px-2 ":"";case"md":return e.bgType==="bubble"?" tw:min-h-[33px] tw:py-2 tw:px-3":"";case"lg":return e.bgType==="bubble"?" tw:min-h-[40px] tw:py-3 tw:px-4":""}}),s=c.computed(()=>e.bgType==="bubble"?e.borderWidth+"px solid "+e.borderColor:"none");return(n,i)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(["message-item tw:transition-all tw:w-fit tw:whitespace-break-spaces item-secondary tw:ml-auto",[t.value,{"tw:mt-[5px] !tw:bg-transparent":n.isFirst}]]),style:c.normalizeStyle({color:n.color,"background-color":n.bgType==="bubble"?n.bgColor:"transparent",border:s.value,"font-size":n.fontSize+"px"})},c.toDisplayString(n.message.text),7))}}),Ru=["innerHTML"],Eu={key:"dots",class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Mu={key:"dots-pulse",class:"tw:flex tw:items-center tw:justify-start tw:gap-1 tw:h-4"},Bu={key:"circle-pulse",class:"circle-pulse"},Pu={key:"circle-pulse-1",class:"circle-pulse-1"},Au=["data-text"],Du=c.defineComponent({__name:"LoadingMessage",props:{loader:{},text:{},message:{},configDesignClass:{},paused:{type:Boolean}},setup(r){const e=r,t=c.ref(null),s=c.ref(!1);let n=null;const i=()=>{const a=t.value;if(!a)return;const l=a.closest("li");if(!l)return;const u=l.nextElementSibling;if(!u){s.value=!1;return}const d=u.getAttribute("data-component")==="MessageBot"||typeof u.matches=="function"&&u.matches('[data-component="MessageBot"]')||!!u.querySelector('[data-component="MessageBot"]');s.value=d};c.onMounted(()=>{c.nextTick(i);const a=t.value,l=a==null?void 0:a.closest("ul");l&&(n=new MutationObserver(()=>i()),n.observe(l,{childList:!0,subtree:!0}))}),c.onBeforeUnmount(()=>{n&&n.disconnect()}),c.watch(()=>e.text,()=>c.nextTick(i));const o=c.computed(()=>!!e.paused||s.value);return(a,l)=>(c.openBlock(),c.createElementBlock("li",{key:"loading",ref_key:"rootRef",ref:t,class:"message-text-loading tw:flex tw:items-center tw:justify-start tw:gap-3"},[c.createVNode(c.Transition,{name:"fade",mode:"out-in"},{default:c.withCtx(()=>[o.value?(c.openBlock(),c.createElementBlock("div",{key:"complete-step-icon",innerHTML:a.configDesignClass.getKey("sections.loader.completeStep.icon.src"),class:"svg-inherit",style:c.normalizeStyle({color:a.configDesignClass.getKey("sections.loader.completeStep.icon.color"),height:a.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px",width:a.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px"})},null,12,Ru)):!a.loader||a.loader==="dots"?(c.openBlock(),c.createElementBlock("div",Eu,l[0]||(l[0]=[c.createElementVNode("div",{class:"loading-dot tw:rounded-full"},null,-1),c.createElementVNode("div",{class:"loading-dot loading-dot-delay-1 tw:rounded-full"},null,-1),c.createElementVNode("div",{class:"loading-dot loading-dot-delay-2 tw:rounded-full"},null,-1),c.createElementVNode("div",{class:"loading-dot loading-dot-delay-3 tw:rounded-full"},null,-1)]))):a.loader==="dots-pulse"?(c.openBlock(),c.createElementBlock("div",Mu,l[1]||(l[1]=[c.createElementVNode("span",{class:"dot-pulse dot-1"},null,-1),c.createElementVNode("span",{class:"dot-pulse dot-2"},null,-1),c.createElementVNode("span",{class:"dot-pulse dot-3"},null,-1)]))):a.loader==="circle-pulse"?(c.openBlock(),c.createElementBlock("div",Bu,l[2]||(l[2]=[c.createElementVNode("span",{class:"ring ring-1"},null,-1),c.createElementVNode("span",{class:"ring ring-2"},null,-1)]))):a.loader==="circle-pulse-1"?(c.openBlock(),c.createElementBlock("div",Pu,l[3]||(l[3]=[c.createElementVNode("span",{class:"ripple r1"},null,-1),c.createElementVNode("span",{class:"ripple r2"},null,-1),c.createElementVNode("span",{class:"center"},null,-1)]))):c.createCommentVNode("",!0)]),_:1}),c.createVNode(c.Transition,{name:"fade-text",mode:"out-in"},{default:c.withCtx(()=>{var u,d,f,g;return[(c.openBlock(),c.createElementBlock("span",{class:c.normalizeClass(["tw:transition-all tw:text-sm",{"typing-shimmer":!o.value}]),key:a.text,"data-text":(u=a.message)!=null&&u.text?(d=a.message)==null?void 0:d.text:a.text,style:c.normalizeStyle({color:a.configDesignClass.getKey("sections.loader.typingLoader.color")})},c.toDisplayString(o.value?"Thinking completed":(f=a.message)!=null&&f.text?(g=a.message)==null?void 0:g.text:a.text),15,Au))]}),_:1})],512))}}),Lu=(r,e)=>{const t=r.__vccOpts||r;for(const[s,n]of e)t[s]=n;return t},Zr=Lu(Du,[["__scopeId","data-v-bb55e057"]]),Iu=["data-height"],Ou={class:"tw:transition-all tw:flex tw:flex-col tw:items-center tw:gap-1 tw:px-1"},$u=["innerHTML"],Vu={class:"tw:transition-all tw:flex tw:items-center tw:gap-2"},Ku=c.defineComponent({__name:"MessageSystem",props:{message:{},welcomeColor:{},color:{},bgColor:{},size:{},configDesignClass:{},activeMessage:{type:Boolean},bgType:{},isLast:{type:Boolean},traceLastShown:{type:Boolean},index:{}},setup(r){const e=r,t=c.computed(()=>e.index===3&&e.traceLastShown||e.isLast),s=c.computed(()=>{switch(e.size){case"sm":return"tw:text-xs";case"md":return"tw:text-xs";case"lg":return"tw:text-base"}}),n=c.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.src"):e.configDesignClass.getKey("sections.loader.completeStep.icon.src")),i=c.computed(()=>e.configDesignClass.getKey("sections.loader.activeStep.color")),o=c.computed(()=>e.configDesignClass.getKey("sections.loader.completeStep.color")),a=c.computed(()=>t.value?i.value:o.value),l=c.computed(()=>t.value?e.configDesignClass.getKey("sections.loader.activeStep.icon.color"):e.configDesignClass.getKey("sections.loader.completeStep.icon.color")),u=c.computed(()=>Xn(e.configDesignClass,"inside"));return(d,f)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass(["message-system tw:text-left tw:relative tw:w-full tw:text-white tw:w-fit tw:whitespace-break-spaces tw:transition-colors tw:duration-[250ms] tw:ease-[ease]",s.value]),"data-height":d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing"),style:c.normalizeStyle({"padding-top":d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing")+"px"})},[c.createElementVNode("hr",{class:"tw:w-[1px] tw:bg-white tw:opacity-20 tw:absolute",style:c.normalizeStyle([{display:"none"},{height:d.configDesignClass.getKey("sections.loader.completeStep.verticalSpacing")-2+"px",left:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")/2+4+"px",top:"0px"}])},null,4),c.createElementVNode("div",{key:"message",class:c.normalizeClass(["message-text flex tw:transition-all tw:space-between tw:gap-3 tw:flex tw:items-center tw:align-center",{"tw:mb-0":d.isLast}])},[c.createElementVNode("div",Ou,[c.createElementVNode("div",{innerHTML:n.value,class:c.normalizeClass(["svg-inherit",{"tw:animate-spin":t.value}]),style:c.normalizeStyle({color:l.value,height:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px",width:d.configDesignClass.getKey("sections.loader.completeStep.icon.size")+"px"})},null,14,$u)]),c.createElementVNode("div",Vu,[d.message.meta?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("p",{key:0,style:c.normalizeStyle({color:a.value,"font-size":d.configDesignClass.getKey("sections.loader.completeStep.fontSize")+"px"})},c.toDisplayString(d.message.text),5)),d.message.meta?(c.openBlock(),c.createBlock(c.unref(it),{key:1,style:c.normalizeStyle({color:e.activeMessage?"rgba(255, 255, 255, 0.60)":"#3F3F46",background:e.activeMessage?"#2F2F31":"#ECEDEE",border:e.activeMessage?"none":"1px solid #fff"}),class:c.normalizeClass(["tw:flex tw:items-center tw:gap-1 tw:rounded-md tw:shadow-xs",u.value])},{default:c.withCtx(()=>[f[0]||(f[0]=c.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[c.createElementVNode("path",{d:"M10.7935 1.33301H5.20683C2.78016 1.33301 1.3335 2.77967 1.3335 5.20634V10.7863C1.3335 13.2197 2.78016 14.6663 5.20683 14.6663H10.7868C13.2135 14.6663 14.6602 13.2197 14.6602 10.793V5.20634C14.6668 2.77967 13.2202 1.33301 10.7935 1.33301ZM6.62683 8.84634C6.1735 9.52634 5.54683 10.0797 4.8135 10.4463C4.74683 10.4797 4.66683 10.4997 4.5935 10.4997C4.40683 10.4997 4.2335 10.3997 4.14683 10.2263C4.02016 9.97967 4.12016 9.67967 4.3735 9.55301C4.9535 9.26634 5.44683 8.82634 5.80016 8.29301C5.92016 8.11301 5.92016 7.88634 5.80016 7.70634C5.44016 7.17301 4.94683 6.73301 4.3735 6.44634C4.12016 6.32634 4.02016 6.02634 4.14683 5.77301C4.26683 5.52634 4.56683 5.42634 4.8135 5.55301C5.54683 5.91967 6.1735 6.47301 6.62683 7.15301C6.9735 7.66634 6.9735 8.33301 6.62683 8.84634ZM11.3335 10.4997H8.66683C8.3935 10.4997 8.16683 10.273 8.16683 9.99967C8.16683 9.72634 8.3935 9.49967 8.66683 9.49967H11.3335C11.6068 9.49967 11.8335 9.72634 11.8335 9.99967C11.8335 10.273 11.6068 10.4997 11.3335 10.4997Z",fill:"currentColor"})],-1)),c.createElementVNode("span",null,c.toDisplayString(d.message.text),1)]),_:1,__:[0]},8,["style","class"])):c.createCommentVNode("",!0)])],2)],14,Iu))}});class Nu{constructor(e,t){O(this,"structure");O(this,"options");O(this,"html","");this.structure=e,this.options={escape:(t==null?void 0:t.escape)??!0,whitelistStyles:(t==null?void 0:t.whitelistStyles)??["color","background","borderColor","borderRadius"]}}build(e){return this.html=this.renderLayout(this.structure.layout,this.structure.bindings||{},e),this}buildStyle(e){return Object.entries(e).forEach(([t,s])=>{const n=new RegExp(`data-visual="${this.escapeRegExp(t)}"`,"g"),i=Object.entries(s.style).map(([o,a])=>`${o}: ${a};`).join("");this.html=this.html.replace(n,`class="${s.class}" style="${i}"`)}),this}result(){return this.html}renderLayout(e,t,s){let n=e;return t&&(Object.entries(t).forEach(([i,o])=>{var l,u;const a=new RegExp(`\\{${this.escapeRegExp(i)}\\}`,"g");if(o.type==="text"){const d=(l=s==null?void 0:s[i])==null?void 0:l.text;n=n.replace(a,this.safeText(typeof d=="string"||typeof d=="number"?String(d):""));return}if(o.type==="button"){const d=(u=s==null?void 0:s[i])==null?void 0:u.text;n=n.replace(a,this.safeText(typeof d=="string"||typeof d=="number"?String(d):""));return}if(o.type==="repeater"){const d=Array.isArray(s==null?void 0:s[i])?s[i]:[],f=o.layout||"",g=o.bindings||{},h=d.map(m=>this.renderLayout(f,g,m)).join("");n=n.replace(a,h);return}}),n=n.replace(/style=\"([^\"]*)\"/g,(i,o)=>{const a=o.split(";").map(l=>l.trim()).filter(Boolean).filter(l=>{const[u]=l.split(":");return this.options.whitelistStyles.includes((u||"").trim())}).join("; ");return`style="${this.safeAttr(a)}"`})),n}safeText(e){return this.options.escape?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/'/g,"&#39;"):e}safeAttr(e){return this.safeText(e)}escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}const Fu={layout:'<div class="tw:flex tw:flex-col" data-visual="container"><div><span data-visual="headerChip">Action</span></div><div class="tw:flex tw:mb-2 tw:mt-2 tw:text-xs"><div data-visual="title">{title}</div></div><div class="tw:flex tw:gap-1"><button data-cb="confirm" data-visual="actionConfirm" class="tw:flex-1">{actionConfirm}</button><button data-cb="cancel" data-visual="actionCancel" class="tw:flex-1">{actionCancel}</button></div></div>',bindings:{title:{type:"text"},actionConfirm:{type:"button"},actionCancel:{type:"button"}}};function Uu(r){const e=c.computed(()=>{const y=r==null?void 0:r.getKeyObject("sections.inside.activeSnippet"),_=r==null?void 0:r.getKeyObject("sections.activeSnippet"),w=y&&y!=="undefined"?y:_;return w&&w!=="undefined"?w:{}}),t=(y,_)=>{if(!_)return y;switch(_){case"outlined":return{color:y.background,background:"transparent",border:`1px solid ${y.borderColor||y.background}`};case"invisible":return{color:y.background,background:"transparent"};default:return y}},s=c.computed(()=>r==null?void 0:r.getKey("sections.inside.activeSnippet.element.bgColor")),n=c.computed(()=>r==null?void 0:r.getKey("sections.inside.activeSnippet.element.color")),i=c.computed(()=>r==null?void 0:r.getKey("sections.inside.activeSnippet.element.sidePadding")),o=c.computed(()=>r==null?void 0:r.getKey("sections.inside.activeSnippet.element.verticalSpacing")),a=c.computed(()=>(r==null?void 0:r.getKey("sections.inside.activeSnippet.element.borderWidth"))+"px solid "+(r==null?void 0:r.getKey("sections.inside.activeSnippet.element.borderColor"))),l=c.computed(()=>{var y,_,w,C,T,x,z,D;return{color:(_=(y=e.value)==null?void 0:y.headerChip)==null?void 0:_.color,background:(C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.bgColor,borderColor:(x=(T=e.value)==null?void 0:T.headerChip)==null?void 0:x.borderColor,bgColor:(D=(z=e.value)==null?void 0:z.headerChip)==null?void 0:D.bgColor}}),u=c.computed(()=>{var y,_;return t(l.value,(_=(y=e.value)==null?void 0:y.headerChip)==null?void 0:_.bgType)}),d=c.computed(()=>{var y,_,w,C;return{...u.value,"border-radius":r!=null&&r.getKey("settings.globalRoundingRadius")?cs(r,2).borderRadius:((_=(y=e.value)==null?void 0:y.headerChip)==null?void 0:_.borderRadius)+"px","font-size":((C=(w=e.value)==null?void 0:w.headerChip)==null?void 0:C.fontSize)+"px"}}),f=c.computed(()=>{var y;return(y=e.value)==null?void 0:y.propertyColor}),g=c.computed(()=>{var y;return(y=e.value)==null?void 0:y.valueColor}),h=c.computed(()=>{var y,_,w,C;return{color:(_=(y=e.value)==null?void 0:y.yesButton)==null?void 0:_.color,background:(C=(w=e.value)==null?void 0:w.yesButton)==null?void 0:C.bgColor}}),m=c.computed(()=>{var y,_,w,C;return{color:(_=(y=e.value)==null?void 0:y.noButton)==null?void 0:_.color,background:(C=(w=e.value)==null?void 0:w.noButton)==null?void 0:C.bgColor}}),p=c.computed(()=>{const y=r==null?void 0:r.getKey("sections.inside.activeSnippet.params.size"),_=r==null?void 0:r.getKey("sections.inside.params.size");return zn(y!=="undefined"?y:_)}),b=c.computed(()=>{const y=r==null?void 0:r.getKey("sections.inside.activeSnippet.headerChip.size");return zn(y)}),k=y=>{const _=(y.id||"").toLowerCase(),C=_==="confirm"||_==="yes"?h.value:m.value,T=r==null?void 0:r.getKey("sections.inside.activeSnippet.params.buttonStyle");return t(C,T)},v=c.computed(()=>r!=null&&r.getKey("settings.globalRoundingRadius")?cs(r,8):{borderRadius:(r==null?void 0:r.getKey("sections.inside.activeSnippet.element.borderRadius"))+"px"});return{containerBg:s,containerColor:n,sidePadding:i,verticalSpacing:o,headerChip:d,propertyColor:f,border:a,valueColor:g,yesButton:h,noButton:m,buttonStyle:k,getButtonStyle:t,actionBtnSizeClass:p,buttonRadiusStyle:v,chipSizeClass:b}}const Wu=["innerHTML"],Hu=c.defineComponent({__name:"DynamicSnippet",props:{structure:{},data:{},message:{},configDesignClass:{}},emits:["action"],setup(r,{emit:e}){const t=r,{containerBg:s,containerColor:n,headerChip:i,yesButton:o,noButton:a,actionBtnSizeClass:l,buttonRadiusStyle:u,verticalSpacing:d,sidePadding:f,valueColor:g,getButtonStyle:h,border:m,chipSizeClass:p}=Uu(t.configDesignClass),b=c.computed(()=>{var C;return(C=t.configDesignClass)==null?void 0:C.getKey("sections.inside.activeSnippet.params.buttonStyle")}),k=c.computed(()=>{var C,T;return{background:s.value,color:n.value,"border-radius":(C=t.configDesignClass)!=null&&C.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((T=t.configDesignClass)==null?void 0:T.getKey("sections.inside.activeSnippet.element.borderRadius"))+"px",border:m.value,padding:`${f.value}px`,gap:`${d.value}px`}}),v=c.computed(()=>{var C,T,x,z,D,K,N;return{container:{style:k.value},headerChip:{style:i.value,class:p.value},actionConfirm:{class:l.value,style:{...h(o.value,b.value),flex:"1","line-height":"1","border-radius":(C=t.configDesignClass)!=null&&C.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((T=t.configDesignClass)==null?void 0:T.getKey("sections.inside.activeSnippet.yesButton.borderRadius"))+"px","font-size":((x=t.configDesignClass)==null?void 0:x.getKey("sections.inside.activeSnippet.yesButton.fontSize"))+"px"}},title:{style:{color:g.value,"font-size":((z=t.configDesignClass)==null?void 0:z.getKey("sections.inside.activeSnippet.element.fontSize"))+"px"}},actionCancel:{class:l.value,style:{...h(a.value,b.value),flex:"1","line-height":"1","border-radius":(D=t.configDesignClass)!=null&&D.getKey("settings.globalRoundingRadius")?u.value.borderRadius:((K=t.configDesignClass)==null?void 0:K.getKey("sections.inside.activeSnippet.yesButton.borderRadius"))+"px","font-size":((N=t.configDesignClass)==null?void 0:N.getKey("sections.inside.activeSnippet.yesButton.fontSize"))+"px"}}}}),y=e,_=c.computed(()=>new Nu(t.structure).build(t.data).buildStyle(v.value).result()),w=C=>{var D;const T=C.target;if(!T)return;const x=T.closest("[data-cb]"),z=x==null?void 0:x.getAttribute("data-cb");z&&((D=t.message.snippet)!=null&&D.sequence)&&y("action",z,t.message.snippet.sequence)};return(C,T)=>(c.openBlock(),c.createElementBlock("div",{class:"tw:mt-1 tw:mb-1 tw:max-w-[65%]",onClick:w,innerHTML:_.value},null,8,Wu))}}),ju=["innerHTML"],qu=c.defineComponent({__name:"MessageList",props:{messages:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},showWelcome:{type:Boolean},sectionBorderRadius:{},isLoading:{type:Boolean},isStreaming:{type:Boolean},configDesignClass:{},activeMessage:{},traceLastShown:{type:Boolean},isProduction:{type:Boolean},ttsUrl:{}},emits:["handleClickMessage","handleSnippetAction"],setup(r,{emit:e}){const t=c.ref(null),s=r,n=e,i=m=>{m.meta&&n("handleClickMessage",m)},o=c.computed(()=>s.messages.filter((m,p,b)=>{var k;return s.isProduction?!(m.type==="usageTokensByAI"||m.isSystem&&((k=b[p+1])!=null&&k.isSystem)):!0}));c.watch(s.messages,()=>{l()&&a()},{deep:!0});const a=()=>{c.nextTick(()=>{t.value&&(t.value.scrollTop=t.value.scrollHeight)})},l=()=>{if(!t.value)return!0;const m=t.value;return m.scrollHeight-m.scrollTop-m.clientHeight<=24},u=()=>{},d=m=>{const p=m.replace("#",""),b=parseInt(p.substr(0,2),16),k=parseInt(p.substr(2,2),16),v=parseInt(p.substr(4,2),16),y=Math.max(0,b-12),_=Math.max(0,k-12),w=Math.max(0,v-12);return`linear-gradient(180deg, rgba(${y}, ${_}, ${w}, 0.95) 0%, rgba(0,0,0, 0) 100%)`},f=c.computed(()=>{switch(s.configDesignClass.getKey("sections.inside.welcomeMessage.size")){case"sm":return"tw:px-1.5 tw:py-2.5";case"md":return"tw:px-3 tw:py-4";case"lg":return"tw:px-4.5 tw:py-5.5"}}),g=c.computed(()=>s.configDesignClass.getKey("sections.inside.welcomeMessage.bgType")==="gradient"?d(s.configDesignClass.getKey("sections.inside.welcomeMessage.bgColor")):s.configDesignClass.getKey("sections.inside.welcomeMessage.bgType")==="bubble"?s.configDesignClass.getKey("sections.inside.welcomeMessage.bgColor"):"transparent"),h=m=>s.configDesignClass.getKey("settings.globalRoundingRadius")?s.sectionBorderRadius.borderRadius:s.configDesignClass.getKey(m?"sections.inside.messageUser.borderRadius":"sections.inside.messageBot.borderRadius")+"px";return(m,p)=>(c.openBlock(),c.createElementBlock("ul",{class:"message-list tw:transition-all tw:overflow-y-scroll tw:flex-1 tw:list-none tw:pb-4",ref_key:"messageListRef",ref:t,onScroll:u},[m.showWelcome?(c.openBlock(),c.createElementBlock("li",{key:0,class:c.normalizeClass(["tw:transition-all",["tw:text-"+(m.configDesignClass.getKey("sections.inside.params.size")==="sm"?"xs":m.configDesignClass.getKey("sections.inside.params.size")==="md"?"sm":"base")]]),style:c.normalizeStyle({color:m.configDesignClass.getKey("sections.inside.messageUser.color"),"margin-bottom":`${m.configDesignClass.getKey("settings.gapMessageLine")}px`})},[c.createElementVNode("div",{key:"message",class:c.normalizeClass(["tw:transition-all",f.value]),style:c.normalizeStyle({borderRadius:m.configDesignClass.getKey("settings.globalRoundingRadius")?m.sectionBorderRadius.borderRadius:m.configDesignClass.getKey("sections.inside.welcomeMessage.borderRadius")+"px",color:m.configDesignClass.getKey("sections.inside.welcomeMessage.color"),background:g.value,lineHeight:m.configDesignClass.getKey("settings.lineHeight"),fontSize:m.configDesignClass.getKey("sections.inside.welcomeMessage.fontSize")+"px",letterSpacing:m.configDesignClass.getKey("settings.letterSpacing")+"px"})},[c.createElementVNode("div",{innerHTML:c.unref(cn)(m.configDesignClass.getKey("texts.welcomeMessage"))},null,8,ju)],6)],6)):c.createCommentVNode("",!0),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,(b,k)=>{var v;return c.openBlock(),c.createElementBlock(c.Fragment,{key:k},[b.snippet?(c.openBlock(),c.createBlock(Hu,{key:0,structure:c.unref(Fu),data:b.snippet.data,message:b,configDesignClass:m.configDesignClass,onAction:p[0]||(p[0]=(y,_)=>n("handleSnippetAction",y,_))},null,8,["structure","data","message","configDesignClass"])):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(b.isUser?zu:b.isSystem?m.isProduction?Zr:Ku:Tu),{key:1,message:b,"data-component":b.isSystem?m.isProduction?"LoadingMessage":"MessageSystem":"MessageBot",style:c.normalizeStyle({borderRadius:h(b.isUser),"margin-top":`${(v=o.value[k-1])!=null&&v.isSystem&&!b.isSystem?"12px":"0px"}`,"margin-bottom":`${b.isSystem?"2px":m.configDesignClass.getKey("settings.gapMessageLine")+"px"}`,lineHeight:m.configDesignClass.getKey("settings.lineHeight"),letterSpacing:m.configDesignClass.getKey("settings.letterSpacing")+"px"}),loader:m.configDesignClass.getKey("settings.loader"),color:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.color"):m.configDesignClass.getKey("sections.inside.messageBot.color"),welcomeColor:m.configDesignClass.getKey("sections.inside.messageUser.color"),bgType:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.bgType"):m.configDesignClass.getKey("sections.inside.messageBot.bgType"),bgColor:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.bgColor"):m.configDesignClass.getKey("sections.inside.messageBot.bgColor"),size:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.size"):m.configDesignClass.getKey("sections.inside.messageBot.size"),fontSize:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.fontSize"):m.configDesignClass.getKey("sections.inside.messageBot.fontSize"),borderWidth:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.borderWidth"):m.configDesignClass.getKey("sections.inside.messageBot.borderWidth"),borderColor:b.isUser?m.configDesignClass.getKey("sections.inside.messageUser.borderColor"):m.configDesignClass.getKey("sections.inside.messageBot.borderColor"),index:k,traceLastShown:m.traceLastShown,configDesignClass:m.configDesignClass,ttsUrl:m.ttsUrl,activeMessage:m.activeMessage===b,isLast:k===o.value.length-1,onClick:y=>i(b)},null,8,["message","data-component","style","loader","color","welcomeColor","bgType","bgColor","size","fontSize","borderWidth","borderColor","index","traceLastShown","configDesignClass","ttsUrl","activeMessage","isLast","onClick"]))],64)}),128)),m.isLoading?(c.openBlock(),c.createBlock(Zr,{key:1,class:c.normalizeClass({"tw:mt-8":m.traceLastShown}),loader:m.configDesignClass.getKey("settings.loader"),configDesignClass:m.configDesignClass,text:m.configDesignClass.getKey("texts.typingLoader")},null,8,["class","loader","configDesignClass","text"])):c.createCommentVNode("",!0),c.renderSlot(m.$slots,"footer")],544))}}),Gu=c.defineComponent({__name:"ChatMessagesContainer",props:{messages:{},isPreview:{type:Boolean},isEmbedded:{type:Boolean},sectionBorderRadius:{},isLoading:{type:Boolean},isStreaming:{type:Boolean},configDesignClass:{},activeMessage:{},showWelcome:{type:Boolean},isProcessError:{type:Boolean},restartChat:{type:Function},traceLastShown:{type:Boolean},isProduction:{type:Boolean},ttsUrl:{}},emits:["handleClickMessage","update:activeMessage","handleSnippetAction"],setup(r,{emit:e}){const t=r,s=c.computed(()=>t.ttsUrl),n=e,i=c.computed({get:()=>t.activeMessage,set:o=>n("update:activeMessage",o)});return(o,a)=>(c.openBlock(),c.createElementBlock("div",{class:"tw:transition-all tw:flex tw:flex-col tw:justify-between tw:w-full tw:min-h-0",style:c.normalizeStyle([{flex:"1 1 0"},{paddingLeft:(o.configDesignClass.getKey("sections.inside.params.sidePadding")??8)+"px",paddingRight:(o.configDesignClass.getKey("sections.inside.params.sidePadding")??8)+"px",paddingTop:(o.configDesignClass.getKey("sections.inside.params.verticalPadding")??8)/2+"px"}])},[c.createVNode(qu,{messages:o.messages,isPreview:o.isPreview,isEmbedded:o.isEmbedded,configDesignClass:o.configDesignClass,isLoading:o.isLoading,isStreaming:o.isStreaming,isProduction:o.isProduction,sectionBorderRadius:o.sectionBorderRadius,showWelcome:o.showWelcome,ttsUrl:s.value,activeMessage:i.value,"onUpdate:activeMessage":a[0]||(a[0]=l=>i.value=l),traceLastShown:o.traceLastShown,onHandleClickMessage:a[1]||(a[1]=l=>o.$emit("handleClickMessage",l)),onHandleSnippetAction:a[2]||(a[2]=(l,u)=>n("handleSnippetAction",l,u))},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","isStreaming","isProduction","sectionBorderRadius","showWelcome","ttsUrl","activeMessage","traceLastShown"])],4))}}),Zu={key:0,class:"chat tw:w-full tw:h-full tw:flex tw:pt-0 tw:relative",style:{overflow:"hidden"}},Yu={key:0,class:"tw:w-full tw:h-full"},Xu={key:1,class:"messages tw:transition-all tw:flex tw:flex-col tw:justify-between tw:w-full"},Qu="https://hs-generator.onrender.com/api/transcribe",Ju="https://hs-generator.onrender.com/api/tts",ts=0,ed=c.defineComponent({__name:"ChatWrapper",props:{link:{},isEmbedded:{type:Boolean},isPreview:{type:Boolean},configWidget:{},configLink:{},scenario:{},scenarioOptions:{},widgetId:{},isProduction:{type:Boolean}},emits:["trace","choose-trace","restart-chat"],setup(r,{expose:e,emit:t}){const s=t,n=c.ref(!1),i=c.ref(!1),o=c.ref(null),a=c.ref(!1),l=c.ref(!1),u=c.ref(!1),d=c.ref(!1),f=c.ref(!0),g=c.ref(!1),h=c.ref(!1),m=c.ref(!1),p=c.ref(0),b=c.ref(!1),k=c.ref(null),v=r,y=async()=>{if(!(v.isPreview||v.scenario))try{s("restart-chat"),Ro(),await ys()}catch(S){console.error("Failed to restart chat connection",S)}},_=c.computed(()=>{const S=P.value.getKey("settings.position"),R=P.value.getKey("settings.offset.x"),E=P.value.getKey("settings.offset.y"),I=Y.value?P.value.getKey("settings.size.width"):P.value.getKey("sections.colapsed.width"),J=Y.value?P.value.getKey("settings.size.height"):P.value.getKey("sections.colapsed.height");return{...{...S==="topLeft"?{top:E+"px",left:R+"px"}:{},...S==="topRight"?{top:E+"px",right:R+"px"}:{},...S==="bottomLeft"?{bottom:E+"px",left:R+"px"}:{},...S==="bottomRight"?{bottom:E+"px",right:R+"px"}:{},...S==="top"?{top:E+"px",left:"50%",transform:"translateX(-50%)"}:{},...S==="bottom"?{bottom:E+"px",left:"50%",transform:"translateX(-50%)"}:{},...S==="left"?{left:R+"px",top:"50%",transform:"translateY(-50%)"}:{},...S==="right"?{right:R+"px",top:"50%",transform:"translateY(-50%)"}:{}},width:Y.value&&!j.value?I+"px":void 0,height:Y.value||j.value?J+"px":void 0}}),w=()=>{if(v.configLink)return v.configLink;const R=new URLSearchParams(window.location.search).get("config");if(R)return R},C=c.ref(null),T=c.ref(null),x=c.ref(null),z=()=>x.value?x.value:w()?T.value:v.configWidget?v.configWidget:Fe,D=c.computed(()=>{const S=z(),{isValid:R,errors:E}=tc(S);return R?S:(console.warn("[HSW] Invalid widget config, falling back to DEFAULT_CONFIG:",E),Fe)}),K=S=>{C.value=S,s("choose-trace",{action:S.type,messages:[S]})},N=async()=>{s("choose-trace",{action:"copyAll",messages:$.value})},W=async()=>{if($.value.length===0){s("choose-trace",{action:"copyLast",messages:[]});return}let S=-1;for(let E=$.value.length-1;E>=0;E--)if($.value[E].isUser){S=E;break}const R=S>=0?S:0;s("choose-trace",{action:"copyLast",messages:$.value.slice(R)})},te=async S=>{switch(S.action){case"copyLast":await W();break;case"copyIteration":await W();break;case"copyAll":await N();break}},P=c.computed(()=>new sc(D.value)),U=c.computed(()=>ci(P.value)),G=c.computed(()=>cs(P.value,8)),A=c.computed(()=>{switch(P.value.getKey("sections.bottom.params.size")){case"sm":return"tw:min-h-[25px]";case"md":return"tw:min-h-[45px]";case"lg":return"tw:min-h-[60px]"}}),Y=c.ref(!0),We=()=>{const S=o.value;if(!S)return{width:56,height:56};const R=S.querySelector(".chat-action");if(!R)return{width:56,height:56};const E=R.getBoundingClientRect();return{width:Math.max(1,E.width),height:Math.max(1,E.height)}},Se=c.ref(!1),Te=async S=>{if(Se.value)return;Se.value=!0;const R=o.value;if(!R||S===Y.value)return;const E=R.querySelector(".chatWrapper"),I=E==null?void 0:E.querySelector(".chat");if(S){const J=R.querySelector(".chat-collapsed");J&&(q.killTweensOf(J),q.to(J,{opacity:1,duration:.15,ease:"power2.in"}));const{height:me,width:He}=We();await new Promise(vs=>setTimeout(vs,150)),Y.value=!0,await c.nextTick();const Ie=Math.max(me||0,He||0)||56;q.killTweensOf(R),I&&q.killTweensOf(I),E&&q.killTweensOf(E),q.set(R,{width:Ie,height:Ie,overflow:"hidden",opacity:0,willChange:"width, height, opacity"}),E&&q.set(E,{opacity:0,willChange:"opacity"}),I&&q.set(I,{opacity:0,willChange:"opacity"}),q.set(R,{width:Ie,height:Ie,overflow:"hidden",opacity:0,willChange:"width, height, opacity"}),q.to(R,{width:P.value.getKey("settings.size.width"),height:P.value.getKey("settings.size.height"),opacity:1,duration:.4,ease:"power2.out",onComplete:()=>{q.set(R,{clearProps:"overflow,position,left,top,xPercent,yPercent,marginTop,willChange,opacity"}),Se.value=!1}}),E&&q.to(E,{opacity:1,duration:.3,delay:.35,ease:"power2.out",onComplete:()=>{q.set(E,{clearProps:"willChange,opacity"})}}),I&&q.to(I,{opacity:1,duration:.3,delay:.15,ease:"power2.out",onComplete:()=>{q.set(I,{clearProps:"willChange"})}})}else{const J=P.value.getKey("sections.colapsed.height")+P.value.getKey("sections.colapsed.borderWidth")*2;q.killTweensOf(R),I&&q.killTweensOf(I),E&&q.killTweensOf(E),q.set(R,{width:P.value.getKey("settings.size.width"),height:P.value.getKey("settings.size.height"),overflow:"hidden",willChange:"width, height, opacity"}),E&&(q.set(E,{willChange:"opacity"}),q.to(E,{opacity:0,duration:.5,ease:"power3.inOut",onComplete:()=>{q.set(E,{clearProps:"willChange,opacity"})}})),I&&(q.set(I,{willChange:"opacity"}),q.to(I,{opacity:0,duration:.2,ease:"power2.in",onComplete:()=>{q.set(I,{clearProps:"willChange"})}})),q.to(R,{width:J,height:J,opacity:0,duration:.35,marginTop:0,ease:"power2.inOut",onComplete:()=>{Y.value=!1,c.nextTick().then(()=>{const me=R.querySelector(".chat-collapsed");me&&(q.set(me,{opacity:0}),q.to(me,{opacity:1,duration:.25,ease:"power2.out"})),q.set(R,{opacity:1})}),q.set(R,{clearProps:"overflow,position,left,top,xPercent,yPercent,marginTop,willChange"}),Se.value=!1}})}},Q=c.ref(v.isPreview||!1),j=c.ref(v.isEmbedded||!1);c.watch(()=>v.isEmbedded,S=>{j.value=S});const ye=c.ref(!!v.isPreview),Je=c.ref(v.widgetId||`hsw-${Math.random().toString(36).slice(2,10)}`),$=c.ref([]),et=c.ref("");let se=null,De=0;const Gt=c.computed(()=>$.value.length>0&&$.value[$.value.length-1].isUser===!0||l.value),lt=c.ref(null),To=(S,R)=>{console.log("handleSnippetAction",S,R),lr({action:{sequence:R,command:S,data:{}}})},Le=S=>{var R;if(S.chunkId&&S.text){const E=$.value[$.value.length-1];E.chunkId===S.chunkId?((R=S.chunk)!=null&&R.start?E.text="":E.text+=S.text,E.chunk.start=!1):$.value.push(S)}else $.value.push(S)},Zt=(()=>{if(v.link)return v.link;const R=new URLSearchParams(window.location.search).get("link");if(R)return R;const I=new URLSearchParams(window.location.hash.substring(1)).get("link");if(I)return I;try{const J="ws://localhost:8080/client/widget-chat/v1/ws/?token=F0Pr83SJj0fETG0kvinAFPQREg1gRCizbwVvngwppnh9ImlN2ZlYeTkE0y0XFmj2hyiH93hjWxh0wFw7l1AxYacBwmdwO3wvUITsv63OQ2Prw6bFkR-eS508N7RExMwSatsXIoSV88nYYVfUA-eP-C55zw";if(J)return J}catch(J){console.warn("Environment variables not available:",J)}return console.log("Using fallback link: ws://localhost:3000"),"ws://localhost:3000"})(),ar=()=>{if(De>=ts){Le({text:`Failed to connect after ${ts} attempts. Please check your connection.`,isUser:!1});return}De++,console.log(`Reconnection attempt ${De}/${ts}`),setTimeout(()=>{Ws()},2e3*De)},zo=()=>{Le({text:fo.UserMessage,isUser:!0}),Le({text:"{Agent response message}",isUser:!1})},Ws=()=>{try{if(!Zt||typeof Zt!="string"){console.error("Invalid WebSocket link:",Zt),Le({text:"Error: Invalid WebSocket URL",isUser:!1});return}if(console.log("Attempting to connect to:",Zt),se=new WebSocket(Zt),!se){console.error("Failed to create WebSocket instance");return}se.onmessage=S=>{var R,E,I,J,me,He,Ie,vs,hr,fr;try{const L=JSON.parse(S.data);if(L.snippet)return Le({snippet:{...L.snippet,data:JSON.parse(L.snippet.data||"{}")},isUser:!1,isSystem:!0,isError:!1});if(L.error)return Le({text:L.error.message,isUser:!1,isSystem:!0,isError:!0});if((R=L==null?void 0:L.textChunk)!=null&&R.start&&(b.value=!0,k.value=(E=L==null?void 0:L.textChunk)==null?void 0:E.start,Le({text:"",isUser:!1,chunkId:(I=L==null?void 0:L.textChunk)==null?void 0:I.start,chunk:L==null?void 0:L.textChunk})),(J=L==null?void 0:L.textChunk)!=null&&J.end||(me=L==null?void 0:L.textChunk)!=null&&me.start){(He=L==null?void 0:L.textChunk)!=null&&He.end&&k.value&&((Ie=L==null?void 0:L.textChunk)==null?void 0:Ie.end)===k.value&&(b.value=!1,k.value=null);return}(vs=L==null?void 0:L.textChunk)!=null&&vs.text&&Le({text:L.textChunk.text,isUser:!1,chunkId:(hr=L==null?void 0:L.textChunk)==null?void 0:hr.id}),L!=null&&L.trace&&Le({text:L.trace.message,isUser:!1,isSystem:!0,meta:L.trace.meta,time:L.trace.time,type:L.trace.type}),(fr=L==null?void 0:L.trace)!=null&&fr.meta&&!v.isProduction&&s("trace",{action:L.trace.type,messages:[L.trace]})}catch(L){console.error("Error parsing WebSocket message:",L),Le({text:"Error: Failed to parse server response",isUser:!1})}},se.onopen=()=>{De=0},se.onclose=S=>{console.log("Connection closed",S);let R=`Connection closed (${S.code})`;switch(S.code){case 1e3:R="Connection closed normally";break;case 1001:R="Connection closed: going away";break;case 1006:if(d.value=!0,De<ts&&!Q.value){ar();return}break;case 1011:R="Connection closed: server error";break;default:u.value=!0}console.log(R)},se.onerror=S=>{console.error("WebSocket connection error:",S),a.value=!0,Le({text:"Connection error: Unable to connect to chat server",isUser:!1,isSystem:!0,isError:!0}),De<ts&&!Q.value&&ar()}}catch(S){console.error("Error connecting to socket server:",S),Le({text:`Connection error: ${S instanceof Error?S.message:"Unknown error"}`,isUser:!1,isSystem:!0,isError:!0})}},Ro=()=>{se&&se.close(),se=null};c.onUnmounted(()=>{se&&se.close()});const Hs=S=>{(v.isPreview||v.scenario)&&!S||Te(!Y.value)},Eo=()=>{if(!(v.isPreview||v.scenario)&&et.value.trim()!==""){if(v.isProduction&&$.value.length>0){const S=$.value[$.value.length-1];S.isSystem===!0&&!S.isError&&!S.snippet&&$.value.pop()}$.value.push({text:et.value,isUser:!0}),b.value=!0,lr({message:et.value}),et.value=""}},lr=S=>{se&&se.send(JSON.stringify(S))},cr=()=>{try{const S=P.value.getKey("settings.fontFamily")||"MacPaw Fixel",R=`https://fonts.googleapis.com/css2?family=${S.replace(/\s+/g,"+")}:wght@300;400;500;600;700&display=swap`,E=document.createElement("link");E.rel="preload",E.as="style",E.href=R,document.head.appendChild(E);const I=document.createElement("link");I.rel="stylesheet",I.href=R,I.setAttribute("data-google-font","true"),document.head.appendChild(I),o.value&&(o.value.style.fontFamily=`"${S}", sans-serif`)}catch(S){console.error("Error loading font:",S)}},ur=()=>{const S=P.value.getKey("settings.fontWeight")||400;o.value&&(o.value.style.fontWeight=S)};i.value=!0,c.watch(()=>P.value.getKey("settings.fontFamily"),()=>{cr()}),c.watch(()=>P.value.getKey("settings.fontWeight"),()=>{ur()});const Mo=async()=>{if(w()){const R=await(await fetch(w()+"config")).json();T.value=R,n.value=!0}else n.value=!0},js=(S,R,E)=>new Promise(I=>{const J=performance.now(),me=He=>{const Ie=Math.min(1,(He-J)/E);p.value=S+(R-S)*Ie,Ie<1?requestAnimationFrame(me):I()};requestAnimationFrame(me)}),dr=async S=>{m.value=!0,p.value=0,await c.nextTick(),await js(0,.3,500),S(),await js(.3,.6,200),p.value=.6,await new Promise(R=>setTimeout(R,100)),await js(.6,0,500),m.value=!1},Bo=async(S=25)=>{const R=$.value.filter(I=>!I.isUser&&!I.isSystem&&I.text);if(!R.length)return;const E=R.map(I=>I.text||"");R.forEach(I=>I.text="");for(let I=0;I<R.length;I++){const J=R[I],me=E[I];for(let He=0;He<me.length;He++)J.text=me.slice(0,He+1),await new Promise(Ie=>setTimeout(Ie,S))}},qs=async(S,R)=>{await dr(()=>{const E=Fr.getState(S,P.value,R||v.scenarioOptions);if(Y.value=E.isChatOpen,$.value=E.messages,l.value=E.traceLastShown,a.value=E.isConnectionError,u.value=E.isProcessError,d.value=E.isReconnectError,g.value=E.isInputDisabled,f.value=E.showWelcome,h.value=E.showReconnectNotice??!1,lt.value=E.snippet??null,Q.value=!0,se){try{se.close()}catch{}se=null}}),Bo()},ys=async()=>{await dr(()=>{Q.value=ye.value,f.value=!0,g.value=!1,h.value=!1,a.value=!1,u.value=!1,d.value=!1,$.value=[],Q.value||(!se||se.readyState!==1)&&Ws()})};c.onMounted(async()=>{await Mo(),cr(),ur();const S=v.scenario??Fr.getScenarioFromUrl();if(S){await qs(S);return}if(v.isPreview){zo();return}Ws()}),c.watch(()=>v.scenario,async S=>{S?await qs(S):await ys()});const ze={id:Je,setScenario:async(S,R)=>{await qs(S,R)},clearScenario:async()=>{await ys()},toggleChat:()=>{Hs(!0)},setOpen:S=>{Y.value=S},setActive:S=>{S&&!Y.value&&(Y.value=!0)},setInputDisabled:S=>{g.value=S},setShowReconnectNotice:S=>{h.value=S},setMessages:S=>{$.value=Array.isArray(S)?S:[]},pushMessage:S=>{$.value.push(S)},setSnippet:S=>{lt.value=S??null},resetToLive:async()=>{await ys()},setConfig:S=>{x.value=JSON.parse(JSON.stringify(S))},getConfig:()=>D.value},Po=()=>{const S=window;S.hswWidgets=S.hswWidgets||{},S.hswWidgets[Je.value]=ze,window.dispatchEvent(new CustomEvent("hsw:ready",{detail:{widgetId:Je.value}}))},Ao=()=>{const S=window;S.hswWidgets&&S.hswWidgets[Je.value]&&delete S.hswWidgets[Je.value]},pr=async S=>{var J;const R=S,E=(J=R.detail)==null?void 0:J.widgetId;if(E&&E!==Je.value)return;const{action:I}=R.detail;switch(I){case"setScenario":await ze.setScenario(R.detail.payload.type,R.detail.payload.options);break;case"clearScenario":await ze.clearScenario();break;case"setOpen":ze.setOpen(R.detail.payload);break;case"setActive":ze.setActive(R.detail.payload);break;case"setInputDisabled":ze.setInputDisabled(R.detail.payload);break;case"setShowReconnectNotice":ze.setShowReconnectNotice(R.detail.payload);break;case"setMessages":ze.setMessages(R.detail.payload);break;case"pushMessage":ze.pushMessage(R.detail.payload);break;case"setSnippet":ze.setSnippet(R.detail.payload);break;case"resetToLive":await ze.resetToLive();break;case"setConfig":ze.setConfig(R.detail.payload);break}};return c.onMounted(()=>{Po(),window.addEventListener("hsw:control",pr)}),c.onUnmounted(()=>{Ao(),window.removeEventListener("hsw:control",pr)}),e(ze),(S,R)=>n.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["tw:z-[999] tw:flex tw:justify-end component-isolator tw:transition-all",{"tw:fixed":!j.value,"tw:w-full":Y.value}]),style:c.normalizeStyle({letterSpacing:P.value.getKey("settings.letterSpacing")+"px",..._.value}),ref_key:"chatWrapperRef",ref:o},[c.withDirectives(c.createVNode(Gl,{toggleChat:Hs,element:P.value.getKeyObject("sections.colapsed")},null,8,["element"]),[[c.vShow,!Y.value]]),c.withDirectives(c.createElementVNode("div",{class:c.normalizeClass(["chatWrapper tw:w-full tw:backdrop-blur-[22px] tw:flex tw:items-center tw:border-0 tw:flex-col",[{"tw:h-auto tw:shadow-2xl chat-active":Y.value,"tw:shadow-lg tw:w-fit":!Y.value,"chat-embedded tw:w-full tw:h-full tw:static tw:top-0 tw:left-0":j.value}]]),style:c.normalizeStyle({background:P.value.getKey("settings.bgChat"),borderRadius:`${String(U.value)}px`})},[c.createVNode(pc,{isChatOpen:Y.value,toggleChat:Hs,configDesignClass:P.value,sectionBorderRadius:G.value,mainBorderRadius:U.value,isPreview:Q.value,isEmbedded:j.value,isProduction:S.isProduction||!1,restartChat:y},null,8,["isChatOpen","configDesignClass","sectionBorderRadius","mainBorderRadius","isPreview","isEmbedded","isProduction"]),Y.value?(c.openBlock(),c.createElementBlock("div",Zu,[a.value?(c.openBlock(),c.createElementBlock("div",Yu,[c.createElementVNode("div",{class:"tw:absolute tw:left-0 tw:top-0 tw:w-full tw:h-full",style:c.normalizeStyle({padding:P.value.getKey("sections.warnings.launchIssue.content.sidePadding")+"px"})},[c.createVNode(un,{type:"launchIssue",class:"tw:h-full",headlineText:P.value.getKey("texts.launchIssueTitle"),descriptionText:P.value.getKeyObject("texts.launchIssueText"),warningElement:P.value.getKeyObject("sections.warnings.launchIssue"),configDesignClass:P.value,isProcessError:u.value,restartChat:y},null,8,["headlineText","descriptionText","warningElement","configDesignClass","isProcessError"])],4)])):(c.openBlock(),c.createElementBlock("div",Xu,[c.createVNode(Gu,{messages:$.value,isPreview:Q.value,isEmbedded:j.value,configDesignClass:P.value,isLoading:Gt.value,isStreaming:b.value,isProduction:S.isProduction,sectionBorderRadius:G.value,showWelcome:f.value,ttsUrl:Ju,activeMessage:C.value,"onUpdate:activeMessage":R[0]||(R[0]=E=>C.value=E),isProcessError:u.value,snippet:lt.value,traceLastShown:l.value,onHandleClickMessage:K,onHandleSnippetAction:To,restartChat:y},null,8,["messages","isPreview","isEmbedded","configDesignClass","isLoading","isStreaming","isProduction","sectionBorderRadius","showWelcome","activeMessage","isProcessError","snippet","traceLastShown"]),u.value?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle({padding:P.value.getKey("sections.warnings.connectionIssue.content.sidePadding")+"px"})},[c.createVNode(un,{type:"connectionIssue",headlineText:P.value.getKey("texts.issueText"),configDesignClass:P.value,warningElement:P.value.getKeyObject("sections.warnings.connectionIssue"),restartChat:y},null,8,["headlineText","configDesignClass","warningElement"])],4)):(c.openBlock(),c.createBlock(Sc,{key:1,messageText:et.value,"onUpdate:messageText":R[1]||(R[1]=E=>et.value=E),isProduction:S.isProduction||!1,configDesignClass:P.value,sectionBorderRadius:G.value,classSize:A.value,sendMessage:Eo,isInputDisabled:g.value,showReconnectNotice:h.value,restartChat:y,isStreaming:b.value,transcribeUrl:Qu,onTrace:te},null,8,["messageText","isProduction","configDesignClass","sectionBorderRadius","classSize","isInputDisabled","showReconnectNotice","isStreaming"]))]))])):c.createCommentVNode("",!0),c.createVNode(c.Transition,{name:"fade"},{default:c.withCtx(()=>[m.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:"tw:absolute tw:inset-0 tw:backdrop-blur-[40px] tw:z-[1000]",style:c.normalizeStyle({borderRadius:`${String(U.value)}px`,backgroundColor:`rgba(0,0,0, ${p.value})`})},null,4)):c.createCommentVNode("",!0)]),_:1})],6),[[c.vShow,i.value&&Y.value]])],6)):c.createCommentVNode("",!0)}}),Qe=r=>{const e=window,t=r||Object.keys(e.hswWidgets||{})[0];if(!e.hswWidgets||!e.hswWidgets[t])throw new Error("HSW widget API not ready. Wait for hsw:ready event or pass correct widgetId");return e.hswWidgets[t]},td=async(r,e,t)=>Qe(t).setScenario(r,e),sd=async r=>Qe(r).clearScenario(),nd=(r,e)=>Qe(e).setOpen(r),rd=(r,e)=>Qe(e).setActive(r),id=(r,e)=>Qe(e).setInputDisabled(r),od=(r,e)=>Qe(e).setShowReconnectNotice(r),ad=(r,e)=>Qe(e).setMessages(r),ld=(r,e)=>Qe(e).pushMessage(r),cd=(r,e)=>Qe(e).setSnippet(r),ud=async r=>Qe(r).resetToLive();exports.ChatWrapper=ed;exports.clearScenario=sd;exports.cn=Pn;exports.pushMessage=ld;exports.resetToLive=ud;exports.setActive=rd;exports.setInputDisabled=id;exports.setMessages=ad;exports.setOpen=nd;exports.setScenario=td;exports.setShowReconnectNotice=od;exports.setSnippet=cd;