@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 +11 -67
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +128 -183
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +11 -67
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
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(o1,{isPresent:t,childRef:i,sizeRef:o,children:N.cloneElement(e,{ref:i})})}const l1=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:o,anchorX:s,root:l})=>{const u=In(u1),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(s1,{isPresent:n,anchorX:s,root:l,children:e})),w.jsx(Da.Provider,{value:p,children:e})};function u1(){return new Map}function Ch(e=!0){const t=O.useContext(Da);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 $a=e=>e.key||"";function _h(e){const t=[];return O.Children.forEach(e,n=>{O.isValidElement(n)&&t.push(n)}),t}const Kt=({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]=Ch(o),d=O.useMemo(()=>_h(e),[e]),p=o&&!u?[]:d.map($a),f=O.useRef(!0),g=O.useRef(d),m=In(()=>new Map),[v,h]=O.useState(d),[b,y]=O.useState(d);La(()=>{f.current=!1,g.current=d;for(let E=0;E<b.length;E++){const T=$a(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=$a(k);p.includes(C)||(E.splice(T,0,k),S.push(k))}return i==="wait"&&S.length&&(E=S),y(_h(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(Qi);return w.jsx(w.Fragment,{children:b.map(E=>{const T=$a(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(l1,{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)})})},Nh=O.createContext({strict:!1}),Oh={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"]},tr={};for(const e in Oh)tr[e]={isEnabled:t=>Oh[e].some(n=>!!t[n])};function c1(e){for(const t in e)tr[t]={...tr[t],...e[t]}}const d1=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 Wa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||d1.has(e)}let Lh=e=>!Wa(e);function p1(e){typeof e=="function"&&(Lh=t=>t.startsWith("on")?!Wa(t):e(t))}try{p1(require("@emotion/is-prop-valid").default)}catch{}function f1(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(Lh(a)||n===!0&&Wa(a)||!t&&!Wa(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}const Ya=O.createContext({});function Ka(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function zr(e){return typeof e=="string"||Array.isArray(e)}const Wo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yo=["initial",...Wo];function Xa(e){return Ka(e.animate)||Yo.some(t=>zr(e[t]))}function Dh(e){return!!(Xa(e)||e.variants)}function g1(e,t){if(Xa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||zr(n)?n:void 0,animate:zr(r)?r:void 0}}return e.inherit!==!1?t:{}}function m1(e){const{initial:t,animate:n}=g1(e,O.useContext(Ya));return O.useMemo(()=>({initial:t,animate:n}),[Mh(t),Mh(n)])}function Mh(e){return Array.isArray(e)?e.join(" "):e}const Gr={};function h1(e){for(const t in e)Gr[t]=e[t],co(t)&&(Gr[t].isCSSVariable=!0)}function Ph(e,{layout:t,layoutId:n}){return Qn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Gr[e]||e==="opacity")}const b1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},y1=Jn.length;function v1(e,t,n){let r="",a=!0;for(let i=0;i<y1;i++){const o=Jn[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=yh(s,zo[o]);if(!l){a=!1;const c=b1[o]||o;r+=`${c}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}function Ko(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(Qn.has(l)){o=!0;continue}else if(co(l)){a[l]=u;continue}else{const c=yh(u,zo[l]);l.startsWith("origin")?(s=!0,i[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=v1(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 Xo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Fh(e,t,n){for(const r in t)!Ue(t[r])&&!Ph(r,n)&&(e[r]=t[r])}function E1({transformTemplate:e},t){return O.useMemo(()=>{const n=Xo();return Ko(n,t,e),Object.assign({},n.vars,n.style)},[t])}function w1(e,t){const n=e.style||{},r={};return Fh(r,n,e),Object.assign(r,E1(e,t)),r}function S1(e,t){const n={},r=w1(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 x1={offset:"stroke-dashoffset",array:"stroke-dasharray"},T1={offset:"strokeDashoffset",array:"strokeDasharray"};function A1(e,t,n=1,r=0,a=!0){e.pathLength=1;const i=a?x1:T1;e[i.offset]=oe.transform(-r);const o=oe.transform(t),s=oe.transform(n);e[i.array]=`${o} ${s}`}function Bh(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:i=1,pathOffset:o=0,...s},l,u,c){if(Ko(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&&A1(d,a,i,o,!1)}const Uh=()=>({...Xo(),attrs:{}}),jh=e=>typeof e=="string"&&e.toLowerCase()==="svg";function k1(e,t,n,r){const a=O.useMemo(()=>{const i=Uh();return Bh(i,t,jh(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Fh(i,e.style,e),a.style={...i,...a.style}}return a}const R1=["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 Zo(e){return typeof e!="string"||e.includes("-")?!1:!!(R1.indexOf(e)>-1||/[A-Z]/u.test(e))}function I1(e,t,n,{latestValues:r},a,i=!1){const s=(Zo(e)?k1:S1)(t,r,a,e),l=f1(t,typeof e=="string",i),u=e!==O.Fragment?{...l,...s,ref:n}:{},{children:c}=t,d=O.useMemo(()=>Ue(c)?c.get():c,[c]);return O.createElement(e,{...u,children:d})}function zh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Jo(e,t,n,r){if(typeof t=="function"){const[a,i]=zh(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]=zh(r);t=t(n!==void 0?n:e.custom,a,i)}return t}function Za(e){return Ue(e)?e.get():e}function C1({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:_1(n,r,a,e),renderState:t()}}function _1(e,t,n,r){const a={},i=r(e,{});for(const p in i)a[p]=Za(i[p]);let{initial:o,animate:s}=e;const l=Xa(e),u=Dh(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"&&!Ka(d)){const p=Array.isArray(d)?d:[d];for(let f=0;f<p.length;f++){const g=Jo(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 Gh=e=>(t,n)=>{const r=O.useContext(Ya),a=O.useContext(Da),i=()=>C1(e,t,r,a);return n?i():In(i)};function Qo(e,t,n){var i;const{style:r}=e,a={};for(const o in r)(Ue(r[o])||t.style&&Ue(t.style[o])||Ph(o,e)||((i=n==null?void 0:n.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(a[o]=r[o]);return a}const N1=Gh({scrapeMotionValuesFromProps:Qo,createRenderState:Xo});function qh(e,t,n){const r=Qo(e,t,n);for(const a in e)if(Ue(e[a])||Ue(t[a])){const i=Jn.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}const O1=Gh({scrapeMotionValuesFromProps:qh,createRenderState:Uh}),L1=Symbol.for("motionComponentSymbol");function nr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function D1(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):nr(n)&&(n.current=r))},[t])}const es=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vh="data-"+es("framerAppearId"),Hh=O.createContext({});function M1(e,t,n,r,a){var m,v;const{visualElement:i}=O.useContext(Ya),o=O.useContext(Nh),s=O.useContext(Da),l=O.useContext(Ha).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(Hh);c&&!c.projection&&a&&(c.type==="html"||c.type==="svg")&&P1(u.current,n,a,d);const p=O.useRef(!1);O.useInsertionEffect(()=>{c&&p.current&&c.update(n,s)});const f=n[Vh],g=O.useRef(!!f&&!((m=window.MotionHandoffIsComplete)!=null&&m.call(window,f))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,f)));return La(()=>{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 P1(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:$h(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!o||s&&nr(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function $h(e){if(e)return e.options.allowProjection!==!1?e.projection:$h(e.parent)}function ts(e,{forwardMotionProps:t=!1}={},n,r){n&&c1(n);const a=Zo(e)?O1:N1;function i(s,l){let u;const c={...O.useContext(Ha),...s,layoutId:F1(s)},{isStatic:d}=c,p=m1(s),f=a(s,d);if(!d&&eo){B1(c,n);const g=U1(c);u=g.MeasureLayout,p.visualElement=M1(e,f,c,r,g.ProjectionNode)}return w.jsxs(Ya.Provider,{value:p,children:[u&&p.visualElement?w.jsx(u,{visualElement:p.visualElement,...c}):null,I1(e,s,D1(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[L1]=e,o}function F1({layoutId:e}){const t=O.useContext(Qi).id;return t&&e!==void 0?t+"-"+e:e}function B1(e,t){const n=O.useContext(Nh).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?Yn(!1,r,"lazy-strict-mode"):ft(!1,r,"lazy-strict-mode")}}function U1(e){const{drag:t,layout:n}=tr;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 j1(e,t){if(typeof Proxy>"u")return ts;const n=new Map,r=(i,o)=>ts(i,o,e,t),a=(i,o)=>(process.env.NODE_ENV!=="production"&&Ma(!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,ts(o,void 0,e,t)),n.get(o))})}function Wh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function z1({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function G1(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 ns(e){return e===void 0||e===1}function rs({scale:e,scaleX:t,scaleY:n}){return!ns(e)||!ns(t)||!ns(n)}function Dn(e){return rs(e)||Yh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yh(e){return Kh(e.x)||Kh(e.y)}function Kh(e){return e&&e!=="0%"}function Ja(e,t,n){const r=e-n,a=t*r;return n+a}function Xh(e,t,n,r,a){return a!==void 0&&(e=Ja(e,a,r)),Ja(e,n,r)+t}function as(e,t=0,n=1,r,a){e.min=Xh(e.min,t,n,r,a),e.max=Xh(e.max,t,n,r,a)}function Zh(e,{x:t,y:n}){as(e.x,t.translate,t.scale,t.originPoint),as(e.y,n.translate,n.scale,n.originPoint)}const Jh=.999999999999,Qh=1.0000000000001;function q1(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&&ar(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Zh(e,o)),r&&Dn(i.latestValues)&&ar(e,i.latestValues))}t.x<Qh&&t.x>Jh&&(t.x=1),t.y<Qh&&t.y>Jh&&(t.y=1)}function rr(e,t){e.min=e.min+t,e.max=e.max+t}function eb(e,t,n,r,a=.5){const i=De(e.min,e.max,a);as(e,t,n,i,r)}function ar(e,t){eb(e.x,t.x,t.scaleX,t.scale,t.originX),eb(e.y,t.y,t.scaleY,t.scale,t.originY)}function tb(e,t){return Wh(G1(e.getBoundingClientRect(),t))}function V1(e,t,n){const r=tb(e,n),{scroll:a}=t;return a&&(rr(r.x,a.offset.x),rr(r.y,a.offset.y)),r}const nb=()=>({translate:0,scale:1,origin:0,originPoint:0}),ir=()=>({x:nb(),y:nb()}),rb=()=>({min:0,max:0}),Pe=()=>({x:rb(),y:rb()}),is={current:null},ab={current:!1};function H1(){if(ab.current=!0,!!eo)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>is.current=e.matches;e.addEventListener("change",t),t()}else is.current=!1}const qr=new WeakMap;function $1(e,t,n){for(const r in t){const a=t[r],i=n[r];if(Ue(a))e.addValue(r,a);else if(Ue(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 ib=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ob{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=Po,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=mt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,xe.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=Xa(n),this.isVariantNode=Dh(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&&Ue(f)&&f.set(l[p])}}mount(t){var n;this.current=t,qr.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)),ab.current||H1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:is.current,process.env.NODE_ENV!=="production"&&Ma(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(),Bt(this.notifyUpdate),Bt(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=Qn.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&xe.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 tr){const n=tr[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<ib.length;r++){const a=ib[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=$1(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"&&(gm(r)||hm(r))?r=parseFloat(r):!i1(r)&&yn.test(n)&&(r=bh(t,n)),this.setBaseTarget(t,Ue(r)?r.get():r)),Ue(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=Jo(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&&!Ue(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 ao),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Vo.render(this.render)}}class sb extends ob{constructor(){super(...arguments),this.KeyframeResolver=BC}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;Ue(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function lb(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 W1(e){return window.getComputedStyle(e)}class ub extends sb{constructor(){super(...arguments),this.type="html",this.renderInstance=lb}readValueFromInstance(t,n){var r;if(Qn.has(n))return(r=this.projection)!=null&&r.isProjecting?No(n):nC(t,n);{const a=W1(t),i=(co(n)?a.getPropertyValue(n):a[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return tb(t,n)}build(t,n,r){Ko(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Qo(t,n,r)}}const cb=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 Y1(e,t,n,r){lb(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(cb.has(a)?a:es(a),t.attrs[a])}class db extends sb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Pe}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qn.has(n)){const r=hh(n);return r&&r.default||0}return n=cb.has(n)?n:es(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return qh(t,n,r)}build(t,n,r){Bh(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){Y1(t,n,r,a)}mount(t){this.isSVGTag=jh(t.tagName),super.mount(t)}}const K1=(e,t)=>Zo(e)?new db(t):new ub(t,{allowProjection:e!==O.Fragment});function or(e,t,n){const r=e.getProps();return Jo(r,t,n!==void 0?n:r.custom,e)}const os=e=>Array.isArray(e);function X1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ut(n))}function Z1(e){return os(e)?e[e.length-1]||0:e}function J1(e,t){const n=or(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const o in i){const s=Z1(i[o]);X1(e,o,s)}}function Q1(e){return!!(Ue(e)&&e.add)}function ss(e,t){const n=e.getValue("willChange");if(Q1(n))return n.add(t);if(!n&&sn.WillChange){const r=new sn.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function pb(e){return e.props[Vh]}const e_=e=>e!==null;function t_(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(e_),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return a[i]}const n_={type:"spring",stiffness:500,damping:25,restSpeed:10},r_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),a_={type:"keyframes",duration:.8},i_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},o_=(e,{keyframes:t})=>t.length>2?a_:Qn.has(e)?e.startsWith("scale")?r_(t[1]):n_:i_;function s_({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 ls=(e,t,n,r={},a,i)=>o=>{const s=Uo(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-_t(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};s_(s)||Object.assign(c,o_(e,c)),c.duration&&(c.duration=_t(c.duration)),c.repeatDelay&&(c.repeatDelay=_t(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Bo(c),c.delay===0&&(d=!0)),(sn.instantAnimations||sn.skipAnimations)&&(d=!0,Bo(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const p=t_(c.keyframes,s);if(p!==void 0){xe.update(()=>{c.onUpdate(p),c.onComplete()});return}}return s.isSync?new Io(c):new TC(c)};function l_({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function us(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&&l_(u,c))continue;const f={delay:n,...Uo(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=pb(e);if(h){const b=window.MotionHandoffAnimation(h,c,xe);b!==null&&(f.startTime=b,m=!0)}}ss(e,c),d.start(ls(c,d,p,e.shouldReduceMotion&&dh.has(c)?{type:!1}:f,e,m));const v=d.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{xe.update(()=>{o&&J1(e,o)})}),l}function fb(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 cs(e,t,n={}){var l;const r=or(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(us(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:p}=a;return u_(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 u_(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(cs(l,t,{...o,delay:n+(typeof r=="function"?0:r)+fb(e.variantChildren,l,r,a,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function c_(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>cs(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=cs(e,t,n);else{const a=typeof t=="function"?or(e,t,n.custom):t;r=Promise.all(us(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function gb(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 d_=Yo.length;function mb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?mb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<d_;n++){const r=Yo[n],a=e.props[r];(zr(a)||a===!1)&&(t[r]=a)}return t}const p_=[...Wo].reverse(),f_=Wo.length;function g_(e){return t=>Promise.all(t.map(({animation:n,options:r})=>c_(e,n,r)))}function m_(e){let t=g_(e),n=hb(),r=!0;const a=l=>(u,c)=>{var p;const d=or(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=mb(e.parent)||{},d=[],p=new Set;let f={},g=1/0;for(let v=0;v<f_;v++){const h=p_[v],b=n[h],y=u[h]!==void 0?u[h]:c[h],S=zr(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||Ka(y)||typeof y=="boolean")continue;const T=h_(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;os(L)&&os($)?R=!gb(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=or($,G);if($.enteringChildren&&R){const{delayChildren:Q}=R.transition||{};L.delay=fb($.enteringChildren,e,Q)}}return{animation:G,options:L}}))}if(p.size){const v={};if(typeof u.initial!="boolean"){const h=or(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=hb(),r=!0}}}function h_(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!gb(t,e):!1}function Mn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hb(){return{animate:Mn(!0),whileInView:Mn(),whileHover:Mn(),whileTap:Mn(),whileDrag:Mn(),whileFocus:Mn(),exit:Mn()}}class En{constructor(t){this.isMounted=!1,this.node=t}update(){}}class b_ extends En{constructor(t){super(t),t.animationState||(t.animationState=m_(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ka(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 y_=0;class v_ extends En{constructor(){super(...arguments),this.id=y_++}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 E_={animation:{Feature:b_},exit:{Feature:v_}};function Vr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Hr(e){return{point:{x:e.pageX,y:e.pageY}}}const w_=e=>t=>Ho(t)&&e(t,Hr(t));function $r(e,t,n,r){return Vr(e,t,w_(n),r)}const bb=1e-4,S_=1-bb,x_=1+bb,yb=.01,T_=0-yb,A_=0+yb;function st(e){return e.max-e.min}function k_(e,t,n){return Math.abs(e-t)<=n}function vb(e,t,n,r=.5){e.origin=r,e.originPoint=De(t.min,t.max,e.origin),e.scale=st(n)/st(t),e.translate=De(n.min,n.max,e.origin)-e.originPoint,(e.scale>=S_&&e.scale<=x_||isNaN(e.scale))&&(e.scale=1),(e.translate>=T_&&e.translate<=A_||isNaN(e.translate))&&(e.translate=0)}function Wr(e,t,n,r){vb(e.x,t.x,n.x,r?r.originX:void 0),vb(e.y,t.y,n.y,r?r.originY:void 0)}function Eb(e,t,n){e.min=n.min+t.min,e.max=e.min+st(t)}function R_(e,t,n){Eb(e.x,t.x,n.x),Eb(e.y,t.y,n.y)}function wb(e,t,n){e.min=t.min-n.min,e.max=e.min+st(t)}function Yr(e,t,n){wb(e.x,t.x,n.x),wb(e.y,t.y,n.y)}function Nt(e){return[e("x"),e("y")]}const Sb=({current:e})=>e?e.ownerDocument.defaultView:null,xb=(e,t)=>Math.abs(e-t);function I_(e,t){const n=xb(e.x,t.x),r=xb(e.y,t.y);return Math.sqrt(n**2+r**2)}class Tb{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=ps(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,g=I_(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!g)return;const{point:m}=p,{timestamp:v}=We;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=ds(f,this.transformPagePoint),xe.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=ps(p.type==="pointercancel"?this.lastMoveEventInfo:ds(f,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,h),m&&m(p,h)},!Ho(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=a||window;const s=Hr(t),l=ds(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=We;this.history=[{...u,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,ps(l,this.history)),this.removeListeners=Lr($r(this.contextWindow,"pointermove",this.handlePointerMove),$r(this.contextWindow,"pointerup",this.handlePointerUp),$r(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bt(this.updatePoint)}}function ds(e,t){return t?{point:t(e.point)}:e}function Ab(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ps({point:e},t){return{point:e,delta:Ab(e,kb(t)),offset:Ab(e,C_(t)),velocity:__(t,.1)}}function C_(e){return e[0]}function kb(e){return e[e.length-1]}function __(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=kb(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>_t(t)));)n--;if(!r)return{x:0,y:0};const i=Wt(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 N_(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 Rb(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 O_(e,{top:t,left:n,bottom:r,right:a}){return{x:Rb(e.x,n,a),y:Rb(e.y,t,r)}}function Ib(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 L_(e,t){return{x:Ib(e.x,t.x),y:Ib(e.y,t.y)}}function D_(e,t){let n=.5;const r=st(e),a=st(t);return a>r?n=Cn(t.min,t.max-r,e.min):r>a&&(n=Cn(e.min,e.max-a,t.min)),$t(0,1,n)}function M_(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 fs=.35;function P_(e=fs){return e===!1?e=0:e===!0&&(e=fs),{x:Cb(e,"left","right"),y:Cb(e,"top","bottom")}}function Cb(e,t,n){return{min:_b(e,t),max:_b(e,n)}}function _b(e,t){return typeof e=="number"?e:e[t]||0}const F_=new WeakMap;class B_{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(Hr(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),Nt(h=>{let b=this.getAxisMotionValue(h).get()||0;if(Yt.test(b)){const{projection:y}=this.visualElement;if(y&&y.layout){const S=y.layout.layoutBox[h];S&&(b=st(S)*(parseFloat(b)/100))}}this.originPoint[h]=b}),m&&xe.postRender(()=>m(d,p)),ss(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=U_(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=()=>Nt(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 Tb(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Sb(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&&xe.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||!Qa(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=N_(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&&nr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=O_(r.layoutBox,t):this.constraints=!1,this.elastic=P_(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Nt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=M_(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!nr(t))return!1;const r=t.current;ft(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=V1(r,a.root,this.visualElement.getTransformPagePoint());let o=L_(a.layout.layoutBox,i);if(n){const s=n(z1(o));this.hasMutatedConstraints=!!s,s&&(o=Wh(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Nt(c=>{if(!Qa(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 ss(this.visualElement,t),r.start(ls(t,r,0,n,this.visualElement,!1))}stopAnimation(){Nt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Nt(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){Nt(n=>{const{drag:r}=this.getProps();if(!Qa(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(!nr(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};Nt(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const l=s.get();a[o]=D_({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(),Nt(o=>{if(!Qa(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;F_.set(this.visualElement,this);const t=this.visualElement.current,n=$r(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();nr(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()),xe.read(r);const o=Vr(window,"resize",()=>this.scalePositionWithinConstraints()),s=a.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Nt(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=fs,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:o,dragMomentum:s}}}function Qa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function U_(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class j_ extends En{constructor(t){super(t),this.removeGroupControls=gt,this.removeListeners=gt,this.controls=new B_(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Nb=e=>(t,n)=>{e&&xe.postRender(()=>e(t,n))};class z_ extends En{constructor(){super(...arguments),this.removePointerDownListener=gt}onPointerDown(t){this.session=new Tb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:Nb(t),onStart:Nb(n),onMove:r,onEnd:(i,o)=>{delete this.session,a&&xe.postRender(()=>a(i,o))}}}mount(){this.removePointerDownListener=$r(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 ei={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ob(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Kr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(oe.test(e))e=parseFloat(e);else return e;const n=Ob(e,t.target.x),r=Ob(e,t.target.y);return`${n}% ${r}%`}},G_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=yn.parse(e);if(a.length>5)return r;const i=yn.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 gs=!1;class q_ extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;h1(V_),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),gs&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ei.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,gs=!0,a||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||xe.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vo.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;gs=!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 Lb(e){const[t,n]=Ch(),r=O.useContext(Qi);return w.jsx(q_,{...e,layoutGroup:r,switchLayoutGroup:O.useContext(Hh),isPresent:t,safeToRemove:n})}const V_={borderRadius:{...Kr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kr,borderTopRightRadius:Kr,borderBottomLeftRadius:Kr,borderBottomRightRadius:Kr,boxShadow:G_};function Db(e,t,n){const r=Ue(e)?e:Ut(e);return r.start(ls("",r,t,n)),r.animation}const H_=(e,t)=>e.depth-t.depth;class $_{constructor(){this.children=[],this.isDirty=!1}add(t){to(this.children,t),this.isDirty=!0}remove(t){Or(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(H_),this.isDirty=!1,this.children.forEach(t)}}function W_(e,t){const n=mt.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(Bt(r),e(i-t))};return xe.setup(r,!0),()=>Bt(r)}const Mb=["TopLeft","TopRight","BottomLeft","BottomRight"],Y_=Mb.length,Pb=e=>typeof e=="string"?parseFloat(e):e,Fb=e=>typeof e=="number"||oe.test(e);function K_(e,t,n,r,a,i){a?(e.opacity=De(0,n.opacity??1,X_(r)),e.opacityExit=De(t.opacity??1,0,Z_(r))):i&&(e.opacity=De(t.opacity??1,n.opacity??1,r));for(let o=0;o<Y_;o++){const s=`border${Mb[o]}Radius`;let l=Bb(t,s),u=Bb(n,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Fb(l)===Fb(u)?(e[s]=Math.max(De(Pb(l),Pb(u),r),0),(Yt.test(u)||Yt.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||n.rotate)&&(e.rotate=De(t.rotate||0,n.rotate||0,r))}function Bb(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const X_=Ub(0,.5,Tm),Z_=Ub(.5,.95,gt);function Ub(e,t,n){return r=>r<e?0:r>t?1:n(Cn(e,t,r))}function jb(e,t){e.min=t.min,e.max=t.max}function Ot(e,t){jb(e.x,t.x),jb(e.y,t.y)}function zb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Gb(e,t,n,r,a){return e-=t,e=Ja(e,1/n,r),a!==void 0&&(e=Ja(e,1/a,r)),e}function J_(e,t=0,n=1,r=.5,a,i=e,o=e){if(Yt.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=Gb(e.min,t,n,s,a),e.max=Gb(e.max,t,n,s,a)}function qb(e,t,[n,r,a],i,o){J_(e,t[n],t[r],t[a],t.scale,i,o)}const Q_=["x","scaleX","originX"],eN=["y","scaleY","originY"];function Vb(e,t,n,r){qb(e.x,t,Q_,n?n.x:void 0,r?r.x:void 0),qb(e.y,t,eN,n?n.y:void 0,r?r.y:void 0)}function Hb(e){return e.translate===0&&e.scale===1}function $b(e){return Hb(e.x)&&Hb(e.y)}function Wb(e,t){return e.min===t.min&&e.max===t.max}function tN(e,t){return Wb(e.x,t.x)&&Wb(e.y,t.y)}function Yb(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Kb(e,t){return Yb(e.x,t.x)&&Yb(e.y,t.y)}function Xb(e){return st(e.x)/st(e.y)}function Zb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class nN{constructor(){this.members=[]}add(t){to(this.members,t),t.scheduleRender()}remove(t){if(Or(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 rN(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 ms=["","X","Y","Z"],aN=1e3;let iN=0;function hs(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Jb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",xe,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Jb(r)}function Qb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(o={},s=t==null?void 0:t()){this.id=iN++,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(lN),this.nodes.forEach(pN),this.nodes.forEach(fN),this.nodes.forEach(uN)},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 $_)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ao),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=Ga(o)&&!Ih(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;xe.read(()=>{d=window.innerWidth}),e(o,()=>{const f=window.innerWidth;f!==d&&(d=f,this.root.updateBlockedByResize=!0,c&&c(),c=W_(p,250),ei.hasAnimatedSinceResize&&(ei.hasAnimatedSinceResize=!1,this.nodes.forEach(ny)))})}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()||yN,{onLayoutAnimationStart:m,onLayoutAnimationComplete:v}=u.getProps(),h=!this.targetLayout||!Kb(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={...Uo(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||ny(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(),Bt(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(gN),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&&Jb(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(ey);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ty);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(dN),this.nodes.forEach(oN),this.nodes.forEach(sN)):this.nodes.forEach(ty),this.clearAllSnapshots();const s=mt.now();We.delta=$t(0,1e3/60,s-We.timestamp),We.timestamp=s,We.isProcessing=!0,uo.update.process(We),uo.preRender.process(We),uo.render.process(We),We.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cN),this.sharedNodes.forEach(mN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!st(this.snapshot.measuredBox.x)&&!st(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&&!$b(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(s||Dn(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)),vN(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(EN))){const{scroll:c}=this.root;c&&(rr(s.x,c.offset.x),rr(s.y,c.offset.y))}return s}removeElementScroll(o){var l;const s=Pe();if(Ot(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&&Ot(s,o),rr(s.x,d.offset.x),rr(s.y,d.offset.y))}return s}applyTransform(o,s=!1){const l=Pe();Ot(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&&ar(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Dn(c.latestValues)&&ar(l,c.latestValues)}return Dn(this.latestValues)&&ar(l,this.latestValues),l}removeTransform(o){const s=Pe();Ot(s,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Dn(u.latestValues))continue;rs(u.latestValues)&&u.updateSnapshot();const c=Pe(),d=u.measurePageBox();Ot(c,d),Vb(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Dn(this.latestValues)&&Vb(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!==We.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=We.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(),Yr(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Ot(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(),R_(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ot(this.target,this.layout.layoutBox),Zh(this.target,this.targetDelta)):Ot(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(),Yr(this.relativeTargetOrigin,this.target,f.target),Ot(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||rs(this.parent.latestValues)||Yh(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===We.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;Ot(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,p=this.treeScale.y;q1(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():(zb(this.prevProjectionDelta.x,this.projectionDelta.x),zb(this.prevProjectionDelta.y,this.projectionDelta.y)),Wr(this.projectionDelta,this.layoutCorrected,f,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==p||!Zb(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zb(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=ir(),this.projectionDelta=ir(),this.projectionDeltaWithTransform=ir()}setAnimationOrigin(o,s=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=ir();(!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(bN));this.animationProgress=0;let y;this.mixTargetDelta=S=>{const x=S/1e3;ry(d.x,o.x,x),ry(d.y,o.y,x),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Yr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),hN(this.relativeTarget,this.relativeTargetOrigin,p,x),y&&tN(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Pe()),Ot(y,this.relativeTarget)),m&&(this.animationValues=c,K_(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&&(Bt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xe.update(()=>{ei.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ut(0)),this.currentAnimation=Db(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(aN),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&&ly(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Pe();const d=st(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=st(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}Ot(s,l),ar(s,c),Wr(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new nN),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&&hs("z",o,u,this.animationValues);for(let c=0;c<ms.length;c++)hs(`rotate${ms[c]}`,o,u,this.animationValues),hs(`skew${ms[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=Za(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=Za(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!Dn(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=rN(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 Gr){if(c[g]===void 0)continue;const{correct:m,applyTo:v,isCSSVariable:h}=Gr[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?Za(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(ey),this.root.sharedNodes.clear()}}}function oN(e){e.updateLayout()}function sN(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"?Nt(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],f=st(p);p.min=r[d].min,p.max=p.min+f}):ly(i,t.layoutBox,r)&&Nt(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],f=st(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=ir();Wr(s,r,t.layoutBox);const l=ir();o?Wr(l,e.applyTransform(a,!0),t.measuredBox):Wr(l,r,t.layoutBox);const u=!$b(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();Yr(g,t.layoutBox,p.layoutBox);const m=Pe();Yr(m,r,f.layoutBox),Kb(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 lN(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 uN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cN(e){e.clearSnapshot()}function ey(e){e.clearMeasurements()}function ty(e){e.isLayoutDirty=!1}function dN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ny(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pN(e){e.resolveTargetDelta()}function fN(e){e.calcProjection()}function gN(e){e.resetSkewAndRotation()}function mN(e){e.removeLeadSnapshot()}function ry(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 ay(e,t,n,r){e.min=De(t.min,n.min,r),e.max=De(t.max,n.max,r)}function hN(e,t,n,r){ay(e.x,t.x,n.x,r),ay(e.y,t.y,n.y,r)}function bN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yN={duration:.45,ease:[.4,0,.1,1]},iy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),oy=iy("applewebkit/")&&!iy("chrome/")?Math.round:gt;function sy(e){e.min=oy(e.min),e.max=oy(e.max)}function vN(e){sy(e.x),sy(e.y)}function ly(e,t,n){return e==="position"||e==="preserve-aspect"&&!k_(Xb(t),Xb(n),.2)}function EN(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const wN=Qb({attachResizeListener:(e,t)=>Vr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),bs={current:void 0},uy=Qb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bs.current){const e=new wN({});e.mount(window),e.setOptions({layoutScroll:!0}),bs.current=e}return bs.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),SN={pan:{Feature:z_},drag:{Feature:j_,ProjectionNode:uy,MeasureLayout:Lb}};function cy(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&&xe.postRender(()=>i(t,Hr(t)))}class xN extends En{mount(){const{current:t}=this.node;t&&(this.unmount=GC(t,(n,r)=>(cy(this.node,r,"Start"),a=>cy(this.node,a,"End"))))}unmount(){}}class TN extends En{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=Lr(Vr(this.node.current,"focus",()=>this.onFocus()),Vr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dy(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&&xe.postRender(()=>i(t,Hr(t)))}class AN extends En{mount(){const{current:t}=this.node;t&&(this.unmount=$C(t,(n,r)=>(dy(this.node,r,"Start"),(a,{success:i})=>dy(this.node,a,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ys=new WeakMap,vs=new WeakMap,kN=e=>{const t=ys.get(e.target);t&&t(e)},RN=e=>{e.forEach(kN)};function IN({root:e,...t}){const n=e||document;vs.has(n)||vs.set(n,{});const r=vs.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(RN,{root:e,...t})),r[a]}function CN(e,t,n){const r=IN(t);return ys.set(e,n),r.observe(e),()=>{ys.delete(e),r.unobserve(e)}}const _N={some:0,all:1};class NN extends En{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:_N[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 CN(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(ON(t,n))&&this.startObserver()}unmount(){}}function ON({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const LN={...E_,...{inView:{Feature:NN},tap:{Feature:AN},focus:{Feature:TN},hover:{Feature:xN}},...SN,...{layout:{ProjectionNode:uy,MeasureLayout:Lb}}},fe=j1(LN,K1);function DN(e){return O.useEffect(()=>()=>e(),[])}function MN(e,t,n){O.useInsertionEffect(()=>e.on(t,n),[e,t,n])}const PN=50,py=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),FN=()=>({time:0,x:py(),y:py()}),BN={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function fy(e,t,n,r){const a=n[t],{length:i,position:o}=BN[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=Cn(0,a.scrollLength,a.current);const u=r-l;a.velocity=u>PN?0:io(a.current-s,u)}function UN(e,t,n){fy(e,"x",t,n),fy(e,"y",t,n),t.time=n}function jN(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(qo(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 Es={start:0,center:.5,end:1};function gy(e,t,n=0){let r=0;if(e in Es&&(e=Es[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 zN=[0,0];function GN(e,t,n,r){let a=Array.isArray(e)?e:zN,i=0,o=0;return typeof e=="number"?a=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?a=e.split(" "):a=[e,Es[e]?e:"0"]),i=gy(a[0],n,r),o=gy(a[1],t),i-o}const qN={All:[[0,0],[1,1]]},VN={x:0,y:0};function HN(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function $N(e,t,n){const{offset:r=qN.All}=n,{target:a=e,axis:i="y"}=n,o=i==="y"?"height":"width",s=a!==e?jN(a,e):VN,l=a===e?{width:e.scrollWidth,height:e.scrollHeight}:HN(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=GN(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=Ym(t[i].offset,Ao(r),{clamp:!1}),t[i].interpolatorOffsets=[...t[i].offset]),t[i].progress=$t(0,1,t[i].interpolate(t[i].current))}function WN(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&&Ma(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 YN(e,t,n,r={}){return{measure:a=>{WN(e,r.target,n),UN(e,n,a),(r.offset||r.target)&&$N(e,n,r)},notify:()=>t(n)}}const Xr=new WeakMap,my=new WeakMap,ws=new WeakMap,hy=e=>e===document.scrollingElement?window:e;function by(e,{container:t=document.scrollingElement,...n}={}){if(!t)return gt;let r=ws.get(t);r||(r=new Set,ws.set(t,r));const a=FN(),i=YN(t,e,a,n);if(r.add(i),!Xr.has(t)){const s=()=>{for(const d of r)d.measure(We.timestamp);xe.preUpdate(l)},l=()=>{for(const d of r)d.notify()},u=()=>xe.read(s);Xr.set(t,u);const c=hy(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&my.set(t,t1(t,u)),c.addEventListener("scroll",u,{passive:!0}),u()}const o=Xr.get(t);return xe.read(o,!1,!0),()=>{var u;Bt(o);const s=ws.get(t);if(!s||(s.delete(i),s.size))return;const l=Xr.get(t);Xr.delete(t),l&&(hy(t).removeEventListener("scroll",l),(u=my.get(t))==null||u(),window.removeEventListener("resize",l))}}const yy=new Map;function KN(e){const t={value:0},n=by(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function vy({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);const a=yy.get(t)??new Map;yy.set(t,a);const i=n.target??"self",o=a.get(i)??{},s=r+(n.offset??[]).join(",");return o[s]||(o[s]=!n.target&&rh()?new ScrollTimeline({source:t,axis:r}):KN({container:t,...n})),o[s]}function XN(e,t){const n=vy(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:r=>(r.pause(),Rh(a=>{r.time=r.duration*a},n))})}function ZN(e){return e.length===2}function JN(e,t){return ZN(e)?by(n=>{e(n[t.axis].progress,n)},t):Rh(e,vy(t))}function QN(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return gt;const a={axis:t,container:n,...r};return typeof e=="function"?JN(e,a):XN(e,a)}const eO=()=>({scrollX:Ut(0),scrollY:Ut(0),scrollXProgress:Ut(0),scrollYProgress:Ut(0)}),ti=e=>e?!e.current:!1;function tO({container:e,target:t,...n}={}){const r=In(eO),a=O.useRef(null),i=O.useRef(!1),o=O.useCallback(()=>(a.current=QN((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 La(()=>{if(i.current=!1,ti(e)||ti(t)){i.current=!0;return}else return o()},[o]),O.useEffect(()=>{if(i.current)return ft(!ti(e),"Container ref is defined but not hydrated","use-scroll-ref"),ft(!ti(t),"Target ref is defined but not hydrated","use-scroll-ref"),o()},[o]),r}function Ss(e){const t=In(()=>Ut(e)),{isStatic:n}=O.useContext(Ha);if(n){const[,r]=O.useState(e);O.useEffect(()=>t.on("change",r),[])}return t}function nO(e,t){const n=Ss(t()),r=()=>n.set(t());return r(),La(()=>{const a=()=>xe.preRender(r,!1,!0),i=e.map(o=>o.on("change",a));return()=>{i.forEach(o=>o()),Bt(r)}}),n}function Ey(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+=Ue(o)?o.get():o)}return a}return nO(t.filter(Ue),r)}function xs(e){return typeof e=="object"&&!Array.isArray(e)}function wy(e,t,n,r){return typeof e=="string"&&xs(t)?Go(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function rO(e,t,n){return e*(t+1)}function Sy(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 aO(e,t,n){for(let r=0;r<e.length;r++){const a=e[r];a.at>t&&a.at<n&&(Or(e,a),r--)}}function iO(e,t,n,r,a,i){aO(e,a,i);for(let o=0;o<t.length;o++)e.push({value:t[o],at:De(a,i,r[o]),easing:Im(n,o)})}function oO(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function sO(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const lO="easeInOut",uO=20;function cO(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,Sy(d,g.at,c,u));continue}let[m,v,h={}]=g;h.at!==void 0&&(d=Sy(d,h.at,c,u));let b=0;const y=(S,x,E,T=0,k=0)=>{const C=dO(S),{delay:I=0,times:D=Ao(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=Fo(B)?B:a==null?void 0:a[B||"keyframes"];if(R<=2&&Q){let se=100;if(R===2&&gO(C)){const de=C[1]-C[0];se=Math.abs(de)}const ae={...H};L!==void 0&&(ae.duration=_t(L));const te=Hm(ae,se,Q);G=te.ease,L=te.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&&Km(D,A),C.length===1&&C.unshift(null),P){ft(P<uO,"Repeat count too high, must be less than 20","repeat-count-high"),L=rO(L,P);const se=[...C],ae=[...D];G=Array.isArray(G)?[...G]:[G];const te=[...G];for(let de=0;de<P;de++){C.push(...se);for(let ye=0;ye<se.length;ye++)D.push(ae[ye]+(de+1)),G.push(ye===0?"linear":Im(te,ye-1))}oO(D,P)}const Y=ne+L;iO(E,C,G,D,ne,Y),b=Math.max($+L,b),p=Math.max(Y,p)};if(Ue(m)){const S=xy(m,s);y(v,h,Ty("default",S))}else{const S=wy(m,v,r,l),x=S.length;for(let E=0;E<x;E++){v=v,h=h;const T=S[E],k=xy(T,s);for(const C in v)y(v[C],pO(h,C),Ty(C,k),E,x)}}c=d,d+=b}return s.forEach((f,g)=>{for(const m in f){const v=f[m];v.sort(sO);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(Cn(0,p,E)),y.push(k||"easeOut")}b[0]!==0&&(b.unshift(0),h.unshift(h[0]),y.unshift(lO)),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 xy(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ty(e,t){return t[e]||(t[e]=[]),t[e]}function dO(e){return Array.isArray(e)?e:[e]}function pO(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const fO=e=>typeof e=="number",gO=e=>e.every(fO);function mO(e,t){return e in t}class hO extends ob{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(mO(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 bO(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ga(e)&&!Ih(e)?new db(t):new ub(t);n.mount(e),qr.set(e,n)}function yO(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new hO(t);n.mount(e),qr.set(e,n)}function vO(e,t){return Ue(e)||typeof e=="number"||typeof e=="string"&&!xs(t)}function Ay(e,t,n,r){const a=[];if(vO(e,t))a.push(Db(e,xs(t)&&t.default||t,n&&(n.default||n)));else{const i=wy(e,t,r),o=i.length;ft(!!o,"No valid elements provided.","no-valid-elements");for(let s=0;s<o;s++){const l=i[s];ft(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?bO:yO;qr.has(l)||u(l);const c=qr.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,o)),a.push(...us(c,{...t,transition:d},{}))}}return a}function EO(e,t,n){const r=[];return cO(e,t,n,{spring:Ur}).forEach(({keyframes:i,transition:o},s)=>{r.push(...Ay(s,i,o))}),r}function wO(e){return Array.isArray(e)&&e.some(Array.isArray)}function SO(e){function t(n,r,a){let i=[];wO(n)?i=EO(n,r,e):i=Ay(n,r,a,e);const o=new kC(i);return e&&(e.animations.push(o),o.finished.then(()=>{Or(e.animations,o)})),o}return t}function xO(){const e=In(()=>({current:null,animations:[]})),t=In(()=>SO(e));return DN(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}const ht={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 Ee=(e=>(e.FLOW="flow",e.AIDA="aida",e))(Ee||{});const Ts={[Ee.AIDA]:{label:"Heavy thinking",icon:"🧠",endpoint:Ee.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."},[Ee.FLOW]:{label:"Instant",icon:"⚡",endpoint:Ee.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."}},Ze=[];for(let e=0;e<256;++e)Ze.push((e+256).toString(16).slice(1));function ky(e,t=0){return(Ze[e[t+0]]+Ze[e[t+1]]+Ze[e[t+2]]+Ze[e[t+3]]+"-"+Ze[e[t+4]]+Ze[e[t+5]]+"-"+Ze[e[t+6]]+Ze[e[t+7]]+"-"+Ze[e[t+8]]+Ze[e[t+9]]+"-"+Ze[e[t+10]]+Ze[e[t+11]]+Ze[e[t+12]]+Ze[e[t+13]]+Ze[e[t+14]]+Ze[e[t+15]]).toLowerCase()}let As;const TO=new Uint8Array(16);function Ry(){if(!As){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");As=crypto.getRandomValues.bind(crypto)}return As(TO)}const Iy={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Cy(e,t,n){var a;if(Iy.randomUUID&&!e)return Iy.randomUUID();e=e||{};const r=e.random??((a=e.rng)==null?void 0:a.call(e))??Ry();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,ky(r)}const ks={};function _y(e,t,n){let r;{const a=Date.now(),i=Ry();AO(ks,a,i),r=kO(i,ks.msecs,ks.seq,t,n)}return t??ky(r)}function AO(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 kO(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 Ny=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},RO=(e=>e?Ny(e):Ny),IO=e=>e;function CO(e,t=IO){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 Oy=e=>{const t=RO(e),n=r=>CO(t,r);return Object.assign(n,t),n},_O=(e=>e?Oy(e):Oy);var Ly=Symbol.for("immer-nothing"),Dy=Symbol.for("immer-draftable"),xt=Symbol.for("immer-state"),NO=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 bt(e,...t){if(process.env.NODE_ENV!=="production"){const n=NO[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 sr=Object.getPrototypeOf;function lr(e){return!!e&&!!e[xt]}function Pn(e){var t;return e?My(e)||Array.isArray(e)||!!e[Dy]||!!((t=e.constructor)!=null&&t[Dy])||ai(e)||ii(e):!1}var OO=Object.prototype.constructor.toString();function My(e){if(!e||typeof e!="object")return!1;const t=sr(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)===OO}function ni(e,t){ri(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ri(e){const t=e[xt];return t?t.type_:Array.isArray(e)?1:ai(e)?2:ii(e)?3:0}function Rs(e,t){return ri(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Py(e,t,n){const r=ri(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function LO(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ai(e){return e instanceof Map}function ii(e){return e instanceof Set}function Fn(e){return e.copy_||e.base_}function Is(e,t){if(ai(e))return new Map(e);if(ii(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=My(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[xt];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(sr(e),r)}else{const r=sr(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function Cs(e,t=!1){return oi(e)||lr(e)||!Pn(e)||(ri(e)>1&&(e.set=e.add=e.clear=e.delete=DO),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Cs(r,!0))),e}function DO(){bt(2)}function oi(e){return Object.isFrozen(e)}var MO={};function Bn(e){const t=MO[e];return t||bt(0,e),t}var Zr;function Fy(){return Zr}function PO(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function By(e,t){t&&(Bn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function _s(e){Ns(e),e.drafts_.forEach(FO),e.drafts_=null}function Ns(e){e===Zr&&(Zr=e.parent_)}function Uy(e){return Zr=PO(Zr,e)}function FO(e){const t=e[xt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function jy(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[xt].modified_&&(_s(t),bt(4)),Pn(e)&&(e=si(t,e),t.parent_||li(t,e)),t.patches_&&Bn("Patches").generateReplacementPatches_(n[xt].base_,e,t.patches_,t.inversePatches_)):e=si(t,n,[]),_s(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ly?e:void 0}function si(e,t,n){if(oi(t))return t;const r=t[xt];if(!r)return ni(t,(a,i)=>zy(e,r,t,a,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return li(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),ni(i,(s,l)=>zy(e,r,a,s,l,n,o)),li(e,a,!1),n&&e.patches_&&Bn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function zy(e,t,n,r,a,i,o){if(process.env.NODE_ENV!=="production"&&a===n&&bt(5),lr(a)){const s=i&&t&&t.type_!==3&&!Rs(t.assigned_,r)?i.concat(r):void 0,l=si(e,a,s);if(Py(n,r,l),lr(l))e.canAutoFreeze_=!1;else return}else o&&n.add(a);if(Pn(a)&&!oi(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;si(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&li(e,a)}}function li(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Cs(t,n)}function BO(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Fy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,i=Os;n&&(a=[r],i=Jr);const{revoke:o,proxy:s}=Proxy.revocable(a,i);return r.draft_=s,r.revoke_=o,s}var Os={get(e,t){if(t===xt)return e;const n=Fn(e);if(!Rs(n,t))return UO(e,n,t);const r=n[t];return e.finalized_||!Pn(r)?r:r===Ls(e.base_,t)?(Ms(e),e.copy_[t]=Ps(r,e)):r},has(e,t){return t in Fn(e)},ownKeys(e){return Reflect.ownKeys(Fn(e))},set(e,t,n){const r=Gy(Fn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=Ls(Fn(e),t),i=a==null?void 0:a[xt];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(LO(n,a)&&(n!==void 0||Rs(e.base_,t)))return!0;Ms(e),Ds(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 Ls(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ms(e),Ds(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Fn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){bt(11)},getPrototypeOf(e){return sr(e.base_)},setPrototypeOf(){bt(12)}},Jr={};ni(Os,(e,t)=>{Jr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Jr.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&bt(13),Jr.set.call(this,e,t,void 0)},Jr.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&bt(14),Os.set.call(this,e[0],t,n,e[0])};function Ls(e,t){const n=e[xt];return(n?Fn(n):e)[t]}function UO(e,t,n){var a;const r=Gy(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function Gy(e,t){if(!(t in e))return;let n=sr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=sr(n)}}function Ds(e){e.modified_||(e.modified_=!0,e.parent_&&Ds(e.parent_))}function Ms(e){e.copy_||(e.copy_=Is(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jO=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"&&bt(6),r!==void 0&&typeof r!="function"&&bt(7);let a;if(Pn(t)){const i=Uy(this),o=Ps(t,void 0);let s=!0;try{a=n(o),s=!1}finally{s?_s(i):Ns(i)}return By(i,r),jy(a,i)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===Ly&&(a=void 0),this.autoFreeze_&&Cs(a,!0),r){const i=[],o=[];Bn("Patches").generateReplacementPatches_(t,a,i,o),r(i,o)}return a}else bt(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){Pn(e)||bt(8),lr(e)&&(e=zO(e));const t=Uy(this),n=Ps(e,void 0);return n[xt].isManual_=!0,Ns(t),n}finishDraft(e,t){const n=e&&e[xt];(!n||!n.isManual_)&&bt(9);const{scope_:r}=n;return By(r,t),jy(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=Bn("Patches").applyPatches_;return lr(e)?r(e,t):this.produce(e,a=>r(a,t))}};function Ps(e,t){const n=ai(e)?Bn("MapSet").proxyMap_(e,t):ii(e)?Bn("MapSet").proxySet_(e,t):BO(e,t);return(t?t.scope_:Fy()).drafts_.push(n),n}function zO(e){return lr(e)||bt(10,e),qy(e)}function qy(e){if(!Pn(e)||oi(e))return e;const t=e[xt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Is(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Is(e,!0);return ni(n,(r,a)=>{Py(n,r,qy(a))}),t&&(t.finalized_=!1),n}var Tt=new jO,GO=Tt.produce;Tt.produceWithPatches.bind(Tt),Tt.setAutoFreeze.bind(Tt),Tt.setUseStrictShallowCopy.bind(Tt),Tt.applyPatches.bind(Tt),Tt.createDraft.bind(Tt),Tt.finishDraft.bind(Tt);const qO=e=>(t,n,r)=>(r.setState=(a,i,...o)=>{const s=typeof a=="function"?GO(a):a;return t(s,i,...o)},e(r.setState,n,r));class Vy{constructor(t,n,r){Cr(this,"baseURL");Cr(this,"feedbackUrl");Cr(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 Qr extends Vy{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 VO(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function HO(e){let t,n,r,a=!1;return function(o){t===void 0?(t=o,n=0,r=-1):t=WO(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 $O(e,t,n){let r=Hy();const a=new TextDecoder;return function(o,s){if(o.length===0)n==null||n(r),r=Hy();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 WO(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function Hy(){return{data:"",event:"",id:"",retry:void 0}}var YO=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 Fs="text/event-stream",KO=1e3,$y="last-event-id";function XO(e,t){var{signal:n,headers:r,onopen:a,onmessage:i,onclose:o,onerror:s,openWhenHidden:l,fetch:u}=t,c=YO(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((d,p)=>{const f=Object.assign({},r);f.accept||(f.accept=Fs);let g;function m(){g.abort(),document.hidden||x()}l||document.addEventListener("visibilitychange",m);let v=KO,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??ZO;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 VO(T.body,HO($O(k=>{k?f[$y]=k:delete f[$y]},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 ZO(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(Fs)))throw new Error(`Expected content-type to be ${Fs}, Actual: ${t}`)}function Wy(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=Wy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Yy(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Wy(e))&&(r&&(r+=" "),r+=t);return r}const Bs="-",JO=e=>{const t=eL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(Bs);return s[0]===""&&s.length!==1&&s.shift(),Ky(s,t)||QO(o)},getConflictingClassGroupIds:(o,s)=>{const l=n[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},Ky=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?Ky(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Bs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},Xy=/^\[(.+)\]$/,QO=e=>{if(Xy.test(e)){const t=Xy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},eL=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)Us(n[a],r,a,t);return r},Us=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:Zy(t,a);i.classGroupId=n;return}if(typeof a=="function"){if(tL(a)){Us(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([i,o])=>{Us(o,Zy(t,i),n,r)})})},Zy=(e,t)=>{let n=e;return t.split(Bs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},tL=e=>e.isThemeGetter,nL=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)}}},js="!",zs=":",rL=zs.length,aL=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===zs){i.push(a.slice(l,g)),l=g+rL;continue}if(m==="/"){u=g;continue}}m==="["?o++:m==="]"?o--:m==="("?s++:m===")"&&s--}const c=i.length===0?a:a.substring(l),d=iL(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+zs,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},iL=e=>e.endsWith(js)?e.substring(0,e.length-1):e.startsWith(js)?e.substring(1):e,oL=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:nL(e.cacheSize),parseClassName:aL(e),sortModifiers:oL(e),...JO(e)}),lL=/\s+/,uL=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,o=[],s=e.trim().split(lL);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+js: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 cL(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Jy(t))&&(r&&(r+=" "),r+=n);return r}const Jy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Jy(e[r]))&&(n&&(n+=" "),n+=t);return n};function dL(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=uL(l,n);return a(l,c),c}return function(){return i(cL.apply(null,arguments))}}const Ge=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Qy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ev=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pL=/^\d+\/\d+$/,fL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gL=/\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$/,mL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=e=>pL.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),wn=e=>!!e&&Number.isInteger(Number(e)),Gs=e=>e.endsWith("%")&&ce(e.slice(0,-1)),ln=e=>fL.test(e),yL=()=>!0,vL=e=>gL.test(e)&&!mL.test(e),tv=()=>!1,EL=e=>hL.test(e),wL=e=>bL.test(e),SL=e=>!X(e)&&!Z(e),xL=e=>cr(e,ov,tv),X=e=>Qy.test(e),Un=e=>cr(e,sv,vL),qs=e=>cr(e,IL,ce),nv=e=>cr(e,av,tv),TL=e=>cr(e,iv,wL),ui=e=>cr(e,lv,EL),Z=e=>ev.test(e),ea=e=>dr(e,sv),AL=e=>dr(e,CL),rv=e=>dr(e,av),kL=e=>dr(e,ov),RL=e=>dr(e,iv),ci=e=>dr(e,lv,!0),cr=(e,t,n)=>{const r=Qy.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},dr=(e,t,n=!1)=>{const r=ev.exec(e);return r?r[1]?t(r[1]):n:!1},av=e=>e==="position"||e==="percentage",iv=e=>e==="image"||e==="url",ov=e=>e==="length"||e==="size"||e==="bg-size",sv=e=>e==="length",IL=e=>e==="number",CL=e=>e==="family-name",lv=e=>e==="shadow",_L=dL(()=>{const e=Ge("color"),t=Ge("font"),n=Ge("text"),r=Ge("font-weight"),a=Ge("tracking"),i=Ge("leading"),o=Ge("breakpoint"),s=Ge("container"),l=Ge("spacing"),u=Ge("radius"),c=Ge("shadow"),d=Ge("inset-shadow"),p=Ge("text-shadow"),f=Ge("drop-shadow"),g=Ge("blur"),m=Ge("perspective"),v=Ge("aspect"),h=Ge("ease"),b=Ge("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=()=>[ur,"full","auto",...k()],I=()=>[wn,"none","subgrid",Z,X],D=()=>["auto",{span:["full",wn,Z,X]},wn,Z,X],B=()=>[wn,"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=()=>[ur,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],L=()=>[e,Z,X],$=()=>[...S(),rv,nv,{position:[Z,X]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",kL,xL,{size:[Z,X]}],ne=()=>[Gs,ea,Un],A=()=>["","none","full",u,Z,X],Y=()=>["",ce,ea,Un],se=()=>["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"],te=()=>[ce,Gs,rv,nv],de=()=>["","none",g,Z,X],ye=()=>["none",ce,Z,X],we=()=>["none",ce,Z,X],Ae=()=>[ce,Z,X],qe=()=>[ur,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ln],breakpoint:[ln],color:[yL],container:[ln],"drop-shadow":[ln],ease:["in","out","in-out"],font:[SL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ln],shadow:[ln],spacing:["px",ce],text:[ln],"text-shadow":[ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ur,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:[wn,"auto",Z,X]}],basis:[{basis:[ur,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,ur,"auto","initial","none",X]}],grow:[{grow:["",ce,Z,X]}],shrink:[{shrink:["",ce,Z,X]}],order:[{order:[wn,"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,ea,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Z,qs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gs,X]}],"font-family":[{font:[AL,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,qs]}],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:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",Z,Un]}],"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"]},wn,Z,X],radial:["",Z,X],conic:[wn,Z,X]},RL,TL]}],"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:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"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:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,Z,X]}],"outline-w":[{outline:["",ce,ea,Un]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",c,ci,ui]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",d,ci,ui]}],"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,Un]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,ci,ui]}],"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":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"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":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"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":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"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":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"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":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"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":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"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":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"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":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"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":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"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,ci,ui]}],"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:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[Z,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:qe()}],"translate-x":[{"translate-x":qe()}],"translate-y":[{"translate-y":qe()}],"translate-z":[{"translate-z":qe()}],"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,ea,Un,qs]}],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"]}}),ee=(...e)=>_L(Yy(e)),di=()=>new Date().toISOString(),NL=e=>e?new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"numeric",hour12:!1}):"",OL=({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()}`},pr={POSITIVE:"positive",NEGATIVE:"negative"};class ta extends Vy{constructor(n,r,a,i=null){super(n,r,a);Cr(this,"flowApiKey");Cr(this,"currentAbortController",null);this.flowApiKey=i}sendQuestion(n,r={}){const a=this.getUser(),i=OL({url:this.baseURL,params:{userId:a.id,...n}}),o=new AbortController;this.currentAbortController=o;const s=XO(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 Lt={OPEN:"open",CLOSED:"closed"},lt={INITIAL:"initial",USER_HAS_TYPED:"userHasTyped"},fr={HAS_BEEN_OPENED:"hasBeenOpened",HAS_NOT_BEEN_OPENED:"hasNotBeenOpened"},zt={EXPANDED:"expanded",COLLAPSED:"collapsed"};var Te=(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))(Te||{});function uv(e){return e.type==="bot"}function cv(e){return e.type==="bot"}function LL(e,t){switch(t.type){case Te.ADD_MESSAGE:{const{endpoint:n}=t,{id:r,message:a}=t.payload,i=di(),o=Cy();switch(n){case Ee.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 Ee.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 Te.ADD_TOKEN:{const{endpoint:n}=t;if(n===Ee.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 Te.ADD_DOCUMENTS:{const{endpoint:n}=t;if(n===Ee.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 Te.SET_ERROR:{const{id:n,error:r}=t.payload;let a;if(t.endpoint===Ee.FLOW?a=e.find(i=>uv(i)&&i.source_id===n):a=e.find(i=>cv(i)&&i.source_id===n),!a){console.warn(`Action ${Te.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 Te.UPDATE_MESSAGE:{const{endpoint:n}=t,{id:r,field:a,value:i}=t.payload,o=di();switch(n){case Ee.FLOW:{const s=e.find(l=>uv(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 Ee.AIDA:{const s=e.find(l=>cv(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 Te.DELETE_LAST_MESSAGE_PAIR:{e.length>=2?e.splice(e.length-2,2):console.warn(`${Te.DELETE_LAST_MESSAGE_PAIR} action called with insufficient messages in draft.`);break}}}const DL={id:null,token:null,apiAccessKey:null,api_v2_token:null,twoFactorAuth:null,role:null,expiresAt:null},ML=(e,t)=>({user:DL,chatAPIUrl:ht.CHAT_API_URL,flowAPIUrl:ht.FLOW_API_URL,flowApiKey:null,feedbackAPIUrl:ht.FEEDBACK_API_URL,apiService:new Qr(ht.CHAT_API_URL,ht.FEEDBACK_API_URL,()=>t().user),endpoint:Ee.AIDA,numRetries:0,retryTimeoutId:null,sessionId:_y(),botState:"idle",question:"",messages:[],numMessagesExpanded:0,chatStartTimestamp:di(),placeholders:[],onHelpAction:null,setUser:n=>e(r=>{r.user=n;const a=t().endpoint;a===Ee.FLOW?r.apiService=new ta(r.flowAPIUrl,r.feedbackAPIUrl,()=>t().user,t().flowApiKey):a===Ee.AIDA&&(r.apiService=new Qr(r.chatAPIUrl,r.feedbackAPIUrl,()=>t().user))}),setChatAPIUrl:n=>e(r=>{r.chatAPIUrl=n,t().endpoint===Ee.AIDA&&(r.apiService=new Qr(n,r.feedbackAPIUrl,()=>t().user))}),setFlowAPIUrl:n=>e(r=>{r.flowAPIUrl=n,t().endpoint===Ee.FLOW&&(r.apiService=new ta(n,r.feedbackAPIUrl,()=>t().user,t().flowApiKey))}),setFlowApiKey:n=>e(r=>{r.flowApiKey=n,t().endpoint===Ee.FLOW&&(r.apiService=new ta(r.flowAPIUrl,r.feedbackAPIUrl,()=>t().user,n))}),setFeedbackAPIUrl:n=>e(r=>{r.feedbackAPIUrl=n;const a=t().endpoint;a===Ee.FLOW?r.apiService=new ta(r.flowAPIUrl,n,()=>t().user,t().flowApiKey):a===Ee.AIDA&&(r.apiService=new Qr(r.chatAPIUrl,n,()=>t().user))}),setEndpoint:n=>e(r=>{r.endpoint=n,n===Ee.FLOW?r.apiService=new ta(t().flowAPIUrl,t().feedbackAPIUrl,()=>t().user,t().flowApiKey):n===Ee.AIDA&&(r.apiService=new Qr(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;LL(r.messages,{...n,endpoint:a})}),chatVisualState:lt.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=lt.INITIAL,n.sessionId=_y(),n.numMessagesExpanded=0,n.botState="idle",n.resetRetryMechanism(),n.chatStartTimestamp=di()})},getLastMessage:()=>t().messages[t().messages.length-1],setOnHelpAction:n=>e(r=>{r.onHelpAction=n}),setPlaceholders:n=>e(r=>{r.placeholders=n})}),PL=`: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 WO(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function Hy(){return{data:"",event:"",id:"",retry:void 0}}var YO=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 Fs="text/event-stream",KO=1e3,$y="last-event-id";function XO(e,t){var{signal:n,headers:r,onopen:a,onmessage:i,onclose:o,onerror:s,openWhenHidden:l,fetch:u}=t,c=YO(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((d,p)=>{const f=Object.assign({},r);f.accept||(f.accept=Fs);let g;function m(){g.abort(),document.hidden||x()}l||document.addEventListener("visibilitychange",m);let v=KO,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??ZO;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 VO(T.body,HO($O(k=>{k?f[$y]=k:delete f[$y]},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 ZO(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(Fs)))throw new Error(`Expected content-type to be ${Fs}, Actual: ${t}`)}function Wy(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=Wy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Yy(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Wy(e))&&(r&&(r+=" "),r+=t);return r}const Bs="-",JO=e=>{const t=eL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(Bs);return s[0]===""&&s.length!==1&&s.shift(),Ky(s,t)||QO(o)},getConflictingClassGroupIds:(o,s)=>{const l=n[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},Ky=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?Ky(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(Bs);return(o=t.validators.find(({validator:s})=>s(i)))==null?void 0:o.classGroupId},Xy=/^\[(.+)\]$/,QO=e=>{if(Xy.test(e)){const t=Xy.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},eL=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const a in n)Us(n[a],r,a,t);return r},Us=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:Zy(t,a);i.classGroupId=n;return}if(typeof a=="function"){if(tL(a)){Us(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([i,o])=>{Us(o,Zy(t,i),n,r)})})},Zy=(e,t)=>{let n=e;return t.split(Bs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},tL=e=>e.isThemeGetter,nL=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)}}},js="!",zs=":",rL=zs.length,aL=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===zs){i.push(a.slice(l,g)),l=g+rL;continue}if(m==="/"){u=g;continue}}m==="["?o++:m==="]"?o--:m==="("?s++:m===")"&&s--}const c=i.length===0?a:a.substring(l),d=iL(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+zs,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},iL=e=>e.endsWith(js)?e.substring(0,e.length-1):e.startsWith(js)?e.substring(1):e,oL=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:nL(e.cacheSize),parseClassName:aL(e),sortModifiers:oL(e),...JO(e)}),lL=/\s+/,uL=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,o=[],s=e.trim().split(lL);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+js: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 cL(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Jy(t))&&(r&&(r+=" "),r+=n);return r}const Jy=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Jy(e[r]))&&(n&&(n+=" "),n+=t);return n};function dL(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=uL(l,n);return a(l,c),c}return function(){return i(cL.apply(null,arguments))}}const Ge=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Qy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ev=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pL=/^\d+\/\d+$/,fL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gL=/\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$/,mL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=e=>pL.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),wn=e=>!!e&&Number.isInteger(Number(e)),Gs=e=>e.endsWith("%")&&ce(e.slice(0,-1)),ln=e=>fL.test(e),yL=()=>!0,vL=e=>gL.test(e)&&!mL.test(e),tv=()=>!1,EL=e=>hL.test(e),wL=e=>bL.test(e),SL=e=>!X(e)&&!Z(e),xL=e=>cr(e,ov,tv),X=e=>Qy.test(e),Un=e=>cr(e,sv,vL),qs=e=>cr(e,IL,ce),nv=e=>cr(e,av,tv),TL=e=>cr(e,iv,wL),ui=e=>cr(e,lv,EL),Z=e=>ev.test(e),ea=e=>dr(e,sv),AL=e=>dr(e,CL),rv=e=>dr(e,av),kL=e=>dr(e,ov),RL=e=>dr(e,iv),ci=e=>dr(e,lv,!0),cr=(e,t,n)=>{const r=Qy.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},dr=(e,t,n=!1)=>{const r=ev.exec(e);return r?r[1]?t(r[1]):n:!1},av=e=>e==="position"||e==="percentage",iv=e=>e==="image"||e==="url",ov=e=>e==="length"||e==="size"||e==="bg-size",sv=e=>e==="length",IL=e=>e==="number",CL=e=>e==="family-name",lv=e=>e==="shadow",_L=dL(()=>{const e=Ge("color"),t=Ge("font"),n=Ge("text"),r=Ge("font-weight"),a=Ge("tracking"),i=Ge("leading"),o=Ge("breakpoint"),s=Ge("container"),l=Ge("spacing"),u=Ge("radius"),c=Ge("shadow"),d=Ge("inset-shadow"),p=Ge("text-shadow"),f=Ge("drop-shadow"),g=Ge("blur"),m=Ge("perspective"),v=Ge("aspect"),h=Ge("ease"),b=Ge("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=()=>[ur,"full","auto",...k()],I=()=>[wn,"none","subgrid",Z,X],D=()=>["auto",{span:["full",wn,Z,X]},wn,Z,X],B=()=>[wn,"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=()=>[ur,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],L=()=>[e,Z,X],$=()=>[...S(),rv,nv,{position:[Z,X]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",kL,xL,{size:[Z,X]}],ne=()=>[Gs,ea,Un],A=()=>["","none","full",u,Z,X],Y=()=>["",ce,ea,Un],se=()=>["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"],te=()=>[ce,Gs,rv,nv],de=()=>["","none",g,Z,X],ye=()=>["none",ce,Z,X],we=()=>["none",ce,Z,X],Ae=()=>[ce,Z,X],qe=()=>[ur,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ln],breakpoint:[ln],color:[yL],container:[ln],"drop-shadow":[ln],ease:["in","out","in-out"],font:[SL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ln],shadow:[ln],spacing:["px",ce],text:[ln],"text-shadow":[ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ur,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:[wn,"auto",Z,X]}],basis:[{basis:[ur,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,ur,"auto","initial","none",X]}],grow:[{grow:["",ce,Z,X]}],shrink:[{shrink:["",ce,Z,X]}],order:[{order:[wn,"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,ea,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Z,qs]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gs,X]}],"font-family":[{font:[AL,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,qs]}],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:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",Z,Un]}],"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"]},wn,Z,X],radial:["",Z,X],conic:[wn,Z,X]},RL,TL]}],"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:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"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:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,Z,X]}],"outline-w":[{outline:["",ce,ea,Un]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",c,ci,ui]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",d,ci,ui]}],"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,Un]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,ci,ui]}],"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":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"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":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"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":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"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":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"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":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"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":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"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":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"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":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"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":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"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,ci,ui]}],"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:ye()}],"rotate-x":[{"rotate-x":ye()}],"rotate-y":[{"rotate-y":ye()}],"rotate-z":[{"rotate-z":ye()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[Z,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:qe()}],"translate-x":[{"translate-x":qe()}],"translate-y":[{"translate-y":qe()}],"translate-z":[{"translate-z":qe()}],"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,ea,Un,qs]}],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"]}}),ee=(...e)=>_L(Yy(e)),di=()=>new Date().toISOString(),NL=e=>e?new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"numeric",hour12:!1}):"",OL=({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()}`},pr={POSITIVE:"positive",NEGATIVE:"negative"};class ta extends Vy{constructor(n,r,a,i=null){super(n,r,a);Cr(this,"flowApiKey");Cr(this,"currentAbortController",null);this.flowApiKey=i}sendQuestion(n,r={}){const a=this.getUser(),i=OL({url:this.baseURL,params:{userId:a.id,...n}}),o=new AbortController;this.currentAbortController=o;const s=XO(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 Lt={OPEN:"open",CLOSED:"closed"},lt={INITIAL:"initial",USER_HAS_TYPED:"userHasTyped"},fr={HAS_BEEN_OPENED:"hasBeenOpened",HAS_NOT_BEEN_OPENED:"hasNotBeenOpened"},zt={EXPANDED:"expanded",COLLAPSED:"collapsed"};var Te=(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))(Te||{});function uv(e){return e.type==="bot"}function cv(e){return e.type==="bot"}function LL(e,t){switch(t.type){case Te.ADD_MESSAGE:{const{endpoint:n}=t,{id:r,message:a}=t.payload,i=di(),o=Cy();switch(n){case Ee.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 Ee.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 Te.ADD_TOKEN:{const{endpoint:n}=t;if(n===Ee.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 Te.ADD_DOCUMENTS:{const{endpoint:n}=t;if(n===Ee.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 Te.SET_ERROR:{const{id:n,error:r}=t.payload;let a;if(t.endpoint===Ee.FLOW?a=e.find(i=>uv(i)&&i.source_id===n):a=e.find(i=>cv(i)&&i.source_id===n),!a){console.warn(`Action ${Te.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 Te.UPDATE_MESSAGE:{const{endpoint:n}=t,{id:r,field:a,value:i}=t.payload,o=di();switch(n){case Ee.FLOW:{const s=e.find(l=>uv(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 Ee.AIDA:{const s=e.find(l=>cv(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 Te.DELETE_LAST_MESSAGE_PAIR:{e.length>=2?e.splice(e.length-2,2):console.warn(`${Te.DELETE_LAST_MESSAGE_PAIR} action called with insufficient messages in draft.`);break}}}const DL={id:null,token:null,apiAccessKey:null,api_v2_token:null,twoFactorAuth:null,role:null,expiresAt:null},ML=(e,t)=>({user:DL,chatAPIUrl:ht.CHAT_API_URL,flowAPIUrl:ht.FLOW_API_URL,flowApiKey:null,feedbackAPIUrl:ht.FEEDBACK_API_URL,apiService:new Qr(ht.CHAT_API_URL,ht.FEEDBACK_API_URL,()=>t().user),endpoint:Ee.AIDA,numRetries:0,retryTimeoutId:null,sessionId:_y(),botState:"idle",question:"",messages:[],numMessagesExpanded:0,chatStartTimestamp:di(),placeholders:[],onHelpAction:null,setUser:n=>e(r=>{r.user=n;const a=t().endpoint;a===Ee.FLOW?r.apiService=new ta(r.flowAPIUrl,r.feedbackAPIUrl,()=>t().user,t().flowApiKey):a===Ee.AIDA&&(r.apiService=new Qr(r.chatAPIUrl,r.feedbackAPIUrl,()=>t().user))}),setChatAPIUrl:n=>e(r=>{r.chatAPIUrl=n,t().endpoint===Ee.AIDA&&(r.apiService=new Qr(n,r.feedbackAPIUrl,()=>t().user))}),setFlowAPIUrl:n=>e(r=>{r.flowAPIUrl=n,t().endpoint===Ee.FLOW&&(r.apiService=new ta(n,r.feedbackAPIUrl,()=>t().user,t().flowApiKey))}),setFlowApiKey:n=>e(r=>{r.flowApiKey=n,t().endpoint===Ee.FLOW&&(r.apiService=new ta(r.flowAPIUrl,r.feedbackAPIUrl,()=>t().user,n))}),setFeedbackAPIUrl:n=>e(r=>{r.feedbackAPIUrl=n;const a=t().endpoint;a===Ee.FLOW?r.apiService=new ta(r.flowAPIUrl,n,()=>t().user,t().flowApiKey):a===Ee.AIDA&&(r.apiService=new Qr(r.chatAPIUrl,n,()=>t().user))}),setEndpoint:n=>e(r=>{r.endpoint=n,n===Ee.FLOW?r.apiService=new ta(t().flowAPIUrl,t().feedbackAPIUrl,()=>t().user,t().flowApiKey):n===Ee.AIDA&&(r.apiService=new Qr(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;LL(r.messages,{...n,endpoint:a})}),chatVisualState:lt.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=lt.INITIAL,n.sessionId=_y(),n.numMessagesExpanded=0,n.botState="idle",n.resetRetryMechanism(),n.chatStartTimestamp=di()})},getLastMessage:()=>t().messages[t().messages.length-1],setOnHelpAction:n=>e(r=>{r.onHelpAction=n}),setPlaceholders:n=>e(r=>{r.placeholders=n})}),PL=`: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:ee("relative z-20",t),children:e})]})},zE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,GE=Yy,Ci=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return GE(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=zE(c)||zE(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 GE(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},DF=fe.create(ZL),MF=fe.create(QL),qE={copied:{scale:1,opacity:1,transition:{duration:.15}},idle:{scale:.8,opacity:0,transition:{duration:.15}}},hl=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(tn,{children:[w.jsx(nn,{onClick:l,className:n,disabled:a,children:w.jsx(Kt,{mode:"wait",initial:!1,children:i?w.jsx(DF,{initial:"idle",animate:"copied",exit:"idle",variants:qE,className:ee("size-4 text-telnyx-green",r)},"check"):w.jsx(MF,{initial:"idle",animate:"copied",exit:"idle",variants:qE,className:ee("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"})})]})}),PF=({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)})]}),FF=e=>{const t=new CSSStyleSheet;return t.replaceSync(e.replace("((-webkit-hyphens: none) and (not (margin-trim: inline)))","(not (margin-trim: inline))")),t},BF=(e,t)=>{if(!t)return;const n=FF(t);e.adoptedStyleSheets=[n]},bl=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&&BF(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&&hn.createPortal(e,o)});return n?hn.createPortal(c,n):c}),vr=({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:ee("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:ee("opacity-0 group-data-[loaded=true]:opacity-100","transition-opacity motion-reduce:transition-none !duration-300",n),children:r})})},UF=({words:e,className:t,filter:n=!0,duration:r=.5})=>{const[a,i]=xO();let o=e.split(" ");O.useEffect(()=>{const l=setTimeout(()=>{a.current&&i("span",{opacity:1,filter:n?"blur(0px)":"none"},{duration:r||1,delay:r1(.2)})},50);return()=>clearTimeout(l)},[e,a,i,r,n]);const s=()=>w.jsx(fe.div,{ref:a,children:o.map((l,u)=>w.jsxs(fe.span,{className:"text-gray-700/60 opacity-0",style:{filter:n?"blur(10px)":"none"},children:[l," "]},`${l}-${u}`))});return w.jsx("span",{className:ee("text-gray-700 text-xs font-medium leading-snug tracking-wide",t),children:s()})},jF=({isLoaded:e=!1,progressMessage:t="Processing..."})=>w.jsxs("div",{className:"flex w-64 flex-col gap-2 relative",children:[w.jsx(vr,{isLoaded:e}),w.jsx(vr,{isLoaded:e}),w.jsxs("div",{className:"flex gap-1 items-center",children:[w.jsx(vr,{className:"duration-100 flex-1",isLoaded:e}),w.jsx("div",{className:"bg-[#fefef8] px-3 z-10",children:w.jsx(UF,{words:t,className:"text-gray-700/60 font-medium"},t)}),w.jsx(vr,{className:"duration-100 flex-1",isLoaded:e})]}),w.jsx(vr,{isLoaded:e}),w.jsx(vr,{isLoaded:e})]});function L$(){}function D$(){}function zF(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const GF=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qF=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VF={};function VE(e,t){return(VF.jsx?qF:GF).test(e)}const HF=/[ \t\n\f\r]/g;function $F(e){return typeof e=="object"?e.type==="text"?HE(e.value):!1:HE(e)}function HE(e){return e.replace(HF,"")===""}class pa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}pa.prototype.normal={},pa.prototype.property={},pa.prototype.space=void 0;function $E(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new pa(n,r,t)}function yl(e){return e.toLowerCase()}class yt{constructor(t,n){this.attribute=n,this.property=t}}yt.prototype.attribute="",yt.prototype.booleanish=!1,yt.prototype.boolean=!1,yt.prototype.commaOrSpaceSeparated=!1,yt.prototype.commaSeparated=!1,yt.prototype.defined=!1,yt.prototype.mustUseProperty=!1,yt.prototype.number=!1,yt.prototype.overloadedBoolean=!1,yt.prototype.property="",yt.prototype.spaceSeparated=!1,yt.prototype.space=void 0;let WF=0;const ue=qn(),je=qn(),vl=qn(),V=qn(),_e=qn(),Er=qn(),Rt=qn();function qn(){return 2**++WF}const El=Object.freeze(Object.defineProperty({__proto__:null,boolean:ue,booleanish:je,commaOrSpaceSeparated:Rt,commaSeparated:Er,number:V,overloadedBoolean:vl,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),wl=Object.keys(El);class Sl extends yt{constructor(t,n,r,a){let i=-1;if(super(t,n),WE(this,"space",a),typeof r=="number")for(;++i<wl.length;){const o=wl[i];WE(this,wl[i],(r&El[o])===El[o])}}}Sl.prototype.defined=!0;function WE(e,t,n){n&&(e[t]=n)}function wr(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Sl(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[yl(r)]=r,n[yl(i.attribute)]=r}return new pa(t,n,e.space)}const YE=wr({properties:{ariaActiveDescendant:null,ariaAtomic:je,ariaAutoComplete:null,ariaBusy:je,ariaChecked:je,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:je,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:je,ariaFlowTo:_e,ariaGrabbed:je,ariaHasPopup:null,ariaHidden:je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:V,ariaLive:null,ariaModal:je,ariaMultiLine:je,ariaMultiSelectable:je,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:je,ariaReadOnly:je,ariaRelevant:null,ariaRequired:je,ariaRoleDescription:_e,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:je,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 KE(e,t){return t in e?e[t]:t}function XE(e,t){return KE(e,t.toLowerCase())}const YF=wr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Er,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:ue,allowPaymentRequest:ue,allowUserMedia:ue,alt:null,as:null,async:ue,autoCapitalize:null,autoComplete:_e,autoFocus:ue,autoPlay:ue,blocking:_e,capture:null,charSet:null,checked:ue,cite:null,className:_e,cols:V,colSpan:null,content:null,contentEditable:je,controls:ue,controlsList:_e,coords:V|Er,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ue,defer:ue,dir:null,dirName:null,disabled:ue,download:vl,draggable:je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ue,formTarget:null,headers:_e,height:V,hidden:vl,high:V,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:ue,inputMode:null,integrity:null,is:null,isMap:ue,itemId:null,itemProp:_e,itemRef:_e,itemScope:ue,itemType:_e,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:_e,placeholder:null,playsInline:ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ue,referrerPolicy:null,rel:_e,required:ue,reversed:ue,rows:V,rowSpan:V,sandbox:_e,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:je,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:je,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_e,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:je,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:XE}),KF=wr({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:Rt,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:_e,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:Er,g2:Er,glyphName:Er,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:Rt,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:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rt,rev:Rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rt,requiredFeatures:Rt,requiredFonts:Rt,requiredFormats:Rt,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:Rt,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:Rt,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:Rt,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:KE}),ZE=wr({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()}}),JE=wr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:XE}),QE=wr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),XF={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"},ZF=/[A-Z]/g,ew=/-[a-z]/g,JF=/^data[-\w.:]+$/i;function QF(e,t){const n=yl(t);let r=t,a=yt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&JF.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ew,t2);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ew.test(i)){let o=i.replace(ZF,e2);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=Sl}return new a(r,t)}function e2(e){return"-"+e.toLowerCase()}function t2(e){return e.charAt(1).toUpperCase()}const n2=$E([YE,YF,ZE,JE,QE],"html"),xl=$E([YE,KF,ZE,JE,QE],"svg");function r2(e){return e.join(" ").trim()}var Sr={},Tl,tw;function a2(){if(tw)return Tl;tw=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:ee("relative z-20",t),children:e})]})},zE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,GE=Yy,Ci=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return GE(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=zE(c)||zE(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 GE(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},DF=fe.create(ZL),MF=fe.create(QL),qE={copied:{scale:1,opacity:1,transition:{duration:.15}},idle:{scale:.8,opacity:0,transition:{duration:.15}}},hl=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(tn,{children:[w.jsx(nn,{onClick:l,className:n,disabled:a,children:w.jsx(Kt,{mode:"wait",initial:!1,children:i?w.jsx(DF,{initial:"idle",animate:"copied",exit:"idle",variants:qE,className:ee("size-4 text-telnyx-green",r)},"check"):w.jsx(MF,{initial:"idle",animate:"copied",exit:"idle",variants:qE,className:ee("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"})})]})}),PF=({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)})]}),FF=e=>{const t=new CSSStyleSheet;return t.replaceSync(e.replace("((-webkit-hyphens: none) and (not (margin-trim: inline)))","(not (margin-trim: inline))")),t},BF=(e,t)=>{if(!t)return;const n=FF(t);e.adoptedStyleSheets=[n]},bl=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&&BF(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&&hn.createPortal(e,o)});return n?hn.createPortal(c,n):c}),vr=({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:ee("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:ee("opacity-0 group-data-[loaded=true]:opacity-100","transition-opacity motion-reduce:transition-none !duration-300",n),children:r})})},UF=({words:e,className:t,filter:n=!0,duration:r=.5})=>{const[a,i]=xO();let o=e.split(" ");O.useEffect(()=>{const l=setTimeout(()=>{a.current&&i("span",{opacity:1,filter:n?"blur(0px)":"none"},{duration:r||1,delay:r1(.2)})},50);return()=>clearTimeout(l)},[e,a,i,r,n]);const s=()=>w.jsx(fe.div,{ref:a,children:o.map((l,u)=>w.jsxs(fe.span,{className:"text-gray-700/60 opacity-0",style:{filter:n?"blur(10px)":"none"},children:[l," "]},`${l}-${u}`))});return w.jsx("span",{className:ee("text-gray-700 text-xs font-medium leading-snug tracking-wide",t),children:s()})},jF=({isLoaded:e=!1,progressMessage:t="Processing..."})=>w.jsxs("div",{className:"flex w-64 flex-col gap-2 relative",children:[w.jsx(vr,{isLoaded:e}),w.jsx(vr,{isLoaded:e}),w.jsxs("div",{className:"flex gap-1 items-center",children:[w.jsx(vr,{className:"duration-100 flex-1",isLoaded:e}),w.jsx("div",{className:"bg-[#fefef8] px-3 z-10",children:w.jsx(UF,{words:t,className:"text-gray-700/60 font-medium"},t)}),w.jsx(vr,{className:"duration-100 flex-1",isLoaded:e})]}),w.jsx(vr,{isLoaded:e}),w.jsx(vr,{isLoaded:e})]});function L$(){}function D$(){}function zF(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const GF=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qF=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VF={};function VE(e,t){return(VF.jsx?qF:GF).test(e)}const HF=/[ \t\n\f\r]/g;function $F(e){return typeof e=="object"?e.type==="text"?HE(e.value):!1:HE(e)}function HE(e){return e.replace(HF,"")===""}class pa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}pa.prototype.normal={},pa.prototype.property={},pa.prototype.space=void 0;function $E(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new pa(n,r,t)}function yl(e){return e.toLowerCase()}class yt{constructor(t,n){this.attribute=n,this.property=t}}yt.prototype.attribute="",yt.prototype.booleanish=!1,yt.prototype.boolean=!1,yt.prototype.commaOrSpaceSeparated=!1,yt.prototype.commaSeparated=!1,yt.prototype.defined=!1,yt.prototype.mustUseProperty=!1,yt.prototype.number=!1,yt.prototype.overloadedBoolean=!1,yt.prototype.property="",yt.prototype.spaceSeparated=!1,yt.prototype.space=void 0;let WF=0;const ue=qn(),je=qn(),vl=qn(),V=qn(),_e=qn(),Er=qn(),Rt=qn();function qn(){return 2**++WF}const El=Object.freeze(Object.defineProperty({__proto__:null,boolean:ue,booleanish:je,commaOrSpaceSeparated:Rt,commaSeparated:Er,number:V,overloadedBoolean:vl,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),wl=Object.keys(El);class Sl extends yt{constructor(t,n,r,a){let i=-1;if(super(t,n),WE(this,"space",a),typeof r=="number")for(;++i<wl.length;){const o=wl[i];WE(this,wl[i],(r&El[o])===El[o])}}}Sl.prototype.defined=!0;function WE(e,t,n){n&&(e[t]=n)}function wr(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Sl(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[yl(r)]=r,n[yl(i.attribute)]=r}return new pa(t,n,e.space)}const YE=wr({properties:{ariaActiveDescendant:null,ariaAtomic:je,ariaAutoComplete:null,ariaBusy:je,ariaChecked:je,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:je,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:je,ariaFlowTo:_e,ariaGrabbed:je,ariaHasPopup:null,ariaHidden:je,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:V,ariaLive:null,ariaModal:je,ariaMultiLine:je,ariaMultiSelectable:je,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:je,ariaReadOnly:je,ariaRelevant:null,ariaRequired:je,ariaRoleDescription:_e,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:je,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 KE(e,t){return t in e?e[t]:t}function XE(e,t){return KE(e,t.toLowerCase())}const YF=wr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Er,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:ue,allowPaymentRequest:ue,allowUserMedia:ue,alt:null,as:null,async:ue,autoCapitalize:null,autoComplete:_e,autoFocus:ue,autoPlay:ue,blocking:_e,capture:null,charSet:null,checked:ue,cite:null,className:_e,cols:V,colSpan:null,content:null,contentEditable:je,controls:ue,controlsList:_e,coords:V|Er,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ue,defer:ue,dir:null,dirName:null,disabled:ue,download:vl,draggable:je,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ue,formTarget:null,headers:_e,height:V,hidden:vl,high:V,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:ue,inputMode:null,integrity:null,is:null,isMap:ue,itemId:null,itemProp:_e,itemRef:_e,itemScope:ue,itemType:_e,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:_e,placeholder:null,playsInline:ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ue,referrerPolicy:null,rel:_e,required:ue,reversed:ue,rows:V,rowSpan:V,sandbox:_e,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:je,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:je,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_e,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:je,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:XE}),KF=wr({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:Rt,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:_e,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:Er,g2:Er,glyphName:Er,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:Rt,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:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rt,rev:Rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rt,requiredFeatures:Rt,requiredFonts:Rt,requiredFormats:Rt,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:Rt,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:Rt,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:Rt,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:KE}),ZE=wr({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()}}),JE=wr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:XE}),QE=wr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),XF={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"},ZF=/[A-Z]/g,ew=/-[a-z]/g,JF=/^data[-\w.:]+$/i;function QF(e,t){const n=yl(t);let r=t,a=yt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&JF.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(ew,t2);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!ew.test(i)){let o=i.replace(ZF,e2);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=Sl}return new a(r,t)}function e2(e){return"-"+e.toLowerCase()}function t2(e){return e.charAt(1).toUpperCase()}const n2=$E([YE,YF,ZE,JE,QE],"html"),xl=$E([YE,KF,ZE,JE,QE],"svg");function r2(e){return e.join(" ").trim()}var Sr={},Tl,tw;function a2(){if(tw)return Tl;tw=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";Tl=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 Tl}var nw;function i2(){if(nw)return Sr;nw=1;var e=Sr&&Sr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.default=n;var t=e(a2());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 Sr}var fa={},rw;function o2(){if(rw)return fa;rw=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.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 fa.camelCase=l,fa}var ga,aw;function s2(){if(aw)return ga;aw=1;var e=ga&&ga.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(i2()),n=o2();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,ga=r,ga}var l2=s2();const u2=Ji(l2),iw=ow("end"),Al=ow("start");function ow(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 c2(e){const t=Al(e),n=iw(e);if(t&&n)return{start:t,end:n}}function ma(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?sw(e.position):"start"in e||"end"in e?sw(e):"line"in e||"column"in e?kl(e):""}function kl(e){return lw(e&&e.line)+":"+lw(e&&e.column)}function sw(e){return kl(e&&e.start)+"-"+kl(e&&e.end)}function lw(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=ma(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 Rl={}.hasOwnProperty,d2=new Map,p2=/[A-Z]/g,f2=new Set(["table","tbody","thead","tfoot","tr"]),g2=new Set(["td","th"]),uw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function m2(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=x2(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=S2(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"?xl:n2,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=cw(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function cw(e,t,n){if(t.type==="element")return h2(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return b2(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return v2(e,t,n);if(t.type==="mdxjsEsm")return y2(e,t);if(t.type==="root")return E2(e,t,n);if(t.type==="text")return w2(e,t)}function h2(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=xl,e.schema=a),e.ancestors.push(t);const i=pw(e,t.tagName,!1),o=T2(e,t);let s=Cl(e,t);return f2.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!$F(l):!0})),dw(e,o,i,t),Il(o,s),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function b2(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)}ha(e,t.position)}function y2(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ha(e,t.position)}function v2(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=xl,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:pw(e,t.name,!0),o=A2(e,t),s=Cl(e,t);return dw(e,o,i,t),Il(o,s),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function E2(e,t,n){const r={};return Il(r,Cl(e,t)),e.create(t,e.Fragment,r,n)}function w2(e,t){return t.value}function dw(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Il(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function S2(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 x2(e,t){return n;function n(r,a,i,o){const s=Array.isArray(i.children),l=Al(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 T2(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Rl.call(t.properties,a)){const i=k2(e,a,t.properties[a]);if(i){const[o,s]=i;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&g2.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 A2(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 ha(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 ha(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function Cl(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:d2;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=cw(e,i,o);s!==void 0&&n.push(s)}return n}function k2(e,t,n){const r=QF(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?zF(n):r2(n)),r.property==="style"){let a=typeof n=="object"?n:R2(e,String(n));return e.stylePropertyNameCase==="css"&&(a=I2(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?XF[r.property]||r.property:r.attribute,n]}}function R2(e,t){try{return u2(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=uw+"#cannot-parse-style-attribute",a}}function pw(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=VE(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=VE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Rl.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);ha(e)}function ha(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=uw+"#cannot-handle-mdx-estrees-without-createevaluater",n}function I2(e){const t={};let n;for(n in e)Rl.call(e,n)&&(t[C2(n)]=e[n]);return t}function C2(e){let t=e.replace(p2,_2);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function _2(e){return"-"+e.toLowerCase()}const _l={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"]},N2={};function Nl(e,t){const n=N2,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return fw(e,r,a)}function fw(e,t,n){if(O2(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 gw(e.children,t,n)}return Array.isArray(e)?gw(e,t,n):""}function gw(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=fw(e[a],t,n);return r.join("")}function O2(e){return!!(e&&typeof e=="object")}const mw=document.createElement("i");function Ol(e){const t="&"+e+";";mw.innerHTML=t;const n=mw.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function It(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 Mt(e,t){return e.length>0?(It(e,e.length,0,t),e):t}const hw={}.hasOwnProperty;function bw(e){const t={};let n=-1;for(;++n<e.length;)L2(t,e[n]);return t}function L2(e,t){let n;for(n in t){const a=(hw.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){hw.call(a,o)||(a[o]=[]);const s=i[o];D2(a[o],Array.isArray(s)?s:s?[s]:[])}}}function D2(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);It(e,0,0,r)}function yw(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 Ht(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ut=An(/[A-Za-z]/),ot=An(/[\dA-Za-z]/),M2=An(/[#-'*+\--9=?A-Z^-~]/);function _i(e){return e!==null&&(e<32||e===127)}const Ll=An(/\d/),P2=An(/[\dA-Fa-f]/),F2=An(/[!-/:-@[-`{-~]/);function re(e){return e!==null&&e<-2}function Re(e){return e!==null&&(e<0||e===32)}function pe(e){return e===-2||e===-1||e===32}const Ni=An(new RegExp("\\p{P}|\\p{S}","u")),Vn=An(/\s/);function An(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function xr(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let o="";if(i===37&&ot(e.charCodeAt(n+1))&&ot(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 he(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 B2={tokenize:U2};function U2(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"),he(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 j2={tokenize:z2},vw={tokenize:G2};function z2(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 It(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(vw,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(vw,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++;It(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 G2(e,t,n){return he(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tr(e){if(e===null||Re(e)||Vn(e))return 1;if(Ni(e))return 2}function Oi(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 Dl={name:"attention",resolveAll:q2,tokenize:V2};function q2(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};Ew(d,-l),Ew(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=Mt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Mt(u,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=Mt(u,Oi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Mt(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=Mt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,It(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 V2(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Tr(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=Tr(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 Ew(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const H2={name:"autolink",tokenize:$2};function $2(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||ot(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||ot(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||_i(f)?n(f):(e.consume(f),l)}function u(f){return f===64?(e.consume(f),c):M2(f)?(e.consume(f),u):n(f)}function c(f){return ot(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||ot(f))&&r++<63){const g=f===45?p:d;return e.consume(f),g}return n(f)}}const ba={partial:!0,tokenize:W2};function W2(e,t,n){return r;function r(i){return pe(i)?he(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||re(i)?t(i):n(i)}}const ww={continuation:{tokenize:K2},exit:X2,name:"blockQuote",tokenize:Y2};function Y2(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 K2(e,t,n){const r=this;return a;function a(o){return pe(o)?he(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(ww,t,n)(o)}}function X2(e){e.exit("blockQuote")}const Sw={name:"characterEscape",tokenize:Z2};function Z2(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 F2(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const xw={name:"characterReference",tokenize:J2};function J2(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=ot,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=P2,c):(e.enter("characterReferenceValue"),i=7,o=Ll,c(d))}function c(d){if(d===59&&a){const p=e.exit("characterReferenceValue");return o===ot&&!Ol(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 Tw={partial:!0,tokenize:eB},Aw={concrete:!0,name:"codeFenced",tokenize:Q2};function Q2(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)?he(e,d,"whitespace")(E):d(E))}function d(E){return E===null||re(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Tw,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"),he(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)?he(e,b,"linePrefix",i+1)(E):b(E)}function b(E){return E===null||re(E)?e.check(Tw,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)?he(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)?he(E,F,"whitespace")(z):F(z)):k(z)}function F(z){return z===null||re(z)?(E.exit("codeFencedFence"),T(z)):k(z)}}}function eB(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 Ml={name:"codeIndented",tokenize:nB},tB={partial:!0,tokenize:rB};function nB(e,t,n){const r=this;return a;function a(u){return e.enter("codeIndented"),he(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(tB,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 rB(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):he(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 aB={name:"codeText",previous:oB,resolve:iB,tokenize:sB};function iB(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 oB(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sB(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 lB{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&&ya(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),ya(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ya(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);ya(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ya(this.left,n.reverse())}}}function ya(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 kw(e){const t={};let n=-1,r,a,i,o,s,l,u;const c=new lB(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,uB(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 It(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function uB(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 cB={resolve:pB,tokenize:fB},dB={partial:!0,tokenize:gB};function pB(e){return kw(e),e}function fB(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(dB,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 gB(e,t,n){const r=this;return a;function a(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),he(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 Rw(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||_i(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||Re(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||_i(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 Iw(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 Cw(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"),he(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 va(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)?he(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const mB={name:"definition",tokenize:bB},hB={partial:!0,tokenize:yB};function bB(e,t,n){const r=this;let a;return i;function i(f){return e.enter("definition"),o(f)}function o(f){return Iw.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return a=Ht(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 Re(f)?va(e,u)(f):u(f)}function u(f){return Rw(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(hB,d,d)(f)}function d(f){return pe(f)?he(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 yB(e,t,n){return r;function r(s){return Re(s)?va(e,a)(s):n(s)}function a(s){return Cw(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return pe(s)?he(e,o,"whitespace")(s):o(s)}function o(s){return s===null||re(s)?t(s):n(s)}}const vB={name:"hardBreakEscape",tokenize:EB};function EB(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 wB={name:"headingAtx",resolve:SB,tokenize:xB};function SB(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"},It(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function xB(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||Re(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)?he(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||Re(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}const TB=["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"],_w=["pre","script","style","textarea"],AB={concrete:!0,name:"htmlFlow",resolveTo:IB,tokenize:CB},kB={partial:!0,tokenize:NB},RB={partial:!0,tokenize:_B};function IB(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 CB(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||Re(A)){const Y=A===47,se=o.toLowerCase();return!Y&&!i&&_w.includes(se)?(a=1,r.interrupt?t(A):B(A)):TB.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||ot(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||ot(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||Re(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(kB,ne,P)(A)):A===null||re(A)?(e.exit("htmlFlowData"),P(A)):(e.consume(A),B)}function P(A){return e.check(RB,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 _w.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 _B(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 NB(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ba,t,n)}}const OB={name:"htmlText",tokenize:LB};function LB(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||ot(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||ot(R)?(e.consume(R),k):R===47||R===62||Re(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||ot(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||Re(R)?C(R):(e.consume(R),F)}function z(R){return R===47||R===62||Re(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)?he(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):$(R)}function $(R){return e.enter("htmlTextData"),o(R)}}const Pl={name:"labelEnd",resolveAll:FB,resolveTo:BB,tokenize:UB},DB={tokenize:jB},MB={tokenize:zB},PB={tokenize:GB};function FB(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&&It(e,0,e.length,n),e}function BB(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=Mt(s,e.slice(i+1,i+r+3)),s=Mt(s,[["enter",c,t]]),s=Mt(s,Oi(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),s=Mt(s,[["exit",c,t],e[o-2],e[o-1],["exit",u,t]]),s=Mt(s,e.slice(o+1)),s=Mt(s,[["exit",l,t]]),It(e,i,e.length,s),e}function UB(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(Ht(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(DB,c,o?c:d)(p):p===91?e.attempt(MB,c,o?u:d)(p):o?c(p):d(p)}function u(p){return e.attempt(PB,c,d)(p)}function c(p){return t(p)}function d(p){return i._balanced=!0,n(p)}}function jB(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 Re(d)?va(e,i)(d):i(d)}function i(d){return d===41?c(d):Rw(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return Re(d)?va(e,l)(d):c(d)}function s(d){return n(d)}function l(d){return d===34||d===39||d===40?Cw(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Re(d)?va(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 zB(e,t,n){const r=this;return a;function a(s){return Iw.call(r,e,i,o,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Ht(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function GB(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 qB={name:"labelStartImage",resolveAll:Pl.resolveAll,tokenize:VB};function VB(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 HB={name:"labelStartLink",resolveAll:Pl.resolveAll,tokenize:$B};function $B(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 Fl={name:"lineEnding",tokenize:WB};function WB(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),he(e,t,"linePrefix")}}const Li={name:"thematicBreak",tokenize:YB};function YB(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)?he(e,s,"whitespace")(u):s(u))}}const vt={continuation:{tokenize:JB},exit:eU,name:"list",tokenize:ZB},KB={partial:!0,tokenize:tU},XB={partial:!0,tokenize:QB};function ZB(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:Ll(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(Li,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 Ll(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(ba,r.interrupt?n:c,e.attempt(KB,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 JB(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ba,a,i);function a(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,he(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(XB,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,he(e,e.attempt(vt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function QB(e,t,n){const r=this;return he(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 eU(e){e.exit(this.containerState.type)}function tU(e,t,n){const r=this;return he(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 Nw={name:"setextUnderline",resolveTo:nU,tokenize:rU};function nU(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 rU(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)?he(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||re(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const aU={tokenize:iU};function iU(e){const t=this,n=e.attempt(ba,r,e.attempt(this.parser.constructs.flowInitial,a,he(e,e.attempt(this.parser.constructs.flow,a,e.attempt(cB,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 oU={resolveAll:Lw()},sU=Ow("string"),lU=Ow("text");function Ow(e){return{resolveAll:Lw(e==="text"?uU: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 Lw(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 uU(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 cU=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:mB},disable:{null:[]},document:{42:vt,43:vt,45:vt,48:vt,49:vt,50:vt,51:vt,52:vt,53:vt,54:vt,55:vt,56:vt,57:vt,62:ww},flow:{35:wB,42:Li,45:[Nw,Li],60:AB,61:Nw,95:Li,96:Aw,126:Aw},flowInitial:{[-2]:Ml,[-1]:Ml,32:Ml},insideSpan:{null:[Dl,oU]},string:{38:xw,92:Sw},text:{[-5]:Fl,[-4]:Fl,[-3]:Fl,33:qB,38:xw,42:Dl,60:[H2,OB],91:HB,92:[vB,Sw],93:Pl,95:Dl,96:aB}},Symbol.toStringTag,{value:"Module"}));function dU(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=Mt(o,D),v(),o[o.length-1]!==null?[]:(k(t,0),u.events=Oi(i,u.events,u),u.events)}function p(D,B){return fU(f(D),B)}function f(D){return pU(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 te;function te(de){const ye=de!==null&&ae[de],we=de!==null&&ae.null,Ae=[...Array.isArray(ye)?ye:ye?[ye]:[],...Array.isArray(we)?we:we?[we]:[]];return ne(Ae)(de)}}function ne(ae){return G=ae,L=0,ae.length===0?H:A(ae[L])}function A(ae){return te;function te(de){return R=C(),$=ae,ae.partial||(u.currentConstruct=ae),ae.name&&u.parser.constructs.disable.null.includes(ae.name)?se():ae.tokenize.call(B?Object.assign(Object.create(u),B):u,l,Y,se)(de)}}function Y(ae){return D($,R),z}function se(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&&It(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 pU(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 fU(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 gU(e){const r={constructs:bw([cU,...(e||{}).extensions||[]]),content:a(B2),defined:[],document:a(j2),flow:a(aU),lazy:{},string:a(sU),text:a(lU)};return r;function a(i){return o;function o(s){return dU(r,i,s)}}}function mU(e){for(;!kw(e););return e}const Dw=/[\0\t\n\r]/g;function hU(){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(Dw.lastIndex=d,u=Dw.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 bU=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yU(e){return e.replace(bU,vU)}function vU(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return yw(n.slice(i?2:1),i?16:10)}return Ol(n)||e}const Mw={}.hasOwnProperty;function EU(e,t,n){return typeof t!="string"&&(n=t,t=void 0),wU(n)(mU(gU(n).document().write(hU()(e,t,!0))))}function wU(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(He),autolinkProtocol:C,autolinkEmail:C,atxHeading:i(Je),blockQuote:i(we),characterEscape:C,characterReference:C,codeFenced:i(Ae),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(Ae,o),codeText:i(qe,o),codeTextData:C,data:C,codeFlowValue:C,definition:i(Ve),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(on),hardBreakEscape:i(Ie),hardBreakTrailing:i(Ie),htmlFlow:i(Pt,o),htmlFlowData:C,htmlText:i(Pt,o),htmlTextData:C,image:i(Qe),label:o,link:i(He),listItem:i(fn),listItemValue:p,listOrdered:i(Ye,d),listUnordered:i(Ye),paragraph:i(ct),reference:A,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(Je),strong:i(gn),thematicBreak:i(ke)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:ye,autolinkProtocol:de,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:ae,characterReference:te,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()}};Pw(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 et=ie.pop();me=a(M,et,me)}for(me=-1;++me<M.length;){const et=t[M[me][0]];Mw.call(et,M[me][1].type)&&et[M[me][1].type].call(Object.assign({sliceSerialize:M[me][2].sliceSerialize},K),M[me][1])}if(K.tokenStack.length>0){const et=K.tokenStack[K.tokenStack.length-1];(et[1]||Fw).call(K,void 0,et[0])}for(j.position={start:kn(M.length>0?M[0][1].start:{line:1,column:1,offset:0}),end:kn(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,et=!1,tt,nt,dt,rt;for(;++ie<=K;){const Ke=M[ie];switch(Ke[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ke[0]==="enter"?me++:me--,rt=void 0;break}case"lineEndingBlank":{Ke[0]==="enter"&&(tt&&!rt&&!me&&!dt&&(dt=ie),rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rt=void 0}if(!me&&Ke[0]==="enter"&&Ke[1].type==="listItemPrefix"||me===-1&&Ke[0]==="exit"&&(Ke[1].type==="listUnordered"||Ke[1].type==="listOrdered")){if(tt){let wt=ie;for(nt=void 0;wt--;){const Xe=M[wt];if(Xe[1].type==="lineEnding"||Xe[1].type==="lineEndingBlank"){if(Xe[0]==="exit")continue;nt&&(M[nt][1].type="lineEndingBlank",et=!0),Xe[1].type="lineEnding",nt=wt}else if(!(Xe[1].type==="linePrefix"||Xe[1].type==="blockQuotePrefix"||Xe[1].type==="blockQuotePrefixWhitespace"||Xe[1].type==="blockQuoteMarker"||Xe[1].type==="listItemIndent"))break}dt&&(!nt||dt<nt)&&(tt._spread=!0),tt.end=Object.assign({},nt?M[nt][1].start:Ke[1].end),M.splice(nt||ie,0,["exit",tt,Ke[2]]),ie++,K++}if(Ke[1].type==="listItemPrefix"){const wt={type:"listItem",_spread:!1,start:Object.assign({},Ke[1].start),end:void 0};tt=wt,M.splice(ie,0,["enter",wt,Ke[2]]),ie++,K++,dt=void 0,rt=!0}}}return M[j][1]._spread=et,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:kn(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]||Fw).call(this,M,ie[0]));else throw new Error("Cannot close `"+M.type+"` ("+ma({start:M.start,end:M.end})+"): it’s not open");K.position.end=kn(M.end)}function c(){return Nl(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=Ht(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:kn(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=kn(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=kn(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=yU(j),K.identifier=Ht(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=Ht(this.sliceSerialize(M)).toLowerCase(),this.data.referenceType="full"}function se(M){this.data.characterReferenceType=M.type}function ae(M){const j=this.sliceSerialize(M),K=this.data.characterReferenceType;let ie;K?(ie=yw(j,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=Ol(j);const me=this.stack[this.stack.length-1];me.value+=ie}function te(M){const j=this.stack.pop();j.position.end=kn(M.end)}function de(M){I.call(this,M);const j=this.stack[this.stack.length-1];j.url=this.sliceSerialize(M)}function ye(M){I.call(this,M);const j=this.stack[this.stack.length-1];j.url="mailto:"+this.sliceSerialize(M)}function we(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function qe(){return{type:"inlineCode",value:""}}function Ve(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function on(){return{type:"emphasis",children:[]}}function Je(){return{type:"heading",depth:0,children:[]}}function Ie(){return{type:"break"}}function Pt(){return{type:"html",value:""}}function Qe(){return{type:"image",title:null,url:"",alt:null}}function He(){return{type:"link",title:null,url:"",children:[]}}function Ye(M){return{type:"list",ordered:M.type==="listOrdered",start:null,spread:M._spread,children:[]}}function fn(M){return{type:"listItem",spread:M._spread,checked:null,children:[]}}function ct(){return{type:"paragraph",children:[]}}function gn(){return{type:"strong",children:[]}}function U(){return{type:"text",value:""}}function ke(){return{type:"thematicBreak"}}}function kn(e){return{line:e.line,column:e.column,offset:e.offset}}function Pw(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Pw(e,r):SU(e,r)}}function SU(e,t){let n;for(n in t)if(Mw.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 Fw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ma({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ma({start:t.start,end:t.end})+") is still open")}function xU(e){const t=this;t.parser=n;function n(r){return EU(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function TU(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 AU(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=Aa(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),l(),s(),u}S0.peek=I4;function S0(e){return e.value||""}function I4(){return"<"}x0.peek=C4;function x0(e,t,n,r){const a=rm(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 C4(){return"!"}T0.peek=_4;function T0(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 _4(){return"!"}A0.peek=N4;function A0(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 N4(){return"`"}function k0(e,t){const n=Nl(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))}R0.peek=O4;function R0(e,t,n,r){const a=rm(n),i=a==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,l;if(k0(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 O4(e,t,n){return k0(e,n)?"<":"["}I0.peek=L4;function I0(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 L4(){return"["}function am(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 D4(e){const t=am(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 M4(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 C0(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 P4(e,t,n,r){const a=n.enter("list"),i=n.bulletCurrent;let o=e.ordered?M4(n):am(n);const s=e.ordered?o==="."?")":".":D4(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),C0(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 F4(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 B4(e,t,n,r){const a=F4(n);let i=n.bulletCurrent||am(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 U4(e,t,n,r){const a=n.enter("paragraph"),i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),a(),o}const j4=Ui(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function z4(e,t,n,r){return(e.children.some(function(o){return j4(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function G4(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}_0.peek=q4;function _0(e,t,n,r){const a=G4(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=Ki(r.before.charCodeAt(r.before.length-1),u,a);c.inside&&(l=Aa(u)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Ki(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+Aa(d));const f=o.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},s+l+f}function q4(e,t,n){return n.options.strong||"*"}function V4(e,t,n,r){return n.safe(e.value,r)}function H4(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 $4(e,t,n){const r=(C0(n)+(n.options.ruleSpaces?" ":"")).repeat(H4(n));return n.options.ruleSpaces?r.slice(0,-1):r}const N0={blockquote:m4,break:E0,code:w4,definition:x4,emphasis:w0,hardBreak:E0,heading:R4,html:S0,image:x0,imageReference:T0,inlineCode:A0,link:R0,linkReference:I0,list:P4,listItem:B4,paragraph:U4,root:z4,strong:_0,text:V4,thematicBreak:$4};function W4(){return{enter:{table:Y4,tableData:O0,tableHeader:O0,tableRow:X4},exit:{codeText:Z4,table:K4,tableData:im,tableHeader:im,tableRow:im}}}function Y4(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 K4(e){this.exit(e),this.data.inTable=void 0}function X4(e){this.enter({type:"tableRow",children:[]},e)}function im(e){this.exit(e)}function O0(e){this.enter({type:"tableCell",children:[]},e)}function Z4(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,J4));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function J4(e,t){return t==="|"?t:e}function Q4(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 f4(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=N0.inlineCode(f,g,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function eH(){return{exit:{taskListCheckValueChecked:L0,taskListCheckValueUnchecked:L0,paragraph:nH}}}function tH(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rH}}}function L0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function nH(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 rH(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=N0.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 aH(){return[PV(),r4(),s4(),W4(),eH()]}function iH(e){return{extensions:[FV(),a4(e),l4(),Q4(e),tH()]}}const oH={tokenize:pH,partial:!0},D0={tokenize:fH,partial:!0},M0={tokenize:gH,partial:!0},P0={tokenize:mH,partial:!0},sH={tokenize:hH,partial:!0},F0={name:"wwwAutolink",tokenize:cH,previous:U0},B0={name:"protocolAutolink",tokenize:dH,previous:j0},pn={name:"emailAutolink",tokenize:uH,previous:z0},an={};function lH(){return{text:an}}let $n=48;for(;$n<123;)an[$n]=pn,$n++,$n===58?$n=65:$n===91&&($n=97);an[43]=pn,an[45]=pn,an[46]=pn,an[95]=pn,an[72]=[pn,B0],an[104]=[pn,B0],an[87]=[pn,F0],an[119]=[pn,F0];function uH(e,t,n){const r=this;let a,i;return o;function o(d){return!om(d)||!z0.call(r,r.previous)||sm(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return om(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(sH,c,u)(d):d===45||d===95||ot(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 cH(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!U0.call(r,r.previous)||sm(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(oH,e.attempt(D0,e.attempt(M0,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function dH(e,t,n){const r=this;let a="",i=!1;return o;function o(d){return(d===72||d===104)&&j0.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||_i(d)||Re(d)||Vn(d)||Ni(d)?n(d):e.attempt(D0,e.attempt(M0,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function pH(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 fH(e,t,n){let r,a,i;return o;function o(u){return u===46||u===95?e.check(P0,l,s)(u):u===null||Re(u)||Vn(u)||u!==45&&Ni(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 gH(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(P0,t,i)(o):o===null||Re(o)||Vn(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function mH(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||Re(s)||Vn(s)?t(s):n(s)}function a(s){return s===null||s===40||s===91||Re(s)||Vn(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 hH(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return ot(i)?n(i):t(i)}}function U0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Re(e)}function j0(e){return!ut(e)}function z0(e){return!(e===47||om(e))}function om(e){return e===43||e===45||e===46||e===95||ot(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 bH={tokenize:AH,partial:!0};function yH(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:SH,continuation:{tokenize:xH},exit:TH}},text:{91:{name:"gfmFootnoteCall",tokenize:wH},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vH,resolveTo:EH}}}}function vH(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=Ht(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 EH(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 wH(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||Re(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return a.includes(Ht(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Re(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 SH(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||Re(g))return n(g);if(g===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Ht(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Re(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),he(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function xH(e,t,n){return e.check(ba,t,e.attempt(bH,t,n))}function TH(e){e.exit("gfmFootnoteDefinition")}function AH(e,t,n){const r=this;return he(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 kH(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&&It(p,p.length,0,Oi(f,o.slice(u+1,l),s)),It(p,p.length,0,[["exit",d,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",c,s]]),It(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=Tr(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=Tr(g);return v._open=!h||h===2&&!!m,v._close=!m||m===2&&!!h,s(g)}}}class RH{constructor(){this.map=[]}add(t,n,r){IH(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 IH(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 CH(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 _H(){return{flow:{null:{name:"table",tokenize:NH,resolveAll:OH}}}}function NH(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)?he(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||Re(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)?he(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)?he(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)?he(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)?he(e,T,"whitespace")(I):(e.enter("data"),k(I))}function k(I){return I===null||I===124||Re(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 OH(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 RH;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(G0(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=Xi(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=Xi(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=Xi(p,t,i,a,n,d)):o[1]!==0&&(d=Xi(p,t,o,a,n,d)),a=0):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&G0(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=CH(t.events,n))}return e}function Xi(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Rr(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Rr(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=Rr(t.events,n[2]),c=Rr(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({},Rr(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function G0(e,t,n,r,a){const i=[],o=Rr(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 Rr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const LH={name:"tasklistCheck",tokenize:MH};function DH(){return{text:{91:LH}}}function MH(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 Re(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:PH},t,n)(l):n(l)}}function PH(e,t,n){return he(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function FH(e){return bw([lH(),yH(),kH(e),_H(),DH()])}const BH={};function UH(e){const t=this,n=e||BH,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(FH(n)),i.push(aH()),o.push(iH(n))}const jH=fe.create(WL),zH=fe.create(KL),q0=({isExpanded:e,onClick:t,className:n,iconClassName:r,disabled:a})=>w.jsxs(tn,{children:[w.jsx(nn,{onClick:t,className:n,disabled:a,children:w.jsx(Kt,{mode:"wait",initial:!1,children:e?w.jsx(jH,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:ee("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"collapsed"):w.jsx(zH,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:ee("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"})})]}),V0={'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%)"}},H0=({children:e,className:t})=>w.jsx("div",{className:ee("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}),$0=({children:e})=>w.jsx("div",{className:"flex justify-between bg-telnyx-gray-hover-light rounded-t-lg py-1.5 px-4",children:e}),GH=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})}),qH=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:"↗"})]}),W0=({children:e})=>w.jsx("p",{className:"text-black pt-2 font-bold",children:e}),VH=({children:e})=>w.jsx("p",{className:"text-base",children:e}),HH=e=>({img:GH,h1:W0,h2:W0,a:qH,p:VH,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(zt.COLLAPSED),c=O.useRef(null),d=/language-(\w+)/.exec(n||""),p=String(r).replace(/\n$/,""),f=()=>{u(zt.EXPANDED),o(i+1),document.body.style.overflow="hidden"},g=()=>{u(zt.COLLAPSED),o(i-1),document.body.style.overflow="auto"},m=i>0;return!t&&d?w.jsxs(w.Fragment,{children:[w.jsx(Kt,{children:l===zt.EXPANDED&&w.jsxs(bl,{targetMountContainer:document.body,children:[w.jsx(fe.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(fe.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(fe.div,{className:ee("w-[60%] max-w-full max-h-[90%] rounded-lg overflow-hidden"),ref:c,children:w.jsxs(H0,{className:"overflow-y-hidden",children:[w.jsxs($0,{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(Y0,{isExpanded:l===zt.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:ee("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(Qg,{...a,children:String(r).replace(/\n$/,""),style:V0,language:s?d[1]:"text/plain",PreTag:"div",showLineNumbers:!0,wrapLongLines:!0})})})]})})},"expanded-code")]})}),w.jsxs(H0,{children:[w.jsxs($0,{children:[w.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center",children:d&&d[1]||"Unknown"}),s&&w.jsx(Y0,{isExpanded:l===zt.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(Qg,{...a,children:String(r).replace(/\n$/,""),style:V0,language:s?d[1]:"text/plain",PreTag:"div",wrapLongLines:!0})})]})]}):w.jsx("code",{...a,className:ee("bg-transparent p-1",n),children:r})})}),$H=O.memo(({children:e,state:t})=>w.jsx("div",{className:ee("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(Gj,{components:HH(t),remarkPlugins:[UH],children:e})})),Y0=({isExpanded:e,handleExpand:t,handleCollapse:n,textToCopy:r})=>w.jsxs("div",{className:"flex",children:[w.jsx(hl,{textToCopy:r,className:ee("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:ee("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"})]}),WH=fe.create(fv),YH={pressed:{scale:.8},hovered:{scale:1.1},idle:{scale:1},transition:{duration:.15}},KH=O.memo(({onClick:e,className:t,iconClassName:n})=>w.jsxs(tn,{children:[w.jsx(nn,{onClick:e,className:ee("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(Kt,{children:w.jsx(WH,{initial:"idle",whileHover:"hovered",whileTap:"pressed",animate:"idle",exit:"idle",variants:YH,className:ee("size-5 focus:outline-none focus:ring-0",n)},"close")})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Collapse message"})})]})),XH=({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(hl,{textToCopy:t,className:ee("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(KH,{onClick:n,className:ee("border-0","flex items-center justify-center","h-fit")})]})]}),ZH=({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(tn,{children:[w.jsx(nn,{onClick:a(pr.POSITIVE),className:ee("text-stone-600 cursor-pointer hover:text-stone-900",n===pr.POSITIVE&&"text-telnyx-green hover:text-telnyx-green/80"),children:n===pr.POSITIVE?w.jsx(MP,{className:"size-4"}):w.jsx(rD,{className:"size-4"})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Helpful"})})]}),w.jsxs(tn,{children:[w.jsx(nn,{onClick:a(pr.NEGATIVE),className:ee("text-stone-600 cursor-pointer hover:text-stone-900",n===pr.NEGATIVE&&"text-red-600 hover:text-red-700"),children:n===pr.NEGATIVE?w.jsx(LP,{className:"size-4"}):w.jsx(tD,{className:"size-4"})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Not helpful"})})]})]})},JH=Ci(["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"}}),QH=({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}}}),e$=({variant:e,state:t,children:n})=>w.jsx(fe.div,{initial:"initial",animate:"animate",exit:"exit",variants:QH({variant:e,state:t}),className:JH({variant:e,state:t}),children:n}),t$=Ci(["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"}}),n$=Ci(["flex items-center mb-2 gap-1"],{variants:{variant:{bot:["justify-self-start"],user:["justify-self-end flex-row-reverse"]}},defaultVariants:{variant:"bot"}}),K0=O.memo(({variant:e,children:t,state:n,handleRetry:r,isFirstMessage:a,timestamp:i,feedbackId:o})=>{const s=J(b=>b.endpoint),l=NL(i),u=J(b=>b.numMessagesExpanded),c=J(b=>b.setNumMessagesExpanded),d=J(b=>b.botState),[p,f]=O.useState(zt.COLLAPSED),g=O.useRef(null),m=O.useCallback(()=>{f(zt.EXPANDED),c(u+1),document.body.style.overflow="hidden"},[u,c,f]),v=O.useCallback(()=>{f(zt.COLLAPSED),c(u-1),document.body.style.overflow="auto"},[u,c,f]),h=()=>{if(n==="streaming"||n==="complete")return w.jsx($H,{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(a$,{}),d==="error"&&w.jsx(r$,{onClick:r})]});if(n==="loading")return s===Ee.AIDA?w.jsx(jF,{isLoaded:!1,progressMessage:t},`loading-${t}`):w.jsx("div",{className:"flex items-center gap-3",children:w.jsx(PF,{size:24,spokeWidth:2,animationDuration:4})})};return w.jsxs(w.Fragment,{children:[w.jsx(Kt,{mode:"wait",children:p===zt.EXPANDED&&w.jsxs(bl,{targetMountContainer:document.body,children:[w.jsx(fe.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(fe.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:ee("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:t$({variant:e}),children:[w.jsx(XH,{variant:e,textToCopy:t,onCloseClick:v}),h()]})})},"expanded-message")]})}),w.jsx(e$,{variant:e,state:n,children:h()}),w.jsxs("div",{className:n$({variant:e}),children:[w.jsx("span",{className:ee("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===zt.EXPANDED}),w.jsx(hl,{textToCopy:t}),!!o&&w.jsx(ZH,{feedbackId:o})]})]})]})}),r$=({onClick:e})=>w.jsx("span",{className:"flex w-full justify-center text-sm",children:w.jsx("button",{className:ee("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"})}),a$=()=>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(dv,{className:"size-4 animate-spin"})]})}),X0=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"})}));X0.displayName="RCSIcon";const Oe={TOP_LEFT:"top-left",TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left"},Ne=Oe,be={INSIDE:"inside",OUTSIDE:"outside"},i$={[Ne.TOP_LEFT]:{[be.INSIDE]:Oe.TOP_LEFT,[be.OUTSIDE]:Oe.BOTTOM_RIGHT},[Ne.TOP]:{[be.INSIDE]:Oe.TOP,[be.OUTSIDE]:Oe.BOTTOM},[Ne.TOP_RIGHT]:{[be.INSIDE]:Oe.TOP_RIGHT,[be.OUTSIDE]:Oe.BOTTOM_LEFT},[Ne.RIGHT]:{[be.INSIDE]:Oe.RIGHT,[be.OUTSIDE]:Oe.LEFT},[Ne.BOTTOM_RIGHT]:{[be.INSIDE]:Oe.BOTTOM_RIGHT,[be.OUTSIDE]:Oe.TOP_LEFT},[Ne.BOTTOM]:{[be.INSIDE]:Oe.BOTTOM,[be.OUTSIDE]:Oe.TOP},[Ne.BOTTOM_LEFT]:{[be.INSIDE]:Oe.BOTTOM_LEFT,[be.OUTSIDE]:Oe.TOP_RIGHT},[Ne.LEFT]:{[be.INSIDE]:Oe.LEFT,[be.OUTSIDE]:Oe.RIGHT}},ka={CUSTOM:"custom",DEFAULT:"default"},o$={[Lt.OPEN]:({numMessagesExpanded:e,position:t,isCustomMounted:n})=>{const r=n?0:-28,a=n?0:-28,[i,o]=Z0(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}}},[Lt.CLOSED]:({position:e,isCustomMounted:t})=>{const n=t?0:16,r=t?0:-28,a=t?0:-28,[i,o]=Z0(e,r,a);return{clipPath:`circle(${n}px at calc(${i}) calc(${o}))`,transition:{delay:.1,type:"spring",stiffness:900,damping:160}}}};function Z0(e,t=0,n=0){const r=t>0?"+":"-",a=n>0?"+":"-",i=Math.abs(t),o=Math.abs(n);switch(e){case Oe.TOP_LEFT:return[`0% ${r} ${i}px`,`0% ${a} ${o}px`];case Oe.TOP:return[`50% ${r} ${i}px`,`0% ${a} ${o}px`];case Oe.TOP_RIGHT:return[`100% ${r} ${i}px`,`0% ${a} ${o}px`];case Oe.RIGHT:return[`100% ${r} ${i}px`,`50% ${a} ${o}px`];case Oe.BOTTOM_RIGHT:return[`100% ${r} ${i}px`,`100% ${a} ${o}px`];case Oe.BOTTOM:return[`50% ${r} ${i}px`,`100% ${a} ${o}px`];case Oe.BOTTOM_LEFT:return[`0% ${r} ${i}px`,`100% ${a} ${o}px`];case Oe.LEFT:return[`0% ${r} ${i}px`,`50% ${a} ${o}px`]}}const s$=Ci("rounded-xl bg-black shadow-lg",{variants:{mountType:{[ka.CUSTOM]:"absolute",[ka.DEFAULT]:"fixed bottom-4! right-4!"},mountPositionAndDirection:{[`${Ne.TOP_LEFT}-${be.INSIDE}`]:"top-0 left-0",[`${Ne.TOP_LEFT}-${be.OUTSIDE}`]:"bottom-full right-full",[`${Ne.TOP}-${be.INSIDE}`]:"top-0 left-1/2 -translate-x-1/2",[`${Ne.TOP}-${be.OUTSIDE}`]:"bottom-full left-1/2 -translate-x-1/2",[`${Ne.TOP_RIGHT}-${be.INSIDE}`]:"top-0 right-0",[`${Ne.TOP_RIGHT}-${be.OUTSIDE}`]:"bottom-full left-full",[`${Ne.RIGHT}-${be.INSIDE}`]:"top-1/2 -translate-y-1/2 right-0 ",[`${Ne.RIGHT}-${be.OUTSIDE}`]:"top-1/2 -translate-y-1/2 left-full",[`${Ne.BOTTOM_RIGHT}-${be.INSIDE}`]:"bottom-0 right-0",[`${Ne.BOTTOM_RIGHT}-${be.OUTSIDE}`]:"top-full left-full",[`${Ne.BOTTOM}-${be.INSIDE}`]:"bottom-0 left-1/2 -translate-x-1/2",[`${Ne.BOTTOM}-${be.OUTSIDE}`]:"top-full left-1/2 -translate-x-1/2",[`${Ne.BOTTOM_LEFT}-${be.INSIDE}`]:"bottom-0 left-0",[`${Ne.BOTTOM_LEFT}-${be.OUTSIDE}`]:"top-full right-full",[`${Ne.LEFT}-${be.INSIDE}`]:"top-1/2 -translate-y-1/2 left-0",[`${Ne.LEFT}-${be.OUTSIDE}`]:"top-1/2 -translate-y-1/2 right-full"}},defaultVariants:{mountPositionAndDirection:`${Ne.BOTTOM_RIGHT}-${be.INSIDE}`,mountType:ka.DEFAULT}}),l$={[lt.INITIAL]:{height:"78%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px"},[lt.USER_HAS_TYPED]:{height:"94%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"16px",borderTopRightRadius:"16px"}},u$={[lt.INITIAL]:{height:"22%"},[lt.USER_HAS_TYPED]:{height:"6%"}},c$=({chatAPIUrl:e=ht.CHAT_API_URL,flowAPIUrl:t=ht.FLOW_API_URL,flowApiKey:n,feedbackAPIUrl:r=ht.FEEDBACK_API_URL,user:a,onHelpAction:i,open:o,setOpen:s,placeholders:l=ht.DEFAULT_PLACEHOLDERS,mountPosition:u=Ne.BOTTOM_RIGHT,mountDirection:c=be.INSIDE,offsetX:d=0,offsetY:p=0,icon:f=X0})=>{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===Lt.OPEN,L=s?ka.CUSTOM:ka.DEFAULT,$=`${u}-${c}`,R=i$[u][c],Q=!!s,ne=J(U=>U.botState),A=J(U=>U.setBotState),Y=J(U=>U.numRetries),se=J(U=>U.setNumRetries),ae=J(U=>U.retryTimeoutId),te=J(U=>U.setRetryTimeoutId),de=J(U=>U.chatStartTimestamp),ye=Ts[g].firstMessage,{chat:we,lastMessage:Ae}=BL(),[qe,Ve]=O.useState(!0),on=O.useRef(null),Je=O.useRef(null),Ie=O.useRef(null),Pt=UL(Ie),Qe=O.useRef(`telnyx-widget-fonts-${Math.random().toString(36).substring(2,9)}`);O.useEffect(()=>{const U=Qe.current;if(U){if(!document.getElementById(U)){const ke=document.createElement("style");ke.id=U,ke.textContent=jL,document.head.appendChild(ke)}return()=>{const ke=document.getElementById(U);ke&&ke.remove()}}},[Qe.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=Je.current)==null||U.focus())},[G]);const He=O.useCallback(()=>{const U=k[k.length-2];if(U.type==="user"&&U.message.length>0){T(U.message),A("retrying");const ke=setTimeout(async()=>{try{C({type:Te.DELETE_LAST_MESSAGE_PAIR,payload:null}),se(Y+1),await we(U.message)}catch(M){console.error("[Retry Logic] Chat failed during retry:",M)}},ht.RETRY_INTERVAL);te(ke)}},[k,we,Y,C]);O.useEffect(()=>{ne==="error"&&(ae||(Y<ht.MAX_RETRIES?He():Y>=ht.MAX_RETRIES&&console.error("[Retry Logic] Max retries reached, stopping retry attempts")))},[ne,Y,ae,He]),O.useEffect(()=>{const U=Ie.current;U&&qe&&(Ae==null?void 0:Ae.message.length)>0&&(U.scrollTop=U.scrollHeight)},[Ae==null?void 0:Ae.message.length,qe]);const Ye=O.useCallback(()=>{const U=Je.current;U&&(U.style.height="auto",U.style.height=`${U.scrollHeight}px`)},[]),fn=U=>{Ye(),B(lt.USER_HAS_TYPED),T(U.target.value)};O.useEffect(()=>{k.length===0&&requestAnimationFrame(Ye)},[k.length,Ye]);const ct=async()=>{T(""),requestAnimationFrame(Ye),await we(E);const U=Ie.current;U&&U.scrollTo({top:U.scrollHeight,behavior:"smooth"})},gn=()=>{const U=Ie.current;if(!U)return;const ke=Math.abs(U.scrollHeight-U.clientHeight-U.scrollTop)<=5;Ve(ke)};return w.jsx(bl,{ref:on,children:w.jsx(pE,{delayDuration:75,skipDelayDuration:0,children:w.jsxs(Kt,{children:[w.jsxs(fe.div,{initial:!1,animate:I,variants:o$,custom:{numMessagesExpanded:P,position:R,isCustomMounted:Q},className:ee(s$({mountType:L,mountPositionAndDirection:$})),style:{height:ht.WIDGET_HEIGHT,width:ht.WIDGET_WIDTH,translateX:d,translateY:p},children:[w.jsx(fe.div,{initial:!1,animate:D,className:"px-4 pt-4 bg-black rounded-t-xl",variants:u$,children:w.jsx(LF,{className:"flex flex-col justify-between h-full pb-4",children:w.jsx(NP,{resetChatCustomHandler:Ye})})}),w.jsxs(fe.div,{initial:!1,animate:D,className:ee("flex flex-col justify-between bg-telnyx-cream rounded-b-xl rounded-t-3xl p-4 pb-1.5","relative overflow-hidden"),variants:l$,children:[Pt&&w.jsxs(w.Fragment,{children:[w.jsx(cl,{containerRef:Ie,direction:"up"}),w.jsx(cl,{containerRef:Ie,direction:"down"})]}),w.jsxs("div",{ref:Ie,className:ee("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:gn,children:[w.jsx(K0,{variant:"bot",isFirstMessage:!0,state:"complete",timestamp:de,children:ye},"bot-initial"),k.map(U=>w.jsx(K0,{variant:U.type,timestamp:U.timestamp,state:U.state,feedbackId:U.feedback_id,handleRetry:He,children:U.message},U.id))]}),w.jsx(jE,{ref:Je,question:E,handleInput:fn,handleSendMessage:ct})]})]},"widget-container"),!Q&&w.jsx(YP,{question:E,handleSendMessage:ct,triggerIcon:f},"chat-trigger-button")]})})})};$e.ChatWidget=c$,$e.Tooltip=tn,$e.TooltipContent=Vt,$e.TooltipProvider=pE,$e.TooltipTrigger=nn,Object.defineProperty($e,Symbol.toStringTag,{value:"Module"})}));
|
|
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 f4(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=N0.inlineCode(f,g,m);return m.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function eH(){return{exit:{taskListCheckValueChecked:L0,taskListCheckValueUnchecked:L0,paragraph:nH}}}function tH(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rH}}}function L0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function nH(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 rH(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=N0.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 aH(){return[PV(),r4(),s4(),W4(),eH()]}function iH(e){return{extensions:[FV(),a4(e),l4(),Q4(e),tH()]}}const oH={tokenize:pH,partial:!0},D0={tokenize:fH,partial:!0},M0={tokenize:gH,partial:!0},P0={tokenize:mH,partial:!0},sH={tokenize:hH,partial:!0},F0={name:"wwwAutolink",tokenize:cH,previous:U0},B0={name:"protocolAutolink",tokenize:dH,previous:j0},pn={name:"emailAutolink",tokenize:uH,previous:z0},an={};function lH(){return{text:an}}let $n=48;for(;$n<123;)an[$n]=pn,$n++,$n===58?$n=65:$n===91&&($n=97);an[43]=pn,an[45]=pn,an[46]=pn,an[95]=pn,an[72]=[pn,B0],an[104]=[pn,B0],an[87]=[pn,F0],an[119]=[pn,F0];function uH(e,t,n){const r=this;let a,i;return o;function o(d){return!om(d)||!z0.call(r,r.previous)||sm(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return om(d)?(e.consume(d),s):d===64?(e.consume(d),l):n(d)}function l(d){return d===46?e.check(sH,c,u)(d):d===45||d===95||ot(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 cH(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!U0.call(r,r.previous)||sm(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(oH,e.attempt(D0,e.attempt(M0,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function dH(e,t,n){const r=this;let a="",i=!1;return o;function o(d){return(d===72||d===104)&&j0.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||_i(d)||Re(d)||Vn(d)||Ni(d)?n(d):e.attempt(D0,e.attempt(M0,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function pH(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 fH(e,t,n){let r,a,i;return o;function o(u){return u===46||u===95?e.check(P0,l,s)(u):u===null||Re(u)||Vn(u)||u!==45&&Ni(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 gH(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(P0,t,i)(o):o===null||Re(o)||Vn(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function mH(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||Re(s)||Vn(s)?t(s):n(s)}function a(s){return s===null||s===40||s===91||Re(s)||Vn(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 hH(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return ot(i)?n(i):t(i)}}function U0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Re(e)}function j0(e){return!ut(e)}function z0(e){return!(e===47||om(e))}function om(e){return e===43||e===45||e===46||e===95||ot(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 bH={tokenize:AH,partial:!0};function yH(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:SH,continuation:{tokenize:xH},exit:TH}},text:{91:{name:"gfmFootnoteCall",tokenize:wH},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vH,resolveTo:EH}}}}function vH(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=Ht(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 EH(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 wH(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||Re(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return a.includes(Ht(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Re(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 SH(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||Re(g))return n(g);if(g===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return i=Ht(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Re(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),he(e,f,"gfmFootnoteDefinitionWhitespace")):n(g)}function f(g){return t(g)}}function xH(e,t,n){return e.check(ba,t,e.attempt(bH,t,n))}function TH(e){e.exit("gfmFootnoteDefinition")}function AH(e,t,n){const r=this;return he(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 kH(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&&It(p,p.length,0,Oi(f,o.slice(u+1,l),s)),It(p,p.length,0,[["exit",d,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",c,s]]),It(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=Tr(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=Tr(g);return v._open=!h||h===2&&!!m,v._close=!m||m===2&&!!h,s(g)}}}class RH{constructor(){this.map=[]}add(t,n,r){IH(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 IH(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 CH(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 _H(){return{flow:{null:{name:"table",tokenize:NH,resolveAll:OH}}}}function NH(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)?he(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||Re(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)?he(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)?he(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)?he(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)?he(e,T,"whitespace")(I):(e.enter("data"),k(I))}function k(I){return I===null||I===124||Re(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 OH(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 RH;for(;++n<e.length;){const f=e[n],g=f[1];f[0]==="enter"?g.type==="tableHead"?(s=!1,l!==0&&(G0(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=Xi(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=Xi(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=Xi(p,t,i,a,n,d)):o[1]!==0&&(d=Xi(p,t,o,a,n,d)),a=0):a&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&G0(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=CH(t.events,n))}return e}function Xi(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},Rr(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=Rr(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=Rr(t.events,n[2]),c=Rr(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({},Rr(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function G0(e,t,n,r,a){const i=[],o=Rr(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 Rr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const LH={name:"tasklistCheck",tokenize:MH};function DH(){return{text:{91:LH}}}function MH(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 Re(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:PH},t,n)(l):n(l)}}function PH(e,t,n){return he(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function FH(e){return bw([lH(),yH(),kH(e),_H(),DH()])}const BH={};function UH(e){const t=this,n=e||BH,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(FH(n)),i.push(aH()),o.push(iH(n))}const jH=fe.create(WL),zH=fe.create(KL),q0=({isExpanded:e,onClick:t,className:n,iconClassName:r,disabled:a})=>w.jsxs(tn,{children:[w.jsx(nn,{onClick:t,className:n,disabled:a,children:w.jsx(Kt,{mode:"wait",initial:!1,children:e?w.jsx(jH,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:ee("size-4 text-stone-600 cursor-pointer hover:text-stone-900",r)},"collapsed"):w.jsx(zH,{initial:!1,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{duration:.15},className:ee("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"})})]}),V0={'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%)"}},H0=({children:e,className:t})=>w.jsx("div",{className:ee("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}),$0=({children:e})=>w.jsx("div",{className:"flex justify-between bg-telnyx-gray-hover-light rounded-t-lg py-1.5 px-4",children:e}),GH=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})}),qH=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:"↗"})]}),W0=({children:e})=>w.jsx("p",{className:"text-black pt-2 font-bold",children:e}),VH=({children:e})=>w.jsx("p",{className:"text-base",children:e}),HH=e=>({img:GH,h1:W0,h2:W0,a:qH,p:VH,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(zt.COLLAPSED),c=O.useRef(null),d=/language-(\w+)/.exec(n||""),p=String(r).replace(/\n$/,""),f=()=>{u(zt.EXPANDED),o(i+1),document.body.style.overflow="hidden"},g=()=>{u(zt.COLLAPSED),o(i-1),document.body.style.overflow="auto"},m=i>0;return!t&&d?w.jsxs(w.Fragment,{children:[w.jsx(Kt,{children:l===zt.EXPANDED&&w.jsxs(bl,{targetMountContainer:document.body,children:[w.jsx(fe.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(fe.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(fe.div,{className:ee("w-[60%] max-w-full max-h-[90%] rounded-lg overflow-hidden"),ref:c,children:w.jsxs(H0,{className:"overflow-y-hidden",children:[w.jsxs($0,{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(Y0,{isExpanded:l===zt.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:ee("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(Qg,{...a,children:String(r).replace(/\n$/,""),style:V0,language:s?d[1]:"text/plain",PreTag:"div",showLineNumbers:!0,wrapLongLines:!0})})})]})})},"expanded-code")]})}),w.jsxs(H0,{children:[w.jsxs($0,{children:[w.jsx("code",{className:"text-telnyx-cream text-[1.6ch] flex items-center",children:d&&d[1]||"Unknown"}),s&&w.jsx(Y0,{isExpanded:l===zt.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(Qg,{...a,children:String(r).replace(/\n$/,""),style:V0,language:s?d[1]:"text/plain",PreTag:"div",wrapLongLines:!0})})]})]}):w.jsx("code",{...a,className:ee("bg-transparent p-1",n),children:r})})}),$H=O.memo(({children:e,state:t})=>w.jsx("div",{className:ee("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(Gj,{components:HH(t),remarkPlugins:[UH],children:e})})),Y0=({isExpanded:e,handleExpand:t,handleCollapse:n,textToCopy:r})=>w.jsxs("div",{className:"flex",children:[w.jsx(hl,{textToCopy:r,className:ee("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:ee("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"})]}),WH=fe.create(fv),YH={pressed:{scale:.8},hovered:{scale:1.1},idle:{scale:1},transition:{duration:.15}},KH=O.memo(({onClick:e,className:t,iconClassName:n})=>w.jsxs(tn,{children:[w.jsx(nn,{onClick:e,className:ee("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(Kt,{children:w.jsx(WH,{initial:"idle",whileHover:"hovered",whileTap:"pressed",animate:"idle",exit:"idle",variants:YH,className:ee("size-5 focus:outline-none focus:ring-0",n)},"close")})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Collapse message"})})]})),XH=({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(hl,{textToCopy:t,className:ee("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(KH,{onClick:n,className:ee("border-0","flex items-center justify-center","h-fit")})]})]}),ZH=({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(tn,{children:[w.jsx(nn,{onClick:a(pr.POSITIVE),className:ee("text-stone-600 cursor-pointer hover:text-stone-900",n===pr.POSITIVE&&"text-telnyx-green hover:text-telnyx-green/80"),children:n===pr.POSITIVE?w.jsx(MP,{className:"size-4"}):w.jsx(rD,{className:"size-4"})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Helpful"})})]}),w.jsxs(tn,{children:[w.jsx(nn,{onClick:a(pr.NEGATIVE),className:ee("text-stone-600 cursor-pointer hover:text-stone-900",n===pr.NEGATIVE&&"text-red-600 hover:text-red-700"),children:n===pr.NEGATIVE?w.jsx(LP,{className:"size-4"}):w.jsx(tD,{className:"size-4"})}),w.jsx(Vt,{side:"bottom",children:w.jsx("p",{children:"Not helpful"})})]})]})},JH=Ci(["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"}}),QH=({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}}}),e$=({variant:e,state:t,children:n})=>w.jsx(fe.div,{initial:"initial",animate:"animate",exit:"exit",variants:QH({variant:e,state:t}),className:JH({variant:e,state:t}),children:n}),t$=Ci(["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"}}),n$=Ci(["flex items-center mb-2 gap-1"],{variants:{variant:{bot:["justify-self-start"],user:["justify-self-end flex-row-reverse"]}},defaultVariants:{variant:"bot"}}),K0=O.memo(({variant:e,children:t,state:n,handleRetry:r,isFirstMessage:a,timestamp:i,feedbackId:o})=>{const s=J(b=>b.endpoint),l=NL(i),u=J(b=>b.numMessagesExpanded),c=J(b=>b.setNumMessagesExpanded),d=J(b=>b.botState),[p,f]=O.useState(zt.COLLAPSED),g=O.useRef(null),m=O.useCallback(()=>{f(zt.EXPANDED),c(u+1),document.body.style.overflow="hidden"},[u,c,f]),v=O.useCallback(()=>{f(zt.COLLAPSED),c(u-1),document.body.style.overflow="auto"},[u,c,f]),h=()=>{if(n==="streaming"||n==="complete")return w.jsx($H,{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(a$,{}),d==="error"&&w.jsx(r$,{onClick:r})]});if(n==="loading")return s===Ee.AIDA?w.jsx(jF,{isLoaded:!1,progressMessage:t},`loading-${t}`):w.jsx("div",{className:"flex items-center gap-3",children:w.jsx(PF,{size:24,spokeWidth:2,animationDuration:4})})};return w.jsxs(w.Fragment,{children:[w.jsx(Kt,{mode:"wait",children:p===zt.EXPANDED&&w.jsxs(bl,{targetMountContainer:document.body,children:[w.jsx(fe.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(fe.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:ee("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:t$({variant:e}),children:[w.jsx(XH,{variant:e,textToCopy:t,onCloseClick:v}),h()]})})},"expanded-message")]})}),w.jsx(e$,{variant:e,state:n,children:h()}),w.jsxs("div",{className:n$({variant:e}),children:[w.jsx("span",{className:ee("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===zt.EXPANDED}),w.jsx(hl,{textToCopy:t}),!!o&&w.jsx(ZH,{feedbackId:o})]})]})]})}),r$=({onClick:e})=>w.jsx("span",{className:"flex w-full justify-center text-sm",children:w.jsx("button",{className:ee("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"})}),a$=()=>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(dv,{className:"size-4 animate-spin"})]})}),X0=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"})}));X0.displayName="RCSIcon";const Oe={TOP_LEFT:"top-left",TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left"},Ne=Oe,be={INSIDE:"inside",OUTSIDE:"outside"},i$={[Ne.TOP_LEFT]:{[be.INSIDE]:Oe.TOP_LEFT,[be.OUTSIDE]:Oe.BOTTOM_RIGHT},[Ne.TOP]:{[be.INSIDE]:Oe.TOP,[be.OUTSIDE]:Oe.BOTTOM},[Ne.TOP_RIGHT]:{[be.INSIDE]:Oe.TOP_RIGHT,[be.OUTSIDE]:Oe.BOTTOM_LEFT},[Ne.RIGHT]:{[be.INSIDE]:Oe.RIGHT,[be.OUTSIDE]:Oe.LEFT},[Ne.BOTTOM_RIGHT]:{[be.INSIDE]:Oe.BOTTOM_RIGHT,[be.OUTSIDE]:Oe.TOP_LEFT},[Ne.BOTTOM]:{[be.INSIDE]:Oe.BOTTOM,[be.OUTSIDE]:Oe.TOP},[Ne.BOTTOM_LEFT]:{[be.INSIDE]:Oe.BOTTOM_LEFT,[be.OUTSIDE]:Oe.TOP_RIGHT},[Ne.LEFT]:{[be.INSIDE]:Oe.LEFT,[be.OUTSIDE]:Oe.RIGHT}},ka={CUSTOM:"custom",DEFAULT:"default"},o$={[Lt.OPEN]:({numMessagesExpanded:e,position:t,isCustomMounted:n})=>{const r=n?0:-28,a=n?0:-28,[i,o]=Z0(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}}},[Lt.CLOSED]:({position:e,isCustomMounted:t})=>{const n=t?0:16,r=t?0:-28,a=t?0:-28,[i,o]=Z0(e,r,a);return{clipPath:`circle(${n}px at calc(${i}) calc(${o}))`,transition:{delay:.1,type:"spring",stiffness:900,damping:160}}}};function Z0(e,t=0,n=0){const r=t>0?"+":"-",a=n>0?"+":"-",i=Math.abs(t),o=Math.abs(n);switch(e){case Oe.TOP_LEFT:return[`0% ${r} ${i}px`,`0% ${a} ${o}px`];case Oe.TOP:return[`50% ${r} ${i}px`,`0% ${a} ${o}px`];case Oe.TOP_RIGHT:return[`100% ${r} ${i}px`,`0% ${a} ${o}px`];case Oe.RIGHT:return[`100% ${r} ${i}px`,`50% ${a} ${o}px`];case Oe.BOTTOM_RIGHT:return[`100% ${r} ${i}px`,`100% ${a} ${o}px`];case Oe.BOTTOM:return[`50% ${r} ${i}px`,`100% ${a} ${o}px`];case Oe.BOTTOM_LEFT:return[`0% ${r} ${i}px`,`100% ${a} ${o}px`];case Oe.LEFT:return[`0% ${r} ${i}px`,`50% ${a} ${o}px`]}}const s$=Ci("rounded-xl bg-black shadow-lg",{variants:{mountType:{[ka.CUSTOM]:"absolute",[ka.DEFAULT]:"fixed bottom-4! right-4!"},mountPositionAndDirection:{[`${Ne.TOP_LEFT}-${be.INSIDE}`]:"top-0 left-0",[`${Ne.TOP_LEFT}-${be.OUTSIDE}`]:"bottom-full right-full",[`${Ne.TOP}-${be.INSIDE}`]:"top-0 left-1/2 -translate-x-1/2",[`${Ne.TOP}-${be.OUTSIDE}`]:"bottom-full left-1/2 -translate-x-1/2",[`${Ne.TOP_RIGHT}-${be.INSIDE}`]:"top-0 right-0",[`${Ne.TOP_RIGHT}-${be.OUTSIDE}`]:"bottom-full left-full",[`${Ne.RIGHT}-${be.INSIDE}`]:"top-1/2 -translate-y-1/2 right-0 ",[`${Ne.RIGHT}-${be.OUTSIDE}`]:"top-1/2 -translate-y-1/2 left-full",[`${Ne.BOTTOM_RIGHT}-${be.INSIDE}`]:"bottom-0 right-0",[`${Ne.BOTTOM_RIGHT}-${be.OUTSIDE}`]:"top-full left-full",[`${Ne.BOTTOM}-${be.INSIDE}`]:"bottom-0 left-1/2 -translate-x-1/2",[`${Ne.BOTTOM}-${be.OUTSIDE}`]:"top-full left-1/2 -translate-x-1/2",[`${Ne.BOTTOM_LEFT}-${be.INSIDE}`]:"bottom-0 left-0",[`${Ne.BOTTOM_LEFT}-${be.OUTSIDE}`]:"top-full right-full",[`${Ne.LEFT}-${be.INSIDE}`]:"top-1/2 -translate-y-1/2 left-0",[`${Ne.LEFT}-${be.OUTSIDE}`]:"top-1/2 -translate-y-1/2 right-full"}},defaultVariants:{mountPositionAndDirection:`${Ne.BOTTOM_RIGHT}-${be.INSIDE}`,mountType:ka.DEFAULT}}),l$={[lt.INITIAL]:{height:"78%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"24px",borderTopRightRadius:"24px"},[lt.USER_HAS_TYPED]:{height:"94%",borderBottomRightRadius:"12px",borderBottomLeftRadius:"12px",borderTopLeftRadius:"16px",borderTopRightRadius:"16px"}},u$={[lt.INITIAL]:{height:"22%"},[lt.USER_HAS_TYPED]:{height:"6%"}},c$=({chatAPIUrl:e=ht.CHAT_API_URL,flowAPIUrl:t=ht.FLOW_API_URL,flowApiKey:n,feedbackAPIUrl:r=ht.FEEDBACK_API_URL,user:a,onHelpAction:i,open:o,setOpen:s,placeholders:l=ht.DEFAULT_PLACEHOLDERS,mountPosition:u=Ne.BOTTOM_RIGHT,mountDirection:c=be.INSIDE,offsetX:d=0,offsetY:p=0,icon:f=X0})=>{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===Lt.OPEN,L=s?ka.CUSTOM:ka.DEFAULT,$=`${u}-${c}`,R=i$[u][c],Q=!!s,ne=J(U=>U.botState),A=J(U=>U.setBotState),Y=J(U=>U.numRetries),se=J(U=>U.setNumRetries),ae=J(U=>U.retryTimeoutId),te=J(U=>U.setRetryTimeoutId),de=J(U=>U.chatStartTimestamp),ye=Ts[g].firstMessage,{chat:we,lastMessage:Ae}=BL(),[qe,Ve]=O.useState(!0),on=O.useRef(null),Je=O.useRef(null),Ie=O.useRef(null),Pt=UL(Ie),Qe=O.useRef(`telnyx-widget-fonts-${Math.random().toString(36).substring(2,9)}`);O.useEffect(()=>{const U=Qe.current;if(U){if(!document.getElementById(U)){const ke=document.createElement("style");ke.id=U,ke.textContent=jL,document.head.appendChild(ke)}return()=>{const ke=document.getElementById(U);ke&&ke.remove()}}},[Qe.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=Je.current)==null||U.focus())},[G]);const He=O.useCallback(()=>{const U=k[k.length-2];if(U.type==="user"&&U.message.length>0){T(U.message),A("retrying");const ke=setTimeout(async()=>{try{C({type:Te.DELETE_LAST_MESSAGE_PAIR,payload:null}),se(Y+1),await we(U.message)}catch(M){console.error("[Retry Logic] Chat failed during retry:",M)}},ht.RETRY_INTERVAL);te(ke)}},[k,we,Y,C]);O.useEffect(()=>{ne==="error"&&(ae||(Y<ht.MAX_RETRIES?He():Y>=ht.MAX_RETRIES&&console.error("[Retry Logic] Max retries reached, stopping retry attempts")))},[ne,Y,ae,He]),O.useEffect(()=>{const U=Ie.current;U&&qe&&(Ae==null?void 0:Ae.message.length)>0&&(U.scrollTop=U.scrollHeight)},[Ae==null?void 0:Ae.message.length,qe]);const Ye=O.useCallback(()=>{const U=Je.current;U&&(U.style.height="auto",U.style.height=`${U.scrollHeight}px`)},[]),fn=U=>{Ye(),B(lt.USER_HAS_TYPED),T(U.target.value)};O.useEffect(()=>{k.length===0&&requestAnimationFrame(Ye)},[k.length,Ye]);const ct=async()=>{T(""),requestAnimationFrame(Ye),await we(E);const U=Ie.current;U&&U.scrollTo({top:U.scrollHeight,behavior:"smooth"})},gn=()=>{const U=Ie.current;if(!U)return;const ke=Math.abs(U.scrollHeight-U.clientHeight-U.scrollTop)<=5;Ve(ke)};return w.jsx(bl,{ref:on,children:w.jsx(pE,{delayDuration:75,skipDelayDuration:0,children:w.jsxs(Kt,{children:[w.jsxs(fe.div,{initial:!1,animate:I,variants:o$,custom:{numMessagesExpanded:P,position:R,isCustomMounted:Q},className:ee(s$({mountType:L,mountPositionAndDirection:$})),style:{height:ht.WIDGET_HEIGHT,width:ht.WIDGET_WIDTH,translateX:d,translateY:p},children:[w.jsx(fe.div,{initial:!1,animate:D,className:"px-4 pt-4 bg-black rounded-t-xl",variants:u$,children:w.jsx(LF,{className:"flex flex-col justify-between h-full pb-4",children:w.jsx(NP,{resetChatCustomHandler:Ye})})}),w.jsxs(fe.div,{initial:!1,animate:D,className:ee("flex flex-col justify-between bg-telnyx-cream rounded-b-xl rounded-t-3xl p-4 pb-1.5","relative overflow-hidden"),variants:l$,children:[Pt&&w.jsxs(w.Fragment,{children:[w.jsx(cl,{containerRef:Ie,direction:"up"}),w.jsx(cl,{containerRef:Ie,direction:"down"})]}),w.jsxs("div",{ref:Ie,className:ee("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:gn,children:[w.jsx(K0,{variant:"bot",isFirstMessage:!0,state:"complete",timestamp:de,children:ye},"bot-initial"),k.map(U=>w.jsx(K0,{variant:U.type,timestamp:U.timestamp,state:U.state,feedbackId:U.feedback_id,handleRetry:He,children:U.message},U.id))]}),w.jsx(jE,{ref:Je,question:E,handleInput:fn,handleSendMessage:ct})]})]},"widget-container"),!Q&&w.jsx(YP,{question:E,handleSendMessage:ct,triggerIcon:f},"chat-trigger-button")]})})})};$e.ChatWidget=c$,$e.Tooltip=tn,$e.TooltipContent=Vt,$e.TooltipProvider=pE,$e.TooltipTrigger=nn,Object.defineProperty($e,Symbol.toStringTag,{value:"Module"})}));
|
|
2594
2538
|
//# sourceMappingURL=index.umd.js.map
|