@telnyx/ai-chat-widget 2.4.2 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -36,7 +36,7 @@ React keys must be passed directly to JSX without using spread:
36
36
  top: ${c}px !important;
37
37
  }
38
38
  `),()=>{m.contains(g)&&m.removeChild(g)}},[t]),w.jsx(h1,{isPresent:t,childRef:i,sizeRef:o,children:N.cloneElement(e,{ref:i})})}const y1=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:o,anchorX:s,root:l})=>{const u=Fn(v1),c=O.useId();let d=!0,p=O.useMemo(()=>(d=!1,{id:c,initial:t,isPresent:n,custom:a,onExitComplete:f=>{u.set(f,!0);for(const g of u.values())if(!g)return;r&&r()},register:f=>(u.set(f,!1),()=>u.delete(f))}),[n,u,r]);return i&&d&&(p={...p}),O.useMemo(()=>{u.forEach((f,g)=>u.set(g,!1))},[n]),N.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),o==="popLayout"&&(e=w.jsx(b1,{isPresent:n,anchorX:s,root:l,children:e})),w.jsx(wi.Provider,{value:p,children:e})};function v1(){return new Map}function iA(e=!0){const t=O.useContext(wi);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=O.useId();O.useEffect(()=>{if(e)return a(i)},[e]);const o=O.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const La=e=>e.key||"";function Mm(e){const t=[];return O.Children.forEach(e,n=>{O.isValidElement(n)&&t.push(n)}),t}const nn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:o=!1,anchorX:s="left",root:l})=>{const[u,c]=iA(o),d=O.useMemo(()=>Mm(e),[e]),p=o&&!u?[]:d.map(La),f=O.useRef(!0),g=O.useRef(d),m=Fn(()=>new Map),[v,h]=O.useState(d),[b,y]=O.useState(d);Ei(()=>{f.current=!1,g.current=d;for(let E=0;E<b.length;E++){const T=La(b[E]);p.includes(T)?m.delete(T):m.get(T)!==!0&&m.set(T,!1)}},[b,p.length,p.join("-")]);const S=[];if(d!==v){let E=[...d];for(let T=0;T<b.length;T++){const k=b[T],C=La(k);p.includes(C)||(E.splice(T,0,k),S.push(k))}return i==="wait"&&S.length&&(E=S),y(Mm(E)),h(d),null}process.env.NODE_ENV!=="production"&&i==="wait"&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:x}=O.useContext(Pf);return w.jsx(w.Fragment,{children:b.map(E=>{const T=La(E),k=o&&!u?!1:d===b||p.includes(T),C=()=>{if(m.has(T))m.set(T,!0);else return;let I=!0;m.forEach(D=>{D||(I=!1)}),I&&(x==null||x(),y(g.current),o&&(c==null||c()),r&&r())};return w.jsx(y1,{isPresent:k,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:i,root:l,onExitComplete:k?void 0:C,anchorX:s,children:E},T)})})},oA=O.createContext({strict:!1}),Pm={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},dr={};for(const e in Pm)dr[e]={isEnabled:t=>Pm[e].some(n=>!!t[n])};function E1(e){for(const t in e)dr[t]={...dr[t],...e[t]}}const w1=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ii(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||w1.has(e)}let sA=e=>!ii(e);function S1(e){typeof e=="function"&&(sA=t=>t.startsWith("on")?!ii(t):e(t))}try{S1(require("@emotion/is-prop-valid").default)}catch{}function x1(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(sA(a)||n===!0&&ii(a)||!t&&!ii(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}const Ai=O.createContext({});function ki(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ra(e){return typeof e=="string"||Array.isArray(e)}const lg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ug=["initial",...lg];function Ri(e){return ki(e.animate)||ug.some(t=>ra(e[t]))}function lA(e){return!!(Ri(e)||e.variants)}function T1(e,t){if(Ri(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ra(n)?n:void 0,animate:ra(r)?r:void 0}}return e.inherit!==!1?t:{}}function A1(e){const{initial:t,animate:n}=T1(e,O.useContext(Ai));return O.useMemo(()=>({initial:t,animate:n}),[Fm(t),Fm(n)])}function Fm(e){return Array.isArray(e)?e.join(" "):e}const aa={};function k1(e){for(const t in e)aa[t]=e[t],Vf(t)&&(aa[t].isCSSVariable=!0)}function uA(e,{layout:t,layoutId:n}){return wr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}const R1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},I1=Er.length;function C1(e,t,n){let r="",a=!0;for(let i=0;i<I1;i++){const o=Er[i],s=e[o];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(o.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||n){const u=JT(s,rg[o]);if(!l){a=!1;const c=R1[o]||o;r+=`${c}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function cg(e,t,n){const{style:r,vars:a,transformOrigin:i}=e;let o=!1,s=!1;for(const l in t){const u=t[l];if(wr.has(l)){o=!0;continue}else if(Vf(l)){a[l]=u;continue}else{const c=JT(u,rg[l]);l.startsWith("origin")?(s=!0,i[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=C1(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:u="50%",originZ:c=0}=i;r.transformOrigin=`${l} ${u} ${c}`}}const dg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cA(e,t,n){for(const r in t)!ze(t[r])&&!uA(r,n)&&(e[r]=t[r])}function _1({transformTemplate:e},t){return O.useMemo(()=>{const n=dg();return cg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function N1(e,t){const n=e.style||{},r={};return cA(r,n,e),Object.assign(r,_1(e,t)),r}function O1(e,t){const n={},r=N1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const L1={offset:"stroke-dashoffset",array:"stroke-dasharray"},D1={offset:"strokeDashoffset",array:"strokeDasharray"};function M1(e,t,n=1,r=0,a=!0){e.pathLength=1;const i=a?L1:D1;e[i.offset]=se.transform(-r);const o=se.transform(t),s=se.transform(n);e[i.array]=`${o} ${s}`}function dA(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:i=1,pathOffset:o=0,...s},l,u,c){if(cg(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:p}=e;d.transform&&(p.transform=d.transform,delete d.transform),(p.transform||d.transformOrigin)&&(p.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),p.transform&&(p.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),a!==void 0&&M1(d,a,i,o,!1)}const pA=()=>({...dg(),attrs:{}}),fA=e=>typeof e=="string"&&e.toLowerCase()==="svg";function P1(e,t,n,r){const a=O.useMemo(()=>{const i=pA();return dA(i,t,fA(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};cA(i,e.style,e),a.style={...i,...a.style}}return a}const F1=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function pg(e){return typeof e!="string"||e.includes("-")?!1:!!(F1.indexOf(e)>-1||/[A-Z]/u.test(e))}function B1(e,t,n,{latestValues:r},a,i=!1){const s=(pg(e)?P1:O1)(t,r,a,e),l=x1(t,typeof e=="string",i),u=e!==O.Fragment?{...l,...s,ref:n}:{},{children:c}=t,d=O.useMemo(()=>ze(c)?c.get():c,[c]);return O.createElement(e,{...u,children:d})}function Bm(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function fg(e,t,n,r){if(typeof t=="function"){const[a,i]=Bm(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=Bm(r);t=t(n!==void 0?n:e.custom,a,i)}return t}function Xa(e){return ze(e)?e.get():e}function U1({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:j1(n,r,a,e),renderState:t()}}function j1(e,t,n,r){const a={},i=r(e,{});for(const p in i)a[p]=Xa(i[p]);let{initial:o,animate:s}=e;const l=Ri(e),u=lA(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const d=c?s:o;if(d&&typeof d!="boolean"&&!ki(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const g=fg(e,p[f]);if(g){const{transitionEnd:m,transition:v,...h}=g;for(const b in h){let y=h[b];if(Array.isArray(y)){const S=c?y.length-1:0;y=y[S]}y!==null&&(a[b]=y)}for(const b in m)a[b]=m[b]}}}return a}const gA=e=>(t,n)=>{const r=O.useContext(Ai),a=O.useContext(wi),i=()=>U1(e,t,r,a);return n?i():Fn(i)};function gg(e,t,n){var i;const{style:r}=e,a={};for(const o in r)(ze(r[o])||t.style&&ze(t.style[o])||uA(o,e)||((i=n==null?void 0:n.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(a[o]=r[o]);return a}const z1=gA({scrapeMotionValuesFromProps:gg,createRenderState:dg});function mA(e,t,n){const r=gg(e,t,n);for(const a in e)if(ze(e[a])||ze(t[a])){const i=Er.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}const G1=gA({scrapeMotionValuesFromProps:mA,createRenderState:pA}),q1=Symbol.for("motionComponentSymbol");function rr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function V1(e,t,n){return O.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):rr(n)&&(n.current=r))},[t])}const mg=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),H1="framerAppearId",hA="data-"+mg(H1),bA=O.createContext({});function $1(e,t,n,r,a){var m,v;const{visualElement:i}=O.useContext(Ai),o=O.useContext(oA),s=O.useContext(wi),l=O.useContext(Ti).reducedMotion,u=O.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,d=O.useContext(bA);c&&!c.projection&&a&&(c.type==="html"||c.type==="svg")&&W1(u.current,n,a,d);const p=O.useRef(!1);O.useInsertionEffect(()=>{c&&p.current&&c.update(n,s)});const f=n[hA],g=O.useRef(!!f&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,f))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,f)));return Ei(()=>{c&&(p.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),O.useEffect(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var h;(h=window.MotionHandoffMarkAsComplete)==null||h.call(window,f)}),g.current=!1),c.enteringChildren=void 0)}),c}function W1(e,t,n,r){const{layoutId:a,layout:i,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yA(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!o||s&&rr(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function yA(e){if(e)return e.options.allowProjection!==!1?e.projection:yA(e.parent)}function ro(e,{forwardMotionProps:t=!1}={},n,r){n&&E1(n);const a=pg(e)?G1:z1;function i(s,l){let u;const c={...O.useContext(Ti),...s,layoutId:Y1(s)},{isStatic:d}=c,p=A1(s),f=a(s,d);if(!d&&Ff){K1(c,n);const g=X1(c);u=g.MeasureLayout,p.visualElement=$1(e,f,c,r,g.ProjectionNode)}return w.jsxs(Ai.Provider,{value:p,children:[u&&p.visualElement?w.jsx(u,{visualElement:p.visualElement,...c}):null,B1(e,s,V1(f,p.visualElement,l),f,d,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=O.forwardRef(i);return o[q1]=e,o}function Y1({layoutId:e}){const t=O.useContext(Pf).id;return t&&e!==void 0?t+"-"+e:e}function K1(e,t){const n=O.useContext(oA).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?yr(!1,r,"lazy-strict-mode"):vt(!1,r,"lazy-strict-mode")}}function X1(e){const{drag:t,layout:n}=dr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Z1(e,t){if(typeof Proxy>"u")return ro;const n=new Map,r=(i,o)=>ro(i,o,e,t),a=(i,o)=>(process.env.NODE_ENV!=="production"&&Si(!1,"motion() is deprecated. Use motion.create() instead."),r(i,o));return new Proxy(a,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,ro(o,void 0,e,t)),n.get(o))})}function vA({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function J1({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Q1(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ao(e){return e===void 0||e===1}function Gp({scale:e,scaleX:t,scaleY:n}){return!ao(e)||!ao(t)||!ao(n)}function _n(e){return Gp(e)||EA(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function EA(e){return Um(e.x)||Um(e.y)}function Um(e){return e&&e!=="0%"}function oi(e,t,n){const r=e-n,a=t*r;return n+a}function jm(e,t,n,r,a){return a!==void 0&&(e=oi(e,a,r)),oi(e,n,r)+t}function qp(e,t=0,n=1,r,a){e.min=jm(e.min,t,n,r,a),e.max=jm(e.max,t,n,r,a)}function wA(e,{x:t,y:n}){qp(e.x,t.translate,t.scale,t.originPoint),qp(e.y,n.translate,n.scale,n.originPoint)}const zm=.999999999999,Gm=1.0000000000001;function e_(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,o;for(let s=0;s<a;s++){i=n[s],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ir(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,wA(e,o)),r&&_n(i.latestValues)&&ir(e,i.latestValues))}t.x<Gm&&t.x>zm&&(t.x=1),t.y<Gm&&t.y>zm&&(t.y=1)}function ar(e,t){e.min=e.min+t,e.max=e.max+t}function qm(e,t,n,r,a=.5){const i=De(e.min,e.max,a);qp(e,t,n,i,r)}function ir(e,t){qm(e.x,t.x,t.scaleX,t.scale,t.originX),qm(e.y,t.y,t.scaleY,t.scale,t.originY)}function SA(e,t){return vA(Q1(e.getBoundingClientRect(),t))}function t_(e,t,n){const r=SA(e,n),{scroll:a}=t;return a&&(ar(r.x,a.offset.x),ar(r.y,a.offset.y)),r}const Vm=()=>({translate:0,scale:1,origin:0,originPoint:0}),or=()=>({x:Vm(),y:Vm()}),Hm=()=>({min:0,max:0}),Pe=()=>({x:Hm(),y:Hm()}),Vp={current:null},xA={current:!1};function n_(){if(xA.current=!0,!!Ff)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Vp.current=e.matches;e.addEventListener("change",t),t()}else Vp.current=!1}const ia=new WeakMap;function r_(e,t,n){for(const r in t){const a=t[r],i=n[r];if(ze(a))e.addValue(r,a);else if(ze(i))e.addValue(r,Ut(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(a):o.hasAnimated||o.set(a)}else{const o=e.getStaticValue(r);e.addValue(r,Ut(o!==void 0?o:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const $m=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class TA{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=eg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=bt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ke.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=Ri(n),this.isVariantNode=lA(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in d){const f=d[p];l[p]!==void 0&&ze(f)&&f.set(l[p])}}mount(t){var n;this.current=t,ia.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,a)=>this.bindToMotionValue(a,r)),xA.current||n_(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Vp.current,process.env.NODE_ENV!=="production"&&Si(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),zt(this.notifyUpdate),zt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=wr.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in dr){const n=dr[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Pe()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<$m.length;r++){const a=$m[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,o=t[i];o&&(this.propEventSubscriptions[a]=this.on(a,o))}this.prevMotionValues=r_(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ut(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(cT(r)||pT(r))?r=parseFloat(r):!m1(r)&&En.test(n)&&(r=ZT(t,n)),this.setBaseTarget(t,ze(r)?r.get():r)),ze(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=fg(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ze(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new jf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){og.render(this.render)}}class AA extends TA{constructor(){super(...arguments),this.KeyframeResolver=YC}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ze(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kA(e,{style:t,vars:n},r,a){const i=e.style;let o;for(o in t)i[o]=t[o];a==null||a.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function a_(e){return window.getComputedStyle(e)}class RA extends AA{constructor(){super(...arguments),this.type="html",this.renderInstance=kA}readValueFromInstance(t,n){var r;if(wr.has(n))return(r=this.projection)!=null&&r.isProjecting?Mp(n):dC(t,n);{const a=a_(t),i=(Vf(n)?a.getPropertyValue(n):a[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return SA(t,n)}build(t,n,r){cg(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return gg(t,n,r)}}const IA=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function i_(e,t,n,r){kA(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(IA.has(a)?a:mg(a),t.attrs[a])}class CA extends AA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(wr.has(n)){const r=XT(n);return r&&r.default||0}return n=IA.has(n)?n:mg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return mA(t,n,r)}build(t,n,r){dA(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){i_(t,n,r,a)}mount(t){this.isSVGTag=fA(t.tagName),super.mount(t)}}const o_=(e,t)=>pg(e)?new CA(t):new RA(t,{allowProjection:e!==O.Fragment});function lr(e,t,n){const r=e.getProps();return fg(r,t,n!==void 0?n:r.custom,e)}const Hp=e=>Array.isArray(e);function s_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ut(n))}function l_(e){return Hp(e)?e[e.length-1]||0:e}function u_(e,t){const n=lr(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const o in i){const s=l_(i[o]);s_(e,o,s)}}function c_(e){return!!(ze(e)&&e.add)}function $p(e,t){const n=e.getValue("willChange");if(c_(n))return n.add(t);if(!n&&dn.WillChange){const r=new dn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function _A(e){return e.props[hA]}const d_=e=>e!==null;function p_(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(d_),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return a[i]}const f_={type:"spring",stiffness:500,damping:25,restSpeed:10},g_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),m_={type:"keyframes",duration:.8},h_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},b_=(e,{keyframes:t})=>t.length>2?m_:wr.has(e)?e.startsWith("scale")?g_(t[1]):f_:h_;function y_({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:o,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const hg=(e,t,n,r={},a,i)=>o=>{const s=ng(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Dt(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:a};y_(s)||Object.assign(c,b_(e,c)),c.duration&&(c.duration=Dt(c.duration)),c.repeatDelay&&(c.repeatDelay=Dt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(jp(c),c.delay===0&&(d=!0)),(dn.instantAnimations||dn.skipAnimations)&&(d=!0,jp(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=p_(c.keyframes,s);if(p!==void 0){ke.update(()=>{c.onUpdate(p),c.onComplete()});return}}return s.isSync?new Qf(c):new LC(c)};function v_({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function bg(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(i=r);const l=[],u=a&&e.animationState&&e.animationState.getState()[a];for(const c in s){const d=e.getValue(c,e.latestValues[c]??null),p=s[c];if(p===void 0||u&&v_(u,c))continue;const f={delay:n,...ng(i||{},c)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(p)&&p===g&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const h=_A(e);if(h){const b=window.MotionHandoffAnimation(h,c,ke);b!==null&&(f.startTime=b,m=!0)}}$p(e,c),d.start(hg(c,d,p,e.shouldReduceMotion&&WT.has(c)?{type:!1}:f,e,m));const v=d.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{ke.update(()=>{o&&u_(e,o)})}),l}function NA(e,t,n,r=0,a=1){const i=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n=="function"?n(i,o):a===1?i*r:s-i*r}function Wp(e,t,n={}){var l;const r=lr(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const i=r?()=>Promise.all(bg(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:p}=a;return E_(e,t,u,c,d,p,n)}:()=>Promise.resolve(),{when:s}=a;if(s){const[u,c]=s==="beforeChildren"?[i,o]:[o,i];return u().then(()=>c())}else return Promise.all([i(),o(n.delay)])}function E_(e,t,n=0,r=0,a=0,i=1,o){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(Wp(l,t,{...o,delay:n+(typeof r=="function"?0:r)+NA(e.variantChildren,l,r,a,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function w_(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>Wp(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=Wp(e,t,n);else{const a=typeof t=="function"?lr(e,t,n.custom):t;r=Promise.all(bg(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function OA(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const S_=ug.length;function LA(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?LA(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<S_;n++){const r=ug[n],a=e.props[r];(ra(a)||a===!1)&&(t[r]=a)}return t}const x_=[...lg].reverse(),T_=lg.length;function A_(e){return t=>Promise.all(t.map(({animation:n,options:r})=>w_(e,n,r)))}function k_(e){let t=A_(e),n=Wm(),r=!0;const a=l=>(u,c)=>{var p;const d=lr(e,c,l==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(d){const{transition:f,transitionEnd:g,...m}=d;u={...u,...m,...g}}return u};function i(l){t=l(e)}function o(l){const{props:u}=e,c=LA(e.parent)||{},d=[],p=new Set;let f={},g=1/0;for(let v=0;v<T_;v++){const h=x_[v],b=n[h],y=u[h]!==void 0?u[h]:c[h],S=ra(y),x=h===l?b.isActive:null;x===!1&&(g=v);let E=y===c[h]&&y!==u[h]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),b.protectedKeys={...f},!b.isActive&&x===null||!y&&!b.prevProp||ki(y)||typeof y=="boolean")continue;const T=R_(b.prevProp,y);let k=T||h===l&&b.isActive&&!E&&S||v>g&&S,C=!1;const I=Array.isArray(y)?y:[y];let D=I.reduce(a(h),{});x===!1&&(D={});const{prevResolvedValues:B={}}=b,P={...B,...D},F=G=>{k=!0,p.has(G)&&(C=!0,p.delete(G)),b.needsAnimating[G]=!0;const L=e.getValue(G);L&&(L.liveStyle=!1)};for(const G in P){const L=D[G],$=B[G];if(f.hasOwnProperty(G))continue;let R=!1;Hp(L)&&Hp($)?R=!OA(L,$):R=L!==$,R?L!=null?F(G):p.add(G):L!==void 0&&p.has(G)?F(G):b.protectedKeys[G]=!0}b.prevProp=y,b.prevResolvedValues=D,b.isActive&&(f={...f,...D}),r&&e.blockInitialAnimation&&(k=!1);const z=E&&T;k&&(!z||C)&&d.push(...I.map(G=>{const L={type:h};if(typeof G=="string"&&r&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,R=lr($,G);if($.enteringChildren&&R){const{delayChildren:Q}=R.transition||{};L.delay=NA($.enteringChildren,e,Q)}}return{animation:G,options:L}}))}if(p.size){const v={};if(typeof u.initial!="boolean"){const h=lr(e,Array.isArray(u.initial)?u.initial[0]:u.initial);h&&h.transition&&(v.transition=h.transition)}p.forEach(h=>{const b=e.getBaseTarget(h),y=e.getValue(h);y&&(y.liveStyle=!0),v[h]=b??null}),d.push({animation:v})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function s(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(p=>{var f;return(f=p.animationState)==null?void 0:f.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const p in n)n[p].protectedKeys={};return c}return{animateChanges:o,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Wm(),r=!0}}}function R_(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!OA(t,e):!1}function Rn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Wm(){return{animate:Rn(!0),whileInView:Rn(),whileHover:Rn(),whileTap:Rn(),whileDrag:Rn(),whileFocus:Rn(),exit:Rn()}}class xn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class I_ extends xn{constructor(t){super(t),t.animationState||(t.animationState=k_(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ki(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let C_=0;class __ extends xn{constructor(){super(...arguments),this.id=C_++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const N_={animation:{Feature:I_},exit:{Feature:__}};function oa(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function va(e){return{point:{x:e.pageX,y:e.pageY}}}const O_=e=>t=>sg(t)&&e(t,va(t));function Wr(e,t,n,r){return oa(e,t,O_(n),r)}const DA=1e-4,L_=1-DA,D_=1+DA,MA=.01,M_=0-MA,P_=0+MA;function ct(e){return e.max-e.min}function F_(e,t,n){return Math.abs(e-t)<=n}function Ym(e,t,n,r=.5){e.origin=r,e.originPoint=De(t.min,t.max,e.origin),e.scale=ct(n)/ct(t),e.translate=De(n.min,n.max,e.origin)-e.originPoint,(e.scale>=L_&&e.scale<=D_||isNaN(e.scale))&&(e.scale=1),(e.translate>=M_&&e.translate<=P_||isNaN(e.translate))&&(e.translate=0)}function Yr(e,t,n,r){Ym(e.x,t.x,n.x,r?r.originX:void 0),Ym(e.y,t.y,n.y,r?r.originY:void 0)}function Km(e,t,n){e.min=n.min+t.min,e.max=e.min+ct(t)}function B_(e,t,n){Km(e.x,t.x,n.x),Km(e.y,t.y,n.y)}function Xm(e,t,n){e.min=t.min-n.min,e.max=e.min+ct(t)}function Kr(e,t,n){Xm(e.x,t.x,n.x),Xm(e.y,t.y,n.y)}function Ot(e){return[e("x"),e("y")]}const PA=({current:e})=>e?e.ownerDocument.defaultView:null,Zm=(e,t)=>Math.abs(e-t);function U_(e,t){const n=Zm(e.x,t.x),r=Zm(e.y,t.y);return Math.sqrt(n**2+r**2)}class FA{constructor(t,n,{transformPagePoint:r,contextWindow:a=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=oo(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,g=U_(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!g)return;const{point:m}=p,{timestamp:v}=Ke;this.history.push({...m,timestamp:v});const{onStart:h,onMove:b}=this.handlers;f||(h&&h(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,f)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=io(f,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,f)=>{this.end();const{onEnd:g,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=oo(p.type==="pointercancel"?this.lastMoveEventInfo:io(f,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,h),m&&m(p,h)},!sg(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=a||window;const s=va(t),l=io(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=Ke;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,oo(l,this.history)),this.removeListeners=ha(Wr(this.contextWindow,"pointermove",this.handlePointerMove),Wr(this.contextWindow,"pointerup",this.handlePointerUp),Wr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),zt(this.updatePoint)}}function io(e,t){return t?{point:t(e.point)}:e}function Jm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function oo({point:e},t){return{point:e,delta:Jm(e,BA(t)),offset:Jm(e,j_(t)),velocity:z_(t,.1)}}function j_(e){return e[0]}function BA(e){return e[e.length-1]}function z_(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=BA(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>Dt(t)));)n--;if(!r)return{x:0,y:0};const i=Yt(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function G_(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?De(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?De(n,e,r.max):Math.min(e,n)),e}function Qm(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function q_(e,{top:t,left:n,bottom:r,right:a}){return{x:Qm(e.x,n,a),y:Qm(e.y,t,r)}}function eh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function V_(e,t){return{x:eh(e.x,t.x),y:eh(e.y,t.y)}}function H_(e,t){let n=.5;const r=ct(e),a=ct(t);return a>r?n=Bn(t.min,t.max-r,e.min):r>a&&(n=Bn(e.min,e.max-a,t.min)),Zt(0,1,n)}function $_(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Yp=.35;function W_(e=Yp){return e===!1?e=0:e===!0&&(e=Yp),{x:th(e,"left","right"),y:th(e,"top","bottom")}}function th(e,t,n){return{min:nh(e,t),max:nh(e,n)}}function nh(e,t){return typeof e=="number"?e:e[t]||0}const Y_=new WeakMap;class K_{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Pe(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(va(d).point)},o=(d,p)=>{const{drag:f,dragPropagation:g,onDragStart:m}=this.getProps();if(f&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ZC(f),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ot(h=>{let b=this.getAxisMotionValue(h).get()||0;if(Kt.test(b)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[h];S&&(b=ct(S)*(parseFloat(b)/100))}}this.originPoint[h]=b}),m&&ke.postRender(()=>m(d,p)),$p(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p;const{dragPropagation:f,dragDirectionLock:g,onDirectionLock:m,onDrag:v}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:h}=p;if(g&&this.currentDirection===null){this.currentDirection=X_(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,h),this.updateAxis("y",p.point,h),this.visualElement.render(),v&&v(d,p)},l=(d,p)=>{this.latestPointerEvent=d,this.latestPanInfo=p,this.stop(d,p),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Ot(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)==null?void 0:p.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new FA(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:PA(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,a=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!a||!r)return;const{velocity:o}=a;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&ke.postRender(()=>s(r,a))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Da(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=G_(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,a=this.constraints;t&&rr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=q_(r.layoutBox,t):this.constraints=!1,this.elastic=W_(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ot(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=$_(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!rr(t))return!1;const r=t.current;vt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=t_(r,a.root,this.visualElement.getTransformPagePoint());let o=V_(a.layout.layoutBox,i);if(n){const s=n(J1(o));this.hasMutatedConstraints=!!s,s&&(o=vA(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Ot(c=>{if(!Da(c,n,this.currentDirection))return;let d=l&&l[c]||{};o&&(d={min:0,max:0});const p=a?200:1e6,f=a?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:p,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return $p(this.visualElement,t),r.start(hg(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ot(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ot(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ot(n=>{const{drag:r}=this.getProps();if(!Da(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:o,max:s}=a.layout.layoutBox[n];i.set(t[n]-De(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!rr(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};Ot(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const l=s.get();a[o]=H_({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ot(o=>{if(!Da(o,t,null))return;const s=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];s.set(De(l,u,a[o]))})}addListeners(){if(!this.visualElement.current)return;Y_.set(this.visualElement,this);const t=this.visualElement.current,n=Wr(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();rr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),ke.read(r);const o=oa(window,"resize",()=>this.scalePositionWithinConstraints()),s=a.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ot(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{o(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:o=Yp,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function Da(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function X_(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Z_ extends xn{constructor(t){super(t),this.removeGroupControls=yt,this.removeListeners=yt,this.controls=new K_(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yt}unmount(){this.removeGroupControls(),this.removeListeners()}}const rh=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class J_ extends xn{constructor(){super(...arguments),this.removePointerDownListener=yt}onPointerDown(t){this.session=new FA(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:PA(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:rh(t),onStart:rh(n),onMove:r,onEnd:(i,o)=>{delete this.session,a&&ke.postRender(()=>a(i,o))}}}mount(){this.removePointerDownListener=Wr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Za={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ah(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Dr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(se.test(e))e=parseFloat(e);else return e;const n=ah(e,t.target.x),r=ah(e,t.target.y);return`${n}% ${r}%`}},Q_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=En.parse(e);if(a.length>5)return r;const i=En.createTransformer(e),o=typeof a[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;a[0+o]/=s,a[1+o]/=l;const u=De(s,l,.5);return typeof a[2+o]=="number"&&(a[2+o]/=u),typeof a[3+o]=="number"&&(a[3+o]/=u),i(a)}};let so=!1;class eN extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;k1(tN),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),so&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Za.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,so=!0,a||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ke.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),og.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;so=!0,a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function UA(e){const[t,n]=iA(),r=O.useContext(Pf);return w.jsx(eN,{...e,layoutGroup:r,switchLayoutGroup:O.useContext(bA),isPresent:t,safeToRemove:n})}const tN={borderRadius:{...Dr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Dr,borderTopRightRadius:Dr,borderBottomLeftRadius:Dr,borderBottomRightRadius:Dr,boxShadow:Q_};function jA(e,t,n){const r=ze(e)?e:Ut(e);return r.start(hg("",r,t,n)),r.animation}const nN=(e,t)=>e.depth-t.depth;class rN{constructor(){this.children=[],this.isDirty=!1}add(t){Bf(this.children,t),this.isDirty=!0}remove(t){ma(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nN),this.isDirty=!1,this.children.forEach(t)}}function aN(e,t){const n=bt.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(zt(r),e(i-t))};return ke.setup(r,!0),()=>zt(r)}const zA=["TopLeft","TopRight","BottomLeft","BottomRight"],iN=zA.length,ih=e=>typeof e=="string"?parseFloat(e):e,oh=e=>typeof e=="number"||se.test(e);function oN(e,t,n,r,a,i){a?(e.opacity=De(0,n.opacity??1,sN(r)),e.opacityExit=De(t.opacity??1,0,lN(r))):i&&(e.opacity=De(t.opacity??1,n.opacity??1,r));for(let o=0;o<iN;o++){const s=`border${zA[o]}Radius`;let l=sh(t,s),u=sh(n,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||oh(l)===oh(u)?(e[s]=Math.max(De(ih(l),ih(u),r),0),(Kt.test(u)||Kt.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||n.rotate)&&(e.rotate=De(t.rotate||0,n.rotate||0,r))}function sh(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const sN=GA(0,.5,vT),lN=GA(.5,.95,yt);function GA(e,t,n){return r=>r<e?0:r>t?1:n(Bn(e,t,r))}function lh(e,t){e.min=t.min,e.max=t.max}function Nt(e,t){lh(e.x,t.x),lh(e.y,t.y)}function uh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ch(e,t,n,r,a){return e-=t,e=oi(e,1/n,r),a!==void 0&&(e=oi(e,1/a,r)),e}function uN(e,t=0,n=1,r=.5,a,i=e,o=e){if(Kt.test(t)&&(t=parseFloat(t),t=De(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=De(i.min,i.max,r);e===i&&(s-=t),e.min=ch(e.min,t,n,s,a),e.max=ch(e.max,t,n,s,a)}function dh(e,t,[n,r,a],i,o){uN(e,t[n],t[r],t[a],t.scale,i,o)}const cN=["x","scaleX","originX"],dN=["y","scaleY","originY"];function ph(e,t,n,r){dh(e.x,t,cN,n?n.x:void 0,r?r.x:void 0),dh(e.y,t,dN,n?n.y:void 0,r?r.y:void 0)}function fh(e){return e.translate===0&&e.scale===1}function qA(e){return fh(e.x)&&fh(e.y)}function gh(e,t){return e.min===t.min&&e.max===t.max}function pN(e,t){return gh(e.x,t.x)&&gh(e.y,t.y)}function mh(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function VA(e,t){return mh(e.x,t.x)&&mh(e.y,t.y)}function hh(e){return ct(e.x)/ct(e.y)}function bh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class fN{constructor(){this.members=[]}add(t){Bf(this.members,t),t.scheduleRender()}remove(t){if(ma(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function gN(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((a||i||o)&&(r=`translate3d(${a}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:p,skewX:f,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),f&&(r+=`skewX(${f}deg) `),g&&(r+=`skewY(${g}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const lo=["","X","Y","Z"],mN=1e3;let hN=0;function uo(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function HA(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=_A(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&HA(r)}function $A({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(o={},s=t==null?void 0:t()){this.id=hN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vN),this.nodes.forEach(xN),this.nodes.forEach(TN),this.nodes.forEach(EN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new rN)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new jf),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const l=this.eventHandlers.get(o);l&&l.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=xi(o)&&!aA(o),this.instance=o;const{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let c,d=0;const p=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{d=window.innerWidth}),e(o,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=aN(p,250),Za.hasAnimatedSinceResize&&(Za.hasAnimatedSinceResize=!1,this.nodes.forEach(Eh)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:p,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||CN,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),h=!this.targetLayout||!VA(this.targetLayout,f),b=!d&&p;if(this.options.layoutRoot||this.resumeFrom||b||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const y={...ng(g,"layout"),onPlay:m,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,b)}else d||Eh(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),zt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(AN),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&HA(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(yh);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(vh);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(SN),this.nodes.forEach(bN),this.nodes.forEach(yN)):this.nodes.forEach(vh),this.clearAllSnapshots();const s=bt.now();Ke.delta=Zt(0,1e3/60,s-Ke.timestamp),Ke.timestamp=s,Ke.isProcessing=!0,Zi.update.process(Ke),Zi.preRender.process(Ke),Zi.render.process(Ke),Ke.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,og.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(wN),this.sharedNodes.forEach(kN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ct(this.snapshot.measuredBox.x)&&!ct(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Pe(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!a)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!qA(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(s||_n(this.latestValues)||c)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return o&&(l=this.removeTransform(l)),_N(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Pe();const s=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(NN))){const{scroll:c}=this.root;c&&(ar(s.x,c.offset.x),ar(s.y,c.offset.y))}return s}removeElementScroll(o){var l;const s=Pe();if(Nt(s,o),(l=this.scroll)!=null&&l.wasRoot)return s;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:d,options:p}=c;c!==this.root&&d&&p.layoutScroll&&(d.wasRoot&&Nt(s,o),ar(s.x,d.offset.x),ar(s.y,d.offset.y))}return s}applyTransform(o,s=!1){const l=Pe();Nt(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ir(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),_n(c.latestValues)&&ir(l,c.latestValues)}return _n(this.latestValues)&&ir(l,this.latestValues),l}removeTransform(o){const s=Pe();Nt(s,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!_n(u.latestValues))continue;Gp(u.latestValues)&&u.updateSnapshot();const c=Pe(),d=u.measurePageBox();Nt(c,d),ph(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return _n(this.latestValues)&&ph(s,this.latestValues),s}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ke.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=Ke.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Kr(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Nt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Pe(),this.targetWithTransforms=Pe()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),B_(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Nt(this.target,this.layout.layoutBox),wA(this.target,this.targetDelta)):Nt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Pe(),this.relativeTargetOrigin=Pe(),Kr(this.relativeTargetOrigin,this.target,f.target),Nt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Gp(this.parent.latestValues)||EA(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var g;const o=this.getLead(),s=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Ke.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Nt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;e_(this.layoutCorrected,this.treeScale,this.path,s),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Pe());const{target:f}=o;if(!f){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(uh(this.prevProjectionDelta.x,this.projectionDelta.x),uh(this.prevProjectionDelta.y,this.projectionDelta.y)),Yr(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==p||!bh(this.projectionDelta.x,this.prevProjectionDelta.x)||!bh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",f))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)==null||s.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=or(),this.projectionDelta=or(),this.projectionDeltaWithTransform=or()}setAnimationOrigin(o,s=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=or();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const p=Pe(),f=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=f!==g,v=this.getStack(),h=!v||v.members.length<=1,b=!!(m&&!h&&this.options.crossfade===!0&&!this.path.some(IN));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const x=S/1e3;wh(d.x,o.x,x),wh(d.y,o.y,x),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Kr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),RN(this.relativeTarget,this.relativeTargetOrigin,p,x),y&&pN(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Pe()),Nt(y,this.relativeTarget)),m&&(this.animationValues=c,oN(c,u,this.latestValues,x,b,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var s,l,u;this.notifyListeners("animationStart"),(s=this.currentAnimation)==null||s.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(zt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{Za.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ut(0)),this.currentAnimation=jA(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(mN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:c}=o;if(!(!s||!l||!u)){if(this!==o&&this.layout&&u&&WA(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Pe();const d=ct(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=ct(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}Nt(s,l),ir(s,c),Yr(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new fN),this.sharedNodes.get(o).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())==null?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())==null?void 0:s.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const u={};l.z&&uo("z",o,u,this.animationValues);for(let c=0;c<lo.length;c++)uo(`rotate${lo[c]}`,o,u,this.animationValues),uo(`skew${lo[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xa(s==null?void 0:s.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xa(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!_n(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=gN(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),o.transform=d;const{x:p,y:f}=this.projectionDelta;o.transformOrigin=`${p.origin*100}% ${f.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const g in aa){if(c[g]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:h}=aa[g],b=d==="none"?c[g]:m(c[g],u);if(v){const y=v.length;for(let S=0;S<y;S++)o[v[S]]=b}else h?this.options.visualElement.renderState.vars[g]=b:o[g]=b}this.options.layoutId&&(o.pointerEvents=u===this?Xa(s==null?void 0:s.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)==null?void 0:s.stop()}),this.root.nodes.forEach(yh),this.root.sharedNodes.clear()}}}function bN(e){e.updateLayout()}function yN(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:a}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?Ot(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],f=ct(p);p.min=r[d].min,p.max=p.min+f}):WA(i,t.layoutBox,r)&&Ot(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],f=ct(r[d]);p.max=p.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});const s=or();Yr(s,r,t.layoutBox);const l=or();o?Yr(l,e.applyTransform(a,!0),t.measuredBox):Yr(l,r,t.layoutBox);const u=!qA(s);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:f}=d;if(p&&f){const g=Pe();Kr(g,t.layoutBox,p.layoutBox);const m=Pe();Kr(m,r,f.layoutBox),VA(g,m)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function EN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function wN(e){e.clearSnapshot()}function yh(e){e.clearMeasurements()}function vh(e){e.isLayoutDirty=!1}function SN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Eh(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xN(e){e.resolveTargetDelta()}function TN(e){e.calcProjection()}function AN(e){e.resetSkewAndRotation()}function kN(e){e.removeLeadSnapshot()}function wh(e,t,n){e.translate=De(t.translate,0,n),e.scale=De(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Sh(e,t,n,r){e.min=De(t.min,n.min,r),e.max=De(t.max,n.max,r)}function RN(e,t,n,r){Sh(e.x,t.x,n.x,r),Sh(e.y,t.y,n.y,r)}function IN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const CN={duration:.45,ease:[.4,0,.1,1]},xh=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Th=xh("applewebkit/")&&!xh("chrome/")?Math.round:yt;function Ah(e){e.min=Th(e.min),e.max=Th(e.max)}function _N(e){Ah(e.x),Ah(e.y)}function WA(e,t,n){return e==="position"||e==="preserve-aspect"&&!F_(hh(t),hh(n),.2)}function NN(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const ON=$A({attachResizeListener:(e,t)=>oa(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),co={current:void 0},YA=$A({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!co.current){const e=new ON({});e.mount(window),e.setOptions({layoutScroll:!0}),co.current=e}return co.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),LN={pan:{Feature:J_},drag:{Feature:Z_,ProjectionNode:YA,MeasureLayout:UA}};function kh(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=r[a];i&&ke.postRender(()=>i(t,va(t)))}class DN extends xn{mount(){const{current:t}=this.node;t&&(this.unmount=JC(t,(n,r)=>(kh(this.node,r,"Start"),a=>kh(this.node,a,"End"))))}unmount(){}}class MN extends xn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ha(oa(this.node.current,"focus",()=>this.onFocus()),oa(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rh(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),i=r[a];i&&ke.postRender(()=>i(t,va(t)))}class PN extends xn{mount(){const{current:t}=this.node;t&&(this.unmount=n1(t,(n,r)=>(Rh(this.node,r,"Start"),(a,{success:i})=>Rh(this.node,a,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Kp=new WeakMap,po=new WeakMap,FN=e=>{const t=Kp.get(e.target);t&&t(e)},BN=e=>{e.forEach(FN)};function UN({root:e,...t}){const n=e||document;po.has(n)||po.set(n,{});const r=po.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(BN,{root:e,...t})),r[a]}function jN(e,t,n){const r=UN(t);return Kp.set(e,n),r.observe(e),()=>{Kp.delete(e),r.unobserve(e)}}const zN={some:0,all:1};class GN extends xn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:zN[a]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),p=u?c:d;p&&p(l)};return jN(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(qN(t,n))&&this.startObserver()}unmount(){}}function qN({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const VN={inView:{Feature:GN},tap:{Feature:PN},focus:{Feature:MN},hover:{Feature:DN}},HN={layout:{ProjectionNode:YA,MeasureLayout:UA}},$N={...N_,...VN,...LN,...HN},ge=Z1($N,o_);function WN(e){return O.useEffect(()=>()=>e(),[])}function YN(e,t,n){O.useInsertionEffect(()=>e.on(t,n),[e,t,n])}const KN=50,Ih=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),XN=()=>({time:0,x:Ih(),y:Ih()}),ZN={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Ch(e,t,n,r){const a=n[t],{length:i,position:o}=ZN[t],s=a.current,l=n.time;a.current=e[`scroll${o}`],a.scrollLength=e[`scroll${i}`]-e[`client${i}`],a.offset.length=0,a.offset[0]=0,a.offset[1]=a.scrollLength,a.progress=Bn(0,a.scrollLength,a.current);const u=r-l;a.velocity=u>KN?0:zf(a.current-s,u)}function JN(e,t,n){Ch(e,"x",t,n),Ch(e,"y",t,n),t.time=n}function QN(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(ig(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const a=r.getBoundingClientRect();r=r.parentElement;const i=r.getBoundingClientRect();n.x+=a.left-i.left,n.y+=a.top-i.top}else if(r instanceof SVGGraphicsElement){const{x:a,y:i}=r.getBBox();n.x+=a,n.y+=i;let o=null,s=r.parentNode;for(;!o;)s.tagName==="svg"&&(o=s),s=r.parentNode;r=o}else break;return n}const Xp={start:0,center:.5,end:1};function _h(e,t,n=0){let r=0;if(e in Xp&&(e=Xp[e]),typeof e=="string"){const a=parseFloat(e);e.endsWith("px")?r=a:e.endsWith("%")?e=a/100:e.endsWith("vw")?r=a/100*document.documentElement.clientWidth:e.endsWith("vh")?r=a/100*document.documentElement.clientHeight:e=a}return typeof e=="number"&&(r=t*e),n+r}const eO=[0,0];function tO(e,t,n,r){let a=Array.isArray(e)?e:eO,i=0,o=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,Xp[e]?e:"0"]),i=_h(a[0],n,r),o=_h(a[1],t),i-o}const nO={All:[[0,0],[1,1]]},rO={x:0,y:0};function aO(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function iO(e,t,n){const{offset:r=nO.All}=n,{target:a=e,axis:i="y"}=n,o=i==="y"?"height":"width",s=a!==e?QN(a,e):rO,l=a===e?{width:e.scrollWidth,height:e.scrollHeight}:aO(a),u={width:e.clientWidth,height:e.clientHeight};t[i].offset.length=0;let c=!t[i].interpolate;const d=r.length;for(let p=0;p<d;p++){const f=tO(r[p],u[o],l[o],s[i]);!c&&f!==t[i].interpolatorOffsets[p]&&(c=!0),t[i].offset[p]=f}c&&(t[i].interpolate=FT(t[i].offset,Xf(r),{clamp:!1}),t[i].interpolatorOffsets=[...t[i].offset]),t[i].progress=Zt(0,1,t[i].interpolate(t[i].current))}function oO(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&Si(getComputedStyle(e).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function sO(e,t,n,r={}){return{measure:a=>{oO(e,r.target,n),JN(e,n,a),(r.offset||r.target)&&iO(e,n,r)},notify:()=>t(n)}}const Mr=new WeakMap,Nh=new WeakMap,fo=new WeakMap,Oh=e=>e===document.scrollingElement?window:e;function KA(e,{container:t=document.scrollingElement,...n}={}){if(!t)return yt;let r=fo.get(t);r||(r=new Set,fo.set(t,r));const a=XN(),i=sO(t,e,a,n);if(r.add(i),!Mr.has(t)){const s=()=>{for(const d of r)d.measure(Ke.timestamp);ke.preUpdate(l)},l=()=>{for(const d of r)d.notify()},u=()=>ke.read(s);Mr.set(t,u);const c=Oh(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&Nh.set(t,d1(t,u)),c.addEventListener("scroll",u,{passive:!0}),u()}const o=Mr.get(t);return ke.read(o,!1,!0),()=>{var u;zt(o);const s=fo.get(t);if(!s||(s.delete(i),s.size))return;const l=Mr.get(t);Mr.delete(t),l&&(Oh(t).removeEventListener("scroll",l),(u=Nh.get(t))==null||u(),window.removeEventListener("resize",l))}}const Lh=new Map;function lO(e){const t={value:0},n=KA(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function XA({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);const a=Lh.get(t)??new Map;Lh.set(t,a);const i=n.target??"self",o=a.get(i)??{},s=r+(n.offset??[]).join(",");return o[s]||(o[s]=!n.target&&GT()?new ScrollTimeline({source:t,axis:r}):lO({container:t,...n})),o[s]}function uO(e,t){const n=XA(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:r=>(r.pause(),rA(a=>{r.time=r.duration*a},n))})}function cO(e){return e.length===2}function dO(e,t){return cO(e)?KA(n=>{e(n[t.axis].progress,n)},t):rA(e,XA(t))}function pO(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return yt;const a={axis:t,container:n,...r};return typeof e=="function"?dO(e,a):uO(e,a)}const fO=()=>({scrollX:Ut(0),scrollY:Ut(0),scrollXProgress:Ut(0),scrollYProgress:Ut(0)}),Ma=e=>e?!e.current:!1;function gO({container:e,target:t,...n}={}){const r=Fn(fO),a=O.useRef(null),i=O.useRef(!1),o=O.useCallback(()=>(a.current=pO((s,{x:l,y:u})=>{r.scrollX.set(l.current),r.scrollXProgress.set(l.progress),r.scrollY.set(u.current),r.scrollYProgress.set(u.progress)},{...n,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var s;(s=a.current)==null||s.call(a)}),[e,t,JSON.stringify(n.offset)]);return Ei(()=>{if(i.current=!1,Ma(e)||Ma(t)){i.current=!0;return}else return o()},[o]),O.useEffect(()=>{if(i.current)return vt(!Ma(e),"Container ref is defined but not hydrated","use-scroll-ref"),vt(!Ma(t),"Target ref is defined but not hydrated","use-scroll-ref"),o()},[o]),r}function Zp(e){const t=Fn(()=>Ut(e)),{isStatic:n}=O.useContext(Ti);if(n){const[,r]=O.useState(e);O.useEffect(()=>t.on("change",r),[])}return t}function mO(e,t){const n=Zp(t()),r=()=>n.set(t());return r(),Ei(()=>{const a=()=>ke.preRender(r,!1,!0),i=e.map(o=>o.on("change",a));return()=>{i.forEach(o=>o()),zt(r)}}),n}function Dh(e,...t){const n=e.length;function r(){let a="";for(let i=0;i<n;i++){a+=e[i];const o=t[i];o&&(a+=ze(o)?o.get():o)}return a}return mO(t.filter(ze),r)}function yg(e){return typeof e=="object"&&!Array.isArray(e)}function ZA(e,t,n,r){return typeof e=="string"&&yg(t)?ag(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function hO(e,t,n){return e*(t+1)}function Mh(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function bO(e,t,n){for(let r=0;r<e.length;r++){const a=e[r];a.at>t&&a.at<n&&(ma(e,a),r--)}}function yO(e,t,n,r,a,i){bO(e,a,i);for(let o=0;o<t.length;o++)e.push({value:t[o],at:De(a,i,r[o]),easing:xT(n,o)})}function vO(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function EO(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const wO="easeInOut",SO=20;function xO(e,{defaultTransition:t={},...n}={},r,a){const i=t.duration||.3,o=new Map,s=new Map,l={},u=new Map;let c=0,d=0,p=0;for(let f=0;f<e.length;f++){const g=e[f];if(typeof g=="string"){u.set(g,d);continue}else if(!Array.isArray(g)){u.set(g.name,Mh(d,g.at,c,u));continue}let[m,v,h={}]=g;h.at!==void 0&&(d=Mh(d,h.at,c,u));let b=0;const y=(S,x,E,T=0,k=0)=>{const C=TO(S),{delay:I=0,times:D=Xf(C),type:B="keyframes",repeat:P,repeatType:F,repeatDelay:z=0,...H}=x;let{ease:G=t.ease||"easeOut",duration:L}=x;const $=typeof I=="function"?I(T,k):I,R=C.length,Q=tg(B)?B:a==null?void 0:a[B||"keyframes"];if(R<=2&&Q){let oe=100;if(R===2&&RO(C)){const de=C[1]-C[0];oe=Math.abs(de)}const ae={...H};L!==void 0&&(ae.duration=Dt(L));const ee=MT(ae,oe,Q);G=ee.ease,L=ee.duration}L??(L=i);const ne=d+$;D.length===1&&D[0]===0&&(D[1]=1);const A=D.length-C.length;if(A>0&&BT(D,A),C.length===1&&C.unshift(null),P){vt(P<SO,"Repeat count too high, must be less than 20","repeat-count-high"),L=hO(L,P);const oe=[...C],ae=[...D];G=Array.isArray(G)?[...G]:[G];const ee=[...G];for(let de=0;de<P;de++){C.push(...oe);for(let he=0;he<oe.length;he++)D.push(ae[he]+(de+1)),G.push(he===0?"linear":xT(ee,he-1))}vO(D,P)}const Y=ne+L;yO(E,C,G,D,ne,Y),b=Math.max($+L,b),p=Math.max(Y,p)};if(ze(m)){const S=Ph(m,s);y(v,h,Fh("default",S))}else{const S=ZA(m,v,r,l),x=S.length;for(let E=0;E<x;E++){v=v,h=h;const T=S[E],k=Ph(T,s);for(const C in v)y(v[C],AO(h,C),Fh(C,k),E,x)}}c=d,d+=b}return s.forEach((f,g)=>{for(const m in f){const v=f[m];v.sort(EO);const h=[],b=[],y=[];for(let x=0;x<v.length;x++){const{at:E,value:T,easing:k}=v[x];h.push(T),b.push(Bn(0,p,E)),y.push(k||"easeOut")}b[0]!==0&&(b.unshift(0),h.unshift(h[0]),y.unshift(wO)),b[b.length-1]!==1&&(b.push(1),h.push(null)),o.has(g)||o.set(g,{keyframes:{},transition:{}});const S=o.get(g);S.keyframes[m]=h,S.transition[m]={...t,duration:p,ease:y,times:b,...n}}}),o}function Ph(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Fh(e,t){return t[e]||(t[e]=[]),t[e]}function TO(e){return Array.isArray(e)?e:[e]}function AO(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const kO=e=>typeof e=="number",RO=e=>e.every(kO);function IO(e,t){return e in t}class CO extends TA{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(IO(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Pe()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function _O(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=xi(e)&&!aA(e)?new CA(t):new RA(t);n.mount(e),ia.set(e,n)}function NO(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new CO(t);n.mount(e),ia.set(e,n)}function OO(e,t){return ze(e)||typeof e=="number"||typeof e=="string"&&!yg(t)}function JA(e,t,n,r){const a=[];if(OO(e,t))a.push(jA(e,yg(t)&&t.default||t,n&&(n.default||n)));else{const i=ZA(e,t,r),o=i.length;vt(!!o,"No valid elements provided.","no-valid-elements");for(let s=0;s<o;s++){const l=i[s];vt(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const u=l instanceof Element?_O:NO;ia.has(l)||u(l);const c=ia.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,o)),a.push(...bg(c,{...t,transition:d},{}))}}return a}function LO(e,t,n){const r=[];return xO(e,t,n,{spring:na}).forEach(({keyframes:i,transition:o},s)=>{r.push(...JA(s,i,o))}),r}function DO(e){return Array.isArray(e)&&e.some(Array.isArray)}function MO(e){function t(n,r,a){let i=[];DO(n)?i=LO(n,r,e):i=JA(n,r,a,e);const o=new MC(i);return e&&(e.animations.push(o),o.finished.then(()=>{ma(e.animations,o)})),o}return t}function PO(){const e=Fn(()=>({current:null,animations:[]})),t=Fn(()=>MO(e));return WN(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}const mt={CHAT_API_URL:"https://api.telnyx.com/v2/troubleshooting_agent/support/portal",FLOW_API_URL:"https://api.telnyx.com/v2/flow/execute/live/public_chatbots",FEEDBACK_API_URL:"https://api.telnyx.com/v2/troubleshooting_agent/support/portal",WIDGET_WIDTH:360,WIDGET_HEIGHT:640,DEFAULT_PLACEHOLDERS:["Type your message here..."],MAX_RETRIES:1,RETRY_INTERVAL:15e3};var we=(e=>(e.FLOW="flow",e.AIDA="aida",e))(we||{});const Jp={[we.AIDA]:{label:"Heavy thinking",icon:"🧠",endpoint:we.AIDA,tooltip:{title:"🧠 Heavy thinking",capabilities:["Troubleshooting tools","Deep reasoning"],timing:"Slower, but thorough"},firstMessage:"Hello! I can help troubleshoot your account issues with heavy thinking and deep reasoning."},[we.FLOW]:{label:"Instant",icon:"⚡",endpoint:we.FLOW,tooltip:{title:"⚡ Instant",capabilities:["Knowledge base & docs","Quick how-to answers"],timing:"Faster responses"},firstMessage:"Hello! I can quickly answer questions about Telnyx docs and how-to guides."}},nt=[];for(let e=0;e<256;++e)nt.push((e+256).toString(16).slice(1));function QA(e,t=0){return(nt[e[t+0]]+nt[e[t+1]]+nt[e[t+2]]+nt[e[t+3]]+"-"+nt[e[t+4]]+nt[e[t+5]]+"-"+nt[e[t+6]]+nt[e[t+7]]+"-"+nt[e[t+8]]+nt[e[t+9]]+"-"+nt[e[t+10]]+nt[e[t+11]]+nt[e[t+12]]+nt[e[t+13]]+nt[e[t+14]]+nt[e[t+15]]).toLowerCase()}let go;const FO=new Uint8Array(16);function ek(){if(!go){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");go=crypto.getRandomValues.bind(crypto)}return go(FO)}const BO=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Bh={randomUUID:BO};function tk(e,t,n){var a;if(Bh.randomUUID&&!e)return Bh.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??ek();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,QA(r)}const mo={};function Uh(e,t,n){let r;{const a=Date.now(),i=ek();UO(mo,a,i),r=jO(i,mo.msecs,mo.seq,t,n)}return t??QA(r)}function UO(e,t,n){return e.msecs??(e.msecs=-1/0),e.seq??(e.seq=0),t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function jO(e,t,n,r,a=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!r)r=new Uint8Array(16),a=0;else if(a<0||a+16>r.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);return t??(t=Date.now()),n??(n=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9]),r[a++]=t/1099511627776&255,r[a++]=t/4294967296&255,r[a++]=t/16777216&255,r[a++]=t/65536&255,r[a++]=t/256&255,r[a++]=t&255,r[a++]=112|n>>>28&15,r[a++]=n>>>20&255,r[a++]=128|n>>>14&63,r[a++]=n>>>6&255,r[a++]=n<<2&255|e[10]&3,r[a++]=e[11],r[a++]=e[12],r[a++]=e[13],r[a++]=e[14],r[a++]=e[15],r}const jh=e=>{let t;const n=new Set,r=(u,c)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const p=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(f=>f(t,p))}},a=()=>t,s={setState:r,getState:a,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,a,s);return s},zO=(e=>e?jh(e):jh),GO=e=>e;function qO(e,t=GO){const n=O.useSyncExternalStore(e.subscribe,O.useCallback(()=>t(e.getState()),[e,t]),O.useCallback(()=>t(e.getInitialState()),[e,t]));return O.useDebugValue(n),n}const zh=e=>{const t=zO(e),n=r=>qO(t,r);return Object.assign(n,t),n},VO=(e=>e?zh(e):zh);var nk=Symbol.for("immer-nothing"),Gh=Symbol.for("immer-draftable"),Rt=Symbol.for("immer-state"),HO=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function ht(e,...t){if(process.env.NODE_ENV!=="production"){const n=HO[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var pr=Object.getPrototypeOf;function fr(e){return!!e&&!!e[Rt]}function Un(e){var t;return e?rk(e)||Array.isArray(e)||!!e[Gh]||!!((t=e.constructor)!=null&&t[Gh])||Ci(e)||_i(e):!1}var $O=Object.prototype.constructor.toString();function rk(e){if(!e||typeof e!="object")return!1;const t=pr(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===$O}function si(e,t){Ii(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ii(e){const t=e[Rt];return t?t.type_:Array.isArray(e)?1:Ci(e)?2:_i(e)?3:0}function Qp(e,t){return Ii(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ak(e,t,n){const r=Ii(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function WO(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ci(e){return e instanceof Map}function _i(e){return e instanceof Set}function Nn(e){return e.copy_||e.base_}function ef(e,t){if(Ci(e))return new Map(e);if(_i(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=rk(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Rt];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const o=a[i],s=r[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(r[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(pr(e),r)}else{const r=pr(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function vg(e,t=!1){return Ni(e)||fr(e)||!Un(e)||(Ii(e)>1&&(e.set=e.add=e.clear=e.delete=YO),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>vg(r,!0))),e}function YO(){ht(2)}function Ni(e){return Object.isFrozen(e)}var KO={};function jn(e){const t=KO[e];return t||ht(0,e),t}var sa;function ik(){return sa}function XO(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qh(e,t){t&&(jn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function tf(e){nf(e),e.drafts_.forEach(ZO),e.drafts_=null}function nf(e){e===sa&&(sa=e.parent_)}function Vh(e){return sa=XO(sa,e)}function ZO(e){const t=e[Rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Hh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Rt].modified_&&(tf(t),ht(4)),Un(e)&&(e=li(t,e),t.parent_||ui(t,e)),t.patches_&&jn("Patches").generateReplacementPatches_(n[Rt].base_,e,t.patches_,t.inversePatches_)):e=li(t,n,[]),tf(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nk?e:void 0}function li(e,t,n){if(Ni(t))return t;const r=t[Rt];if(!r)return si(t,(a,i)=>$h(e,r,t,a,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ui(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const a=r.copy_;let i=a,o=!1;r.type_===3&&(i=new Set(a),a.clear(),o=!0),si(i,(s,l)=>$h(e,r,a,s,l,n,o)),ui(e,a,!1),n&&e.patches_&&jn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function $h(e,t,n,r,a,i,o){if(process.env.NODE_ENV!=="production"&&a===n&&ht(5),fr(a)){const s=i&&t&&t.type_!==3&&!Qp(t.assigned_,r)?i.concat(r):void 0,l=li(e,a,s);if(ak(n,r,l),fr(l))e.canAutoFreeze_=!1;else return}else o&&n.add(a);if(Un(a)&&!Ni(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;li(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ui(e,a)}}function ui(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&vg(t,n)}function JO(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ik(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,i=Eg;n&&(a=[r],i=la);const{revoke:o,proxy:s}=Proxy.revocable(a,i);return r.draft_=s,r.revoke_=o,s}var Eg={get(e,t){if(t===Rt)return e;const n=Nn(e);if(!Qp(n,t))return QO(e,n,t);const r=n[t];return e.finalized_||!Un(r)?r:r===ho(e.base_,t)?(bo(e),e.copy_[t]=af(r,e)):r},has(e,t){return t in Nn(e)},ownKeys(e){return Reflect.ownKeys(Nn(e))},set(e,t,n){const r=ok(Nn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=ho(Nn(e),t),i=a==null?void 0:a[Rt];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(WO(n,a)&&(n!==void 0||Qp(e.base_,t)))return!0;bo(e),rf(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ho(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,bo(e),rf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Nn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ht(11)},getPrototypeOf(e){return pr(e.base_)},setPrototypeOf(){ht(12)}},la={};si(Eg,(e,t)=>{la[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});la.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&ht(13),la.set.call(this,e,t,void 0)};la.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&ht(14),Eg.set.call(this,e[0],t,n,e[0])};function ho(e,t){const n=e[Rt];return(n?Nn(n):e)[t]}function QO(e,t,n){var a;const r=ok(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function ok(e,t){if(!(t in e))return;let n=pr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=pr(n)}}function rf(e){e.modified_||(e.modified_=!0,e.parent_&&rf(e.parent_))}function bo(e){e.copy_||(e.copy_=ef(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var eL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const o=this;return function(l=i,...u){return o.produce(l,c=>n.call(this,c,...u))}}typeof n!="function"&&ht(6),r!==void 0&&typeof r!="function"&&ht(7);let a;if(Un(t)){const i=Vh(this),o=af(t,void 0);let s=!0;try{a=n(o),s=!1}finally{s?tf(i):nf(i)}return qh(i,r),Hh(a,i)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===nk&&(a=void 0),this.autoFreeze_&&vg(a,!0),r){const i=[],o=[];jn("Patches").generateReplacementPatches_(t,a,i,o),r(i,o)}return a}else ht(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,l=>t(l,...s));let r,a;return[this.produce(t,n,(o,s)=>{r=o,a=s}),r,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Un(e)||ht(8),fr(e)&&(e=tL(e));const t=Vh(this),n=af(e,void 0);return n[Rt].isManual_=!0,nf(t),n}finishDraft(e,t){const n=e&&e[Rt];(!n||!n.isManual_)&&ht(9);const{scope_:r}=n;return qh(r,t),Hh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=jn("Patches").applyPatches_;return fr(e)?r(e,t):this.produce(e,a=>r(a,t))}};function af(e,t){const n=Ci(e)?jn("MapSet").proxyMap_(e,t):_i(e)?jn("MapSet").proxySet_(e,t):JO(e,t);return(t?t.scope_:ik()).drafts_.push(n),n}function tL(e){return fr(e)||ht(10,e),sk(e)}function sk(e){if(!Un(e)||Ni(e))return e;const t=e[Rt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ef(e,t.scope_.immer_.useStrictShallowCopy_)}else n=ef(e,!0);return si(n,(r,a)=>{ak(n,r,sk(a))}),t&&(t.finalized_=!1),n}var It=new eL,nL=It.produce;It.produceWithPatches.bind(It);It.setAutoFreeze.bind(It);It.setUseStrictShallowCopy.bind(It);It.applyPatches.bind(It);It.createDraft.bind(It);It.finishDraft.bind(It);const rL=e=>(t,n,r)=>(r.setState=(a,i,...o)=>{const s=typeof a=="function"?nL(a):a;return t(s,i,...o)},e(r.setState,n,r)),aL=rL;class lk{constructor(t,n,r){Wn(this,"baseURL");Wn(this,"feedbackUrl");Wn(this,"getUser");this.baseURL=t,this.feedbackUrl=n,this.getUser=r}async sendFeedback({messageId:t,type:n}){try{const r=this.getUser(),{id:a}=r;if(!a){console.error("User ID is required to send feedback");return}const i=r==null?void 0:r.api_v2_token;if(!(await fetch(`${this.feedbackUrl}`,{method:"POST",body:JSON.stringify({message_id:t,type:n,user_id:a}),headers:{"Content-Type":"application/json",...i&&{Authorization:`Bearer ${i}`}}})).ok)throw new Error("Failed to send feedback")}catch(r){console.error("Error sending feedback",r)}}}class Pr extends lk{constructor(t,n,r){super(t,n,r)}async sendQuestion(t){const n=this.getUser(),r=n==null?void 0:n.api_v2_token,a=new FormData;a.append("session_id",t.sessionId),a.append("question",t.question),t.messages&&a.append("messages",JSON.stringify(t.messages));const i={Authorization:`Bearer ${r}`},o=await fetch(this.baseURL,{method:"POST",body:a,headers:i});if(!o.ok){const s=await o.text();throw new Error(`HTTP error! status: ${o.status}, text: ${s}`)}if(!o.body)throw new Error("Response body is null");return o.body.pipeThrough(new TextDecoderStream)}}async function iL(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function oL(e){let t,n,r,a=!1;return function(o){t===void 0?(t=o,n=0,r=-1):t=lL(t,o);const s=t.length;let l=0;for(;n<s;){a&&(t[n]===10&&(l=++n),a=!1);let u=-1;for(;n<s&&u===-1;++n)switch(t[n]){case 58:r===-1&&(r=n-l);break;case 13:a=!0;case 10:u=n;break}if(u===-1)break;e(t.subarray(l,u),r),l=n,r=-1}l===s?t=void 0:l!==0&&(t=t.subarray(l),n-=l)}}function sL(e,t,n){let r=Wh();const a=new TextDecoder;return function(o,s){if(o.length===0)n==null||n(r),r=Wh();else if(s>0){const l=a.decode(o.subarray(0,s)),u=s+(o[s+1]===32?2:1),c=a.decode(o.subarray(u));switch(l){case"data":r.data=r.data?r.data+`
39
- `+c:c;break;case"event":r.event=c;break;case"id":e(r.id=c);break;case"retry":const d=parseInt(c,10);isNaN(d)||t(r.retry=d);break}}}}function lL(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function Wh(){return{data:"",event:"",id:"",retry:void 0}}var uL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const of="text/event-stream",cL=1e3,Yh="last-event-id";function dL(e,t){var{signal:n,headers:r,onopen:a,onmessage:i,onclose:o,onerror:s,openWhenHidden:l,fetch:u}=t,c=uL(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((d,p)=>{const f=Object.assign({},r);f.accept||(f.accept=of);let g;function m(){g.abort(),document.hidden||x()}l||document.addEventListener("visibilitychange",m);let v=cL,h=0;function b(){document.removeEventListener("visibilitychange",m),window.clearTimeout(h),g.abort()}n==null||n.addEventListener("abort",()=>{b(),d()});const y=u??window.fetch,S=a??pL;async function x(){var E;g=new AbortController;try{const T=await y(e,Object.assign(Object.assign({},c),{headers:f,signal:g.signal}));await S(T),await iL(T.body,oL(sL(k=>{k?f[Yh]=k:delete f[Yh]},k=>{v=k},i))),o==null||o(),b(),d()}catch(T){if(!g.signal.aborted)try{const k=(E=s==null?void 0:s(T))!==null&&E!==void 0?E:v;window.clearTimeout(h),h=window.setTimeout(x,k)}catch(k){b(),p(k)}}}x()})}function pL(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(of)))throw new Error(`Expected content-type to be ${of}, Actual: ${t}`)}function uk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=uk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ck(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=uk(e))&&(r&&(r+=" "),r+=t);return r}const wg="-",fL=e=>{const t=mL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(wg);return s[0]===""&&s.length!==1&&s.shift(),dk(s,t)||gL(o)},getConflictingClassGroupIds:(o,s)=>{const l=n[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},dk=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?dk(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(wg);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},Kh=/^\[(.+)\]$/,gL=e=>{if(Kh.test(e)){const t=Kh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},mL=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)sf(n[a],r,a,t);return r},sf=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:Xh(t,a);i.classGroupId=n;return}if(typeof a=="function"){if(hL(a)){sf(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([i,o])=>{sf(o,Xh(t,i),n,r)})})},Xh=(e,t)=>{let n=e;return t.split(wg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hL=e=>e.isThemeGetter,bL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return a(i,o),o},set(i,o){n.has(i)?n.set(i,o):a(i,o)}}},lf="!",uf=":",yL=uf.length,vL=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let o=0,s=0,l=0,u;for(let g=0;g<a.length;g++){let m=a[g];if(o===0&&s===0){if(m===uf){i.push(a.slice(l,g)),l=g+yL;continue}if(m==="/"){u=g;continue}}m==="["?o++:m==="]"?o--:m==="("?s++:m===")"&&s--}const c=i.length===0?a:a.substring(l),d=EL(c),p=d!==c,f=u&&u>l?u-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const a=t+uf,i=r;r=o=>o.startsWith(a)?i(o.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},EL=e=>e.endsWith(lf)?e.substring(0,e.length-1):e.startsWith(lf)?e.substring(1):e,wL=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const a=[];let i=[];return r.forEach(o=>{o[0]==="["||t[o]?(a.push(...i.sort(),o),i=[]):i.push(o)}),a.push(...i.sort()),a}},SL=e=>({cache:bL(e.cacheSize),parseClassName:vL(e),sortModifiers:wL(e),...fL(e)}),xL=/\s+/,TL=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,o=[],s=e.trim().split(xL);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:m}=n(c);if(d){l=c+(l.length>0?" "+l:l);continue}let v=!!m,h=r(v?g.substring(0,m):g);if(!h){if(!v){l=c+(l.length>0?" "+l:l);continue}if(h=r(g),!h){l=c+(l.length>0?" "+l:l);continue}v=!1}const b=i(p).join(":"),y=f?b+lf:b,S=y+h;if(o.includes(S))continue;o.push(S);const x=a(h,v);for(let E=0;E<x.length;++E){const T=x[E];o.push(y+T)}l=c+(l.length>0?" "+l:l)}return l};function AL(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=pk(t))&&(r&&(r+=" "),r+=n);return r}const pk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=pk(e[r]))&&(n&&(n+=" "),n+=t);return n};function kL(e,...t){let n,r,a,i=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=SL(u),r=n.cache.get,a=n.cache.set,i=s,s(l)}function s(l){const u=r(l);if(u)return u;const c=TL(l,n);return a(l,c),c}return function(){return i(AL.apply(null,arguments))}}const He=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},fk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,RL=/^\d+\/\d+$/,IL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CL=/\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$/,_L=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,NL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yn=e=>RL.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),mn=e=>!!e&&Number.isInteger(Number(e)),yo=e=>e.endsWith("%")&&ce(e.slice(0,-1)),un=e=>IL.test(e),LL=()=>!0,DL=e=>CL.test(e)&&!_L.test(e),mk=()=>!1,ML=e=>NL.test(e),PL=e=>OL.test(e),FL=e=>!X(e)&&!Z(e),BL=e=>Sr(e,yk,mk),X=e=>fk.test(e),In=e=>Sr(e,vk,DL),vo=e=>Sr(e,qL,ce),Zh=e=>Sr(e,hk,mk),UL=e=>Sr(e,bk,PL),Pa=e=>Sr(e,Ek,ML),Z=e=>gk.test(e),Fr=e=>xr(e,vk),jL=e=>xr(e,VL),Jh=e=>xr(e,hk),zL=e=>xr(e,yk),GL=e=>xr(e,bk),Fa=e=>xr(e,Ek,!0),Sr=(e,t,n)=>{const r=fk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xr=(e,t,n=!1)=>{const r=gk.exec(e);return r?r[1]?t(r[1]):n:!1},hk=e=>e==="position"||e==="percentage",bk=e=>e==="image"||e==="url",yk=e=>e==="length"||e==="size"||e==="bg-size",vk=e=>e==="length",qL=e=>e==="number",VL=e=>e==="family-name",Ek=e=>e==="shadow",HL=()=>{const e=He("color"),t=He("font"),n=He("text"),r=He("font-weight"),a=He("tracking"),i=He("leading"),o=He("breakpoint"),s=He("container"),l=He("spacing"),u=He("radius"),c=He("shadow"),d=He("inset-shadow"),p=He("text-shadow"),f=He("drop-shadow"),g=He("blur"),m=He("perspective"),v=He("aspect"),h=He("ease"),b=He("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...S(),Z,X],E=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],k=()=>[Z,X,l],C=()=>[Yn,"full","auto",...k()],I=()=>[mn,"none","subgrid",Z,X],D=()=>["auto",{span:["full",mn,Z,X]},mn,Z,X],B=()=>[mn,"auto",Z,X],P=()=>["auto","min","max","fr",Z,X],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...k()],G=()=>[Yn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],L=()=>[e,Z,X],$=()=>[...S(),Jh,Zh,{position:[Z,X]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",zL,BL,{size:[Z,X]}],ne=()=>[yo,Fr,In],A=()=>["","none","full",u,Z,X],Y=()=>["",ce,Fr,In],oe=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[ce,yo,Jh,Zh],de=()=>["","none",g,Z,X],he=()=>["none",ce,Z,X],Ee=()=>["none",ce,Z,X],xe=()=>[ce,Z,X],Ge=()=>[Yn,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[un],breakpoint:[un],color:[LL],container:[un],"drop-shadow":[un],ease:["in","out","in-out"],font:[FL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[un],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[un],shadow:[un],spacing:["px",ce],text:[un],"text-shadow":[un],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yn,X,Z,v]}],container:["container"],columns:[{columns:[ce,X,Z,s]}],"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:x()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[mn,"auto",Z,X]}],basis:[{basis:[Yn,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,Yn,"auto","initial","none",X]}],grow:[{grow:["",ce,Z,X]}],shrink:[{shrink:["",ce,Z,X]}],order:[{order:[mn,"first","last","none",Z,X]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[s,"screen",...G()]}],"min-w":[{"min-w":[s,"screen","none",...G()]}],"max-w":[{"max-w":[s,"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",n,Fr,In]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Z,vo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yo,X]}],"font-family":[{font:[jL,X,t]}],"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:[a,Z,X]}],"line-clamp":[{"line-clamp":[ce,"none",Z,vo]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Z,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,X]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",Z,In]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[ce,"auto",Z,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,X]}],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",Z,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mn,Z,X],radial:["",Z,X],conic:[mn,Z,X]},GL,UL]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,Z,X]}],"outline-w":[{outline:["",ce,Fr,In]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",c,Fa,Pa]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",d,Fa,Pa]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[ce,In]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,Fa,Pa]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[ce,Z,X]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"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":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,X]}],filter:[{filter:["","none",Z,X]}],blur:[{blur:de()}],brightness:[{brightness:[ce,Z,X]}],contrast:[{contrast:[ce,Z,X]}],"drop-shadow":[{"drop-shadow":["","none",f,Fa,Pa]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",ce,Z,X]}],"hue-rotate":[{"hue-rotate":[ce,Z,X]}],invert:[{invert:["",ce,Z,X]}],saturate:[{saturate:[ce,Z,X]}],sepia:[{sepia:["",ce,Z,X]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,X]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[ce,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[ce,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,Z,X]}],"backdrop-invert":[{"backdrop-invert":["",ce,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[ce,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[ce,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,Z,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",Z,X]}],ease:[{ease:["linear","initial",h,Z,X]}],delay:[{delay:[ce,Z,X]}],animate:[{animate:["none",b,Z,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[Z,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ge()}],"translate-x":[{"translate-x":Ge()}],"translate-y":[{"translate-y":Ge()}],"translate-z":[{"translate-z":Ge()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",Z,X]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",Z,X]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[ce,Fr,In,vo]}],stroke:[{stroke:["none",...L()]}],"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"]}},$L=kL(HL),te=(...e)=>$L(ck(e)),ci=()=>new Date().toISOString(),WL=e=>e?new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"numeric",hour12:!1}):"",YL=({url:e,params:t,options:n})=>{const{excludeKeys:r=[]}=n||{},a=Object.entries(t).reduce((o,[s,l])=>(r.includes(s)||(o[s]=l),o),{}),i=new URLSearchParams;return Object.entries(a).forEach(([o,s])=>{s!=null&&i.append(o,String(s))}),`${e}?${i.toString()}`},Kn={POSITIVE:"positive",NEGATIVE:"negative"};class Br extends lk{constructor(n,r,a,i=null){super(n,r,a);Wn(this,"flowApiKey");Wn(this,"currentAbortController",null);this.flowApiKey=i}sendQuestion(n,r={}){const a=this.getUser(),i=YL({url:this.baseURL,params:{userId:a.id,...n}}),o=new AbortController;this.currentAbortController=o;const s=dL(i,{method:"GET",headers:{Authorization:`Bearer ${this.flowApiKey}`},signal:o.signal,onopen:async l=>{var u;if(l.ok)(u=r.onOpen)==null||u.call(r,l);else throw new Error(`Failed to connect: ${l.status}`)},onmessage:l=>{var u;(u=r.onMessage)==null||u.call(r,l)},onerror:l=>{var u;(u=r.onError)==null||u.call(r,l)},onclose:()=>{var l;(l=r.onClose)==null||l.call(r),this.currentAbortController=null}});return{abort:()=>{o.abort(),this.currentAbortController=null},done:s}}cancel(){this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}async sendFeedback({messageId:n,type:r}){try{const a=this.getUser(),{id:i}=a;if(!i){console.error("User ID is required to send feedback");return}const o=this.flowApiKey||(a==null?void 0:a.api_v2_token);if(!(await fetch(`${this.feedbackUrl}`,{method:"POST",body:JSON.stringify({message_id:n,type:r,user_id:i}),headers:{"Content-Type":"application/json",...o&&{Authorization:`Bearer ${o}`}}})).ok)throw new Error("Failed to send feedback")}catch(a){console.error("Error sending feedback",a)}}}const Mt={OPEN:"open",CLOSED:"closed"},dt={INITIAL:"initial",USER_HAS_TYPED:"userHasTyped"},gr={HAS_BEEN_OPENED:"hasBeenOpened",HAS_NOT_BEEN_OPENED:"hasNotBeenOpened"},Bt={EXPANDED:"expanded",COLLAPSED:"collapsed"};var Ae=(e=>(e.ADD_MESSAGE="ADD_MESSAGE",e.ADD_TOKEN="ADD_TOKEN",e.ADD_DOCUMENTS="ADD_DOCUMENTS",e.SET_ERROR="SET_ERROR",e.UPDATE_MESSAGE="UPDATE_MESSAGE",e.DELETE_LAST_MESSAGE_PAIR="DELETE_LAST_MESSAGE_PAIR",e))(Ae||{});function Qh(e){return e.type==="bot"}function eb(e){return e.type==="bot"}function KL(e,t){switch(t.type){case Ae.ADD_MESSAGE:{const{endpoint:n}=t,{id:r,message:a}=t.payload,i=ci(),o=tk();switch(n){case we.FLOW:{e.push({id:r,type:"user",message:a,stopped:!1,state:"complete",events:{classification:{action:null,input:null},functions:[],timers:[],documents:[],matches:[]},timestamp:i},{id:o,source_id:r,type:"bot",message:"",source:a,state:"loading",timestamp:i,events:{classification:{action:null,input:null},functions:[],timers:[],documents:[],matches:[]},stopped:!1,code:"",feedback_id:"",show_help_action:!1,show_feedback:!1});break}case we.AIDA:{e.push({id:r,type:"user",message:a,state:"complete",timestamp:i},{id:o,source_id:r,type:"bot",message:"",state:"loading",timestamp:i,code:"",feedback_id:"",show_help_action:!1,show_feedback:!1});break}default:{console.warn(`Unexpected endpoint: ${n}`);break}}break}case Ae.ADD_TOKEN:{const{endpoint:n}=t;if(n===we.AIDA)break;const{id:r,token:a}=t.payload;e.forEach(i=>{i.type!=="user"&&i.source_id===r&&(i.message+=a,i.state="streaming")});break}case Ae.ADD_DOCUMENTS:{const{endpoint:n}=t;if(n===we.AIDA)break;const{id:r,documents:a}=t.payload;e.forEach(i=>{i.type!=="user"&&i.source_id===r&&(i.events.documents=a)});break}case Ae.SET_ERROR:{const{id:n,error:r}=t.payload;let a;if(t.endpoint===we.FLOW?a=e.find(i=>Qh(i)&&i.source_id===n):a=e.find(i=>eb(i)&&i.source_id===n),!a){console.warn(`Action ${Ae.SET_ERROR}: Item not found`);return}typeof r=="string"?(a.message=r,a.state="error"):(a.message=r.detail,a.state="error",a.code=r.code||"UNKNOWN CODE");break}case Ae.UPDATE_MESSAGE:{const{endpoint:n}=t,{id:r,field:a,value:i}=t.payload,o=ci();switch(n){case we.FLOW:{const s=e.find(l=>Qh(l)&&l.source_id===r);if(!s)return;if(i==="complete"){s.state="complete",s.timestamp=o;return}switch(a){case"state":s.state=i;break;case"message":s.message=i;break;case"source":s.source=i;break;case"timestamp":s.timestamp=i;break;case"code":s.code=i;break;case"stopped":s.stopped=i;break;case"feedback_id":s.feedback_id=i;break;case"show_help_action":s.show_help_action=i;break;case"show_feedback":s.show_feedback=i;break;case"events":s.events=i;break;default:console.warn(`Unexpected field: ${String(a)}`)}break}case we.AIDA:{const s=e.find(l=>eb(l)&&l.source_id===r);if(!s)return;switch(a){case"state":s.state=i,s.timestamp=o;break;case"message":s.message=i;break;case"timestamp":s.timestamp=i;break;case"code":s.code=i;break;case"feedback_id":s.feedback_id=i;break;case"show_help_action":s.show_help_action=i;break;case"show_feedback":s.show_feedback=i;break;default:console.warn(`Unexpected field: ${String(a)}`)}break}default:{console.warn(`Unexpected endpoint: ${n}`);break}}break}case Ae.DELETE_LAST_MESSAGE_PAIR:{e.length>=2?e.splice(e.length-2,2):console.warn(`${Ae.DELETE_LAST_MESSAGE_PAIR} action called with insufficient messages in draft.`);break}}}const XL={id:null,token:null,apiAccessKey:null,api_v2_token:null,twoFactorAuth:null,role:null,expiresAt:null},ZL=(e,t)=>({user:XL,chatAPIUrl:mt.CHAT_API_URL,flowAPIUrl:mt.FLOW_API_URL,flowApiKey:null,feedbackAPIUrl:mt.FEEDBACK_API_URL,apiService:new Pr(mt.CHAT_API_URL,mt.FEEDBACK_API_URL,()=>t().user),endpoint:we.AIDA,numRetries:0,retryTimeoutId:null,sessionId:Uh(),botState:"idle",question:"",messages:[],numMessagesExpanded:0,chatStartTimestamp:ci(),placeholders:[],onHelpAction:null,setUser:n=>e(r=>{r.user=n;const a=t().endpoint;a===we.FLOW?r.apiService=new Br(r.flowAPIUrl,r.feedbackAPIUrl,()=>t().user,t().flowApiKey):a===we.AIDA&&(r.apiService=new Pr(r.chatAPIUrl,r.feedbackAPIUrl,()=>t().user))}),setChatAPIUrl:n=>e(r=>{r.chatAPIUrl=n,t().endpoint===we.AIDA&&(r.apiService=new Pr(n,r.feedbackAPIUrl,()=>t().user))}),setFlowAPIUrl:n=>e(r=>{r.flowAPIUrl=n,t().endpoint===we.FLOW&&(r.apiService=new Br(n,r.feedbackAPIUrl,()=>t().user,t().flowApiKey))}),setFlowApiKey:n=>e(r=>{r.flowApiKey=n,t().endpoint===we.FLOW&&(r.apiService=new Br(r.flowAPIUrl,r.feedbackAPIUrl,()=>t().user,n))}),setFeedbackAPIUrl:n=>e(r=>{r.feedbackAPIUrl=n;const a=t().endpoint;a===we.FLOW?r.apiService=new Br(r.flowAPIUrl,n,()=>t().user,t().flowApiKey):a===we.AIDA&&(r.apiService=new Pr(r.chatAPIUrl,n,()=>t().user))}),setEndpoint:n=>e(r=>{r.endpoint=n,n===we.FLOW?r.apiService=new Br(t().flowAPIUrl,t().feedbackAPIUrl,()=>t().user,t().flowApiKey):n===we.AIDA&&(r.apiService=new Pr(t().chatAPIUrl,t().feedbackAPIUrl,()=>t().user))}),setQuestion:n=>e(r=>{r.question=n}),setNumRetries:n=>e(r=>{r.numRetries=n}),setRetryTimeoutId:n=>e(r=>{r.retryTimeoutId=n}),resetRetryMechanism:()=>e(n=>{n.numRetries=0,n.retryTimeoutId&&(clearTimeout(n.retryTimeoutId),n.retryTimeoutId=null)}),dispatchMessage:n=>e(r=>{const a=t().endpoint;KL(r.messages,{...n,endpoint:a})}),chatVisualState:dt.INITIAL,setChatVisualState:n=>e(r=>{r.chatVisualState=n}),setNumMessagesExpanded:n=>e(r=>{n<0?r.numMessagesExpanded=0:r.numMessagesExpanded=n}),setBotState:n=>e(r=>{r.botState=n}),resetChat:()=>{e(n=>{n.messages.length=0,n.question="",n.chatVisualState=dt.INITIAL,n.sessionId=Uh(),n.numMessagesExpanded=0,n.botState="idle",n.resetRetryMechanism(),n.chatStartTimestamp=ci()})},getLastMessage:()=>t().messages[t().messages.length-1],setOnHelpAction:n=>e(r=>{r.onHelpAction=n}),setPlaceholders:n=>e(r=>{r.placeholders=n})}),JL=`:root, :host {
39
+ `+c:c;break;case"event":r.event=c;break;case"id":e(r.id=c);break;case"retry":const d=parseInt(c,10);isNaN(d)||t(r.retry=d);break}}}}function lL(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function Wh(){return{data:"",event:"",id:"",retry:void 0}}var uL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const of="text/event-stream",cL=1e3,Yh="last-event-id";function dL(e,t){var{signal:n,headers:r,onopen:a,onmessage:i,onclose:o,onerror:s,openWhenHidden:l,fetch:u}=t,c=uL(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((d,p)=>{const f=Object.assign({},r);f.accept||(f.accept=of);let g;function m(){g.abort(),document.hidden||x()}l||document.addEventListener("visibilitychange",m);let v=cL,h=0;function b(){document.removeEventListener("visibilitychange",m),window.clearTimeout(h),g.abort()}n==null||n.addEventListener("abort",()=>{b(),d()});const y=u??window.fetch,S=a??pL;async function x(){var E;g=new AbortController;try{const T=await y(e,Object.assign(Object.assign({},c),{headers:f,signal:g.signal}));await S(T),await iL(T.body,oL(sL(k=>{k?f[Yh]=k:delete f[Yh]},k=>{v=k},i))),o==null||o(),b(),d()}catch(T){if(!g.signal.aborted)try{const k=(E=s==null?void 0:s(T))!==null&&E!==void 0?E:v;window.clearTimeout(h),h=window.setTimeout(x,k)}catch(k){b(),p(k)}}}x()})}function pL(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(of)))throw new Error(`Expected content-type to be ${of}, Actual: ${t}`)}function uk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=uk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ck(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=uk(e))&&(r&&(r+=" "),r+=t);return r}const wg="-",fL=e=>{const t=mL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(wg);return s[0]===""&&s.length!==1&&s.shift(),dk(s,t)||gL(o)},getConflictingClassGroupIds:(o,s)=>{const l=n[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},dk=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?dk(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(wg);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},Kh=/^\[(.+)\]$/,gL=e=>{if(Kh.test(e)){const t=Kh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},mL=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)sf(n[a],r,a,t);return r},sf=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:Xh(t,a);i.classGroupId=n;return}if(typeof a=="function"){if(hL(a)){sf(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([i,o])=>{sf(o,Xh(t,i),n,r)})})},Xh=(e,t)=>{let n=e;return t.split(wg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hL=e=>e.isThemeGetter,bL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return a(i,o),o},set(i,o){n.has(i)?n.set(i,o):a(i,o)}}},lf="!",uf=":",yL=uf.length,vL=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let o=0,s=0,l=0,u;for(let g=0;g<a.length;g++){let m=a[g];if(o===0&&s===0){if(m===uf){i.push(a.slice(l,g)),l=g+yL;continue}if(m==="/"){u=g;continue}}m==="["?o++:m==="]"?o--:m==="("?s++:m===")"&&s--}const c=i.length===0?a:a.substring(l),d=EL(c),p=d!==c,f=u&&u>l?u-l:void 0;return{modifiers:i,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:f}};if(t){const a=t+uf,i=r;r=o=>o.startsWith(a)?i(o.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},EL=e=>e.endsWith(lf)?e.substring(0,e.length-1):e.startsWith(lf)?e.substring(1):e,wL=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const a=[];let i=[];return r.forEach(o=>{o[0]==="["||t[o]?(a.push(...i.sort(),o),i=[]):i.push(o)}),a.push(...i.sort()),a}},SL=e=>({cache:bL(e.cacheSize),parseClassName:vL(e),sortModifiers:wL(e),...fL(e)}),xL=/\s+/,TL=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,o=[],s=e.trim().split(xL);let l="";for(let u=s.length-1;u>=0;u-=1){const c=s[u],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:m}=n(c);if(d){l=c+(l.length>0?" "+l:l);continue}let v=!!m,h=r(v?g.substring(0,m):g);if(!h){if(!v){l=c+(l.length>0?" "+l:l);continue}if(h=r(g),!h){l=c+(l.length>0?" "+l:l);continue}v=!1}const b=i(p).join(":"),y=f?b+lf:b,S=y+h;if(o.includes(S))continue;o.push(S);const x=a(h,v);for(let E=0;E<x.length;++E){const T=x[E];o.push(y+T)}l=c+(l.length>0?" "+l:l)}return l};function AL(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=pk(t))&&(r&&(r+=" "),r+=n);return r}const pk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=pk(e[r]))&&(n&&(n+=" "),n+=t);return n};function kL(e,...t){let n,r,a,i=o;function o(l){const u=t.reduce((c,d)=>d(c),e());return n=SL(u),r=n.cache.get,a=n.cache.set,i=s,s(l)}function s(l){const u=r(l);if(u)return u;const c=TL(l,n);return a(l,c),c}return function(){return i(AL.apply(null,arguments))}}const He=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},fk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,gk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,RL=/^\d+\/\d+$/,IL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CL=/\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$/,_L=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,NL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,OL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yn=e=>RL.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),mn=e=>!!e&&Number.isInteger(Number(e)),yo=e=>e.endsWith("%")&&ce(e.slice(0,-1)),un=e=>IL.test(e),LL=()=>!0,DL=e=>CL.test(e)&&!_L.test(e),mk=()=>!1,ML=e=>NL.test(e),PL=e=>OL.test(e),FL=e=>!X(e)&&!Z(e),BL=e=>Sr(e,yk,mk),X=e=>fk.test(e),In=e=>Sr(e,vk,DL),vo=e=>Sr(e,qL,ce),Zh=e=>Sr(e,hk,mk),UL=e=>Sr(e,bk,PL),Pa=e=>Sr(e,Ek,ML),Z=e=>gk.test(e),Fr=e=>xr(e,vk),jL=e=>xr(e,VL),Jh=e=>xr(e,hk),zL=e=>xr(e,yk),GL=e=>xr(e,bk),Fa=e=>xr(e,Ek,!0),Sr=(e,t,n)=>{const r=fk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xr=(e,t,n=!1)=>{const r=gk.exec(e);return r?r[1]?t(r[1]):n:!1},hk=e=>e==="position"||e==="percentage",bk=e=>e==="image"||e==="url",yk=e=>e==="length"||e==="size"||e==="bg-size",vk=e=>e==="length",qL=e=>e==="number",VL=e=>e==="family-name",Ek=e=>e==="shadow",HL=()=>{const e=He("color"),t=He("font"),n=He("text"),r=He("font-weight"),a=He("tracking"),i=He("leading"),o=He("breakpoint"),s=He("container"),l=He("spacing"),u=He("radius"),c=He("shadow"),d=He("inset-shadow"),p=He("text-shadow"),f=He("drop-shadow"),g=He("blur"),m=He("perspective"),v=He("aspect"),h=He("ease"),b=He("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...S(),Z,X],E=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],k=()=>[Z,X,l],C=()=>[Yn,"full","auto",...k()],I=()=>[mn,"none","subgrid",Z,X],D=()=>["auto",{span:["full",mn,Z,X]},mn,Z,X],B=()=>[mn,"auto",Z,X],P=()=>["auto","min","max","fr",Z,X],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...k()],G=()=>[Yn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],L=()=>[e,Z,X],$=()=>[...S(),Jh,Zh,{position:[Z,X]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",zL,BL,{size:[Z,X]}],ne=()=>[yo,Fr,In],A=()=>["","none","full",u,Z,X],Y=()=>["",ce,Fr,In],oe=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[ce,yo,Jh,Zh],de=()=>["","none",g,Z,X],he=()=>["none",ce,Z,X],Ee=()=>["none",ce,Z,X],xe=()=>[ce,Z,X],Ge=()=>[Yn,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[un],breakpoint:[un],color:[LL],container:[un],"drop-shadow":[un],ease:["in","out","in-out"],font:[FL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[un],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[un],shadow:[un],spacing:["px",ce],text:[un],"text-shadow":[un],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yn,X,Z,v]}],container:["container"],columns:[{columns:[ce,X,Z,s]}],"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:x()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[mn,"auto",Z,X]}],basis:[{basis:[Yn,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,Yn,"auto","initial","none",X]}],grow:[{grow:["",ce,Z,X]}],shrink:[{shrink:["",ce,Z,X]}],order:[{order:[mn,"first","last","none",Z,X]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[s,"screen",...G()]}],"min-w":[{"min-w":[s,"screen","none",...G()]}],"max-w":[{"max-w":[s,"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",n,Fr,In]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Z,vo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yo,X]}],"font-family":[{font:[jL,X,t]}],"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:[a,Z,X]}],"line-clamp":[{"line-clamp":[ce,"none",Z,vo]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Z,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,X]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",Z,In]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[ce,"auto",Z,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,X]}],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",Z,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mn,Z,X],radial:["",Z,X],conic:[mn,Z,X]},GL,UL]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,Z,X]}],"outline-w":[{outline:["",ce,Fr,In]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",c,Fa,Pa]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",d,Fa,Pa]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[ce,In]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,Fa,Pa]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[ce,Z,X]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"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":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,X]}],filter:[{filter:["","none",Z,X]}],blur:[{blur:de()}],brightness:[{brightness:[ce,Z,X]}],contrast:[{contrast:[ce,Z,X]}],"drop-shadow":[{"drop-shadow":["","none",f,Fa,Pa]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",ce,Z,X]}],"hue-rotate":[{"hue-rotate":[ce,Z,X]}],invert:[{invert:["",ce,Z,X]}],saturate:[{saturate:[ce,Z,X]}],sepia:[{sepia:["",ce,Z,X]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,X]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[ce,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[ce,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,Z,X]}],"backdrop-invert":[{"backdrop-invert":["",ce,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[ce,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[ce,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,Z,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",Z,X]}],ease:[{ease:["linear","initial",h,Z,X]}],delay:[{delay:[ce,Z,X]}],animate:[{animate:["none",b,Z,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[Z,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ge()}],"translate-x":[{"translate-x":Ge()}],"translate-y":[{"translate-y":Ge()}],"translate-z":[{"translate-z":Ge()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",Z,X]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",Z,X]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[ce,Fr,In,vo]}],stroke:[{stroke:["none",...L()]}],"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"]}},$L=kL(HL),te=(...e)=>$L(ck(e)),ci=()=>new Date().toISOString(),WL=e=>e?new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"numeric",hour12:!1}):"",YL=({url:e,params:t,options:n})=>{const{excludeKeys:r=[]}=n||{},a=Object.entries(t).reduce((o,[s,l])=>(r.includes(s)||(o[s]=l),o),{}),i=new URLSearchParams;return Object.entries(a).forEach(([o,s])=>{s!=null&&i.append(o,String(s))}),`${e}?${i.toString()}`},Kn={POSITIVE:"positive",NEGATIVE:"negative"};class Br extends lk{constructor(n,r,a,i=null){super(n,r,a);Wn(this,"flowApiKey");Wn(this,"currentAbortController",null);this.flowApiKey=i}sendQuestion(n,r={}){const a=this.getUser(),i=YL({url:this.baseURL,params:{userId:a.id,...n}}),o=new AbortController;this.currentAbortController=o;const s=dL(i,{method:"GET",headers:{Authorization:`Bearer ${this.flowApiKey}`},signal:o.signal,openWhenHidden:!0,onopen:async l=>{var u;if(l.ok)(u=r.onOpen)==null||u.call(r,l);else throw new Error(`Failed to connect: ${l.status}`)},onmessage:l=>{var u;(u=r.onMessage)==null||u.call(r,l)},onerror:l=>{var u;throw(u=r.onError)==null||u.call(r,l),l},onclose:()=>{var l;(l=r.onClose)==null||l.call(r),this.currentAbortController=null}});return{abort:()=>{o.abort(),this.currentAbortController=null},done:s}}cancel(){this.currentAbortController&&(this.currentAbortController.abort(),this.currentAbortController=null)}async sendFeedback({messageId:n,type:r}){try{const a=this.getUser(),{id:i}=a;if(!i){console.error("User ID is required to send feedback");return}const o=this.flowApiKey||(a==null?void 0:a.api_v2_token);if(!(await fetch(`${this.feedbackUrl}`,{method:"POST",body:JSON.stringify({message_id:n,type:r,user_id:i}),headers:{"Content-Type":"application/json",...o&&{Authorization:`Bearer ${o}`}}})).ok)throw new Error("Failed to send feedback")}catch(a){console.error("Error sending feedback",a)}}}const Mt={OPEN:"open",CLOSED:"closed"},dt={INITIAL:"initial",USER_HAS_TYPED:"userHasTyped"},gr={HAS_BEEN_OPENED:"hasBeenOpened",HAS_NOT_BEEN_OPENED:"hasNotBeenOpened"},Bt={EXPANDED:"expanded",COLLAPSED:"collapsed"};var Ae=(e=>(e.ADD_MESSAGE="ADD_MESSAGE",e.ADD_TOKEN="ADD_TOKEN",e.ADD_DOCUMENTS="ADD_DOCUMENTS",e.SET_ERROR="SET_ERROR",e.UPDATE_MESSAGE="UPDATE_MESSAGE",e.DELETE_LAST_MESSAGE_PAIR="DELETE_LAST_MESSAGE_PAIR",e))(Ae||{});function Qh(e){return e.type==="bot"}function eb(e){return e.type==="bot"}function KL(e,t){switch(t.type){case Ae.ADD_MESSAGE:{const{endpoint:n}=t,{id:r,message:a}=t.payload,i=ci(),o=tk();switch(n){case we.FLOW:{e.push({id:r,type:"user",message:a,stopped:!1,state:"complete",events:{classification:{action:null,input:null},functions:[],timers:[],documents:[],matches:[]},timestamp:i},{id:o,source_id:r,type:"bot",message:"",source:a,state:"loading",timestamp:i,events:{classification:{action:null,input:null},functions:[],timers:[],documents:[],matches:[]},stopped:!1,code:"",feedback_id:"",show_help_action:!1,show_feedback:!1});break}case we.AIDA:{e.push({id:r,type:"user",message:a,state:"complete",timestamp:i},{id:o,source_id:r,type:"bot",message:"",state:"loading",timestamp:i,code:"",feedback_id:"",show_help_action:!1,show_feedback:!1});break}default:{console.warn(`Unexpected endpoint: ${n}`);break}}break}case Ae.ADD_TOKEN:{const{endpoint:n}=t;if(n===we.AIDA)break;const{id:r,token:a}=t.payload;e.forEach(i=>{i.type!=="user"&&i.source_id===r&&(i.message+=a,i.state="streaming")});break}case Ae.ADD_DOCUMENTS:{const{endpoint:n}=t;if(n===we.AIDA)break;const{id:r,documents:a}=t.payload;e.forEach(i=>{i.type!=="user"&&i.source_id===r&&(i.events.documents=a)});break}case Ae.SET_ERROR:{const{id:n,error:r}=t.payload;let a;if(t.endpoint===we.FLOW?a=e.find(i=>Qh(i)&&i.source_id===n):a=e.find(i=>eb(i)&&i.source_id===n),!a){console.warn(`Action ${Ae.SET_ERROR}: Item not found`);return}typeof r=="string"?(a.message=r,a.state="error"):(a.message=r.detail,a.state="error",a.code=r.code||"UNKNOWN CODE");break}case Ae.UPDATE_MESSAGE:{const{endpoint:n}=t,{id:r,field:a,value:i}=t.payload,o=ci();switch(n){case we.FLOW:{const s=e.find(l=>Qh(l)&&l.source_id===r);if(!s)return;if(i==="complete"){s.state="complete",s.timestamp=o;return}switch(a){case"state":s.state=i;break;case"message":s.message=i;break;case"source":s.source=i;break;case"timestamp":s.timestamp=i;break;case"code":s.code=i;break;case"stopped":s.stopped=i;break;case"feedback_id":s.feedback_id=i;break;case"show_help_action":s.show_help_action=i;break;case"show_feedback":s.show_feedback=i;break;case"events":s.events=i;break;default:console.warn(`Unexpected field: ${String(a)}`)}break}case we.AIDA:{const s=e.find(l=>eb(l)&&l.source_id===r);if(!s)return;switch(a){case"state":s.state=i,s.timestamp=o;break;case"message":s.message=i;break;case"timestamp":s.timestamp=i;break;case"code":s.code=i;break;case"feedback_id":s.feedback_id=i;break;case"show_help_action":s.show_help_action=i;break;case"show_feedback":s.show_feedback=i;break;default:console.warn(`Unexpected field: ${String(a)}`)}break}default:{console.warn(`Unexpected endpoint: ${n}`);break}}break}case Ae.DELETE_LAST_MESSAGE_PAIR:{e.length>=2?e.splice(e.length-2,2):console.warn(`${Ae.DELETE_LAST_MESSAGE_PAIR} action called with insufficient messages in draft.`);break}}}const XL={id:null,token:null,apiAccessKey:null,api_v2_token:null,twoFactorAuth:null,role:null,expiresAt:null},ZL=(e,t)=>({user:XL,chatAPIUrl:mt.CHAT_API_URL,flowAPIUrl:mt.FLOW_API_URL,flowApiKey:null,feedbackAPIUrl:mt.FEEDBACK_API_URL,apiService:new Pr(mt.CHAT_API_URL,mt.FEEDBACK_API_URL,()=>t().user),endpoint:we.AIDA,numRetries:0,retryTimeoutId:null,sessionId:Uh(),botState:"idle",question:"",messages:[],numMessagesExpanded:0,chatStartTimestamp:ci(),placeholders:[],onHelpAction:null,setUser:n=>e(r=>{r.user=n;const a=t().endpoint;a===we.FLOW?r.apiService=new Br(r.flowAPIUrl,r.feedbackAPIUrl,()=>t().user,t().flowApiKey):a===we.AIDA&&(r.apiService=new Pr(r.chatAPIUrl,r.feedbackAPIUrl,()=>t().user))}),setChatAPIUrl:n=>e(r=>{r.chatAPIUrl=n,t().endpoint===we.AIDA&&(r.apiService=new Pr(n,r.feedbackAPIUrl,()=>t().user))}),setFlowAPIUrl:n=>e(r=>{r.flowAPIUrl=n,t().endpoint===we.FLOW&&(r.apiService=new Br(n,r.feedbackAPIUrl,()=>t().user,t().flowApiKey))}),setFlowApiKey:n=>e(r=>{r.flowApiKey=n,t().endpoint===we.FLOW&&(r.apiService=new Br(r.flowAPIUrl,r.feedbackAPIUrl,()=>t().user,n))}),setFeedbackAPIUrl:n=>e(r=>{r.feedbackAPIUrl=n;const a=t().endpoint;a===we.FLOW?r.apiService=new Br(r.flowAPIUrl,n,()=>t().user,t().flowApiKey):a===we.AIDA&&(r.apiService=new Pr(r.chatAPIUrl,n,()=>t().user))}),setEndpoint:n=>e(r=>{r.endpoint=n,n===we.FLOW?r.apiService=new Br(t().flowAPIUrl,t().feedbackAPIUrl,()=>t().user,t().flowApiKey):n===we.AIDA&&(r.apiService=new Pr(t().chatAPIUrl,t().feedbackAPIUrl,()=>t().user))}),setQuestion:n=>e(r=>{r.question=n}),setNumRetries:n=>e(r=>{r.numRetries=n}),setRetryTimeoutId:n=>e(r=>{r.retryTimeoutId=n}),resetRetryMechanism:()=>e(n=>{n.numRetries=0,n.retryTimeoutId&&(clearTimeout(n.retryTimeoutId),n.retryTimeoutId=null)}),dispatchMessage:n=>e(r=>{const a=t().endpoint;KL(r.messages,{...n,endpoint:a})}),chatVisualState:dt.INITIAL,setChatVisualState:n=>e(r=>{r.chatVisualState=n}),setNumMessagesExpanded:n=>e(r=>{n<0?r.numMessagesExpanded=0:r.numMessagesExpanded=n}),setBotState:n=>e(r=>{r.botState=n}),resetChat:()=>{e(n=>{n.messages.length=0,n.question="",n.chatVisualState=dt.INITIAL,n.sessionId=Uh(),n.numMessagesExpanded=0,n.botState="idle",n.resetRetryMechanism(),n.chatStartTimestamp=ci()})},getLastMessage:()=>t().messages[t().messages.length-1],setOnHelpAction:n=>e(r=>{r.onHelpAction=n}),setPlaceholders:n=>e(r=>{r.placeholders=n})}),JL=`:root, :host {
40
40
  --tw-animation-delay: 0s;
41
41
  --tw-animation-direction: normal;
42
42
  --tw-animation-fill-mode: none;
@@ -113,14 +113,12 @@ React keys must be passed directly to JSX without using spread:
113
113
  --color-gray-500: oklch(55.1% 0.027 264.364);
114
114
  --color-gray-700: oklch(37.3% 0.034 259.733);
115
115
  --color-gray-800: oklch(27.8% 0.033 256.848);
116
- --color-zinc-500: oklch(55.2% 0.016 285.938);
117
- --color-zinc-800: oklch(27.4% 0.006 286.033);
118
- --color-zinc-900: oklch(21% 0.006 285.885);
119
116
  --color-neutral-500: oklch(55.6% 0 0);
120
117
  --color-neutral-600: oklch(43.9% 0 0);
121
118
  --color-neutral-700: oklch(37.1% 0 0);
122
119
  --color-stone-600: oklch(44.4% 0.011 73.639);
123
120
  --color-stone-700: oklch(37.4% 0.01 67.558);
121
+ --color-stone-800: oklch(26.8% 0.007 34.298);
124
122
  --color-stone-900: oklch(21.6% 0.006 56.043);
125
123
  --color-black: #000;
126
124
  --color-white: #fff;
@@ -164,9 +162,7 @@ React keys must be passed directly to JSX without using spread:
164
162
  --color-telnyx-dark-cream: rgb(229 227 212);
165
163
  --color-telnyx-gray-hover-light: rgb(87 87 87);
166
164
  --color-telnyx-blue: rgb(52 52 239);
167
- --color-heroui-content2: hsl(240 3.7% 15.88% / 1);
168
165
  --color-heroui-content3: hsl(240 5.26% 26.08% / 1);
169
- --color-heroui-default-700: hsl(240 5.88% 90% / 1);
170
166
  --font-pp-formula: PPFormula;
171
167
  --animate-rotate-loader: rotate 4s linear infinite;
172
168
  --animate-scale-loader: scale 4s linear infinite;
@@ -1315,6 +1311,9 @@ React keys must be passed directly to JSX without using spread:
1315
1311
  .text-stone-700 {
1316
1312
  color: var(--color-stone-700);
1317
1313
  }
1314
+ .text-stone-800 {
1315
+ color: var(--color-stone-800);
1316
+ }
1318
1317
  .text-telnyx-blue {
1319
1318
  color: var(--color-telnyx-blue);
1320
1319
  }
@@ -2074,65 +2073,6 @@ React keys must be passed directly to JSX without using spread:
2074
2073
  line-height: var(--tw-leading, var(--text-base--line-height));
2075
2074
  }
2076
2075
  }
2077
- .dark\\:bg-zinc-800 {
2078
- @media (prefers-color-scheme: dark) {
2079
- background-color: var(--color-zinc-800);
2080
- }
2081
- }
2082
- .dark\\:bg-zinc-900 {
2083
- @media (prefers-color-scheme: dark) {
2084
- background-color: var(--color-zinc-900);
2085
- }
2086
- }
2087
- .dark\\:text-transparent {
2088
- @media (prefers-color-scheme: dark) {
2089
- color: transparent;
2090
- }
2091
- }
2092
- .dark\\:text-white {
2093
- @media (prefers-color-scheme: dark) {
2094
- color: var(--color-white);
2095
- }
2096
- }
2097
- .dark\\:text-zinc-500 {
2098
- @media (prefers-color-scheme: dark) {
2099
- color: var(--color-zinc-500);
2100
- }
2101
- }
2102
- .dark\\:invert-0 {
2103
- @media (prefers-color-scheme: dark) {
2104
- --tw-invert: invert(0%);
2105
- filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
2106
- }
2107
- }
2108
- .dark\\:before\\:via-heroui-default-700\\/10 {
2109
- @media (prefers-color-scheme: dark) {
2110
- &::before {
2111
- content: var(--tw-content);
2112
- --tw-gradient-via: color-mix(in srgb, hsl(240 5.88% 90% / 1) 10%, transparent);
2113
- @supports (color: color-mix(in lab, red, red)) {
2114
- --tw-gradient-via: color-mix(in oklab, var(--color-heroui-default-700) 10%, transparent);
2115
- }
2116
- --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
2117
- --tw-gradient-stops: var(--tw-gradient-via-stops);
2118
- }
2119
- }
2120
- }
2121
- .dark\\:after\\:bg-heroui-content2 {
2122
- @media (prefers-color-scheme: dark) {
2123
- &::after {
2124
- content: var(--tw-content);
2125
- background-color: var(--color-heroui-content2);
2126
- }
2127
- }
2128
- }
2129
- .dark\\:disabled\\:bg-zinc-800 {
2130
- @media (prefers-color-scheme: dark) {
2131
- &:disabled {
2132
- background-color: var(--color-zinc-800);
2133
- }
2134
- }
2135
- }
2136
2076
  .\\[\\&_\\*\\]\\:scrollbar {
2137
2077
  & * {
2138
2078
  &::-webkit-scrollbar-track {
@@ -2217,6 +2157,10 @@ React keys must be passed directly to JSX without using spread:
2217
2157
  syntax: "*";
2218
2158
  inherits: false;
2219
2159
  }
2160
+ :root, :host {
2161
+ color-scheme: light;
2162
+ color: #1c1917;
2163
+ }
2220
2164
  @layer base {
2221
2165
  * {
2222
2166
  @supports (-moz-appearance:none) {
@@ -2547,7 +2491,7 @@ React keys must be passed directly to JSX without using spread:
2547
2491
  black 0%,
2548
2492
  transparent 100%
2549
2493
  )
2550
- `}}),w.jsx("div",{className:te("relative z-20",t),children:e})]})},wb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sb=ck,ji=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Sb(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const p=wb(c)||wb(d);return a[u][p]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:p,...f}=c;return Object.entries(f).every(g=>{let[m,v]=g;return Array.isArray(v)?v.includes({...i,...s}[m]):{...i,...s}[m]===v})?[...u,d,p]:u},[]);return Sb(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},JF=ge.create(fD),QF=ge.create(mD),xb={copied:{scale:1,opacity:1,transition:{duration:.15}},idle:{scale:.8,opacity:0,transition:{duration:.15}}},Og=O.memo(({textToCopy:e,onClick:t,className:n,iconClassName:r,disabled:a})=>{const[i,o]=O.useState(!1),s=async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy text: ",u)}},l=()=>{s(),t&&t()};return w.jsxs(en,{children:[w.jsx(tn,{onClick:l,className:n,disabled:a,children:w.jsx(nn,{mode:"wait",initial:!1,children:i?w.jsx(JF,{initial:"idle",animate:"copied",exit:"idle",variants:xb,className:te("size-4 text-telnyx-green",r)},"check"):w.jsx(QF,{initial:"idle",animate:"copied",exit:"idle",variants:xb,className:te("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"copy")})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:i?"Copied!":"Copy this message"})})]})}),e2=({size:e=96,spokeWidth:t=6,animationDuration:n=4})=>w.jsxs("div",{className:"relative animate-rotate-loader flex items-center justify-center",style:{width:e,height:e,animationDuration:`${n}s`},children:[w.jsx("div",{className:`rounded-full z-10 animate-scale-loader bg-telnyx-light-green duration-[${n/2}s]`,style:{width:e/8,height:e/8}}),Array.from({length:12}).map((a,i)=>{const o=i*30;return w.jsx("div",{className:"absolute bg-stone-700 rounded-[30px] top-0 left-1/2 transform origin-bottom",style:{transform:`translateX(-50%) rotate(${o}deg)`,height:e/2,width:t}},i+o)})]}),t2=e=>{const t=new CSSStyleSheet;return t.replaceSync(e.replace("((-webkit-hyphens: none) and (not (margin-trim: inline)))","(not (margin-trim: inline))")),t},n2=(e,t)=>{if(!t)return;const n=t2(t);e.adoptedStyleSheets=[n]},Lg=O.forwardRef(({children:e,shadowRootInit:t,targetMountContainer:n,...r},a)=>{const i=J(d=>d.widgetStyleSheetText),[o,s]=O.useState(null),l=O.useCallback(d=>{if(!d||d.shadowRoot)return;const p=d.attachShadow({mode:"open",...t});i&&n2(p,i),s(p)},[i,t]),u=O.useCallback(d=>{l(d),typeof a=="function"?a(d):a&&(a.current=d)},[l,a]),c=w.jsx("div",{ref:u,...r,children:o&&kp.createPortal(e,o)});return n?kp.createPortal(c,n):c}),Xn=({isLoaded:e=!1,className:t,contentClassName:n,children:r,disableAnimation:a=!1,loadingDuration:i})=>{const[o,s]=O.useState(e);O.useEffect(()=>{if(i&&!e){const u=setTimeout(()=>{s(!0)},i);return()=>clearTimeout(u)}},[i,e]);const l=e||o;return w.jsx("div",{"data-loaded":l,className:te("group relative overflow-hidden bg-neutral-700/20 dark:bg-heroui-content-2","pointer-events-none",!a&&!l&&["before:opacity-100 before:absolute before:inset-0","before:-translate-x-full before:animate-shimmer","before:bg-gradient-to-r","before:from-transparent before:via-neutral-600/30 dark:before:via-heroui-default-700/10","before:to-transparent"],"after:opacity-100 after:absolute after:inset-0 after:-z-10","after:bg-heroui-content3 dark:after:bg-heroui-content2","data-[loaded=true]:pointer-events-auto data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent data-[loaded=true]:before:opacity-0","data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0","transition-[background] !duration-300","h-4 rounded-lg",t),children:w.jsx("div",{className:te("opacity-0 group-data-[loaded=true]:opacity-100","transition-opacity motion-reduce:transition-none !duration-300",n),children:r})})},r2=({words:e,className:t,filter:n=!0,duration:r=.5})=>{const[a,i]=PO();let o=e.split(" ");O.useEffect(()=>{const l=setTimeout(()=>{a.current&&i("span",{opacity:1,filter:n?"blur(0px)":"none"},{duration:r||1,delay:f1(.2)})},50);return()=>clearTimeout(l)},[e,a,i,r,n]);const s=()=>w.jsx(ge.div,{ref:a,children:o.map((l,u)=>w.jsxs(ge.span,{className:"text-gray-700/60 opacity-0",style:{filter:n?"blur(10px)":"none"},children:[l," "]},`${l}-${u}`))});return w.jsx("span",{className:te("text-gray-700 text-xs font-medium leading-snug tracking-wide",t),children:s()})},a2=({isLoaded:e=!1,progressMessage:t="Processing..."})=>w.jsxs("div",{className:"flex w-64 flex-col gap-2 relative",children:[w.jsx(Xn,{isLoaded:e}),w.jsx(Xn,{isLoaded:e}),w.jsxs("div",{className:"flex gap-1 items-center",children:[w.jsx(Xn,{className:"duration-100 flex-1",isLoaded:e}),w.jsx("div",{className:"bg-[#fefef8] px-3 z-10",children:w.jsx(r2,{words:t,className:"text-gray-700/60 font-medium"},t)}),w.jsx(Xn,{className:"duration-100 flex-1",isLoaded:e})]}),w.jsx(Xn,{isLoaded:e}),w.jsx(Xn,{isLoaded:e})]});function i2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const o2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,l2={};function Tb(e,t){return(l2.jsx?s2:o2).test(e)}const u2=/[ \t\n\f\r]/g;function c2(e){return typeof e=="object"?e.type==="text"?Ab(e.value):!1:Ab(e)}function Ab(e){return e.replace(u2,"")===""}class Aa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Aa.prototype.normal={};Aa.prototype.property={};Aa.prototype.space=void 0;function NR(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Aa(n,r,t)}function Ef(e){return e.toLowerCase()}class Et{constructor(t,n){this.attribute=n,this.property=t}}Et.prototype.attribute="";Et.prototype.booleanish=!1;Et.prototype.boolean=!1;Et.prototype.commaOrSpaceSeparated=!1;Et.prototype.commaSeparated=!1;Et.prototype.defined=!1;Et.prototype.mustUseProperty=!1;Et.prototype.number=!1;Et.prototype.overloadedBoolean=!1;Et.prototype.property="";Et.prototype.spaceSeparated=!1;Et.prototype.space=void 0;let d2=0;const ue=Vn(),Ue=Vn(),wf=Vn(),V=Vn(),Ne=Vn(),cr=Vn(),xt=Vn();function Vn(){return 2**++d2}const Sf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ue,booleanish:Ue,commaOrSpaceSeparated:xt,commaSeparated:cr,number:V,overloadedBoolean:wf,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),ko=Object.keys(Sf);class Dg extends Et{constructor(t,n,r,a){let i=-1;if(super(t,n),kb(this,"space",a),typeof r=="number")for(;++i<ko.length;){const o=ko[i];kb(this,ko[i],(r&Sf[o])===Sf[o])}}}Dg.prototype.defined=!0;function kb(e,t,n){n&&(e[t]=n)}function kr(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Dg(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Ef(r)]=r,n[Ef(i.attribute)]=r}return new Aa(t,n,e.space)}const OR=kr({properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:Ne,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:V,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:Ne,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Ue,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function LR(e,t){return t in e?e[t]:t}function DR(e,t){return LR(e,t.toLowerCase())}const p2=kr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cr,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:ue,allowPaymentRequest:ue,allowUserMedia:ue,alt:null,as:null,async:ue,autoCapitalize:null,autoComplete:Ne,autoFocus:ue,autoPlay:ue,blocking:Ne,capture:null,charSet:null,checked:ue,cite:null,className:Ne,cols:V,colSpan:null,content:null,contentEditable:Ue,controls:ue,controlsList:Ne,coords:V|cr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ue,defer:ue,dir:null,dirName:null,disabled:ue,download:wf,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ue,formTarget:null,headers:Ne,height:V,hidden:wf,high:V,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:ue,inputMode:null,integrity:null,is:null,isMap:ue,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:ue,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ue,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:ue,muted:ue,name:null,nonce:null,noModule:ue,noValidate:ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ue,optimum:V,pattern:null,ping:Ne,placeholder:null,playsInline:ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ue,referrerPolicy:null,rel:Ne,required:ue,reversed:ue,rows:V,rowSpan:V,sandbox:Ne,scope:null,scoped:ue,seamless:ue,selected:ue,shadowRootClonable:ue,shadowRootDelegatesFocus:ue,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:ue,useMap:null,value:Ue,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ue,declare:ue,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:ue,noHref:ue,noShade:ue,noWrap:ue,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ue,disableRemotePlayback:ue,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:DR}),f2=kr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:xt,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Ne,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:cr,g2:cr,glyphName:cr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xt,rev:xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xt,requiredFeatures:xt,requiredFonts:xt,requiredFormats:xt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xt,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:LR}),MR=kr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),PR=kr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:DR}),FR=kr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),g2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},m2=/[A-Z]/g,Rb=/-[a-z]/g,h2=/^data[-\w.:]+$/i;function b2(e,t){const n=Ef(t);let r=t,a=Et;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&h2.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Rb,v2);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Rb.test(i)){let o=i.replace(m2,y2);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=Dg}return new a(r,t)}function y2(e){return"-"+e.toLowerCase()}function v2(e){return e.charAt(1).toUpperCase()}const E2=NR([OR,p2,MR,PR,FR],"html"),Mg=NR([OR,f2,MR,PR,FR],"svg");function w2(e){return e.join(" ").trim()}var Zn={},Ro,Ib;function S2(){if(Ib)return Ro;Ib=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
2494
+ `}}),w.jsx("div",{className:te("relative z-20",t),children:e})]})},wb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sb=ck,ji=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Sb(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const p=wb(c)||wb(d);return a[u][p]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:p,...f}=c;return Object.entries(f).every(g=>{let[m,v]=g;return Array.isArray(v)?v.includes({...i,...s}[m]):{...i,...s}[m]===v})?[...u,d,p]:u},[]);return Sb(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},JF=ge.create(fD),QF=ge.create(mD),xb={copied:{scale:1,opacity:1,transition:{duration:.15}},idle:{scale:.8,opacity:0,transition:{duration:.15}}},Og=O.memo(({textToCopy:e,onClick:t,className:n,iconClassName:r,disabled:a})=>{const[i,o]=O.useState(!1),s=async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy text: ",u)}},l=()=>{s(),t&&t()};return w.jsxs(en,{children:[w.jsx(tn,{onClick:l,className:n,disabled:a,children:w.jsx(nn,{mode:"wait",initial:!1,children:i?w.jsx(JF,{initial:"idle",animate:"copied",exit:"idle",variants:xb,className:te("size-4 text-telnyx-green",r)},"check"):w.jsx(QF,{initial:"idle",animate:"copied",exit:"idle",variants:xb,className:te("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"copy")})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:i?"Copied!":"Copy this message"})})]})}),e2=({size:e=96,spokeWidth:t=6,animationDuration:n=4})=>w.jsxs("div",{className:"relative animate-rotate-loader flex items-center justify-center",style:{width:e,height:e,animationDuration:`${n}s`},children:[w.jsx("div",{className:`rounded-full z-10 animate-scale-loader bg-telnyx-light-green duration-[${n/2}s]`,style:{width:e/8,height:e/8}}),Array.from({length:12}).map((a,i)=>{const o=i*30;return w.jsx("div",{className:"absolute bg-stone-700 rounded-[30px] top-0 left-1/2 transform origin-bottom",style:{transform:`translateX(-50%) rotate(${o}deg)`,height:e/2,width:t}},i+o)})]}),t2=e=>{const t=new CSSStyleSheet;return t.replaceSync(e.replace("((-webkit-hyphens: none) and (not (margin-trim: inline)))","(not (margin-trim: inline))")),t},n2=(e,t)=>{if(!t)return;const n=t2(t);e.adoptedStyleSheets=[n]},Lg=O.forwardRef(({children:e,shadowRootInit:t,targetMountContainer:n,...r},a)=>{const i=J(d=>d.widgetStyleSheetText),[o,s]=O.useState(null),l=O.useCallback(d=>{if(!d||d.shadowRoot)return;const p=d.attachShadow({mode:"open",...t});i&&n2(p,i),s(p)},[i,t]),u=O.useCallback(d=>{l(d),typeof a=="function"?a(d):a&&(a.current=d)},[l,a]),c=w.jsx("div",{ref:u,...r,children:o&&kp.createPortal(e,o)});return n?kp.createPortal(c,n):c}),Xn=({isLoaded:e=!1,className:t,contentClassName:n,children:r,disableAnimation:a=!1,loadingDuration:i})=>{const[o,s]=O.useState(e);O.useEffect(()=>{if(i&&!e){const u=setTimeout(()=>{s(!0)},i);return()=>clearTimeout(u)}},[i,e]);const l=e||o;return w.jsx("div",{"data-loaded":l,className:te("group relative overflow-hidden bg-neutral-700/20","pointer-events-none",!a&&!l&&["before:opacity-100 before:absolute before:inset-0","before:-translate-x-full before:animate-shimmer","before:bg-gradient-to-r","before:from-transparent before:via-neutral-600/30","before:to-transparent"],"after:opacity-100 after:absolute after:inset-0 after:-z-10","after:bg-heroui-content3","data-[loaded=true]:pointer-events-auto data-[loaded=true]:overflow-visible","data-[loaded=true]:!bg-transparent data-[loaded=true]:before:opacity-0","data-[loaded=true]:before:-z-10 data-[loaded=true]:before:animate-none","data-[loaded=true]:after:opacity-0","transition-[background] !duration-300","h-4 rounded-lg",t),children:w.jsx("div",{className:te("opacity-0 group-data-[loaded=true]:opacity-100","transition-opacity motion-reduce:transition-none !duration-300",n),children:r})})},r2=({words:e,className:t,filter:n=!0,duration:r=.5})=>{const[a,i]=PO();let o=e.split(" ");O.useEffect(()=>{const l=setTimeout(()=>{a.current&&i("span",{opacity:1,filter:n?"blur(0px)":"none"},{duration:r||1,delay:f1(.2)})},50);return()=>clearTimeout(l)},[e,a,i,r,n]);const s=()=>w.jsx(ge.div,{ref:a,children:o.map((l,u)=>w.jsxs(ge.span,{className:"text-gray-700/60 opacity-0",style:{filter:n?"blur(10px)":"none"},children:[l," "]},`${l}-${u}`))});return w.jsx("span",{className:te("text-gray-700 text-xs font-medium leading-snug tracking-wide",t),children:s()})},a2=({isLoaded:e=!1,progressMessage:t="Processing..."})=>w.jsxs("div",{className:"flex w-64 flex-col gap-2 relative",children:[w.jsx(Xn,{isLoaded:e}),w.jsx(Xn,{isLoaded:e}),w.jsxs("div",{className:"flex gap-1 items-center",children:[w.jsx(Xn,{className:"duration-100 flex-1",isLoaded:e}),w.jsx("div",{className:"bg-[#fefef8] px-3 z-10",children:w.jsx(r2,{words:t,className:"text-gray-700/60 font-medium"},t)}),w.jsx(Xn,{className:"duration-100 flex-1",isLoaded:e})]}),w.jsx(Xn,{isLoaded:e}),w.jsx(Xn,{isLoaded:e})]});function i2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const o2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,l2={};function Tb(e,t){return(l2.jsx?s2:o2).test(e)}const u2=/[ \t\n\f\r]/g;function c2(e){return typeof e=="object"?e.type==="text"?Ab(e.value):!1:Ab(e)}function Ab(e){return e.replace(u2,"")===""}class Aa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Aa.prototype.normal={};Aa.prototype.property={};Aa.prototype.space=void 0;function NR(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Aa(n,r,t)}function Ef(e){return e.toLowerCase()}class Et{constructor(t,n){this.attribute=n,this.property=t}}Et.prototype.attribute="";Et.prototype.booleanish=!1;Et.prototype.boolean=!1;Et.prototype.commaOrSpaceSeparated=!1;Et.prototype.commaSeparated=!1;Et.prototype.defined=!1;Et.prototype.mustUseProperty=!1;Et.prototype.number=!1;Et.prototype.overloadedBoolean=!1;Et.prototype.property="";Et.prototype.spaceSeparated=!1;Et.prototype.space=void 0;let d2=0;const ue=Vn(),Ue=Vn(),wf=Vn(),V=Vn(),Ne=Vn(),cr=Vn(),xt=Vn();function Vn(){return 2**++d2}const Sf=Object.freeze(Object.defineProperty({__proto__:null,boolean:ue,booleanish:Ue,commaOrSpaceSeparated:xt,commaSeparated:cr,number:V,overloadedBoolean:wf,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),ko=Object.keys(Sf);class Dg extends Et{constructor(t,n,r,a){let i=-1;if(super(t,n),kb(this,"space",a),typeof r=="number")for(;++i<ko.length;){const o=ko[i];kb(this,ko[i],(r&Sf[o])===Sf[o])}}}Dg.prototype.defined=!0;function kb(e,t,n){n&&(e[t]=n)}function kr(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Dg(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Ef(r)]=r,n[Ef(i.attribute)]=r}return new Aa(t,n,e.space)}const OR=kr({properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:Ne,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:V,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:Ne,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Ue,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function LR(e,t){return t in e?e[t]:t}function DR(e,t){return LR(e,t.toLowerCase())}const p2=kr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:cr,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:ue,allowPaymentRequest:ue,allowUserMedia:ue,alt:null,as:null,async:ue,autoCapitalize:null,autoComplete:Ne,autoFocus:ue,autoPlay:ue,blocking:Ne,capture:null,charSet:null,checked:ue,cite:null,className:Ne,cols:V,colSpan:null,content:null,contentEditable:Ue,controls:ue,controlsList:Ne,coords:V|cr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ue,defer:ue,dir:null,dirName:null,disabled:ue,download:wf,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ue,formTarget:null,headers:Ne,height:V,hidden:wf,high:V,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:ue,inputMode:null,integrity:null,is:null,isMap:ue,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:ue,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ue,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:ue,muted:ue,name:null,nonce:null,noModule:ue,noValidate:ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ue,optimum:V,pattern:null,ping:Ne,placeholder:null,playsInline:ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ue,referrerPolicy:null,rel:Ne,required:ue,reversed:ue,rows:V,rowSpan:V,sandbox:Ne,scope:null,scoped:ue,seamless:ue,selected:ue,shadowRootClonable:ue,shadowRootDelegatesFocus:ue,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:ue,useMap:null,value:Ue,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ue,declare:ue,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:ue,noHref:ue,noShade:ue,noWrap:ue,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ue,disableRemotePlayback:ue,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:DR}),f2=kr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:xt,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Ne,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:cr,g2:cr,glyphName:cr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:xt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xt,rev:xt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xt,requiredFeatures:xt,requiredFonts:xt,requiredFormats:xt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:xt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:xt,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:xt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:LR}),MR=kr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),PR=kr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:DR}),FR=kr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),g2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},m2=/[A-Z]/g,Rb=/-[a-z]/g,h2=/^data[-\w.:]+$/i;function b2(e,t){const n=Ef(t);let r=t,a=Et;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&h2.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Rb,v2);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Rb.test(i)){let o=i.replace(m2,y2);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=Dg}return new a(r,t)}function y2(e){return"-"+e.toLowerCase()}function v2(e){return e.charAt(1).toUpperCase()}const E2=NR([OR,p2,MR,PR,FR],"html"),Mg=NR([OR,f2,MR,PR,FR],"svg");function w2(e){return e.join(" ").trim()}var Zn={},Ro,Ib;function S2(){if(Ib)return Ro;Ib=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,l=`
2551
2495
  `,u="/",c="*",d="",p="comment",f="declaration";Ro=function(m,v){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];v=v||{};var h=1,b=1;function y(P){var F=P.match(t);F&&(h+=F.length);var z=P.lastIndexOf(l);b=~z?P.length-z:b+P.length}function S(){var P={line:h,column:b};return function(F){return F.position=new x(P),k(),F}}function x(P){this.start=P,this.end={line:h,column:b},this.source=v.source}x.prototype.content=m;function E(P){var F=new Error(v.source+":"+h+":"+b+": "+P);if(F.reason=P,F.filename=v.source,F.line=h,F.column=b,F.source=m,!v.silent)throw F}function T(P){var F=P.exec(m);if(F){var z=F[0];return y(z),m=m.slice(z.length),F}}function k(){T(n)}function C(P){var F;for(P=P||[];F=I();)F!==!1&&P.push(F);return P}function I(){var P=S();if(!(u!=m.charAt(0)||c!=m.charAt(1))){for(var F=2;d!=m.charAt(F)&&(c!=m.charAt(F)||u!=m.charAt(F+1));)++F;if(F+=2,d===m.charAt(F-1))return E("End of comment missing");var z=m.slice(2,F-2);return b+=2,y(z),m=m.slice(F),b+=2,P({type:p,comment:z})}}function D(){var P=S(),F=T(r);if(F){if(I(),!T(a))return E("property missing ':'");var z=T(i),H=P({type:f,property:g(F[0].replace(e,d)),value:z?g(z[0].replace(e,d)):d});return T(o),H}}function B(){var P=[];C(P);for(var F;F=D();)F!==!1&&(P.push(F),C(P));return P}return k(),B()};function g(m){return m?m.replace(s,d):d}return Ro}var Cb;function x2(){if(Cb)return Zn;Cb=1;var e=Zn&&Zn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.default=n;var t=e(S2());function n(r,a){var i=null;if(!r||typeof r!="string")return i;var o=(0,t.default)(r),s=typeof a=="function";return o.forEach(function(l){if(l.type==="declaration"){var u=l.property,c=l.value;s?a(u,c,l):c&&(i=i||{},i[u]=c)}}),i}return Zn}var jr={},_b;function T2(){if(_b)return jr;_b=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},o=function(u,c){return c.toUpperCase()},s=function(u,c){return"".concat(c,"-")},l=function(u,c){return c===void 0&&(c={}),i(u)?u:(u=u.toLowerCase(),c.reactCompat?u=u.replace(a,s):u=u.replace(r,s),u.replace(t,o))};return jr.camelCase=l,jr}var zr,Nb;function A2(){if(Nb)return zr;Nb=1;var e=zr&&zr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(x2()),n=T2();function r(a,i){var o={};return!a||typeof a!="string"||(0,t.default)(a,function(s,l){s&&l&&(o[(0,n.camelCase)(s,i)]=l)}),o}return r.default=r,zr=r,zr}var k2=A2();const R2=Mf(k2),BR=UR("end"),Pg=UR("start");function UR(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function I2(e){const t=Pg(e),n=BR(e);if(t&&n)return{start:t,end:n}}function Xr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ob(e.position):"start"in e||"end"in e?Ob(e):"line"in e||"column"in e?xf(e):""}function xf(e){return Lb(e&&e.line)+":"+Lb(e&&e.column)}function Ob(e){return xf(e&&e.start)+"-"+xf(e&&e.end)}function Lb(e){return e&&typeof e=="number"?e:1}class it extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},o=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(o=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=s?s.line:void 0,this.name=Xr(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}it.prototype.file="";it.prototype.name="";it.prototype.reason="";it.prototype.message="";it.prototype.stack="";it.prototype.column=void 0;it.prototype.line=void 0;it.prototype.ancestors=void 0;it.prototype.cause=void 0;it.prototype.fatal=void 0;it.prototype.place=void 0;it.prototype.ruleId=void 0;it.prototype.source=void 0;const Fg={}.hasOwnProperty,C2=new Map,_2=/[A-Z]/g,N2=new Set(["table","tbody","thead","tfoot","tr"]),O2=new Set(["td","th"]),jR="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function L2(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=z2(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=j2(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Mg:E2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=zR(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function zR(e,t,n){if(t.type==="element")return D2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return M2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return F2(e,t,n);if(t.type==="mdxjsEsm")return P2(e,t);if(t.type==="root")return B2(e,t,n);if(t.type==="text")return U2(e,t)}function D2(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Mg,e.schema=a),e.ancestors.push(t);const i=qR(e,t.tagName,!1),o=G2(e,t);let s=Ug(e,t);return N2.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!c2(l):!0})),GR(e,o,i,t),Bg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function M2(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}pa(e,t.position)}function P2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);pa(e,t.position)}function F2(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Mg,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:qR(e,t.name,!0),o=q2(e,t),s=Ug(e,t);return GR(e,o,i,t),Bg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function B2(e,t,n){const r={};return Bg(r,Ug(e,t)),e.create(t,e.Fragment,r,n)}function U2(e,t){return t.value}function GR(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function j2(e,t,n){return r;function r(a,i,o,s){const u=Array.isArray(o.children)?n:t;return s?u(i,o,s):u(i,o)}}function z2(e,t){return n;function n(r,a,i,o){const s=Array.isArray(i.children),l=Pg(r);return t(a,i,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function G2(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Fg.call(t.properties,a)){const i=V2(e,a,t.properties[a]);if(i){const[o,s]=i;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&O2.has(t.tagName)?r=s:n[o]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function q2(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else pa(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else pa(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function Ug(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:C2;for(;++r<t.children.length;){const i=t.children[r];let o;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const u=a.get(l)||0;o=l+"-"+u,a.set(l,u+1)}}const s=zR(e,i,o);s!==void 0&&n.push(s)}return n}function V2(e,t,n){const r=b2(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?i2(n):w2(n)),r.property==="style"){let a=typeof n=="object"?n:H2(e,String(n));return e.stylePropertyNameCase==="css"&&(a=$2(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?g2[r.property]||r.property:r.attribute,n]}}function H2(e,t){try{return R2(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new it("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=jR+"#cannot-parse-style-attribute",a}}function qR(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,o;for(;++i<a.length;){const s=Tb(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}r=o}else r=Tb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Fg.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);pa(e)}function pa(e,t){const n=new it("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=jR+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $2(e){const t={};let n;for(n in e)Fg.call(e,n)&&(t[W2(n)]=e[n]);return t}function W2(e){let t=e.replace(_2,Y2);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Y2(e){return"-"+e.toLowerCase()}const Io={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},K2={};function jg(e,t){const n=K2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return VR(e,r,a)}function VR(e,t,n){if(X2(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Db(e.children,t,n)}return Array.isArray(e)?Db(e,t,n):""}function Db(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=VR(e[a],t,n);return r.join("")}function X2(e){return!!(e&&typeof e=="object")}const Mb=document.createElement("i");function zg(e){const t="&"+e+";";Mb.innerHTML=t;const n=Mb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kt(e,t,n,r){const a=e.length;let i=0,o;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Lt(e,t){return e.length>0?(kt(e,e.length,0,t),e):t}const Pb={}.hasOwnProperty;function HR(e){const t={};let n=-1;for(;++n<e.length;)Z2(t,e[n]);return t}function Z2(e,t){let n;for(n in t){const a=(Pb.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){Pb.call(a,o)||(a[o]=[]);const s=i[o];J2(a[o],Array.isArray(s)?s:s?[s]:[])}}}function J2(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kt(e,0,0,r)}function $R(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function jt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ut=An(/[A-Za-z]/),at=An(/[\dA-Za-z]/),Q2=An(/[#-'*+\--9=?A-Z^-~]/);function hi(e){return e!==null&&(e<32||e===127)}const Tf=An(/\d/),eB=An(/[\dA-Fa-f]/),tB=An(/[!-/:-@[-`{-~]/);function re(e){return e!==null&&e<-2}function Ce(e){return e!==null&&(e<0||e===32)}function pe(e){return e===-2||e===-1||e===32}const zi=An(new RegExp("\\p{P}|\\p{S}","u")),qn=An(/\s/);function An(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Rr(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let o="";if(i===37&&at(e.charCodeAt(n+1))&&at(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(n+1);i<56320&&s>56319&&s<57344?(o=String.fromCharCode(i,s),a=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+a+1,o=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function ve(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(l){return pe(l)?(e.enter(n),s(l)):t(l)}function s(l){return pe(l)&&i++<a?(e.consume(l),s):(e.exit(n),t(l))}}const nB={tokenize:rB};function rB(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ve(e,t,"linePrefix")}function a(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return re(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),o)}}const aB={tokenize:iB},Fb={tokenize:oB};function iB(e){const t=this,n=[];let r=0,a,i,o;return s;function s(y){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,l,u)(y)}return u(y)}function l(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&b();const S=t.events.length;let x=S,E;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){E=t.events[x][1].end;break}h(r);let T=S;for(;T<t.events.length;)t.events[T][1].end={...E},T++;return kt(t.events,x+1,0,t.events.slice(S)),t.events.length=T,u(y)}return s(y)}function u(y){if(r===n.length){if(!a)return p(y);if(a.currentConstruct&&a.currentConstruct.concrete)return g(y);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Fb,c,d)(y)}function c(y){return a&&b(),h(r),p(y)}function d(y){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,g(y)}function p(y){return t.containerState={},e.attempt(Fb,f,g)(y)}function f(y){return r++,n.push([t.currentConstruct,t.containerState]),p(y)}function g(y){if(y===null){a&&b(),h(0),e.consume(y);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),m(y)}function m(y){if(y===null){v(e.exit("chunkFlow"),!0),h(0),e.consume(y);return}return re(y)?(e.consume(y),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(y),m)}function v(y,S){const x=t.sliceStream(y);if(S&&x.push(null),y.previous=i,i&&(i.next=y),i=y,a.defineSkip(y.start),a.write(x),t.parser.lazy[y.start.line]){let E=a.events.length;for(;E--;)if(a.events[E][1].start.offset<o&&(!a.events[E][1].end||a.events[E][1].end.offset>o))return;const T=t.events.length;let k=T,C,I;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){if(C){I=t.events[k][1].end;break}C=!0}for(h(r),E=T;E<t.events.length;)t.events[E][1].end={...I},E++;kt(t.events,k+1,0,t.events.slice(T)),t.events.length=E}}function h(y){let S=n.length;for(;S-- >y;){const x=n[S];t.containerState=x[1],x[0].exit.call(t,e)}n.length=y}function b(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function oB(e,t,n){return ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function br(e){if(e===null||Ce(e)||qn(e))return 1;if(zi(e))return 2}function Gi(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Af={name:"attention",resolveAll:sB,tokenize:lB};function sB(e,t){let n=-1,r,a,i,o,s,l,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};Bb(d,-l),Bb(p,l),o={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Lt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Lt(u,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=Lt(u,Gi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Lt(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Lt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,kt(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lB(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=br(r);let i;return o;function o(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const u=e.exit("attentionSequence"),c=br(l),d=!c||c===2&&a||n.includes(l),p=!a||a===2&&c||n.includes(r);return u._open=!!(i===42?d:d&&(a||!p)),u._close=!!(i===42?p:p&&(c||!d)),t(l)}}function Bb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const uB={name:"autolink",tokenize:cB};function cB(e,t,n){let r=0;return a;function a(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(f){return ut(f)?(e.consume(f),o):f===64?n(f):u(f)}function o(f){return f===43||f===45||f===46||at(f)?(r=1,s(f)):u(f)}function s(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||at(f))&&r++<32?(e.consume(f),s):(r=0,u(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||hi(f)?n(f):(e.consume(f),l)}function u(f){return f===64?(e.consume(f),c):Q2(f)?(e.consume(f),u):n(f)}function c(f){return at(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||at(f))&&r++<63){const g=f===45?p:d;return e.consume(f),g}return n(f)}}const ka={partial:!0,tokenize:dB};function dB(e,t,n){return r;function r(i){return pe(i)?ve(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||re(i)?t(i):n(i)}}const WR={continuation:{tokenize:fB},exit:gB,name:"blockQuote",tokenize:pB};function pB(e,t,n){const r=this;return a;function a(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),i}return n(o)}function i(o){return pe(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function fB(e,t,n){const r=this;return a;function a(o){return pe(o)?ve(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(WR,t,n)(o)}}function gB(e){e.exit("blockQuote")}const YR={name:"characterEscape",tokenize:mB};function mB(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return tB(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const KR={name:"characterReference",tokenize:hB};function hB(e,t,n){const r=this;let a=0,i,o;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,o=at,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=eB,c):(e.enter("characterReferenceValue"),i=7,o=Tf,c(d))}function c(d){if(d===59&&a){const p=e.exit("characterReferenceValue");return o===at&&!zg(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&a++<i?(e.consume(d),c):n(d)}}const Ub={partial:!0,tokenize:yB},jb={concrete:!0,name:"codeFenced",tokenize:bB};function bB(e,t,n){const r=this,a={partial:!0,tokenize:x};let i=0,o=0,s;return l;function l(E){return u(E)}function u(E){const T=r.events[r.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===s?(o++,e.consume(E),c):o<3?n(E):(e.exit("codeFencedFenceSequence"),pe(E)?ve(e,d,"whitespace")(E):d(E))}function d(E){return E===null||re(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Ub,m,S)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||re(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(E)):pe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ve(e,f,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),p)}function f(E){return E===null||re(E)?d(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===null||re(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(E)):E===96&&E===s?n(E):(e.consume(E),g)}function m(E){return e.attempt(a,S,v)(E)}function v(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),h}function h(E){return i>0&&pe(E)?ve(e,b,"linePrefix",i+1)(E):b(E)}function b(E){return E===null||re(E)?e.check(Ub,m,S)(E):(e.enter("codeFlowValue"),y(E))}function y(E){return E===null||re(E)?(e.exit("codeFlowValue"),b(E)):(e.consume(E),y)}function S(E){return e.exit("codeFenced"),t(E)}function x(E,T,k){let C=0;return I;function I(z){return E.enter("lineEnding"),E.consume(z),E.exit("lineEnding"),D}function D(z){return E.enter("codeFencedFence"),pe(z)?ve(E,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):B(z)}function B(z){return z===s?(E.enter("codeFencedFenceSequence"),P(z)):k(z)}function P(z){return z===s?(C++,E.consume(z),P):C>=o?(E.exit("codeFencedFenceSequence"),pe(z)?ve(E,F,"whitespace")(z):F(z)):k(z)}function F(z){return z===null||re(z)?(E.exit("codeFencedFence"),T(z)):k(z)}}}function yB(e,t,n){const r=this;return a;function a(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const Co={name:"codeIndented",tokenize:EB},vB={partial:!0,tokenize:wB};function EB(e,t,n){const r=this;return a;function a(u){return e.enter("codeIndented"),ve(e,i,"linePrefix",5)(u)}function i(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):re(u)?e.attempt(vB,o,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||re(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function wB(e,t,n){const r=this;return a;function a(o){return r.parser.lazy[r.now().line]?n(o):re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):ve(e,i,"linePrefix",5)(o)}function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):re(o)?a(o):n(o)}}const SB={name:"codeText",previous:TB,resolve:xB,tokenize:AB};function xB(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function TB(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function AB(e,t,n){let r=0,a,i;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),r++,s):(e.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),l):d===96?(i=e.enter("codeTextSequence"),a=0,c(d)):re(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||re(d)?(e.exit("codeTextData"),l(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),a++,c):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",u(d))}}class kB{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Gr(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Gr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Gr(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Gr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Gr(this.left,n.reverse())}}}function Gr(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function XR(e){const t={};let n=-1,r,a,i,o,s,l,u;const c=new kB(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,RB(c,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(o=c.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(a&&(c.get(a)[1].type="lineEndingBlank"),o[1].type="lineEnding",a=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;a&&(r[1].end={...c.get(a)[1].start},s=c.slice(a,n),s.unshift(r),c.splice(a,n-a+1,s))}}return kt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function RB(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,l=[],u={};let c,d,p=-1,f=n,g=0,m=0;const v=[m];for(;f;){for(;e.get(++a)[1]!==f;);i.push(a),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),d&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,v.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):v.pop(),p=v.length;p--;){const h=s.slice(v[p],v[p+1]),b=i.pop();l.push([b,b+h.length-1]),e.splice(b,2,h)}for(l.reverse(),p=-1;++p<l.length;)u[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return u}const IB={resolve:_B,tokenize:NB},CB={partial:!0,tokenize:OB};function _B(e){return XR(e),e}function NB(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(s)}function a(s){return s===null?i(s):re(s)?e.check(CB,o,i)(s):(e.consume(s),a)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function OB(e,t,n){const r=this;return a;function a(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),ve(e,i,"linePrefix")}function i(o){if(o===null||re(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function ZR(e,t,n,r,a,i,o,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return d;function d(h){return h===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(h),e.exit(i),p):h===null||h===32||h===41||hi(h)?n(h):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(h))}function p(h){return h===62?(e.enter(i),e.consume(h),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===62?(e.exit("chunkString"),e.exit(s),p(h)):h===null||h===60||re(h)?n(h):(e.consume(h),h===92?g:f)}function g(h){return h===60||h===62||h===92?(e.consume(h),f):f(h)}function m(h){return!c&&(h===null||h===41||Ce(h))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(h)):c<u&&h===40?(e.consume(h),c++,m):h===41?(e.consume(h),c--,m):h===null||h===32||h===40||hi(h)?n(h):(e.consume(h),h===92?v:m)}function v(h){return h===40||h===41||h===92?(e.consume(h),m):m(h)}}function JR(e,t,n,r,a,i){const o=this;let s=0,l;return u;function u(f){return e.enter(r),e.enter(a),e.consume(f),e.exit(a),e.enter(i),c}function c(f){return s>999||f===null||f===91||f===93&&!l||f===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(f):f===93?(e.exit(i),e.enter(a),e.consume(f),e.exit(a),e.exit(r),t):re(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||re(f)||s++>999?(e.exit("chunkString"),c(f)):(e.consume(f),l||(l=!pe(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function QR(e,t,n,r,a,i){let o;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(a),e.consume(p),e.exit(a),o=p===40?41:p,l):n(p)}function l(p){return p===o?(e.enter(a),e.consume(p),e.exit(a),e.exit(r),t):(e.enter(i),u(p))}function u(p){return p===o?(e.exit(i),l(o)):p===null?n(p):re(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ve(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===o||p===null||re(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?d:c)}function d(p){return p===o||p===92?(e.consume(p),c):c(p)}}function Zr(e,t){let n;return r;function r(a){return re(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):pe(a)?ve(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const LB={name:"definition",tokenize:MB},DB={partial:!0,tokenize:PB};function MB(e,t,n){const r=this;let a;return i;function i(f){return e.enter("definition"),o(f)}function o(f){return JR.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return a=jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):n(f)}function l(f){return Ce(f)?Zr(e,u)(f):u(f)}function u(f){return ZR(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(DB,d,d)(f)}function d(f){return pe(f)?ve(e,p,"whitespace")(f):p(f)}function p(f){return f===null||re(f)?(e.exit("definition"),r.parser.defined.push(a),t(f)):n(f)}}function PB(e,t,n){return r;function r(s){return Ce(s)?Zr(e,a)(s):n(s)}function a(s){return QR(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return pe(s)?ve(e,o,"whitespace")(s):o(s)}function o(s){return s===null||re(s)?t(s):n(s)}}const FB={name:"hardBreakEscape",tokenize:BB};function BB(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return re(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const UB={name:"headingAtx",resolve:jB,tokenize:zB};function jB(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},kt(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function zB(e,t,n){let r=0;return a;function a(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||Ce(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||re(c)?(e.exit("atxHeading"),t(c)):pe(c)?ve(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Ce(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const GB=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zb=["pre","script","style","textarea"],qB={concrete:!0,name:"htmlFlow",resolveTo:$B,tokenize:WB},VB={partial:!0,tokenize:KB},HB={partial:!0,tokenize:YB};function $B(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function WB(e,t,n){const r=this;let a,i,o,s,l;return u;function u(A){return c(A)}function c(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),d}function d(A){return A===33?(e.consume(A),p):A===47?(e.consume(A),i=!0,m):A===63?(e.consume(A),a=3,r.interrupt?t:R):ut(A)?(e.consume(A),o=String.fromCharCode(A),v):n(A)}function p(A){return A===45?(e.consume(A),a=2,f):A===91?(e.consume(A),a=5,s=0,g):ut(A)?(e.consume(A),a=4,r.interrupt?t:R):n(A)}function f(A){return A===45?(e.consume(A),r.interrupt?t:R):n(A)}function g(A){const Y="CDATA[";return A===Y.charCodeAt(s++)?(e.consume(A),s===Y.length?r.interrupt?t:B:g):n(A)}function m(A){return ut(A)?(e.consume(A),o=String.fromCharCode(A),v):n(A)}function v(A){if(A===null||A===47||A===62||Ce(A)){const Y=A===47,oe=o.toLowerCase();return!Y&&!i&&zb.includes(oe)?(a=1,r.interrupt?t(A):B(A)):GB.includes(o.toLowerCase())?(a=6,Y?(e.consume(A),h):r.interrupt?t(A):B(A)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):i?b(A):y(A))}return A===45||at(A)?(e.consume(A),o+=String.fromCharCode(A),v):n(A)}function h(A){return A===62?(e.consume(A),r.interrupt?t:B):n(A)}function b(A){return pe(A)?(e.consume(A),b):I(A)}function y(A){return A===47?(e.consume(A),I):A===58||A===95||ut(A)?(e.consume(A),S):pe(A)?(e.consume(A),y):I(A)}function S(A){return A===45||A===46||A===58||A===95||at(A)?(e.consume(A),S):x(A)}function x(A){return A===61?(e.consume(A),E):pe(A)?(e.consume(A),x):y(A)}function E(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),l=A,T):pe(A)?(e.consume(A),E):k(A)}function T(A){return A===l?(e.consume(A),l=null,C):A===null||re(A)?n(A):(e.consume(A),T)}function k(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Ce(A)?x(A):(e.consume(A),k)}function C(A){return A===47||A===62||pe(A)?y(A):n(A)}function I(A){return A===62?(e.consume(A),D):n(A)}function D(A){return A===null||re(A)?B(A):pe(A)?(e.consume(A),D):n(A)}function B(A){return A===45&&a===2?(e.consume(A),H):A===60&&a===1?(e.consume(A),G):A===62&&a===4?(e.consume(A),Q):A===63&&a===3?(e.consume(A),R):A===93&&a===5?(e.consume(A),$):re(A)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(VB,ne,P)(A)):A===null||re(A)?(e.exit("htmlFlowData"),P(A)):(e.consume(A),B)}function P(A){return e.check(HB,F,ne)(A)}function F(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),z}function z(A){return A===null||re(A)?P(A):(e.enter("htmlFlowData"),B(A))}function H(A){return A===45?(e.consume(A),R):B(A)}function G(A){return A===47?(e.consume(A),o="",L):B(A)}function L(A){if(A===62){const Y=o.toLowerCase();return zb.includes(Y)?(e.consume(A),Q):B(A)}return ut(A)&&o.length<8?(e.consume(A),o+=String.fromCharCode(A),L):B(A)}function $(A){return A===93?(e.consume(A),R):B(A)}function R(A){return A===62?(e.consume(A),Q):A===45&&a===2?(e.consume(A),R):B(A)}function Q(A){return A===null||re(A)?(e.exit("htmlFlowData"),ne(A)):(e.consume(A),Q)}function ne(A){return e.exit("htmlFlow"),t(A)}}function YB(e,t,n){const r=this;return a;function a(o){return re(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):n(o)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function KB(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ka,t,n)}}const XB={name:"htmlText",tokenize:ZB};function ZB(e,t,n){const r=this;let a,i,o;return s;function s(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),l}function l(R){return R===33?(e.consume(R),u):R===47?(e.consume(R),x):R===63?(e.consume(R),y):ut(R)?(e.consume(R),k):n(R)}function u(R){return R===45?(e.consume(R),c):R===91?(e.consume(R),i=0,g):ut(R)?(e.consume(R),b):n(R)}function c(R){return R===45?(e.consume(R),f):n(R)}function d(R){return R===null?n(R):R===45?(e.consume(R),p):re(R)?(o=d,G(R)):(e.consume(R),d)}function p(R){return R===45?(e.consume(R),f):d(R)}function f(R){return R===62?H(R):R===45?p(R):d(R)}function g(R){const Q="CDATA[";return R===Q.charCodeAt(i++)?(e.consume(R),i===Q.length?m:g):n(R)}function m(R){return R===null?n(R):R===93?(e.consume(R),v):re(R)?(o=m,G(R)):(e.consume(R),m)}function v(R){return R===93?(e.consume(R),h):m(R)}function h(R){return R===62?H(R):R===93?(e.consume(R),h):m(R)}function b(R){return R===null||R===62?H(R):re(R)?(o=b,G(R)):(e.consume(R),b)}function y(R){return R===null?n(R):R===63?(e.consume(R),S):re(R)?(o=y,G(R)):(e.consume(R),y)}function S(R){return R===62?H(R):y(R)}function x(R){return ut(R)?(e.consume(R),E):n(R)}function E(R){return R===45||at(R)?(e.consume(R),E):T(R)}function T(R){return re(R)?(o=T,G(R)):pe(R)?(e.consume(R),T):H(R)}function k(R){return R===45||at(R)?(e.consume(R),k):R===47||R===62||Ce(R)?C(R):n(R)}function C(R){return R===47?(e.consume(R),H):R===58||R===95||ut(R)?(e.consume(R),I):re(R)?(o=C,G(R)):pe(R)?(e.consume(R),C):H(R)}function I(R){return R===45||R===46||R===58||R===95||at(R)?(e.consume(R),I):D(R)}function D(R){return R===61?(e.consume(R),B):re(R)?(o=D,G(R)):pe(R)?(e.consume(R),D):C(R)}function B(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),a=R,P):re(R)?(o=B,G(R)):pe(R)?(e.consume(R),B):(e.consume(R),F)}function P(R){return R===a?(e.consume(R),a=void 0,z):R===null?n(R):re(R)?(o=P,G(R)):(e.consume(R),P)}function F(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||Ce(R)?C(R):(e.consume(R),F)}function z(R){return R===47||R===62||Ce(R)?C(R):n(R)}function H(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function G(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),L}function L(R){return pe(R)?ve(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):$(R)}function $(R){return e.enter("htmlTextData"),o(R)}}const Gg={name:"labelEnd",resolveAll:tU,resolveTo:nU,tokenize:rU},JB={tokenize:aU},QB={tokenize:iU},eU={tokenize:oU};function tU(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&kt(e,0,e.length,n),e}function nU(e,t){let n=e.length,r=0,a,i,o,s;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(o=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=Lt(s,e.slice(i+1,i+r+3)),s=Lt(s,[["enter",c,t]]),s=Lt(s,Gi(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),s=Lt(s,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),s=Lt(s,e.slice(o+1)),s=Lt(s,[["exit",l,t]]),kt(e,i,e.length,s),e}function rU(e,t,n){const r=this;let a=r.events.length,i,o;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return s;function s(p){return i?i._inactive?d(p):(o=r.parser.defined.includes(jt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(JB,c,o?c:d)(p):p===91?e.attempt(QB,c,o?u:d)(p):o?c(p):d(p)}function u(p){return e.attempt(eU,c,d)(p)}function c(p){return t(p)}function d(p){return i._balanced=!0,n(p)}}function aU(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),a}function a(d){return Ce(d)?Zr(e,i)(d):i(d)}function i(d){return d===41?c(d):ZR(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Ce(d)?Zr(e,l)(d):c(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?QR(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Ce(d)?Zr(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function iU(e,t,n){const r=this;return a;function a(s){return JR.call(r,e,i,o,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(jt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function oU(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const sU={name:"labelStartImage",resolveAll:Gg.resolveAll,tokenize:lU};function lU(e,t,n){const r=this;return a;function a(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const uU={name:"labelStartLink",resolveAll:Gg.resolveAll,tokenize:cU};function cU(e,t,n){const r=this;return a;function a(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const _o={name:"lineEnding",tokenize:dU};function dU(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ve(e,t,"linePrefix")}}const ei={name:"thematicBreak",tokenize:pU};function pU(e,t,n){let r=0,a;return i;function i(u){return e.enter("thematicBreak"),o(u)}function o(u){return a=u,s(u)}function s(u){return u===a?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||re(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===a?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),pe(u)?ve(e,s,"whitespace")(u):s(u))}}const gt={continuation:{tokenize:hU},exit:yU,name:"list",tokenize:mU},fU={partial:!0,tokenize:vU},gU={partial:!0,tokenize:bU};function mU(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return s;function s(f){const g=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Tf(f)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(ei,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return n(f)}function l(f){return Tf(f)&&++o<10?(e.consume(f),l):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(ka,r.interrupt?n:c,e.attempt(fU,p,d))}function c(f){return r.containerState.initialBlankLine=!0,i++,p(f)}function d(f){return pe(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function hU(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ka,a,i);function a(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ve(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!pe(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gU,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ve(e,e.attempt(gt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function bU(e,t,n){const r=this;return ve(e,a,"listItemIndent",r.containerState.size+1);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(i):n(i)}}function yU(e){e.exit(this.containerState.type)}function vU(e,t,n){const r=this;return ve(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const o=r.events[r.events.length-1];return!pe(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Gb={name:"setextUnderline",resolveTo:EU,tokenize:wU};function EU(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function wU(e,t,n){const r=this;let a;return i;function i(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),a=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===a?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),pe(u)?ve(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||re(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const SU={tokenize:xU};function xU(e){const t=this,n=e.attempt(ka,r,e.attempt(this.parser.constructs.flowInitial,a,ve(e,e.attempt(this.parser.constructs.flow,a,e.attempt(IB,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const TU={resolveAll:t0()},AU=e0("string"),kU=e0("text");function e0(e){return{resolveAll:t0(e==="text"?RU:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,o,s);return o;function o(c){return u(c)?i(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),i(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const d=a[c];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function t0(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function RU(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,o=-1,s=0,l;for(;i--;){const u=a[i];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(u===-2)l=!0,s++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:r.start._bufferIndex+o,_index:r.start._index+i,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const IU={42:gt,43:gt,45:gt,48:gt,49:gt,50:gt,51:gt,52:gt,53:gt,54:gt,55:gt,56:gt,57:gt,62:WR},CU={91:LB},_U={[-2]:Co,[-1]:Co,32:Co},NU={35:UB,42:ei,45:[Gb,ei],60:qB,61:Gb,95:ei,96:jb,126:jb},OU={38:KR,92:YR},LU={[-5]:_o,[-4]:_o,[-3]:_o,33:sU,38:KR,42:Af,60:[uB,XB],91:uU,92:[FB,YR],93:Gg,95:Af,96:SB},DU={null:[Af,TU]},MU={null:[42,95]},PU={null:[]},FU=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:MU,contentInitial:CU,disable:PU,document:IU,flow:NU,flowInitial:_U,insideSpan:DU,string:OU,text:LU},Symbol.toStringTag,{value:"Module"}));function BU(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let o=[],s=[];const l={attempt:T(x),check:T(E),consume:b,enter:y,exit:S,interrupt:T(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let c=t.tokenize.call(u,l);return t.resolveAll&&i.push(t),u;function d(D){return o=Lt(o,D),v(),o[o.length-1]!==null?[]:(k(t,0),u.events=Gi(i,u.events,u),u.events)}function p(D,B){return jU(f(D),B)}function f(D){return UU(o,D)}function g(){const{_bufferIndex:D,_index:B,line:P,column:F,offset:z}=r;return{_bufferIndex:D,_index:B,line:P,column:F,offset:z}}function m(D){a[D.line]=D.column,I()}function v(){let D;for(;r._index<o.length;){const B=o[r._index];if(typeof B=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<B.length;)h(B.charCodeAt(r._bufferIndex));else h(B)}}function h(D){c=c(D)}function b(D){re(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,I()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=D}function y(D,B){const P=B||{};return P.type=D,P.start=g(),u.events.push(["enter",P,u]),s.push(P),P}function S(D){const B=s.pop();return B.end=g(),u.events.push(["exit",B,u]),B}function x(D,B){k(D,B.from)}function E(D,B){B.restore()}function T(D,B){return P;function P(F,z,H){let G,L,$,R;return Array.isArray(F)?ne(F):"tokenize"in F?ne([F]):Q(F);function Q(ae){return ee;function ee(de){const he=de!==null&&ae[de],Ee=de!==null&&ae.null,xe=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return ne(xe)(de)}}function ne(ae){return G=ae,L=0,ae.length===0?H:A(ae[L])}function A(ae){return ee;function ee(de){return R=C(),$=ae,ae.partial||(u.currentConstruct=ae),ae.name&&u.parser.constructs.disable.null.includes(ae.name)?oe():ae.tokenize.call(B?Object.assign(Object.create(u),B):u,l,Y,oe)(de)}}function Y(ae){return D($,R),z}function oe(ae){return R.restore(),++L<G.length?A(G[L]):H}}}function k(D,B){D.resolveAll&&!i.includes(D)&&i.push(D),D.resolve&&kt(u.events,B,u.events.length-B,D.resolve(u.events.slice(B),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function C(){const D=g(),B=u.previous,P=u.currentConstruct,F=u.events.length,z=Array.from(s);return{from:F,restore:H};function H(){r=D,u.previous=B,u.currentConstruct=P,u.events.length=F,s=z,I()}}function I(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function UU(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let o;if(n===a)o=[e[n].slice(r,i)];else{if(o=e.slice(n,a),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}i>0&&o.push(e[a].slice(0,i))}return o}function jU(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
2552
2496
  `;break}case-3:{o=`\r
2553
2497
  `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&a)continue;o=" ";break}default:o=String.fromCharCode(i)}a=i===-2,r.push(o)}return r.join("")}function zU(e){const r={constructs:HR([FU,...(e||{}).extensions||[]]),content:a(nB),defined:[],document:a(aB),flow:a(SU),lazy:{},string:a(AU),text:a(kU)};return r;function a(i){return o;function o(s){return BU(r,i,s)}}}function GU(e){for(;!XR(e););return e}const qb=/[\0\t\n\r]/g;function qU(){let e=1,t="",n=!0,r;return a;function a(i,o,s){const l=[];let u,c,d,p,f;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(qb.lastIndex=d,u=qb.exec(i),p=u&&u.index!==void 0?u.index:i.length,f=i.charCodeAt(p),!u){t=i.slice(d);break}if(f===10&&d===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<p&&(l.push(i.slice(d,p)),e+=p-d),f){case 0:{l.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,l.push(-2);e++<c;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const VU=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function HU(e){return e.replace(VU,$U)}function $U(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return $R(n.slice(i?2:1),i?16:10)}return zg(n)||e}const n0={}.hasOwnProperty;function WU(e,t,n){return typeof t!="string"&&(n=t,t=void 0),YU(n)(GU(zU(n).document().write(qU()(e,t,!0))))}function YU(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ve),autolinkProtocol:C,autolinkEmail:C,atxHeading:i(Xe),blockQuote:i(Ee),characterEscape:C,characterReference:C,codeFenced:i(xe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(xe,o),codeText:i(Ge,o),codeTextData:C,data:C,codeFlowValue:C,definition:i(qe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(Ht),hardBreakEscape:i(Re),hardBreakTrailing:i(Re),htmlFlow:i(Ct,o),htmlFlowData:C,htmlText:i(Ct,o),htmlTextData:C,image:i(Ze),label:o,link:i(Ve),listItem:i(on),listItemValue:p,listOrdered:i($e,d),listUnordered:i($e),paragraph:i(ot),reference:A,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(Xe),strong:i(sn),thematicBreak:i(Te)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:he,autolinkProtocol:de,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:ae,characterReference:ee,codeFenced:l(v),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:I,codeIndented:l(h),codeText:l(z),codeTextData:I,data:I,definition:l(),definitionDestinationString:S,definitionLabelString:b,definitionTitleString:y,emphasis:l(),hardBreakEscape:l(B),hardBreakTrailing:l(B),htmlFlow:l(P),htmlFlowData:I,htmlText:l(F),htmlTextData:I,image:l(G),label:$,labelText:L,lineEnding:D,link:l(H),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Y,resourceDestinationString:R,resourceTitleString:Q,resource:ne,setextHeading:l(k),setextHeadingLineSequence:T,setextHeadingText:E,strong:l(),thematicBreak:l()}};r0(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(M){let j={type:"root",children:[]};const K={stack:[j],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:c,data:n},ie=[];let me=-1;for(;++me<M.length;)if(M[me][1].type==="listOrdered"||M[me][1].type==="listUnordered")if(M[me][0]==="enter")ie.push(me);else{const Je=ie.pop();me=a(M,Je,me)}for(me=-1;++me<M.length;){const Je=t[M[me][0]];n0.call(Je,M[me][1].type)&&Je[M[me][1].type].call(Object.assign({sliceSerialize:M[me][2].sliceSerialize},K),M[me][1])}if(K.tokenStack.length>0){const Je=K.tokenStack[K.tokenStack.length-1];(Je[1]||Vb).call(K,void 0,Je[0])}for(j.position={start:hn(M.length>0?M[0][1].start:{line:1,column:1,offset:0}),end:hn(M.length>0?M[M.length-2][1].end:{line:1,column:1,offset:0})},me=-1;++me<t.transforms.length;)j=t.transforms[me](j)||j;return j}function a(M,j,K){let ie=j-1,me=-1,Je=!1,Qe,et,st,tt;for(;++ie<=K;){const We=M[ie];switch(We[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{We[0]==="enter"?me++:me--,tt=void 0;break}case"lineEndingBlank":{We[0]==="enter"&&(Qe&&!tt&&!me&&!st&&(st=ie),tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tt=void 0}if(!me&&We[0]==="enter"&&We[1].type==="listItemPrefix"||me===-1&&We[0]==="exit"&&(We[1].type==="listUnordered"||We[1].type==="listOrdered")){if(Qe){let pt=ie;for(et=void 0;pt--;){const Ye=M[pt];if(Ye[1].type==="lineEnding"||Ye[1].type==="lineEndingBlank"){if(Ye[0]==="exit")continue;et&&(M[et][1].type="lineEndingBlank",Je=!0),Ye[1].type="lineEnding",et=pt}else if(!(Ye[1].type==="linePrefix"||Ye[1].type==="blockQuotePrefix"||Ye[1].type==="blockQuotePrefixWhitespace"||Ye[1].type==="blockQuoteMarker"||Ye[1].type==="listItemIndent"))break}st&&(!et||st<et)&&(Qe._spread=!0),Qe.end=Object.assign({},et?M[et][1].start:We[1].end),M.splice(et||ie,0,["exit",Qe,We[2]]),ie++,K++}if(We[1].type==="listItemPrefix"){const pt={type:"listItem",_spread:!1,start:Object.assign({},We[1].start),end:void 0};Qe=pt,M.splice(ie,0,["enter",pt,We[2]]),ie++,K++,st=void 0,tt=!0}}}return M[j][1]._spread=Je,K}function i(M,j){return K;function K(ie){s.call(this,M(ie),ie),j&&j.call(this,ie)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(M,j,K){this.stack[this.stack.length-1].children.push(M),this.stack.push(M),this.tokenStack.push([j,K||void 0]),M.position={start:hn(j.start),end:void 0}}function l(M){return j;function j(K){M&&M.call(this,K),u.call(this,K)}}function u(M,j){const K=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==M.type&&(j?j.call(this,M,ie[0]):(ie[1]||Vb).call(this,M,ie[0]));else throw new Error("Cannot close `"+M.type+"` ("+Xr({start:M.start,end:M.end})+"): it’s not open");K.position.end=hn(M.end)}function c(){return jg(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(M){if(this.data.expectingFirstListItemValue){const j=this.stack[this.stack.length-2];j.start=Number.parseInt(this.sliceSerialize(M),10),this.data.expectingFirstListItemValue=void 0}}function f(){const M=this.resume(),j=this.stack[this.stack.length-1];j.lang=M}function g(){const M=this.resume(),j=this.stack[this.stack.length-1];j.meta=M}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const M=this.resume(),j=this.stack[this.stack.length-1];j.value=M.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function h(){const M=this.resume(),j=this.stack[this.stack.length-1];j.value=M.replace(/(\r?\n|\r)$/g,"")}function b(M){const j=this.resume(),K=this.stack[this.stack.length-1];K.label=j,K.identifier=jt(this.sliceSerialize(M)).toLowerCase()}function y(){const M=this.resume(),j=this.stack[this.stack.length-1];j.title=M}function S(){const M=this.resume(),j=this.stack[this.stack.length-1];j.url=M}function x(M){const j=this.stack[this.stack.length-1];if(!j.depth){const K=this.sliceSerialize(M).length;j.depth=K}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function T(M){const j=this.stack[this.stack.length-1];j.depth=this.sliceSerialize(M).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function C(M){const K=this.stack[this.stack.length-1].children;let ie=K[K.length-1];(!ie||ie.type!=="text")&&(ie=U(),ie.position={start:hn(M.start),end:void 0},K.push(ie)),this.stack.push(ie)}function I(M){const j=this.stack.pop();j.value+=this.sliceSerialize(M),j.position.end=hn(M.end)}function D(M){const j=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=j.children[j.children.length-1];K.position.end=hn(M.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(j.type)&&(C.call(this,M),I.call(this,M))}function B(){this.data.atHardBreak=!0}function P(){const M=this.resume(),j=this.stack[this.stack.length-1];j.value=M}function F(){const M=this.resume(),j=this.stack[this.stack.length-1];j.value=M}function z(){const M=this.resume(),j=this.stack[this.stack.length-1];j.value=M}function H(){const M=this.stack[this.stack.length-1];if(this.data.inReference){const j=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=j,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function G(){const M=this.stack[this.stack.length-1];if(this.data.inReference){const j=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=j,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function L(M){const j=this.sliceSerialize(M),K=this.stack[this.stack.length-2];K.label=HU(j),K.identifier=jt(j).toLowerCase()}function $(){const M=this.stack[this.stack.length-1],j=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const ie=M.children;K.children=ie}else K.alt=j}function R(){const M=this.resume(),j=this.stack[this.stack.length-1];j.url=M}function Q(){const M=this.resume(),j=this.stack[this.stack.length-1];j.title=M}function ne(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function Y(M){const j=this.resume(),K=this.stack[this.stack.length-1];K.label=j,K.identifier=jt(this.sliceSerialize(M)).toLowerCase(),this.data.referenceType="full"}function oe(M){this.data.characterReferenceType=M.type}function ae(M){const j=this.sliceSerialize(M),K=this.data.characterReferenceType;let ie;K?(ie=$R(j,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=zg(j);const me=this.stack[this.stack.length-1];me.value+=ie}function ee(M){const j=this.stack.pop();j.position.end=hn(M.end)}function de(M){I.call(this,M);const j=this.stack[this.stack.length-1];j.url=this.sliceSerialize(M)}function he(M){I.call(this,M);const j=this.stack[this.stack.length-1];j.url="mailto:"+this.sliceSerialize(M)}function Ee(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function Ge(){return{type:"inlineCode",value:""}}function qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ht(){return{type:"emphasis",children:[]}}function Xe(){return{type:"heading",depth:0,children:[]}}function Re(){return{type:"break"}}function Ct(){return{type:"html",value:""}}function Ze(){return{type:"image",title:null,url:"",alt:null}}function Ve(){return{type:"link",title:null,url:"",children:[]}}function $e(M){return{type:"list",ordered:M.type==="listOrdered",start:null,spread:M._spread,children:[]}}function on(M){return{type:"listItem",spread:M._spread,checked:null,children:[]}}function ot(){return{type:"paragraph",children:[]}}function sn(){return{type:"strong",children:[]}}function U(){return{type:"text",value:""}}function Te(){return{type:"thematicBreak"}}}function hn(e){return{line:e.line,column:e.column,offset:e.offset}}function r0(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?r0(e,r):KU(e,r)}}function KU(e,t){let n;for(n in t)if(n0.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Vb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xr({start:t.start,end:t.end})+") is still open")}function XU(e){const t=this;t.parser=n;function n(r){return WU(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function ZU(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function JU(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
@@ -2590,5 +2534,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2590
2534
  `))+1))}const o="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
2591
2535
  `,...i.current()});return/^[\t ]/.test(u)&&(u=ga(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),l(),s(),u}M0.peek=eW;function M0(e){return e.value||""}function eW(){return"<"}P0.peek=tW;function P0(e,t,n,r){const a=im(n),i=a==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),u+=l.move(" "+a),u+=l.move(n.safe(e.title,{before:u,after:a,...l.current()})),u+=l.move(a),s()),u+=l.move(")"),o(),u}function tW(){return"!"}F0.peek=nW;function F0(e,t,n,r){const a=e.referenceType,i=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=c,i(),a==="full"||!u||u!==d?l+=s.move(d+"]"):a==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function nW(){return"!"}B0.peek=rW;function B0(e,t,n){let r=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const o=n.unsafe[i],s=n.compilePattern(o);let l;if(o.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return a+r+a}function rW(){return"`"}function U0(e,t){const n=jg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}j0.peek=aW;function j0(e,t,n,r){const a=im(n),i=a==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,l;if(U0(e,n)){const c=n.stack;n.stack=[],s=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),s(),n.stack=c,d}s=n.enter("link"),l=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(l=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=o.move(" "+a),u+=o.move(n.safe(e.title,{before:u,after:a,...o.current()})),u+=o.move(a),l()),u+=o.move(")"),s(),u}function aW(e,t,n){return U0(e,n)?"<":"["}z0.peek=iW;function z0(e,t,n,r){const a=e.referenceType,i=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),o();const c=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=c,i(),a==="full"||!u||u!==d?l+=s.move(d+"]"):a==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function iW(){return"["}function om(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function oW(e){const t=om(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function sW(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function G0(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function lW(e,t,n,r){const a=n.enter("list"),i=n.bulletCurrent;let o=e.ordered?sW(n):om(n);const s=e.ordered?o==="."?")":".":oW(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),G0(n)===o&&c){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=s),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=i,a(),u}function uW(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function cW(e,t,n,r){const a=uW(n);let i=n.bulletCurrent||om(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let o=i.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(o-i.length)),s.shift(o);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),c);return l(),u;function c(d,p,f){return p?(f?"":" ".repeat(o))+d:(f?i:i+" ".repeat(o-i.length))+d}}function dW(e,t,n,r){const a=n.enter("paragraph"),i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),a(),o}const pW=Vi(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function fW(e,t,n,r){return(e.children.some(function(o){return pW(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function gW(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}q0.peek=mW;function q0(e,t,n,r){const a=gW(n),i=n.enter("strong"),o=n.createTracker(r),s=o.move(a+a);let l=o.move(n.containerPhrasing(e,{after:a,before:s,...o.current()}));const u=l.charCodeAt(0),c=vi(r.before.charCodeAt(r.before.length-1),u,a);c.inside&&(l=ga(u)+l.slice(1));const d=l.charCodeAt(l.length-1),p=vi(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+ga(d));const f=o.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+l+f}function mW(e,t,n){return n.options.strong||"*"}function hW(e,t,n,r){return n.safe(e.value,r)}function bW(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function yW(e,t,n){const r=(G0(n)+(n.options.ruleSpaces?" ":"")).repeat(bW(n));return n.options.ruleSpaces?r.slice(0,-1):r}const V0={blockquote:z$,break:Zx,code:W$,definition:K$,emphasis:D0,hardBreak:Zx,heading:Q$,html:M0,image:P0,imageReference:F0,inlineCode:B0,link:j0,linkReference:z0,list:lW,listItem:cW,paragraph:dW,root:fW,strong:q0,text:hW,thematicBreak:yW};function vW(){return{enter:{table:EW,tableData:Jx,tableHeader:Jx,tableRow:SW},exit:{codeText:xW,table:wW,tableData:Ap,tableHeader:Ap,tableRow:Ap}}}function EW(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function wW(e){this.exit(e),this.data.inTable=void 0}function SW(e){this.enter({type:"tableRow",children:[]},e)}function Ap(e){this.exit(e)}function Jx(e){this.enter({type:"tableCell",children:[]},e)}function xW(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,TW));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function TW(e,t){return t==="|"?t:e}function AW(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
2592
2536
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:o,tableCell:l,tableRow:s}};function o(f,g,m,v){return u(c(f,m,v),f.align)}function s(f,g,m,v){const h=d(f,m,v),b=u([h]);return b.slice(0,b.indexOf(`
2593
- `))}function l(f,g,m,v){const h=m.enter("tableCell"),b=m.enter("phrasing"),y=m.containerPhrasing(f,{...v,before:i,after:i});return b(),h(),y}function u(f,g){return U$(f,{align:g,alignDelimiters:r,padding:n,stringLength:a})}function c(f,g,m){const v=f.children;let h=-1;const b=[],y=g.enter("table");for(;++h<v.length;)b[h]=d(v[h],g,m);return y(),b}function d(f,g,m){const v=f.children;let h=-1;const b=[],y=g.enter("tableRow");for(;++h<v.length;)b[h]=l(v[h],f,g,m);return y(),b}function p(f,g,m){let v=V0.inlineCode(f,g,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function kW(){return{exit:{taskListCheckValueChecked:Qx,taskListCheckValueUnchecked:Qx,paragraph:IW}}}function RW(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:CW}}}function Qx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function IW(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let i=-1,o;for(;++i<a.length;){const s=a[i];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function CW(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(o);let l=V0.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+o}}function _W(){return[l$(),C$(),L$(),vW(),kW()]}function NW(e){return{extensions:[u$(),_$(e),D$(),AW(e),RW()]}}const OW={tokenize:BW,partial:!0},H0={tokenize:UW,partial:!0},$0={tokenize:jW,partial:!0},W0={tokenize:zW,partial:!0},LW={tokenize:GW,partial:!0},Y0={name:"wwwAutolink",tokenize:PW,previous:X0},K0={name:"protocolAutolink",tokenize:FW,previous:Z0},gn={name:"emailAutolink",tokenize:MW,previous:J0},an={};function DW(){return{text:an}}let Cn=48;for(;Cn<123;)an[Cn]=gn,Cn++,Cn===58?Cn=65:Cn===91&&(Cn=97);an[43]=gn;an[45]=gn;an[46]=gn;an[95]=gn;an[72]=[gn,K0];an[104]=[gn,K0];an[87]=[gn,Y0];an[119]=[gn,Y0];function MW(e,t,n){const r=this;let a,i;return o;function o(d){return!Df(d)||!J0.call(r,r.previous)||sm(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Df(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(LW,c,u)(d):d===45||d===95||at(d)?(i=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),a=!0,l}function c(d){return i&&a&&ut(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function PW(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!X0.call(r,r.previous)||sm(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(OW,e.attempt(H0,e.attempt($0,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function FW(e,t,n){const r=this;let a="",i=!1;return o;function o(d){return(d===72||d===104)&&Z0.call(r,r.previous)&&!sm(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(ut(d)&&a.length<5)return a+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=a.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?u:(i=!0,l)):n(d)}function u(d){return d===null||hi(d)||Ce(d)||qn(d)||zi(d)?n(d):e.attempt(H0,e.attempt($0,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function BW(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),i):n(o)}function i(o){return o===null?n(o):t(o)}}function UW(e,t,n){let r,a,i;return o;function o(u){return u===46||u===95?e.check(W0,l,s)(u):u===null||Ce(u)||qn(u)||u!==45&&zi(u)?l(u):(i=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(a=r,r=void 0),e.consume(u),o}function l(u){return a||r||!i?n(u):t(u)}}function jW(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(W0,t,i)(o):o===null||Ce(o)||qn(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function zW(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),a):s===60||s===null||Ce(s)||qn(s)?t(s):n(s)}function a(s){return s===null||s===40||s===91||Ce(s)||qn(s)?t(s):r(s)}function i(s){return ut(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):ut(s)?(e.consume(s),o):n(s)}}function GW(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return at(i)?n(i):t(i)}}function X0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ce(e)}function Z0(e){return!ut(e)}function J0(e){return!(e===47||Df(e))}function Df(e){return e===43||e===45||e===46||e===95||at(e)}function sm(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const qW={tokenize:ZW,partial:!0};function VW(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:YW,continuation:{tokenize:KW},exit:XW}},text:{91:{name:"gfmFootnoteCall",tokenize:WW},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:HW,resolveTo:$W}}}}function HW(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const l=r.events[a][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return n(l);const u=jt(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function $W(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function WW(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(i>999||d===93&&!o||d===null||d===91||Ce(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return a.includes(jt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ce(d)||(o=!0),i++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),i++,u):u(d)}}function YW(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,s;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(g)}function c(g){if(o>999||g===93&&!s||g===null||g===91||Ce(g))return n(g);if(g===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=jt(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ce(g)||(s=!0),o++,e.consume(g),g===92?d:c}function d(g){return g===91||g===92||g===93?(e.consume(g),o++,c):c(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),a.includes(i)||a.push(i),ve(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function KW(e,t,n){return e.check(ka,t,e.attempt(qW,t,n))}function XW(e){e.exit("gfmFootnoteDefinition")}function ZW(e,t,n){const r=this;return ve(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function JW(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let u=l;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[l][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[l][1].start)},p=[["enter",c,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&kt(p,p.length,0,Gi(f,o.slice(u+1,l),s)),kt(p,p.length,0,[["exit",d,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",c,s]]),kt(o,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function i(o,s,l){const u=this.previous,c=this.events;let d=0;return p;function p(g){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const m=br(u);if(g===126)return d>1?l(g):(o.consume(g),d++,f);if(d<2&&!n)return l(g);const v=o.exit("strikethroughSequenceTemporary"),h=br(g);return v._open=!h||h===2&&!!m,v._close=!m||m===2&&!!h,s(g)}}}class QW{constructor(){this.map=[]}add(t,n,r){e6(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const i of a)t.push(i);a=r.pop()}this.map.length=0}}function e6(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function t6(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function n6(){return{flow:{null:{name:"table",tokenize:r6,resolveAll:a6}}}}function r6(e,t,n){const r=this;let a=0,i=0,o;return s;function s(I){let D=r.events.length-1;for(;D>-1;){const F=r.events[D][1].type;if(F==="lineEnding"||F==="linePrefix")D--;else break}const B=D>-1?r.events[D][1].type:null,P=B==="tableHead"||B==="tableRow"?E:l;return P===E&&r.parser.lazy[r.now().line]?n(I):P(I)}function l(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(o=!0,i+=1),c(I)}function c(I){return I===null?n(I):re(I)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),f):n(I):pe(I)?ve(e,c,"whitespace")(I):(i+=1,o&&(o=!1,a+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||Ce(I)?(e.exit("data"),c(I)):(e.consume(I),I===92?p:d)}function p(I){return I===92||I===124?(e.consume(I),d):d(I)}function f(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),o=!1,pe(I)?ve(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):g(I))}function g(I){return I===45||I===58?v(I):I===124?(o=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),m):x(I)}function m(I){return pe(I)?ve(e,v,"whitespace")(I):v(I)}function v(I){return I===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),h):I===45?(i+=1,h(I)):I===null||re(I)?S(I):x(I)}function h(I){return I===45?(e.enter("tableDelimiterFiller"),b(I)):x(I)}function b(I){return I===45?(e.consume(I),b):I===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(I))}function y(I){return pe(I)?ve(e,S,"whitespace")(I):S(I)}function S(I){return I===124?g(I):I===null||re(I)?!o||a!==i?x(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):x(I)}function x(I){return n(I)}function E(I){return e.enter("tableRow"),T(I)}function T(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),T):I===null||re(I)?(e.exit("tableRow"),t(I)):pe(I)?ve(e,T,"whitespace")(I):(e.enter("data"),k(I))}function k(I){return I===null||I===124||Ce(I)?(e.exit("data"),T(I)):(e.consume(I),I===92?C:k)}function C(I){return I===92||I===124?(e.consume(I),k):k(I)}}function a6(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,c,d;const p=new QW;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(eT(p,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])),a=g.type==="tableDelimiterRow"?2:c?3:1):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],d=Ha(p,t,i,a,void 0,d),i=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(o[0]=o[1],d=Ha(p,t,i,a,void 0,d)),i=o,o=[i[1],n,0,0])):g.type==="tableHead"?(s=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,i[1]!==0?(o[0]=o[1],d=Ha(p,t,i,a,n,d)):o[1]!==0&&(d=Ha(p,t,o,a,n,d)),a=0):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&eT(p,t,l,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=t6(t.events,n))}return e}function Ha(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Qn(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Qn(t.events,n[1]);if(i={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=Qn(t.events,n[2]),c=Qn(t.events,n[3]),d={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,m=n[3]-n[2]-1;e.add(g,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return a!==void 0&&(i.end=Object.assign({},Qn(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function eT(e,t,n,r,a){const i=[],o=Qn(t.events,n);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function Qn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const i6={name:"tasklistCheck",tokenize:s6};function o6(){return{text:{91:i6}}}function s6(e,t,n){const r=this;return a;function a(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return Ce(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return re(l)?t(l):pe(l)?e.check({tokenize:l6},t,n)(l):n(l)}}function l6(e,t,n){return ve(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function u6(e){return HR([DW(),VW(),JW(e),n6(),o6()])}const c6={};function d6(e){const t=this,n=e||c6,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(u6(n)),i.push(_W()),o.push(NW(n))}const p6=ge.create(uD),f6=ge.create(dD),Q0=({isExpanded:e,onClick:t,className:n,iconClassName:r,disabled:a})=>w.jsxs(en,{children:[w.jsx(tn,{onClick:t,className:n,disabled:a,children:w.jsx(nn,{mode:"wait",initial:!1,children:e?w.jsx(p6,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:te("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"collapsed"):w.jsx(f6,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:te("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"expanded")})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:e?"Collapse message":"Expand message"})})]}),tT={'code[class*="language-"]':{background:"black",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"black",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"16px 20px",overflow:"auto",borderRadius:"0 0 8px 8px"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"#00c08b"},string:{color:"#00c08b"},char:{color:"#00c08b"},builtin:{color:"#00c08b"},inserted:{color:"#00c08b"},regex:{color:"#00c08b"},"attr-value":{color:"#00c08b"},"attr-value > .token.punctuation":{color:"#00c08b"},variable:{color:"#58A6FF"},operator:{color:"#58A6FF"},function:{color:"#58A6FF"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"#00c08b"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"#58A6FF"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"#00c08b"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}},nT=({children:e,className:t})=>w.jsx("div",{className:te("flex flex-col text-[1.5ch] rounded-lg","[&_*]:scrollbar [&_*]:scrollbar-w-1 [&_*]:scrollbar-h-1 [&_*]:scrollbar-thumb-rounded-full [&_*]:scrollbar-track-transparent [&_*]:scrollbar-thumb-telnyx-dark-cream",t),children:e}),rT=({children:e})=>w.jsx("div",{className:"flex justify-between bg-telnyx-gray-hover-light rounded-t-lg py-1.5 px-4",children:e}),g6=e=>w.jsx("a",{href:e.src,target:"_blank",rel:"noopener noreferrer",children:w.jsx("img",{className:"w-full my-2",alt:e.alt,src:e.src})}),m6=e=>w.jsxs("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-telnyx-blue no-underline",children:[w.jsx("span",{className:"underline",children:e.children}),w.jsx("span",{children:"↗"})]}),aT=({children:e})=>w.jsx("p",{className:"text-black pt-2 font-bold",children:e}),h6=({children:e})=>w.jsx("p",{className:"text-base",children:e}),b6=e=>({img:g6,h1:aT,h2:aT,a:m6,p:h6,code:O.memo(({inline:t,className:n,children:r,...a})=>{const i=J(v=>v.numMessagesExpanded),o=J(v=>v.setNumMessagesExpanded),s=e==="complete",[l,u]=O.useState(Bt.COLLAPSED),c=O.useRef(null),d=/language-(\w+)/.exec(n||""),p=String(r).replace(/\n$/,""),f=()=>{u(Bt.EXPANDED),o(i+1),document.body.style.overflow="hidden"},g=()=>{u(Bt.COLLAPSED),o(i-1),document.body.style.overflow="auto"},m=i>0;return!t&&d?w.jsxs(w.Fragment,{children:[w.jsx(nn,{children:l===Bt.EXPANDED&&w.jsxs(Lg,{targetMountContainer:document.body,children:[w.jsx(ge.div,{initial:!1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 h-full w-full z-[5000]",onClick:f},"expanded-code-background"),w.jsx(ge.div,{initial:!1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"fixed inset-0 z-[5000] grid p-4 place-items-center",onClick:v=>v.stopPropagation(),children:w.jsx(ge.div,{className:te("w-[60%] max-w-full max-h-[90%] rounded-lg overflow-hidden"),ref:c,children:w.jsxs(nT,{className:"overflow-y-hidden",children:[w.jsxs(rT,{children:[w.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center bg-gray-800/50 rounded-md px-1",children:d&&d[1]||"Unknown"}),s&&w.jsx(iT,{isExpanded:l===Bt.EXPANDED,handleCollapse:g,handleExpand:f,textToCopy:p})]}),w.jsx("div",{className:"bg-black pl-0.5 pr-1 py-1",children:w.jsx("div",{className:te("overflow-y-auto overflow-x-hidden max-h-[60vh] pb-1","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent scrollbar-thumb-telnyx-dark-cream","[&_*]:scrollbar [&_*]:scrollbar-h-1 [&_*]:scrollbar-thumb-rounded-full [&_*]:scrollbar-track-transparent [&_*]:scrollbar-thumb-telnyx-dark-cream","bg-black text-telnyx-cream"),children:w.jsx(Lf,{...a,children:String(r).replace(/\n$/,""),style:tT,language:s?d[1]:"text/plain",PreTag:"div",showLineNumbers:!0,wrapLongLines:!0})})})]})})},"expanded-code")]})}),w.jsxs(nT,{children:[w.jsxs(rT,{children:[w.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center",children:d&&d[1]||"Unknown"}),s&&w.jsx(iT,{isExpanded:l===Bt.EXPANDED,handleExpand:m?void 0:f,handleCollapse:g,textToCopy:p})]}),w.jsx("div",{className:"bg-black pl-0.5 pr-1 pb-1 rounded-b-lg mb-4",children:w.jsx(Lf,{...a,children:String(r).replace(/\n$/,""),style:tT,language:s?d[1]:"text/plain",PreTag:"div",wrapLongLines:!0})})]})]}):w.jsx("code",{...a,className:te("bg-transparent p-1",n),children:r})})}),y6=O.memo(({children:e,state:t})=>w.jsx("div",{className:te("w-full","overflow-x-auto overflow-y-hidden","scrollbar scrollbar-h-1 scrollbar-thumb-rounded-full scrollbar-thumb-gray-800/50 scrollbar-track-transparent hover:scrollbar-thumb-gray-800/70"),children:w.jsx(mz,{components:b6(t),remarkPlugins:[d6],children:e})})),iT=({isExpanded:e,handleExpand:t,handleCollapse:n,textToCopy:r})=>w.jsxs("div",{className:"flex",children:[w.jsx(Og,{textToCopy:r,className:te("bg-transparent border-0 py-1 px-1.5","hover:rounded-md hover:cursor-pointer hover:bg-gray-800/50"),iconClassName:"size-5 text-white hover:text-white"}),n&&t&&w.jsx(Q0,{isExpanded:e,onClick:e?n:t,className:te("text-white bg-transparent border-0 py-1 px-1.5","hover:rounded-md hover:cursor-pointer hover:bg-gray-800/50"),iconClassName:"size-5 text-white hover:text-white"})]}),v6=ge.create(xk),E6={pressed:{scale:.8},hovered:{scale:1.1},idle:{scale:1},transition:{duration:.15}},w6=O.memo(({onClick:e,className:t,iconClassName:n})=>w.jsxs(en,{children:[w.jsx(tn,{onClick:e,className:te("rounded-md text-black bg-telnyx-green/30 p-1 hover:bg-telnyx-green/60 hover:cursor-pointer",t),"aria-label":"Collapse message",children:w.jsx(nn,{children:w.jsx(v6,{initial:"idle",whileHover:"hovered",whileTap:"pressed",animate:"idle",exit:"idle",variants:E6,className:te("size-5 focus:outline-none focus:ring-0",n)},"close")})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Collapse message"})})]})),S6=({variant:e,textToCopy:t,onCloseClick:n})=>w.jsxs("div",{className:"flex justify-between items-center border-b-2 border-black",children:[w.jsx("h2",{className:"text-xl font-pp-formula text-stone-700",children:e==="bot"?"AI Assistant":"You"}),w.jsxs("div",{className:"flex items-center gap-1 pb-2",children:[w.jsx(Og,{textToCopy:t,className:te("rounded-md p-1 hover:bg-telnyx-green/60 hover:cursor-pointer bg-telnyx-green/30 border-0","flex items-center justify-center","h-fit"),iconClassName:"size-5 text-black"}),w.jsx(w6,{onClick:n,className:te("border-0","flex items-center justify-center","h-fit")})]})]}),x6=({feedbackId:e})=>{const t=J(i=>i.apiService),[n,r]=O.useState(null),a=O.useCallback(i=>async()=>{r(i),await t.sendFeedback({messageId:e,type:i})},[r,t]);return w.jsxs("div",{className:"flex items-center gap-1",children:[w.jsxs(en,{children:[w.jsx(tn,{onClick:a(Kn.POSITIVE),className:te("text-stone-600 cursor-pointer hover:text-stone-900",n===Kn.POSITIVE&&"text-telnyx-green hover:text-telnyx-green/80"),children:n===Kn.POSITIVE?w.jsx(ZP,{className:"size-4"}):w.jsx(vD,{className:"size-4"})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Helpful"})})]}),w.jsxs(en,{children:[w.jsx(tn,{onClick:a(Kn.NEGATIVE),className:te("text-stone-600 cursor-pointer hover:text-stone-900",n===Kn.NEGATIVE&&"text-red-600 hover:text-red-700"),children:n===Kn.NEGATIVE?w.jsx(KP,{className:"size-4"}):w.jsx(bD,{className:"size-4"})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Not helpful"})})]})]})},T6=ji(["relative w-fit p-4 max-w-[95%]","after:absolute after:content-[''] after:w-4 after:h-2 after:-bottom-0.5"],{variants:{variant:{bot:["bg-telnyx-dark-cream rounded-r-md rounded-tl-md justify-self-start","after:left-0 after:bg-telnyx-dark-cream after:-skew-y-[30deg] after:rounded-bl-sm","[&_a]:underline [&_a]:text-indigo-600 hover:[&_a]:text-indigo-800","[&_pre]:mt-4"],user:["bg-telnyx-green rounded-l-md rounded-tr-md justify-self-end","after:right-0 after:bg-telnyx-green after:skew-y-[30deg] after:rounded-br-sm"]},state:{complete:"",loading:"rounded-bl-md animate-shadow-grow border-[0.5px] border-telnyx-green/60 ring-1 ring-inset ring-telnyx-green/60 before:hidden! after:hidden! bg-white/30",streaming:"",error:["max-w-full after:hidden! rounded-md","bg-red-100/70!","text-red-600 text-justify text-sm border-2 border-red-400"]}},defaultVariants:{variant:"bot",state:"complete"}}),A6=({variant:e,state:t})=>({initial:{opacity:t==="loading"?.7:0,x:e==="bot"?0:48,y:e==="bot"?0:24,scale:t==="loading"?.9:.6},animate:{opacity:1,x:0,y:0,scale:1,transition:{duration:.3}},exit:{opacity:0,x:e==="bot"?0:48,y:e==="bot"?0:24,scale:t==="loading"?.9:.6,transition:{duration:.2}}}),k6=({variant:e,state:t,children:n})=>w.jsx(ge.div,{initial:"initial",animate:"animate",exit:"exit",variants:A6({variant:e,state:t}),className:T6({variant:e,state:t}),children:n}),R6=ji(["max-w-full max-h-[90vh] overflow-y-auto p-6 space-y-2","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent"],{variants:{variant:{bot:["scrollbar-thumb-telnyx-green scrollbar-track-telnyx-dark-cream","[&_a]:underline [&_a]:text-indigo-600 hover:[&_a]:text-indigo-800","[&_pre]:mt-4!"],user:["scrollbar-thumb-telnyx-dark-cream scrollbar-track-telnyx-green"]}},defaultVariants:{variant:"bot"}}),I6=ji(["flex items-center mb-2 gap-1"],{variants:{variant:{bot:["justify-self-start"],user:["justify-self-end flex-row-reverse"]}},defaultVariants:{variant:"bot"}}),oT=O.memo(({variant:e,children:t,state:n,handleRetry:r,isFirstMessage:a,timestamp:i,feedbackId:o})=>{const s=J(b=>b.endpoint),l=WL(i),u=J(b=>b.numMessagesExpanded),c=J(b=>b.setNumMessagesExpanded),d=J(b=>b.botState),[p,f]=O.useState(Bt.COLLAPSED),g=O.useRef(null),m=O.useCallback(()=>{f(Bt.EXPANDED),c(u+1),document.body.style.overflow="hidden"},[u,c,f]),v=O.useCallback(()=>{f(Bt.COLLAPSED),c(u-1),document.body.style.overflow="auto"},[u,c,f]),h=()=>{if(n==="streaming"||n==="complete")return w.jsx(y6,{state:n,children:t});if(n==="error")return w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx("p",{children:t}),d==="retrying"&&w.jsx(_6,{}),d==="error"&&w.jsx(C6,{onClick:r})]});if(n==="loading")return s===we.AIDA?w.jsx(a2,{isLoaded:!1,progressMessage:t},`loading-${t}`):w.jsx("div",{className:"flex items-center gap-3",children:w.jsx(e2,{size:24,spokeWidth:2,animationDuration:4})})};return w.jsxs(w.Fragment,{children:[w.jsx(nn,{mode:"wait",children:p===Bt.EXPANDED&&w.jsxs(Lg,{targetMountContainer:document.body,children:[w.jsx(ge.div,{initial:!1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/60 h-full w-full z-[5000]",onClick:m},"expanded-message-background"),w.jsx(ge.div,{initial:!1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"fixed inset-0 z-[5000] grid place-items-center p-4",onClick:b=>b.stopPropagation(),children:w.jsx("div",{ref:g,className:te("w-[60%] max-w-full bg-transparent rounded-lg p-2",e==="bot"?"bg-telnyx-dark-cream":"bg-telnyx-green"),children:w.jsxs("div",{className:R6({variant:e}),children:[w.jsx(S6,{variant:e,textToCopy:t,onCloseClick:v}),h()]})})},"expanded-message")]})}),w.jsx(k6,{variant:e,state:n,children:h()}),w.jsxs("div",{className:I6({variant:e}),children:[w.jsx("span",{className:te("text-stone-600 text-sm",e==="bot"?"mr-1":"ml-1"),children:l}),!a&&n==="complete"&&w.jsxs(w.Fragment,{children:[w.jsx(Q0,{onClick:m,isExpanded:p===Bt.EXPANDED}),w.jsx(Og,{textToCopy:t}),!!o&&w.jsx(x6,{feedbackId:o})]})]})]})}),C6=({onClick:e})=>w.jsx("span",{className:"flex w-full justify-center text-sm",children:w.jsx("button",{className:te("py-1.5 px-4 shadow-sm rounded-full","text-xs text-white ","bg-red-600 hover:bg-red-700","hover:cursor-pointer hover:scale-105 transition-all duration-300 active:scale-95"),onClick:e,children:"Retry"})}),_6=()=>w.jsx("div",{className:"flex w-full justify-center text-sm",children:w.jsxs("span",{className:"text-xs text-white bg-red-600 rounded-full p-1.5 flex items-center gap-1",children:["Retrying",w.jsx(wk,{className:"size-4 animate-spin"})]})}),eI=O.forwardRef((e,t)=>w.jsx("svg",{viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:w.jsx("path",{d:"M0 68.5714C0 30.5714 30.5714 0 68.5714 0H91.4286C129.429 0 160 30.5714 160 68.5714V160H68.5714C30.5714 160 0 129.429 0 91.4286V68.5714Z",fill:"black"})}));eI.displayName="RCSIcon";const Le={TOP_LEFT:"top-left",TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left"},_e=Le,ye={INSIDE:"inside",OUTSIDE:"outside"},N6={[_e.TOP_LEFT]:{[ye.INSIDE]:Le.TOP_LEFT,[ye.OUTSIDE]:Le.BOTTOM_RIGHT},[_e.TOP]:{[ye.INSIDE]:Le.TOP,[ye.OUTSIDE]:Le.BOTTOM},[_e.TOP_RIGHT]:{[ye.INSIDE]:Le.TOP_RIGHT,[ye.OUTSIDE]:Le.BOTTOM_LEFT},[_e.RIGHT]:{[ye.INSIDE]:Le.RIGHT,[ye.OUTSIDE]:Le.LEFT},[_e.BOTTOM_RIGHT]:{[ye.INSIDE]:Le.BOTTOM_RIGHT,[ye.OUTSIDE]:Le.TOP_LEFT},[_e.BOTTOM]:{[ye.INSIDE]:Le.BOTTOM,[ye.OUTSIDE]:Le.TOP},[_e.BOTTOM_LEFT]:{[ye.INSIDE]:Le.BOTTOM_LEFT,[ye.OUTSIDE]:Le.TOP_RIGHT},[_e.LEFT]:{[ye.INSIDE]:Le.LEFT,[ye.OUTSIDE]:Le.RIGHT}},Qr={CUSTOM:"custom",DEFAULT:"default"},O6={[Mt.OPEN]:({numMessagesExpanded:e,position:t,isCustomMounted:n})=>{const r=n?0:-28,a=n?0:-28,[i,o]=sT(t,r,a);return{opacity:1,clipPath:`circle(${e===0?768:4320}px at calc(${i}) calc(${o}))`,transition:{type:"spring",stiffness:30,restDelta:5}}},[Mt.CLOSED]:({position:e,isCustomMounted:t})=>{const n=t?0:16,r=t?0:-28,a=t?0:-28,[i,o]=sT(e,r,a);return{clipPath:`circle(${n}px at calc(${i}) calc(${o}))`,transition:{delay:.1,type:"spring",stiffness:900,damping:160}}}};function sT(e,t=0,n=0){const r=t>0?"+":"-",a=n>0?"+":"-",i=Math.abs(t),o=Math.abs(n);switch(e){case Le.TOP_LEFT:return[`0% ${r} ${i}px`,`0% ${a} ${o}px`];case Le.TOP:return[`50% ${r} ${i}px`,`0% ${a} ${o}px`];case Le.TOP_RIGHT:return[`100% ${r} ${i}px`,`0% ${a} ${o}px`];case Le.RIGHT:return[`100% ${r} ${i}px`,`50% ${a} ${o}px`];case Le.BOTTOM_RIGHT:return[`100% ${r} ${i}px`,`100% ${a} ${o}px`];case Le.BOTTOM:return[`50% ${r} ${i}px`,`100% ${a} ${o}px`];case Le.BOTTOM_LEFT:return[`0% ${r} ${i}px`,`100% ${a} ${o}px`];case Le.LEFT:return[`0% ${r} ${i}px`,`50% ${a} ${o}px`]}}const L6=ji("rounded-xl bg-black shadow-lg",{variants:{mountType:{[Qr.CUSTOM]:"absolute",[Qr.DEFAULT]:"fixed bottom-4! right-4!"},mountPositionAndDirection:{[`${_e.TOP_LEFT}-${ye.INSIDE}`]:"top-0 left-0",[`${_e.TOP_LEFT}-${ye.OUTSIDE}`]:"bottom-full right-full",[`${_e.TOP}-${ye.INSIDE}`]:"top-0 left-1/2 -translate-x-1/2",[`${_e.TOP}-${ye.OUTSIDE}`]:"bottom-full left-1/2 -translate-x-1/2",[`${_e.TOP_RIGHT}-${ye.INSIDE}`]:"top-0 right-0",[`${_e.TOP_RIGHT}-${ye.OUTSIDE}`]:"bottom-full left-full",[`${_e.RIGHT}-${ye.INSIDE}`]:"top-1/2 -translate-y-1/2 right-0 ",[`${_e.RIGHT}-${ye.OUTSIDE}`]:"top-1/2 -translate-y-1/2 left-full",[`${_e.BOTTOM_RIGHT}-${ye.INSIDE}`]:"bottom-0 right-0",[`${_e.BOTTOM_RIGHT}-${ye.OUTSIDE}`]:"top-full left-full",[`${_e.BOTTOM}-${ye.INSIDE}`]:"bottom-0 left-1/2 -translate-x-1/2",[`${_e.BOTTOM}-${ye.OUTSIDE}`]:"top-full left-1/2 -translate-x-1/2",[`${_e.BOTTOM_LEFT}-${ye.INSIDE}`]:"bottom-0 left-0",[`${_e.BOTTOM_LEFT}-${ye.OUTSIDE}`]:"top-full right-full",[`${_e.LEFT}-${ye.INSIDE}`]:"top-1/2 -translate-y-1/2 left-0",[`${_e.LEFT}-${ye.OUTSIDE}`]:"top-1/2 -translate-y-1/2 right-full"}},defaultVariants:{mountPositionAndDirection:`${_e.BOTTOM_RIGHT}-${ye.INSIDE}`,mountType:Qr.DEFAULT}}),D6={[dt.INITIAL]:{height:"78%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px"},[dt.USER_HAS_TYPED]:{height:"94%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"16px",borderTopRightRadius:"16px"}},M6={[dt.INITIAL]:{height:"22%"},[dt.USER_HAS_TYPED]:{height:"6%"}},P6=({chatAPIUrl:e=mt.CHAT_API_URL,flowAPIUrl:t=mt.FLOW_API_URL,flowApiKey:n,feedbackAPIUrl:r=mt.FEEDBACK_API_URL,user:a,onHelpAction:i,open:o,setOpen:s,placeholders:l=mt.DEFAULT_PLACEHOLDERS,mountPosition:u=_e.BOTTOM_RIGHT,mountDirection:c=ye.INSIDE,offsetX:d=0,offsetY:p=0,icon:f=eI})=>{const g=J(U=>U.endpoint),m=J(U=>U.setUser),v=J(U=>U.setOnHelpAction),h=J(U=>U.setChatAPIUrl),b=J(U=>U.setFlowAPIUrl),y=J(U=>U.setFlowApiKey),S=J(U=>U.setFeedbackAPIUrl),x=J(U=>U.setPlaceholders),E=J(U=>U.question),T=J(U=>U.setQuestion),k=J(U=>U.messages),C=J(U=>U.dispatchMessage),I=J(U=>U.widgetVisualState),D=J(U=>U.chatVisualState),B=J(U=>U.setChatVisualState),P=J(U=>U.numMessagesExpanded),F=J(U=>U.setSetCustomOpen),z=J(U=>U.openWidget),H=J(U=>U.closeWidget),G=I===Mt.OPEN,L=s?Qr.CUSTOM:Qr.DEFAULT,$=`${u}-${c}`,R=N6[u][c],Q=!!s,ne=J(U=>U.botState),A=J(U=>U.setBotState),Y=J(U=>U.numRetries),oe=J(U=>U.setNumRetries),ae=J(U=>U.retryTimeoutId),ee=J(U=>U.setRetryTimeoutId),de=J(U=>U.chatStartTimestamp),he=Jp[g].firstMessage,{chat:Ee,lastMessage:xe}=eD(),[Ge,qe]=O.useState(!0),Ht=O.useRef(null),Xe=O.useRef(null),Re=O.useRef(null),Ct=tD(Re),Ze=O.useRef(`telnyx-widget-fonts-${Math.random().toString(36).substring(2,9)}`);O.useEffect(()=>{const U=Ze.current;if(U){if(!document.getElementById(U)){const Te=document.createElement("style");Te.id=U,Te.textContent=nD,document.head.appendChild(Te)}return()=>{const Te=document.getElementById(U);Te&&Te.remove()}}},[Ze.current]),O.useEffect(()=>{if(!a){console.error("User info is required. Please provide a user object.");return}if(!a.id){console.error("User ID is required.");return}m(a)},[a,m]),O.useEffect(()=>{l.length>0&&x(l)},[l,x]),O.useEffect(()=>{i!==void 0&&v(i)},[i,v]),O.useEffect(()=>{e&&h(e)},[e,h]),O.useEffect(()=>{t&&b(t)},[t,b]),O.useEffect(()=>{y(n||null)},[n,y]),O.useEffect(()=>{r&&S(r)},[r,S]),O.useEffect(()=>{o!==void 0&&(o?z():H())},[o,z,H]),O.useEffect(()=>{s!==void 0&&F(s)},[s,F]),O.useEffect(()=>{var U;G&&((U=Xe.current)==null||U.focus())},[G]);const Ve=O.useCallback(()=>{const U=k[k.length-2];if(U.type==="user"&&U.message.length>0){T(U.message),A("retrying");const Te=setTimeout(async()=>{try{C({type:Ae.DELETE_LAST_MESSAGE_PAIR,payload:null}),oe(Y+1),await Ee(U.message)}catch(M){console.error("[Retry Logic] Chat failed during retry:",M)}},mt.RETRY_INTERVAL);ee(Te)}},[k,Ee,Y,C]);O.useEffect(()=>{ne==="error"&&(ae||(Y<mt.MAX_RETRIES?Ve():Y>=mt.MAX_RETRIES&&console.error("[Retry Logic] Max retries reached, stopping retry attempts")))},[ne,Y,ae,Ve]),O.useEffect(()=>{const U=Re.current;U&&Ge&&(xe==null?void 0:xe.message.length)>0&&(U.scrollTop=U.scrollHeight)},[xe==null?void 0:xe.message.length,Ge]);const $e=O.useCallback(()=>{const U=Xe.current;U&&(U.style.height="auto",U.style.height=`${U.scrollHeight}px`)},[]),on=U=>{$e(),B(dt.USER_HAS_TYPED),T(U.target.value)};O.useEffect(()=>{k.length===0&&requestAnimationFrame($e)},[k.length,$e]);const ot=async()=>{T(""),requestAnimationFrame($e),await Ee(E);const U=Re.current;U&&U.scrollTo({top:U.scrollHeight,behavior:"smooth"})},sn=()=>{const U=Re.current;if(!U)return;const Te=Math.abs(U.scrollHeight-U.clientHeight-U.scrollTop)<=5;qe(Te)};return w.jsx(Lg,{ref:Ht,children:w.jsx(lR,{delayDuration:75,skipDelayDuration:0,children:w.jsxs(nn,{children:[w.jsxs(ge.div,{initial:!1,animate:I,variants:O6,custom:{numMessagesExpanded:P,position:R,isCustomMounted:Q},className:te(L6({mountType:L,mountPositionAndDirection:$})),style:{height:mt.WIDGET_HEIGHT,width:mt.WIDGET_WIDTH,translateX:d,translateY:p},children:[w.jsx(ge.div,{initial:!1,animate:D,className:"px-4 pt-4 bg-black rounded-t-xl",variants:M6,children:w.jsx(ZF,{className:"flex flex-col justify-between h-full pb-4",children:w.jsx(WP,{resetChatCustomHandler:$e})})}),w.jsxs(ge.div,{initial:!1,animate:D,className:te("flex flex-col justify-between bg-telnyx-cream rounded-b-xl rounded-t-3xl p-4 pb-1.5","relative overflow-hidden"),variants:D6,children:[Ct&&w.jsxs(w.Fragment,{children:[w.jsx(bf,{containerRef:Re,direction:"up"}),w.jsx(bf,{containerRef:Re,direction:"down"})]}),w.jsxs("div",{ref:Re,className:te("grid grid-cols-1 gap-2 content-start h-full overflow-y-auto overflow-x-hidden py-2 px-1 relative","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent scrollbar-thumb-telnyx-dark-cream"),onScroll:sn,children:[w.jsx(oT,{variant:"bot",isFirstMessage:!0,state:"complete",timestamp:de,children:he},"bot-initial"),k.map(U=>w.jsx(oT,{variant:U.type,timestamp:U.timestamp,state:U.state,feedbackId:U.feedback_id,handleRetry:Ve,children:U.message},U.id))]}),w.jsx(_R,{ref:Xe,question:E,handleInput:on,handleSendMessage:ot})]})]},"widget-container"),!Q&&w.jsx(cF,{question:E,handleSendMessage:ot,triggerIcon:f},"chat-trigger-button")]})})})};exports.ChatWidget=P6;exports.Tooltip=en;exports.TooltipContent=Vt;exports.TooltipProvider=lR;exports.TooltipTrigger=tn;
2537
+ `))}function l(f,g,m,v){const h=m.enter("tableCell"),b=m.enter("phrasing"),y=m.containerPhrasing(f,{...v,before:i,after:i});return b(),h(),y}function u(f,g){return U$(f,{align:g,alignDelimiters:r,padding:n,stringLength:a})}function c(f,g,m){const v=f.children;let h=-1;const b=[],y=g.enter("table");for(;++h<v.length;)b[h]=d(v[h],g,m);return y(),b}function d(f,g,m){const v=f.children;let h=-1;const b=[],y=g.enter("tableRow");for(;++h<v.length;)b[h]=l(v[h],f,g,m);return y(),b}function p(f,g,m){let v=V0.inlineCode(f,g,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function kW(){return{exit:{taskListCheckValueChecked:Qx,taskListCheckValueUnchecked:Qx,paragraph:IW}}}function RW(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:CW}}}function Qx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function IW(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let i=-1,o;for(;++i<a.length;){const s=a[i];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function CW(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(o);let l=V0.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+o}}function _W(){return[l$(),C$(),L$(),vW(),kW()]}function NW(e){return{extensions:[u$(),_$(e),D$(),AW(e),RW()]}}const OW={tokenize:BW,partial:!0},H0={tokenize:UW,partial:!0},$0={tokenize:jW,partial:!0},W0={tokenize:zW,partial:!0},LW={tokenize:GW,partial:!0},Y0={name:"wwwAutolink",tokenize:PW,previous:X0},K0={name:"protocolAutolink",tokenize:FW,previous:Z0},gn={name:"emailAutolink",tokenize:MW,previous:J0},an={};function DW(){return{text:an}}let Cn=48;for(;Cn<123;)an[Cn]=gn,Cn++,Cn===58?Cn=65:Cn===91&&(Cn=97);an[43]=gn;an[45]=gn;an[46]=gn;an[95]=gn;an[72]=[gn,K0];an[104]=[gn,K0];an[87]=[gn,Y0];an[119]=[gn,Y0];function MW(e,t,n){const r=this;let a,i;return o;function o(d){return!Df(d)||!J0.call(r,r.previous)||sm(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Df(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(LW,c,u)(d):d===45||d===95||at(d)?(i=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),a=!0,l}function c(d){return i&&a&&ut(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function PW(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!X0.call(r,r.previous)||sm(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(OW,e.attempt(H0,e.attempt($0,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function FW(e,t,n){const r=this;let a="",i=!1;return o;function o(d){return(d===72||d===104)&&Z0.call(r,r.previous)&&!sm(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(d),e.consume(d),s):n(d)}function s(d){if(ut(d)&&a.length<5)return a+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=a.toLowerCase();if(p==="http"||p==="https")return e.consume(d),l}return n(d)}function l(d){return d===47?(e.consume(d),i?u:(i=!0,l)):n(d)}function u(d){return d===null||hi(d)||Ce(d)||qn(d)||zi(d)?n(d):e.attempt(H0,e.attempt($0,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function BW(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),i):n(o)}function i(o){return o===null?n(o):t(o)}}function UW(e,t,n){let r,a,i;return o;function o(u){return u===46||u===95?e.check(W0,l,s)(u):u===null||Ce(u)||qn(u)||u!==45&&zi(u)?l(u):(i=!0,e.consume(u),o)}function s(u){return u===95?r=!0:(a=r,r=void 0),e.consume(u),o}function l(u){return a||r||!i?n(u):t(u)}}function jW(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(W0,t,i)(o):o===null||Ce(o)||qn(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function zW(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),a):s===60||s===null||Ce(s)||qn(s)?t(s):n(s)}function a(s){return s===null||s===40||s===91||Ce(s)||qn(s)?t(s):r(s)}function i(s){return ut(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):ut(s)?(e.consume(s),o):n(s)}}function GW(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return at(i)?n(i):t(i)}}function X0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ce(e)}function Z0(e){return!ut(e)}function J0(e){return!(e===47||Df(e))}function Df(e){return e===43||e===45||e===46||e===95||at(e)}function sm(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const qW={tokenize:ZW,partial:!0};function VW(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:YW,continuation:{tokenize:KW},exit:XW}},text:{91:{name:"gfmFootnoteCall",tokenize:WW},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:HW,resolveTo:$W}}}}function HW(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const l=r.events[a][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return n(l);const u=jt(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function $W(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function WW(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(i>999||d===93&&!o||d===null||d===91||Ce(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return a.includes(jt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ce(d)||(o=!0),i++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),i++,u):u(d)}}function YW(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,s;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(g)}function c(g){if(o>999||g===93&&!s||g===null||g===91||Ce(g))return n(g);if(g===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=jt(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ce(g)||(s=!0),o++,e.consume(g),g===92?d:c}function d(g){return g===91||g===92||g===93?(e.consume(g),o++,c):c(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),a.includes(i)||a.push(i),ve(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function KW(e,t,n){return e.check(ka,t,e.attempt(qW,t,n))}function XW(e){e.exit("gfmFootnoteDefinition")}function ZW(e,t,n){const r=this;return ve(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function JW(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let u=l;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[l][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[l][1].end)},d={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[l][1].start)},p=[["enter",c,s],["enter",o[u][1],s],["exit",o[u][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&kt(p,p.length,0,Gi(f,o.slice(u+1,l),s)),kt(p,p.length,0,[["exit",d,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",c,s]]),kt(o,u-1,l-u+3,p),l=u+p.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function i(o,s,l){const u=this.previous,c=this.events;let d=0;return p;function p(g){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(g):(o.enter("strikethroughSequenceTemporary"),f(g))}function f(g){const m=br(u);if(g===126)return d>1?l(g):(o.consume(g),d++,f);if(d<2&&!n)return l(g);const v=o.exit("strikethroughSequenceTemporary"),h=br(g);return v._open=!h||h===2&&!!m,v._close=!m||m===2&&!!h,s(g)}}}class QW{constructor(){this.map=[]}add(t,n,r){e6(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const i of a)t.push(i);a=r.pop()}this.map.length=0}}function e6(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function t6(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function n6(){return{flow:{null:{name:"table",tokenize:r6,resolveAll:a6}}}}function r6(e,t,n){const r=this;let a=0,i=0,o;return s;function s(I){let D=r.events.length-1;for(;D>-1;){const F=r.events[D][1].type;if(F==="lineEnding"||F==="linePrefix")D--;else break}const B=D>-1?r.events[D][1].type:null,P=B==="tableHead"||B==="tableRow"?E:l;return P===E&&r.parser.lazy[r.now().line]?n(I):P(I)}function l(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(o=!0,i+=1),c(I)}function c(I){return I===null?n(I):re(I)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),f):n(I):pe(I)?ve(e,c,"whitespace")(I):(i+=1,o&&(o=!1,a+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),d(I)))}function d(I){return I===null||I===124||Ce(I)?(e.exit("data"),c(I)):(e.consume(I),I===92?p:d)}function p(I){return I===92||I===124?(e.consume(I),d):d(I)}function f(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),o=!1,pe(I)?ve(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):g(I))}function g(I){return I===45||I===58?v(I):I===124?(o=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),m):x(I)}function m(I){return pe(I)?ve(e,v,"whitespace")(I):v(I)}function v(I){return I===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),h):I===45?(i+=1,h(I)):I===null||re(I)?S(I):x(I)}function h(I){return I===45?(e.enter("tableDelimiterFiller"),b(I)):x(I)}function b(I){return I===45?(e.consume(I),b):I===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(I))}function y(I){return pe(I)?ve(e,S,"whitespace")(I):S(I)}function S(I){return I===124?g(I):I===null||re(I)?!o||a!==i?x(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):x(I)}function x(I){return n(I)}function E(I){return e.enter("tableRow"),T(I)}function T(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),T):I===null||re(I)?(e.exit("tableRow"),t(I)):pe(I)?ve(e,T,"whitespace")(I):(e.enter("data"),k(I))}function k(I){return I===null||I===124||Ce(I)?(e.exit("data"),T(I)):(e.consume(I),I===92?C:k)}function C(I){return I===92||I===124?(e.consume(I),k):k(I)}}function a6(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,u,c,d;const p=new QW;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(eT(p,t,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",u,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",c,t]])),a=g.type==="tableDelimiterRow"?2:c?3:1):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],d=Ha(p,t,i,a,void 0,d),i=[0,0,0,0]),o[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(o[0]=o[1],d=Ha(p,t,i,a,void 0,d)),i=o,o=[i[1],n,0,0])):g.type==="tableHead"?(s=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,i[1]!==0?(o[0]=o[1],d=Ha(p,t,i,a,n,d)):o[1]!==0&&(d=Ha(p,t,o,a,n,d)),a=0):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&eT(p,t,l,u,c),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=t6(t.events,n))}return e}function Ha(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Qn(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Qn(t.events,n[1]);if(i={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=Qn(t.events,n[2]),c=Qn(t.events,n[3]),d={type:s,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,m=n[3]-n[2]-1;e.add(g,m,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return a!==void 0&&(i.end=Object.assign({},Qn(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function eT(e,t,n,r,a){const i=[],o=Qn(t.events,n);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function Qn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const i6={name:"tasklistCheck",tokenize:s6};function o6(){return{text:{91:i6}}}function s6(e,t,n){const r=this;return a;function a(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return Ce(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return re(l)?t(l):pe(l)?e.check({tokenize:l6},t,n)(l):n(l)}}function l6(e,t,n){return ve(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function u6(e){return HR([DW(),VW(),JW(e),n6(),o6()])}const c6={};function d6(e){const t=this,n=e||c6,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(u6(n)),i.push(_W()),o.push(NW(n))}const p6=ge.create(uD),f6=ge.create(dD),Q0=({isExpanded:e,onClick:t,className:n,iconClassName:r,disabled:a})=>w.jsxs(en,{children:[w.jsx(tn,{onClick:t,className:n,disabled:a,children:w.jsx(nn,{mode:"wait",initial:!1,children:e?w.jsx(p6,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:te("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"collapsed"):w.jsx(f6,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:te("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"expanded")})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:e?"Collapse message":"Expand message"})})]}),tT={'code[class*="language-"]':{background:"black",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"black",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"16px 20px",overflow:"auto",borderRadius:"0 0 8px 8px"},'code[class*="language-"]::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"]::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'code[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},'pre[class*="language-"] *::selection':{background:"hsl(220, 13%, 28%)",color:"inherit",textShadow:"none"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},prolog:{color:"hsl(220, 10%, 40%)"},cdata:{color:"hsl(220, 10%, 40%)"},doctype:{color:"hsl(220, 14%, 71%)"},punctuation:{color:"hsl(220, 14%, 71%)"},entity:{color:"hsl(220, 14%, 71%)",cursor:"help"},"attr-name":{color:"hsl(29, 54%, 61%)"},"class-name":{color:"hsl(29, 54%, 61%)"},boolean:{color:"hsl(29, 54%, 61%)"},constant:{color:"hsl(29, 54%, 61%)"},number:{color:"hsl(29, 54%, 61%)"},atrule:{color:"hsl(29, 54%, 61%)"},keyword:{color:"hsl(286, 60%, 67%)"},property:{color:"hsl(355, 65%, 65%)"},tag:{color:"hsl(355, 65%, 65%)"},symbol:{color:"hsl(355, 65%, 65%)"},deleted:{color:"hsl(355, 65%, 65%)"},important:{color:"hsl(355, 65%, 65%)"},selector:{color:"#00c08b"},string:{color:"#00c08b"},char:{color:"#00c08b"},builtin:{color:"#00c08b"},inserted:{color:"#00c08b"},regex:{color:"#00c08b"},"attr-value":{color:"#00c08b"},"attr-value > .token.punctuation":{color:"#00c08b"},variable:{color:"#58A6FF"},operator:{color:"#58A6FF"},function:{color:"#58A6FF"},url:{color:"hsl(187, 47%, 55%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(220, 14%, 71%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(220, 14%, 71%)"},".language-css .token.selector":{color:"hsl(355, 65%, 65%)"},".language-css .token.property":{color:"hsl(220, 14%, 71%)"},".language-css .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.function":{color:"hsl(187, 47%, 55%)"},".language-css .token.url > .token.string.url":{color:"#00c08b"},".language-css .token.important":{color:"hsl(286, 60%, 67%)"},".language-css .token.atrule .token.rule":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.operator":{color:"hsl(286, 60%, 67%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(5, 48%, 51%)"},".language-json .token.operator":{color:"hsl(220, 14%, 71%)"},".language-json .token.null.keyword":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.url":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.operator":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(220, 14%, 71%)"},".language-markdown .token.url > .token.content":{color:"#58A6FF"},".language-markdown .token.url > .token.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.url-reference.url":{color:"hsl(187, 47%, 55%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(220, 10%, 40%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"#00c08b"},".language-markdown .token.bold .token.content":{color:"hsl(29, 54%, 61%)"},".language-markdown .token.italic .token.content":{color:"hsl(286, 60%, 67%)"},".language-markdown .token.strike .token.content":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.list.punctuation":{color:"hsl(355, 65%, 65%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(355, 65%, 65%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},"token.tab:not(:empty):before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.cr:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.lf:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"token.space:before":{color:"hsla(220, 14%, 71%, 0.15)",textShadow:"none"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 9%, 55%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(220, 13%, 28%)",color:"hsl(220, 14%, 71%)"},".line-highlight.line-highlight":{background:"hsla(220, 100%, 80%, 0.04)"},".line-highlight.line-highlight:before":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(220, 13%, 26%)",color:"hsl(220, 14%, 71%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(220, 100%, 80%, 0.04)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".command-line .command-line-prompt":{borderRightColor:"hsla(220, 14%, 71%, 0.15)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(220, 14%, 45%)"},".command-line .command-line-prompt > span:before":{color:"hsl(220, 14%, 45%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(355, 65%, 65%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"#00c08b"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"#58A6FF"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(286, 60%, 67%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(286, 60%, 67%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(224, 13%, 17%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(224, 13%, 17%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(224, 13%, 17%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(224, 13%, 17%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(219, 13%, 22%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(219, 13%, 22%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(220, 14%, 71%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(220, 14%, 71%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(220, 14%, 71%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(220, 14%, 71%)"}},nT=({children:e,className:t})=>w.jsx("div",{className:te("flex flex-col text-[1.5ch] rounded-lg","[&_*]:scrollbar [&_*]:scrollbar-w-1 [&_*]:scrollbar-h-1 [&_*]:scrollbar-thumb-rounded-full [&_*]:scrollbar-track-transparent [&_*]:scrollbar-thumb-telnyx-dark-cream",t),children:e}),rT=({children:e})=>w.jsx("div",{className:"flex justify-between bg-telnyx-gray-hover-light rounded-t-lg py-1.5 px-4",children:e}),g6=e=>w.jsx("a",{href:e.src,target:"_blank",rel:"noopener noreferrer",children:w.jsx("img",{className:"w-full my-2",alt:e.alt,src:e.src})}),m6=e=>w.jsxs("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-telnyx-blue no-underline",children:[w.jsx("span",{className:"underline",children:e.children}),w.jsx("span",{children:"↗"})]}),aT=({children:e})=>w.jsx("p",{className:"text-black pt-2 font-bold",children:e}),h6=({children:e})=>w.jsx("p",{className:"text-base",children:e}),b6=e=>({img:g6,h1:aT,h2:aT,a:m6,p:h6,code:O.memo(({inline:t,className:n,children:r,...a})=>{const i=J(v=>v.numMessagesExpanded),o=J(v=>v.setNumMessagesExpanded),s=e==="complete",[l,u]=O.useState(Bt.COLLAPSED),c=O.useRef(null),d=/language-(\w+)/.exec(n||""),p=String(r).replace(/\n$/,""),f=()=>{u(Bt.EXPANDED),o(i+1),document.body.style.overflow="hidden"},g=()=>{u(Bt.COLLAPSED),o(i-1),document.body.style.overflow="auto"},m=i>0;return!t&&d?w.jsxs(w.Fragment,{children:[w.jsx(nn,{children:l===Bt.EXPANDED&&w.jsxs(Lg,{targetMountContainer:document.body,children:[w.jsx(ge.div,{initial:!1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 h-full w-full z-[5000]",onClick:f},"expanded-code-background"),w.jsx(ge.div,{initial:!1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"fixed inset-0 z-[5000] grid p-4 place-items-center",onClick:v=>v.stopPropagation(),children:w.jsx(ge.div,{className:te("w-[60%] max-w-full max-h-[90%] rounded-lg overflow-hidden"),ref:c,children:w.jsxs(nT,{className:"overflow-y-hidden",children:[w.jsxs(rT,{children:[w.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center bg-gray-800/50 rounded-md px-1",children:d&&d[1]||"Unknown"}),s&&w.jsx(iT,{isExpanded:l===Bt.EXPANDED,handleCollapse:g,handleExpand:f,textToCopy:p})]}),w.jsx("div",{className:"bg-black pl-0.5 pr-1 py-1",children:w.jsx("div",{className:te("overflow-y-auto overflow-x-hidden max-h-[60vh] pb-1","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent scrollbar-thumb-telnyx-dark-cream","[&_*]:scrollbar [&_*]:scrollbar-h-1 [&_*]:scrollbar-thumb-rounded-full [&_*]:scrollbar-track-transparent [&_*]:scrollbar-thumb-telnyx-dark-cream","bg-black text-telnyx-cream"),children:w.jsx(Lf,{...a,children:String(r).replace(/\n$/,""),style:tT,language:s?d[1]:"text/plain",PreTag:"div",showLineNumbers:!0,wrapLongLines:!0})})})]})})},"expanded-code")]})}),w.jsxs(nT,{children:[w.jsxs(rT,{children:[w.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center",children:d&&d[1]||"Unknown"}),s&&w.jsx(iT,{isExpanded:l===Bt.EXPANDED,handleExpand:m?void 0:f,handleCollapse:g,textToCopy:p})]}),w.jsx("div",{className:"bg-black pl-0.5 pr-1 pb-1 rounded-b-lg mb-4",children:w.jsx(Lf,{...a,children:String(r).replace(/\n$/,""),style:tT,language:s?d[1]:"text/plain",PreTag:"div",wrapLongLines:!0})})]})]}):w.jsx("code",{...a,className:te("bg-transparent p-1",n),children:r})})}),y6=O.memo(({children:e,state:t})=>w.jsx("div",{className:te("w-full","overflow-x-auto overflow-y-hidden","scrollbar scrollbar-h-1 scrollbar-thumb-rounded-full scrollbar-thumb-gray-800/50 scrollbar-track-transparent hover:scrollbar-thumb-gray-800/70"),children:w.jsx(mz,{components:b6(t),remarkPlugins:[d6],children:e})})),iT=({isExpanded:e,handleExpand:t,handleCollapse:n,textToCopy:r})=>w.jsxs("div",{className:"flex",children:[w.jsx(Og,{textToCopy:r,className:te("bg-transparent border-0 py-1 px-1.5","hover:rounded-md hover:cursor-pointer hover:bg-gray-800/50"),iconClassName:"size-5 text-white hover:text-white"}),n&&t&&w.jsx(Q0,{isExpanded:e,onClick:e?n:t,className:te("text-white bg-transparent border-0 py-1 px-1.5","hover:rounded-md hover:cursor-pointer hover:bg-gray-800/50"),iconClassName:"size-5 text-white hover:text-white"})]}),v6=ge.create(xk),E6={pressed:{scale:.8},hovered:{scale:1.1},idle:{scale:1},transition:{duration:.15}},w6=O.memo(({onClick:e,className:t,iconClassName:n})=>w.jsxs(en,{children:[w.jsx(tn,{onClick:e,className:te("rounded-md text-black bg-telnyx-green/30 p-1 hover:bg-telnyx-green/60 hover:cursor-pointer",t),"aria-label":"Collapse message",children:w.jsx(nn,{children:w.jsx(v6,{initial:"idle",whileHover:"hovered",whileTap:"pressed",animate:"idle",exit:"idle",variants:E6,className:te("size-5 focus:outline-none focus:ring-0",n)},"close")})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Collapse message"})})]})),S6=({variant:e,textToCopy:t,onCloseClick:n})=>w.jsxs("div",{className:"flex justify-between items-center border-b-2 border-black",children:[w.jsx("h2",{className:"text-xl font-pp-formula text-stone-700",children:e==="bot"?"AI Assistant":"You"}),w.jsxs("div",{className:"flex items-center gap-1 pb-2",children:[w.jsx(Og,{textToCopy:t,className:te("rounded-md p-1 hover:bg-telnyx-green/60 hover:cursor-pointer bg-telnyx-green/30 border-0","flex items-center justify-center","h-fit"),iconClassName:"size-5 text-black"}),w.jsx(w6,{onClick:n,className:te("border-0","flex items-center justify-center","h-fit")})]})]}),x6=({feedbackId:e})=>{const t=J(i=>i.apiService),[n,r]=O.useState(null),a=O.useCallback(i=>async()=>{r(i),await t.sendFeedback({messageId:e,type:i})},[r,t]);return w.jsxs("div",{className:"flex items-center gap-1",children:[w.jsxs(en,{children:[w.jsx(tn,{onClick:a(Kn.POSITIVE),className:te("text-stone-600 cursor-pointer hover:text-stone-900",n===Kn.POSITIVE&&"text-telnyx-green hover:text-telnyx-green/80"),children:n===Kn.POSITIVE?w.jsx(ZP,{className:"size-4"}):w.jsx(vD,{className:"size-4"})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Helpful"})})]}),w.jsxs(en,{children:[w.jsx(tn,{onClick:a(Kn.NEGATIVE),className:te("text-stone-600 cursor-pointer hover:text-stone-900",n===Kn.NEGATIVE&&"text-red-600 hover:text-red-700"),children:n===Kn.NEGATIVE?w.jsx(KP,{className:"size-4"}):w.jsx(bD,{className:"size-4"})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Not helpful"})})]})]})},T6=ji(["relative w-fit p-4 max-w-[95%]","after:absolute after:content-[''] after:w-4 after:h-2 after:-bottom-0.5"],{variants:{variant:{bot:["bg-telnyx-dark-cream text-stone-800 rounded-r-md rounded-tl-md justify-self-start","after:left-0 after:bg-telnyx-dark-cream after:-skew-y-[30deg] after:rounded-bl-sm","[&_a]:underline [&_a]:text-indigo-600 hover:[&_a]:text-indigo-800","[&_pre]:mt-4"],user:["bg-telnyx-green rounded-l-md rounded-tr-md justify-self-end","after:right-0 after:bg-telnyx-green after:skew-y-[30deg] after:rounded-br-sm"]},state:{complete:"",loading:"rounded-bl-md animate-shadow-grow border-[0.5px] border-telnyx-green/60 ring-1 ring-inset ring-telnyx-green/60 before:hidden! after:hidden! bg-white/30",streaming:"",error:["max-w-full after:hidden! rounded-md","bg-red-100/70!","text-red-600 text-justify text-sm border-2 border-red-400"]}},defaultVariants:{variant:"bot",state:"complete"}}),A6=({variant:e,state:t})=>({initial:{opacity:t==="loading"?.7:0,x:e==="bot"?0:48,y:e==="bot"?0:24,scale:t==="loading"?.9:.6},animate:{opacity:1,x:0,y:0,scale:1,transition:{duration:.3}},exit:{opacity:0,x:e==="bot"?0:48,y:e==="bot"?0:24,scale:t==="loading"?.9:.6,transition:{duration:.2}}}),k6=({variant:e,state:t,children:n})=>w.jsx(ge.div,{initial:"initial",animate:"animate",exit:"exit",variants:A6({variant:e,state:t}),className:T6({variant:e,state:t}),children:n}),R6=ji(["max-w-full max-h-[90vh] overflow-y-auto p-6 space-y-2","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent"],{variants:{variant:{bot:["scrollbar-thumb-telnyx-green scrollbar-track-telnyx-dark-cream","[&_a]:underline [&_a]:text-indigo-600 hover:[&_a]:text-indigo-800","[&_pre]:mt-4!"],user:["scrollbar-thumb-telnyx-dark-cream scrollbar-track-telnyx-green"]}},defaultVariants:{variant:"bot"}}),I6=ji(["flex items-center mb-2 gap-1"],{variants:{variant:{bot:["justify-self-start"],user:["justify-self-end flex-row-reverse"]}},defaultVariants:{variant:"bot"}}),oT=O.memo(({variant:e,children:t,state:n,handleRetry:r,isFirstMessage:a,timestamp:i,feedbackId:o})=>{const s=J(b=>b.endpoint),l=WL(i),u=J(b=>b.numMessagesExpanded),c=J(b=>b.setNumMessagesExpanded),d=J(b=>b.botState),[p,f]=O.useState(Bt.COLLAPSED),g=O.useRef(null),m=O.useCallback(()=>{f(Bt.EXPANDED),c(u+1),document.body.style.overflow="hidden"},[u,c,f]),v=O.useCallback(()=>{f(Bt.COLLAPSED),c(u-1),document.body.style.overflow="auto"},[u,c,f]),h=()=>{if(n==="streaming"||n==="complete")return w.jsx(y6,{state:n,children:t});if(n==="error")return w.jsxs("div",{className:"flex flex-col gap-2",children:[w.jsx("p",{children:t}),d==="retrying"&&w.jsx(_6,{}),d==="error"&&w.jsx(C6,{onClick:r})]});if(n==="loading")return s===we.AIDA?w.jsx(a2,{isLoaded:!1,progressMessage:t},`loading-${t}`):w.jsx("div",{className:"flex items-center gap-3",children:w.jsx(e2,{size:24,spokeWidth:2,animationDuration:4})})};return w.jsxs(w.Fragment,{children:[w.jsx(nn,{mode:"wait",children:p===Bt.EXPANDED&&w.jsxs(Lg,{targetMountContainer:document.body,children:[w.jsx(ge.div,{initial:!1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/60 h-full w-full z-[5000]",onClick:m},"expanded-message-background"),w.jsx(ge.div,{initial:!1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"fixed inset-0 z-[5000] grid place-items-center p-4",onClick:b=>b.stopPropagation(),children:w.jsx("div",{ref:g,className:te("w-[60%] max-w-full bg-transparent rounded-lg p-2",e==="bot"?"bg-telnyx-dark-cream":"bg-telnyx-green"),children:w.jsxs("div",{className:R6({variant:e}),children:[w.jsx(S6,{variant:e,textToCopy:t,onCloseClick:v}),h()]})})},"expanded-message")]})}),w.jsx(k6,{variant:e,state:n,children:h()}),w.jsxs("div",{className:I6({variant:e}),children:[w.jsx("span",{className:te("text-stone-600 text-sm",e==="bot"?"mr-1":"ml-1"),children:l}),!a&&n==="complete"&&w.jsxs(w.Fragment,{children:[w.jsx(Q0,{onClick:m,isExpanded:p===Bt.EXPANDED}),w.jsx(Og,{textToCopy:t}),!!o&&w.jsx(x6,{feedbackId:o})]})]})]})}),C6=({onClick:e})=>w.jsx("span",{className:"flex w-full justify-center text-sm",children:w.jsx("button",{className:te("py-1.5 px-4 shadow-sm rounded-full","text-xs text-white ","bg-red-600 hover:bg-red-700","hover:cursor-pointer hover:scale-105 transition-all duration-300 active:scale-95"),onClick:e,children:"Retry"})}),_6=()=>w.jsx("div",{className:"flex w-full justify-center text-sm",children:w.jsxs("span",{className:"text-xs text-white bg-red-600 rounded-full p-1.5 flex items-center gap-1",children:["Retrying",w.jsx(wk,{className:"size-4 animate-spin"})]})}),eI=O.forwardRef((e,t)=>w.jsx("svg",{viewBox:"0 0 160 160",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,...e,children:w.jsx("path",{d:"M0 68.5714C0 30.5714 30.5714 0 68.5714 0H91.4286C129.429 0 160 30.5714 160 68.5714V160H68.5714C30.5714 160 0 129.429 0 91.4286V68.5714Z",fill:"black"})}));eI.displayName="RCSIcon";const Le={TOP_LEFT:"top-left",TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left"},_e=Le,ye={INSIDE:"inside",OUTSIDE:"outside"},N6={[_e.TOP_LEFT]:{[ye.INSIDE]:Le.TOP_LEFT,[ye.OUTSIDE]:Le.BOTTOM_RIGHT},[_e.TOP]:{[ye.INSIDE]:Le.TOP,[ye.OUTSIDE]:Le.BOTTOM},[_e.TOP_RIGHT]:{[ye.INSIDE]:Le.TOP_RIGHT,[ye.OUTSIDE]:Le.BOTTOM_LEFT},[_e.RIGHT]:{[ye.INSIDE]:Le.RIGHT,[ye.OUTSIDE]:Le.LEFT},[_e.BOTTOM_RIGHT]:{[ye.INSIDE]:Le.BOTTOM_RIGHT,[ye.OUTSIDE]:Le.TOP_LEFT},[_e.BOTTOM]:{[ye.INSIDE]:Le.BOTTOM,[ye.OUTSIDE]:Le.TOP},[_e.BOTTOM_LEFT]:{[ye.INSIDE]:Le.BOTTOM_LEFT,[ye.OUTSIDE]:Le.TOP_RIGHT},[_e.LEFT]:{[ye.INSIDE]:Le.LEFT,[ye.OUTSIDE]:Le.RIGHT}},Qr={CUSTOM:"custom",DEFAULT:"default"},O6={[Mt.OPEN]:({numMessagesExpanded:e,position:t,isCustomMounted:n})=>{const r=n?0:-28,a=n?0:-28,[i,o]=sT(t,r,a);return{opacity:1,clipPath:`circle(${e===0?768:4320}px at calc(${i}) calc(${o}))`,transition:{type:"spring",stiffness:30,restDelta:5}}},[Mt.CLOSED]:({position:e,isCustomMounted:t})=>{const n=t?0:16,r=t?0:-28,a=t?0:-28,[i,o]=sT(e,r,a);return{clipPath:`circle(${n}px at calc(${i}) calc(${o}))`,transition:{delay:.1,type:"spring",stiffness:900,damping:160}}}};function sT(e,t=0,n=0){const r=t>0?"+":"-",a=n>0?"+":"-",i=Math.abs(t),o=Math.abs(n);switch(e){case Le.TOP_LEFT:return[`0% ${r} ${i}px`,`0% ${a} ${o}px`];case Le.TOP:return[`50% ${r} ${i}px`,`0% ${a} ${o}px`];case Le.TOP_RIGHT:return[`100% ${r} ${i}px`,`0% ${a} ${o}px`];case Le.RIGHT:return[`100% ${r} ${i}px`,`50% ${a} ${o}px`];case Le.BOTTOM_RIGHT:return[`100% ${r} ${i}px`,`100% ${a} ${o}px`];case Le.BOTTOM:return[`50% ${r} ${i}px`,`100% ${a} ${o}px`];case Le.BOTTOM_LEFT:return[`0% ${r} ${i}px`,`100% ${a} ${o}px`];case Le.LEFT:return[`0% ${r} ${i}px`,`50% ${a} ${o}px`]}}const L6=ji("rounded-xl bg-black shadow-lg",{variants:{mountType:{[Qr.CUSTOM]:"absolute",[Qr.DEFAULT]:"fixed bottom-4! right-4!"},mountPositionAndDirection:{[`${_e.TOP_LEFT}-${ye.INSIDE}`]:"top-0 left-0",[`${_e.TOP_LEFT}-${ye.OUTSIDE}`]:"bottom-full right-full",[`${_e.TOP}-${ye.INSIDE}`]:"top-0 left-1/2 -translate-x-1/2",[`${_e.TOP}-${ye.OUTSIDE}`]:"bottom-full left-1/2 -translate-x-1/2",[`${_e.TOP_RIGHT}-${ye.INSIDE}`]:"top-0 right-0",[`${_e.TOP_RIGHT}-${ye.OUTSIDE}`]:"bottom-full left-full",[`${_e.RIGHT}-${ye.INSIDE}`]:"top-1/2 -translate-y-1/2 right-0 ",[`${_e.RIGHT}-${ye.OUTSIDE}`]:"top-1/2 -translate-y-1/2 left-full",[`${_e.BOTTOM_RIGHT}-${ye.INSIDE}`]:"bottom-0 right-0",[`${_e.BOTTOM_RIGHT}-${ye.OUTSIDE}`]:"top-full left-full",[`${_e.BOTTOM}-${ye.INSIDE}`]:"bottom-0 left-1/2 -translate-x-1/2",[`${_e.BOTTOM}-${ye.OUTSIDE}`]:"top-full left-1/2 -translate-x-1/2",[`${_e.BOTTOM_LEFT}-${ye.INSIDE}`]:"bottom-0 left-0",[`${_e.BOTTOM_LEFT}-${ye.OUTSIDE}`]:"top-full right-full",[`${_e.LEFT}-${ye.INSIDE}`]:"top-1/2 -translate-y-1/2 left-0",[`${_e.LEFT}-${ye.OUTSIDE}`]:"top-1/2 -translate-y-1/2 right-full"}},defaultVariants:{mountPositionAndDirection:`${_e.BOTTOM_RIGHT}-${ye.INSIDE}`,mountType:Qr.DEFAULT}}),D6={[dt.INITIAL]:{height:"78%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px"},[dt.USER_HAS_TYPED]:{height:"94%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"16px",borderTopRightRadius:"16px"}},M6={[dt.INITIAL]:{height:"22%"},[dt.USER_HAS_TYPED]:{height:"6%"}},P6=({chatAPIUrl:e=mt.CHAT_API_URL,flowAPIUrl:t=mt.FLOW_API_URL,flowApiKey:n,feedbackAPIUrl:r=mt.FEEDBACK_API_URL,user:a,onHelpAction:i,open:o,setOpen:s,placeholders:l=mt.DEFAULT_PLACEHOLDERS,mountPosition:u=_e.BOTTOM_RIGHT,mountDirection:c=ye.INSIDE,offsetX:d=0,offsetY:p=0,icon:f=eI})=>{const g=J(U=>U.endpoint),m=J(U=>U.setUser),v=J(U=>U.setOnHelpAction),h=J(U=>U.setChatAPIUrl),b=J(U=>U.setFlowAPIUrl),y=J(U=>U.setFlowApiKey),S=J(U=>U.setFeedbackAPIUrl),x=J(U=>U.setPlaceholders),E=J(U=>U.question),T=J(U=>U.setQuestion),k=J(U=>U.messages),C=J(U=>U.dispatchMessage),I=J(U=>U.widgetVisualState),D=J(U=>U.chatVisualState),B=J(U=>U.setChatVisualState),P=J(U=>U.numMessagesExpanded),F=J(U=>U.setSetCustomOpen),z=J(U=>U.openWidget),H=J(U=>U.closeWidget),G=I===Mt.OPEN,L=s?Qr.CUSTOM:Qr.DEFAULT,$=`${u}-${c}`,R=N6[u][c],Q=!!s,ne=J(U=>U.botState),A=J(U=>U.setBotState),Y=J(U=>U.numRetries),oe=J(U=>U.setNumRetries),ae=J(U=>U.retryTimeoutId),ee=J(U=>U.setRetryTimeoutId),de=J(U=>U.chatStartTimestamp),he=Jp[g].firstMessage,{chat:Ee,lastMessage:xe}=eD(),[Ge,qe]=O.useState(!0),Ht=O.useRef(null),Xe=O.useRef(null),Re=O.useRef(null),Ct=tD(Re),Ze=O.useRef(`telnyx-widget-fonts-${Math.random().toString(36).substring(2,9)}`);O.useEffect(()=>{const U=Ze.current;if(U){if(!document.getElementById(U)){const Te=document.createElement("style");Te.id=U,Te.textContent=nD,document.head.appendChild(Te)}return()=>{const Te=document.getElementById(U);Te&&Te.remove()}}},[Ze.current]),O.useEffect(()=>{if(!a){console.error("User info is required. Please provide a user object.");return}if(!a.id){console.error("User ID is required.");return}m(a)},[a,m]),O.useEffect(()=>{l.length>0&&x(l)},[l,x]),O.useEffect(()=>{i!==void 0&&v(i)},[i,v]),O.useEffect(()=>{e&&h(e)},[e,h]),O.useEffect(()=>{t&&b(t)},[t,b]),O.useEffect(()=>{y(n||null)},[n,y]),O.useEffect(()=>{r&&S(r)},[r,S]),O.useEffect(()=>{o!==void 0&&(o?z():H())},[o,z,H]),O.useEffect(()=>{s!==void 0&&F(s)},[s,F]),O.useEffect(()=>{var U;G&&((U=Xe.current)==null||U.focus())},[G]);const Ve=O.useCallback(()=>{const U=k[k.length-2];if(U.type==="user"&&U.message.length>0){T(U.message),A("retrying");const Te=setTimeout(async()=>{try{C({type:Ae.DELETE_LAST_MESSAGE_PAIR,payload:null}),oe(Y+1),await Ee(U.message)}catch(M){console.error("[Retry Logic] Chat failed during retry:",M)}},mt.RETRY_INTERVAL);ee(Te)}},[k,Ee,Y,C]);O.useEffect(()=>{ne==="error"&&(ae||(Y<mt.MAX_RETRIES?Ve():Y>=mt.MAX_RETRIES&&console.error("[Retry Logic] Max retries reached, stopping retry attempts")))},[ne,Y,ae,Ve]),O.useEffect(()=>{const U=Re.current;U&&Ge&&(xe==null?void 0:xe.message.length)>0&&(U.scrollTop=U.scrollHeight)},[xe==null?void 0:xe.message.length,Ge]);const $e=O.useCallback(()=>{const U=Xe.current;U&&(U.style.height="auto",U.style.height=`${U.scrollHeight}px`)},[]),on=U=>{$e(),B(dt.USER_HAS_TYPED),T(U.target.value)};O.useEffect(()=>{k.length===0&&requestAnimationFrame($e)},[k.length,$e]);const ot=async()=>{T(""),requestAnimationFrame($e),await Ee(E);const U=Re.current;U&&U.scrollTo({top:U.scrollHeight,behavior:"smooth"})},sn=()=>{const U=Re.current;if(!U)return;const Te=Math.abs(U.scrollHeight-U.clientHeight-U.scrollTop)<=5;qe(Te)};return w.jsx(Lg,{ref:Ht,children:w.jsx(lR,{delayDuration:75,skipDelayDuration:0,children:w.jsxs(nn,{children:[w.jsxs(ge.div,{initial:!1,animate:I,variants:O6,custom:{numMessagesExpanded:P,position:R,isCustomMounted:Q},className:te(L6({mountType:L,mountPositionAndDirection:$})),style:{height:mt.WIDGET_HEIGHT,width:mt.WIDGET_WIDTH,translateX:d,translateY:p},children:[w.jsx(ge.div,{initial:!1,animate:D,className:"px-4 pt-4 bg-black rounded-t-xl",variants:M6,children:w.jsx(ZF,{className:"flex flex-col justify-between h-full pb-4",children:w.jsx(WP,{resetChatCustomHandler:$e})})}),w.jsxs(ge.div,{initial:!1,animate:D,className:te("flex flex-col justify-between bg-telnyx-cream rounded-b-xl rounded-t-3xl p-4 pb-1.5","relative overflow-hidden"),variants:D6,children:[Ct&&w.jsxs(w.Fragment,{children:[w.jsx(bf,{containerRef:Re,direction:"up"}),w.jsx(bf,{containerRef:Re,direction:"down"})]}),w.jsxs("div",{ref:Re,className:te("grid grid-cols-1 gap-2 content-start h-full overflow-y-auto overflow-x-hidden py-2 px-1 relative","scrollbar scrollbar-w-1 scrollbar-thumb-rounded-full scrollbar-track-transparent scrollbar-thumb-telnyx-dark-cream"),onScroll:sn,children:[w.jsx(oT,{variant:"bot",isFirstMessage:!0,state:"complete",timestamp:de,children:he},"bot-initial"),k.map(U=>w.jsx(oT,{variant:U.type,timestamp:U.timestamp,state:U.state,feedbackId:U.feedback_id,handleRetry:Ve,children:U.message},U.id))]}),w.jsx(_R,{ref:Xe,question:E,handleInput:on,handleSendMessage:ot})]})]},"widget-container"),!Q&&w.jsx(cF,{question:E,handleSendMessage:ot,triggerIcon:f},"chat-trigger-button")]})})})};exports.ChatWidget=P6;exports.Tooltip=en;exports.TooltipContent=Vt;exports.TooltipProvider=lR;exports.TooltipTrigger=tn;
2594
2538
  //# sourceMappingURL=index.cjs.map