@tavus/embed 0.9.4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,12 @@
1
- var TavusEmbed=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v={},y=[],b=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,x=Array.isArray;function S(e,t){for(var n in t)e[n]=t[n];return e}function C(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function w(e,t,r){var i,a,o,s={};for(o in t)o==`key`?i=t[o]:o==`ref`?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return T(e,s,i,a,null)}function T(e,t,n,a,o){var s={type:e,props:t,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++i,__i:-1,__u:0};return o==null&&r.vnode!=null&&r.vnode(s),s}function E(e){return e.children}function ee(e,t){this.props=e,this.context=t}function te(e,t){if(t==null)return e.__?te(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?te(e):null}function ne(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,i=[],a=[],o=S({},t);o.__v=t.__v+1,r.vnode&&r.vnode(o),pe(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,i,n??te(t),!!(32&t.__u),a),o.__v=t.__v,o.__.__k[o.__i]=o,he(i,o,a),t.__e=t.__=null,o.__e!=n&&re(o)}}function re(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),re(e)}function ie(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!ae.__r++||s!=r.debounceRendering)&&((s=r.debounceRendering)||c)(ae)}function ae(){try{for(var e,t=1;o.length;)o.length>t&&o.sort(l),e=o.shift(),t=o.length,ne(e)}finally{o.length=ae.__r=0}}function oe(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_=r&&r.__k||y,b=t.length;for(c=se(n,t,_,c,b),d=0;d<b;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&_[p.__i]||v,p.__i=d,g=pe(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&ve(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),4&p.__u?(c=ce(p,c,e),f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function se(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=T(null,o,null,null,null):x(o)?o=e.__k[a]=T(E,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=T(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=le(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=te(s)),ye(s,s));return r}function ce(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=ce(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=te(e)),t=n.insertBefore(e.__e,t||null));do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function D(e,t){return t||=[],e==null||typeof e==`boolean`||(x(e)?e.some(function(e){D(e,t)}):t.push(e)),t}function le(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function ue(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||b.test(t)?n:n+`px`}function de(e,t,n,r,i){var a,o;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||ue(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||ue(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(p,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[f]=r[f]:(n[f]=m,e.addEventListener(t,a?g:h,a)):e.removeEventListener(t,a?g:h,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function fe(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[d]==null)t[d]=m++;else if(t[d]<n[f])return;return n(r.event?r.event(t):t)}}}function pe(e,t,n,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,b,w,T,ne,re,ie,ae,se,ce=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[c=t.__e=n.__e]),(d=r.__b)&&d(t);n:if(typeof ce==`function`){f=s.length;try{if(b=t.props,w=ce.prototype&&ce.prototype.render,T=(d=ce.contextType)&&i[d.__c],ne=d?T?T.props.value:d.__:i,n.__c?v=(p=t.__c=n.__c).__=p.__E:(w?t.__c=p=new ce(b,ne):(t.__c=p=new ee(b,ne),p.constructor=ce,p.render=be),T&&T.sub(p),p.state||(p.state={}),p.__n=i,m=p.__d=!0,p.__h=[],p._sb=[]),w&&p.__s==null&&(p.__s=p.state),w&&ce.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=S({},p.__s)),S(p.__s,ce.getDerivedStateFromProps(b,p.__s))),h=p.props,g=p.state,p.__v=t,m)w&&ce.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),w&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(w&&ce.getDerivedStateFromProps==null&&b!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(b,ne),t.__v==n.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(b,p.__s,ne)){t.__v!=n.__v&&(p.props=b,p.state=p.__s,p.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),y.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p),c=te(n);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(b,p.__s,ne),w&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,g,_)})}if(p.context=ne,p.props=b,p.__P=e,p.__e=!1,re=r.__r,ie=0,w)p.state=p.__s,p.__d=!1,re&&re(t),d=p.render(p.props,p.state,p.context),y.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,re&&re(t),d=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++ie<25);p.state=p.__s,p.getChildContext!=null&&(i=S(S({},i),p.getChildContext())),w&&!m&&p.getSnapshotBeforeUpdate!=null&&(_=p.getSnapshotBeforeUpdate(h,g)),ae=d!=null&&d.type===E&&d.key==null?ge(d.props.children):d,c=oe(e,x(ae)?ae:[ae],t,n,i,a,o,s,c,l,u),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),v&&(p.__E=p.__=null)}catch(e){if(s.length=f,t.__v=null,l||o!=null){if(e.then){for(t.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o!=null&&(o[o.indexOf(c)]=null),t.__e=c}else if(o!=null)for(se=o.length;se--;)C(o[se])}else t.__e=n.__e;t.__k??=n.__k||[],e.then||me(t),r.__e(e,t,n)}}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=_e(n.__e,t,n,i,a,o,s,l,u);return(d=r.diffed)&&d(t),128&t.__u?void 0:c}function me(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(me))}function he(e,t,n){for(var i=0;i<n.length;i++)ve(n[i],n[++i],n[++i]);r.__c&&r.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){r.__e(e,t.__v)}})}function ge(e){return typeof e!=`object`||!e||e.__b>0?e:x(e)?e.map(ge):e.constructor===void 0?S({},e):null}function _e(e,t,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,y=i.props||v,b=t.props,S=t.type;if(S==`svg`?o=`http://www.w3.org/2000/svg`:S==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d<s.length;d++)if((h=s[d])&&`setAttribute`in h==!!S&&(S?h.localName==S:h.nodeType==3)){e=h,s[d]=null;break}}if(e==null){if(S==null)return document.createTextNode(b);e=document.createElementNS(o,S,b.is&&b),l&&=(r.__m&&r.__m(t,s),!1),s=null}if(S==null)y===b||l&&e.data==b||(e.data=b);else{if(s=S==`textarea`&&b.defaultValue!=null?null:s&&n.call(e.childNodes),!l&&s!=null)for(y={},d=0;d<e.attributes.length;d++)y[(h=e.attributes[d]).name]=h.value;for(d in y)h=y[d],d==`dangerouslySetInnerHTML`?p=h:d==`children`||d in b||d==`value`&&`defaultValue`in b||d==`checked`&&`defaultChecked`in b||de(e,d,null,h,o);for(d in b)h=b[d],d==`children`?m=h:d==`dangerouslySetInnerHTML`?f=h:d==`value`?g=h:d==`checked`?_=h:l&&typeof h!=`function`||y[d]===h||de(e,d,h,y[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),oe(t.type==`template`?e.content:e,x(m)?m:[m],t,i,a,S==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:i.__k&&te(i,0),l,u),s!=null)for(d=s.length;d--;)C(s[d]);l&&S!=`textarea`||(d=`value`,S==`progress`&&g==null?e.removeAttribute(`value`):g!=null&&(g!==e[d]||S==`progress`&&!g||S==`option`&&g!=y[d])&&de(e,d,g,y[d],o),d=`checked`,_!=null&&_!=e[d]&&de(e,d,_,y[d],o))}return e}function ve(e,t,n){try{if(typeof e==`function`){var i=typeof e.__u==`function`;i&&e.__u(),i&&t==null||(e.__u=e(t))}else e.current=t}catch(e){r.__e(e,n)}}function ye(e,t,n){var i,a;if(r.unmount&&r.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||ve(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){r.__e(e,t)}i.base=i.__P=i.__n=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&ye(i[a],t,n||typeof e.type!=`function`);n||C(e.__e),e.__c=e.__=e.__e=void 0}function be(e,t,n){return this.constructor(e,n)}function xe(e,t,i){var a,o,s,c;t==document&&(t=document.documentElement),r.__&&r.__(e,t),o=(a=typeof i==`function`)?null:i&&i.__k||t.__k,s=[],c=[],pe(t,e=(!a&&i||t).__k=w(E,null,[e]),o||v,v,t.namespaceURI,!a&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,s,!a&&i?i:o?o.__e:t.firstChild,a,c),he(s,e,c),e.props.children=null}function Se(e,t){xe(e,t,Se)}function Ce(e,t,r){var i,a,o,s,c=S({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o==`key`?i=t[o]:o==`ref`?a=t[o]:c[o]=t[o]===void 0&&s!=null?s[o]:t[o];return arguments.length>2&&(c.children=arguments.length>3?n.call(arguments,2):r),T(e.type,c,i||e.key,a||e.ref,null)}function we(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,ie(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+_++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}n=y.slice,r={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},i=0,a=function(e){return e!=null&&e.constructor===void 0},ee.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=S({},this.state);typeof e==`function`&&(e=e(S({},n),this.props)),e&&S(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ie(this))},ee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ie(this))},ee.prototype.render=E,o=[],c=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(e,t){return e.__v.__b-t.__v.__b},ae.__r=0,u=Math.random().toString(8),d=`__d`+u,f=`__a`+u,p=/(PointerCapture)$|Capture$/i,m=0,h=fe(!1),g=fe(!0),_=0;function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(this,arguments)}function Ee(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}var De=[`context`,`children`],Oe=[`useFragment`];function ke(e,t,n,r){function i(){var t,n=Reflect.construct(HTMLElement,[],i);return n._vdomComponent=e,r&&r.shadow?(n._root=n.attachShadow({mode:r.mode||`open`,serializable:(t=r.serializable)!=null&&t}),r.adoptedStyleSheets&&(n._root.adoptedStyleSheets=r.adoptedStyleSheets)):n._root=n,n}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){je.call(this,r)},i.prototype.attributeChangedCallback=Ne,i.prototype.disconnectedCallback=Pe,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom?this._vdom.props[e]:this._props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||={},this._props[e]=t);var n=typeof t;t!=null&&n!==`string`&&n!==`boolean`&&n!==`number`||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function Ae(e){this.getChildContext=function(){return e.context};var t=e.children;return Ce(t,Ee(e,De))}function je(e){var t=new CustomEvent(`_preact`,{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=w(Ae,Te({},this._props,{context:t.detail.context}),Ie(this,this._vdomComponent,e)),(this.hasAttribute(`hydrate`)?Se:xe)(this._vdom,this._root)}function Me(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():``})}function Ne(e,t,n){if(this._vdom){var r={};r[e]=n??=void 0,r[Me(e)]=n,this._vdom=Ce(this._vdom,r),xe(this._vdom,this._root)}}function Pe(){xe(this._vdom=null,this._root)}function Fe(e,t){var n=this,r=e.useFragment,i=Ee(e,Oe);return w(r?E:`slot`,Te({},i,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener(`_preact`,n._listener))):n.ref.removeEventListener(`_preact`,n._listener)}}))}function Ie(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;var r=[],i={},a=0,o=e.attributes,s=e.childNodes;for(a=o.length;a--;)o[a].name!==`slot`&&(i[o[a].name]=o[a].value,i[Me(o[a].name)]=o[a].value);for(a=s.length;a--;){var c=Ie(s[a],null,n),l=s[a].slot;l?i[l]=w(Fe,{name:l},c):r[a]=c}var u=!(!n||!n.shadow),d=t?w(Fe,{useFragment:!u},r):r;return!u&&t&&(e.innerHTML=``),w(t||e.nodeName.toLowerCase(),i,d)}var Le=`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
2
- @layer properties{*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-ease:initial}}@layer theme{:host,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-xl:36rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-lg:.5rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--blur-sm:8px;--blur-xl:24px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-preview-action:oklch(100% 0 0);--color-preview-action-content:oklch(21% 0 0);--text-preview-title:clamp(1.125rem, 2.65cqw, 2rem);--text-preview-title-narrow:clamp(1.375rem, 4.5cqw, 2rem);--text-preview-title-full-screen:clamp(1.5rem, 3.6cqw, 2rem);--text-preview-description-full-screen:clamp(.875rem, 2.25cqw, 1.25rem)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:is(:host:has(input.theme-controller[value=wireframe]:checked),[data-theme=wireframe]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(87% 0 0);--color-primary-content:oklch(26% 0 0);--color-secondary:oklch(87% 0 0);--color-secondary-content:oklch(26% 0 0);--color-accent:oklch(87% 0 0);--color-accent-content:oklch(26% 0 0);--color-neutral:oklch(87% 0 0);--color-neutral-content:oklch(26% 0 0);--color-info:oklch(44% .11 240.79);--color-info-content:oklch(90% .058 230.902);--color-success:oklch(43% .095 166.913);--color-success-content:oklch(90% .093 164.15);--color-warning:oklch(47% .137 46.201);--color-warning-content:oklch(92% .12 95.746);--color-error:oklch(44% .177 26.899);--color-error-content:oklch(88% .062 18.334);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=silk]:checked),[data-theme=silk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(97% .0035 67.78);--color-base-200:oklch(95% .0081 61.42);--color-base-300:oklch(90% .0081 61.42);--color-base-content:oklch(40% .0081 61.42);--color-primary:oklch(23.27% .0249 284.3);--color-primary-content:oklch(94.22% .2505 117.44);--color-secondary:oklch(23.27% .0249 284.3);--color-secondary-content:oklch(73.92% .2135 50.94);--color-accent:oklch(23.27% .0249 284.3);--color-accent-content:oklch(88.92% .2061 189.9);--color-neutral:oklch(20% 0 0);--color-neutral-content:oklch(80% .0081 61.42);--color-info:oklch(80.39% .1148 241.68);--color-info-content:oklch(30.39% .1148 241.68);--color-success:oklch(83.92% .0901 136.87);--color-success-content:oklch(23.92% .0901 136.87);--color-warning:oklch(83.92% .1085 80);--color-warning-content:oklch(43.92% .1085 80);--color-error:oklch(75.1% .1814 22.37);--color-error-content:oklch(35.1% .1814 22.37);--radius-selector:2rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=cyberpunk]:checked),[data-theme=cyberpunk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(94.51% .179 104.32);--color-base-200:oklch(91.51% .179 104.32);--color-base-300:oklch(85.51% .179 104.32);--color-base-content:oklch(0% 0 0);--color-primary:oklch(74.22% .209 6.35);--color-primary-content:oklch(14.844% .041 6.35);--color-secondary:oklch(83.33% .184 204.72);--color-secondary-content:oklch(16.666% .036 204.72);--color-accent:oklch(71.86% .217 310.43);--color-accent-content:oklch(14.372% .043 310.43);--color-neutral:oklch(23.04% .065 269.31);--color-neutral-content:oklch(94.51% .179 104.32);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=retro]:checked),[data-theme=retro]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(91.637% .034 90.515);--color-base-200:oklch(88.272% .049 91.774);--color-base-300:oklch(84.133% .065 90.856);--color-base-content:oklch(41% .112 45.904);--color-primary:oklch(80% .114 19.571);--color-primary-content:oklch(39% .141 25.723);--color-secondary:oklch(92% .084 155.995);--color-secondary-content:oklch(44% .119 151.328);--color-accent:oklch(68% .162 75.834);--color-accent-content:oklch(41% .112 45.904);--color-neutral:oklch(44% .011 73.639);--color-neutral-content:oklch(86% .005 56.366);--color-info:oklch(58% .158 241.966);--color-info-content:oklch(96% .059 95.617);--color-success:oklch(51% .096 186.391);--color-success-content:oklch(96% .059 95.617);--color-warning:oklch(64% .222 41.116);--color-warning-content:oklch(96% .059 95.617);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(40% .123 38.172);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=lemonade]:checked),[data-theme=lemonade]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(98.71% .02 123.72);--color-base-200:oklch(91.8% .018 123.72);--color-base-300:oklch(84.89% .017 123.72);--color-base-content:oklch(19.742% .004 123.72);--color-primary:oklch(58.92% .199 134.6);--color-primary-content:oklch(11.784% .039 134.6);--color-secondary:oklch(77.75% .196 111.09);--color-secondary-content:oklch(15.55% .039 111.09);--color-accent:oklch(85.39% .201 100.73);--color-accent-content:oklch(17.078% .04 100.73);--color-neutral:oklch(30.98% .075 108.6);--color-neutral-content:oklch(86.196% .015 108.6);--color-info:oklch(86.19% .047 224.14);--color-info-content:oklch(17.238% .009 224.14);--color-success:oklch(86.19% .047 157.85);--color-success-content:oklch(17.238% .009 157.85);--color-warning:oklch(86.19% .047 102.15);--color-warning-content:oklch(17.238% .009 102.15);--color-error:oklch(86.19% .047 25.85);--color-error-content:oklch(17.238% .009 25.85);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:host{--page-has-backdrop:var(--page-scroll-lock) 1;--page-scroll-bg:var(--page-scroll-lock) var(--root-bg,#0000)}@supports (color:color-mix(in lab, red, red)){:host{--page-scroll-bg:var(--page-scroll-lock) color-mix(in srgb, var(--root-bg,#0000), oklch(0% 0 0) calc(var(--page-has-backdrop,0) * 40%))}}:host{background-image:var(--page-scroll-lock) linear-gradient(var(--root-bg,#0000), var(--root-bg,#0000));transition:var(--page-scroll-lock) background-color .3s ease-out;animation:var(--page-scroll-lock) set-page-has-scroll forwards;animation-timeline:var(--page-scroll-lock) scroll();--page-has-scroll:initial;scrollbar-gutter:var(--page-has-scroll) var(--page-scroll-lock) stable}@keyframes set-page-has-scroll{0%,to{--page-has-scroll: }}:host{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E");scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab, red, red)){:host{scrollbar-color:color-mix(in oklch, currentColor 35%, #0000) #0000}}@property --radialprogress{syntax:"<percentage>";inherits:true;initial-value:0%}@property --aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}:host,[data-theme]{background-color:var(--root-bg);color:var(--color-base-content)}:host{background-color:var(--page-scroll-bg,var(--root-bg))}:where(:host,[data-theme]){--root-bg:var(--color-base-100)}:host{--page-scroll-lock:initial;--page-overflow:var(--page-scroll-lock) hidden}:host:not(span){overflow:var(--page-overflow)}:where(:host),[data-theme=black-white]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:host:has(input.theme-controller[value=black-white]:checked){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media (prefers-color-scheme:dark){:host:not([data-theme]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:is(:host:has(input.theme-controller[value=white-black]:checked),[data-theme=white-black]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=wireframe-dark]:checked),[data-theme=wireframe-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(23% 0 0);--color-base-300:oklch(29% 0 0);--color-base-content:oklch(92% 0 0);--color-primary:oklch(92% 0 0);--color-primary-content:oklch(12% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(12% 0 0);--color-accent:oklch(55% 0 0);--color-accent-content:oklch(95% 0 0);--color-neutral:oklch(30% 0 0);--color-neutral-content:oklch(92% 0 0);--color-info:oklch(70% .15 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .16 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=silk-dark]:checked),[data-theme=silk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .02 320);--color-base-200:oklch(25% .022 320);--color-base-300:oklch(30% .025 320);--color-base-content:oklch(94% .01 320);--color-primary:oklch(74% .12 320);--color-primary-content:oklch(15% .03 320);--color-secondary:oklch(74% .12 270);--color-secondary-content:oklch(15% .03 270);--color-accent:oklch(76% .12 20);--color-accent-content:oklch(15% .03 20);--color-neutral:oklch(28% .02 320);--color-neutral-content:oklch(94% .01 320);--color-info:oklch(72% .13 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(74% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(66% .21 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=cyberpunk-dark]:checked),[data-theme=cyberpunk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(15% .04 305);--color-base-200:oklch(20% .05 305);--color-base-300:oklch(26% .06 305);--color-base-content:oklch(92% .18 95);--color-primary:oklch(72% .28 340);--color-primary-content:oklch(15% .04 305);--color-secondary:oklch(80% .2 200);--color-secondary-content:oklch(15% .04 305);--color-accent:oklch(90% .2 95);--color-accent-content:oklch(15% .04 305);--color-neutral:oklch(25% .05 305);--color-neutral-content:oklch(92% .18 95);--color-info:oklch(75% .2 220);--color-info-content:oklch(15% .04 305);--color-success:oklch(78% .2 145);--color-success-content:oklch(15% .04 305);--color-warning:oklch(85% .18 80);--color-warning-content:oklch(15% .04 305);--color-error:oklch(70% .25 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=retro-dark]:checked),[data-theme=retro-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(22% .03 60);--color-base-200:oklch(27% .03 60);--color-base-300:oklch(33% .035 60);--color-base-content:oklch(88% .05 70);--color-primary:oklch(62% .16 30);--color-primary-content:oklch(95% .04 70);--color-secondary:oklch(66% .1 80);--color-secondary-content:oklch(15% .03 60);--color-accent:oklch(72% .13 60);--color-accent-content:oklch(15% .03 60);--color-neutral:oklch(28% .03 60);--color-neutral-content:oklch(88% .05 70);--color-info:oklch(70% .14 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(80% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .2 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=lemonade-dark]:checked),[data-theme=lemonade-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .05 140);--color-base-200:oklch(25% .05 140);--color-base-300:oklch(31% .06 140);--color-base-content:oklch(94% .1 100);--color-primary:oklch(85% .18 95);--color-primary-content:oklch(15% .05 140);--color-secondary:oklch(75% .2 130);--color-secondary-content:oklch(15% .05 140);--color-accent:oklch(85% .15 110);--color-accent-content:oklch(15% .05 140);--color-neutral:oklch(28% .05 140);--color-neutral-content:oklch(94% .1 100);--color-info:oklch(72% .18 220);--color-info-content:oklch(15% .05 140);--color-success:oklch(76% .2 145);--color-success-content:oklch(15% .05 140);--color-warning:oklch(86% .18 80);--color-warning-content:oklch(15% .05 140);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}}@layer components;@layer utilities{.\\@container\\/conversation{container:conversation/inline-size}.\\@container\\/pip{container:pip/inline-size}@layer daisyui.l1.l2.l3{.modal{pointer-events:none;visibility:hidden;width:100%;max-width:none;height:100%;max-height:none;color:inherit;transition:overlay .3s allow-discrete, visibility .3s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;overscroll-behavior:contain;z-index:999;scrollbar-gutter:auto;background-color:#0000;place-items:center;margin:0;padding:0;display:grid;position:fixed;inset:0;overflow:clip}.modal::backdrop{display:none}.modal[popover]{color:inherit;background:0 0;border:0;max-width:none;max-height:none;margin:0;padding:0;inset:0}.modal[popover]::backdrop{background-color:oklch(0% 0 0/.4);transition:background-color .3s ease-out}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}.tooltip{--tt-bg:var(--color-neutral);--tt-off:calc(100% + .5rem);--tt-tail:calc(100% + 1px + .25rem);--tt-tail-off:.5rem;display:inline-block;position:relative}.tooltip>.tooltip-content,.tooltip[data-tip]:before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off) 50%;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;font-weight:400;line-height:1.25;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail) 50%;display:block;position:absolute}@media (prefers-reduced-motion:no-preference){.tooltip>.tooltip-content,.tooltip[data-tip]:before,.tooltip:after{transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem) * 10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.tab:is(.tabs>.tab){cursor:pointer;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}.tab:is(.tabs>.tab){--tab-p:.75rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));--tab-radius-limit:min(var(--radius-field), var(--tab-radius-min));--tab-radius-grad:#0000 calc(69% - var(--border)), var(--tab-border-color) calc(69% - var(--border) + .25px), var(--tab-border-color) 69%, var(--tab-bg) calc(69% + .25px);order:var(--tab-order);height:var(--tab-height);padding-inline:var(--tab-p);border-color:#0000;font-size:.875rem}.tab:is(.tabs>.tab):is(input[type=radio]){min-width:fit-content}.tab:is(.tabs>.tab):is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:is(.tabs>.tab):is(label){position:relative}.tab:is(.tabs>.tab):is(label) input{cursor:pointer;appearance:none;opacity:0;position:absolute;inset:0}:is(.tab:is(.tabs>.tab):checked,.tab:is(.tabs>.tab):is(label:has(:checked)),.tab:is(.tabs>.tab):is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]))+.tab-content{display:block}.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.tab:is(.tabs>.tab):not(input):empty{cursor:default;flex-grow:1}.tab:is(.tabs>.tab):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}.tab:is(.tabs>.tab):focus-visible,.tab:is(.tabs>.tab):is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab:is(.tabs>.tab)[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul,li menu){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul,li menu):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,menu,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;content:"";pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu details{interpolate-size:allow-keywords;overflow:hidden}.menu details::details-content{block-size:0}@media (prefers-reduced-motion:no-preference){.menu details::details-content{transition-behavior:allow-discrete;transition-property:block-size,content-visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.menu details[open]::details-content{block-size:auto}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px oklch(0% 0 0/.01),inset 0 -1px oklch(100% 0 0/.01)}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}:is(.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth) * 3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled,.menu :where(li) [disabled]{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li).menu-disabled,.menu :where(li) [disabled]{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dock{z-index:1;background-color:var(--color-base-100);color:currentColor;border-top:.5px solid var(--color-base-content);flex-direction:row;justify-content:space-around;align-items:center;width:100%;padding:.5rem;display:flex;position:fixed;bottom:0;left:0;right:0}@supports (color:color-mix(in lab, red, red)){.dock{border-top:.5px solid color-mix(in oklab, var(--color-base-content) 5%, #0000)}}.dock{height:4rem;height:calc(4rem + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.dock>:not(:where(script,style,template)){cursor:pointer;border-radius:var(--radius-box);background-color:#0000;flex-direction:column;flex-shrink:1;flex-basis:100%;justify-content:center;align-items:center;gap:1px;max-width:8rem;height:100%;margin-bottom:.5rem;transition:opacity .2s ease-out;display:flex;position:relative}@media (hover:hover){.dock>:not(:where(script,style,template)):hover{opacity:.8}}:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{opacity:1}.dock>:not(:where(script,style,template)) .dock-label{font-size:.6875rem}.dock>:not(:where(script,style,template)):after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:2147483647px;width:1.5rem;height:.25rem;transition:background-color .1s ease-out,text-color .1s ease-out,width .1s ease-out;position:absolute;bottom:.2rem}.dropdown{position-area:var(--anchor-v,block-end) var(--anchor-h,span-inline-end);display:inline-block;position:relative}.dropdown>:not(:has(~[class*=dropdown-content])):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.dropdown>:not(:has(~[class*=dropdown-content])):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown.dropdown-close .dropdown-content,.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content,.dropdown.dropdown-hover:not(:hover) [tabindex]:first-child:focus:not(:focus-visible)~.dropdown-content{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown[popover]{transition-behavior:allow-discrete;transition-property:opacity,scale,display,overlay;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown[popover]{opacity:0;scale:.95}}.dropdown .dropdown-content{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown .dropdown-content{transition-behavior:allow-discrete;transition-property:opacity,scale,display,overlay;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown .dropdown-content{opacity:0;scale:.95}}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within)>[tabindex]:first-child{pointer-events:none;pointer-events:none;pointer-events:none}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content{opacity:1;opacity:1;opacity:1;scale:1}.dropdown:not(.dropdown-close).dropdown-hover:hover .dropdown-content{opacity:1;scale:1}.dropdown:is(details){overflow:revert-layer}.dropdown:is(details) summary::-webkit-details-marker{display:none}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-close{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}:is(.dropdown[popover].dropdown-close,.dropdown[popover]:not(.dropdown-open,:popover-open)){transform-origin:top;opacity:0;display:none;scale:.95}:where(.btn){width:unset}.btn{--size:calc(var(--size-field,.25rem) * 10);--btn-p:1rem;--btn-fg:var(--color-base-content);cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;border-width:var(--border);touch-action:manipulation;--btn-bg:var(--btn-color,var(--color-base-200));--btn-border:var(--btn-color,var(--color-base-200));border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow,transform;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab, red, red)){.btn{--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 calc(var(--depth) * 5%))}}.btn{--btn-soft-bg:initial;--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn{--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));height:var(--size);padding-inline:var(--btn-p);font-size:var(--fontsize,.875rem);background-color:var(--btn-bg);color:var(--btn-fg);border-color:var(--btn-border);border-style:var(--btn-border-style,solid);outline-color:var(--btn-color,var(--color-base-content));--tw-prose-links:var(--btn-fg);background-image:none, var(--fx-noise);background-size:auto, calc(var(--noise,0) * 100%);text-shadow:0 .5px oklch(100% 0 0 / calc(var(--depth) * .15));box-shadow:var(--btn-inset) inset, var(--btn-shadow)}.btn:is([type=checkbox],[type=radio]){appearance:none}.btn:is([type=checkbox],[type=radio])[aria-label]:after{--tw-content:attr(aria-label);content:var(--tw-content)}.btn:where(:checked:not(.filter [type=radio].btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem) * 6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}@media (prefers-reduced-motion:no-preference){.loading{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}}.collapse:not(td,tr,colgroup){border-radius:var(--radius-box,1rem);isolation:isolate;grid-template-rows:max-content 0fr;grid-template-columns:minmax(0,1fr);width:100%;display:grid;position:relative}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup){transition:grid-template-rows .2s}}.collapse:not(td,tr,colgroup)>input:is([type=checkbox],[type=radio]){appearance:none;opacity:0;z-index:1;grid-row-start:1;grid-column-start:1;width:100%;min-height:1lh;padding:1rem;padding-inline-end:3rem;transition:background-color .2s ease-out}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close)){grid-template-rows:max-content 1fr}.collapse:not(td,tr,colgroup):not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){--overflow-delay:.2s;overflow:revert-layer;content-visibility:visible;min-height:fit-content}@supports not (content-visibility:visible){.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible}}.collapse:not(td,tr,colgroup):focus-visible{outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):has(>input:is([type=checkbox],[type=radio]):focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):has(summary:focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):not(.collapse-close)>input[type=checkbox],.collapse:not(td,tr,colgroup):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(td,tr,colgroup):not(.collapse-close)>.collapse-title{cursor:pointer}:is(.collapse:not(td,tr,colgroup)[tabindex]:focus:not(.collapse-close,.collapse[open]),.collapse:not(td,tr,colgroup)[tabindex]:focus-within:not(.collapse-close,.collapse[open]))>.collapse-title{cursor:unset}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>:where(.collapse-content),.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem}.collapse:not(td,tr,colgroup):is(details){width:100%}.collapse:not(td,tr,colgroup):is(details)::details-content{--overflow-delay:0s;height:0;overflow:clip}.collapse:not(td,tr,colgroup):is(details):where([open])::details-content{overflow:revert-layer;height:auto}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup):is(details)::details-content{transition:overflow .2s allow-discrete var(--overflow-delay), content-visibility .2s allow-discrete, visibility .2s allow-discrete, min-height .2s ease-out allow-discrete, padding .1s ease-out 20ms, background-color .2s ease-out, height .2s;interpolate-size:allow-keywords}.collapse:not(td,tr,colgroup):is(details):where([open])::details-content{--overflow-delay:.2s}}.collapse:not(td,tr,colgroup):is(details)>summary{outline:none;display:block;position:relative}.collapse:not(td,tr,colgroup):is(details)>summary::-webkit-details-marker{display:none}.filter{flex-wrap:wrap;display:flex}.filter [type=radio]{width:auto}.filter input{opacity:1;transition:visibility .1s allow-discrete, margin .1s, opacity .3s, padding .3s, border-width .1s;overflow:hidden;scale:1}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{--tw-content:"×";content:var(--tw-content)}.filter>input:not(:last-child),.filter>:not(:last-child) input{margin-inline-end:.25rem}.list{flex-direction:column;font-size:.875rem;display:flex}.list .list-row{--list-grid-cols:minmax(0, auto) 1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border) solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}.toggle{border:var(--border) solid currentColor;color:var(--input-color);cursor:pointer;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p), var(--radius-selector-max)) + min(var(--border), var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab, red, red)){.toggle{box-shadow:0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab, red, red)){.toggle{--input-color:color-mix(in oklab, var(--color-base-content) 50%, #0000)}}.toggle{--toggle-p:calc(var(--size) * .125);--size:calc(var(--size-selector,.25rem) * 6);width:calc((var(--size) * 2) - (var(--border) + var(--toggle-p)) * 2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:0deg}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:0deg}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);width:100%;height:100%;box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab, red, red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000)}}.toggle:before{background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}@media (forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:calc(1px * -1);outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible{outline-offset:2px;outline:2px solid}.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:checked:before{background-color:currentColor}@starting-style{.toggle:checked:before{opacity:0}}.toggle[aria-checked=true]{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle[aria-checked=true]:before{background-color:currentColor}@starting-style{.toggle[aria-checked=true]:before{opacity:0}}.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:has(>input:checked):before{background-color:currentColor}@starting-style{.toggle:has(>input:checked):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border) solid currentColor;background-color:#0000}.input{appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;--size:calc(var(--size-field,.25rem) * var(--in-size-mul,10));--input-color:var(--color-base-content);flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab, red, red)){.input{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.input{cursor:text;width:clamp(3rem,20rem,100%);height:var(--size);font-size:max(var(--font-size,0rem), var(--font-size-min,.875rem));touch-action:manipulation;border:var(--border) solid var(--input-color,#0000);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field))}@supports (color:color-mix(in lab, red, red)){.input{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.input input{appearance:none;background-color:#0000;border:none;width:100%;height:100%}.input input::placeholder{color:var(--color-base-content);opacity:.5}.input input:focus,.input input:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input input:focus,.input input:focus-within{outline-offset:2px;outline:2px solid #0000}}.input input::-webkit-calendar-picker-indicator{inset-inline-end:-.15em}.input::-webkit-inner-spin-button{margin-inline-end:-10px}.input::-webkit-calendar-picker-indicator{inset-inline-end:.75em}input.input{text-align:start;display:inline-flex;position:relative}input.input[type=url],input.input[type=tel],input.input[type=email],input.input[type=number]{direction:ltr}input.input::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}input.input::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}input.input::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my,-3))}input.input::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}input.input::-webkit-color-swatch-wrapper{padding-block:.25rem}.input input{text-align:start;display:inline-flex;position:relative}.input input[type=url],.input input[type=tel],.input input[type=email],.input input[type=number]{direction:ltr}.input input::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}.input input::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}.input input::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my,-3))}.input input::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}.input input::-webkit-color-swatch-wrapper{padding-block:.25rem}.input:focus{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus{outline:2px solid var(--input-color);outline-offset:2px}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus{--font-size:1rem}}}.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus-within{--font-size:1rem}}}.input:has(>input[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}:is(.input:has(>input[disabled]):is(input),.input:has(>input[disabled]) :is(input)){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.input:has(>input[disabled]):is(input),.input:has(>input[disabled]) :is(input)){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:has(>input[disabled]){box-shadow:none}.input:has(>input[disabled])::placeholder{color:var(--color-base-content);opacity:.2}.input:has(>input[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.input:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}.input:is(:disabled,[disabled]):is(input),.input:is(:disabled,[disabled]) :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.input:is(:disabled,[disabled]):is(input),.input:is(:disabled,[disabled]) :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:is(:disabled,[disabled]){box-shadow:none}.input:is(:disabled,[disabled])::placeholder,.input:is(:disabled,[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}fieldset:disabled .input:is(input),fieldset:disabled .input :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){fieldset:disabled .input:is(input),fieldset:disabled .input :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}fieldset:disabled .input{box-shadow:none}fieldset:disabled .input::placeholder,fieldset:disabled .input ::placeholder{color:var(--color-base-content);opacity:.2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.range{appearance:none;webkit-appearance:none;--range-thumb:var(--color-base-100);--range-thumb-size:calc(var(--size-selector,.25rem) * 6);--range-progress:currentColor;--range-fill:1;--range-p:.25rem;--range-bg:currentColor}@supports (color:color-mix(in lab, red, red)){.range{--range-bg:color-mix(in oklab, currentColor 10%, #0000)}}.range{--range-fill-x:calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2));--range-fill-y:0;--range-fill-spread:calc(100cqw * var(--range-fill));cursor:pointer;vertical-align:middle;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));width:clamp(3rem,20rem,100%);height:var(--range-thumb-size);background-color:#0000;border:none;overflow:hidden}[dir=rtl] .range{--range-dir:-1}.range:focus{outline:none}.range:focus-visible{outline-offset:2px;outline:2px solid}.range::-webkit-slider-runnable-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}@media (forced-colors:active){.range::-webkit-slider-runnable-track{border:1px solid}.range::-moz-range-track{border:1px solid}}.range::-moz-range-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}.range::-webkit-slider-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));background-color:var(--range-thumb);height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;appearance:none;webkit-appearance:none;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread);position:relative;inset-block-start:50%;transform:translateY(-50%)}@supports (color:color-mix(in lab, red, red)){.range::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread)}}.range::-moz-range-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread);background-color:currentColor;position:relative}@supports (color:color-mix(in lab, red, red)){.range::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread)}}.range:disabled{cursor:not-allowed;opacity:.3}.indicator{width:max-content;display:inline-flex;position:relative}.indicator :where(.indicator-item){z-index:1;white-space:nowrap;top:var(--indicator-t,0);bottom:var(--indicator-b,auto);left:var(--indicator-s,auto);right:var(--indicator-e,0);translate:var(--indicator-x,50%) var(--indicator-y,-50%);position:absolute}.steps .step{text-align:center;--step-bg:var(--color-base-300);--step-fg:var(--color-base-content);grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps .step:before{width:100%;height:.5rem;color:var(--step-bg);background-color:var(--step-bg);content:"";border:1px solid;grid-row-start:1;grid-column-start:1;margin-inline-start:-100%;top:0}.steps .step>.step-icon{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:2147483647px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:not(:has(.step-icon)):after{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:2147483647px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:first-child:before{--tw-content:none;content:var(--tw-content)}.steps .step[data-content]:after{--tw-content:attr(data-content);content:var(--tw-content)}.avatar-group .avatar{border:4px solid var(--color-base-100);border-radius:2147483647px;overflow:hidden}.avatar{vertical-align:middle;align-self:center;display:inline-flex;position:relative}.avatar>div{aspect-ratio:1;display:block;overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%}.checkbox{border:var(--border) solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox{border:var(--border) solid var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox{cursor:pointer;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 0 #0000 inset, 0 0 #0000;--size:calc(var(--size-selector,.25rem) * 6);width:var(--size);height:var(--size);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0px 3px 0 0px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}.checkbox:checked:before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){.checkbox:checked:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{.checkbox:checked:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}.checkbox[aria-checked=true]:before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){.checkbox[aria-checked=true]:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{.checkbox[aria-checked=true]:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.checkbox[aria-checked=mixed]{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox[aria-checked=mixed]{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox[aria-checked=mixed]:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.card{border-radius:var(--radius-box);outline-offset:2px;outline:2px solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus-visible,.card[aria-checked=true]{outline-color:currentColor}.card:has(>:checked,>:is([type=checkbox],[type=radio]):focus-visible){outline-color:currentColor}.card[aria-checked=true]:focus-visible{outline-width:4px}.card:has(>:checked:focus-visible){outline-width:4px}.card[aria-checked=true]:has(>:is([type=checkbox],[type=radio]):focus-visible){outline-width:4px}.card:has(>:is([type=checkbox],[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card>:is([type=checkbox],[type=radio]){appearance:none}.textarea{appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;--input-color:var(--color-base-content);flex-shrink:1;min-height:5rem;padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab, red, red)){.textarea{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.textarea{width:clamp(3rem,20rem,100%);font-size:max(var(--font-size,0rem), var(--font-size-min,.875rem));touch-action:manipulation;border:var(--border) solid var(--input-color,#0000);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}@supports (color:color-mix(in lab, red, red)){.textarea{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.textarea textarea{appearance:none;background-color:#0000;border:none}.textarea textarea::placeholder{color:var(--color-base-content);opacity:.5}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus{--font-size:1rem}}}.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus-within{--font-size:1rem}}}.textarea:has(>textarea[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:has(>textarea[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:has(>textarea[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])::placeholder{color:var(--color-base-content);opacity:.2}.textarea:has(>textarea[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:is(:disabled,[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:is(:disabled,[disabled])::placeholder,.textarea:is(:disabled,[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.stack{grid-template-rows:3px 4px 1fr 4px 3px;grid-template-columns:3px 4px 1fr 4px 3px;display:inline-grid}.stack>*{width:100%;height:100%}.stack>:nth-child(n+2){opacity:.7;width:100%}.stack>:nth-child(2){z-index:2;opacity:.9}.stack>:first-child{z-index:3;width:100%}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab, red, red)){.label{color:color-mix(in oklab, currentcolor 60%, transparent)}}.label:has(input){cursor:pointer}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab, red, red)){.status{background-color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab, red, red)){.status{color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.status{background-image:radial-gradient(circle at 35% 30%, oklch(1 0 0 / calc(var(--depth) * .5)), #0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab, red, red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab, currentColor calc(var(--depth) * 100%), #0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border) solid var(--badge-color,var(--color-base-200));background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem) * 6);width:fit-content;height:var(--size);padding-inline:calc(var(--size) / 2 - var(--border));justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.footer{grid-auto-flow:row;place-items:start;gap:2.5rem 1rem;width:100%;font-size:.875rem;line-height:1.25rem;display:grid}.footer>:not(script,style,template){place-items:start;gap:.5rem;display:grid}.alert{--alert-border-color:var(--color-base-200);border-radius:var(--radius-box);color:var(--color-base-content);background-color:var(--alert-color,var(--color-base-200));text-align:start;background-size:auto, calc(var(--noise) * 33%);background-image:none, var(--fx-noise);box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px #000, 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08));border-style:solid;grid-template-columns:auto;grid-auto-flow:column;justify-content:start;place-items:center start;gap:1rem;padding-block:.75rem;padding-inline:1rem;font-size:.875rem;line-height:1.25rem;display:grid}@supports (color:color-mix(in lab, red, red)){.alert{box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px color-mix(in oklab, color-mix(in oklab, #000 20%, var(--alert-color,var(--color-base-200))) calc(var(--depth) * 20%), #0000), 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08))}}.alert:has(>:nth-child(2)){grid-template-columns:auto minmax(auto,1fr)}.chat{--mask-chat:url("data:image/svg+xml,%3csvg width='13' height='13' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='M0 11.5004C0 13.0004 2 13.0004 2 13.0004H12H13V0.00036329L12.5 0C12.5 0 11.977 2.09572 11.8581 2.50033C11.6075 3.35237 10.9149 4.22374 9 5.50036C6 7.50036 0 10.0004 0 11.5004Z'/%3e%3c/svg%3e");grid-auto-rows:min-content;column-gap:.75rem;padding-block:.25rem;display:grid}.card-title{font-size:var(--cardtitle-fs,1.125rem);align-items:center;gap:.5rem;font-weight:600;display:flex}.mask{vertical-align:middle;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.btn-outline{--btn-bg:#0000;color:var(--btn-rest-fg,var(--btn-color,var(--color-base-content)));--btn-border:var(--btn-color,var(--color-base-content));--btn-border-style:solid;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}.btn-ghost{--btn-bg:#0000;color:var(--btn-rest-fg,var(--btn-color,var(--color-base-content,currentColor)));--btn-border:#0000;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}.aura:has(>.card,>.alert){--aura-radius:var(--radius-box)}.aura:has(>.btn,>.input,>.select){--aura-radius:var(--radius-field)}.aura:has(>.checkbox,>.toggle,>.badge){--aura-radius:var(--radius-selector)}}@layer daisyui.l1.l2{.modal.modal-open{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal.modal-open>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal.modal-open){--page-scroll-lock: }@starting-style{.modal.modal-open{opacity:0}}.modal[open]{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal[open]>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal[open]){--page-scroll-lock: }@starting-style{.modal[open]{opacity:0}}.modal:popover-open{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal:popover-open>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal:popover-open){--page-scroll-lock: }@starting-style{.modal:popover-open{opacity:0}}.modal:target{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal:target>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal:target){--page-scroll-lock: }@starting-style{.modal:target{opacity:0}}.modal-toggle:checked+.modal{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal-toggle:checked+.modal>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal-toggle:checked+.modal){--page-scroll-lock: }@starting-style{.modal-toggle:checked+.modal{opacity:0}}.tabs-border>.tab{--tab-border-color:#0000 #0000 var(--tab-border-color) #0000;border-radius:var(--radius-field);position:relative}.tabs-border>.tab:before{content:"";background-color:var(--tab-border-color);width:calc(100% - var(--tab-p) * 2);border-radius:var(--radius-field);height:3px;bottom:0;left:var(--tab-p);transition:background-color .2s;position:absolute}:is(.tabs-border>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-border>.tab:is(input:checked),.tabs-border>.tab:is(label:has(:checked))):before{--tab-border-color:currentColor;border-top:3px solid}.tabs-lift>.tab{--tab-border:0 0 var(--border) 0;--tab-radius-ss:var(--tab-radius-limit);--tab-radius-se:var(--tab-radius-limit);--tab-radius-es:0;--tab-radius-ee:0;--tab-paddings:var(--border) var(--tab-p) 0 var(--tab-p);--tab-border-colors:#0000 #0000 var(--tab-border-color) #0000;--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right;border-width:var(--tab-border);padding:var(--tab-paddings);border-color:var(--tab-border-colors);border-start-start-radius:var(--tab-radius-ss);border-start-end-radius:var(--tab-radius-se);border-end-end-radius:var(--tab-radius-ee);border-end-start-radius:var(--tab-radius-es)}.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked)){--tab-border:var(--border) var(--border) 0 var(--border);--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);--tab-paddings:0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));--tab-inset:auto auto 0 auto;--radius-start:radial-gradient(circle at top left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at top right, var(--tab-radius-grad));background-color:var(--tab-bg)}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):before{z-index:1;content:"";width:var(--tab-corner-width);height:var(--tab-corner-height);background-position:var(--tab-corner-position);background-image:var(--radius-start), var(--radius-end);background-size:var(--tab-radius-limit) var(--tab-radius-limit);inset:var(--tab-inset);background-repeat:no-repeat;display:block;position:absolute}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):first-child:before{--radius-start:none}[dir=rtl] :is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):first-child:before{transform:rotateY(180deg)}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):last-child:before{--radius-end:none}[dir=rtl] :is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):last-child:before{transform:rotateY(180deg)}.tabs-lift:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color)}.tabs-top>.tab{--tab-order:0;--tab-border:0 0 var(--border) 0;--tab-radius-ss:var(--tab-radius-limit);--tab-radius-se:var(--tab-radius-limit);--tab-radius-es:0;--tab-radius-ee:0;--tab-paddings:var(--border) var(--tab-p) 0 var(--tab-p);--tab-border-colors:#0000 #0000 var(--tab-border-color) #0000;--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right}.tabs-top>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-top>.tab:is(input:checked),.tabs-top>.tab:is(label:has(:checked)){--tab-border:var(--border) var(--border) 0 var(--border);--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);--tab-paddings:0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));--tab-inset:auto auto 0 auto;--radius-start:radial-gradient(circle at top left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at top right, var(--tab-radius-grad))}.tabs-top:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color)}.tabs-bottom>.tab{--tab-order:1;--tab-border:var(--border) 0 0 0;--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:var(--tab-radius-limit);--tab-radius-ee:var(--tab-radius-limit);--tab-border-colors:var(--tab-border-color) #0000 #0000 #0000;--tab-paddings:0 var(--tab-p) var(--border) var(--tab-p);--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right}.tabs-bottom>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-bottom>.tab:is(input:checked),.tabs-bottom>.tab:is(label:has(:checked)){--tab-border:0 var(--border) var(--border) var(--border);--tab-border-colors:#0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color);--tab-paddings:var(--border) calc(var(--tab-p) - var(--border)) 0 calc(var(--tab-p) - var(--border));--tab-inset:0 auto auto auto;--radius-start:radial-gradient(circle at bottom left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at bottom right, var(--tab-radius-grad))}.tabs-bottom:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:#0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color)}.tabs-box>.tab{border-radius:var(--radius-field);border-style:none}.tabs-box>.tab:focus-visible,.tabs-box>.tab:is(label:has(:checked:focus-visible)){outline-offset:2px}.tabs-box>.tab:focus-visible{z-index:1}.tabs-xs>.tab{--tab-p:.375rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.75rem}.tabs-sm>.tab{--tab-p:.5rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.875rem}.tabs-md>.tab{--tab-p:.75rem;--tab-radius-min:calc(.75rem - var(--border));font-size:.875rem}.tabs-lg>.tab{--tab-p:1rem;--tab-radius-min:calc(1.5rem - var(--border));font-size:1.125rem}.tabs-xl>.tab{--tab-p:1.25rem;--tab-radius-min:calc(2rem - var(--border));font-size:1.125rem}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup)[open].collapse-arrow>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}}.collapse:not(td,tr,colgroup).collapse-open.collapse-plus>.collapse-title:after{--tw-content:"−";content:var(--tw-content)}:is(.collapse:not(td,tr,colgroup)[tabindex].collapse-arrow:focus:not(.collapse-close),.collapse:not(td,tr,colgroup).collapse-arrow[tabindex]:focus-within:not(.collapse-close))>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse:not(td,tr,colgroup)[open].collapse-plus>.collapse-title:after,.collapse:not(td,tr,colgroup)[tabindex].collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-plus:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{--tw-content:"−";content:var(--tw-content)}.list .list-row:has(>.list-col-grow:first-child){--list-grid-cols:1fr}.list .list-row:has(>.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row>*{grid-row-start:1}.steps-horizontal .step{text-align:center;grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps-horizontal .step:before{width:100%;height:.5rem;margin-inline-start:-100%;translate:0}[dir=rtl] :is(.steps-horizontal .step):before{translate:0}.steps-vertical .step{grid-template-rows:auto;grid-template-columns:40px 1fr;justify-items:start;gap:.5rem;min-height:4rem;display:grid}.steps-vertical .step:before{width:.5rem;height:100%;margin-inline-start:50%;translate:-50% -50%}[dir=rtl] :is(.steps-vertical .step):before{translate:50% -50%}.swap{cursor:pointer;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;place-content:center;display:inline-grid;position:relative}.swap input{appearance:none;border:none}.swap>*{grid-row-start:1;grid-column-start:1}@media (prefers-reduced-motion:no-preference){.swap>*{transition-property:transform,rotate,opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.swap .swap-on,.swap .swap-indeterminate,.swap input:indeterminate~.swap-on,.swap input:is(:checked,:indeterminate)~.swap-off{opacity:0}.swap input:checked~.swap-on,.swap input:indeterminate~.swap-indeterminate{opacity:1;backface-visibility:visible}.checkbox:disabled{cursor:not-allowed;opacity:.2}.image-full>.card-body{color:var(--color-neutral-content);position:relative}.card-xs .card-body{--card-p:.5rem;--card-fs:.6875rem}.card-sm .card-body{--card-p:1rem;--card-fs:.75rem}.card-md .card-body{--card-p:1.5rem;--card-fs:.875rem}.card-lg .card-body{--card-p:2rem;--card-fs:1rem}.card-xl .card-body{--card-p:2.5rem;--card-fs:1.125rem}:is(.stack,.stack.stack-bottom)>*{grid-area:3/3/6/4}:is(.stack,.stack.stack-bottom)>:nth-child(2){grid-area:2/2/5/5}:is(.stack,.stack.stack-bottom)>:first-child{grid-area:1/1/4/6}.stack.stack-top>*{grid-area:1/3/4/4}.stack.stack-top>:nth-child(2){grid-area:2/2/5/5}.stack.stack-top>:first-child{grid-area:3/1/6/6}.stack.stack-start>*{grid-area:3/1/4/4}.stack.stack-start>:nth-child(2){grid-area:2/2/5/5}.stack.stack-start>:first-child{grid-area:1/3/6/6}.stack.stack-end>*{grid-area:3/3/4/6}.stack.stack-end>:nth-child(2){grid-area:2/2/5/5}.stack.stack-end>:first-child{grid-area:1/1/6/4}.card-xs .card-title{--cardtitle-fs:.875rem}.card-sm .card-title{--cardtitle-fs:1rem}.card-md .card-title{--cardtitle-fs:1.125rem}.card-lg .card-title{--cardtitle-fs:1.25rem}.card-xl .card-title{--cardtitle-fs:1.375rem}.btn-circle{width:var(--size);height:var(--size);border-radius:2147483647px;padding-inline:0}.loading-sm{width:calc(var(--size-selector,.25rem) * 5)}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}@media (prefers-reduced-motion:no-preference){.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}}.checkbox-sm{--size:calc(var(--size-selector,.25rem) * 5);padding:.1875rem}.checkbox-xs{--size:calc(var(--size-selector,.25rem) * 4);padding:.125rem}.checkbox-secondary{color:var(--color-secondary-content);--input-color:var(--color-secondary)}.btn-neutral{--btn-color:var(--color-neutral);--btn-fg:var(--color-neutral-content);--btn-soft-bg:var(--color-neutral-content) 80%;--btn-rest-fg:initial}.btn-accent{--btn-color:var(--color-accent);--btn-fg:var(--color-accent-content);--btn-soft-bg:initial}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content);--btn-soft-bg:initial}.btn-info{--btn-color:var(--color-info);--btn-fg:var(--color-info-content);--btn-soft-bg:initial}.btn-lg{--fontsize:1.125rem;--btn-p:1.25rem;--size:calc(var(--size-field,.25rem) * 12)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);--btn-soft-bg:initial}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem) * 8)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem) * 6)}.textarea-sm{--font-size-min:.75rem}.floating-label:has(.textarea-sm){--top-mul:4;--font-size:.75rem}}.prose :where(a.btn:not(.btn-link)):not(:where([class~=not-prose],[class~=not-prose] *)){text-decoration-line:none}@layer daisyui.l1{@media (hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:hover{color:var(--btn-fg);--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:hover{--btn-border-style:solid;--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 5%)}}.btn:active:not(.btn-active){color:var(--btn-fg,var(--color-base-content));--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:active:not(.btn-active){--btn-border-style:solid;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0)}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-bg:var(--btn-color,var(--color-base-200));color:var(--btn-fg,var(--color-base-content));--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-border-style:solid;--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){isolation:isolate}.btn:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn:has(:focus-visible){isolation:isolate;outline-width:2px;outline-style:solid}.filter:not(:has(:checked:not(.filter-reset))) :is(.filter-reset,[type=reset]):not(:focus-visible){visibility:hidden;opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.filter:not(:has(:focus-visible)):has(:checked:not(.filter-reset,[type=checkbox])) :is(input,button):not(:checked,.filter-reset,[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}}@layer daisyui{.btn:is(:disabled,[disabled],[aria-disabled=true]){pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true]){color:color-mix(in oklch, var(--color-base-content) 20%, #0000)}}.btn:is(:disabled,[disabled],[aria-disabled=true]){--btn-bg:#0000;--btn-border:#0000;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}:is(.btn-disabled,.btn:is(:disabled,[disabled],[aria-disabled=true])):not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.btn-disabled,.btn:is(:disabled,[disabled],[aria-disabled=true])):not(.btn-link,.btn-ghost){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse:not(td,tr,colgroup){visibility:revert-layer}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}:is(.input[type=url],.input[type=tel],.input[type=email],.input[type=number]):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-start-start-radius:var(--join-se,var(--radius-field));border-start-end-radius:var(--join-ss,var(--radius-field));border-end-end-radius:var(--join-es,var(--radius-field));border-end-start-radius:var(--join-ee,var(--radius-field))}@layer daisyui.l1.l2.l3.l4{.card-body p{flex-grow:1}.card figure:first-child{border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card figure:last-child{border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card figure{justify-content:center;align-items:center;display:flex}}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-4{inset:calc(var(--spacing) * 4)}.inset-\\[12\\%\\]{inset:12%}.inset-\\[16\\%\\]{inset:16%}.inset-\\[20\\%\\]{inset:20%}.inset-\\[28\\%\\]{inset:28%}.inset-x-0{inset-inline:0}.inset-x-8{inset-inline:calc(var(--spacing) * 8)}.-top-0\\.5{top:calc(var(--spacing) * -.5)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-\\[-6px\\]{right:-6px}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-24{bottom:calc(var(--spacing) * 24)}.bottom-\\[20\\%\\]{bottom:20%}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing) * -2)}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.left-\\[-6px\\]{left:-6px}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;--join-ml:0;--join-mt:0;--join-v:0;--join-h:1;align-items:stretch;display:inline-flex}@scope(.join){:scope>:where(:focus,:has(:focus)){z-index:2}@media (hover:hover){:scope>:where(.btn:hover,:has(.btn:hover)){z-index:1}}:scope :where(:scope>:first-child){--join-ss:var(--radius-field);--join-se:calc(var(--radius-field) * var(--join-v));--join-es:calc(var(--radius-field) * var(--join-h));--join-ee:0}:scope :where(:scope>:last-child){--join-ss:0;--join-se:calc(var(--radius-field) * var(--join-h));--join-es:calc(var(--radius-field) * var(--join-v));--join-ee:var(--radius-field)}:scope :where(:scope>:only-child){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}:scope :where(:scope>:not(:first-child)){--join-ml:calc(var(--border,1px) * -1 * var(--join-h));--join-mt:calc(var(--border,1px) * -1 * var(--join-v))}}.z-0{z-index:0}.z-2{z-index:2}.z-5{z-index:5}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[5\\]{z-index:5}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.row-start-2{grid-row-start:2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-0\\.5{margin-inline:calc(var(--spacing) * .5)}.mx-auto{margin-inline:auto}.my-auto{margin-block:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.alert{border-width:var(--border);border-color:var(--alert-border-color,var(--color-base-200))}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.aspect-9\\/16{aspect-ratio:9/16}.aspect-\\[var\\(--tavus-expand-aspect\\)\\]{aspect-ratio:var(--tavus-expand-aspect)}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.select-control-pill{--size:calc(var(--size-field,.25rem) * 10);--icon-size:calc(var(--size-field,.25rem) * 5);--chevron-size:calc(var(--size-field,.25rem) * 3);width:calc(var(--size) + 1.25rem);height:var(--size);border-radius:var(--radius-field)}.btn-control{--icon-size:calc(var(--size-field,.25rem) * 5);width:var(--size);height:var(--size);padding-inline:0}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.h-0{height:0}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-2\\/5{height:40%}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-\\[100dvh\\]{height:100dvh}.h-\\[min\\(34rem\\,calc\\(100dvh-3rem\\)\\)\\]{height:min(34rem,100dvh - 3rem)}.h-\\[var\\(--tavus-expand-height\\)\\]{height:var(--tavus-expand-height)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-15{max-height:calc(var(--spacing) * 15)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-\\[var\\(--tavus-expand-max-height\\)\\]{max-height:var(--tavus-expand-max-height)}.max-h-none{max-height:none}.max-h-screen{max-height:100vh}.min-h-0{min-height:0}.w-0{width:0}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-32{width:calc(var(--spacing) * 32)}.w-64{width:calc(var(--spacing) * 64)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[3px\\]{width:3px}.w-\\[22rem\\]{width:22rem}.w-\\[28rem\\]{width:28rem}.w-\\[100vw\\]{width:100vw}.w-\\[var\\(--tavus-expand-width\\)\\]{width:var(--tavus-expand-width)}.w-full{width:100%}.w-max{width:max-content}.w-screen{width:100vw}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\\[22rem\\]{max-width:22rem}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-\\[min\\(20rem\\,80vw\\)\\]{max-width:min(20rem,80vw)}.max-w-\\[min\\(48cqi\\,16rem\\)\\]{max-width:min(48cqi,16rem)}.max-w-\\[var\\(--tavus-expand-max-width\\)\\]{max-width:var(--tavus-expand-max-width)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\\[0\\.98\\]{scale:.98}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.animate-\\[tavusFadeUp_240ms_ease-out\\]{animation:.24s ease-out tavusFadeUp}.animate-\\[tavusPopIn_180ms_ease-out\\]{animation:.18s ease-out tavusPopIn}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-gutter\\:stable\\]{scrollbar-gutter:stable}.appearance-none{appearance:none}.grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.grid-cols-\\[5\\.5rem_1fr\\]{grid-template-columns:5.5rem 1fr}.grid-rows-\\[1fr_auto\\]{grid-template-rows:1fr auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\\[2px\\]{gap:2px}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--radius-box);border-radius:var(--radius-box)}.rounded-field{border-radius:var(--radius-field);border-radius:var(--radius-field)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-\\[length\\:var\\(--border\\)\\]{border-style:var(--tw-border-style);border-width:var(--border)}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-base-300{border-color:var(--color-base-300)}.border-info\\/80{border-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.border-info\\/80{border-color:color-mix(in oklab, var(--color-info) 80%, transparent)}}.border-success{border-color:var(--color-success)}.border-warning,.border-warning\\/70{border-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\\/70{border-color:color-mix(in oklab, var(--color-warning) 70%, transparent)}}.border-white\\/50{border-color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.border-white\\/50{border-color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.glass{-webkit-backdrop-filter:blur(var(--glass-blur,40px));backdrop-filter:blur(var(--glass-blur,40px));background-color:#0000;background-image:linear-gradient(135deg, oklch(100% 0 0 / var(--glass-opacity,30%)) 0%, oklch(0% 0 0/0) 100%), linear-gradient(var(--glass-reflect-degree,100deg), oklch(100% 0 0 / var(--glass-reflect-opacity,5%)) 25%, oklch(0% 0 0/0) 25%);box-shadow:0 0 0 1px oklch(100% 0 0 / var(--glass-border-opacity,20%)) inset, 0 0 0 2px oklch(0% 0 0/.05);text-shadow:0 1px oklch(0% 0 0 / var(--glass-text-shadow-opacity,5%));border:none}.bg-base-100,.bg-base-100\\/70{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/70{background-color:color-mix(in oklab, var(--color-base-100) 70%, transparent)}}.bg-base-100\\/95{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/95{background-color:color-mix(in oklab, var(--color-base-100) 95%, transparent)}}.bg-base-200{background-color:var(--color-base-200)}.bg-base-300{background-color:var(--color-base-300)}.bg-black{background-color:var(--color-black)}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\\/35{background-color:#00000059}@supports (color:color-mix(in lab, red, red)){.bg-black\\/35{background-color:color-mix(in oklab, var(--color-black) 35%, transparent)}}.bg-black\\/45{background-color:#00000073}@supports (color:color-mix(in lab, red, red)){.bg-black\\/45{background-color:color-mix(in oklab, var(--color-black) 45%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-info\\/5{background-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.bg-info\\/5{background-color:color-mix(in oklab, var(--color-info) 5%, transparent)}}.bg-info\\/85{background-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.bg-info\\/85{background-color:color-mix(in oklab, var(--color-info) 85%, transparent)}}.bg-neutral{background-color:var(--color-neutral)}.bg-primary,.bg-primary\\/15{background-color:var(--color-primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/15{background-color:color-mix(in oklab, var(--color-primary) 15%, transparent)}}.bg-success\\/70{background-color:var(--color-success)}@supports (color:color-mix(in lab, red, red)){.bg-success\\/70{background-color:color-mix(in oklab, var(--color-success) 70%, transparent)}}.bg-success\\/85{background-color:var(--color-success)}@supports (color:color-mix(in lab, red, red)){.bg-success\\/85{background-color:color-mix(in oklab, var(--color-success) 85%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning,.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-warning\\/85{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/85{background-color:color-mix(in oklab, var(--color-warning) 85%, transparent)}}.bg-warning\\/90{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/90{background-color:color-mix(in oklab, var(--color-warning) 90%, transparent)}}.bg-linear-to-b{--tw-gradient-position:to bottom}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-b{--tw-gradient-position:to bottom in oklab}}.bg-linear-to-b{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-t{--tw-gradient-position:to top}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-t{--tw-gradient-position:to top in oklab}}.bg-linear-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.from-base-300{--tw-gradient-from:var(--color-base-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/30{--tw-gradient-from:#0000004d}@supports (color:color-mix(in lab, red, red)){.from-black\\/30{--tw-gradient-from:color-mix(in oklab, var(--color-black) 30%, transparent)}}.from-black\\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/60{--tw-gradient-from:#0009}@supports (color:color-mix(in lab, red, red)){.from-black\\/60{--tw-gradient-from:color-mix(in oklab, var(--color-black) 60%, transparent)}}.from-black\\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab, red, red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab, var(--color-black) 70%, transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-black\\/10{--tw-gradient-via:#0000001a}@supports (color:color-mix(in lab, red, red)){.via-black\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-black) 10%, transparent)}}.via-black\\/10{--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);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-base-200{--tw-gradient-to:var(--color-base-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-cover\\!{object-fit:cover!important}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-16{padding-inline:calc(var(--spacing) * 16)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.text-center{text-align:center}.text-left{text-align:left}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.6rem\\]{font-size:.6rem}.text-\\[10px\\]{font-size:10px}.text-preview-description-full-screen{font-size:var(--text-preview-description-full-screen)}.text-preview-title{font-size:var(--text-preview-title)}.text-preview-title-full-screen{font-size:var(--text-preview-title-full-screen)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-base-content,.text-base-content\\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/50{color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.text-base-content\\/60{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/60{color:color-mix(in oklab, var(--color-base-content) 60%, transparent)}}.text-base-content\\/70{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/70{color:color-mix(in oklab, var(--color-base-content) 70%, transparent)}}.text-error{color:var(--color-error)}.text-info{color:var(--color-info)}.text-info-content{color:var(--color-info-content)}.text-inherit{color:inherit}.text-neutral{color:var(--color-neutral)}.text-neutral-content{color:var(--color-neutral-content)}.text-primary{color:var(--color-primary)}.text-primary-content{color:var(--color-primary-content)}.text-secondary{color:var(--color-secondary)}.text-success{color:var(--color-success)}.text-success-content{color:var(--color-success-content)}.text-warning{color:var(--color-warning)}.text-warning-content{color:var(--color-warning-content)}.text-white{color:var(--color-white)}.text-white\\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-base-100,.ring-base-100\\/20{--tw-ring-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.ring-base-100\\/20{--tw-ring-color:color-mix(in oklab, var(--color-base-100) 20%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-xl{--tw-blur:blur(var(--blur-xl));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,)}.brightness-\\[0\\.55\\]{--tw-brightness:brightness(.55);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,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.btn-preview-action{--btn-color:var(--color-preview-action);--btn-fg:var(--color-preview-action-content)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[--tavus-expand-default-max-height\\:900px\\]{--tavus-expand-default-max-height:900px}.\\[--tavus-expand-default-max-width\\:1280px\\]{--tavus-expand-default-max-width:1280px}.\\[text-shadow\\:0_1px_3px_rgb\\(0_0_0\\/0\\.45\\)\\]{text-shadow:0 1px 3px #00000073}.btn{--icon-size:calc(var(--size-field,.25rem) * 5)}.backdrop\\:bg-black\\/60::backdrop{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.backdrop\\:bg-black\\/60::backdrop{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}@media (hover:hover){.hover\\:bg-base-200:hover{background-color:var(--color-base-200)}.hover\\:bg-black\\/50:hover{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/50:hover{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.hover\\:text-base-content\\/80:hover{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-base-content\\/80:hover{color:color-mix(in oklab, var(--color-base-content) 80%, transparent)}}.hover\\:text-error:hover{color:var(--color-error)}.hover\\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.has-\\[\\.cvi-video-surface\\]\\:will-change-transform:has(.cvi-video-surface){will-change:transform}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[tavusFadeOut_280ms_ease-out_forwards\\]{animation:.28s ease-out forwards tavusFadeOut}.motion-safe\\:animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.motion-safe\\:animate-\\[tavusFadeUp_280ms_ease-out\\]{animation:.28s ease-out tavusFadeUp}.motion-safe\\:backdrop\\:animate-\\[tavusFadeIn_180ms_ease-out\\]::backdrop{animation:.18s ease-out tavusFadeIn}}@container not (width>=56.25rem){.\\@max-mobile\\:inset-x-5{inset-inline:calc(var(--spacing) * 5)}.\\@max-mobile\\:right-3{right:calc(var(--spacing) * 3)}.\\@max-mobile\\:bottom-20{bottom:calc(var(--spacing) * 20)}.\\@max-mobile\\:left-3{left:calc(var(--spacing) * 3)}.\\@max-mobile\\:col-span-2{grid-column:span 2/span 2}.\\@max-mobile\\:row-start-1{grid-row-start:1}.\\@max-mobile\\:block{display:block}.\\@max-mobile\\:aspect-9\\/16{aspect-ratio:9/16}.\\@max-mobile\\:w-24{width:calc(var(--spacing) * 24)}.\\@max-mobile\\:w-full{width:100%}.\\@max-mobile\\:gap-1{gap:var(--spacing)}.\\@max-mobile\\:self-start{align-self:flex-start}.\\@max-mobile\\:p-5{padding:calc(var(--spacing) * 5)}.\\@max-mobile\\:px-5{padding-inline:calc(var(--spacing) * 5)}.\\@max-mobile\\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\@max-mobile\\:text-preview-title-narrow{font-size:var(--text-preview-title-narrow)}}@container not (width>=48rem){.\\@max-3xl\\:px-10{padding-inline:calc(var(--spacing) * 10)}}@container not (width>=28rem){.\\@max-md\\:hidden{display:none}.\\@max-md\\:p-4{padding:calc(var(--spacing) * 4)}.\\@max-md\\:px-5{padding-inline:calc(var(--spacing) * 5)}@layer daisyui.l1.l2{.\\@max-md\\:btn-md{--fontsize:.875rem;--btn-p:1rem;--size:calc(var(--size-field,.25rem) * 10)}}}@container (width>=48rem){.\\@3xl\\:grid-cols-\\[1fr_1\\.2fr\\]{grid-template-columns:1fr 1.2fr}}@media (width<=768px){.\\[\\@media\\(max-width\\:768px\\)\\]\\:h-dvh{height:100dvh}.\\[\\@media\\(max-width\\:768px\\)\\]\\:max-h-none{max-height:none}.\\[\\@media\\(max-width\\:768px\\)\\]\\:w-screen{width:100vw}.\\[\\@media\\(max-width\\:768px\\)\\]\\:max-w-none{max-width:none}}@media (width>=2560px){.\\[\\@media\\(min-width\\:2560px\\)\\]\\:\\[--tavus-expand-default-max-height\\:1200px\\]{--tavus-expand-default-max-height:1200px}.\\[\\@media\\(min-width\\:2560px\\)\\]\\:\\[--tavus-expand-default-max-width\\:1600px\\]{--tavus-expand-default-max-width:1600px}}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-bg:var(--btn-color,var(--color-base-200));--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));background-color:var(--btn-bg);background-image:none, var(--fx-noise);color:var(--btn-fg);opacity:.9}.cvi-autohide{transition-property:opacity,transform;transition-duration:.3s;transition-timing-function:cubic-bezier(.16,1,.3,1)}.cvi-control-rail{pointer-events:auto}.cvi-autohide[data-hidden=true]{opacity:0;transition-timing-function:cubic-bezier(.7,0,.84,0)}.cvi-autohide-slide[data-hidden=true]{transform:translateY(100%)}.cvi-control-rail[data-hidden=true]{pointer-events:none}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide{opacity:0;transition-timing-function:cubic-bezier(.7,0,.84,0)}.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide-slide{transform:translateY(100%)}.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-control-rail{pointer-events:none}}@media (prefers-reduced-motion:reduce){.cvi-autohide{transition:none}}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide[data-pinned=true]:not([data-hidden=true]){opacity:1;transition-timing-function:cubic-bezier(.16,1,.3,1)}}.embed-loading-screen{isolation:isolate;background-color:var(--color-base-200);color:var(--color-base-content);flex-direction:column;justify-content:center;align-items:center;display:flex}.embed-loading-screen:before{content:"";z-index:0;pointer-events:none;opacity:.42;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'><rect x='0' y='0' width='1' height='1' fill='white' fill-opacity='0.55'/><rect x='2' y='1' width='1' height='1' fill='white' fill-opacity='0.24'/><rect x='1' y='3' width='1' height='1' fill='white' fill-opacity='0.36'/></svg>");background-size:4px 4px;position:absolute;inset:-2rem;-webkit-mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%);mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%)}.embed-loading-dot-field{z-index:1;grid-template-columns:repeat(var(--dot-columns,21), minmax(0, 1fr));grid-template-rows:repeat(var(--dot-rows,13), minmax(0, 1fr));pointer-events:none;grid-auto-rows:0;place-items:center;display:grid;position:absolute;inset:0;overflow:hidden}.embed-loading-field-dot{aspect-ratio:1;width:clamp(2px,.28vw,4px);opacity:var(--dot-opacity,.54);animation:embed-loading-field-dot 2.1s steps(5, end) var(--dot-delay,0s) infinite;background:currentColor;border-radius:999px;transform:scale(1)}@container conversation (width<=899.98px){.embed-loading-dot-field{inset:0}}@keyframes embed-loading-field-dot{0%,16%{opacity:var(--dot-opacity,.54);transform:scale(1)}42%,74%{opacity:0;transform:scale(.35)}to{opacity:var(--dot-opacity,.54);transform:scale(1)}}@media (prefers-reduced-motion:reduce){.embed-loading-field-dot{animation:none}}.cs-dot{opacity:0;animation:1.4s ease-in-out infinite cs-dot-fade;display:inline-block}.cs-dot:first-child{animation-delay:0s}.cs-dot:nth-child(2){animation-delay:.2s}.cs-dot:nth-child(3){animation-delay:.4s}@keyframes cs-dot-fade{0%,80%,to{opacity:0}40%{opacity:1}}@keyframes tavusFadeUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes tavusFadeOut{0%{opacity:1}to{opacity:0}}@keyframes tavusFadeIn{0%{opacity:0}to{opacity:1}}@keyframes tavusPopIn{0%{opacity:0;transform:scale(.92)translateY(8px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes tavusOrbSpin{to{transform:rotate(360deg)}}@keyframes tavusOrbPulse{0%,to{opacity:.18;transform:scale(1)}50%{opacity:.34;transform:scale(1.18)}}@keyframes tavusAudioWave{0%{opacity:var(--wave-peak,.25);transform:scale(1)}to{opacity:0;transform:scale(1.9)}}.tavus-mesh-bg{isolation:isolate;background-color:var(--color-base-200);background-image:radial-gradient(ellipse 90% 90% at 18% 14%, var(--color-primary), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, var(--color-secondary), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, var(--color-accent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, var(--color-info,var(--color-secondary)), transparent 55%), radial-gradient(circle at 52% 48%, var(--color-primary), transparent 60%);width:100%;height:100%;position:relative;overflow:hidden}@supports (color:color-mix(in lab, red, red)){.tavus-mesh-bg{background-image:radial-gradient(ellipse 90% 90% at 18% 14%, color-mix(in oklab, var(--color-primary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, color-mix(in oklab, var(--color-secondary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, color-mix(in oklab, var(--color-accent) 90%, transparent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, color-mix(in oklab, var(--color-info,var(--color-secondary)) 90%, transparent), transparent 55%), radial-gradient(circle at 52% 48%, color-mix(in oklab, var(--color-primary) 35%, transparent), transparent 60%)}}.tavus-mesh-bg>.tavus-mesh-blob{filter:blur(60px);will-change:transform;pointer-events:none;opacity:.65;border-radius:50%;position:absolute}.tavus-mesh-bg>.tavus-mesh-blob-1{background-color:var(--color-primary);width:55%;height:60%;animation:23s ease-in-out infinite tavusMeshFlow1;top:6%;left:4%}.tavus-mesh-bg>.tavus-mesh-blob-2{background-color:var(--color-secondary);width:50%;height:55%;animation:28s ease-in-out infinite tavusMeshFlow2;top:10%;right:6%}.tavus-mesh-bg>.tavus-mesh-blob-3{background-color:var(--color-accent);width:58%;height:50%;animation:21s ease-in-out infinite tavusMeshFlow3;bottom:8%;left:6%}.tavus-mesh-bg>.tavus-mesh-blob-4{background-color:var(--color-info,var(--color-secondary));width:52%;height:55%;animation:26s ease-in-out infinite tavusMeshFlow4;bottom:6%;right:8%}.tavus-mesh-bg>.tavus-mesh-blob-5{background-color:var(--color-primary);opacity:.45;width:42%;height:46%;animation:19s ease-in-out infinite tavusMeshFlow5;top:28%;left:30%}@keyframes tavusMeshFlow1{0%,to{transform:translate(0%)scale(1)}20%{transform:translate(18%,10%)scale(1.08)}45%{transform:translate(10%,24%)scale(1.14)}70%{transform:translate(24%,18%)scale(1.06)}}@keyframes tavusMeshFlow2{0%,to{transform:translate(0%)scale(1)}30%{transform:translate(-22%,14%)scale(1.1)}55%{transform:translate(-30%,6%)scale(1.05)}80%{transform:translate(-12%,22%)scale(1.12)}}@keyframes tavusMeshFlow3{0%,to{transform:translate(0%)scale(1)}25%{transform:translate(20%,-14%)scale(1.06)}60%{transform:translate(28%,-22%)scale(1.14)}85%{transform:translate(14%,-10%)scale(1.04)}}@keyframes tavusMeshFlow4{0%,to{transform:translate(0%)scale(1)}35%{transform:translate(-18%,-22%)scale(1.12)}60%{transform:translate(-26%,-12%)scale(1.06)}85%{transform:translate(-8%,-26%)scale(1.1)}}@keyframes tavusMeshFlow5{0%,to{transform:translate(0%)scale(1)rotate(0)}25%{transform:translate(28%,-12%)scale(1.18)rotate(90deg)}50%{transform:translate(-6%,26%)scale(.85)rotate(180deg)}75%{transform:translate(-26%,-8%)scale(1.08)rotate(270deg)}}@media (prefers-reduced-motion:reduce){.tavus-mesh-bg>.tavus-mesh-blob{animation:none}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes rotator{89.9999%,to{--first-item-position:0 0%}90%,99.9999%{--first-item-position:0 calc(var(--items) * 100%)}to{translate:0 -100%}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes dropdown{0%{opacity:0}}@keyframes aura{to{--aura-angle:360deg;transform:translateZ(1px)}}@keyframes aura-glow{20%,80%{opacity:.7;filter:blur(.25rem)}50%{opacity:1;filter:blur(.75rem)}}@keyframes aura-glow-after{20%,80%{opacity:.3;filter:blur(1rem)}50%{opacity:.6;filter:blur(1.5rem)}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes menu{0%{opacity:0}}@keyframes progress{50%{background-position-x:-115%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}`,Re,ze,Be,Ve,He=0,Ue=[],We=r,Ge=We.__b,Ke=We.__r,qe=We.diffed,Je=We.__c,Ye=We.unmount,Xe=We.__;function Ze(e,t){We.__h&&We.__h(ze,e,He||t),He=0;var n=ze.__H||(ze.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function O(e){return He=1,Qe(st,e)}function Qe(e,t,n){var r=Ze(Re++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):st(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=ze,!ze.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};ze.__f=!0;var a=ze.shouldComponentUpdate,o=ze.componentWillUpdate;ze.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},ze.shouldComponentUpdate=i}return r.__N||r.__}function k(e,t){var n=Ze(Re++,3);!We.__s&&ot(n.__H,t)&&(n.__=e,n.u=t,ze.__H.__h.push(n))}function $e(e,t){var n=Ze(Re++,4);!We.__s&&ot(n.__H,t)&&(n.__=e,n.u=t,ze.__h.push(n))}function A(e){return He=5,j(function(){return{current:e}},[])}function j(e,t){var n=Ze(Re++,7);return ot(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function M(e,t){return He=8,j(function(){return e},t)}function N(e){var t=ze.context[e.__c],n=Ze(Re++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(ze)),t.props.value):e.__}function et(){var e=Ze(Re++,11);if(!e.__){for(var t=ze.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function tt(){for(var e;e=Ue.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(it),t.__h.some(at),t.__h=[]}catch(n){t.__h=[],We.__e(n,e.__v)}}}We.__b=function(e){ze=null,Ge&&Ge(e)},We.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Xe&&Xe(e,t)},We.__r=function(e){Ke&&Ke(e),Re=0;var t=(ze=e.__c).__H;t&&(Be===ze?(t.__h=[],ze.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(it),t.__h.some(at),t.__h=[],Re=0)),Be=ze},We.diffed=function(e){qe&&qe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ue.push(t)!==1&&Ve===We.requestAnimationFrame||((Ve=We.requestAnimationFrame)||rt)(tt)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),Be=ze=null},We.__c=function(e,t){t.some(function(e){try{e.__h.some(it),e.__h=e.__h.filter(function(e){return!e.__||at(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],We.__e(n,e.__v)}}),Je&&Je(e,t)},We.unmount=function(e){Ye&&Ye(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{it(e)}catch(e){t=e}}),n.__H=void 0,t&&We.__e(t,n.__v))};var nt=typeof requestAnimationFrame==`function`;function rt(e){var t,n=function(){clearTimeout(r),nt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);nt&&(t=requestAnimationFrame(n))}function it(e){var t=ze,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),ze=t}function at(e){var t=ze;e.__c=e.__(),ze=t}function ot(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function st(e,t){return typeof t==`function`?t(e):t}var ct=16/9,lt=9/16,ut=`var(--tavus-expand-default-max-width)`,dt=`var(--tavus-expand-default-max-height)`,ft=`100vw - 40px`,pt=`100dvh - 40px`;function mt(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t||Array.isArray(t))return;let n=t,r={};return typeof n.enabled==`boolean`&&(r.enabled=n.enabled),typeof n.fullscreen==`boolean`&&(r.fullscreen=n.fullscreen),(n.aspect===`horizontal`||n.aspect===`vertical`)&&(r.aspect=n.aspect),(typeof n.custom_aspect==`string`||typeof n.custom_aspect==`number`)&&(r.custom_aspect=n.custom_aspect),typeof n.max_width==`number`&&(r.max_width=n.max_width),typeof n.max_height==`number`&&(r.max_height=n.max_height),r}function ht(e){if(typeof e==`number`)return vt(e);if(typeof e!=`string`)return;let t=e.trim();if(!t)return;let n=t.split(/[/:]/);if(n.length===2){let e=vt(Number(n[0])),t=vt(Number(n[1]));return e&&t?e/t:void 0}return n.length===1?vt(Number(t)):void 0}function gt(e){let t=ht(e?.custom_aspect)??(e?.aspect===`vertical`?lt:ct),n=vt(e?.max_width),r=vt(e?.max_height),i=t>=1?`landscape`:`portrait`;return e?.fullscreen?{ratio:t,orientation:i,maxWidth:n,maxHeight:r,vars:{"--tavus-expand-aspect":`auto`,"--tavus-expand-width":`100%`,"--tavus-expand-height":`100%`,"--tavus-expand-max-width":`none`,"--tavus-expand-max-height":`none`}}:{ratio:t,orientation:i,maxWidth:n,maxHeight:r,vars:i===`landscape`?{"--tavus-expand-aspect":String(t),"--tavus-expand-width":`min(${ft}, (${pt}) * ${t}, ${n?`${n}px`:ut})`,"--tavus-expand-height":`auto`,"--tavus-expand-max-width":`none`,"--tavus-expand-max-height":r?`${r}px`:`none`}:{"--tavus-expand-aspect":String(t),"--tavus-expand-width":`auto`,"--tavus-expand-height":`min(${pt}, (${ft}) / ${t}, ${r?`${r}px`:dt})`,"--tavus-expand-max-width":n?`${n}px`:`none`,"--tavus-expand-max-height":`none`}}}function _t(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}function vt(e){return e!==void 0&&Number.isFinite(e)&&e>0?e:void 0}var yt=0;Array.isArray;function P(e,t,n,i,a,o){t||={};var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--yt,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return r.vnode&&r.vnode(u),u}var bt=we(null);function xt(e){let t;if(e[`override-config`])try{t=JSON.parse(e[`override-config`])}catch{}let n=!!e.token;return{layout:e.layout?.trim().toLowerCase()===`full-screen`?`full-screen`:`inline`,cameraOnStart:e[`camera-on-start`]===`off`?`off`:`on`,deploymentId:e[`deployment-id`],conversationUrl:e[`conversation-url`],previewToken:e.token,baseUrl:e[`base-url`],conversationalContext:Ct(e[`conversational-context`]),customGreeting:Ct(e[`custom-greeting`]),memoryStores:wt(e[`memory-stores`]),overrideConfig:t,expandOptions:mt(e[`expand-options`]),mode:n?`preview`:`production`}}function St(e){let t=j(()=>xt({layout:e.layout,"camera-on-start":e[`camera-on-start`],"deployment-id":e[`deployment-id`],"conversation-url":e[`conversation-url`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"memory-stores":e[`memory-stores`],"base-url":e[`base-url`],"expand-options":e[`expand-options`],token:e.token}),[e.layout,e[`camera-on-start`],e[`deployment-id`],e[`conversation-url`],e[`override-config`],e[`conversational-context`],e[`custom-greeting`],e[`memory-stores`],e[`base-url`],e[`expand-options`],e.token]);return P(bt.Provider,{value:t,children:e.children})}function Ct(e){return e?.trim()||void 0}function wt(e){let t=e?.split(`,`).map(e=>e.trim()).filter(Boolean);return t&&t.length?t:void 0}var Tt=Symbol.for(`preact-signals`);function Et(){if(Mt>1)Mt--;else{var e,t=!1;for((function(){var e=It;for(It=void 0;e!==void 0;){var t=e.S;if(t.v===e.v)for(var n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();jt!==void 0;){var n=jt;for(jt=void 0,Nt++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Vt(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(Nt=0,Mt--,t)throw e}}function Dt(e){if(Mt>0)return e();Ft=++Pt,Mt++;try{return e()}finally{Et()}}var Ot,kt=void 0;function At(e){var t=kt,n=Ot;kt=void 0,Ot=void 0;try{return e()}finally{kt=t,Ot=n}}var jt=void 0,Mt=0,Nt=0,Pt=0,Ft=0,It=void 0,Lt=0;function Rt(e){if(kt!==void 0){var t=e.n;if(t===void 0||t.t!==kt)return t={i:0,S:e,p:kt.s,n:void 0,t:kt,e:void 0,x:void 0,r:t},kt.s!==void 0&&(kt.s.n=t),kt.s=t,e.n=t,32&kt.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=kt.s,t.n=void 0,kt.s.n=t,kt.s=t),t}}function zt(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}zt.prototype.brand=Tt,zt.prototype.h=function(){return!0},zt.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?At(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},zt.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&At(function(){var e;(e=t.Z)==null||e.call(t)}))}},zt.prototype.subscribe=function(e){var t=this;return Xt(function(){var n=t.value;At(function(){return e(n)})},{name:`sub`})},zt.prototype.valueOf=function(){return this.value},zt.prototype.toString=function(){return this.value+``},zt.prototype.toJSON=function(){return this.value},zt.prototype.peek=function(){var e=this;return At(function(){return e.value})},Object.defineProperty(zt.prototype,"value",{get:function(){var e=Rt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Nt>100)throw Error(`Cycle detected`);(function(e){Mt!==0&&Nt===0&&e.l!==Ft&&(e.l=Ft,It={S:e,v:e.v,i:e.i,o:It})})(this),this.v=e,this.i++,Lt++,Mt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Et()}}}});function Bt(e,t){return new zt(e,t)}function Vt(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Ht(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ut(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Wt(e,t){zt.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Lt-1,this.f=4}Wt.prototype=new zt,Wt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Lt))return!0;if(this.g=Lt,this.f|=1,this.i>0&&!Vt(this))return this.f&=-2,!0;var e=kt;try{Ht(this),kt=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return kt=e,Ut(this),this.f&=-2,!0},Wt.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}zt.prototype.S.call(this,e)},Wt.prototype.U=function(e){if(this.t!==void 0&&(zt.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Wt.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Wt.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Rt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Gt(e,t){return new Wt(e,t)}function Kt(e){var t=e.m;if(e.m=void 0,typeof t==`function`){Mt++;var n=kt;kt=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,qt(e),t}finally{kt=n,Et()}}}function qt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Kt(e)}function Jt(e){if(kt!==this)throw Error(`Out-of-order effect`);Ut(this),kt=e,this.f&=-2,8&this.f&&qt(this),Et()}function Yt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Ot&&Ot.push(this)}Yt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},Yt.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Kt(this),Ht(this),Mt++;var e=kt;return kt=this,Jt.bind(this,e)},Yt.prototype.N=function(){2&this.f||(this.f|=2,this.u=jt,jt=this)},Yt.prototype.d=function(){this.f|=8,1&this.f||qt(this)},Yt.prototype.dispose=function(){this.d()};function Xt(e,t){var n=new Yt(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Zt,Qt,$t=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,en=[],tn=[];Xt(function(){Zt=this.N})();function nn(e,t){r[e]=t.bind(null,r[e]||function(){})}function rn(e){if(Qt){var t=Qt;Qt=void 0,t()}Qt=e&&e.S()}function an(e){var t=this,n=e.data,r=sn(n);r.name=`ReactiveDom`,r.value=n;var i=j(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=Gt(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),o=Gt(function(){return!Array.isArray(i.value)&&!a(i.value)}),s=Xt(function(){if(this.N=pn,o.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),c=t.__$u.d;return t.__$u.d=function(){s(),c.call(this)},[o,i]},[]),o=i[0],s=i[1];return o.value?s.peek():s.value}an.displayName=`ReactiveTextNode`,Object.defineProperties(zt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:an},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),nn(`__b`,function(e,t){if(rn(),typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof zt&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),nn(`__r`,function(e,t){if(e(t),t.type!==E){rn();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return Xt(function(){n=this},{name:t}),n.c=e,n}(function(e){return function(){var t;$t&&((t=this.y)==null||t.call(this)),e.__$f|=1,e.setState({})}}(r),typeof t.type==`function`?t.type.displayName||t.type.name:``))),rn(n)}}),nn(`__e`,function(e,t,n,r){rn(),e(t,n,r)}),nn(`diffed`,function(e,t){rn();var n;if(typeof t.type==`string`&&(n=t.__e)){var r=t.__np,i=t.props,a=n.U;if(a)for(var o in a){var s=a[o];s===void 0||r&&o in r||(s.d(),a[o]=void 0)}if(r)for(var c in a||(a={},n.U=a),r){var l=a[c],u=r[c];l===void 0?(l=on(n,c,u,i),a[c]=l):l.o(u,i)}}e(t)});function on(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=Bt(n);return{o:function(e,t){a.value=e,r=t},d:Xt(function(){this.N=pn;var n=a.value.value;r[t]!==n&&(r[t]=n,i?e[t]=n:n!=null&&(!1!==n||t[4]===`-`)?e.setAttribute(t,n):e.removeAttribute(t))})}}nn(`unmount`,function(e,t){if(typeof t.type==`string`){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var a=r[i];a&&a.d()}}var o=t.__np;if(o){var s=t.props;for(var c in o)s[c]=o[c]}t.__np=void 0}else{var l=t.__c;if(l){var u=l.__$u;u&&(l.__$u=void 0,u.d())}}e(t)}),nn(`__h`,function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)}),ee.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u==`boolean`&&!0===this.u){var a=2&this.__$f;if(!(r||a||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!==`__source`&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function sn(e,t){return j(function(){return Bt(e,t)},[])}var cn=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},ln=function(e){queueMicrotask(function(){queueMicrotask(e)})};function un(){Dt(function(){for(var e;e=en.shift();)Zt.call(e)})}function dn(){en.push(this)===1&&(r.requestAnimationFrame||cn)(un)}function fn(){Dt(function(){for(var e;e=tn.shift();)Zt.call(e)})}function pn(){tn.push(this)===1&&(r.requestAnimationFrame||ln)(fn)}function mn(e,t){var n=A(e);n.current=e,k(function(){return Xt(function(){return this.N=dn,n.current()},t)},[])}function hn(e){let t=`[Tavus:${e}]`;return{info:(...e)=>{},warn:(...e)=>console.warn(t,...e),error:(...e)=>console.error(t,...e)}}var gn=hn(`API`);function _n(e={}){let t=(e.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),n=e.token;async function r(e,r,i,a){let o={};i!=null&&(o[`Content-Type`]=`application/json`),n&&(o.Authorization=`Bearer ${n}`);let s=`${t}${r}`;gn.info(e,s);let c=await fetch(s,{method:e,headers:o,body:i==null?void 0:JSON.stringify(i),signal:a?.signal,keepalive:a?.keepalive});if(!c.ok){let t=await c.text().catch(()=>``);throw gn.error(`${e} ${s} → ${c.status}`,t),new vn(c.status,t||c.statusText,c.headers)}if(c.headers.get(`content-type`)?.includes(`application/json`))return await c.json()}return{get:(e,t)=>r(`GET`,e,void 0,t),post:(e,t,n)=>r(`POST`,e,t,n)}}var vn=class extends Error{status;body;headers;constructor(e,t,n){super(`API error ${e}: ${t}`),this.status=e,this.body=t,this.headers=n,this.name=`ApiError`}};function yn(e,t,n){return e.get(`/v2/deployments/${t}/init`,n)}function bn(e,t,n={},r){return e.post(`/v2/deployments/${t}/start`,n,r)}function xn(e,t,n,r){return e.post(`/v2/deployments/${t}/conversations/${n}/end`,void 0,r)}function Sn(e,t,n,r){let i=`/v2/conversations/${t}/canvas/interactions`;return r?e.post(i,n,r):e.post(i,n)}function Cn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function wn(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(n[r]=Cn(a)&&Cn(i)?wn(a,i):i)}return n}var Tn=F,En={type:`object`,properties:{schema_version:{type:`integer`,const:1,default:1},terms_content:{type:`string`,default:``},terms_enabled:{type:`boolean`,default:!1},show_haircheck:{type:`boolean`,default:!0},language_selector:{type:`boolean`,default:!1},conversation:{type:`object`,default:{},properties:{modality:{type:`string`,enum:[`audio`,`video`,`chat`],default:`video`},enable_chat:{type:`boolean`,default:!1},enable_closed_captions:{type:`boolean`,default:!1},enable_picture_in_picture:{type:`boolean`,default:!1},show_fullscreen_hint:{type:`boolean`,default:!0},unique_memory_tag:{type:`boolean`,default:!0},context:{type:`string`,default:``},magic_grid:{type:`boolean`}}},style:{type:`object`,default:{},properties:{mode:{type:`string`,enum:[`system`,`light`,`dark`],default:`system`},style:{type:`string`,enum:[`basic`,`wireframe`,`silk`,`cyberpunk`,`retro`,`lemonade`],default:`basic`},boxes_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},field_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},selectors_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},border_width:{type:`integer`,enum:[0,1,2,3,4],default:0},depth_effect:{type:`boolean`,default:!1},noise_effect:{type:`boolean`,default:!1},fields_size:{type:`integer`,enum:[1,2,3],default:2},selectors_size:{type:`integer`,enum:[1,2,3],default:2},icon_library:{type:`string`,enum:[`pixelarticons`,`lucide`],default:`pixelarticons`}}},widget:{type:`object`,default:{},properties:{variant:{type:`string`,enum:[`tiny`,`compact`,`full`],default:`compact`},position:{type:`string`,enum:[`bottom-left`,`bottom-right`,`top-left`,`top-right`,`top`,`bottom`],default:`bottom-right`},expandable:{type:`string`,enum:[`default`,`always`,`start-expanded`],default:`default`},avatar:{type:`object`,default:{},properties:{type:{type:`string`,enum:[`orb`,`image`],default:`orb`}}},text:{type:`object`,default:{},properties:{title:{type:`string`,default:``},btn_title:{type:`string`,default:``}}}}},landing_page:{type:`object`,default:{},properties:{template:{type:`string`,enum:[`1`,`2`,`3`,`4`,`5`],default:`1`},access:{type:`string`,enum:[`public`,`auth_required`],default:`public`},logo:{type:`string`,default:``},title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},default:[]},background:{type:[`object`,`null`],default:null,properties:{type:{type:`string`,enum:[`default`,`image`],default:`default`},url:{type:[`string`,`null`],default:null}}}}},preview:{type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},btn_title:{type:`string`,default:``},background:{type:`object`,default:{},properties:{type:{type:[`string`,`null`],enum:[`replica`,`background-gradient`,`custom-image`,null],default:null},url:{type:`string`,default:``}}}}},haircheck:{type:`object`,default:{},properties:{permission_request_title:{type:`string`,default:``},permission_request_description:{type:`string`,default:``},permission_granted_title:{type:`string`,default:``},permission_granted_description:{type:`string`,default:``},permission_denied_title:{type:`string`,default:``},permission_denied_description:{type:`string`,default:``},join_button:{type:`string`,default:``},cancel_btn:{type:`string`,default:``}}},after_call:{type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},default:[]}}},branding:{type:`object`,default:{},properties:{hide_tavus_badge:{type:`boolean`,default:!1},logo:{type:`string`,default:``},text:{type:`string`,default:``}}},unavailable_screen:{type:`object`,properties:{daily_limit:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},total_limit:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},busy:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},error:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},captcha_unsupported:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]}}}}}},Dn=Object.prototype.hasOwnProperty;function F(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){if(e&&typeof e==`object`&&!Array.isArray(e)){e.schema_version===void 0&&(e.schema_version=1),e.terms_content===void 0&&(e.terms_content=``),e.terms_enabled===void 0&&(e.terms_enabled=!1),e.show_haircheck===void 0&&(e.show_haircheck=!0),e.language_selector===void 0&&(e.language_selector=!1),e.conversation===void 0&&(e.conversation={}),e.style===void 0&&(e.style={}),e.widget===void 0&&(e.widget={}),e.landing_page===void 0&&(e.landing_page={}),e.preview===void 0&&(e.preview={}),e.haircheck===void 0&&(e.haircheck={}),e.after_call===void 0&&(e.after_call={}),e.branding===void 0&&(e.branding={});for(let t in e)Dn.call(En.properties,t)||delete e[t];{let n=e.schema_version;if(typeof n!=`number`||n%1||isNaN(n))return F.errors=[{instancePath:t+`/schema_version`,schemaPath:`#/properties/schema_version/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(n!==1)return F.errors=[{instancePath:t+`/schema_version`,schemaPath:`#/properties/schema_version/const`,keyword:`const`,params:{allowedValue:1},message:`must be equal to constant`}],!1;var a=!0;if(a){if(typeof e.terms_content!=`string`)return F.errors=[{instancePath:t+`/terms_content`,schemaPath:`#/properties/terms_content/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var a=!0;if(a){if(typeof e.terms_enabled!=`boolean`)return F.errors=[{instancePath:t+`/terms_enabled`,schemaPath:`#/properties/terms_enabled/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){if(typeof e.show_haircheck!=`boolean`)return F.errors=[{instancePath:t+`/show_haircheck`,schemaPath:`#/properties/show_haircheck/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){if(typeof e.language_selector!=`boolean`)return F.errors=[{instancePath:t+`/language_selector`,schemaPath:`#/properties/language_selector/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){let n=e.conversation;if(n&&typeof n==`object`&&!Array.isArray(n)){n.modality===void 0&&(n.modality=`video`),n.enable_chat===void 0&&(n.enable_chat=!1),n.enable_closed_captions===void 0&&(n.enable_closed_captions=!1),n.enable_picture_in_picture===void 0&&(n.enable_picture_in_picture=!1),n.show_fullscreen_hint===void 0&&(n.show_fullscreen_hint=!0),n.unique_memory_tag===void 0&&(n.unique_memory_tag=!0),n.context===void 0&&(n.context=``);for(let e in n)e!==`modality`&&e!==`enable_chat`&&e!==`enable_closed_captions`&&e!==`enable_picture_in_picture`&&e!==`show_fullscreen_hint`&&e!==`unique_memory_tag`&&e!==`context`&&e!==`magic_grid`&&delete n[e];{let e=n.modality;if(typeof e!=`string`)return F.errors=[{instancePath:t+`/conversation/modality`,schemaPath:`#/properties/conversation/properties/modality/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`audio`&&e!==`video`&&e!==`chat`)return F.errors=[{instancePath:t+`/conversation/modality`,schemaPath:`#/properties/conversation/properties/modality/enum`,keyword:`enum`,params:{allowedValues:En.properties.conversation.properties.modality.enum},message:`must be equal to one of the allowed values`}],!1;var o=!0;if(o){if(typeof n.enable_chat!=`boolean`)return F.errors=[{instancePath:t+`/conversation/enable_chat`,schemaPath:`#/properties/conversation/properties/enable_chat/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.enable_closed_captions!=`boolean`)return F.errors=[{instancePath:t+`/conversation/enable_closed_captions`,schemaPath:`#/properties/conversation/properties/enable_closed_captions/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.enable_picture_in_picture!=`boolean`)return F.errors=[{instancePath:t+`/conversation/enable_picture_in_picture`,schemaPath:`#/properties/conversation/properties/enable_picture_in_picture/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.show_fullscreen_hint!=`boolean`)return F.errors=[{instancePath:t+`/conversation/show_fullscreen_hint`,schemaPath:`#/properties/conversation/properties/show_fullscreen_hint/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.unique_memory_tag!=`boolean`)return F.errors=[{instancePath:t+`/conversation/unique_memory_tag`,schemaPath:`#/properties/conversation/properties/unique_memory_tag/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.context!=`string`)return F.errors=[{instancePath:t+`/conversation/context`,schemaPath:`#/properties/conversation/properties/context/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var o=!0;if(o){if(n.magic_grid!==void 0){if(typeof n.magic_grid!=`boolean`)return F.errors=[{instancePath:t+`/conversation/magic_grid`,schemaPath:`#/properties/conversation/properties/magic_grid/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0}else var o=!0}}}}}}}}}else return F.errors=[{instancePath:t+`/conversation`,schemaPath:`#/properties/conversation/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.style;if(n&&typeof n==`object`&&!Array.isArray(n)){n.mode===void 0&&(n.mode=`system`),n.style===void 0&&(n.style=`basic`),n.boxes_radius===void 0&&(n.boxes_radius=1),n.field_radius===void 0&&(n.field_radius=1),n.selectors_radius===void 0&&(n.selectors_radius=1),n.border_width===void 0&&(n.border_width=0),n.depth_effect===void 0&&(n.depth_effect=!1),n.noise_effect===void 0&&(n.noise_effect=!1),n.fields_size===void 0&&(n.fields_size=2),n.selectors_size===void 0&&(n.selectors_size=2),n.icon_library===void 0&&(n.icon_library=`pixelarticons`);for(let e in n)Dn.call(En.properties.style.properties,e)||delete n[e];{let e=n.mode;if(typeof e!=`string`)return F.errors=[{instancePath:t+`/style/mode`,schemaPath:`#/properties/style/properties/mode/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`system`&&e!==`light`&&e!==`dark`)return F.errors=[{instancePath:t+`/style/mode`,schemaPath:`#/properties/style/properties/mode/enum`,keyword:`enum`,params:{allowedValues:En.properties.style.properties.mode.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.style;if(typeof e!=`string`)return F.errors=[{instancePath:t+`/style/style`,schemaPath:`#/properties/style/properties/style/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`basic`&&e!==`wireframe`&&e!==`silk`&&e!==`cyberpunk`&&e!==`retro`&&e!==`lemonade`)return F.errors=[{instancePath:t+`/style/style`,schemaPath:`#/properties/style/properties/style/enum`,keyword:`enum`,params:{allowedValues:En.properties.style.properties.style.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.boxes_radius;if(typeof e!=`number`||e%1||isNaN(e))return F.errors=[{instancePath:t+`/style/boxes_radius`,schemaPath:`#/properties/style/properties/boxes_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return F.errors=[{instancePath:t+`/style/boxes_radius`,schemaPath:`#/properties/style/properties/boxes_radius/enum`,keyword:`enum`,params:{allowedValues:En.properties.style.properties.boxes_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.field_radius;if(typeof e!=`number`||e%1||isNaN(e))return F.errors=[{instancePath:t+`/style/field_radius`,schemaPath:`#/properties/style/properties/field_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return F.errors=[{instancePath:t+`/style/field_radius`,schemaPath:`#/properties/style/properties/field_radius/enum`,keyword:`enum`,params:{allowedValues:En.properties.style.properties.field_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.selectors_radius;if(typeof e!=`number`||e%1||isNaN(e))return F.errors=[{instancePath:t+`/style/selectors_radius`,schemaPath:`#/properties/style/properties/selectors_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return F.errors=[{instancePath:t+`/style/selectors_radius`,schemaPath:`#/properties/style/properties/selectors_radius/enum`,keyword:`enum`,params:{allowedValues:En.properties.style.properties.selectors_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.border_width;if(typeof e!=`number`||e%1||isNaN(e))return F.errors=[{instancePath:t+`/style/border_width`,schemaPath:`#/properties/style/properties/border_width/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return F.errors=[{instancePath:t+`/style/border_width`,schemaPath:`#/properties/style/properties/border_width/enum`,keyword:`enum`,params:{allowedValues:En.properties.style.properties.border_width.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){if(typeof n.depth_effect!=`boolean`)return F.errors=[{instancePath:t+`/style/depth_effect`,schemaPath:`#/properties/style/properties/depth_effect/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0;if(s){if(typeof n.noise_effect!=`boolean`)return F.errors=[{instancePath:t+`/style/noise_effect`,schemaPath:`#/properties/style/properties/noise_effect/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0;if(s){let e=n.fields_size;if(typeof e!=`number`||e%1||isNaN(e))return F.errors=[{instancePath:t+`/style/fields_size`,schemaPath:`#/properties/style/properties/fields_size/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==1&&e!==2&&e!==3)return F.errors=[{instancePath:t+`/style/fields_size`,schemaPath:`#/properties/style/properties/fields_size/enum`,keyword:`enum`,params:{allowedValues:En.properties.style.properties.fields_size.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.selectors_size;if(typeof e!=`number`||e%1||isNaN(e))return F.errors=[{instancePath:t+`/style/selectors_size`,schemaPath:`#/properties/style/properties/selectors_size/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==1&&e!==2&&e!==3)return F.errors=[{instancePath:t+`/style/selectors_size`,schemaPath:`#/properties/style/properties/selectors_size/enum`,keyword:`enum`,params:{allowedValues:En.properties.style.properties.selectors_size.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.icon_library;if(typeof e!=`string`)return F.errors=[{instancePath:t+`/style/icon_library`,schemaPath:`#/properties/style/properties/icon_library/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`pixelarticons`&&e!==`lucide`)return F.errors=[{instancePath:t+`/style/icon_library`,schemaPath:`#/properties/style/properties/icon_library/enum`,keyword:`enum`,params:{allowedValues:En.properties.style.properties.icon_library.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0}}}}}}}}}}}}else return F.errors=[{instancePath:t+`/style`,schemaPath:`#/properties/style/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.widget;if(n&&typeof n==`object`&&!Array.isArray(n)){n.variant===void 0&&(n.variant=`compact`),n.position===void 0&&(n.position=`bottom-right`),n.expandable===void 0&&(n.expandable=`default`),n.avatar===void 0&&(n.avatar={}),n.text===void 0&&(n.text={});for(let e in n)e!==`variant`&&e!==`position`&&e!==`expandable`&&e!==`avatar`&&e!==`text`&&delete n[e];{let e=n.variant;if(typeof e!=`string`)return F.errors=[{instancePath:t+`/widget/variant`,schemaPath:`#/properties/widget/properties/variant/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`tiny`&&e!==`compact`&&e!==`full`)return F.errors=[{instancePath:t+`/widget/variant`,schemaPath:`#/properties/widget/properties/variant/enum`,keyword:`enum`,params:{allowedValues:En.properties.widget.properties.variant.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.position;if(typeof e!=`string`)return F.errors=[{instancePath:t+`/widget/position`,schemaPath:`#/properties/widget/properties/position/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`bottom-left`&&e!==`bottom-right`&&e!==`top-left`&&e!==`top-right`&&e!==`top`&&e!==`bottom`)return F.errors=[{instancePath:t+`/widget/position`,schemaPath:`#/properties/widget/properties/position/enum`,keyword:`enum`,params:{allowedValues:En.properties.widget.properties.position.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.expandable;if(typeof e!=`string`)return F.errors=[{instancePath:t+`/widget/expandable`,schemaPath:`#/properties/widget/properties/expandable/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!=="default"&&e!==`always`&&e!==`start-expanded`)return F.errors=[{instancePath:t+`/widget/expandable`,schemaPath:`#/properties/widget/properties/expandable/enum`,keyword:`enum`,params:{allowedValues:En.properties.widget.properties.expandable.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.avatar;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=`orb`);for(let t in e)t!==`type`&&delete e[t];{let n=e.type;if(typeof n!=`string`)return F.errors=[{instancePath:t+`/widget/avatar/type`,schemaPath:`#/properties/widget/properties/avatar/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`orb`&&n!==`image`)return F.errors=[{instancePath:t+`/widget/avatar/type`,schemaPath:`#/properties/widget/properties/avatar/properties/type/enum`,keyword:`enum`,params:{allowedValues:En.properties.widget.properties.avatar.properties.type.enum},message:`must be equal to one of the allowed values`}],!1}}else return F.errors=[{instancePath:t+`/widget/avatar`,schemaPath:`#/properties/widget/properties/avatar/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0;if(c){let e=n.text;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.btn_title===void 0&&(e.btn_title=``);for(let t in e)t!==`title`&&t!==`btn_title`&&delete e[t];if(typeof e.title!=`string`)return F.errors=[{instancePath:t+`/widget/text/title`,schemaPath:`#/properties/widget/properties/text/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.btn_title!=`string`)return F.errors=[{instancePath:t+`/widget/text/btn_title`,schemaPath:`#/properties/widget/properties/text/properties/btn_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return F.errors=[{instancePath:t+`/widget/text`,schemaPath:`#/properties/widget/properties/text/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}}}}}}else return F.errors=[{instancePath:t+`/widget`,schemaPath:`#/properties/widget/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.landing_page;if(n&&typeof n==`object`&&!Array.isArray(n)){n.template===void 0&&(n.template=`1`),n.access===void 0&&(n.access=`public`),n.logo===void 0&&(n.logo=``),n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.cta===void 0&&(n.cta=[]),n.background===void 0&&(n.background=null);for(let e in n)e!==`template`&&e!==`access`&&e!==`logo`&&e!==`title`&&e!==`description`&&e!==`cta`&&e!==`background`&&delete n[e];{let e=n.template;if(typeof e!=`string`)return F.errors=[{instancePath:t+`/landing_page/template`,schemaPath:`#/properties/landing_page/properties/template/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`1`&&e!==`2`&&e!==`3`&&e!==`4`&&e!==`5`)return F.errors=[{instancePath:t+`/landing_page/template`,schemaPath:`#/properties/landing_page/properties/template/enum`,keyword:`enum`,params:{allowedValues:En.properties.landing_page.properties.template.enum},message:`must be equal to one of the allowed values`}],!1;var l=!0;if(l){let e=n.access;if(typeof e!=`string`)return F.errors=[{instancePath:t+`/landing_page/access`,schemaPath:`#/properties/landing_page/properties/access/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`public`&&e!==`auth_required`)return F.errors=[{instancePath:t+`/landing_page/access`,schemaPath:`#/properties/landing_page/properties/access/enum`,keyword:`enum`,params:{allowedValues:En.properties.landing_page.properties.access.enum},message:`must be equal to one of the allowed values`}],!1;var l=!0;if(l){if(typeof n.logo!=`string`)return F.errors=[{instancePath:t+`/landing_page/logo`,schemaPath:`#/properties/landing_page/properties/logo/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){if(typeof n.title!=`string`)return F.errors=[{instancePath:t+`/landing_page/title`,schemaPath:`#/properties/landing_page/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){if(typeof n.description!=`string`)return F.errors=[{instancePath:t+`/landing_page/description`,schemaPath:`#/properties/landing_page/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return F.errors=[{instancePath:t+`/landing_page/cta/`+r,schemaPath:`#/properties/landing_page/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return F.errors=[{instancePath:t+`/landing_page/cta/`+r+`/title`,schemaPath:`#/properties/landing_page/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=!0}else var u=!0;if(u){if(n.url!==void 0){if(typeof n.url!=`string`)return F.errors=[{instancePath:t+`/landing_page/cta/`+r+`/url`,schemaPath:`#/properties/landing_page/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=!0}else var u=!0}}else return F.errors=[{instancePath:t+`/landing_page/cta/`+r,schemaPath:`#/properties/landing_page/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return F.errors=[{instancePath:t+`/landing_page/cta`,schemaPath:`#/properties/landing_page/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var l=!0;if(l){let e=n.background;if((!e||typeof e!=`object`||Array.isArray(e))&&e!==null)return F.errors=[{instancePath:t+`/landing_page/background`,schemaPath:`#/properties/landing_page/properties/background/type`,keyword:`type`,params:{type:En.properties.landing_page.properties.background.type},message:`must be object,null`}],!1;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=`default`),e.url===void 0&&(e.url=null);for(let t in e)t!==`type`&&t!==`url`&&delete e[t];{let n=e.type;if(typeof n!=`string`)return F.errors=[{instancePath:t+`/landing_page/background/type`,schemaPath:`#/properties/landing_page/properties/background/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!=="default"&&n!==`image`)return F.errors=[{instancePath:t+`/landing_page/background/type`,schemaPath:`#/properties/landing_page/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:En.properties.landing_page.properties.background.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;{let n=e.url;if(typeof n!=`string`&&n!==null)return F.errors=[{instancePath:t+`/landing_page/background/url`,schemaPath:`#/properties/landing_page/properties/background/properties/url/type`,keyword:`type`,params:{type:En.properties.landing_page.properties.background.properties.url.type},message:`must be string,null`}],!1}}}var l=!0}}}}}}}}else return F.errors=[{instancePath:t+`/landing_page`,schemaPath:`#/properties/landing_page/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.preview;if(n&&typeof n==`object`&&!Array.isArray(n)){n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.btn_title===void 0&&(n.btn_title=``),n.background===void 0&&(n.background={});for(let e in n)e!==`title`&&e!==`description`&&e!==`btn_title`&&e!==`background`&&delete n[e];if(typeof n.title!=`string`)return F.errors=[{instancePath:t+`/preview/title`,schemaPath:`#/properties/preview/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){if(typeof n.description!=`string`)return F.errors=[{instancePath:t+`/preview/description`,schemaPath:`#/properties/preview/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){if(typeof n.btn_title!=`string`)return F.errors=[{instancePath:t+`/preview/btn_title`,schemaPath:`#/properties/preview/properties/btn_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){let e=n.background;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=null),e.url===void 0&&(e.url=``);for(let t in e)t!==`type`&&t!==`url`&&delete e[t];{let n=e.type;if(typeof n!=`string`&&n!==null)return F.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/type`,keyword:`type`,params:{type:En.properties.preview.properties.background.properties.type.type},message:`must be string,null`}],!1;if(n!==`replica`&&n!==`background-gradient`&&n!==`custom-image`&&n!==null)return F.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:En.properties.preview.properties.background.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;if(typeof e.url!=`string`)return F.errors=[{instancePath:t+`/preview/background/url`,schemaPath:`#/properties/preview/properties/background/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}}else return F.errors=[{instancePath:t+`/preview/background`,schemaPath:`#/properties/preview/properties/background/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var d=!0}}}}else return F.errors=[{instancePath:t+`/preview`,schemaPath:`#/properties/preview/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.haircheck;if(n&&typeof n==`object`&&!Array.isArray(n)){n.permission_request_title===void 0&&(n.permission_request_title=``),n.permission_request_description===void 0&&(n.permission_request_description=``),n.permission_granted_title===void 0&&(n.permission_granted_title=``),n.permission_granted_description===void 0&&(n.permission_granted_description=``),n.permission_denied_title===void 0&&(n.permission_denied_title=``),n.permission_denied_description===void 0&&(n.permission_denied_description=``),n.join_button===void 0&&(n.join_button=``),n.cancel_btn===void 0&&(n.cancel_btn=``);for(let e in n)e!==`permission_request_title`&&e!==`permission_request_description`&&e!==`permission_granted_title`&&e!==`permission_granted_description`&&e!==`permission_denied_title`&&e!==`permission_denied_description`&&e!==`join_button`&&e!==`cancel_btn`&&delete n[e];if(typeof n.permission_request_title!=`string`)return F.errors=[{instancePath:t+`/haircheck/permission_request_title`,schemaPath:`#/properties/haircheck/properties/permission_request_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_request_description!=`string`)return F.errors=[{instancePath:t+`/haircheck/permission_request_description`,schemaPath:`#/properties/haircheck/properties/permission_request_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_granted_title!=`string`)return F.errors=[{instancePath:t+`/haircheck/permission_granted_title`,schemaPath:`#/properties/haircheck/properties/permission_granted_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_granted_description!=`string`)return F.errors=[{instancePath:t+`/haircheck/permission_granted_description`,schemaPath:`#/properties/haircheck/properties/permission_granted_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_denied_title!=`string`)return F.errors=[{instancePath:t+`/haircheck/permission_denied_title`,schemaPath:`#/properties/haircheck/properties/permission_denied_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_denied_description!=`string`)return F.errors=[{instancePath:t+`/haircheck/permission_denied_description`,schemaPath:`#/properties/haircheck/properties/permission_denied_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.join_button!=`string`)return F.errors=[{instancePath:t+`/haircheck/join_button`,schemaPath:`#/properties/haircheck/properties/join_button/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.cancel_btn!=`string`)return F.errors=[{instancePath:t+`/haircheck/cancel_btn`,schemaPath:`#/properties/haircheck/properties/cancel_btn/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0}}}}}}}}else return F.errors=[{instancePath:t+`/haircheck`,schemaPath:`#/properties/haircheck/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.after_call;if(n&&typeof n==`object`&&!Array.isArray(n)){n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.cta===void 0&&(n.cta=[]);for(let e in n)e!==`title`&&e!==`description`&&e!==`cta`&&delete n[e];if(typeof n.title!=`string`)return F.errors=[{instancePath:t+`/after_call/title`,schemaPath:`#/properties/after_call/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var p=!0;if(p){if(typeof n.description!=`string`)return F.errors=[{instancePath:t+`/after_call/description`,schemaPath:`#/properties/after_call/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var p=!0;if(p){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return F.errors=[{instancePath:t+`/after_call/cta/`+r,schemaPath:`#/properties/after_call/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return F.errors=[{instancePath:t+`/after_call/cta/`+r+`/title`,schemaPath:`#/properties/after_call/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var m=!0}else var m=!0;if(m){if(n.url!==void 0){if(typeof n.url!=`string`)return F.errors=[{instancePath:t+`/after_call/cta/`+r+`/url`,schemaPath:`#/properties/after_call/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var m=!0}else var m=!0}}else return F.errors=[{instancePath:t+`/after_call/cta/`+r,schemaPath:`#/properties/after_call/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return F.errors=[{instancePath:t+`/after_call/cta`,schemaPath:`#/properties/after_call/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var p=!0}}}else return F.errors=[{instancePath:t+`/after_call`,schemaPath:`#/properties/after_call/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.branding;if(n&&typeof n==`object`&&!Array.isArray(n)){n.hide_tavus_badge===void 0&&(n.hide_tavus_badge=!1),n.logo===void 0&&(n.logo=``),n.text===void 0&&(n.text=``);for(let e in n)e!==`hide_tavus_badge`&&e!==`logo`&&e!==`text`&&delete n[e];if(typeof n.hide_tavus_badge!=`boolean`)return F.errors=[{instancePath:t+`/branding/hide_tavus_badge`,schemaPath:`#/properties/branding/properties/hide_tavus_badge/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var h=!0;if(h){if(typeof n.logo!=`string`)return F.errors=[{instancePath:t+`/branding/logo`,schemaPath:`#/properties/branding/properties/logo/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var h=!0;if(h){if(typeof n.text!=`string`)return F.errors=[{instancePath:t+`/branding/text`,schemaPath:`#/properties/branding/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var h=!0}}}else return F.errors=[{instancePath:t+`/branding`,schemaPath:`#/properties/branding/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){if(e.unavailable_screen!==void 0){let n=e.unavailable_screen;if(n&&typeof n==`object`&&!Array.isArray(n)){for(let e in n)e!==`daily_limit`&&e!==`total_limit`&&e!==`busy`&&e!==`error`&&e!==`captcha_unsupported`&&e!==`cta`&&delete n[e];if(n.daily_limit!==void 0){let e=n.daily_limit;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/daily_limit/title`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/daily_limit/description`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return F.errors=[{instancePath:t+`/unavailable_screen/daily_limit`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.total_limit!==void 0){let e=n.total_limit;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/total_limit/title`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/total_limit/description`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return F.errors=[{instancePath:t+`/unavailable_screen/total_limit`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.busy!==void 0){let e=n.busy;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/busy/title`,schemaPath:`#/properties/unavailable_screen/properties/busy/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/busy/description`,schemaPath:`#/properties/unavailable_screen/properties/busy/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return F.errors=[{instancePath:t+`/unavailable_screen/busy`,schemaPath:`#/properties/unavailable_screen/properties/busy/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.error!==void 0){let e=n.error;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/error/title`,schemaPath:`#/properties/unavailable_screen/properties/error/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/error/description`,schemaPath:`#/properties/unavailable_screen/properties/error/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return F.errors=[{instancePath:t+`/unavailable_screen/error`,schemaPath:`#/properties/unavailable_screen/properties/error/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.captcha_unsupported!==void 0){let e=n.captcha_unsupported;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported/title`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported/description`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return F.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.cta!==void 0){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return F.errors=[{instancePath:t+`/unavailable_screen/cta/`+r,schemaPath:`#/properties/unavailable_screen/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/cta/`+r+`/title`,schemaPath:`#/properties/unavailable_screen/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var _=!0}else var _=!0;if(_){if(n.url!==void 0){if(typeof n.url!=`string`)return F.errors=[{instancePath:t+`/unavailable_screen/cta/`+r+`/url`,schemaPath:`#/properties/unavailable_screen/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var _=!0}else var _=!0}}else return F.errors=[{instancePath:t+`/unavailable_screen/cta/`+r,schemaPath:`#/properties/unavailable_screen/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return F.errors=[{instancePath:t+`/unavailable_screen/cta`,schemaPath:`#/properties/unavailable_screen/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var g=!0}else var g=!0}}}}}}else return F.errors=[{instancePath:t+`/unavailable_screen`,schemaPath:`#/properties/unavailable_screen/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0}else var a=!0}}}}}}}}}}}}}}}else return F.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return F.errors=null,!0}var On=hn(`Config`);function kn(e){let t=e.customization??{};return t.widget===null&&delete t.widget,t.landing_page===null&&delete t.landing_page,Tn(t)||On.warn(`Customization validation failed`,Tn.errors),{...e,customization:t}}var An=hn(`Config`);function jn(){return{is_available:!1}}var Mn=280,Nn=we(null);function Pn({children:e,fallback:t}){let n=N(bt),r=n.deploymentId??``,i=n.overrideConfig,a=n.baseUrl,o=n.previewToken,s=j(()=>_n({baseUrl:a??`https://tavusapi.com`,token:o}),[a,o]),c=j(()=>Bt(null),[]),l=j(()=>Bt(null),[]),u=j(()=>Bt(!1),[]),d=j(()=>Bt(0),[]),f=A([]),p=M(()=>{let e=f.current;f.current=[];for(let t of e)t()},[]),m=M(()=>r?new Promise(e=>{f.current.push(e),d.value=d.peek()+1}):Promise.resolve(),[r,d]);mn(()=>{if(d.value,!r){l.value=null,u.value=!1,c.value=i||null;return}let e=new AbortController;return yn(s,r).then(t=>{e.signal.aborted||(l.value=null,u.value=!1,c.value=t,An.info(`Deployment initialized`,t.deployment_id),p())}).catch(t=>{e.signal.aborted||(An.error(`Init failed:`,t),l.value=t,u.value=!i,c.value=i||jn(),p())}),()=>{e.abort()}});let h=j(()=>Bt(null),[]);$e(()=>{let e=e=>{if(!e){h.value=null;return}let t=i?wn(e,i):e;h.value=kn(t)};return e(c.peek()),c.subscribe(e)},[h,c,i]);let g=h.value!==null,[_,v]=O(`pending`);if(k(()=>{if(!g){v(`pending`);return}if(!t){v(`done`);return}if(globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1){v(`done`);return}v(`fading`);let e=setTimeout(()=>v(`done`),Mn);return()=>clearTimeout(e)},[g]),!t){if(!g)return P(E,{});let t={deploymentId:r,config:h,initError:l,configError:u,retryInit:m,client:s};return P(Nn.Provider,{value:t,children:e})}let y=g?{deploymentId:r,config:h,initError:l,configError:u,retryInit:m,client:s}:null;return P(`div`,{class:`relative w-full h-full`,children:[y&&P(Nn.Provider,{value:y,children:e}),_!==`done`&&P(`div`,{class:`absolute inset-0 z-10${_===`fading`?` pointer-events-none motion-safe:animate-[tavusFadeOut_280ms_ease-out_forwards]`:``}`,"aria-hidden":_===`fading`?`true`:void 0,children:t})]})}var Fn=we(null);function In({children:e}){let{client:t}=N(Nn),n=j(()=>({client:t}),[t]);return P(Fn.Provider,{value:n,children:e})}function Ln(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Rn(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function I(e){return I=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},I(e)}function zn(e){var t=function(e,t){if(I(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(I(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return I(t)==`symbol`?t:t+``}function Bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,zn(r.key),r)}}function Vn(e,t,n){return t&&Bn(e.prototype,t),n&&Bn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hn(e,t){if(t&&(I(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function Un(e){return Un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Un(e)}function Wn(e,t){return Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Wn(e,t)}function Gn(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wn(e,t)}function Kn(e,t,n){return(t=zn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qn(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function L(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){qn(a,r,i,o,s,`next`,e)}function s(e){qn(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Jn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Yn(e,t){if(e){if(typeof e==`string`)return Jn(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jn(e,t):void 0}}function Xn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||Yn(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Zn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Qn,$n={exports:{}},er=function(){if(Qn)return $n.exports;Qn=1;var e,t=typeof Reflect==`object`?Reflect:null,n=t&&typeof t.apply==`function`?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&typeof t.ownKeys==`function`?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}$n.exports=i,$n.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}m(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&m(e,`error`,t,n)}(e,i,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function s(e){return e._maxListeners===void 0?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,a,c,l;if(o(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),c=a[t]),c===void 0)c=a[t]=n,++e._eventsCount;else if(typeof c==`function`?c=a[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(i=s(e))>0&&c.length>i&&!c.warned){c.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+c.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=c.length,l=u,console&&console.warn&&console.warn(l)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function p(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);a=e}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,i,a,s;if(o(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},$n.exports}(),tr=Zn(er),nr=Object.prototype.hasOwnProperty;function rr(e,t,n){for(n of e.keys())if(ir(n,t))return n}function ir(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ir(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&typeof i==`object`&&!(i=rr(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&typeof i==`object`&&!(i=rr(t,i))||!ir(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(nr.call(e,n)&&++r&&!nr.call(t,n)||!(n in t)||!ir(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var ar={AmazonBot:`amazonbot`,"Amazon Silk":`amazon_silk`,"Android Browser":`android`,BaiduSpider:`baiduspider`,Bada:`bada`,BingCrawler:`bingcrawler`,Brave:`brave`,BlackBerry:`blackberry`,"ChatGPT-User":`chatgpt_user`,Chrome:`chrome`,ClaudeBot:`claudebot`,Chromium:`chromium`,Diffbot:`diffbot`,DuckDuckBot:`duckduckbot`,DuckDuckGo:`duckduckgo`,Electron:`electron`,Epiphany:`epiphany`,FacebookExternalHit:`facebookexternalhit`,Firefox:`firefox`,Focus:`focus`,Generic:`generic`,"Google Search":`google_search`,Googlebot:`googlebot`,GPTBot:`gptbot`,"Internet Explorer":`ie`,InternetArchiveCrawler:`internetarchivecrawler`,"K-Meleon":`k_meleon`,LibreWolf:`librewolf`,Linespider:`linespider`,Maxthon:`maxthon`,"Meta-ExternalAds":`meta_externalads`,"Meta-ExternalAgent":`meta_externalagent`,"Meta-ExternalFetcher":`meta_externalfetcher`,"Meta-WebIndexer":`meta_webindexer`,"Microsoft Edge":`edge`,"MZ Browser":`mz`,"NAVER Whale Browser":`naver`,"OAI-SearchBot":`oai_searchbot`,Omgilibot:`omgilibot`,Opera:`opera`,"Opera Coast":`opera_coast`,"Pale Moon":`pale_moon`,PerplexityBot:`perplexitybot`,"Perplexity-User":`perplexity_user`,PhantomJS:`phantomjs`,PingdomBot:`pingdombot`,Puffin:`puffin`,QQ:`qq`,QQLite:`qqlite`,QupZilla:`qupzilla`,Roku:`roku`,Safari:`safari`,Sailfish:`sailfish`,"Samsung Internet for Android":`samsung_internet`,SlackBot:`slackbot`,SeaMonkey:`seamonkey`,Sleipnir:`sleipnir`,"Sogou Browser":`sogou`,Swing:`swing`,Tizen:`tizen`,"UC Browser":`uc`,Vivaldi:`vivaldi`,"WebOS Browser":`webos`,WeChat:`wechat`,YahooSlurp:`yahooslurp`,"Yandex Browser":`yandex`,YandexBot:`yandexbot`,YouBot:`youbot`},or={amazonbot:`AmazonBot`,amazon_silk:`Amazon Silk`,android:`Android Browser`,baiduspider:`BaiduSpider`,bada:`Bada`,bingcrawler:`BingCrawler`,blackberry:`BlackBerry`,brave:`Brave`,chatgpt_user:`ChatGPT-User`,chrome:`Chrome`,claudebot:`ClaudeBot`,chromium:`Chromium`,diffbot:`Diffbot`,duckduckbot:`DuckDuckBot`,duckduckgo:`DuckDuckGo`,edge:`Microsoft Edge`,electron:`Electron`,epiphany:`Epiphany`,facebookexternalhit:`FacebookExternalHit`,firefox:`Firefox`,focus:`Focus`,generic:`Generic`,google_search:`Google Search`,googlebot:`Googlebot`,gptbot:`GPTBot`,ie:`Internet Explorer`,internetarchivecrawler:`InternetArchiveCrawler`,k_meleon:`K-Meleon`,librewolf:`LibreWolf`,linespider:`Linespider`,maxthon:`Maxthon`,meta_externalads:`Meta-ExternalAds`,meta_externalagent:`Meta-ExternalAgent`,meta_externalfetcher:`Meta-ExternalFetcher`,meta_webindexer:`Meta-WebIndexer`,mz:`MZ Browser`,naver:`NAVER Whale Browser`,oai_searchbot:`OAI-SearchBot`,omgilibot:`Omgilibot`,opera:`Opera`,opera_coast:`Opera Coast`,pale_moon:`Pale Moon`,perplexitybot:`PerplexityBot`,perplexity_user:`Perplexity-User`,phantomjs:`PhantomJS`,pingdombot:`PingdomBot`,puffin:`Puffin`,qq:`QQ Browser`,qqlite:`QQ Browser Lite`,qupzilla:`QupZilla`,roku:`Roku`,safari:`Safari`,sailfish:`Sailfish`,samsung_internet:`Samsung Internet for Android`,seamonkey:`SeaMonkey`,slackbot:`SlackBot`,sleipnir:`Sleipnir`,sogou:`Sogou Browser`,swing:`Swing`,tizen:`Tizen`,uc:`UC Browser`,vivaldi:`Vivaldi`,webos:`WebOS Browser`,wechat:`WeChat`,yahooslurp:`YahooSlurp`,yandex:`Yandex Browser`,yandexbot:`YandexBot`,youbot:`YouBot`},R={bot:`bot`,desktop:`desktop`,mobile:`mobile`,tablet:`tablet`,tv:`tv`},sr={Android:`Android`,Bada:`Bada`,BlackBerry:`BlackBerry`,ChromeOS:`Chrome OS`,HarmonyOS:`HarmonyOS`,iOS:`iOS`,Linux:`Linux`,MacOS:`macOS`,PlayStation4:`PlayStation 4`,Roku:`Roku`,Tizen:`Tizen`,WebOS:`WebOS`,Windows:`Windows`,WindowsPhone:`Windows Phone`},cr={Blink:`Blink`,EdgeHTML:`EdgeHTML`,Gecko:`Gecko`,Presto:`Presto`,Trident:`Trident`,WebKit:`WebKit`},z=class e{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||``}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||``}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case`NT`:return`NT`;case`XP`:case`NT 5.1`:return`XP`;case`NT 5.0`:return`2000`;case`NT 5.2`:return`2003`;case`NT 6.0`:return`Vista`;case`NT 6.1`:return`7`;case`NT 6.2`:return`8`;case`NT 6.3`:return`8.1`;case`NT 10.0`:return`10`;default:return}}static getMacOSVersionName(e){let t=e.split(`.`).splice(0,2).map(e=>parseInt(e,10)||0);t.push(0);let n=t[0],r=t[1];if(n===10)switch(r){case 5:return`Leopard`;case 6:return`Snow Leopard`;case 7:return`Lion`;case 8:return`Mountain Lion`;case 9:return`Mavericks`;case 10:return`Yosemite`;case 11:return`El Capitan`;case 12:return`Sierra`;case 13:return`High Sierra`;case 14:return`Mojave`;case 15:return`Catalina`;default:return}switch(n){case 11:return`Big Sur`;case 12:return`Monterey`;case 13:return`Ventura`;case 14:return`Sonoma`;case 15:return`Sequoia`;default:return}}static getAndroidVersionName(e){let t=e.split(`.`).splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?`Cupcake`:t[0]===1&&t[1]>=6?`Donut`:t[0]===2&&t[1]<2?`Eclair`:t[0]===2&&t[1]===2?`Froyo`:t[0]===2&&t[1]>2?`Gingerbread`:t[0]===3?`Honeycomb`:t[0]===4&&t[1]<1?`Ice Cream Sandwich`:t[0]===4&&t[1]<4?`Jelly Bean`:t[0]===4&&t[1]>=4?`KitKat`:t[0]===5?`Lollipop`:t[0]===6?`Marshmallow`:t[0]===7?`Nougat`:t[0]===8?`Oreo`:t[0]===9?`Pie`:void 0}static getVersionPrecision(e){return e.split(`.`).length}static compareVersions(t,n,r=!1){let i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,c=e.map([t,n],t=>{let n=o-e.getVersionPrecision(t),r=t+Array(n+1).join(`.0`);return e.map(r.split(`.`),e=>Array(20-e.length).join(`0`)+e).reverse()});for(r&&(s=o-Math.min(i,a)),--o;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;--o}else if(c[0][o]<c[1][o])return-1}}static map(e,t){let n=[],r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){let r=e[n];if(t(r,n))return r}}static assign(e,...t){let n=e,r,i;if(Object.assign)return Object.assign(e,...t);for(r=0,i=t.length;r<i;r+=1){let e=t[r];typeof e==`object`&&e&&Object.keys(e).forEach(t=>{n[t]=e[t]})}return e}static getBrowserAlias(e){return ar[e]}static getBrowserTypeByAlias(e){return or[e]||``}},B=/version\/(\d+(\.?_?\d+)+)/i,lr=[{test:[/gptbot/i],describe(e){let t={name:`GPTBot`},n=z.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe(e){let t={name:`ChatGPT-User`},n=z.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe(e){let t={name:`OAI-SearchBot`},n=z.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(e){let t={name:`ClaudeBot`},n=z.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe(e){let t={name:`Omgilibot`},n=z.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe(e){let t={name:`Diffbot`},n=z.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe(e){let t={name:`PerplexityBot`},n=z.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe(e){let t={name:`Perplexity-User`},n=z.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe(e){let t={name:`YouBot`},n=z.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe(e){let t={name:`Meta-WebIndexer`},n=z.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe(e){let t={name:`Meta-ExternalAds`},n=z.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe(e){let t={name:`Meta-ExternalAgent`},n=z.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe(e){let t={name:`Meta-ExternalFetcher`},n=z.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe(e){let t={name:`Googlebot`},n=z.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe(e){let t={name:`Linespider`},n=z.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe(e){let t={name:`AmazonBot`},n=z.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe(e){let t={name:`BingCrawler`},n=z.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe(e){let t={name:`BaiduSpider`},n=z.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe(e){let t={name:`DuckDuckBot`},n=z.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe(e){let t={name:`InternetArchiveCrawler`},n=z.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({name:`FacebookExternalHit`})},{test:[/slackbot/i,/slack-imgProxy/i],describe(e){let t={name:`SlackBot`},n=z.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:()=>({name:`YahooSlurp`})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({name:`YandexBot`})},{test:[/pingdom/i],describe:()=>({name:`PingdomBot`})},{test:[/opera/i],describe(e){let t={name:`Opera`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:`Opera`},n=z.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:`Samsung Internet for Android`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:`NAVER Whale Browser`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){let t={name:`Pale Moon`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:`MZ Browser`},n=z.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:`Focus`},n=z.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:`Swing`},n=z.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:`Opera Coast`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:`Opera Touch`},n=z.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:`Yandex Browser`},n=z.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:`UC Browser`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:`Maxthon`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:`Epiphany`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:`Puffin`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:`Sleipnir`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:`K-Meleon`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:`WeChat`},n=z.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?`QQ Browser Lite`:`QQ Browser`},n=z.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:`Internet Explorer`},n=z.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:`Microsoft Edge`},n=z.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:`Microsoft Edge`},n=z.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:`Vivaldi`},n=z.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:`SeaMonkey`},n=z.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:`Sailfish`},n=z.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:`Amazon Silk`},n=z.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:`PhantomJS`},n=z.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:`SlimerJS`},n=z.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:`BlackBerry`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:`WebOS Browser`},n=z.getFirstMatch(B,e)||z.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:`Bada`},n=z.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:`Tizen`},n=z.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:`QupZilla`},n=z.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe(e){let t={name:`LibreWolf`},n=z.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:`Firefox`},n=z.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:`Electron`},n=z.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe(e){let t={name:`Sogou Browser`},n=z.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=z.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=z.getFirstMatch(/se ([\d.]+)x/i,e),a=n||r||i;return a&&(t.version=a),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:`Miui`},n=z.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>!!e.hasBrand(`DuckDuckGo`)||e.test(/\sDdg\/[\d.]+$/i),describe(e,t){let n={name:`DuckDuckGo`};if(t){let e=t.getBrandVersion(`DuckDuckGo`);if(e)return n.version=e,n}let r=z.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(n.version=r),n}},{test:e=>e.hasBrand(`Brave`),describe(e,t){let n={name:`Brave`};if(t){let e=t.getBrandVersion(`Brave`);if(e)return n.version=e,n}return n}},{test:[/chromium/i],describe(e){let t={name:`Chromium`},n=z.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:`Chrome`},n=z.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:`Google Search`},n=z.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:`Android Browser`},n=z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:`PlayStation 4`},n=z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:`Safari`},n=z.getFirstMatch(B,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:z.getFirstMatch(t,e),version:z.getSecondMatch(t,e)}}}],ur=[{test:[/Roku\/DVP/],describe(e){let t=z.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:sr.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=z.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:sr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=z.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=z.getWindowsVersionName(t);return{name:sr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:sr.iOS},n=z.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=z.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=z.getMacOSVersionName(t),r={name:sr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=z.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:sr.iOS,version:t}}},{test:[/OpenHarmony/i],describe(e){let t=z.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:sr.HarmonyOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=z.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=z.getAndroidVersionName(t),r={name:sr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=z.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:sr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=z.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||z.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||z.getFirstMatch(/\bbb(\d+)/i,e);return{name:sr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=z.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:sr.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=z.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:sr.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:sr.Linux})},{test:[/CrOS/],describe:()=>({name:sr.ChromeOS})},{test:[/PlayStation 4/],describe(e){let t=z.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:sr.PlayStation4,version:t}}}],dr=[{test:[/googlebot/i],describe:()=>({type:R.bot,vendor:`Google`})},{test:[/linespider/i],describe:()=>({type:R.bot,vendor:`Line`})},{test:[/amazonbot/i],describe:()=>({type:R.bot,vendor:`Amazon`})},{test:[/gptbot/i],describe:()=>({type:R.bot,vendor:`OpenAI`})},{test:[/chatgpt-user/i],describe:()=>({type:R.bot,vendor:`OpenAI`})},{test:[/oai-searchbot/i],describe:()=>({type:R.bot,vendor:`OpenAI`})},{test:[/baiduspider/i],describe:()=>({type:R.bot,vendor:`Baidu`})},{test:[/bingbot/i],describe:()=>({type:R.bot,vendor:`Bing`})},{test:[/duckduckbot/i],describe:()=>({type:R.bot,vendor:`DuckDuckGo`})},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:()=>({type:R.bot,vendor:`Anthropic`})},{test:[/omgilibot/i,/webzio-extended/i],describe:()=>({type:R.bot,vendor:`Webz.io`})},{test:[/diffbot/i],describe:()=>({type:R.bot,vendor:`Diffbot`})},{test:[/perplexitybot/i],describe:()=>({type:R.bot,vendor:`Perplexity AI`})},{test:[/perplexity-user/i],describe:()=>({type:R.bot,vendor:`Perplexity AI`})},{test:[/youbot/i],describe:()=>({type:R.bot,vendor:`You.com`})},{test:[/ia_archiver/i],describe:()=>({type:R.bot,vendor:`Internet Archive`})},{test:[/meta-webindexer/i],describe:()=>({type:R.bot,vendor:`Meta`})},{test:[/meta-externalads/i],describe:()=>({type:R.bot,vendor:`Meta`})},{test:[/meta-externalagent/i],describe:()=>({type:R.bot,vendor:`Meta`})},{test:[/meta-externalfetcher/i],describe:()=>({type:R.bot,vendor:`Meta`})},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({type:R.bot,vendor:`Meta`})},{test:[/slackbot/i,/slack-imgProxy/i],describe:()=>({type:R.bot,vendor:`Slack`})},{test:[/yahoo/i],describe:()=>({type:R.bot,vendor:`Yahoo`})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({type:R.bot,vendor:`Yandex`})},{test:[/pingdom/i],describe:()=>({type:R.bot,vendor:`Pingdom`})},{test:[/huawei/i],describe(e){let t=z.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:R.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:R.tablet,vendor:`Nexus`})},{test:[/ipad/i],describe:()=>({type:R.tablet,vendor:`Apple`,model:`iPad`})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:R.tablet,vendor:`Apple`,model:`iPad`})},{test:[/kftt build/i],describe:()=>({type:R.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`})},{test:[/silk/i],describe:()=>({type:R.tablet,vendor:`Amazon`})},{test:[/tablet(?! pc)/i],describe:()=>({type:R.tablet})},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=z.getFirstMatch(/(ipod|iphone)/i,e);return{type:R.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:R.mobile,vendor:`Nexus`})},{test:[/Nokia/i],describe(e){let t=z.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:R.mobile,vendor:`Nokia`};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:()=>({type:R.mobile})},{test:e=>e.getBrowserName(!0)===`blackberry`,describe:()=>({type:R.mobile,vendor:`BlackBerry`})},{test:e=>e.getBrowserName(!0)===`bada`,describe:()=>({type:R.mobile})},{test:e=>e.getBrowserName()===`windows phone`,describe:()=>({type:R.mobile,vendor:`Microsoft`})},{test(e){let t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:()=>({type:R.tablet})},{test:e=>e.getOSName(!0)===`android`,describe:()=>({type:R.mobile})},{test:[/smart-?tv|smarttv/i],describe:()=>({type:R.tv})},{test:[/netcast/i],describe:()=>({type:R.tv})},{test:e=>e.getOSName(!0)===`macos`,describe:()=>({type:R.desktop,vendor:`Apple`})},{test:e=>e.getOSName(!0)===`windows`,describe:()=>({type:R.desktop})},{test:e=>e.getOSName(!0)===`linux`,describe:()=>({type:R.desktop})},{test:e=>e.getOSName(!0)===`playstation 4`,describe:()=>({type:R.tv})},{test:e=>e.getOSName(!0)===`roku`,describe:()=>({type:R.tv})}],fr=[{test:e=>e.getBrowserName(!0)===`microsoft edge`,describe(e){if(/\sedg\//i.test(e))return{name:cr.Blink};let t=z.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:cr.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:cr.Trident},n=z.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){let t={name:cr.Presto},n=z.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:cr.Gecko},n=z.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:cr.Blink})},{test:[/(apple)?webkit/i],describe(e){let t={name:cr.WebKit},n=z.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],pr=class{constructor(e,t=!1,n=null){if(e==null||e===``)throw Error(`UserAgent parameter can't be empty`);this._ua=e;let r=!1;typeof t==`boolean`?(r=t,this._hints=n):this._hints=typeof t==`object`&&t?t:null,this.parsedResult={},!0!==r&&this.parse()}getHints(){return this._hints}hasBrand(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;let t=e.toLowerCase();return this._hints.brands.some(e=>e.brand&&e.brand.toLowerCase()===t)}getBrandVersion(e){if(!this._hints||!Array.isArray(this._hints.brands))return;let t=e.toLowerCase(),n=this._hints.brands.find(e=>e.brand&&e.brand.toLowerCase()===t);return n?n.version:void 0}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=z.find(lr,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.browser=e.describe(this.getUA(),this)),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||``:this.getBrowser().name||``}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=z.find(ur,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||``:t||``}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||``:t||``}parsePlatform(){this.parsedResult.platform={};let e=z.find(dr,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||``:this.getEngine().name||``}parseEngine(){this.parsedResult.engine={};let e=z.find(fr,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return z.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},i=0;if(Object.keys(e).forEach(a=>{let o=e[a];typeof o==`string`?(r[a]=o,i+=1):typeof o==`object`&&(t[a]=o,n+=1)}),n>0){let e=Object.keys(t),n=z.find(e,e=>this.isOS(e));if(n){let e=this.satisfies(t[n]);if(e!==void 0)return e}let r=z.find(e,e=>this.isPlatform(e));if(r){let e=this.satisfies(t[r]);if(e!==void 0)return e}}if(i>0){let e=Object.keys(r),t=z.find(e,e=>this.isBrowser(e,!0));if(t!==void 0)return this.compareVersion(r[t])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=z.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,i=this.getBrowserVersion();if(typeof i==`string`)return e[0]===`>`||e[0]===`<`?(n=e.substr(1),e[1]===`=`?(r=!0,n=e.substr(2)):t=[],e[0]===`>`?t.push(1):t.push(-1)):e[0]===`=`?n=e.substr(1):e[0]===`~`&&(r=!0,n=e.substr(1)),t.indexOf(z.compareVersions(i,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(e=>this.is(e))}},mr=class{static getParser(e,t=!1,n=null){if(typeof e!=`string`)throw Error(`UserAgent should be a string`);return new pr(e,t,n)}static parse(e,t=null){return new pr(e,t).getResult()}static get BROWSER_MAP(){return or}static get ENGINE_MAP(){return cr}static get OS_MAP(){return sr}static get PLATFORMS_MAP(){return R}};function hr(e){return function(e){if(Array.isArray(e))return Jn(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||Yn(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function gr(){return Date.now()+Math.random().toString()}function _r(){throw Error(`Method must be implemented in subclass`)}var vr=[`daily.co`,`dailywebrtc.com`,`dailywebrtc.net`],yr=null;function br(){return yr}function xr(e){(e===null||vr.includes(e))&&(yr=e)}function Sr(e){try{var t=new URL(e).hostname;return vr.find(function(e){return t===e||t.endsWith(`.${e}`)})||null}catch{return null}}function Cr(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)===`/`?``:`/`)+e.substring(8):e}function wr(e,t){var n=vr.find(function(t){return e.includes(t)});return n?e.replace(n,t):e}function Tr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yr??vr[0];return e!=null&&e.callObjectBundleUrlOverride?(console.warn(`The callObjectBundleUrlOverride property is deprecated and will be removed. Please use bundlePathOverride instead. When providing a bundlePathOverride, the URL should point to the directory containing all Daily bundles (call-machine-object-bundle.js and audio-processor-bundle.js).`),wr(e.callObjectBundleUrlOverride,t)):function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:yr??vr[0];if(t&&t.trim()!==``||(t=yr??vr[0]),e!=null&&e.bundlePathOverride){var n=wr(e.bundlePathOverride,t);return n.endsWith(`/`)?n.slice(0,-1):n}if(e!=null&&e.callObjectBundleUrlOverride){var r=wr(e.callObjectBundleUrlOverride,t),i=r.substring(0,r.lastIndexOf(`/`));return i.endsWith(`/`)?i.slice(0,-1):i}var a=Cr(`https://c.${t}/call-machine/versioned/0.92.2/static`,e);return a.endsWith(`/`)?a.slice(0,-1):a}(e,t)+`/call-machine-object-bundle.js`}function Er(e){var t=e?.bundlePathOverride||e?.callObjectBundleUrlOverride;return!(!t||vr.some(function(e){return t.includes(e)}))||!!(e?.proxyUrl||function(){try{return typeof localStorage<`u`&&localStorage.getItem(`daily:disable-base-domain-fallback`)===`1`}catch{return!1}}())}function Dr(e){try{var t=e??window.location.hostname;return vr.find(function(e){return t===e||t.endsWith(`.${e}`)})??null}catch{return null}}function Or(e,t){var n=Sr(e);if(!n||Er(t))return[e];var r=yr??Dr()??vr[0];return(r===vr[0]?vr:[r].concat(hr(vr.filter(function(e){return e!==r})))).map(function(t){return t===n?e:function(e,t,n){try{var r=new URL(e);return r.hostname.endsWith(`.${t}`)?r.hostname=r.hostname.slice(0,-t.length)+n:r.hostname===t&&(r.hostname=n),r.toString()}catch{return e}}(e,n,t)})}function kr(e){try{new URL(e)}catch{return!1}return!0}var Ar=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,jr=`8.55.2`,Mr=globalThis;function Nr(e,t,n){let r=n||Mr,i=r.__SENTRY__=r.__SENTRY__||{},a=i[jr]=i[jr]||{};return a[e]||(a[e]=t())}var Pr=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Fr=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],Ir={};function Lr(e){if(!(`console`in Mr))return e();let t=Mr.console,n={},r=Object.keys(Ir);r.forEach(e=>{let r=Ir[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}var V=Nr(`logger`,function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Pr?Fr.forEach(n=>{t[n]=(...t)=>{e&&Lr(()=>{Mr.console[n](`Sentry Logger [${n}]:`,...t)})}}):Fr.forEach(e=>{t[e]=()=>{}}),t}),Rr=`?`,zr=/\(error: (.*)\)/,Br=/captureMessage|captureException/;function Vr(e){return e[e.length-1]||{}}var Hr=`<anonymous>`;function Ur(e){try{return e&&typeof e==`function`&&e.name||Hr}catch{return Hr}}function Wr(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var Gr={},Kr={};function qr(e,t){Gr[e]=Gr[e]||[],Gr[e].push(t)}function Jr(e,t){if(!Kr[e]){Kr[e]=!0;try{t()}catch(t){Pr&&V.error(`Error while instrumenting ${e}`,t)}}}function Yr(e,t){let n=e&&Gr[e];if(n)for(let r of n)try{r(t)}catch(t){Pr&&V.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ur(r)}\nError:`,t)}}var Xr=null;function Zr(){Xr=Mr.onerror,Mr.onerror=function(e,t,n,r,i){return Yr(`error`,{column:r,error:i,line:n,msg:e,url:t}),!!Xr&&Xr.apply(this,arguments)},Mr.onerror.__SENTRY_INSTRUMENTED__=!0}var Qr=null;function $r(){Qr=Mr.onunhandledrejection,Mr.onunhandledrejection=function(e){return Yr(`unhandledrejection`,e),!Qr||Qr.apply(this,arguments)},Mr.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function ei(){return ti(Mr),Mr}function ti(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||jr,t[jr]=t[jr]||{}}var ni=Object.prototype.toString;function ri(e){switch(ni.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return pi(e,Error)}}function ii(e,t){return ni.call(e)===`[object ${t}]`}function ai(e){return ii(e,`ErrorEvent`)}function oi(e){return ii(e,`DOMError`)}function si(e){return ii(e,`String`)}function ci(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function li(e){return e===null||ci(e)||typeof e!=`object`&&typeof e!=`function`}function ui(e){return ii(e,`Object`)}function di(e){return typeof Event<`u`&&pi(e,Event)}function fi(e){return!!(e&&e.then&&typeof e.then==`function`)}function pi(e,t){try{return e instanceof t}catch{return!1}}function mi(e){return!(typeof e!=`object`||!e||!e.__isVue&&!e._isVue)}var hi=Mr;function gi(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<5&&(o=_i(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function _i(e,t){let n=e,r=[];if(!n||!n.tagName)return``;if(hi.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i&&i.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&si(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function vi(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function yi(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{mi(r)?n.push(`[VueViewModel]`):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function bi(e,t,n=!1){return!!si(e)&&(ii(t,`RegExp`)?t.test(e):!!si(t)&&(n?e===t:e.includes(t)))}function xi(e,t=[],n=!1){return t.some(t=>bi(e,t,n))}function Si(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i==`function`&&wi(i,r);try{e[t]=i}catch{Pr&&V.log(`Failed to replace method "${t}" in object`,e)}}function Ci(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Pr&&V.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function wi(e,t){try{e.prototype=t.prototype=t.prototype||{},Ci(e,`__sentry_original__`,t)}catch{}}function Ti(e){return e.__sentry_original__}function Ei(e){if(ri(e))return{message:e.message,name:e.name,stack:e.stack,...Oi(e)};if(di(e)){let t={type:e.type,target:Di(e.target),currentTarget:Di(e.currentTarget),...Oi(e)};return typeof CustomEvent<`u`&&pi(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Di(e){try{return t=e,typeof Element<`u`&&pi(t,Element)?gi(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}var t}function Oi(e){if(typeof e==`object`&&e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function ki(e){return Ai(e,new Map)}function Ai(e,t){if(function(e){if(!ui(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t===`Object`}catch{return!0}}(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let n of Object.getOwnPropertyNames(e))e[n]!==void 0&&(r[n]=Ai(e[n],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(e=>{r.push(Ai(e,t))}),r}return e}function ji(){return Date.now()/1e3}var Mi=function(){let{performance:e}=Mr;if(!e||!e.now)return ji;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function Ni(){let e=Mr,t=e.crypto||e.msCrypto,n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,``);t&&t.getRandomValues&&(n=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return`10000000100040008000100000000000`.replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function Pi(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Fi(e){let{message:t,event_id:n}=e;if(t)return t;let r=Pi(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function Ii(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function Li(e,t){let n=Pi(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:`generic`,handled:!0,...r,...t},t&&`data`in t){let e={...r&&r.data,...t.data};n.mechanism.data=e}}function Ri(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{Ci(e,`__sentry_captured__`,!0)}catch{}return!1}var zi;function Bi(e){return new Hi(t=>{t(e)})}function Vi(e){return new Hi((t,n)=>{n(e)})}(()=>{let{performance:e}=Mr;if(!e||!e.now)return;let t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,o=e.timing&&e.timing.navigationStart,s=typeof o==`number`?Math.abs(o+n-r):t;(a||s<t)&&i<=s&&e.timeOrigin})(),function(e){e[e.PENDING=0]=`PENDING`,e[e.RESOLVED=1]=`RESOLVED`,e[e.REJECTED=2]=`REJECTED`}(zi||={});var Hi=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=zi.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(e){r(e)}else e(n)},t=>{if(n)try{e(n(t))}catch(e){r(e)}else r(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}__init(){this._resolve=e=>{this._setResult(zi.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(zi.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===zi.PENDING&&(fi(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===zi.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===zi.RESOLVED&&e[1](this._value),this._state===zi.REJECTED&&e[2](this._value),!0)})}}};function Ui(e){let t=Mi(),n={sid:Ni(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>function(e){return ki({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Wi(n,e),n}function Wi(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Mi(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Ni()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Gi(){return Ni()}function Ki(){return Ni().substring(16)}function qi(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=qi(r[e],t[e],n-1));return r}var Ji=`_sentrySpan`;function Yi(e,t){t?Ci(e,Ji,t):delete e[Ji]}function Xi(e){return e[Ji]}var Zi=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Gi(),spanId:Ki()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Yi(t,Xi(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Wi(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t=typeof e==`function`?e(this):e,[n,r]=t instanceof Zi?[t.getScopeData(),t.getRequestSession()]:ui(t)?[e,e.requestSession]:[],{tags:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Yi(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Gi()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:100;if(n<=0)return this;let r={timestamp:ji(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Xi(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=qi(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Ki(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:Ni();if(!this._client)return V.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n&&n.event_id?n.event_id:Ni();if(!this._client)return V.warn(`No client configured on scope - will not capture message!`),r;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:Ni();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(V.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}},Qi=class{constructor(e,t){let n,r;n=e||new Zi,r=t||new Zi,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return fi(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function $i(){let e=ti(ei());return e.stack=e.stack||new Qi(Nr(`defaultCurrentScope`,()=>new Zi),Nr(`defaultIsolationScope`,()=>new Zi))}function ea(e){return $i().withScope(e)}function ta(e,t){let n=$i();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function na(e){return $i().withScope(()=>e($i().getIsolationScope()))}function ra(e){let t=ti(e);return t.acs?t.acs:{withIsolationScope:na,withScope:ea,withSetScope:ta,withSetIsolationScope:(e,t)=>na(t),getCurrentScope:()=>$i().getScope(),getIsolationScope:()=>$i().getIsolationScope()}}function ia(){return ra(ei()).getCurrentScope()}function aa(){return ra(ei()).getIsolationScope()}function oa(){return ia().getClient()}function sa(e){let{traceId:t,spanId:n,parentSpanId:r}=e.getPropagationContext();return ki({trace_id:t,span_id:n,parent_span_id:r})}function ca(e){let t=e._sentryMetrics;if(!t)return;let n={};for(let[,[e,r]]of t)(n[e]||(n[e]=[])).push(ki(r));return n}var la=/^sentry-/;function ua(e){let t=function(e){if(e&&(si(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=da(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):da(e)}(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>(t.match(la)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function da(e){return e.split(`,`).map(e=>e.split(`=`).map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var fa=!1;function pa(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext();return ki({parent_span_id:r?t:ga(e).parent_span_id,span_id:r?Ki():t,trace_id:n})}function ma(e){return typeof e==`number`?ha(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ha(e.getTime()):Mi()}function ha(e){return e>9999999999?e/1e3:e}function ga(e){if(function(e){return typeof e.getSpanJSON==`function`}(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(function(e){let t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){let{attributes:r,startTime:i,name:a,endTime:o,parentSpanId:s,status:c}=e;return ki({span_id:t,trace_id:n,data:r,description:a,parent_span_id:s,start_timestamp:ma(i),timestamp:ma(o)||void 0,status:_a(c),op:r[`sentry.op`],origin:r[`sentry.origin`],_metrics_summary:ca(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function _a(e){if(e&&e.code!==0)return e.code===1?`ok`:e.message||`unknown_error`}function va(e){return e._sentryRootSpan||e}function ya(){fa||=(Lr(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),!0)}var ba=`production`;function xa(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=ki({environment:n.environment||ba,release:n.release,public_key:r,trace_id:e});return t.emit(`createDsc`,i),i}function Sa(e){let t=oa();if(!t)return{};let n=va(e),r=n._frozenDsc;if(r)return r;let i=n.spanContext().traceState,a=i&&i.get(`sentry.dsc`),o=a&&ua(a);if(o)return o;let s=xa(e.spanContext().traceId,t),c=ga(n),l=c.data||{},u=l[`sentry.sample_rate`];u!=null&&(s.sample_rate=`${u}`);let d=l[`sentry.source`],f=c.description;return d!==`url`&&f&&(s.transaction=f),function(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=oa(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||`tracesSampleRate`in n||`tracesSampler`in n)}()&&(s.sampled=String(function(e){let{traceFlags:t}=e.spanContext();return t===1}(n))),t.emit(`createDsc`,s,n),s}var Ca=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function wa(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function Ta(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function Ea(e){let t=typeof e==`string`?function(e){let t=Ca.exec(e);if(!t)return void Lr(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Ta({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}(e):Ta(e);if(t&&function(e){if(!Pr)return!0;let{port:t,projectId:n,protocol:r}=e;return!([`protocol`,`publicKey`,`host`,`projectId`].find(t=>!e[t]&&(V.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return e===`http`||e===`https`}(r)?t&&isNaN(parseInt(t,10))&&(V.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(V.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(V.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Da(e,t=100,n=1/0){try{return ka(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Oa(e,t=3,n=102400){let r=Da(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?Oa(e,t-1,n):r;var i}function ka(e,t,n=1/0,r=1/0,i=function(){let e=typeof WeakSet==`function`,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=function(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(mi(t))return`[VueViewModel]`;if(ui(n=t)&&`nativeEvent`in n&&`preventDefault`in n&&`stopPropagation`in n)return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${Ur(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let r=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:`null prototype`}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!s.startsWith(`[object `))return s;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__==`number`?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let l=t;if(l&&typeof l.toJSON==`function`)try{return ka(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=Ei(t);for(let e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){u[e]=`[MaxProperties ~]`;break}let t=f[e];u[e]=ka(e,t,c-1,r,i),d++}return o(t),u}function Aa(e,t=[]){return[e,t]}function ja(e,t){let[n,r]=e;return[n,[...r,t]]}function Ma(e,t){let n=e[1];for(let e of n)if(t(e,e[0].type))return!0;return!1}function Na(e){return Mr.__SENTRY__&&Mr.__SENTRY__.encodePolyfill?Mr.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Pa(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Na(r),e]:r.push(typeof e==`string`?Na(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Da(n))}i(e)}}return typeof r==`string`?r:function(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}(r)}function Fa(e){let t=typeof e.data==`string`?Na(e.data):e.data;return[ki({type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var Ia={session:`session`,sessions:`session`,attachment:`attachment`,transaction:`transaction`,event:`error`,client_report:`internal`,user_report:`default`,profile:`profile`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,feedback:`feedback`,span:`span`,statsd:`metric_bucket`,raw_security:`security`};function La(e){return Ia[e]}function Ra(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function za(e,t,n,r){let i=Ra(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;(function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])})(e,n&&n.sdk);let o=function(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:wa(r)},...i&&{trace:ki({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Aa(o,[[{type:a},e]])}function Ba(e,t,n,r=0){return new Hi((i,a)=>{let o=e[r];if(t===null||typeof o!=`function`)i(t);else{let s=o({...t},n);Ar&&o.id&&s===null&&V.log(`Event processor "${o.id}" dropped event`),fi(s)?s.then(t=>Ba(e,t,n,r+1).then(i)).then(null,a):Ba(e,s,n,r+1).then(i).then(null,a)}})}var Va,Ha,Ua;function Wa(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;(function(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t,c=ki(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=ki(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=ki(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=ki(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)})(e,t),r&&function(e,t){e.contexts={trace:pa(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Sa(t),...e.sdkProcessingMetadata};let n=ga(va(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,a)}function Ga(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:f,transactionName:p,span:m}=t;Ka(e,`extra`,n),Ka(e,`tags`,r),Ka(e,`user`,i),Ka(e,`contexts`,a),e.sdkProcessingMetadata=qi(e.sdkProcessingMetadata,s,2),o&&(e.level=o),p&&(e.transactionName=p),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function Ka(e,t,n){e[t]=qi(e[t],n,1)}function qa(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Ni(),timestamp:t.timestamp||ji()},l=n.integrations||e.integrations.map(e=>e.name);(function(e,t){let{environment:n,release:r,dist:i,maxValueLength:a=250}=t;e.environment=e.environment||n||ba,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&=vi(e.message,a);let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=vi(o.value,a));let s=e.request;s&&s.url&&(s.url=vi(s.url,a))})(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&function(e,t){let n=function(e){let t=Mr._sentryDebugIds;if(!t)return{};let n=Object.keys(t);return Ua&&n.length===Ha||(Ha=n.length,Ua=n.reduce((n,r)=>{Va||={};let i=Va[r];if(i)n[i[0]]=i[1];else{let i=e(r);for(let e=i.length-1;e>=0;e--){let a=i[e],o=a&&a.filename,s=t[r];if(o&&s){n[o]=s,Va[r]=[o,s];break}}}return n},{})),Ua}(t);try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{n&&e.filename&&(e.debug_id=n[e.filename])})})}catch{}}(c,e.stackParser);let u=function(e,t){if(!t)return e;let n=e?e.clone():new Zi;return n.update(t),n}(r,n.captureContext);n.mechanism&&Li(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Nr(`globalScope`,()=>new Zi).getScopeData();a&&Ga(f,a.getScopeData()),u&&Ga(f,u.getScopeData());let p=[...n.attachments||[],...f.attachments];return p.length&&(n.attachments=p),Wa(c,f),Ba([...d,...f.eventProcessors],c,n).then(e=>(e&&function(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}(e),typeof o==`number`&&o>0?function(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Da(e.data,t,n)}}))},...e.user&&{user:Da(e.user,t,n)},...e.contexts&&{contexts:Da(e.contexts,t,n)},...e.extra&&{extra:Da(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Da(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Da(e.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Da(e.contexts.flags,3,n)),r}(e,o,s):e))}function Ja(e){if(e)return function(e){return e instanceof Zi||typeof e==`function`}(e)||function(e){return Object.keys(e).some(e=>Ya.includes(e))}(e)?{captureContext:e}:e}var Ya=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`requestSession`,`propagationContext`];function Xa(e,t){return ia().captureEvent(e,t)}function Za(e){let t=oa(),n=aa(),r=ia(),{release:i,environment:a=ba}=t&&t.getOptions()||{},{userAgent:o}=Mr.navigator||{},s=Ui({release:i,environment:a,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status===`ok`&&Wi(c,{status:`exited`}),Qa(),n.setSession(s),r.setSession(s),s}function Qa(){let e=aa(),t=ia(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),Wi(e,n)}(n),$a(),e.setSession(),t.setSession()}function $a(){let e=aa(),t=ia(),n=oa(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function eo(e=!1){e?Qa():$a()}function to(e,t,n){return t||`${function(e){return`${function(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}var no=[];function ro(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function io(e,t,n){if(n[t.name])Ar&&V.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,no.indexOf(t.name)===-1&&typeof t.setupOnce==`function`&&(t.setupOnce(),no.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}Ar&&V.log(`Integration installed: ${t.name}`)}}var ao=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.logLevel=t}},oo=`Not capturing exception because it's already been captured.`,so=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=Ea(e.dsn):Ar&&V.warn(`No DSN provided, client will not send events.`),this._dsn){let t=to(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}let t=[`enableTracing`,`tracesSampleRate`,`tracesSampler`].find(t=>t in e&&e[t]==null);t&&Lr(()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(e,t,n){let r=Ni();if(Ri(e))return Ar&&V.log(oo),r;let i={event_id:r,...t};return this._process(this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n))),i.event_id}captureMessage(e,t,n,r){let i={event_id:Ni(),...n},a=ci(e)?e:String(e),o=li(e)?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(o.then(e=>this._captureEvent(e,i,r))),i.event_id}captureEvent(e,t,n){let r=Ni();if(t&&t.originalException&&Ri(t.originalException))return Ar&&V.log(oo),r;let i={event_id:r,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,a||n)),i.event_id}captureSession(e){typeof e.release==`string`?(this.sendSession(e),Wi(e,{init:!1})):Ar&&V.warn(`Discarded session because of missing or non-string release`)}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit(`flush`),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):Bi(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit(`close`),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];io(this,e,this._integrations),t||ro(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=za(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=ja(n,Fa(e));let r=this.sendEnvelope(n);r&&r.then(t=>this.emit(`afterSendEvent`,e,t),null)}sendSession(e){let t=function(e,t,n,r){let i=Ra(n);return Aa({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:wa(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=typeof n==`number`?n:1,i=`${e}:${t}`;Ar&&V.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}sendEnvelope(e){return this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,e=>(Ar&&V.error(`Error while sending envelope:`,e),e)):(Ar&&V.error(`Transport disabled`),Bi({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&io(e,t,n)}),n}(this,e),ro(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let e of i){let t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(Wi(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Hi(t=>{let n=0,r=setInterval(()=>{this._numProcessing==0?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&this._transport!==void 0}_prepareEvent(e,t,n=ia(),r=aa()){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),qa(i,e,t,n,this,r).then(e=>e===null?e:(e.contexts={trace:sa(n),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let n=t.getPropagationContext();return n.dsc||xa(n.traceId,e)}(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{Ar&&(e instanceof ao&&e.logLevel===`log`?V.log(e.message):V.warn(e))})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=lo(e),o=co(e),s=e.type||`error`,c=`before send for type \`${s}\``,l=i===void 0?void 0:function(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t;Ar&&V.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(i);if(o&&typeof l==`number`&&Math.random()>l)return this.recordDroppedEvent(`sample_rate`,`error`,e),Vi(new ao(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,`log`));let u=s===`replay_event`?`replay`:s,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then(n=>{if(n===null)throw this.recordDroppedEvent(`event_processor`,u,e),new ao("An event processor returned `null`, will not send event.",`log`);return t.data&&!0===t.data.__sentry__?n:function(e,t){let n=`${t} must return \`null\` or a valid event.`;if(fi(e))return e.then(e=>{if(!ui(e)&&e!==null)throw new ao(n);return e},e=>{throw new ao(`${t} rejected with ${e}`)});if(!ui(e)&&e!==null)throw new ao(n);return e}(function(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o}=t;if(co(n)&&i)return i(n,r);if(lo(n)){if(n.spans&&o){let t=[];for(let r of n.spans){let n=o(r);n?t.push(n):(ya(),e.recordDroppedEvent(`before_send`,`span`))}n.spans=t}if(a){if(n.spans){let e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(n,r)}}return n}(this,r,n,t),c)}).then(r=>{if(r===null){if(this.recordDroppedEvent(`before_send`,u,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw new ao(`${c} returned \`null\`, will not send event.`,`log`)}let i=n&&n.getSession();if(!a&&i&&this._updateSessionFromEvent(i,r),a){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let o=r.transaction_info;return a&&o&&r.transaction!==e.transaction&&(r.transaction_info={...o,source:`custom`}),this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof ao?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new ao(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){Ar&&V.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0)return void(Ar&&V.log(`No outcomes to send`));if(!this._dsn)return void(Ar&&V.log(`No dsn provided, will not send outcomes`));Ar&&V.log(`Sending outcomes:`,e);let t=(n=e,Aa((r=this._options.tunnel&&wa(this._dsn))?{dsn:r}:{},[[{type:`client_report`},{timestamp:i||ji(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}};function co(e){return e.type===void 0}function lo(e){return e.type===`transaction`}function uo(e){let t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(e===void 0||t.length<e))return Vi(new ao(`Not adding Promise because buffer limit was reached.`));let i=r();return t.indexOf(i)===-1&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new Hi((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Bi(e).then(()=>{--i||(clearTimeout(a),n(!0))},r)})})}}}function fo(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},a=n&&n[`x-sentry-rate-limits`],o=n&&n[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=1e3*(isNaN(o)?60:o);if(n)for(let e of n.split(`;`))e===`metric_bucket`&&a&&!a.split(`;`).includes(`custom`)||(i[e]=r+s);else i.all=r+s}else o?i.all=r+function(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(o,r):t===429&&(i.all=r+6e4);return i}function po(e,t,n=uo(e.bufferSize||64)){let r={};return{send:function(i){let a=[];if(Ma(i,(t,n)=>{let i=La(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){let r=mo(t,n);e.recordDroppedEvent(`ratelimit_backoff`,i,r)}else a.push(t)}),a.length===0)return Bi({});let o=Aa(i[0],a),s=t=>{Ma(o,(n,r)=>{let i=mo(n,r);e.recordDroppedEvent(t,La(r),i)})};return n.add(()=>t({body:Pa(o)}).then(e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&Ar&&V.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=fo(r,e),e),e=>{throw s(`network_error`),e})).then(e=>e,e=>{if(e instanceof ao)return Ar&&V.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Bi({});throw e})},flush:e=>n.drain(e)}}function mo(e,t){if(t===`event`||t===`transaction`)return Array.isArray(e)?e[1]:void 0}var ho=100;function go(e,t){let n=oa(),r=aa();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=ho}=n.getOptions();if(a<=0)return;let o={timestamp:ji(),...e},s=i?Lr(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var _o,vo=new WeakMap,yo=()=>({name:`FunctionToString`,setupOnce(){_o=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Ti(this),n=vo.has(oa())&&t!==void 0?t:this;return _o.apply(n,e)}}catch{}},setup(e){vo.set(e,!0)}}),bo=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,`undefined is not an object (evaluating 'a.L')`,`can't redefine non-configurable property "solana"`,`vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)`,`Can't find variable: _AutofillCallbackHandler`,/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],xo=(e={})=>({name:`InboundFilters`,processEvent(t,n,r){return function(e,t){return t.ignoreInternal&&function(e){try{return e.exception.values[0].type===`SentryError`}catch{}return!1}(e)?(Ar&&V.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Fi(e)}`),!0):function(e,t){return e.type||!t||!t.length?!1:function(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}(e).some(e=>xi(e,t))}(e,t.ignoreErrors)?(Ar&&V.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Fi(e)}`),!0):function(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value)}(e)?(Ar&&V.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Fi(e)}`),!0):function(e,t){if(e.type!==`transaction`||!t||!t.length)return!1;let n=e.transaction;return!!n&&xi(n,t)}(e,t.ignoreTransactions)?(Ar&&V.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Fi(e)}`),!0):function(e,t){if(!t||!t.length)return!1;let n=So(e);return!!n&&xi(n,t)}(e,t.denyUrls)?(Ar&&V.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Fi(e)}.\nUrl: ${So(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;let n=So(e);return!n||xi(n,t)}(e,t.allowUrls)&&(Ar&&V.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Fi(e)}.\nUrl: ${So(e)}`),!0)}(t,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:bo],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal===void 0||e.ignoreInternal}}(e,r.getOptions()))?null:t}});function So(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}(t):null}catch{return Ar&&V.error(`Cannot extract url for event ${Fi(e)}`),null}}function Co(e,t,n=250,r,i,a,o){if(!(a.exception&&a.exception.values&&o&&pi(o.originalException,Error)))return;let s=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;var c,l;s&&(a.exception.values=(c=wo(e,t,i,o.originalException,r,a.exception.values,s,0),l=n,c.map(e=>(e.value&&=vi(e.value,l),e))))}function wo(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(pi(r[i],Error)){To(o,s);let a=e(t,r[i]),l=c.length;Eo(a,i,l,s),c=wo(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,a)=>{if(pi(r,Error)){To(o,s);let l=e(t,r),u=c.length;Eo(l,`errors[${a}]`,u,s),c=wo(e,t,n,r,i,[l,...c],l,u)}}),c}function To(e,t){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,...e.type===`AggregateError`&&{is_exception_group:!0},exception_id:t}}function Eo(e,t,n,r){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Do(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Oo(){`console`in Mr&&Fr.forEach(function(e){e in Mr.console&&Si(Mr.console,e,function(t){return Ir[e]=t,function(...t){Yr(`console`,{args:t,level:e});let n=Ir[e];n&&n.apply(Mr.console,t)}})})}function ko(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Ao=()=>{let e;return{name:`Dedupe`,processEvent(t){if(t.type)return t;try{if(function(e,t){return t?!!(function(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Mo(e,t)||!jo(e,t))}(e,t)||function(e,t){let n=No(t),r=No(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Mo(e,t)||!jo(e,t))}(e,t)):!1}(t,e))return Ar&&V.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}};function jo(e,t){let n=Wr(e),r=Wr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Mo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join(``)===r.join(``)}catch{return!1}}function No(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Po(e){return e===void 0?void 0:e>=400&&e<500?`warning`:e>=500?`error`:void 0}var Fo=Mr;function Io(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Lo(){if(typeof EdgeRuntime==`string`)return!0;if(!function(){if(!(`fetch`in Fo))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}())return!1;if(Io(Fo.fetch))return!0;let e=!1,t=Fo.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Io(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){Pr&&V.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Ro(e,t){let n=`fetch`;qr(n,e),Jr(n,()=>function(e,t=!1){(!t||Lo())&&Si(Mr,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=function(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Bo(t),method:zo(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:Bo(t),method:zo(t,`method`)?String(t.method).toUpperCase():`GET`}}(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:1e3*Mi(),virtualError:r};return e||Yr(`fetch`,{...o}),t.apply(Mr,n).then(async t=>(e?e(t):Yr(`fetch`,{...o,endTimestamp:1e3*Mi(),response:t}),t),e=>{throw Yr(`fetch`,{...o,endTimestamp:1e3*Mi(),error:e}),ri(e)&&e.stack===void 0&&(e.stack=r.stack,Ci(e,`framesToPop`,1)),e})}})}(void 0,t))}function zo(e,t){return!!e&&typeof e==`object`&&!!e[t]}function Bo(e){return typeof e==`string`?e:e?zo(e,`url`)?e.url:e.toString?e.toString():``:``}var Vo=Mr,Ho=Mr,Uo=0;function Wo(){return Uo>0}function Go(e,t={}){if(!function(e){return typeof e==`function`}(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Ti(e))return e}catch{return e}let n=function(...n){try{let r=n.map(e=>Go(e,t));return e.apply(this,r)}catch(e){throw Uo++,setTimeout(()=>{Uo--}),function(...e){let t=ra(ei());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(r=>{var i,a;r.addEventProcessor(e=>(t.mechanism&&(Ii(e,void 0,void 0),Li(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),i=e,ia().captureException(i,Ja(a))}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}wi(n,e),Ci(e,`__sentry_wrapped__`,n);try{Object.getOwnPropertyDescriptor(n,`name`).configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}var Ko=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function qo(e,t){let n=Xo(e,t),r={type:$o(t),value:es(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Jo(e,t,n,r){let i=oa(),a=i&&i.getOptions().normalizeDepth,o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}(t),s={__serialized__:Oa(t,a)};if(o)return{exception:{values:[qo(e,o)]},extra:s};let c={exception:{values:[{type:di(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:rs(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=Xo(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Yo(e,t){return{exception:{values:[qo(e,t)]}}}function Xo(e,t){let n=t.stacktrace||t.stack||``,r=function(e){return e&&Zo.test(e.message)?1:0}(t),i=function(e){return typeof e.framesToPop==`number`?e.framesToPop:0}(t);try{return e(n,r,i)}catch{}return[]}var Zo=/Minified React error #\d+;/i;function Qo(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function $o(e){let t=e&&e.name;return!t&&Qo(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function es(e){let t=e&&e.message;return t?t.error&&typeof t.error.message==`string`?t.error.message:Qo(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:`No error message`}function ts(e,t,n,r,i){let a;if(ai(t)&&t.error)return Yo(e,t.error);if(oi(t)||ii(t,`DOMException`)){let i=t;if(`stack`in t)a=Yo(e,t);else{let t=i.name||(oi(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=ns(e,o,n,r),Ii(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return ri(t)?Yo(e,t):ui(t)||di(t)?(a=Jo(e,t,n,i),Li(a,{synthetic:!0}),a):(a=ns(e,t,n,r),Ii(a,`${t}`,void 0),Li(a,{synthetic:!0}),a)}function ns(e,t,n,r){let i={};if(r&&n){let r=Xo(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),Li(i,{synthetic:!0})}if(ci(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function rs(e,{isUnhandledRejection:t}){let n=function(e,t=40){let n=Object.keys(Ei(e));n.sort();let r=n[0];if(!r)return`[object has no keys]`;if(r.length>=t)return vi(r,t);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`, `);if(!(r.length>t))return e===n.length?r:vi(r,t)}return``}(e),r=t?`promise rejection`:`exception`;return ai(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:di(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}var is=class extends so{constructor(e){let t={parentSpanIsAlwaysRootSpan:!0,...e};(function(e,t,n=[t],r=`npm`){let i=e._metadata||{};i.sdk||={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:jr})),version:jr},e._metadata=i})(t,`browser`,[`browser`],Ho.SENTRY_SDK_SOURCE||`npm`),super(t),t.sendClientReports&&Ho.document&&Ho.document.addEventListener(`visibilitychange`,()=>{Ho.document.visibilityState===`hidden`&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){let i=ts(e,t,n&&n.syntheticException||void 0,r);return Li(i),i.level=`error`,n&&n.event_id&&(i.event_id=n.event_id),Bi(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return function(e,t,n=`info`,r,i){let a=ns(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),Bi(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Ko&&V.warn(`SDK not enabled, will not capture user feedback.`));let t=function(e,{metadata:t,tunnel:n,dsn:r}){return Aa({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:wa(r)}},[function(e){return[{type:`user_report`},e]}(e)])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n)}},as=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,os=Mr,ss,cs,ls,us;function ds(){if(!os.document)return;let e=Yr.bind(null,`dom`),t=fs(e,!0);os.document.addEventListener(`click`,t,!1),os.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=os[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty(`addEventListener`)&&(Si(r,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=fs(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),Si(r,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function fs(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return e===`keypress`&&(!t||!t.tagName||t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!t.isContentEditable)}(n.type,r))return;Ci(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Ci(r,`_sentryId`,Ni());let i=n.type===`keypress`?`input`:n.type;(function(e){if(e.type!==cs)return!1;try{if(!e.target||e.target._sentryId!==ls)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),cs=n.type,ls=r?r._sentryId:void 0),clearTimeout(ss),ss=os.setTimeout(()=>{ls=void 0,cs=void 0},1e3)}}function ps(e){let t=`history`;qr(t,e),Jr(t,ms)}function ms(){if(!function(){let e=Vo.chrome,t=e&&e.app&&e.app.runtime,n=`history`in Vo&&!!Vo.history.pushState&&!!Vo.history.replaceState;return!t&&n}())return;let e=os.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=us,t=String(n);us=t,Yr(`history`,{from:e,to:t})}return e.apply(this,t)}}os.onpopstate=function(...t){let n=os.location.href,r=us;if(us=n,Yr(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},Si(os.history,`pushState`,t),Si(os.history,`replaceState`,t)}var hs={};function gs(e){hs[e]=void 0}var _s=`__sentry_xhr_v3__`;function vs(){if(!os.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=1e3*Mi(),a=si(n[0])?n[0].toUpperCase():void 0,o=function(e){if(si(e))return e;try{return e.toString()}catch{}}(n[1]);if(!a||!o)return e.apply(t,n);t[_s]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[_s];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}Yr(`xhr`,{endTimestamp:1e3*Mi(),startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[_s];return a&&si(r)&&si(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[_s];return r?(n[0]!==void 0&&(r.body=n[0]),Yr(`xhr`,{startTimestamp:1e3*Mi(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function ys(e,t=function(e){let t=hs[e];if(t)return t;let n=os[e];if(Io(n))return hs[e]=n.bind(os);let r=os.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){as&&V.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(hs[e]=n.bind(os))}(`fetch`)){let n=0,r=0;return po(e,function(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return gs(`fetch`),Vi(`No fetch implementation available`);try{return t(e.url,o).then(e=>(n-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get(`X-Sentry-Rate-Limits`),"retry-after":e.headers.get(`Retry-After`)}}))}catch(e){return gs(`fetch`),n-=a,r--,Vi(e)}})}function bs(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?Rr:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var xs=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ss=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Cs=/\((\S*)(?::(\d+))(?::(\d+))\)/,ws=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ts=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Es=function(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
5
- `);for(let e=n;e<a.length;e++){let n=a[e];if(n.length>1024)continue;let o=zr.test(n)?n.replace(zr,`$1`):n;if(!o.match(/\S*Error: /)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Vr(t).function||``)&&t.pop(),t.reverse(),Br.test(Vr(t).function||``)&&(t.pop(),Br.test(Vr(t).function||``)&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||Vr(t).filename,function:e.function||Rr}))}(i.slice(r))}}([30,e=>{let t=xs.exec(e);if(t){let[,e,n,r]=t;return bs(e,Rr,+n,+r)}let n=Ss.exec(e);if(n){if(n[2]&&n[2].indexOf(`eval`)===0){let e=Cs.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}let[e,t]=Ds(n[1]||Rr,n[2]);return bs(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{let t=ws.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Ts.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||Rr;return[n,e]=Ds(n,e),bs(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Ds=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?Rr:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Os=1024,ks=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:`Breadcrumbs`,setup(e){var n;t.console&&function(e){let t=`console`;qr(t,e),Jr(t,Oo)}(function(e){return function(t){if(oa()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:ko(t.level),message:yi(t.args,` `)};if(t.level===`assert`){if(!1!==t.args[0])return;n.message=`Assertion failed: ${yi(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1)}go(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(oa()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>Os&&(Ko&&V.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=Os),typeof a==`string`&&(a=[a]);try{let e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=gi(t,{keyAttrs:a,maxStringLength:o}),i=function(e){if(!hi.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),go(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),qr(`dom`,n),Jr(`dom`,ds)),t.xhr&&function(e){qr(`xhr`,e),Jr(`xhr`,vs)}(function(e){return function(t){if(oa()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[_s];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};go({category:`xhr`,data:l,type:`http`,level:Po(s)},u)}}(e)),t.fetch&&Ro(function(e){return function(t){if(oa()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||t.fetchData.method!==`POST`)){if(t.error)go({category:`fetch`,data:t.fetchData,level:`error`,type:`http`},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r});else{let e=t.response,i={...t.fetchData,status_code:e&&e.status},a={input:t.args,response:e,startTimestamp:n,endTimestamp:r};go({category:`fetch`,data:i,type:`http`,level:Po(i.status_code)},a)}}}}(e)),t.history&&ps(function(e){return function(t){if(oa()!==e)return;let n=t.from,r=t.to,i=Do(Ho.location.href),a=n?Do(n):void 0,o=Do(r);a&&a.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),go({category:`navigation`,data:{from:n,to:r}})}}(e)),t.sentry&&e.on(`beforeSendEvent`,function(e){return function(t){oa()===e&&go({category:`sentry.`+(t.type===`transaction`?`transaction`:`event`),event_id:t.event_id,level:t.level,message:Fi(t)},{event:t})}}(e))}}},As=`EventTarget.Window.Node.ApplicationCache.AudioTrackList.BroadcastChannel.ChannelMergerNode.CryptoOperation.EventSource.FileReader.HTMLUnknownElement.IDBDatabase.IDBRequest.IDBTransaction.KeyOperation.MediaController.MessagePort.ModalWindow.Notification.SVGElementInstance.Screen.SharedWorker.TextTrack.TextTrackCue.TextTrackList.WebSocket.WebSocketWorker.Worker.XMLHttpRequest.XMLHttpRequestEventTarget.XMLHttpRequestUpload`.split(`.`),js=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:`BrowserApiErrors`,setupOnce(){t.setTimeout&&Si(Ho,`setTimeout`,Ms),t.setInterval&&Si(Ho,`setInterval`,Ms),t.requestAnimationFrame&&Si(Ho,`requestAnimationFrame`,Ns),t.XMLHttpRequest&&`XMLHttpRequest`in Ho&&Si(XMLHttpRequest.prototype,`send`,Ps);let e=t.eventTarget;e&&(Array.isArray(e)?e:As).forEach(Fs)}}};function Ms(e){return function(...t){let n=t[0];return t[0]=Go(n,{mechanism:{data:{function:Ur(e)},handled:!1,type:`instrument`}}),e.apply(this,t)}}function Ns(e){return function(t){return e.apply(this,[Go(t,{mechanism:{data:{function:`requestAnimationFrame`,handler:Ur(e)},handled:!1,type:`instrument`}})])}}function Ps(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Si(n,e,function(t){let n={mechanism:{data:{function:e,handler:Ur(t)},handled:!1,type:`instrument`}},r=Ti(t);return r&&(n.mechanism.data.handler=Ur(r)),Go(t,n)})}),e.apply(this,t)}}function Fs(e){let t=Ho[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty(`addEventListener`)&&(Si(n,`addEventListener`,function(t){return function(n,r,i){try{typeof r.handleEvent==`function`&&(r.handleEvent=Go(r.handleEvent,{mechanism:{data:{function:`handleEvent`,handler:Ur(r),target:e},handled:!1,type:`instrument`}}))}catch{}return t.apply(this,[n,Go(r,{mechanism:{data:{function:`addEventListener`,handler:Ur(r),target:e},handled:!1,type:`instrument`}}),i])}}),Si(n,`removeEventListener`,function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))}var Is=()=>({name:`BrowserSession`,setupOnce(){Ho.document===void 0?Ko&&V.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(Za({ignoreDuration:!0}),eo(),ps(({from:e,to:t})=>{e!==void 0&&e!==t&&(Za({ignoreDuration:!0}),eo())}))}}),Ls=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:`GlobalHandlers`,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){(function(e){let t=`error`;qr(t,e),Jr(t,Zr)})(t=>{let{stackParser:n,attachStacktrace:r}=zs();if(oa()!==e||Wo())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=function(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[],l=r,u=n,d=si(t)&&t.length>0?t:function(){try{return hi.document.location.href}catch{return``}}();return c.length===0&&c.push({colno:l,filename:d,function:Rr,in_app:!0,lineno:u}),e}(ts(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Xa(l,{originalException:c,mechanism:{handled:!1,type:`onerror`}})})}(e),Rs(`onerror`)),t.onunhandledrejection&&(function(e){(function(e){let t=`unhandledrejection`;qr(t,e),Jr(t,$r)})(t=>{let{stackParser:n,attachStacktrace:r}=zs();if(oa()!==e||Wo())return;let i=function(e){if(li(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}(t),a=li(i)?{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:ts(n,i,void 0,r,!0);a.level=`error`,Xa(a,{originalException:i,mechanism:{handled:!1,type:`onunhandledrejection`}})})}(e),Rs(`onunhandledrejection`))}}};function Rs(e){Ko&&V.log(`Global Handler attached: ${e}`)}function zs(){let e=oa();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Bs=()=>({name:`HttpContext`,preprocessEvent(e){if(!Ho.navigator&&!Ho.location&&!Ho.document)return;let t=e.request&&e.request.url||Ho.location&&Ho.location.href,{referrer:n}=Ho.document||{},{userAgent:r}=Ho.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};e.request={...e.request,...t&&{url:t},headers:i}}}),Vs=(e={})=>{let t=e.limit||5,n=e.key||`cause`;return{name:`LinkedErrors`,preprocessEvent(e,r,i){let a=i.getOptions();Co(qo,a.stackParser,a.maxValueLength,n,t,e,r)}}},Hs=`loading`,Us=`loaded`,Ws=`joining-meeting`,Gs=`joined-meeting`,Ks=`left-meeting`,qs=`error`,Js=`unknown`,Ys=`full`,Xs=`base`,Zs=`iframe-ready-for-launch-config`,Qs=`iframe-launch-config`,$s=`theme-updated`,ec=`load-attempt-failed`,tc=`loaded`,nc=`started-camera`,rc=`camera-error`,ic=`joining-meeting`,ac=`joined-meeting`,oc=`left-meeting`,sc=`participant-joined`,cc=`participant-updated`,lc=`participant-left`,uc=`participant-counts-updated`,dc=`access-state-updated`,fc=`meeting-session-summary-updated`,pc=`meeting-session-state-updated`,mc=`waiting-participant-added`,hc=`waiting-participant-updated`,gc=`waiting-participant-removed`,_c=`transcription-started`,vc=`transcription-stopped`,yc=`transcription-error`,bc=`recording-started`,xc=`recording-stopped`,Sc=`recording-stats`,Cc=`recording-error`,wc=`recording-upload-completed`,Tc=`recording-data`,Ec=`app-message`,Dc=`transcription-message`,Oc=`remote-media-player-started`,kc=`remote-media-player-updated`,Ac=`remote-media-player-stopped`,jc=`local-screen-share-started`,Mc=`local-screen-share-stopped`,Nc=`local-screen-share-canceled`,Pc=`active-speaker-change`,Fc=`active-speaker-mode-change`,Ic=`network-quality-change`,Lc=`network-connection`,Rc=`cpu-load-change`,zc=`face-counts-updated`,Bc=`live-streaming-started`,Vc=`live-streaming-updated`,Hc=`live-streaming-stopped`,Uc=`live-streaming-error`,Wc=`lang-updated`,Gc=`receive-settings-updated`,Kc=`input-settings-updated`,qc=`nonfatal-error`,Jc=`error`,Yc=4096,Xc=102400,Zc=`iframe-call-message`,Qc=`local-screen-start`,$c=`daily-method-update-live-streaming-endpoints`,el=`transmit-log`,tl=`daily-custom-track`,nl={NONE:`none`,BGBLUR:`background-blur`,BGIMAGE:`background-image`,FACE_DETECTION:`face-detection`},rl={NONE:`none`,NOISE_CANCELLATION:`noise-cancellation`},il={PLAY:`play`,PAUSE:`pause`},al=`daily`,ol=`signalwire`,sl=[`jpg`,`png`,`jpeg`],cl=`add-endpoints`,ll=`remove-endpoints`,ul=`sip-call-transfer`;function dl(){return!fl()&&typeof window<`u`&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:``}function fl(){return typeof navigator<`u`&&navigator.product&&navigator.product===`ReactNative`}function pl(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function ml(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&(function(e,t){if(!e||!t)return!0;switch(e){case`Chrome`:return t.major>=75;case`Safari`:return RTCRtpTransceiver.prototype.hasOwnProperty(`currentDirection`)&&(t.major!==13||t.minor!==0||t.point!==0);case`Firefox`:return t.major>=67}return!0}(Tl(),El())||fl())}function hl(){if(fl()||!document)return!1;var e=document.createElement(`iframe`);return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var gl=`none`,_l=`software`,vl=`hardware`,yl=function(){try{var e,t=document.createElement(`canvas`),n=!1;(e=t.getContext(`webgl2`,{failIfMajorPerformanceCaveat:!0}))||(n=!0,e=t.getContext(`webgl2`));var r=e!=null;return t.remove(),r?n?_l:vl:gl}catch{return gl}}();function bl(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!fl()&&yl!==gl&&(e?function(){return!wl()&&[`Chrome`,`Firefox`].includes(Tl())}():function(){if(wl())return!1;var e=Tl();if(e===`Safari`){var t=Al();if(t.major<15||t.major===15&&t.minor<4)return!1}return e===`Chrome`?Dl().major>=77:e===`Firefox`?jl().major>=97:[`Chrome`,`Firefox`,`Safari`].includes(e)}())}function xl(){if(fl()||Cl()||typeof AudioWorkletNode>`u`)return!1;switch(Tl()){case`Chrome`:case`Firefox`:return!0;case`Safari`:var e=El();return e.major>17||e.major===17&&e.minor>=4}return!1}function Sl(){return pl()&&typeof MediaStreamTrack<`u`&&!function(){var e,t=Tl();if(!dl())return!0;switch(t){case`Chrome`:return(e=Dl()).major&&e.major>0&&e.major<75;case`Firefox`:return(e=jl()).major<91;case`Safari`:return(e=Al()).major<13||e.major===13&&e.minor<1;default:return!0}}()}function Cl(){return dl().match(/Linux; Android/)}function wl(){var e,t=dl(),n=t.match(/Mac/)&&(!fl()&&typeof window<`u`&&(e=window)!=null&&(e=e.navigator)!=null&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||!!dl().match(/DailyAnd\//)||void 0}function Tl(){if(typeof window<`u`){var e=dl();return Ol()?`Safari`:e.indexOf(`Edge`)>-1?`Edge`:e.match(/Chrome\//)?`Chrome`:e.indexOf(`Safari`)>-1||kl()?`Safari`:e.indexOf(`Firefox`)>-1?`Firefox`:e.indexOf(`MSIE`)>-1||e.indexOf(`.NET`)>-1?`IE`:`Unknown Browser`}}function El(){switch(Tl()){case`Chrome`:return Dl();case`Safari`:return Al();case`Firefox`:return jl();case`Edge`:return function(){var e=0,t=0;if(typeof window<`u`){var n=dl().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}()}}function Dl(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<`u`){var a=dl(),o=a.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(o)try{e=parseInt(o[1]),t=parseInt(o[2]),n=parseInt(o[3]),r=parseInt(o[4]),i=a.indexOf(`OPR/`)>-1}catch{}}return{major:e,minor:t,build:n,patch:r,opera:i}}function Ol(){return!!dl().match(/\((iPad|iPhone|iPod)/i)&&pl()}function kl(){return dl().indexOf(`AppleWebKit/605.1.15`)>-1}function Al(){var e=0,t=0,n=0;if(typeof window<`u`){var r=dl().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else(Ol()||kl())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function jl(){var e=0,t=0;if(typeof window<`u`){var n=dl().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var Ml=function(){return Vn(function e(){Rn(this,e)},[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){_r()}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){_r()}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){_r()}},{key:`sendMessageToDailyJs`,value:function(e,t){_r()}},{key:`removeListener`,value:function(e){_r()}}])}();function Nl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Nl(Object(n),!0).forEach(function(t){Kn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Fl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fl=function(){return!!e})()}var Il=function(){function e(){var t,n,r,i;return Rn(this,e),n=this,r=Un(r=e),(t=Hn(n,Fl()?Reflect.construct(r,i||[],Un(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return Gn(e,Ml),Vn(e,[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){var r=this,i=function(i){if(i.data&&i.data.what===`iframe-call-message`&&(!i.data.callClientId||i.data.callClientId===t)&&(!i.data.from||i.data.from!==`module`)){var a=Pl({},i.data);if(delete a.from,a.callbackStamp&&r._messageCallbacks[a.callbackStamp]){var o=a.callbackStamp;r._messageCallbacks[o].call(n,a),delete r._messageCallbacks[o]}delete a.what,delete a.callbackStamp,e.call(n,a)}};this._wrappedListeners[e]=i,window.addEventListener(`message`,i)}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){var r=function(r){var i;if(!(!r.data||r.data.what!==Zc||!r.data.action||r.data.from&&r.data.from!==`module`||r.data.callClientId&&t&&r.data.callClientId!==t||r!=null&&(i=r.data)!=null&&i.callFrameId)){var a=r.data;e.call(n,a)}};this._wrappedListeners[e]=r,window.addEventListener(`message`,r)}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){if(!n)throw Error(`undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?`);var i=Pl({},e);if(i.what=Zc,i.from=`module`,i.callClientId=n,t){var a=gr();this._messageCallbacks[a]=t,i.callbackStamp=a}var o=r?r.contentWindow:window,s=this._callMachineTargetOrigin(r);s&&o.postMessage(i,s)}},{key:`sendMessageToDailyJs`,value:function(e,t){e.what=Zc,e.callClientId=t,e.from=`embedded`,window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:`removeListener`,value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener(`message`,t),delete this._wrappedListeners[e])}},{key:`forwardPackagedMessageToCallMachine`,value:function(e,t,n){var r=Pl({},e);r.callClientId=n;var i=t?t.contentWindow:window,a=this._callMachineTargetOrigin(t);a&&i.postMessage(r,a)}},{key:`addListenerForPackagedMessagesFromCallMachine`,value:function(e,t){var n=function(n){if(n.data&&n.data.what===`iframe-call-message`&&(!n.data.callClientId||n.data.callClientId===t)&&(!n.data.from||n.data.from!==`module`)){var r=n.data;e(r)}};return this._wrappedListeners[e]=n,window.addEventListener(`message`,n),e}},{key:`removeListenerForPackagedMessagesFromCallMachine`,value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener(`message`,t),delete this._wrappedListeners[e])}},{key:`_callMachineTargetOrigin`,value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:`_targetOriginFromWindowLocation`,value:function(){return window.location.protocol===`file:`?`*`:window.location.origin}}])}();function Ll(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rl=function(){return!!e})()}var zl=function(){function e(){var t,n,r,i;return Rn(this,e),n=this,r=Un(r=e),t=Hn(n,Rl()?Reflect.construct(r,i||[],Un(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new er.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new er.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return Gn(e,Ml),Vn(e,[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){this._addListener(e,global.callMachineToDailyJsEmitter,t,n,`received call machine message`)}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){this._addListener(e,global.dailyJsToCallMachineEmitter,t,n,`received daily-js message`)}},{key:`sendMessageToCallMachine`,value:function(e,t,n){this._sendMessage(e,global.dailyJsToCallMachineEmitter,n,t,`sending message to call machine`)}},{key:`sendMessageToDailyJs`,value:function(e,t){this._sendMessage(e,global.callMachineToDailyJsEmitter,t,null,`sending message to daily-js`)}},{key:`removeListener`,value:function(e){var t=this._wrappedListeners[e];t&&(global.callMachineToDailyJsEmitter.removeListener(`message`,t),global.dailyJsToCallMachineEmitter.removeListener(`message`,t),delete this._wrappedListeners[e])}},{key:`_addListener`,value:function(e,t,n,r,i){var a=this,o=function(t){if(t.callClientId===n){if(t.callbackStamp&&a._messageCallbacks[t.callbackStamp]){var i=t.callbackStamp;a._messageCallbacks[i].call(r,t),delete a._messageCallbacks[i]}e.call(r,t)}};this._wrappedListeners[e]=o,t.addListener(`message`,o)}},{key:`_sendMessage`,value:function(e,t,n,r,i){var a=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ll(Object(n),!0).forEach(function(t){Kn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ll(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);if(a.callClientId=n,r){var o=gr();this._messageCallbacks[o]=r,a.callbackStamp=o}t.emit(`message`,a)}}])}(),Bl=`replace`,Vl=`shallow-merge`,Hl=[Bl,Vl],Ul=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?Bl:r;Rn(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return Vn(e,[{key:`isNoOp`,value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:`isNoOpUpdate`,value:function(e,t){return Object.keys(e).length===0&&t===Vl}},{key:`_validateMergeStrategy`,value:function(e){if(!Hl.includes(e))throw Error(`Unrecognized mergeStrategy provided. Options are: [${Hl}]`)}},{key:`_validateData`,value:function(e,t){if(!function(e){if(e==null||I(e)!==`object`)return!1;var t=Object.getPrototypeOf(e);return t==null||t===Object.prototype}(e))throw Error(`Meeting session data must be a plain (map-like) object`);var n;try{if(n=JSON.stringify(e),t===Bl){var r=JSON.parse(n);ir(r,e)||console.warn(`The meeting session data provided will be modified when serialized.`,r,e)}else if(t===Vl){for(var i in e)if(Object.hasOwnProperty.call(e,i)&&e[i]!==void 0){var a=JSON.parse(JSON.stringify(e[i]));ir(e[i],a)||console.warn(`At least one key in the meeting session data provided will be modified when serialized.`,a,e[i])}}}catch(e){throw Error(`Meeting session data must be serializable to JSON: ${e}`)}if(n.length>Xc)throw Error(`Meeting session data is too large (${n.length} characters). Maximum size suppported is ${Xc}.`)}}])}();function Wl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wl=function(){return!!e})()}function Gl(e){var t=typeof Map==`function`?new Map:void 0;return Gl=function(e){if(e===null||!function(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Wl())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Wn(i,n.prototype),i}(e,arguments,Un(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Wn(n,e)},Gl(e)}function Kl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kl=function(){return!!e})()}function ql(e){var t=window._daily?.pendings;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}}var Jl=function(){return Vn(function e(t){Rn(this,e),this._currentLoad=null,this._callClientId=t,this._publicPath=null},[{key:`load`,value:function(){var e,t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),window._daily.instances[this._callClientId].publicPath=this._publicPath,void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Yl(n,function(e){var n=e.substring(0,e.lastIndexOf(`/`));n.length&&n.slice(-1)!==`/`&&(n+=`/`),t._publicPath=n,window._daily.instances[t._callClientId].publicPath=n,xr(Sr(e)),r(!1)},function(e,n){n||ql(t._callClientId),i(e,n)}),this._currentLoad.start()}},{key:`cancel`,value:function(){this._currentLoad&&this._currentLoad.cancel(),ql(this._callClientId)}},{key:`loaded`,get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),Yl=function(){return Vn(function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;Rn(this,e),this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._urls=function(e){if(Er(e))return[Tr(e)];var t=yr??Dr()??vr[0];return(t===vr[0]?vr:[t].concat(hr(vr.filter(function(e){return e!==t})))).map(function(t){return Tr(e,t)})}(t),this._networkTimeoutMs=Zl,this._passesRemaining=3,this._urlIndex=0,this._currentAttempt=null},[{key:`start`,value:function(){this._currentAttempt||this._startAttempt()}},{key:`_startAttempt`,value:function(){this._currentAttempt=new Ql(this._dailyConfig,this._urls[this._urlIndex],this._networkTimeoutMs,this._successCallback,this._retryOrFailureCallback.bind(this)),this._currentAttempt.start()}},{key:`_retryOrFailureCallback`,value:function(e){var t=this;if(!this._currentAttempt.cancelled){this._urlIndex++;var n=this._urlIndex<this._urls.length,r=this._passesRemaining>1,i=n||r;this._failureCallback(e,i),i&&(n?this._startAttempt():(this._passesRemaining--,this._urlIndex=0,setTimeout(function(){t._currentAttempt.cancelled||t._startAttempt()},3e3)))}}},{key:`cancel`,value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:`cancelled`,get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:`succeeded`,get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])}(),Xl=function(){function e(){return Rn(this,e),t=this,r=arguments,n=Un(n=e),Hn(t,Kl()?Reflect.construct(n,r||[],Un(t).constructor):n.apply(t,r));var t,n,r}return Gn(e,Gl(Error)),Vn(e)}(),Zl=2e4,Ql=function(){return Vn(function e(t,n,r,i,a){Rn(this,e),this._loadAttemptImpl=fl()||!t.avoidEval?new $l(t,n,r,i,a):new eu(t,n,r,i,a)},[{key:`start`,value:(e=L(function*(){return this._loadAttemptImpl.start()}),function(){return e.apply(this,arguments)})},{key:`cancel`,value:function(){this._loadAttemptImpl.cancel()}},{key:`cancelled`,get:function(){return this._loadAttemptImpl.cancelled}},{key:`succeeded`,get:function(){return this._loadAttemptImpl.succeeded}}]);var e}(),$l=function(){return Vn(function e(t,n,r,i,a){Rn(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._networkTimeoutMs=r,this._iosCache=typeof iOSCallObjectBundleCache<`u`&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._url=n,this._successCallback=i,this._failureCallback=a},[{key:`start`,value:(r=L(function*(){var e=this._url;!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)}),function(){return r.apply(this,arguments)})},{key:`cancel`,value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:`_tryLoadFromIOSCache`,value:(n=L(function*(e){if(!this._iosCache)return!1;try{var t=yield this._iosCache.get(e);return!!this.cancelled||!!t&&(t.code?(Function(`"use strict";`+t.code)(),this.succeeded=!0,this._successCallback(e),!0):(this._refetchHeaders=t.refetchHeaders,!1))}catch{return!1}}),function(e){return n.apply(this,arguments)})},{key:`_loadFromNetwork`,value:(t=L(function*(e){var t=this;this._networkTimeout=setTimeout(function(){t._networkTimedOut=!0,t._failureCallback({msg:`Timed out (>${t._networkTimeoutMs} ms) when loading call object bundle ${e}`,type:`timeout`})},this._networkTimeoutMs);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Xl;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new Xl;Function(`"use strict";`+i)(),this._iosCache&&this._iosCache.set(e,i,r.headers),this.succeeded=!0,this._successCallback(e)}catch(t){if(clearTimeout(this._networkTimeout),t instanceof Xl||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:`Failed to load call object bundle ${e}: ${t}`,type:t.message})}}),function(e){return t.apply(this,arguments)})},{key:`_getBundleCodeFromResponse`,value:(e=L(function*(e,t){if(t.ok)return yield t.text();if(this._iosCache&&t.status===304)return(yield this._iosCache.renew(e,t.headers)).code;throw Error(`Received ${t.status} response`)}),function(t,n){return e.apply(this,arguments)})}]);var e,t,n,r}(),eu=function(){return Vn(function e(t,n,r,i,a){Rn(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._url=n,this._networkTimeoutMs=r,this._successCallback=i,this._failureCallback=a,this._attemptId=gr(),this._networkTimeout=null,this._scriptElement=null},[{key:`start`,value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=this._url;(typeof document>`u`?`undefined`:I(document))===`object`?this._startLoading(e):this._failureCallback({msg:`Call object bundle must be loaded in a DOM/web context`,type:`missing context`})}},{key:`cancel`,value:function(){this._stopLoading(),this.cancelled=!0}},{key:`_startLoading`,value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout(function(){t._stopLoading(),t._failureCallback({msg:`Timed out (>${t._networkTimeoutMs} ms) when loading call object bundle ${e}`,type:`timeout`})},this._networkTimeoutMs);var n=document.getElementsByTagName(`head`)[0],r=document.createElement(`script`);this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback(e)},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:`Failed to load call object bundle ${e.target.src}`,type:e.message})},r.src=e,n.appendChild(r)}},{key:`_stopLoading`,value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:`_signUpForCallMachineLoadWaitlist`,value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:`_withdrawFromCallMachineLoadWaitlist`,value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])}(),tu=function(e,t,n){return!0===iu(e.local,t,n)},nu=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream[`get${n===`video`?`Video`:`Audio`}Tracks`]()[0]},ru=function(e,t,n,r){var i=au(e,t,n,r);return i&&i.pendingTrack},iu=function(e,t,n){if(!e)return!1;var r=function(e){switch(e){case`avatar`:return!0;case`staged`:return e;default:return!!e}},i=e.public.subscribedTracks;return i&&i[t]?[`cam-audio`,`cam-video`,`screen-video`,`screen-audio`,`rmpAudio`,`rmpVideo`].indexOf(n)===-1&&i[t].custom?[!0,`staged`].includes(i[t].custom)?r(i[t].custom):r(i[t].custom[n]):r(i[t][n]):!i||r(i.ALL)},au=function(e,t,n,r){var i=Object.values(e.streams||{}).filter(function(e){return e.participantId===t&&e.type===n&&e.pendingTrack&&e.pendingTrack.kind===r}).sort(function(e,t){return new Date(t.starttime)-new Date(e.starttime)});return i&&i[0]},ou=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function su(e,t){for(var n=t.getState(),r=0,i=[`cam`,`screen`];r<i.length;r++)for(var a=i[r],o=0,s=[`video`,`audio`];o<s.length;o++){var c=s[o],l=a===`cam`?c:`screen${c.charAt(0).toUpperCase()+c.slice(1)}`,u=e.tracks[l];if(u){var d=e.local?nu(n,a,c):ru(n,e.session_id,a,c);u.state===`playable`&&(u.track=d),u.persistentTrack=d}}}function cu(e,t){try{var n=t.getState();for(var r in e.tracks)if(!lu(r)){var i=e.tracks[r].kind;if(i){var a=e.tracks[r];if(a){var o=e.local?ou(n,r):ru(n,e.session_id,r,i);a.state===`playable`&&(e.tracks[r].track=o),a.persistentTrack=o}}else console.error(`unknown type for custom track`)}}catch(e){console.error(e)}}function lu(e){return[`video`,`audio`,`screenVideo`,`screenAudio`].includes(e)}function uu(e,t,n){var r=n.getState();if(e.local){if(e.audio)try{e.audioTrack=r.local.streams.cam.stream.getAudioTracks()[0],e.audioTrack||(e.audio=!1)}catch{}if(e.video)try{e.videoTrack=r.local.streams.cam.stream.getVideoTracks()[0],e.videoTrack||(e.video=!1)}catch{}if(e.screen)try{e.screenVideoTrack=r.local.streams.screen.stream.getVideoTracks()[0],e.screenAudioTrack=r.local.streams.screen.stream.getAudioTracks()[0],e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch{}}else{var i=!0;try{var a=r.participants[e.session_id];a&&a.public&&a.public.rtcType&&a.public.rtcType.impl===`peer-to-peer`&&a.private&&![`connected`,`completed`].includes(a.private.peeringState)&&(i=!1)}catch(e){console.error(e)}if(!i)return e.audio=!1,e.audioTrack=!1,e.video=!1,e.videoTrack=!1,e.screen=!1,void(e.screenTrack=!1);try{if(r.streams,e.audio&&tu(r,e.session_id,`cam-audio`)){var o=ru(r,e.session_id,`cam`,`audio`);o&&(t&&t.audioTrack&&t.audioTrack.id===o.id?e.audioTrack=o:o.muted||(e.audioTrack=o)),e.audioTrack||(e.audio=!1)}if(e.video&&tu(r,e.session_id,`cam-video`)){var s=ru(r,e.session_id,`cam`,`video`);s&&(t&&t.videoTrack&&t.videoTrack.id===s.id?e.videoTrack=s:s.muted||(e.videoTrack=s)),e.videoTrack||(e.video=!1)}if(e.screen&&tu(r,e.session_id,`screen-audio`)){var c=ru(r,e.session_id,`screen`,`audio`);c&&(t&&t.screenAudioTrack&&t.screenAudioTrack.id===c.id?e.screenAudioTrack=c:c.muted||(e.screenAudioTrack=c))}if(e.screen&&tu(r,e.session_id,`screen-video`)){var l=ru(r,e.session_id,`screen`,`video`);l&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===l.id?e.screenVideoTrack=l:l.muted||(e.screenVideoTrack=l))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){console.error(`unexpected error matching up tracks`,e)}}}function du(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return fu(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fu(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
6
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function fu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pu=new Map,mu=null;function hu(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return gu(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gu(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
7
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function gu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _u=new Map,vu=null;function yu(e){xu()?function(e){pu.has(e)||(pu.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){pu.has(e)&&(pu.get(e).lastDevicesString=JSON.stringify(t),mu||(mu=function(){var e=L(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=du(pu.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==pu.get(r).lastDevicesString&&(pu.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}});return function(){return e.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener(`devicechange`,mu)))}).catch(function(){}))}(e):function(e){_u.has(e)||(_u.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){_u.has(e)&&(_u.get(e).lastDevicesString=JSON.stringify(t),vu||=setInterval(L(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=hu(_u.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==_u.get(r).lastDevicesString&&(_u.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}),3e3))}))}(e)}function bu(e){xu()?function(e){pu.has(e)&&(pu.delete(e),pu.size===0&&mu&&(navigator.mediaDevices.removeEventListener(`devicechange`,mu),mu=null))}(e):function(e){_u.has(e)&&(_u.delete(e),_u.size===0&&vu&&(clearInterval(vu),vu=null))}(e)}function xu(){return fl()||navigator.mediaDevices?.ondevicechange!==void 0}var Su=new Set;function Cu(e,t){var n=t.isLocalScreenVideo;return e&&e.readyState===`live`&&!function(e,t){return(!t.isLocalScreenVideo||Tl()!==`Chrome`)&&e.muted&&!Su.has(e.id)}(e,{isLocalScreenVideo:n})}function wu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wu(Object(n),!0).forEach(function(t){Kn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Eu=Object.freeze({VIDEO:`video`,AUDIO:`audio`,SCREEN_VIDEO:`screenVideo`,SCREEN_AUDIO:`screenAudio`,CUSTOM_VIDEO:`customVideo`,CUSTOM_AUDIO:`customAudio`}),Du=Object.freeze({PARTICIPANTS:`participants`,STREAMING:`streaming`,TRANSCRIPTION:`transcription`}),Ou=Object.values(Eu),ku=[`v`,`a`,`sv`,`sa`,`cv`,`ca`];Object.freeze(Ou.reduce(function(e,t,n){return e[t]=ku[n],e},{})),Object.freeze(ku.reduce(function(e,t,n){return e[t]=Ou[n],e},{}));var Au=[Eu.VIDEO,Eu.AUDIO,Eu.SCREEN_VIDEO,Eu.SCREEN_AUDIO],ju=Object.values(Du),Mu=[`p`,`s`,`t`];Object.freeze(ju.reduce(function(e,t,n){return e[t]=Mu[n],e},{})),Object.freeze(Mu.reduce(function(e,t,n){return e[t]=ju[n],e},{}));var Nu=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;Rn(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return Vn(e,[{key:`clone`,value:function(){var t=new e;if(t.base=this.base instanceof Pu?this.base.clone():this.base,this.byUserId!==void 0)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof Pu?r.clone():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var a=this.byParticipantId[i];t.byParticipantId[i]=a instanceof Pu?a.clone():a}return t}},{key:`toJSONObject`,value:function(){var e={};if(typeof this.base==`boolean`?e.base=this.base:this.base instanceof Pu&&(e.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var t in e.byUserId={},this.byUserId){var n=this.byUserId[t];e.byUserId[t]=n instanceof Pu?n.toJSONObject():n}if(this.byParticipantId!==void 0)for(var r in e.byParticipantId={},this.byParticipantId){var i=this.byParticipantId[r];e.byParticipantId[r]=i instanceof Pu?i.toJSONObject():i}return e}},{key:`toMinifiedJSONObject`,value:function(){var e={};if(this.base!==void 0&&(e.b=typeof this.base==`boolean`?this.base:this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var t in e.u={},this.byUserId){var n=this.byUserId[t];e.u[t]=typeof n==`boolean`?n:n.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var r in e.p={},this.byParticipantId){var i=this.byParticipantId[r];e.p[r]=typeof i==`boolean`?i:i.toMinifiedJSONObject()}return e}},{key:`normalize`,value:function(){return this.base instanceof Pu&&(this.base=this.base.normalize()),this.byUserId&&=Object.fromEntries(Object.entries(this.byUserId).map(function(e){var t=Xn(e,2),n=t[0],r=t[1];return[n,r instanceof Pu?r.normalize():r]})),this.byParticipantId&&=Object.fromEntries(Object.entries(this.byParticipantId).map(function(e){var t=Xn(e,2),n=t[0],r=t[1];return[n,r instanceof Pu?r.normalize():r]})),this}}],[{key:`fromJSONObject`,value:function(t){var n,r,i;if(t.base!==void 0&&(n=typeof t.base==`boolean`?t.base:Pu.fromJSONObject(t.base)),t.byUserId!==void 0)for(var a in r={},t.byUserId){var o=t.byUserId[a];r[a]=typeof o==`boolean`?o:Pu.fromJSONObject(o)}if(t.byParticipantId!==void 0)for(var s in i={},t.byParticipantId){var c=t.byParticipantId[s];i[s]=typeof c==`boolean`?c:Pu.fromJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:`fromMinifiedJSONObject`,value:function(t){var n,r,i;if(t.b!==void 0&&(n=typeof t.b==`boolean`?t.b:Pu.fromMinifiedJSONObject(t.b)),t.u!==void 0)for(var a in r={},t.u){var o=t.u[a];r[a]=typeof o==`boolean`?o:Pu.fromMinifiedJSONObject(o)}if(t.p!==void 0)for(var s in i={},t.p){var c=t.p[s];i[s]=typeof c==`boolean`?c:Pu.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:`validateJSONObject`,value:function(e){if(I(e)!==`object`)return[!1,`canReceive must be an object`];for(var t=[`base`,`byUserId`,`byParticipantId`],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return[!1,`canReceive can only contain keys (${t.join(`, `)})`];if(i===`base`){var a=Xn(Pu.validateJSONObject(e.base,!0),2),o=a[0],s=a[1];if(!o)return[!1,s]}else{if(I(e[i])!==`object`)return[!1,`invalid (non-object) value for field '${i}' in canReceive`];for(var c=0,l=Object.values(e[i]);c<l.length;c++){var u=l[c],d=Xn(Pu.validateJSONObject(u),2),f=d[0],p=d[1];if(!f)return[!1,p]}}}return[!0]}}])}(),Pu=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.video,r=t.audio,i=t.screenVideo,a=t.screenAudio,o=t.customVideo,s=t.customAudio;Rn(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=a,this.customVideo=o,this.customAudio=s}return Vn(e,[{key:`clone`,value:function(){var t=new e;return this.video!==void 0&&(t.video=this.video),this.audio!==void 0&&(t.audio=this.audio),this.screenVideo!==void 0&&(t.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(t.screenAudio=this.screenAudio),this.customVideo!==void 0&&(t.customVideo=Tu({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=Tu({},this.customAudio)),t}},{key:`toJSONObject`,value:function(){var e={};return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=Tu({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=Tu({},this.customAudio)),e}},{key:`toMinifiedJSONObject`,value:function(){var e={};return this.video!==void 0&&(e.v=this.video),this.audio!==void 0&&(e.a=this.audio),this.screenVideo!==void 0&&(e.sv=this.screenVideo),this.screenAudio!==void 0&&(e.sa=this.screenAudio),this.customVideo!==void 0&&(e.cv=Tu({},this.customVideo)),this.customAudio!==void 0&&(e.ca=Tu({},this.customAudio)),e}},{key:`normalize`,value:function(){function e(e,t){return e&&Object.keys(e).length===1&&e[`*`]===t}return!(!0!==this.video||!0!==this.audio||!0!==this.screenVideo||!0!==this.screenAudio||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(!1!==this.video||!1!==this.audio||!1!==this.screenVideo||!1!==this.screenAudio||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:`fromBoolean`,value:function(t){return new e({video:t,audio:t,screenVideo:t,screenAudio:t,customVideo:{"*":t},customAudio:{"*":t}})}},{key:`fromJSONObject`,value:function(t){return new e({video:t.video,audio:t.audio,screenVideo:t.screenVideo,screenAudio:t.screenAudio,customVideo:t.customVideo===void 0?void 0:Tu({},t.customVideo),customAudio:t.customAudio===void 0?void 0:Tu({},t.customAudio)})}},{key:`fromMinifiedJSONObject`,value:function(t){return new e({video:t.v,audio:t.a,screenVideo:t.sv,screenAudio:t.sa,customVideo:t.cv,customAudio:t.ca})}},{key:`validateJSONObject`,value:function(e,t){if(typeof e==`boolean`)return[!0];if(I(e)!==`object`)return[!1,`invalid (non-object, non-boolean) value in canReceive`];for(var n=Object.keys(e),r=0,i=n;r<i.length;r++){var a=i[r];if(!Ou.includes(a))return[!1,`invalid media type '${a}' in canReceive`];if(Au.includes(a)){if(typeof e[a]!=`boolean`)return[!1,`invalid (non-boolean) value for media type '${a}' in canReceive`]}else{if(I(e[a])!==`object`)return[!1,`invalid (non-object) value for media type '${a}' in canReceive`];for(var o=0,s=Object.values(e[a]);o<s.length;o++)if(typeof s[o]!=`boolean`)return[!1,`invalid (non-boolean) value for entry within '${a}' in canReceive`];if(t&&e[a][`*`]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '${a}'`]}}return t&&n.length!==Ou.length?[!1,`canReceive "base" permission must specify all media types: ${Ou.join(`, `)} (or be set to a boolean shorthand)`]:[!0]}}])}(),Fu=[`result`],Iu=[`preserveIframe`];function Lu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Lu(Object(n),!0).forEach(function(t){Kn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ru(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ru=function(){return!!e})()}function zu(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Bu(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bu(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
8
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Bu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Vu={},Hu=`video`,Uu=`voice`,Wu=fl()?{data:{}}:{data:{},topology:`none`},Gu={present:0,hidden:0},Ku={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},qu=Object.keys(Ku),Ju=[`state`,`volume`,`simulcastEncodings`],Yu={androidInCallNotification:{title:`string`,subtitle:`string`,iconName:`string`,disableForCustomOverride:`boolean`},disableAutoDeviceManagement:{audio:`boolean`,video:`boolean`}},Xu={id:{iconPath:`string`,iconPathDarkMode:`string`,label:`string`,tooltip:`string`,visualState:`'default' | 'sidebar-open' | 'active'`}},Zu={id:{allow:`string`,controlledBy:`'*' | 'owners' | string[]`,csp:`string`,iconURL:`string`,label:`string`,loading:`'eager' | 'lazy'`,location:`'main' | 'sidebar'`,name:`string`,referrerPolicy:`string`,sandbox:`string`,src:`string`,srcdoc:`string`,shared:`string[] | 'owners' | boolean`}},Qu=/^[a-zA-Z0-9_-]+$/;function $u(e){if(e!=null&&I(e)===`object`&&!Array.isArray(e)){var t,n={},r=zu(Object.entries(e).slice(0,10));try{for(r.s();!(t=r.n()).done;){var i=Xn(t.value,2),a=i[0],o=i[1];typeof a!=`string`||a.length>64||Qu.test(a)&&typeof o==`string`&&(n[a]=o.slice(0,256))}}catch(e){r.e(e)}finally{r.f()}return Object.keys(n).length?n:void 0}}var ed={customIntegrations:{validate:Td,help:Cd()},customTrayButtons:{validate:wd,help:`customTrayButtons should be a dictionary of the type ${JSON.stringify(Xu)}`},url:{validate:function(e){return typeof e==`string`},help:`url should be a string`},baseUrl:{validate:function(e){return console.warn(`baseUrl is deprecated and has no effect`),typeof e==`string`},help:`baseUrl should be a string`},token:{validate:function(e){return typeof e==`string`},help:`token should be a string`,queryString:`t`},dailyConfig:{validate:function(e,t){try{return t.validateDailyConfig(e),!0}catch(e){console.error(`Failed to validate dailyConfig`,e)}return!1},help:`Unsupported dailyConfig. Check error logs for detailed info.`},reactNativeConfig:{validate:function(e){return Ed(e,Yu)},help:`reactNativeConfig should look like ${JSON.stringify(Yu)}, all fields optional`},lang:{validate:function(e){return[`cs`,`da`,`de`,`en-us`,`en`,`es`,`fi`,`fr`,`it`,`jp`,`ka`,`nl`,`no`,`pl`,`pt`,`pt-BR`,`ru`,`sk`,`sv`,`tr`,`user`].includes(e)},help:`language not supported. Options are: cs, da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sk, sv, tr, user`},userName:!0,userData:{validate:function(e){try{return md(e),!0}catch(e){return console.error(e),!1}},help:`invalid userData type provided`},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){if(typeof e==`boolean`)return t._preloadCache.allowLocalVideo=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.videoTrack=e,n={customTrack:tl};else{if(delete t._sharedTracks.videoTrack,typeof e!=`string`)return console.error(`videoSource must be a MediaStreamTrack, boolean, or a string`),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({video:{settings:n}},!1),!0}},audioSource:{validate:function(e,t){if(typeof e==`boolean`)return t._preloadCache.allowLocalAudio=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.audioTrack=e,n={customTrack:tl};else{if(delete t._sharedTracks.audioTrack,typeof e!=`string`)return console.error(`audioSource must be a MediaStreamTrack, boolean, or a string`),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({audio:{settings:n}},!1),!0}},subscribeToTracksAutomatically:{validate:function(e,t){return t._preloadCache.subscribeToTracksAutomatically=e,!0}},theme:{validate:function(e){var t=[`accent`,`accentText`,`background`,`backgroundAccent`,`baseText`,`border`,`mainAreaBg`,`mainAreaBgAccent`,`mainAreaText`,`supportiveText`],n=function(e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return console.error(`unsupported color "${i}". Valid colors: ${t.join(`, `)}`),!1;if(!e[i].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error(`${i} theme color should be provided in valid hex color format. Received: "${e[i]}"`),!1}return!0};return I(e)===`object`&&(`light`in e&&`dark`in e||`colors`in e)?`light`in e&&`dark`in e?`colors`in e.light?`colors`in e.dark?n(e.light.colors)&&n(e.dark.colors):(console.error(`Dark theme is missing "colors" property.`,e),!1):(console.error(`Light theme is missing "colors" property.`,e),!1):n(e.colors):(console.error(`Theme must contain either both "light" and "dark" properties, or "colors".`,e),!1)},help:`unsupported theme configuration. Check error logs for detailed info.`},layoutConfig:{validate:function(e){if(`grid`in e){var t=e.grid;if(`maxTilesPerPage`in t){if(!Number.isInteger(t.maxTilesPerPage))return console.error(`grid.maxTilesPerPage should be an integer. You passed ${t.maxTilesPerPage}.`),!1;if(t.maxTilesPerPage>49)return console.error(`grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case.`),!1}if(`minTilesPerPage`in t){if(!Number.isInteger(t.minTilesPerPage))return console.error(`grid.minTilesPerPage should be an integer. You passed ${t.minTilesPerPage}.`),!1;if(t.minTilesPerPage<1)return console.error(`grid.minTilesPerPage can't be lower than 1.`),!1;if(`maxTilesPerPage`in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error(`grid.minTilesPerPage can't be higher than grid.maxTilesPerPage.`),!1}}return!0},help:`unsupported layoutConfig. Check error logs for detailed info.`},receiveSettings:{validate:function(e){return hd(e,{allowAllParticipantsKey:!1})},help:Sd({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error(`Failed to validate send settings`,e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:`Invalid sendSettings provided. Check error logs for detailed info.`},inputSettings:{validate:function(e,t){return!!gd(e)&&(t._inputSettings||={},_d(e,t.properties?.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:xd()},layout:{validate:function(e){return e===`custom-v1`||e===`browser`||e===`none`},help:`layout may only be set to "custom-v1"`,queryString:`layout`},emb:{queryString:`emb`},embHref:{queryString:`embHref`},dailyJsVersion:{queryString:`dailyJsVersion`},aboutClient:{validate:function(e){if(e==null)return!0;if(I(e)!==`object`||Array.isArray(e))return!1;var t=Object.entries(e);if(t.length>10)return!1;for(var n=0,r=t;n<r.length;n++){var i=Xn(r[n],2),a=i[0],o=i[1];if(typeof a!=`string`||a.length>64||!Qu.test(a)||typeof o!=`string`||o.length>256)return!1}return!0},help:`aboutClient must be an object with up to 10 entries; keys must be strings made up of characters (a-z, 0-9, _, -) and a max length of 64; values must be strings with a max length of 256`},proxy:{queryString:`proxy`},strictMode:!0,allowMultipleCallInstances:!0},td={styles:{validate:function(e){for(var t in e)if(t!==`cam`&&t!==`screen`)return!1;if(e.cam){for(var n in e.cam)if(n!==`div`&&n!==`video`)return!1}if(e.screen){for(var r in e.screen)if(r!==`div`&&r!==`video`)return!1}return!0},help:`styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }`},setSubscribedTracks:{validate:function(e,t){if(t._preloadCache.subscribeToTracksAutomatically)return!1;var n=[!0,!1,`staged`];if(n.includes(e)||!fl()&&e===`avatar`)return!0;var r=[`audio`,`video`,`screenAudio`,`screenVideo`,`rmpAudio`,`rmpVideo`],i=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var a in e)if(a===`custom`){if(!n.includes(e[a])&&!i(e[a],!0))return!1}else{var o=!t&&!r.includes(a),s=!n.includes(e[a]);if(o||s)return!1}return!0};return i(e)},help:`setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: true${fl()?``:` | 'avatar'`} | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }`},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return!1===e},help:`setScreenShare must be false, as it's only meant for stopping remote participants' screen shares`},eject:!0,updatePermissions:{validate:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Xn(n[t],2),i=r[0],a=r[1];switch(i){case`hasPresence`:if(typeof a!=`boolean`)return!1;break;case`canSend`:if(a instanceof Set||a instanceof Array||Array.isArray(a)){var o,s=[`video`,`audio`,`screenVideo`,`screenAudio`,`customVideo`,`customAudio`],c=zu(a);try{for(c.s();!(o=c.n()).done;){var l=o.value;if(!s.includes(l))return!1}}catch(e){c.e(e)}finally{c.f()}}else if(typeof a!=`boolean`)return!1;(a instanceof Array||Array.isArray(a))&&(e.canSend=new Set(a));break;case`canReceive`:var u=Xn(Nu.validateJSONObject(a),2),d=u[0],f=u[1];if(!d)return console.error(f),!1;break;case`canAdmin`:if(a instanceof Set||a instanceof Array||Array.isArray(a)){var p,m=[`participants`,`streaming`,`transcription`],h=zu(a);try{for(h.s();!(p=h.n()).done;){var g=p.value;if(!m.includes(g))return!1}}catch(e){h.e(e)}finally{h.f()}}else if(typeof a!=`boolean`)return!1;(a instanceof Array||Array.isArray(a))&&(e.canAdmin=new Set(a));break;default:return!1}}return!0},help:`updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription).`}};Promise.any||(Promise.any=function(){var e=L(function*(e){return new Promise(function(t,n){var r=[];e.forEach(function(i){return Promise.resolve(i).then(function(e){t(e)}).catch(function(t){r.push(t),r.length===e.length&&n(r)})})})});return function(t){return e.apply(this,arguments)}}());var nd=function(){function e(t){var n,r,i,a,o,s,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Rn(this,e),i=this,a=Un(a=e),Kn(r=Hn(i,Ru()?Reflect.construct(a,o||[],Un(i).constructor):a.apply(i,o)),`startListeningForDeviceChanges`,function(){yu(r.handleDeviceChange)}),Kn(r,`stopListeningForDeviceChanges`,function(){bu(r.handleDeviceChange)}),Kn(r,`handleDeviceChange`,function(e){e=e.map(function(e){return JSON.parse(JSON.stringify(e))}),r.emitDailyJSEvent({action:`available-devices-updated`,availableDevices:e})}),Kn(r,`handleNativeAppStateChange`,function(){var e=L(function*(e){if(e===`destroyed`)return console.warn(`App has been destroyed before leaving the meeting. Cleaning up all the resources!`),void(yield r.destroy());var t=e===`active`;r.disableReactNativeAutoDeviceManagement(`video`)||(t?r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!0):(r.camUnmutedBeforeLosingNativeActiveState=r.localVideo(),r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!1)))});return function(t){return e.apply(this,arguments)}}()),Kn(r,`handleNativeAudioFocusChange`,function(e){r.disableReactNativeAutoDeviceManagement(`audio`)||(r._hasNativeAudioFocus=e,r.toggleParticipantAudioBasedOnNativeAudioFocus(),r._hasNativeAudioFocus?r.micUnmutedBeforeLosingNativeAudioFocus&&r.setLocalAudio(!0):(r.micUnmutedBeforeLosingNativeAudioFocus=r.localAudio(),r.setLocalAudio(!1)))}),Kn(r,`handleNativeSystemScreenCaptureStop`,function(){r.stopScreenShare()}),!Sl()&&!fl())throw Error(`WebRTC not supported or suppressed`);if(r.strictMode=c.strictMode===void 0||c.strictMode,r.allowMultipleCallInstances=(n=c.allowMultipleCallInstances)!=null&&n,Object.keys(Vu).length&&(r._logDuplicateInstanceAttempt(),!r.allowMultipleCallInstances)){if(r.strictMode)throw Error(`Duplicate DailyIframe instances are not allowed`);console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),r.callClientId=gr(),Vu[(s=r).callClientId]=s,window._daily.instances[r.callClientId]={},r._sharedTracks={},window._daily.instances[r.callClientId].tracks=r._sharedTracks,c.dailyJsVersion=e.version(),c.aboutClient!==void 0&&(c.aboutClient=$u(c.aboutClient)),r._iframe=t,r._callObjectMode=c.layout===`none`&&!r._iframe,r._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},c.showLocalVideo===void 0?r._showLocalVideo=!0:r._callObjectMode?console.error(`showLocalVideo is not available in call object mode`):r._showLocalVideo=!!c.showLocalVideo,c.showParticipantsBar===void 0?r._showParticipantsBar=!0:r._callObjectMode?console.error(`showParticipantsBar is not available in call object mode`):r._showParticipantsBar=!!c.showParticipantsBar,c.customIntegrations===void 0?r._customIntegrations={}:r._callObjectMode?console.error(`customIntegrations is not available in call object mode`):r._customIntegrations=c.customIntegrations,c.customTrayButtons===void 0?r._customTrayButtons={}:r._callObjectMode?console.error(`customTrayButtons is not available in call object mode`):r._customTrayButtons=c.customTrayButtons,c.activeSpeakerMode===void 0?r._activeSpeakerMode=!1:r._callObjectMode?console.error(`activeSpeakerMode is not available in call object mode`):r._activeSpeakerMode=!!c.activeSpeakerMode,c.receiveSettings?r._callObjectMode?r._receiveSettings=c.receiveSettings:console.error(`receiveSettings is only available in call object mode`):r._receiveSettings={},r.validateProperties(c),r.properties=H({},c),r.properties.aboutClient!==void 0&&(r.properties.aboutClient=$u(r.properties.aboutClient)),r._inputSettings||(r._inputSettings={}),r._callObjectLoader=r._callObjectMode?new Jl(r.callClientId):null,r._callState=`new`,r._isPreparingToJoin=!1,r._accessState={access:`unknown`},r._meetingSessionSummary={},r._finalSummaryOfPrevSession={},r._meetingSessionState=Ad(Wu,r._callObjectMode),r._nativeInCallAudioMode=Hu,r._participants={},r._isScreenSharing=!1,r._participantCounts=Gu,r._rmpPlayerState={},r._waitingParticipants={},r._network={threshold:`good`,quality:100,networkState:`unknown`,stats:{}},r._activeSpeaker={},r._localAudioLevel=0,r._isLocalAudioLevelObserverRunning=!1,r._remoteParticipantsAudioLevel={},r._isRemoteParticipantsAudioLevelObserverRunning=!1,r._maxAppMessageSize=Yc,r._messageChannel=fl()?new zl:new Il,r._iframe&&(r._iframe.requestFullscreen?r._iframe.addEventListener(`fullscreenchange`,function(){document.fullscreenElement===r._iframe?(r.emitDailyJSEvent({action:`fullscreen`}),r.sendMessageToCallMachine({action:`fullscreen`})):(r.emitDailyJSEvent({action:`exited-fullscreen`}),r.sendMessageToCallMachine({action:`exited-fullscreen`}))}):r._iframe.webkitRequestFullscreen&&r._iframe.addEventListener(`webkitfullscreenchange`,function(){document.webkitFullscreenElement===r._iframe?(r.emitDailyJSEvent({action:`fullscreen`}),r.sendMessageToCallMachine({action:`fullscreen`})):(r.emitDailyJSEvent({action:`exited-fullscreen`}),r.sendMessageToCallMachine({action:`exited-fullscreen`}))})),fl()){var l=r.nativeUtils();l.addAudioFocusChangeListener&&l.removeAudioFocusChangeListener&&l.addAppStateChangeListener&&l.removeAppStateChangeListener&&l.addSystemScreenCaptureStopListener&&l.removeSystemScreenCaptureStopListener||console.warn(`expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native`),r._hasNativeAudioFocus=!0,l.addAudioFocusChangeListener(r.handleNativeAudioFocusChange),l.addAppStateChangeListener(r.handleNativeAppStateChange),l.addSystemScreenCaptureStopListener(r.handleNativeSystemScreenCaptureStop)}return r._callObjectMode&&r.startListeningForDeviceChanges(),r._messageChannel.addListenerForMessagesFromCallMachine(r.handleMessageFromCallMachine,r.callClientId,r),r}return Gn(e,tr),Vn(e,[{key:`destroy`,value:(de=L(function*(){var e;try{yield this.leave()}catch{}var t=this._iframe;if(t){var n=t.parentElement;n&&n.removeChild(t)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),fl()){var r=this.nativeUtils();r.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),r.removeAppStateChangeListener(this.handleNativeAppStateChange),r.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:`call-instance-destroyed`}),delete Vu[this.callClientId],(e=window)!=null&&(e=e._daily)!=null&&e.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)}),function(){return de.apply(this,arguments)})},{key:`isDestroyed`,value:function(){return!!this._destroyed}},{key:`loadCss`,value:function(e){var t=e.bodyClass,n=e.cssFile,r=e.cssText;return fd(),this.sendMessageToCallMachine({action:`load-css`,cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:`iframe`,value:function(){return fd(),this._iframe}},{key:`meetingState`,value:function(){return this._callState}},{key:`accessState`,value:function(){return ud(this._callObjectMode,`accessState()`),this._accessState}},{key:`participants`,value:function(){return this._participants}},{key:`participantCounts`,value:function(){return this._participantCounts}},{key:`waitingParticipants`,value:function(){return ud(this._callObjectMode,`waitingParticipants()`),this._waitingParticipants}},{key:`validateParticipantProperties`,value:function(e,t){for(var n in t){if(!td[n])throw Error(`unrecognized updateParticipant property ${n}`);if(td[n].validate&&!td[n].validate(t[n],this,this._participants[e]))throw Error(td[n].help)}}},{key:`updateParticipant`,value:function(e,t){return this._participants.local&&this._participants.local.session_id===e&&(e=`local`),e&&t&&(this.validateParticipantProperties(e,t),this.sendMessageToCallMachine({action:`update-participant`,id:e,properties:t})),this}},{key:`updateParticipants`,value:function(e){var t=this._participants.local&&this._participants.local.session_id;for(var n in e)n===t&&(n=`local`),n&&e[n]&&this.validateParticipantProperties(n,e[n]);return this.sendMessageToCallMachine({action:`update-participants`,participants:e}),this}},{key:`updateWaitingParticipant`,value:(ue=L(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(ud(this._callObjectMode,`updateWaitingParticipant()`),ad(this._callState,`updateWaitingParticipant()`),typeof t!=`string`||I(n)!==`object`)throw Error(`updateWaitingParticipant() must take an id string and a updates object`);return new Promise(function(r,i){e.sendMessageToCallMachine({action:`daily-method-update-waiting-participant`,id:t,updates:n},function(e){e.error&&i(e.error),e.id||i(Error(`unknown error in updateWaitingParticipant()`)),r({id:e.id})})})}),function(){return ue.apply(this,arguments)})},{key:`updateWaitingParticipants`,value:(le=L(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ud(this._callObjectMode,`updateWaitingParticipants()`),ad(this._callState,`updateWaitingParticipants()`),I(t)!==`object`)throw Error(`updateWaitingParticipants() must take a mapping between ids and update objects`);return new Promise(function(n,r){e.sendMessageToCallMachine({action:`daily-method-update-waiting-participants`,updatesById:t},function(e){e.error&&r(e.error),e.ids||r(Error(`unknown error in updateWaitingParticipants()`)),n({ids:e.ids})})})}),function(){return le.apply(this,arguments)})},{key:`requestAccess`,value:(D=L(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.access,r=n===void 0?{level:Ys}:n,i=t.name,a=i===void 0?``:i;return ud(this._callObjectMode,`requestAccess()`),ad(this._callState,`requestAccess()`),new Promise(function(t,n){e.sendMessageToCallMachine({action:`daily-method-request-access`,access:r,name:a},function(e){e.error&&n(e.error),e.access||n(Error(`unknown error in requestAccess()`)),t({access:e.access,granted:e.granted})})})}),function(){return D.apply(this,arguments)})},{key:`localAudio`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.audio.state):null}},{key:`localVideo`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.video.state):null}},{key:`setLocalAudio`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return`forceDiscardTrack`in t&&(fl()?(console.warn(`forceDiscardTrack option not supported in React Native; ignoring`),t={}):e&&(console.warn(`forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring`),t={})),this.sendMessageToCallMachine({action:`local-audio`,state:e,options:t}),this}},{key:`localScreenAudio`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.screenAudio.state):null}},{key:`localScreenVideo`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.screenVideo.state):null}},{key:`updateScreenShare`,value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:`local-screen-update`,options:e}),this;console.warn(`There is no screen share in progress. Try calling startScreenShare first.`)}},{key:`setLocalVideo`,value:function(e){return this.sendMessageToCallMachine({action:`local-video`,state:e}),this}},{key:`_setAllowLocalAudio`,value:function(e){if(this._preloadCache.allowLocalAudio=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-allow-local-audio`,state:e}),this}},{key:`_setAllowLocalVideo`,value:function(e){if(this._preloadCache.allowLocalVideo=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-allow-local-video`,state:e}),this}},{key:`getReceiveSettings`,value:(ce=L(function*(e){var t=this,n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,r=n!==void 0&&n;if(ud(this._callObjectMode,`getReceiveSettings()`),!this._callMachineInitialized)return this._receiveSettings;switch(I(e)){case`string`:return new Promise(function(n){t.sendMessageToCallMachine({action:`get-single-participant-receive-settings`,id:e,showInheritedValues:r},function(e){n(e.receiveSettings)})});case`undefined`:return this._receiveSettings;default:throw Error(`first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments`)}}),function(e){return ce.apply(this,arguments)})},{key:`updateReceiveSettings`,value:(se=L(function*(e){var t=this;if(ud(this._callObjectMode,`updateReceiveSettings()`),!hd(e,{allowAllParticipantsKey:!0}))throw Error(Sd({allowAllParticipantsKey:!0}));return ad(this._callState,`updateReceiveSettings()`,`To specify receive settings earlier, use the receiveSettings config property.`),new Promise(function(n){t.sendMessageToCallMachine({action:`update-receive-settings`,receiveSettings:e},function(e){n({receiveSettings:e.receiveSettings})})})}),function(e){return se.apply(this,arguments)})},{key:`_prepInputSettingsForSharing`,value:function(e,t){if(e){var n={};if(e.audio){var r;e.audio.settings&&(!Object.keys(e.audio.settings).length&&t||(n.audio={settings:H({},e.audio.settings)})),t&&(r=n.audio)!=null&&(r=r.settings)!=null&&r.customTrack&&(n.audio.settings={customTrack:this._sharedTracks.audioTrack});var i=e.audio.processor?.type===`none`&&e.audio.processor?._isDefaultWhenNone;if(e.audio.processor&&!i){var a=H({},e.audio.processor);delete a._isDefaultWhenNone,n.audio=H(H({},n.audio),{},{processor:a})}}if(e.video){var o;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:H({},e.video.settings)})),t&&(o=n.video)!=null&&(o=o.settings)!=null&&o.customTrack&&(n.video.settings={customTrack:this._sharedTracks.videoTrack});var s=e.video.processor?.type===`none`&&e.video.processor?._isDefaultWhenNone;if(e.video.processor&&!s){var c=H({},e.video.processor);delete c._isDefaultWhenNone,n.video=H(H({},n.video),{},{processor:c})}}return n}}},{key:`getInputSettings`,value:function(){var e=this;return fd(),new Promise(function(t){t(e._getInputSettings())})}},{key:`_getInputSettings`,value:function(){var e,t,n,r,i={processor:{type:`none`,_isDefaultWhenNone:!0}};this._inputSettings?(e=this._inputSettings?.video||i,t=this._inputSettings?.audio||i):(e=((n=this._preloadCache)==null||(n=n.inputSettings)==null?void 0:n.video)||i,t=((r=this._preloadCache)==null||(r=r.inputSettings)==null?void 0:r.audio)||i);var a={audio:t,video:e};return this._prepInputSettingsForSharing(a,!0)}},{key:`_updatePreloadCacheInputSettings`,value:function(e,t){var n=this._inputSettings||{},r={};if(e.video){var i,a,o;r.video={},e.video.settings?(r.video.settings={},t||e.video.settings.customTrack||(o=n.video)==null||!o.settings?r.video.settings=e.video.settings:r.video.settings=H(H({},n.video.settings),e.video.settings),Object.keys(r.video.settings).length||delete r.video.settings):(i=n.video)!=null&&i.settings&&(r.video.settings=n.video.settings),e.video.processor?r.video.processor=e.video.processor:(a=n.video)!=null&&a.processor&&(r.video.processor=n.video.processor)}else n.video&&(r.video=n.video);if(e.audio){var s,c,l;r.audio={},e.audio.settings?(r.audio.settings={},t||e.audio.settings.customTrack||(l=n.audio)==null||!l.settings?r.audio.settings=e.audio.settings:r.audio.settings=H(H({},n.audio.settings),e.audio.settings),Object.keys(r.audio.settings).length||delete r.audio.settings):(s=n.audio)!=null&&s.settings&&(r.audio.settings=n.audio.settings),e.audio.processor?r.audio.processor=e.audio.processor:(c=n.audio)!=null&&c.processor&&(r.audio.processor=n.audio.processor)}else n.audio&&(r.audio=n.audio);this._maybeUpdateInputSettings(r)}},{key:`_devicesFromInputSettings`,value:function(e){var t,n,r=(e==null||(t=e.video)==null||(t=t.settings)==null?void 0:t.deviceId)||null,i=(e==null||(n=e.audio)==null||(n=n.settings)==null?void 0:n.deviceId)||null,a=this._preloadCache.outputDeviceId||null;return{camera:r?{deviceId:r}:{},mic:i?{deviceId:i}:{},speaker:a?{deviceId:a}:{}}}},{key:`updateInputSettings`,value:(oe=L(function*(e){var t=this;return fd(),gd(e)?e.video||e.audio?(_d(e,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(e,!0),this._getInputSettings()):new Promise(function(n,r){t.sendMessageToCallMachine({action:`update-input-settings`,inputSettings:e},function(i){if(i.error)r(i.error);else{if(i.returnPreloadCache)return t._updatePreloadCacheInputSettings(e,!0),void n(t._getInputSettings());t._maybeUpdateInputSettings(i.inputSettings),n(t._prepInputSettingsForSharing(i.inputSettings,!0))}})})):this._getInputSettings():(console.error(xd()),Promise.reject(xd()))}),function(e){return oe.apply(this,arguments)})},{key:`setBandwidth`,value:function(e){var t=e.kbs,n=e.trackConstraints;if(fd(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-bandwidth`,kbs:t,trackConstraints:n}),this}},{key:`getDailyLang`,value:function(){var e=this;if(fd(),this._callMachineInitialized)return new Promise(function(t){e.sendMessageToCallMachine({action:`get-daily-lang`},function(e){delete e.action,delete e.callbackStamp,t(e)})})}},{key:`setDailyLang`,value:function(e){return fd(),this.sendMessageToCallMachine({action:`set-daily-lang`,lang:e}),this}},{key:`setProxyUrl`,value:function(e){return this.sendMessageToCallMachine({action:`set-proxy-url`,proxyUrl:e}),this}},{key:`setIceConfig`,value:function(e){return this.sendMessageToCallMachine({action:`set-ice-config`,iceConfig:e}),this}},{key:`meetingSessionSummary`,value:function(){return[`left-meeting`,`error`].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:`getMeetingSession`,value:(ae=L(function*(){var e=this;return console.warn(`getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately`),ad(this._callState,`getMeetingSession()`),new Promise(function(t){e.sendMessageToCallMachine({action:`get-meeting-session`},function(e){delete e.action,delete e.callbackStamp,t(e)})})}),function(){return ae.apply(this,arguments)})},{key:`meetingSessionState`,value:function(){return ad(this._callState,`meetingSessionState`),this._meetingSessionState}},{key:`setMeetingSessionData`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`replace`;ud(this._callObjectMode,`setMeetingSessionData()`),ad(this._callState,`setMeetingSessionData`);try{(function(e,t){new Ul({data:e,mergeStrategy:t})})(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:`set-session-data`,data:e,mergeStrategy:t})}catch(e){throw Error(`Error setting meeting session data: ${e}`)}}},{key:`setUserName`,value:function(e,t){var n=this;return this.properties.userName=e,new Promise(function(r){n.sendMessageToCallMachine({action:`set-user-name`,name:e??``,thisMeetingOnly:fl()||!!t&&!!t.thisMeetingOnly},function(e){delete e.action,delete e.callbackStamp,r(e)})})}},{key:`setUserData`,value:(ie=L(function*(e){var t=this;try{md(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise(function(n){try{t.sendMessageToCallMachine({action:`set-user-data`,userData:e},function(e){delete e.action,delete e.callbackStamp,n(e)})}catch(e){throw Error(`Error setting user data: ${e}`)}})}),function(e){return ie.apply(this,arguments)})},{key:`validateAudioLevelInterval`,value:function(e){if(e&&(e<100||typeof e!=`number`))throw Error(`The interval must be a number greater than or equal to 100 milliseconds.`)}},{key:`startLocalAudioLevelObserver`,value:function(e){var t=this;if(typeof AudioWorkletNode>`u`&&!fl())throw Error(`startLocalAudioLevelObserver() is not supported on this browser`);if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise(function(n,r){t.sendMessageToCallMachine({action:`start-local-audio-level-observer`,interval:e},function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()})});this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:`isLocalAudioLevelObserverRunning`,value:function(){return this._isLocalAudioLevelObserverRunning}},{key:`stopLocalAudioLevelObserver`,value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:`stop-local-audio-level-observer`})}},{key:`startRemoteParticipantsAudioLevelObserver`,value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise(function(n,r){t.sendMessageToCallMachine({action:`start-remote-participants-audio-level-observer`,interval:e},function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()})});this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:`isRemoteParticipantsAudioLevelObserverRunning`,value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:`stopRemoteParticipantsAudioLevelObserver`,value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:`stop-remote-participants-audio-level-observer`})}},{key:`startCamera`,value:(re=L(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ud(this._callObjectMode,`startCamera()`),sd(this._callState,this._isPreparingToJoin,`startCamera()`,`Did you mean to use setLocalAudio() and/or setLocalVideo() instead?`),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error(`url in startCamera() is different than the one used in preAuth()`),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(`token in startCamera() is different than the one used in preAuth()`),Promise.reject()}this.validateProperties(t),this.properties=H(H({},this.properties),t)}return new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`start-camera`,properties:id(e.properties,e.callClientId),preloadCache:id(e._preloadCache,e.callClientId)},function(e){e.error?n(e.error):t({camera:e.camera,mic:e.mic,speaker:e.speaker})})})}),function(){return re.apply(this,arguments)})},{key:`validateCustomTrack`,value:function(e,t,n){if(n&&n.length>50)throw Error("Custom track `trackName` must not be more than 50 characters");if(t&&t!==`music`&&t!==`speech`&&!(t instanceof Object))throw Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(n&&[`audio`,`video`,`cam-audio`,`cam-video`,`screenVideo`,`screenAudio`,`screen-video`,`screen-audio`,`rmpAudio`,`rmpVideo`,`customVideoDefaults`].includes(n))throw Error("Custom track `trackName` must not match a track name already used by daily: audio, video, cam-audio, cam-video, screenVideo, screenAudio, screen-video, screen-audio, rmpAudio, rmpVideo, customVideoDefaults");if(!(e instanceof MediaStreamTrack))throw Error(`Custom tracks provided must be instances of MediaStreamTrack`)}},{key:`startCustomTrack`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return fd(),ad(this._callState,`startCustomTrack()`),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise(function(n,r){e._sharedTracks.customTrack=t.track,t.track=tl,e.sendMessageToCallMachine({action:`start-custom-track`,properties:t},function(e){e.error?r({error:e.error}):n(e.mediaTag)})})}},{key:`stopCustomTrack`,value:function(e){var t=this;return fd(),ad(this._callState,`stopCustomTrack()`),new Promise(function(n){t.sendMessageToCallMachine({action:`stop-custom-track`,mediaTag:e},function(e){n(e.mediaTag)})})}},{key:`setCamera`,value:function(e){var t=this;return pd(),cd(this._callMachineInitialized,`setCamera()`),new Promise(function(n){t.sendMessageToCallMachine({action:`set-camera`,cameraDeviceId:e},function(e){n({device:e.device})})})}},{key:`setAudioDevice`,value:(ne=L(function*(e){return pd(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(e){return ne.apply(this,arguments)})},{key:`cycleCamera`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise(function(n){e.sendMessageToCallMachine({action:`cycle-camera`,properties:t},function(e){n({device:e.device})})})}},{key:`cycleMic`,value:function(){var e=this;return fd(),new Promise(function(t){e.sendMessageToCallMachine({action:`cycle-mic`},function(e){t({device:e.device})})})}},{key:`getCameraFacingMode`,value:function(){var e=this;return pd(),new Promise(function(t){e.sendMessageToCallMachine({action:`get-camera-facing-mode`},function(e){t(e.facingMode)})})}},{key:`setInputDevicesAsync`,value:(te=L(function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,a=e.videoSource;if(fd(),i!==void 0&&(n=i),a!==void 0&&(r=a),typeof n==`boolean`&&(this._setAllowLocalAudio(n),n=void 0),typeof r==`boolean`&&(this._setAllowLocalVideo(r),r=void 0),!n&&!r)return yield this.getInputDevices();var o={};return n&&(n instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=n,n=tl,o.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,o.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=tl,o.video={settings:{customTrack:r}}):(delete this._sharedTracks.videoTrack,o.video={settings:{deviceId:r}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(o,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise(function(e){t.sendMessageToCallMachine({action:`set-input-devices`,audioDeviceId:n,videoDeviceId:r},function(n){if(delete n.action,delete n.callbackStamp,n.returnPreloadCache)return t._updatePreloadCacheInputSettings(o,!1),void e(t._devicesFromInputSettings(t._inputSettings));e(n)})})}),function(e){return te.apply(this,arguments)})},{key:`setOutputDeviceAsync`,value:(ee=L(function*(e){var t=this,n=e.outputDeviceId;if(fd(),!n||typeof n!=`string`)throw Error(`outputDeviceId must be provided and must be a valid device id`);return this._preloadCache.outputDeviceId=n,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(e,r){t.sendMessageToCallMachine({action:`set-output-device`,outputDeviceId:n},function(n){if(delete n.action,delete n.callbackStamp,n.error){var i=Error(n.error.message);i.type=n.error.type,r(i);return}n.returnPreloadCache?e(t._devicesFromInputSettings(t._inputSettings)):e(n)})})}),function(e){return ee.apply(this,arguments)})},{key:`getInputDevices`,value:(E=L(function*(){var e=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(t){e.sendMessageToCallMachine({action:`get-input-devices`},function(n){n.returnPreloadCache?t(e._devicesFromInputSettings(e._inputSettings)):t({camera:n.camera,mic:n.mic,speaker:n.speaker})})})}),function(){return E.apply(this,arguments)})},{key:`nativeInCallAudioMode`,value:function(){return pd(),this._nativeInCallAudioMode}},{key:`setNativeInCallAudioMode`,value:function(e){if(pd(),[Hu,Uu].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement(`audio`)&&od(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error(`invalid in-call audio mode specified: `,e)}},{key:`preAuth`,value:(T=L(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ud(this._callObjectMode,`preAuth()`),sd(this._callState,this._isPreparingToJoin,`preAuth()`),this.needsLoad()&&(yield this.load(t)),!t.url)throw Error(`preAuth() requires at least a url to be provided`);return this.validateProperties(t),this.properties=H(H({},this.properties),t),new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`daily-method-preauth`,properties:id(e.properties,e.callClientId),preloadCache:id(e._preloadCache,e.callClientId)},function(r){return r.error?n(r.error):r.access?(e._didPreAuth=!0,void t({access:r.access})):n(Error(`unknown error in preAuth()`))})})}),function(){return T.apply(this,arguments)})},{key:`load`,value:(w=L(function*(e){var t=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error(`Use after destroy`);if(e&&(this.validateProperties(e),this.properties=H(H({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw Error(`can't load iframe meeting because url property isn't set`);if(this._updateCallState(Hs),this.emitDailyJSEvent({action:`loading`}),this._callObjectMode)return new Promise(function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,function(n){t._bundleLoadTime=n?`no-op`:Date.now()-r,t._updateCallState(Us),n&&t.emitDailyJSEvent({action:`loaded`}),e()},function(e,r){t.emitDailyJSEvent({action:ec}),r||(t._handleFatalError({action:`error`,errorMsg:e.msg,error:{type:`connection-error`,msg:`Failed to load call object bundle.`,details:{on:`load`,sourceError:e,bundleUrl:Tr(t.properties.dailyConfig)}}}),n(e.msg))})});var n=Or(this.assembleMeetingUrl(),this.properties.dailyConfig);return new Promise(function(e,r){var i=0,a=function(){if(i>=n.length){var o=`Timed out attempting to load the call. Please check your network connection and try again.`;t._iframe.srcdoc=(s=o,`<!DOCTYPE html>
1
+ var TavusEmbed=(function(e){let t=typeof document<`u`&&document.currentScript?document.currentScript.src:void 0;Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y={},b=[],x=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,S=Array.isArray;function C(e,t){for(var n in t)e[n]=t[n];return e}function w(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function T(e,t,n){var i,a,o,s={};for(o in t)o==`key`?i=t[o]:o==`ref`?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return E(e,s,i,a,null)}function E(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++a,__i:-1,__u:0};return o==null&&i.vnode!=null&&i.vnode(s),s}function D(e){return e.children}function ee(e,t){this.props=e,this.context=t}function te(e,t){if(t==null)return e.__?te(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?te(e):null}function ne(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],a=[],o=C({},t);o.__v=t.__v+1,i.vnode&&i.vnode(o),fe(e.__P,o,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??te(t),!!(32&t.__u),a),o.__v=t.__v,o.__.__k[o.__i]=o,me(r,o,a),t.__e=t.__=null,o.__e!=n&&re(o)}}function re(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),re(e)}function ie(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!ae.__r++||c!=i.debounceRendering)&&((c=i.debounceRendering)||l)(ae)}function ae(){try{for(var e,t=1;s.length;)s.length>t&&s.sort(u),e=s.shift(),t=s.length,ne(e)}finally{s.length=ae.__r=0}}function oe(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_=r&&r.__k||b,v=t.length;for(c=O(n,t,_,c,v),d=0;d<v;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&_[p.__i]||y,p.__i=d,g=fe(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&_e(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),4&p.__u?(c=k(p,c,e),f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function O(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=E(null,o,null,null,null):S(o)?o=e.__k[a]=E(D,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=E(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=ce(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=te(s)),ve(s,s));return r}function k(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=k(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=te(e)),t=n.insertBefore(e.__e,t||null));do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function se(e,t){return t||=[],e==null||typeof e==`boolean`||(S(e)?e.some(function(e){se(e,t)}):t.push(e)),t}function ce(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function le(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||x.test(t)?n:n+`px`}function ue(e,t,n,r,i){var a,o;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||le(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||le(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(m,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[p]=r[p]:(n[p]=h,e.addEventListener(t,a?_:g,a)):e.removeEventListener(t,a?_:g,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function de(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[f]==null)t[f]=h++;else if(t[f]<n[p])return;return n(i.event?i.event(t):t)}}}function fe(e,t,n,r,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,x,T,E,ne,re,ie,ae,O=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[c=t.__e=n.__e]),(d=i.__b)&&d(t);n:if(typeof O==`function`){f=s.length;try{if(y=t.props,x=O.prototype&&O.prototype.render,T=(d=O.contextType)&&r[d.__c],E=d?T?T.props.value:d.__:r,n.__c?v=(p=t.__c=n.__c).__=p.__E:(x?t.__c=p=new O(y,E):(t.__c=p=new ee(y,E),p.constructor=O,p.render=ye),T&&T.sub(p),p.state||(p.state={}),p.__n=r,m=p.__d=!0,p.__h=[],p._sb=[]),x&&p.__s==null&&(p.__s=p.state),x&&O.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=C({},p.__s)),C(p.__s,O.getDerivedStateFromProps(y,p.__s))),h=p.props,g=p.state,p.__v=t,m)x&&O.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),x&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(x&&O.getDerivedStateFromProps==null&&y!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(y,E),t.__v==n.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(y,p.__s,E)){t.__v!=n.__v&&(p.props=y,p.state=p.__s,p.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),b.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p),c=te(n);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(y,p.__s,E),x&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,g,_)})}if(p.context=E,p.props=y,p.__P=e,p.__e=!1,ne=i.__r,re=0,x)p.state=p.__s,p.__d=!1,ne&&ne(t),d=p.render(p.props,p.state,p.context),b.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,ne&&ne(t),d=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++re<25);p.state=p.__s,p.getChildContext!=null&&(r=C(C({},r),p.getChildContext())),x&&!m&&p.getSnapshotBeforeUpdate!=null&&(_=p.getSnapshotBeforeUpdate(h,g)),ie=d!=null&&d.type===D&&d.key==null?he(d.props.children):d,c=oe(e,S(ie)?ie:[ie],t,n,r,a,o,s,c,l,u),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),v&&(p.__E=p.__=null)}catch(e){if(s.length=f,t.__v=null,l||o!=null){if(e.then){for(t.__u|=l?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;o!=null&&(o[o.indexOf(c)]=null),t.__e=c}else if(o!=null)for(ae=o.length;ae--;)w(o[ae])}else t.__e=n.__e;t.__k??=n.__k||[],e.then||pe(t),i.__e(e,t,n)}}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):c=t.__e=ge(n.__e,t,n,r,a,o,s,l,u);return(d=i.diffed)&&d(t),128&t.__u?void 0:c}function pe(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(pe))}function me(e,t,n){for(var r=0;r<n.length;r++)_e(n[r],n[++r],n[++r]);i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){i.__e(e,t.__v)}})}function he(e){return typeof e!=`object`||!e||e.__b>0?e:S(e)?e.map(he):e.constructor===void 0?C({},e):null}function ge(e,t,n,a,o,s,c,l,u){var d,f,p,m,h,g,_,v=n.props||y,b=t.props,x=t.type;if(x==`svg`?o=`http://www.w3.org/2000/svg`:x==`math`?o=`http://www.w3.org/1998/Math/MathML`:o||=`http://www.w3.org/1999/xhtml`,s!=null){for(d=0;d<s.length;d++)if((h=s[d])&&`setAttribute`in h==!!x&&(x?h.localName==x:h.nodeType==3)){e=h,s[d]=null;break}}if(e==null){if(x==null)return document.createTextNode(b);e=document.createElementNS(o,x,b.is&&b),l&&=(i.__m&&i.__m(t,s),!1),s=null}if(x==null)v===b||l&&e.data==b||(e.data=b);else{if(s=x==`textarea`&&b.defaultValue!=null?null:s&&r.call(e.childNodes),!l&&s!=null)for(v={},d=0;d<e.attributes.length;d++)v[(h=e.attributes[d]).name]=h.value;for(d in v)h=v[d],d==`dangerouslySetInnerHTML`?p=h:d==`children`||d in b||d==`value`&&`defaultValue`in b||d==`checked`&&`defaultChecked`in b||ue(e,d,null,h,o);for(d in b)h=b[d],d==`children`?m=h:d==`dangerouslySetInnerHTML`?f=h:d==`value`?g=h:d==`checked`?_=h:l&&typeof h!=`function`||v[d]===h||ue(e,d,h,v[d],o);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),oe(t.type==`template`?e.content:e,S(m)?m:[m],t,n,a,x==`foreignObject`?`http://www.w3.org/1999/xhtml`:o,s,c,s?s[0]:n.__k&&te(n,0),l,u),s!=null)for(d=s.length;d--;)w(s[d]);l&&x!=`textarea`||(d=`value`,x==`progress`&&g==null?e.removeAttribute(`value`):g!=null&&(g!==e[d]||x==`progress`&&!g||x==`option`&&g!=v[d])&&ue(e,d,g,v[d],o),d=`checked`,_!=null&&_!=e[d]&&ue(e,d,_,v[d],o))}return e}function _e(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){i.__e(e,n)}}function ve(e,t,n){var r,a;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||_e(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&ve(r[a],t,n||typeof e.type!=`function`);n||w(e.__e),e.__c=e.__=e.__e=void 0}function ye(e,t,n){return this.constructor(e,n)}function be(e,t,n){var a,o,s,c;t==document&&(t=document.documentElement),i.__&&i.__(e,t),o=(a=typeof n==`function`)?null:n&&n.__k||t.__k,s=[],c=[],fe(t,e=(!a&&n||t).__k=T(D,null,[e]),o||y,y,t.namespaceURI,!a&&n?[n]:o?null:t.firstChild?r.call(t.childNodes):null,s,!a&&n?n:o?o.__e:t.firstChild,a,c),me(s,e,c),e.props.children=null}function xe(e,t){be(e,t,xe)}function Se(e,t,n){var i,a,o,s,c=C({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o==`key`?i=t[o]:o==`ref`?a=t[o]:c[o]=t[o]===void 0&&s!=null?s[o]:t[o];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),E(e.type,c,i||e.key,a||e.ref,null)}function Ce(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,ie(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+v++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}r=b.slice,i={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},a=0,o=function(e){return e!=null&&e.constructor===void 0},ee.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=C({},this.state);typeof e==`function`&&(e=e(C({},n),this.props)),e&&C(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),ie(this))},ee.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ie(this))},ee.prototype.render=D,s=[],l=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},ae.__r=0,d=Math.random().toString(8),f=`__d`+d,p=`__a`+d,m=/(PointerCapture)$|Capture$/i,h=0,g=de(!1),_=de(!0),v=0;function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we.apply(this,arguments)}function Te(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}var Ee=[`context`,`children`],De=[`useFragment`];function Oe(e,t,n,r){function i(){var t,n=Reflect.construct(HTMLElement,[],i);return n._vdomComponent=e,r&&r.shadow?(n._root=n.attachShadow({mode:r.mode||`open`,serializable:(t=r.serializable)!=null&&t}),r.adoptedStyleSheets&&(n._root.adoptedStyleSheets=r.adoptedStyleSheets)):n._root=n,n}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){Ae.call(this,r)},i.prototype.attributeChangedCallback=Me,i.prototype.disconnectedCallback=Ne,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(e){Object.defineProperty(i.prototype,e,{get:function(){return this._vdom?this._vdom.props[e]:this._props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||={},this._props[e]=t);var n=typeof t;t!=null&&n!==`string`&&n!==`boolean`&&n!==`number`||this.setAttribute(e,t)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function ke(e){this.getChildContext=function(){return e.context};var t=e.children;return Se(t,Te(e,Ee))}function Ae(e){var t=new CustomEvent(`_preact`,{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=T(ke,we({},this._props,{context:t.detail.context}),Fe(this,this._vdomComponent,e)),(this.hasAttribute(`hydrate`)?xe:be)(this._vdom,this._root)}function je(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():``})}function Me(e,t,n){if(this._vdom){var r={};r[e]=n??=void 0,r[je(e)]=n,this._vdom=Se(this._vdom,r),be(this._vdom,this._root)}}function Ne(){be(this._vdom=null,this._root)}function Pe(e,t){var n=this,r=e.useFragment,i=Te(e,De);return T(r?D:`slot`,we({},i,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener(`_preact`,n._listener))):n.ref.removeEventListener(`_preact`,n._listener)}}))}function Fe(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;var r=[],i={},a=0,o=e.attributes,s=e.childNodes;for(a=o.length;a--;)o[a].name!==`slot`&&(i[o[a].name]=o[a].value,i[je(o[a].name)]=o[a].value);for(a=s.length;a--;){var c=Fe(s[a],null,n),l=s[a].slot;l?i[l]=T(Pe,{name:l},c):r[a]=c}var u=!(!n||!n.shadow),d=t?T(Pe,{useFragment:!u},r):r;return!u&&t&&(e.innerHTML=``),T(t||e.nodeName.toLowerCase(),i,d)}var Ie=`/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
2
+ @layer properties{*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-ease:initial}}@layer theme{:host,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-xl:36rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-lg:.5rem;--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xs:4px;--blur-sm:8px;--blur-xl:24px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-preview-action:oklch(100% 0 0);--color-preview-action-content:oklch(21% 0 0);--text-preview-title:clamp(1.125rem, 2.65cqw, 2rem);--text-preview-title-narrow:clamp(1.375rem, 4.5cqw, 2rem);--text-preview-title-full-screen:clamp(1.5rem, 3.6cqw, 2rem);--text-preview-description-full-screen:clamp(.875rem, 2.25cqw, 1.25rem)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:is(:host:has(input.theme-controller[value=wireframe]:checked),[data-theme=wireframe]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(94% 0 0);--color-base-content:oklch(20% 0 0);--color-primary:oklch(87% 0 0);--color-primary-content:oklch(26% 0 0);--color-secondary:oklch(87% 0 0);--color-secondary-content:oklch(26% 0 0);--color-accent:oklch(87% 0 0);--color-accent-content:oklch(26% 0 0);--color-neutral:oklch(87% 0 0);--color-neutral-content:oklch(26% 0 0);--color-info:oklch(44% .11 240.79);--color-info-content:oklch(90% .058 230.902);--color-success:oklch(43% .095 166.913);--color-success-content:oklch(90% .093 164.15);--color-warning:oklch(47% .137 46.201);--color-warning-content:oklch(92% .12 95.746);--color-error:oklch(44% .177 26.899);--color-error-content:oklch(88% .062 18.334);--radius-selector:0rem;--radius-field:.25rem;--radius-box:.25rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=silk]:checked),[data-theme=silk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(97% .0035 67.78);--color-base-200:oklch(95% .0081 61.42);--color-base-300:oklch(90% .0081 61.42);--color-base-content:oklch(40% .0081 61.42);--color-primary:oklch(23.27% .0249 284.3);--color-primary-content:oklch(94.22% .2505 117.44);--color-secondary:oklch(23.27% .0249 284.3);--color-secondary-content:oklch(73.92% .2135 50.94);--color-accent:oklch(23.27% .0249 284.3);--color-accent-content:oklch(88.92% .2061 189.9);--color-neutral:oklch(20% 0 0);--color-neutral-content:oklch(80% .0081 61.42);--color-info:oklch(80.39% .1148 241.68);--color-info-content:oklch(30.39% .1148 241.68);--color-success:oklch(83.92% .0901 136.87);--color-success-content:oklch(23.92% .0901 136.87);--color-warning:oklch(83.92% .1085 80);--color-warning-content:oklch(43.92% .1085 80);--color-error:oklch(75.1% .1814 22.37);--color-error-content:oklch(35.1% .1814 22.37);--radius-selector:2rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:2px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=cyberpunk]:checked),[data-theme=cyberpunk]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(94.51% .179 104.32);--color-base-200:oklch(91.51% .179 104.32);--color-base-300:oklch(85.51% .179 104.32);--color-base-content:oklch(0% 0 0);--color-primary:oklch(74.22% .209 6.35);--color-primary-content:oklch(14.844% .041 6.35);--color-secondary:oklch(83.33% .184 204.72);--color-secondary-content:oklch(16.666% .036 204.72);--color-accent:oklch(71.86% .217 310.43);--color-accent-content:oklch(14.372% .043 310.43);--color-neutral:oklch(23.04% .065 269.31);--color-neutral-content:oklch(94.51% .179 104.32);--color-info:oklch(72.06% .191 231.6);--color-info-content:oklch(0% 0 0);--color-success:oklch(64.8% .15 160);--color-success-content:oklch(0% 0 0);--color-warning:oklch(84.71% .199 83.87);--color-warning-content:oklch(0% 0 0);--color-error:oklch(71.76% .221 22.18);--color-error-content:oklch(0% 0 0);--radius-selector:0rem;--radius-field:0rem;--radius-box:0rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=retro]:checked),[data-theme=retro]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(91.637% .034 90.515);--color-base-200:oklch(88.272% .049 91.774);--color-base-300:oklch(84.133% .065 90.856);--color-base-content:oklch(41% .112 45.904);--color-primary:oklch(80% .114 19.571);--color-primary-content:oklch(39% .141 25.723);--color-secondary:oklch(92% .084 155.995);--color-secondary-content:oklch(44% .119 151.328);--color-accent:oklch(68% .162 75.834);--color-accent-content:oklch(41% .112 45.904);--color-neutral:oklch(44% .011 73.639);--color-neutral-content:oklch(86% .005 56.366);--color-info:oklch(58% .158 241.966);--color-info-content:oklch(96% .059 95.617);--color-success:oklch(51% .096 186.391);--color-success-content:oklch(96% .059 95.617);--color-warning:oklch(64% .222 41.116);--color-warning-content:oklch(96% .059 95.617);--color-error:oklch(70% .191 22.216);--color-error-content:oklch(40% .123 38.172);--radius-selector:.25rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:is(:host:has(input.theme-controller[value=lemonade]:checked),[data-theme=lemonade]){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(98.71% .02 123.72);--color-base-200:oklch(91.8% .018 123.72);--color-base-300:oklch(84.89% .017 123.72);--color-base-content:oklch(19.742% .004 123.72);--color-primary:oklch(58.92% .199 134.6);--color-primary-content:oklch(11.784% .039 134.6);--color-secondary:oklch(77.75% .196 111.09);--color-secondary-content:oklch(15.55% .039 111.09);--color-accent:oklch(85.39% .201 100.73);--color-accent-content:oklch(17.078% .04 100.73);--color-neutral:oklch(30.98% .075 108.6);--color-neutral-content:oklch(86.196% .015 108.6);--color-info:oklch(86.19% .047 224.14);--color-info-content:oklch(17.238% .009 224.14);--color-success:oklch(86.19% .047 157.85);--color-success-content:oklch(17.238% .009 157.85);--color-warning:oklch(86.19% .047 102.15);--color-warning-content:oklch(17.238% .009 102.15);--color-error:oklch(86.19% .047 25.85);--color-error-content:oklch(17.238% .009 25.85);--radius-selector:1rem;--radius-field:.5rem;--radius-box:1rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:0;--noise:0}:host{--page-has-backdrop:var(--page-scroll-lock) 1;--page-scroll-bg:var(--page-scroll-lock) var(--root-bg,#0000)}@supports (color:color-mix(in lab, red, red)){:host{--page-scroll-bg:var(--page-scroll-lock) color-mix(in srgb, var(--root-bg,#0000), oklch(0% 0 0) calc(var(--page-has-backdrop,0) * 40%))}}:host{background-image:var(--page-scroll-lock) linear-gradient(var(--root-bg,#0000), var(--root-bg,#0000));transition:var(--page-scroll-lock) background-color .3s ease-out;animation:var(--page-scroll-lock) set-page-has-scroll forwards;animation-timeline:var(--page-scroll-lock) scroll();--page-has-scroll:initial;scrollbar-gutter:var(--page-has-scroll) var(--page-scroll-lock) stable}@keyframes set-page-has-scroll{0%,to{--page-has-scroll: }}:host{--fx-noise:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E");scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab, red, red)){:host{scrollbar-color:color-mix(in oklch, currentColor 35%, #0000) #0000}}@property --radialprogress{syntax:"<percentage>";inherits:true;initial-value:0%}@property --aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}:host,[data-theme]{background-color:var(--root-bg);color:var(--color-base-content)}:host{background-color:var(--page-scroll-bg,var(--root-bg))}:where(:host,[data-theme]){--root-bg:var(--color-base-100)}:host{--page-scroll-lock:initial;--page-overflow:var(--page-scroll-lock) hidden}:host:not(span){overflow:var(--page-overflow)}:where(:host),[data-theme=black-white]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:host:has(input.theme-controller[value=black-white]:checked){--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--color-base-100:oklch(100% 0 0);--color-base-200:oklch(97% 0 0);--color-base-300:oklch(92% 0 0);--color-base-content:oklch(21% 0 0);--color-primary:oklch(21% 0 0);--color-primary-content:oklch(98% 0 0);--color-secondary:oklch(50% 0 0);--color-secondary-content:oklch(98% 0 0);--color-accent:oklch(27% 0 0);--color-accent-content:oklch(98% 0 0);--color-neutral:oklch(27% 0 0);--color-neutral-content:oklch(98% 0 0);--color-info:oklch(70% .12 230);--color-info-content:oklch(98% 0 0);--color-success:oklch(65% .18 145);--color-success-content:oklch(98% 0 0);--color-warning:oklch(80% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(60% .22 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}@media (prefers-color-scheme:dark){:host:not([data-theme]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}}:is(:host:has(input.theme-controller[value=white-black]:checked),[data-theme=white-black]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(22% 0 0);--color-base-300:oklch(27% 0 0);--color-base-content:oklch(96% 0 0);--color-primary:oklch(96% 0 0);--color-primary-content:oklch(18% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(18% 0 0);--color-accent:oklch(90% 0 0);--color-accent-content:oklch(18% 0 0);--color-neutral:oklch(92% 0 0);--color-neutral-content:oklch(18% 0 0);--color-info:oklch(72% .13 230);--color-info-content:oklch(15% 0 0);--color-success:oklch(70% .17 145);--color-success-content:oklch(15% 0 0);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(20% 0 0);--color-error:oklch(65% .21 25);--color-error-content:oklch(98% 0 0);--radius-selector:.5rem;--radius-field:.25rem;--radius-box:.5rem;--size-selector:.25rem;--size-field:.25rem;--border:1px;--depth:1;--noise:0}:is(:host:has(input.theme-controller[value=wireframe-dark]:checked),[data-theme=wireframe-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(18% 0 0);--color-base-200:oklch(23% 0 0);--color-base-300:oklch(29% 0 0);--color-base-content:oklch(92% 0 0);--color-primary:oklch(92% 0 0);--color-primary-content:oklch(12% 0 0);--color-secondary:oklch(70% 0 0);--color-secondary-content:oklch(12% 0 0);--color-accent:oklch(55% 0 0);--color-accent-content:oklch(95% 0 0);--color-neutral:oklch(30% 0 0);--color-neutral-content:oklch(92% 0 0);--color-info:oklch(70% .15 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .16 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .16 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=silk-dark]:checked),[data-theme=silk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .02 320);--color-base-200:oklch(25% .022 320);--color-base-300:oklch(30% .025 320);--color-base-content:oklch(94% .01 320);--color-primary:oklch(74% .12 320);--color-primary-content:oklch(15% .03 320);--color-secondary:oklch(74% .12 270);--color-secondary-content:oklch(15% .03 270);--color-accent:oklch(76% .12 20);--color-accent-content:oklch(15% .03 20);--color-neutral:oklch(28% .02 320);--color-neutral-content:oklch(94% .01 320);--color-info:oklch(72% .13 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(74% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(82% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(66% .21 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=cyberpunk-dark]:checked),[data-theme=cyberpunk-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(15% .04 305);--color-base-200:oklch(20% .05 305);--color-base-300:oklch(26% .06 305);--color-base-content:oklch(92% .18 95);--color-primary:oklch(72% .28 340);--color-primary-content:oklch(15% .04 305);--color-secondary:oklch(80% .2 200);--color-secondary-content:oklch(15% .04 305);--color-accent:oklch(90% .2 95);--color-accent-content:oklch(15% .04 305);--color-neutral:oklch(25% .05 305);--color-neutral-content:oklch(92% .18 95);--color-info:oklch(75% .2 220);--color-info-content:oklch(15% .04 305);--color-success:oklch(78% .2 145);--color-success-content:oklch(15% .04 305);--color-warning:oklch(85% .18 80);--color-warning-content:oklch(15% .04 305);--color-error:oklch(70% .25 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=retro-dark]:checked),[data-theme=retro-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(22% .03 60);--color-base-200:oklch(27% .03 60);--color-base-300:oklch(33% .035 60);--color-base-content:oklch(88% .05 70);--color-primary:oklch(62% .16 30);--color-primary-content:oklch(95% .04 70);--color-secondary:oklch(66% .1 80);--color-secondary-content:oklch(15% .03 60);--color-accent:oklch(72% .13 60);--color-accent-content:oklch(15% .03 60);--color-neutral:oklch(28% .03 60);--color-neutral-content:oklch(88% .05 70);--color-info:oklch(70% .14 220);--color-info-content:oklch(15% .03 220);--color-success:oklch(72% .15 145);--color-success-content:oklch(15% .03 145);--color-warning:oklch(80% .15 80);--color-warning-content:oklch(15% .03 80);--color-error:oklch(65% .2 25);--color-error-content:oklch(95% .02 25)}:is(:host:has(input.theme-controller[value=lemonade-dark]:checked),[data-theme=lemonade-dark]){--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--color-base-100:oklch(20% .05 140);--color-base-200:oklch(25% .05 140);--color-base-300:oklch(31% .06 140);--color-base-content:oklch(94% .1 100);--color-primary:oklch(85% .18 95);--color-primary-content:oklch(15% .05 140);--color-secondary:oklch(75% .2 130);--color-secondary-content:oklch(15% .05 140);--color-accent:oklch(85% .15 110);--color-accent-content:oklch(15% .05 140);--color-neutral:oklch(28% .05 140);--color-neutral-content:oklch(94% .1 100);--color-info:oklch(72% .18 220);--color-info-content:oklch(15% .05 140);--color-success:oklch(76% .2 145);--color-success-content:oklch(15% .05 140);--color-warning:oklch(86% .18 80);--color-warning-content:oklch(15% .05 140);--color-error:oklch(65% .22 25);--color-error-content:oklch(95% .02 25)}}@layer components;@layer utilities{.\\@container\\/conversation{container:conversation/inline-size}.\\@container\\/pip{container:pip/inline-size}@layer daisyui.l1.l2.l3{.modal{pointer-events:none;visibility:hidden;width:100%;max-width:none;height:100%;max-height:none;color:inherit;transition:overlay .3s allow-discrete, visibility .3s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;overscroll-behavior:contain;z-index:999;scrollbar-gutter:auto;background-color:#0000;place-items:center;margin:0;padding:0;display:grid;position:fixed;inset:0;overflow:clip}.modal::backdrop{display:none}.modal[popover]{color:inherit;background:0 0;border:0;max-width:none;max-height:none;margin:0;padding:0;inset:0}.modal[popover]::backdrop{background-color:oklch(0% 0 0/.4);transition:background-color .3s ease-out}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}.tooltip{--tt-bg:var(--color-neutral);--tt-off:calc(100% + .5rem);--tt-tail:calc(100% + 1px + .25rem);--tt-tail-off:.5rem;display:inline-block;position:relative}.tooltip>.tooltip-content,.tooltip[data-tip]:before{border-radius:var(--radius-field);text-align:center;white-space:normal;max-width:20rem;color:var(--color-neutral-content);opacity:0;background-color:var(--tt-bg);pointer-events:none;z-index:2;--tw-content:attr(data-tip);content:var(--tw-content);width:max-content;transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off) 50%;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;font-weight:400;line-height:1.25;position:absolute}.tooltip:after{opacity:0;background-color:var(--tt-bg);content:"";pointer-events:none;--mask-tooltip:url("data:image/svg+xml,%3Csvg width='10' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.500009 1C3.5 1 3.00001 4 5.00001 4C7 4 6.5 1 9.5 1C10 1 10 0.499897 10 0H0C-1.99338e-08 0.5 0 1 0.500009 1Z' fill='black'/%3E%3C/svg%3E%0A");width:.625rem;height:.25rem;-webkit-mask-position:-1px 0;mask-position:-1px 0;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);-webkit-mask-image:var(--mask-tooltip);mask-image:var(--mask-tooltip);transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail) 50%;display:block;position:absolute}@media (prefers-reduced-motion:no-preference){.tooltip>.tooltip-content,.tooltip[data-tip]:before,.tooltip:after{transition:opacity .2s cubic-bezier(.4,0,.2,1) 75ms,transform .2s cubic-bezier(.4,0,.2,1) 75ms}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))>.tooltip-content,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible))[data-tip]:before,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after,:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{opacity:1;--tt-pos:0rem}@media (prefers-reduced-motion:no-preference){:is(.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))).tooltip-open,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):hover,.tooltip:is([data-tip]:not([data-tip=""]),:has(.tooltip-content:not(:empty))):has(:focus-visible)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.tabs{--tabs-height:auto;--tabs-direction:row;--tab-height:calc(var(--size-field,.25rem) * 10);height:var(--tabs-height);flex-wrap:wrap;flex-direction:var(--tabs-direction);display:flex}.tab:is(.tabs>.tab){cursor:pointer;appearance:none;text-align:center;webkit-user-select:none;-webkit-user-select:none;user-select:none;flex-wrap:wrap;justify-content:center;align-items:center;display:inline-flex;position:relative}@media (hover:hover){.tab:is(.tabs>.tab):hover{color:var(--color-base-content)}}.tab:is(.tabs>.tab){--tab-p:.75rem;--tab-bg:var(--color-base-100);--tab-border-color:var(--color-base-300);--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:0;--tab-radius-ee:0;--tab-order:0;--tab-radius-min:calc(.75rem - var(--border));--tab-radius-limit:min(var(--radius-field), var(--tab-radius-min));--tab-radius-grad:#0000 calc(69% - var(--border)), var(--tab-border-color) calc(69% - var(--border) + .25px), var(--tab-border-color) 69%, var(--tab-bg) calc(69% + .25px);order:var(--tab-order);height:var(--tab-height);padding-inline:var(--tab-p);border-color:#0000;font-size:.875rem}.tab:is(.tabs>.tab):is(input[type=radio]){min-width:fit-content}.tab:is(.tabs>.tab):is(input[type=radio]):after{--tw-content:attr(aria-label);content:var(--tw-content)}.tab:is(.tabs>.tab):is(label){position:relative}.tab:is(.tabs>.tab):is(label) input{cursor:pointer;appearance:none;opacity:0;position:absolute;inset:0}:is(.tab:is(.tabs>.tab):checked,.tab:is(.tabs>.tab):is(label:has(:checked)),.tab:is(.tabs>.tab):is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]))+.tab-content{display:block}.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.tab:is(.tabs>.tab):not(:checked,label:has(:checked),:hover,.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.tab:is(.tabs>.tab):not(input):empty{cursor:default;flex-grow:1}.tab:is(.tabs>.tab):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.tab:is(.tabs>.tab):focus{outline-offset:2px;outline:2px solid #0000}}.tab:is(.tabs>.tab):focus-visible,.tab:is(.tabs>.tab):is(label:has(:checked:focus-visible)){outline-offset:-5px;outline:2px solid}.tab:is(.tabs>.tab)[disabled]{pointer-events:none;opacity:.4}.menu{--menu-active-fg:var(--color-neutral-content);--menu-active-bg:var(--color-neutral);flex-flow:column wrap;width:fit-content;padding:.5rem;font-size:.875rem;display:flex}.menu :where(li ul,li menu){white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem;position:relative}.menu :where(li ul,li menu):before{background-color:var(--color-base-content);opacity:.1;width:var(--border);content:"";inset-inline-start:0;position:absolute;top:.75rem;bottom:.75rem}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}.menu :where(li:not(.menu-title)>:not(ul,menu,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--radius-field);text-align:start;-webkit-user-select:none;user-select:none;grid-auto-columns:minmax(auto,max-content) auto max-content;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;padding-block:.375rem;padding-inline:.75rem;transition-property:color,background-color,box-shadow;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:grid}.menu :where(li>details>summary){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li>details>summary){outline-offset:2px;outline:2px solid #0000}}.menu :where(li>details>summary)::-webkit-details-marker{display:none}:is(.menu :where(li>details>summary),.menu :where(li>.menu-dropdown-toggle)):after{content:"";transform-origin:50%;pointer-events:none;content:"";pointer-events:none;justify-self:flex-end;width:.375rem;height:.375rem;transition-property:rotate,translate;transition-duration:.2s;display:block;translate:0 -1px;rotate:-135deg;box-shadow:inset 2px 2px}.menu details{interpolate-size:allow-keywords;overflow:hidden}.menu details::details-content{block-size:0}@media (prefers-reduced-motion:no-preference){.menu details::details-content{transition-behavior:allow-discrete;transition-property:block-size,content-visibility;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.menu details[open]::details-content{block-size:auto}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{translate:0 1px;rotate:45deg}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn).menu-focus{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{color:var(--color-base-content);--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title),li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.menu-active,:active,.btn):focus-visible{outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){cursor:pointer;background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){outline-offset:2px;outline:2px solid #0000}}.menu :where(li:not(.menu-title,.disabled)>:not(ul,menu,details,.menu-title):not(.menu-active,:active,.btn):hover,li:not(.menu-title,.disabled)>details>summary:not(.menu-title):not(.menu-active,:active,.btn):hover){box-shadow:inset 0 1px oklch(0% 0 0/.01),inset 0 -1px oklch(100% 0 0/.01)}.menu :where(li:empty){background-color:var(--color-base-content);opacity:.1;height:1px;margin:.5rem 1rem}.menu :where(li){flex-flow:column wrap;flex-shrink:0;align-items:stretch;display:flex;position:relative}.menu :where(li) .badge{justify-self:flex-end}.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{outline-offset:2px;outline:2px solid #0000}}.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active{color:var(--menu-active-fg);background-color:var(--menu-active-bg);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}:is(.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):not(:is(.menu :where(li)>:not(ul,menu,.menu-title,details,.btn):active,.menu :where(li)>:not(ul,menu,.menu-title,details,.btn).menu-active,.menu :where(li)>details>summary:active):active){box-shadow:0 2px calc(var(--depth) * 3px) -2px var(--menu-active-bg)}.menu :where(li).menu-disabled,.menu :where(li) [disabled]{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.menu :where(li).menu-disabled,.menu :where(li) [disabled]{color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.menu .dropdown-content{margin-top:.5rem;padding:.5rem}.menu .dropdown-content:before{display:none}.dock{z-index:1;background-color:var(--color-base-100);color:currentColor;border-top:.5px solid var(--color-base-content);flex-direction:row;justify-content:space-around;align-items:center;width:100%;padding:.5rem;display:flex;position:fixed;bottom:0;left:0;right:0}@supports (color:color-mix(in lab, red, red)){.dock{border-top:.5px solid color-mix(in oklab, var(--color-base-content) 5%, #0000)}}.dock{height:4rem;height:calc(4rem + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}.dock>:not(:where(script,style,template)){cursor:pointer;border-radius:var(--radius-box);background-color:#0000;flex-direction:column;flex-shrink:1;flex-basis:100%;justify-content:center;align-items:center;gap:1px;max-width:8rem;height:100%;margin-bottom:.5rem;transition:opacity .2s ease-out;display:flex;position:relative}@media (hover:hover){.dock>:not(:where(script,style,template)):hover{opacity:.8}}:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]),:is(.dock>:not(:where(script,style,template))[aria-disabled=true],.dock>:not(:where(script,style,template))[disabled]):hover{opacity:1}.dock>:not(:where(script,style,template)) .dock-label{font-size:.6875rem}.dock>:not(:where(script,style,template)):after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:2147483647px;width:1.5rem;height:.25rem;transition:background-color .1s ease-out,text-color .1s ease-out,width .1s ease-out;position:absolute;bottom:.2rem}.dropdown{position-area:var(--anchor-v,block-end) var(--anchor-h,span-inline-end);display:inline-block;position:relative}.dropdown>:not(:has(~[class*=dropdown-content])):focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.dropdown>:not(:has(~[class*=dropdown-content])):focus{outline-offset:2px;outline:2px solid #0000}}.dropdown .dropdown-content{position:absolute}.dropdown.dropdown-close .dropdown-content,.dropdown:not(details,.dropdown-open,.dropdown-hover:hover,:focus-within) .dropdown-content,.dropdown.dropdown-hover:not(:hover) [tabindex]:first-child:focus:not(:focus-visible)~.dropdown-content{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown[popover]{transition-behavior:allow-discrete;transition-property:opacity,scale,display,overlay;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown[popover]{opacity:0;scale:.95}}.dropdown .dropdown-content{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown .dropdown-content{transition-behavior:allow-discrete;transition-property:opacity,scale,display,overlay;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation:.2s dropdown}}@starting-style{.dropdown .dropdown-content{opacity:0;scale:.95}}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within)>[tabindex]:first-child{pointer-events:none;pointer-events:none;pointer-events:none}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content{opacity:1;opacity:1;opacity:1;scale:1}.dropdown:not(.dropdown-close).dropdown-hover:hover .dropdown-content{opacity:1;scale:1}.dropdown:is(details){overflow:revert-layer}.dropdown:is(details) summary::-webkit-details-marker{display:none}.dropdown:where([popover]){background:0 0}.dropdown[popover]{color:inherit;position:fixed}@supports not (position-area:bottom){.dropdown[popover]{margin:auto}.dropdown[popover].dropdown-close{transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover].dropdown-open:not(:popover-open){transform-origin:top;opacity:0;display:none;scale:.95}.dropdown[popover]::backdrop{background-color:oklab(0% none none/.3)}}:is(.dropdown[popover].dropdown-close,.dropdown[popover]:not(.dropdown-open,:popover-open)){transform-origin:top;opacity:0;display:none;scale:.95}:where(.btn){width:unset}.btn{--size:calc(var(--size-field,.25rem) * 10);--btn-p:1rem;--btn-fg:var(--color-base-content);cursor:pointer;text-align:center;vertical-align:middle;outline-offset:2px;webkit-user-select:none;-webkit-user-select:none;user-select:none;border-width:var(--border);touch-action:manipulation;--btn-bg:var(--btn-color,var(--color-base-200));--btn-border:var(--btn-color,var(--color-base-200));border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field));flex-wrap:nowrap;flex-shrink:0;justify-content:center;align-items:center;gap:.375rem;font-weight:600;transition-property:color,background-color,border-color,box-shadow,transform;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);display:inline-flex}@supports (color:color-mix(in lab, red, red)){.btn{--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 calc(var(--depth) * 5%))}}.btn{--btn-soft-bg:initial;--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn{--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));height:var(--size);padding-inline:var(--btn-p);font-size:var(--fontsize,.875rem);background-color:var(--btn-bg);color:var(--btn-fg);border-color:var(--btn-border);border-style:var(--btn-border-style,solid);outline-color:var(--btn-color,var(--color-base-content));--tw-prose-links:var(--btn-fg);background-image:none, var(--fx-noise);background-size:auto, calc(var(--noise,0) * 100%);text-shadow:0 .5px oklch(100% 0 0 / calc(var(--depth) * .15));box-shadow:var(--btn-inset) inset, var(--btn-shadow)}.btn:is([type=checkbox],[type=radio]){appearance:none}.btn:is([type=checkbox],[type=radio])[aria-label]:after{--tw-content:attr(aria-label);content:var(--tw-content)}.btn:where(:checked:not(.filter [type=radio].btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}.loading{pointer-events:none;aspect-ratio:1;vertical-align:middle;width:calc(var(--size-selector,.25rem) * 6);background-color:currentColor;display:inline-block;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}@media (prefers-reduced-motion:no-preference){.loading{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}}.collapse:not(td,tr,colgroup){border-radius:var(--radius-box,1rem);isolation:isolate;grid-template-rows:max-content 0fr;grid-template-columns:minmax(0,1fr);width:100%;display:grid;position:relative}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup){transition:grid-template-rows .2s}}.collapse:not(td,tr,colgroup)>input:is([type=checkbox],[type=radio]){appearance:none;opacity:0;z-index:1;grid-row-start:1;grid-column-start:1;width:100%;min-height:1lh;padding:1rem;padding-inline-end:3rem;transition:background-color .2s ease-out}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close)){grid-template-rows:max-content 1fr}.collapse:not(td,tr,colgroup):not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){--overflow-delay:.2s;overflow:revert-layer;content-visibility:visible;min-height:fit-content}@supports not (content-visibility:visible){.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible}}.collapse:not(td,tr,colgroup):focus-visible{outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):has(>input:is([type=checkbox],[type=radio]):focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):has(summary:focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(td,tr,colgroup):not(.collapse-close)>input[type=checkbox],.collapse:not(td,tr,colgroup):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(td,tr,colgroup):not(.collapse-close)>.collapse-title{cursor:pointer}:is(.collapse:not(td,tr,colgroup)[tabindex]:focus:not(.collapse-close,.collapse[open]),.collapse:not(td,tr,colgroup)[tabindex]:focus-within:not(.collapse-close,.collapse[open]))>.collapse-title{cursor:unset}.collapse:not(td,tr,colgroup):is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>:where(.collapse-content),.collapse:not(td,tr,colgroup):not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem}.collapse:not(td,tr,colgroup):is(details){width:100%}.collapse:not(td,tr,colgroup):is(details)::details-content{--overflow-delay:0s;height:0;overflow:clip}.collapse:not(td,tr,colgroup):is(details):where([open])::details-content{overflow:revert-layer;height:auto}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup):is(details)::details-content{transition:overflow .2s allow-discrete var(--overflow-delay), content-visibility .2s allow-discrete, visibility .2s allow-discrete, min-height .2s ease-out allow-discrete, padding .1s ease-out 20ms, background-color .2s ease-out, height .2s;interpolate-size:allow-keywords}.collapse:not(td,tr,colgroup):is(details):where([open])::details-content{--overflow-delay:.2s}}.collapse:not(td,tr,colgroup):is(details)>summary{outline:none;display:block;position:relative}.collapse:not(td,tr,colgroup):is(details)>summary::-webkit-details-marker{display:none}.filter{flex-wrap:wrap;display:flex}.filter [type=radio]{width:auto}.filter input{opacity:1;transition:visibility .1s allow-discrete, margin .1s, opacity .3s, padding .3s, border-width .1s;overflow:hidden;scale:1}.filter input.filter-reset{aspect-ratio:1}.filter input.filter-reset:after{--tw-content:"×";content:var(--tw-content)}.filter>input:not(:last-child),.filter>:not(:last-child) input{margin-inline-end:.25rem}.list{flex-direction:column;font-size:.875rem;display:flex}.list .list-row{--list-grid-cols:minmax(0, auto) 1fr;border-radius:var(--radius-box);word-break:break-word;grid-auto-flow:column;grid-template-columns:var(--list-grid-cols);gap:1rem;padding:1rem;display:grid;position:relative}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{content:"";border-bottom:var(--border) solid;inset-inline:var(--radius-box);border-color:var(--color-base-content);position:absolute;bottom:0}@supports (color:color-mix(in lab, red, red)){:is(.list>:not(:last-child).list-row,.list>:not(:last-child) .list-row):after{border-color:color-mix(in oklab, var(--color-base-content) 5%, transparent)}}.toggle{border:var(--border) solid currentColor;color:var(--input-color);cursor:pointer;appearance:none;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--toggle-p), var(--radius-selector-max)) + min(var(--border), var(--radius-selector-max)));padding:var(--toggle-p);flex-shrink:0;grid-template-columns:0fr 1fr 1fr;place-content:center;display:inline-grid;position:relative;box-shadow:inset 0 1px}@supports (color:color-mix(in lab, red, red)){.toggle{box-shadow:0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000) inset}}.toggle{--input-color:var(--color-base-content);transition:color .3s,grid-template-columns .2s}@supports (color:color-mix(in lab, red, red)){.toggle{--input-color:color-mix(in oklab, var(--color-base-content) 50%, #0000)}}.toggle{--toggle-p:calc(var(--size) * .125);--size:calc(var(--size-selector,.25rem) * 6);width:calc((var(--size) * 2) - (var(--border) + var(--toggle-p)) * 2);height:var(--size)}.toggle>*{z-index:1;cursor:pointer;appearance:none;background-color:#0000;border:none;grid-column:2/span 1;grid-row-start:1;height:100%;padding:.125rem;transition:opacity .2s,rotate .4s}.toggle>:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.toggle>:focus{outline-offset:2px;outline:2px solid #0000}}.toggle>:nth-child(2){color:var(--color-base-100);rotate:0deg}.toggle>:nth-child(3){color:var(--color-base-100);opacity:0;rotate:-15deg}.toggle:has(:checked)>:nth-child(2){opacity:0;rotate:15deg}.toggle:has(:checked)>:nth-child(3){opacity:1;rotate:0deg}.toggle:before{aspect-ratio:1;border-radius:var(--radius-selector);--tw-content:"";content:var(--tw-content);width:100%;height:100%;box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor;background-color:currentColor;grid-row-start:1;grid-column-start:2;transition:background-color .1s,translate .2s,inset-inline-start .2s;position:relative;inset-inline-start:0;translate:0}@supports (color:color-mix(in lab, red, red)){.toggle:before{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000)}}.toggle:before{background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise)}@media (forced-colors:active){.toggle:before{outline-style:var(--tw-outline-style);outline-offset:calc(1px * -1);outline-width:1px}}@media print{.toggle:before{outline-offset:-1rem;outline:.25rem solid}}.toggle:focus-visible{outline-offset:2px;outline:2px solid}.toggle:has(:focus-visible){outline-offset:2px;outline:2px solid}.toggle:checked{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:checked:before{background-color:currentColor}@starting-style{.toggle:checked:before{opacity:0}}.toggle[aria-checked=true]{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle[aria-checked=true]:before{background-color:currentColor}@starting-style{.toggle[aria-checked=true]:before{opacity:0}}.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:has(>input:checked):before{background-color:currentColor}@starting-style{.toggle:has(>input:checked):before{opacity:0}}.toggle:indeterminate{grid-template-columns:.5fr 1fr .5fr}.toggle:disabled{cursor:not-allowed;opacity:.3}.toggle:disabled:before{border:var(--border) solid currentColor;background-color:#0000}.input{appearance:none;background-color:var(--color-base-100);vertical-align:middle;white-space:nowrap;--size:calc(var(--size-field,.25rem) * var(--in-size-mul,10));--input-color:var(--color-base-content);flex-shrink:1;align-items:center;gap:.5rem;padding-inline:.75rem;display:inline-flex;position:relative}@supports (color:color-mix(in lab, red, red)){.input{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.input{cursor:text;width:clamp(3rem,20rem,100%);height:var(--size);font-size:max(var(--font-size,0rem), var(--font-size-min,.875rem));touch-action:manipulation;border:var(--border) solid var(--input-color,#0000);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;border-start-start-radius:var(--join-ss,var(--radius-field));border-start-end-radius:var(--join-se,var(--radius-field));border-end-end-radius:var(--join-ee,var(--radius-field));border-end-start-radius:var(--join-es,var(--radius-field))}@supports (color:color-mix(in lab, red, red)){.input{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.input input{appearance:none;background-color:#0000;border:none;width:100%;height:100%}.input input::placeholder{color:var(--color-base-content);opacity:.5}.input input:focus,.input input:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.input input:focus,.input input:focus-within{outline-offset:2px;outline:2px solid #0000}}.input input::-webkit-calendar-picker-indicator{inset-inline-end:-.15em}.input::-webkit-inner-spin-button{margin-inline-end:-10px}.input::-webkit-calendar-picker-indicator{inset-inline-end:.75em}input.input{text-align:start;display:inline-flex;position:relative}input.input[type=url],input.input[type=tel],input.input[type=email],input.input[type=number]{direction:ltr}input.input::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}input.input::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}input.input::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my,-3))}input.input::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}input.input::-webkit-color-swatch-wrapper{padding-block:.25rem}.input input{text-align:start;display:inline-flex;position:relative}.input input[type=url],.input input[type=tel],.input input[type=email],.input input[type=number]{direction:ltr}.input input::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}.input input::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}.input input::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my,-3))}.input input::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}.input input::-webkit-color-swatch-wrapper{padding-block:.25rem}.input:focus{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus{outline:2px solid var(--input-color);outline-offset:2px}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus{--font-size:1rem}}}.input:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.input:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus-within{--font-size:1rem}}}.input:has(>input[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}:is(.input:has(>input[disabled]):is(input),.input:has(>input[disabled]) :is(input)){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.input:has(>input[disabled]):is(input),.input:has(>input[disabled]) :is(input)){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:has(>input[disabled]){box-shadow:none}.input:has(>input[disabled])::placeholder{color:var(--color-base-content);opacity:.2}.input:has(>input[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.input:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}.input:is(:disabled,[disabled]):is(input),.input:is(:disabled,[disabled]) :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.input:is(:disabled,[disabled]):is(input),.input:is(:disabled,[disabled]) :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:is(:disabled,[disabled]){box-shadow:none}.input:is(:disabled,[disabled])::placeholder,.input:is(:disabled,[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}fieldset:disabled .input:is(input),fieldset:disabled .input :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){fieldset:disabled .input:is(input),fieldset:disabled .input :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}fieldset:disabled .input{box-shadow:none}fieldset:disabled .input::placeholder,fieldset:disabled .input ::placeholder{color:var(--color-base-content);opacity:.2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.range{appearance:none;webkit-appearance:none;--range-thumb:var(--color-base-100);--range-thumb-size:calc(var(--size-selector,.25rem) * 6);--range-progress:currentColor;--range-fill:1;--range-p:.25rem;--range-bg:currentColor}@supports (color:color-mix(in lab, red, red)){.range{--range-bg:color-mix(in oklab, currentColor 10%, #0000)}}.range{--range-fill-x:calc((var(--range-dir,1) * -100cqw) - (var(--range-dir,1) * var(--range-thumb-size) / 2));--range-fill-y:0;--range-fill-spread:calc(100cqw * var(--range-fill));cursor:pointer;vertical-align:middle;--radius-selector-max:calc(var(--radius-selector) + var(--radius-selector) + var(--radius-selector));border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));width:clamp(3rem,20rem,100%);height:var(--range-thumb-size);background-color:#0000;border:none;overflow:hidden}[dir=rtl] .range{--range-dir:-1}.range:focus{outline:none}.range:focus-visible{outline-offset:2px;outline:2px solid}.range::-webkit-slider-runnable-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}@media (forced-colors:active){.range::-webkit-slider-runnable-track{border:1px solid}.range::-moz-range-track{border:1px solid}}.range::-moz-range-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}.range::-webkit-slider-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));background-color:var(--range-thumb);height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;appearance:none;webkit-appearance:none;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread);position:relative;inset-block-start:50%;transform:translateY(-50%)}@supports (color:color-mix(in lab, red, red)){.range::-webkit-slider-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread)}}.range::-moz-range-thumb{box-sizing:border-box;border-radius:calc(var(--radius-selector) + min(var(--range-p), var(--radius-selector-max)));height:var(--range-thumb-size);width:var(--range-thumb-size);border:var(--range-p) solid;color:var(--range-progress);box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px currentColor, 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread);background-color:currentColor;position:relative}@supports (color:color-mix(in lab, red, red)){.range::-moz-range-thumb{box-shadow:0 -1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px color-mix(in oklab, currentColor calc(var(--depth) * 10%), #0000), 0 0 0 2rem var(--range-thumb) inset, var(--range-fill-x) var(--range-fill-y) 0 var(--range-fill-spread)}}.range:disabled{cursor:not-allowed;opacity:.3}.indicator{width:max-content;display:inline-flex;position:relative}.indicator :where(.indicator-item){z-index:1;white-space:nowrap;top:var(--indicator-t,0);bottom:var(--indicator-b,auto);left:var(--indicator-s,auto);right:var(--indicator-e,0);translate:var(--indicator-x,50%) var(--indicator-y,-50%);position:absolute}.steps .step{text-align:center;--step-bg:var(--color-base-300);--step-fg:var(--color-base-content);grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps .step:before{width:100%;height:.5rem;color:var(--step-bg);background-color:var(--step-bg);content:"";border:1px solid;grid-row-start:1;grid-column-start:1;margin-inline-start:-100%;top:0}.steps .step>.step-icon{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:2147483647px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:not(:has(.step-icon)):after{--tw-content:counter(step);content:var(--tw-content);counter-increment:step;z-index:1;color:var(--step-fg);background-color:var(--step-bg);border:1px solid var(--step-bg);border-radius:2147483647px;grid-row-start:1;grid-column-start:1;place-self:center;place-items:center;width:2rem;height:2rem;display:grid;position:relative}.steps .step:first-child:before{--tw-content:none;content:var(--tw-content)}.steps .step[data-content]:after{--tw-content:attr(data-content);content:var(--tw-content)}.avatar-group .avatar{border:4px solid var(--color-base-100);border-radius:2147483647px;overflow:hidden}.avatar{vertical-align:middle;align-self:center;display:inline-flex;position:relative}.avatar>div{aspect-ratio:1;display:block;overflow:hidden}.avatar img{object-fit:cover;width:100%;height:100%}.checkbox{border:var(--border) solid var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox{border:var(--border) solid var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox{cursor:pointer;appearance:none;border-radius:var(--radius-selector);vertical-align:middle;color:var(--color-base-content);box-shadow:0 1px oklch(0% 0 0 / calc(var(--depth) * .1)) inset, 0 0 #0000 inset, 0 0 #0000;--size:calc(var(--size-selector,.25rem) * 6);width:var(--size);height:var(--size);background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);flex-shrink:0;padding:.25rem;transition:background-color .2s,box-shadow .2s;display:inline-block;position:relative}.checkbox:before{--tw-content:"";content:var(--tw-content);opacity:0;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,70% 80%,70% 100%);width:100%;height:100%;box-shadow:0px 3px 0 0px oklch(100% 0 0 / calc(var(--depth) * .1)) inset;background-color:currentColor;font-size:1rem;line-height:.75;transition:clip-path .3s .1s,opacity .1s .1s,rotate .3s .1s,translate .3s .1s;display:block;rotate:45deg}.checkbox:focus-visible{outline:2px solid var(--input-color,currentColor);outline-offset:2px}.checkbox:checked{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}.checkbox:checked:before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){.checkbox:checked:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{.checkbox:checked:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox[aria-checked=true]{background-color:var(--input-color,#0000);box-shadow:0 0 #0000 inset, 0 8px 0 -4px oklch(100% 0 0 / calc(var(--depth) * .1)) inset, 0 1px oklch(0% 0 0 / calc(var(--depth) * .1))}.checkbox[aria-checked=true]:before{clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 0%,70% 0%,70% 100%);opacity:1}@media (forced-colors:active){.checkbox[aria-checked=true]:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{.checkbox[aria-checked=true]:before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}.checkbox:indeterminate{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox:indeterminate{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox:indeterminate:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.checkbox[aria-checked=mixed]{background-color:var(--input-color,var(--color-base-content))}@supports (color:color-mix(in lab, red, red)){.checkbox[aria-checked=mixed]{background-color:var(--input-color,color-mix(in oklab, var(--color-base-content) 20%, #0000))}}.checkbox[aria-checked=mixed]:before{opacity:1;clip-path:polygon(20% 100%,20% 80%,50% 80%,50% 80%,80% 80%,80% 100%);translate:0 -35%;rotate:0deg}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.card{border-radius:var(--radius-box);outline-offset:2px;outline:2px solid #0000;flex-direction:column;transition:outline .2s ease-in-out;display:flex;position:relative}.card:focus-visible,.card[aria-checked=true]{outline-color:currentColor}.card:has(>:checked,>:is([type=checkbox],[type=radio]):focus-visible){outline-color:currentColor}.card[aria-checked=true]:focus-visible{outline-width:4px}.card:has(>:checked:focus-visible){outline-width:4px}.card[aria-checked=true]:has(>:is([type=checkbox],[type=radio]):focus-visible){outline-width:4px}.card:has(>:is([type=checkbox],[type=radio])){cursor:pointer;-webkit-user-select:none;user-select:none}.card>:is([type=checkbox],[type=radio]){appearance:none}.textarea{appearance:none;border-radius:var(--radius-field);background-color:var(--color-base-100);vertical-align:middle;--input-color:var(--color-base-content);flex-shrink:1;min-height:5rem;padding-block:.5rem;padding-inline:.75rem}@supports (color:color-mix(in lab, red, red)){.textarea{--input-color:color-mix(in oklab, var(--color-base-content) 20%, #0000)}}.textarea{width:clamp(3rem,20rem,100%);font-size:max(var(--font-size,0rem), var(--font-size-min,.875rem));touch-action:manipulation;border:var(--border) solid var(--input-color,#0000);box-shadow:0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}@supports (color:color-mix(in lab, red, red)){.textarea{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * .1)) inset}}.textarea textarea{appearance:none;background-color:#0000;border:none}.textarea textarea::placeholder{color:var(--color-base-content);opacity:.5}.textarea textarea:focus,.textarea textarea:focus-within{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.textarea textarea:focus,.textarea textarea:focus-within{outline-offset:2px;outline:2px solid #0000}}.textarea:focus{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus{--font-size:1rem}}}.textarea:focus-within{--input-color:var(--color-base-content);box-shadow:0 1px var(--input-color)}@supports (color:color-mix(in lab, red, red)){.textarea:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus-within{--font-size:1rem}}}.textarea:has(>textarea[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:has(>textarea[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:has(>textarea[disabled]){box-shadow:none}.textarea:has(>textarea[disabled])::placeholder{color:var(--color-base-content);opacity:.2}.textarea:has(>textarea[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.textarea:is(:disabled,[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:is(:disabled,[disabled])::placeholder,.textarea:is(:disabled,[disabled]) ::placeholder{color:var(--color-base-content);opacity:.2}.textarea:has(>textarea[disabled])>textarea[disabled]{cursor:not-allowed}.stack{grid-template-rows:3px 4px 1fr 4px 3px;grid-template-columns:3px 4px 1fr 4px 3px;display:inline-grid}.stack>*{width:100%;height:100%}.stack>:nth-child(n+2){opacity:.7;width:100%}.stack>:nth-child(2){z-index:2;opacity:.9}.stack>:first-child{z-index:3;width:100%}.label{white-space:nowrap;color:currentColor;align-items:center;gap:.375rem;display:inline-flex}@supports (color:color-mix(in lab, red, red)){.label{color:color-mix(in oklab, currentcolor 60%, transparent)}}.label:has(input){cursor:pointer}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*){white-space:nowrap;height:calc(100% - .5rem);font-size:inherit;align-items:center;padding-inline:.75rem;display:flex}.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid currentColor;margin-inline:-.75rem .75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):first-child{border-inline-end:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid currentColor;margin-inline:.75rem -.75rem}@supports (color:color-mix(in lab, red, red)){.label:is(.input>*,.select>*):last-child{border-inline-start:var(--border) solid color-mix(in oklab, currentColor 10%, #0000)}}.status{aspect-ratio:1;border-radius:var(--radius-selector);background-color:var(--color-base-content);width:.5rem;height:.5rem;display:inline-block}@supports (color:color-mix(in lab, red, red)){.status{background-color:color-mix(in oklab, var(--color-base-content) 20%, transparent)}}.status{vertical-align:middle;color:#0000004d;background-position:50%;background-repeat:no-repeat}@supports (color:color-mix(in lab, red, red)){.status{color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.status{background-image:radial-gradient(circle at 35% 30%, oklch(1 0 0 / calc(var(--depth) * .5)), #0000);box-shadow:0 2px 3px -1px}@supports (color:color-mix(in lab, red, red)){.status{box-shadow:0 2px 3px -1px color-mix(in oklab, currentColor calc(var(--depth) * 100%), #0000)}}.badge{border-radius:var(--radius-selector);vertical-align:middle;color:var(--badge-fg);border:var(--border) solid var(--badge-color,var(--color-base-200));background-size:auto, calc(var(--noise) * 100%);background-image:none, var(--fx-noise);background-color:var(--badge-bg);--badge-bg:var(--badge-color,var(--color-base-100));--badge-fg:var(--color-base-content);--size:calc(var(--size-selector,.25rem) * 6);width:fit-content;height:var(--size);padding-inline:calc(var(--size) / 2 - var(--border));justify-content:center;align-items:center;gap:.5rem;font-size:.875rem;display:inline-flex}.footer{grid-auto-flow:row;place-items:start;gap:2.5rem 1rem;width:100%;font-size:.875rem;line-height:1.25rem;display:grid}.footer>:not(script,style,template){place-items:start;gap:.5rem;display:grid}.alert{--alert-border-color:var(--color-base-200);border-radius:var(--radius-box);color:var(--color-base-content);background-color:var(--alert-color,var(--color-base-200));text-align:start;background-size:auto, calc(var(--noise) * 33%);background-image:none, var(--fx-noise);box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px #000, 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08));border-style:solid;grid-template-columns:auto;grid-auto-flow:column;justify-content:start;place-items:center start;gap:1rem;padding-block:.75rem;padding-inline:1rem;font-size:.875rem;line-height:1.25rem;display:grid}@supports (color:color-mix(in lab, red, red)){.alert{box-shadow:0 3px 0 -2px oklch(100% 0 0 / calc(var(--depth) * .08)) inset, 0 1px color-mix(in oklab, color-mix(in oklab, #000 20%, var(--alert-color,var(--color-base-200))) calc(var(--depth) * 20%), #0000), 0 4px 3px -2px oklch(0% 0 0 / calc(var(--depth) * .08))}}.alert:has(>:nth-child(2)){grid-template-columns:auto minmax(auto,1fr)}.chat{--mask-chat:url("data:image/svg+xml,%3csvg width='13' height='13' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='M0 11.5004C0 13.0004 2 13.0004 2 13.0004H12H13V0.00036329L12.5 0C12.5 0 11.977 2.09572 11.8581 2.50033C11.6075 3.35237 10.9149 4.22374 9 5.50036C6 7.50036 0 10.0004 0 11.5004Z'/%3e%3c/svg%3e");grid-auto-rows:min-content;column-gap:.75rem;padding-block:.25rem;display:grid}.card-title{font-size:var(--cardtitle-fs,1.125rem);align-items:center;gap:.5rem;font-weight:600;display:flex}.mask{vertical-align:middle;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.menu .dropdown:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.link{cursor:pointer;text-decoration-line:underline}.link:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.link:focus{outline-offset:2px;outline:2px solid #0000}}.link:focus-visible{outline-offset:2px;outline:2px solid}.btn-outline{--btn-bg:#0000;color:var(--btn-rest-fg,var(--btn-color,var(--color-base-content)));--btn-border:var(--btn-color,var(--color-base-content));--btn-border-style:solid;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}.btn-ghost{--btn-bg:#0000;color:var(--btn-rest-fg,var(--btn-color,var(--color-base-content,currentColor)));--btn-border:#0000;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}.aura:has(>.card,>.alert){--aura-radius:var(--radius-box)}.aura:has(>.btn,>.input,>.select){--aura-radius:var(--radius-field)}.aura:has(>.checkbox,>.toggle,>.badge){--aura-radius:var(--radius-selector)}}@layer daisyui.l1.l2{.modal.modal-open{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal.modal-open>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal.modal-open){--page-scroll-lock: }@starting-style{.modal.modal-open{opacity:0}}.modal[open]{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal[open]>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal[open]){--page-scroll-lock: }@starting-style{.modal[open]{opacity:0}}.modal:popover-open{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal:popover-open>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal:popover-open){--page-scroll-lock: }@starting-style{.modal:popover-open{opacity:0}}.modal:target{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal:target>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal:target){--page-scroll-lock: }@starting-style{.modal:target{opacity:0}}.modal-toggle:checked+.modal{pointer-events:auto;visibility:visible;opacity:1;transition:visibility 0s allow-discrete, background-color .3s ease-out, opacity .1s ease-out;background-color:oklch(0% 0 0/.4)}.modal-toggle:checked+.modal>.modal-box{opacity:1;translate:0;scale:1}:host:has(.modal-toggle:checked+.modal){--page-scroll-lock: }@starting-style{.modal-toggle:checked+.modal{opacity:0}}.tabs-border>.tab{--tab-border-color:#0000 #0000 var(--tab-border-color) #0000;border-radius:var(--radius-field);position:relative}.tabs-border>.tab:before{content:"";background-color:var(--tab-border-color);width:calc(100% - var(--tab-p) * 2);border-radius:var(--radius-field);height:3px;bottom:0;left:var(--tab-p);transition:background-color .2s;position:absolute}:is(.tabs-border>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-border>.tab:is(input:checked),.tabs-border>.tab:is(label:has(:checked))):before{--tab-border-color:currentColor;border-top:3px solid}.tabs-lift>.tab{--tab-border:0 0 var(--border) 0;--tab-radius-ss:var(--tab-radius-limit);--tab-radius-se:var(--tab-radius-limit);--tab-radius-es:0;--tab-radius-ee:0;--tab-paddings:var(--border) var(--tab-p) 0 var(--tab-p);--tab-border-colors:#0000 #0000 var(--tab-border-color) #0000;--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right;border-width:var(--tab-border);padding:var(--tab-paddings);border-color:var(--tab-border-colors);border-start-start-radius:var(--tab-radius-ss);border-start-end-radius:var(--tab-radius-se);border-end-end-radius:var(--tab-radius-ee);border-end-start-radius:var(--tab-radius-es)}.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked)){--tab-border:var(--border) var(--border) 0 var(--border);--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);--tab-paddings:0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));--tab-inset:auto auto 0 auto;--radius-start:radial-gradient(circle at top left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at top right, var(--tab-radius-grad));background-color:var(--tab-bg)}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):before{z-index:1;content:"";width:var(--tab-corner-width);height:var(--tab-corner-height);background-position:var(--tab-corner-position);background-image:var(--radius-start), var(--radius-end);background-size:var(--tab-radius-limit) var(--tab-radius-limit);inset:var(--tab-inset);background-repeat:no-repeat;display:block;position:absolute}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):first-child:before{--radius-start:none}[dir=rtl] :is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):first-child:before{transform:rotateY(180deg)}:is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):last-child:before{--radius-end:none}[dir=rtl] :is(.tabs-lift>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-lift>.tab:is(input:checked,label:has(:checked))):last-child:before{transform:rotateY(180deg)}.tabs-lift:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color)}.tabs-top>.tab{--tab-order:0;--tab-border:0 0 var(--border) 0;--tab-radius-ss:var(--tab-radius-limit);--tab-radius-se:var(--tab-radius-limit);--tab-radius-es:0;--tab-radius-ee:0;--tab-paddings:var(--border) var(--tab-p) 0 var(--tab-p);--tab-border-colors:#0000 #0000 var(--tab-border-color) #0000;--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right}.tabs-top>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-top>.tab:is(input:checked),.tabs-top>.tab:is(label:has(:checked)){--tab-border:var(--border) var(--border) 0 var(--border);--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color);--tab-paddings:0 calc(var(--tab-p) - var(--border)) var(--border) calc(var(--tab-p) - var(--border));--tab-inset:auto auto 0 auto;--radius-start:radial-gradient(circle at top left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at top right, var(--tab-radius-grad))}.tabs-top:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:var(--tab-border-color) var(--tab-border-color) #0000 var(--tab-border-color)}.tabs-bottom>.tab{--tab-order:1;--tab-border:var(--border) 0 0 0;--tab-radius-ss:0;--tab-radius-se:0;--tab-radius-es:var(--tab-radius-limit);--tab-radius-ee:var(--tab-radius-limit);--tab-border-colors:var(--tab-border-color) #0000 #0000 #0000;--tab-paddings:0 var(--tab-p) var(--border) var(--tab-p);--tab-corner-width:calc(100% + var(--tab-radius-limit) * 2);--tab-corner-height:var(--tab-radius-limit);--tab-corner-position:top left, top right}.tabs-bottom>.tab:is(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]):not(.tab-disabled,[disabled]),.tabs-bottom>.tab:is(input:checked),.tabs-bottom>.tab:is(label:has(:checked)){--tab-border:0 var(--border) var(--border) var(--border);--tab-border-colors:#0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color);--tab-paddings:var(--border) calc(var(--tab-p) - var(--border)) 0 calc(var(--tab-p) - var(--border));--tab-inset:0 auto auto auto;--radius-start:radial-gradient(circle at bottom left, var(--tab-radius-grad));--radius-end:radial-gradient(circle at bottom right, var(--tab-radius-grad))}.tabs-bottom:has(>.tab-content)>.tab:first-child:not(.tab-active,[aria-selected=true],[aria-current=true],[aria-current=page]){--tab-border-colors:#0000 var(--tab-border-color) var(--tab-border-color) var(--tab-border-color)}.tabs-box>.tab{border-radius:var(--radius-field);border-style:none}.tabs-box>.tab:focus-visible,.tabs-box>.tab:is(label:has(:checked:focus-visible)){outline-offset:2px}.tabs-box>.tab:focus-visible{z-index:1}.tabs-xs>.tab{--tab-p:.375rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.75rem}.tabs-sm>.tab{--tab-p:.5rem;--tab-radius-min:calc(.5rem - var(--border));font-size:.875rem}.tabs-md>.tab{--tab-p:.75rem;--tab-radius-min:calc(.75rem - var(--border));font-size:.875rem}.tabs-lg>.tab{--tab-p:1rem;--tab-radius-min:calc(1.5rem - var(--border));font-size:1.125rem}.tabs-xl>.tab{--tab-p:1.25rem;--tab-radius-min:calc(2rem - var(--border));font-size:1.125rem}@media (prefers-reduced-motion:no-preference){.collapse:not(td,tr,colgroup)[open].collapse-arrow>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}}.collapse:not(td,tr,colgroup).collapse-open.collapse-plus>.collapse-title:after{--tw-content:"−";content:var(--tw-content)}:is(.collapse:not(td,tr,colgroup)[tabindex].collapse-arrow:focus:not(.collapse-close),.collapse:not(td,tr,colgroup).collapse-arrow[tabindex]:focus-within:not(.collapse-close))>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse:not(td,tr,colgroup)[open].collapse-plus>.collapse-title:after,.collapse:not(td,tr,colgroup)[tabindex].collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse:not(td,tr,colgroup).collapse-plus:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{--tw-content:"−";content:var(--tw-content)}.list .list-row:has(>.list-col-grow:first-child){--list-grid-cols:1fr}.list .list-row:has(>.list-col-grow:nth-child(2)){--list-grid-cols:minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(3)){--list-grid-cols:minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(4)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(5)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row:has(>.list-col-grow:nth-child(6)){--list-grid-cols:minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) minmax(0, auto) 1fr}.list .list-row>*{grid-row-start:1}.steps-horizontal .step{text-align:center;grid-template-rows:40px 1fr;grid-template-columns:auto;place-items:center;min-width:4rem;display:grid}.steps-horizontal .step:before{width:100%;height:.5rem;margin-inline-start:-100%;translate:0}[dir=rtl] :is(.steps-horizontal .step):before{translate:0}.steps-vertical .step{grid-template-rows:auto;grid-template-columns:40px 1fr;justify-items:start;gap:.5rem;min-height:4rem;display:grid}.steps-vertical .step:before{width:.5rem;height:100%;margin-inline-start:50%;translate:-50% -50%}[dir=rtl] :is(.steps-vertical .step):before{translate:50% -50%}.swap{cursor:pointer;vertical-align:middle;webkit-user-select:none;-webkit-user-select:none;user-select:none;place-content:center;display:inline-grid;position:relative}.swap input{appearance:none;border:none}.swap>*{grid-row-start:1;grid-column-start:1}@media (prefers-reduced-motion:no-preference){.swap>*{transition-property:transform,rotate,opacity;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1)}}.swap .swap-on,.swap .swap-indeterminate,.swap input:indeterminate~.swap-on,.swap input:is(:checked,:indeterminate)~.swap-off{opacity:0}.swap input:checked~.swap-on,.swap input:indeterminate~.swap-indeterminate{opacity:1;backface-visibility:visible}.checkbox:disabled{cursor:not-allowed;opacity:.2}.image-full>.card-body{color:var(--color-neutral-content);position:relative}.card-xs .card-body{--card-p:.5rem;--card-fs:.6875rem}.card-sm .card-body{--card-p:1rem;--card-fs:.75rem}.card-md .card-body{--card-p:1.5rem;--card-fs:.875rem}.card-lg .card-body{--card-p:2rem;--card-fs:1rem}.card-xl .card-body{--card-p:2.5rem;--card-fs:1.125rem}:is(.stack,.stack.stack-bottom)>*{grid-area:3/3/6/4}:is(.stack,.stack.stack-bottom)>:nth-child(2){grid-area:2/2/5/5}:is(.stack,.stack.stack-bottom)>:first-child{grid-area:1/1/4/6}.stack.stack-top>*{grid-area:1/3/4/4}.stack.stack-top>:nth-child(2){grid-area:2/2/5/5}.stack.stack-top>:first-child{grid-area:3/1/6/6}.stack.stack-start>*{grid-area:3/1/4/4}.stack.stack-start>:nth-child(2){grid-area:2/2/5/5}.stack.stack-start>:first-child{grid-area:1/3/6/6}.stack.stack-end>*{grid-area:3/3/4/6}.stack.stack-end>:nth-child(2){grid-area:2/2/5/5}.stack.stack-end>:first-child{grid-area:1/1/6/4}.card-xs .card-title{--cardtitle-fs:.875rem}.card-sm .card-title{--cardtitle-fs:1rem}.card-md .card-title{--cardtitle-fs:1.125rem}.card-lg .card-title{--cardtitle-fs:1.25rem}.card-xl .card-title{--cardtitle-fs:1.375rem}.btn-circle{width:var(--size);height:var(--size);border-radius:2147483647px;padding-inline:0}.loading-sm{width:calc(var(--size-selector,.25rem) * 5)}.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='8s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}@media (prefers-reduced-motion:no-preference){.loading-spinner{-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E")}}.checkbox-sm{--size:calc(var(--size-selector,.25rem) * 5);padding:.1875rem}.checkbox-xs{--size:calc(var(--size-selector,.25rem) * 4);padding:.125rem}.checkbox-secondary{color:var(--color-secondary-content);--input-color:var(--color-secondary)}.btn-neutral{--btn-color:var(--color-neutral);--btn-fg:var(--color-neutral-content);--btn-soft-bg:var(--color-neutral-content) 80%;--btn-rest-fg:initial}.btn-accent{--btn-color:var(--color-accent);--btn-fg:var(--color-accent-content);--btn-soft-bg:initial}.btn-error{--btn-color:var(--color-error);--btn-fg:var(--color-error-content);--btn-soft-bg:initial}.btn-info{--btn-color:var(--color-info);--btn-fg:var(--color-info-content);--btn-soft-bg:initial}.btn-lg{--fontsize:1.125rem;--btn-p:1.25rem;--size:calc(var(--size-field,.25rem) * 12)}.btn-primary{--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content);--btn-soft-bg:initial}.btn-sm{--fontsize:.75rem;--btn-p:.75rem;--size:calc(var(--size-field,.25rem) * 8)}.btn-xs{--fontsize:.6875rem;--btn-p:.5rem;--size:calc(var(--size-field,.25rem) * 6)}.textarea-sm{--font-size-min:.75rem}.floating-label:has(.textarea-sm){--top-mul:4;--font-size:.75rem}}.prose :where(a.btn:not(.btn-link)):not(:where([class~=not-prose],[class~=not-prose] *)){text-decoration-line:none}@layer daisyui.l1{@media (hover:hover){.btn:hover{--btn-bg:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:hover{color:var(--btn-fg);--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:hover{--btn-border-style:solid;--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:hover{--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}}.btn:active:not(.btn-active){--btn-bg:var(--btn-color,var(--color-base-200));translate:0 .5px}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-bg:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 5%)}}.btn:active:not(.btn-active){color:var(--btn-fg,var(--color-base-content));--btn-border:var(--btn-color,var(--color-base-200))}@supports (color:color-mix(in lab, red, red)){.btn:active:not(.btn-active){--btn-border:color-mix(in oklab, var(--btn-color,var(--color-base-200)), #000 7%)}}.btn:active:not(.btn-active){--btn-border-style:solid;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0)}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-bg:var(--btn-color,var(--color-base-200));color:var(--btn-fg,var(--color-base-content));--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-border-style:solid;--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn:where(:checked:not(.filter [type=radio].btn),:not([type=radio],[type=checkbox]):focus-visible){isolation:isolate}.btn:focus-visible{isolation:isolate;outline-width:2px;outline-style:solid}.btn:has(:focus-visible){isolation:isolate;outline-width:2px;outline-style:solid}.filter:not(:has(:checked:not(.filter-reset))) :is(.filter-reset,[type=reset]):not(:focus-visible){visibility:hidden;opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}.filter:not(:has(:focus-visible)):has(:checked:not(.filter-reset,[type=checkbox])) :is(input,button):not(:checked,.filter-reset,[type=reset]){opacity:0;border-width:0;width:0;margin-inline:0;padding-inline:0;scale:0}}@layer daisyui{.btn:is(:disabled,[disabled],[aria-disabled=true]){pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true]){color:color-mix(in oklch, var(--color-base-content) 20%, #0000)}}.btn:is(:disabled,[disabled],[aria-disabled=true]){--btn-bg:#0000;--btn-border:#0000;--btn-inset:0 0 0 0 oklch(0% 0 0/0);--btn-shadow:0 0 0 0 oklch(0% 0 0/0);background-image:none}:is(.btn-disabled,.btn:is(:disabled,[disabled],[aria-disabled=true])):not(.btn-link,.btn-ghost){background-color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.btn-disabled,.btn:is(:disabled,[disabled],[aria-disabled=true])):not(.btn-link,.btn-ghost){background-color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse:not(td,tr,colgroup){visibility:revert-layer}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}:is(.input[type=url],.input[type=tel],.input[type=email],.input[type=number]):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-start-start-radius:var(--join-se,var(--radius-field));border-start-end-radius:var(--join-ss,var(--radius-field));border-end-end-radius:var(--join-es,var(--radius-field));border-end-start-radius:var(--join-ee,var(--radius-field))}@layer daisyui.l1.l2.l3.l4{.card-body p{flex-grow:1}.card figure:first-child{border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-end-radius:unset;border-end-start-radius:unset;overflow:hidden}.card figure:last-child{border-start-start-radius:unset;border-start-end-radius:unset;border-end-end-radius:inherit;border-end-start-radius:inherit;overflow:hidden}.card figure{justify-content:center;align-items:center;display:flex}}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-4{inset:calc(var(--spacing) * 4)}.inset-\\[12\\%\\]{inset:12%}.inset-\\[16\\%\\]{inset:16%}.inset-\\[20\\%\\]{inset:20%}.inset-\\[28\\%\\]{inset:28%}.inset-x-0{inset-inline:0}.inset-x-8{inset-inline:calc(var(--spacing) * 8)}.-top-0\\.5{top:calc(var(--spacing) * -.5)}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:0}.top-1{top:var(--spacing)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-4{top:calc(var(--spacing) * 4)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing) * -.5)}.-right-2{right:calc(var(--spacing) * -2)}.right-0{right:0}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.right-\\[-6px\\]{right:-6px}.bottom-0{bottom:0}.bottom-1{bottom:var(--spacing)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-24{bottom:calc(var(--spacing) * 24)}.bottom-\\[20\\%\\]{bottom:20%}.bottom-full{bottom:100%}.-left-2{left:calc(var(--spacing) * -2)}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.left-\\[-6px\\]{left:-6px}.join{--join-ss:0;--join-se:0;--join-es:0;--join-ee:0;--join-ml:0;--join-mt:0;--join-v:0;--join-h:1;align-items:stretch;display:inline-flex}@scope(.join){:scope>:where(:focus,:has(:focus)){z-index:2}@media (hover:hover){:scope>:where(.btn:hover,:has(.btn:hover)){z-index:1}}:scope :where(:scope>:first-child){--join-ss:var(--radius-field);--join-se:calc(var(--radius-field) * var(--join-v));--join-es:calc(var(--radius-field) * var(--join-h));--join-ee:0}:scope :where(:scope>:last-child){--join-ss:0;--join-se:calc(var(--radius-field) * var(--join-h));--join-es:calc(var(--radius-field) * var(--join-v));--join-ee:var(--radius-field)}:scope :where(:scope>:only-child){--join-ss:var(--radius-field);--join-se:var(--radius-field);--join-es:var(--radius-field);--join-ee:var(--radius-field)}:scope :where(:scope>:not(:first-child)){--join-ml:calc(var(--border,1px) * -1 * var(--join-h));--join-mt:calc(var(--border,1px) * -1 * var(--join-v))}}.z-0{z-index:0}.z-2{z-index:2}.z-5{z-index:5}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[5\\]{z-index:5}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.row-start-2{grid-row-start:2}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-0\\.5{margin-inline:calc(var(--spacing) * .5)}.mx-auto{margin-inline:auto}.my-auto{margin-block:auto}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.alert{border-width:var(--border);border-color:var(--alert-border-color,var(--color-base-200))}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.aspect-9\\/16{aspect-ratio:9/16}.aspect-\\[var\\(--tavus-expand-aspect\\)\\]{aspect-ratio:var(--tavus-expand-aspect)}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.select-control-pill{--size:calc(var(--size-field,.25rem) * 10);--icon-size:calc(var(--size-field,.25rem) * 5);--chevron-size:calc(var(--size-field,.25rem) * 3);width:calc(var(--size) + 1.25rem);height:var(--size);border-radius:var(--radius-field)}.btn-control{--icon-size:calc(var(--size-field,.25rem) * 5);width:var(--size);height:var(--size);padding-inline:0}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.h-0{height:0}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-2\\/5{height:40%}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-16{height:calc(var(--spacing) * 16)}.h-\\[100dvh\\]{height:100dvh}.h-\\[min\\(34rem\\,calc\\(100dvh-3rem\\)\\)\\]{height:min(34rem,100dvh - 3rem)}.h-\\[var\\(--tavus-expand-height\\)\\]{height:var(--tavus-expand-height)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-15{max-height:calc(var(--spacing) * 15)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-\\[var\\(--tavus-expand-max-height\\)\\]{max-height:var(--tavus-expand-max-height)}.max-h-none{max-height:none}.max-h-screen{max-height:100vh}.min-h-0{min-height:0}.w-0{width:0}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-16{width:calc(var(--spacing) * 16)}.w-32{width:calc(var(--spacing) * 32)}.w-64{width:calc(var(--spacing) * 64)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[3px\\]{width:3px}.w-\\[22rem\\]{width:22rem}.w-\\[28rem\\]{width:28rem}.w-\\[100vw\\]{width:100vw}.w-\\[var\\(--tavus-expand-width\\)\\]{width:var(--tavus-expand-width)}.w-full{width:100%}.w-max{width:max-content}.w-screen{width:100vw}.max-w-56{max-width:calc(var(--spacing) * 56)}.max-w-\\[22rem\\]{max-width:22rem}.max-w-\\[80\\%\\]{max-width:80%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-\\[min\\(20rem\\,80vw\\)\\]{max-width:min(20rem,80vw)}.max-w-\\[min\\(48cqi\\,16rem\\)\\]{max-width:min(48cqi,16rem)}.max-w-\\[var\\(--tavus-expand-max-width\\)\\]{max-width:var(--tavus-expand-max-width)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\\[0\\.98\\]{scale:.98}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.animate-\\[tavusFadeUp_240ms_ease-out\\]{animation:.24s ease-out tavusFadeUp}.animate-\\[tavusPopIn_180ms_ease-out\\]{animation:.18s ease-out tavusPopIn}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.\\[scrollbar-gutter\\:stable\\]{scrollbar-gutter:stable}.appearance-none{appearance:none}.grid-cols-\\[1fr_auto\\]{grid-template-columns:1fr auto}.grid-cols-\\[5\\.5rem_1fr\\]{grid-template-columns:5.5rem 1fr}.grid-rows-\\[1fr_auto\\]{grid-template-rows:1fr auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\\[2px\\]{gap:2px}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--radius-box);border-radius:var(--radius-box)}.rounded-field{border-radius:var(--radius-field);border-radius:var(--radius-field)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-\\[length\\:var\\(--border\\)\\]{border-style:var(--tw-border-style);border-width:var(--border)}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-base-300{border-color:var(--color-base-300)}.border-info\\/80{border-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.border-info\\/80{border-color:color-mix(in oklab, var(--color-info) 80%, transparent)}}.border-success{border-color:var(--color-success)}.border-warning,.border-warning\\/70{border-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\\/70{border-color:color-mix(in oklab, var(--color-warning) 70%, transparent)}}.border-white\\/50{border-color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.border-white\\/50{border-color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.glass{-webkit-backdrop-filter:blur(var(--glass-blur,40px));backdrop-filter:blur(var(--glass-blur,40px));background-color:#0000;background-image:linear-gradient(135deg, oklch(100% 0 0 / var(--glass-opacity,30%)) 0%, oklch(0% 0 0/0) 100%), linear-gradient(var(--glass-reflect-degree,100deg), oklch(100% 0 0 / var(--glass-reflect-opacity,5%)) 25%, oklch(0% 0 0/0) 25%);box-shadow:0 0 0 1px oklch(100% 0 0 / var(--glass-border-opacity,20%)) inset, 0 0 0 2px oklch(0% 0 0/.05);text-shadow:0 1px oklch(0% 0 0 / var(--glass-text-shadow-opacity,5%));border:none}.bg-base-100,.bg-base-100\\/70{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/70{background-color:color-mix(in oklab, var(--color-base-100) 70%, transparent)}}.bg-base-100\\/95{background-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.bg-base-100\\/95{background-color:color-mix(in oklab, var(--color-base-100) 95%, transparent)}}.bg-base-200{background-color:var(--color-base-200)}.bg-base-300{background-color:var(--color-base-300)}.bg-black{background-color:var(--color-black)}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\\/35{background-color:#00000059}@supports (color:color-mix(in lab, red, red)){.bg-black\\/35{background-color:color-mix(in oklab, var(--color-black) 35%, transparent)}}.bg-black\\/45{background-color:#00000073}@supports (color:color-mix(in lab, red, red)){.bg-black\\/45{background-color:color-mix(in oklab, var(--color-black) 45%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-info\\/5{background-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.bg-info\\/5{background-color:color-mix(in oklab, var(--color-info) 5%, transparent)}}.bg-info\\/85{background-color:var(--color-info)}@supports (color:color-mix(in lab, red, red)){.bg-info\\/85{background-color:color-mix(in oklab, var(--color-info) 85%, transparent)}}.bg-neutral{background-color:var(--color-neutral)}.bg-primary,.bg-primary\\/15{background-color:var(--color-primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/15{background-color:color-mix(in oklab, var(--color-primary) 15%, transparent)}}.bg-success\\/70{background-color:var(--color-success)}@supports (color:color-mix(in lab, red, red)){.bg-success\\/70{background-color:color-mix(in oklab, var(--color-success) 70%, transparent)}}.bg-success\\/85{background-color:var(--color-success)}@supports (color:color-mix(in lab, red, red)){.bg-success\\/85{background-color:color-mix(in oklab, var(--color-success) 85%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning,.bg-warning\\/5{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/5{background-color:color-mix(in oklab, var(--color-warning) 5%, transparent)}}.bg-warning\\/85{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/85{background-color:color-mix(in oklab, var(--color-warning) 85%, transparent)}}.bg-warning\\/90{background-color:var(--color-warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\\/90{background-color:color-mix(in oklab, var(--color-warning) 90%, transparent)}}.bg-linear-to-b{--tw-gradient-position:to bottom}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-b{--tw-gradient-position:to bottom in oklab}}.bg-linear-to-b{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-t{--tw-gradient-position:to top}@supports (background-image:linear-gradient(in lab, red, red)){.bg-linear-to-t{--tw-gradient-position:to top in oklab}}.bg-linear-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.from-base-300{--tw-gradient-from:var(--color-base-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/30{--tw-gradient-from:#0000004d}@supports (color:color-mix(in lab, red, red)){.from-black\\/30{--tw-gradient-from:color-mix(in oklab, var(--color-black) 30%, transparent)}}.from-black\\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/60{--tw-gradient-from:#0009}@supports (color:color-mix(in lab, red, red)){.from-black\\/60{--tw-gradient-from:color-mix(in oklab, var(--color-black) 60%, transparent)}}.from-black\\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab, red, red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab, var(--color-black) 70%, transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-black\\/10{--tw-gradient-via:#0000001a}@supports (color:color-mix(in lab, red, red)){.via-black\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-black) 10%, transparent)}}.via-black\\/10{--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);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-base-200{--tw-gradient-to:var(--color-base-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-cover\\!{object-fit:cover!important}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-8{padding:calc(var(--spacing) * 8)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-16{padding-inline:calc(var(--spacing) * 16)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-2\\.5{padding-left:calc(var(--spacing) * 2.5)}.text-center{text-align:center}.text-left{text-align:left}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[0\\.6rem\\]{font-size:.6rem}.text-\\[10px\\]{font-size:10px}.text-preview-description-full-screen{font-size:var(--text-preview-description-full-screen)}.text-preview-title{font-size:var(--text-preview-title)}.text-preview-title-full-screen{font-size:var(--text-preview-title-full-screen)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.text-base-content,.text-base-content\\/50{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/50{color:color-mix(in oklab, var(--color-base-content) 50%, transparent)}}.text-base-content\\/60{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/60{color:color-mix(in oklab, var(--color-base-content) 60%, transparent)}}.text-base-content\\/70{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.text-base-content\\/70{color:color-mix(in oklab, var(--color-base-content) 70%, transparent)}}.text-error{color:var(--color-error)}.text-info{color:var(--color-info)}.text-info-content{color:var(--color-info-content)}.text-inherit{color:inherit}.text-neutral{color:var(--color-neutral)}.text-neutral-content{color:var(--color-neutral-content)}.text-primary{color:var(--color-primary)}.text-primary-content{color:var(--color-primary-content)}.text-secondary{color:var(--color-secondary)}.text-success{color:var(--color-success)}.text-success-content{color:var(--color-success-content)}.text-warning{color:var(--color-warning)}.text-warning-content{color:var(--color-warning-content)}.text-white{color:var(--color-white)}.text-white\\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-base-100,.ring-base-100\\/20{--tw-ring-color:var(--color-base-100)}@supports (color:color-mix(in lab, red, red)){.ring-base-100\\/20{--tw-ring-color:color-mix(in oklab, var(--color-base-100) 20%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-xl{--tw-blur:blur(var(--blur-xl));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,)}.brightness-\\[0\\.55\\]{--tw-brightness:brightness(.55);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,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xs{--tw-backdrop-blur:blur(var(--blur-xs));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\]{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.btn-preview-action{--btn-color:var(--color-preview-action);--btn-fg:var(--color-preview-action-content)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[--tavus-expand-default-max-height\\:900px\\]{--tavus-expand-default-max-height:900px}.\\[--tavus-expand-default-max-width\\:1280px\\]{--tavus-expand-default-max-width:1280px}.\\[text-shadow\\:0_1px_3px_rgb\\(0_0_0\\/0\\.45\\)\\]{text-shadow:0 1px 3px #00000073}.btn{--icon-size:calc(var(--size-field,.25rem) * 5)}.backdrop\\:bg-black\\/60::backdrop{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.backdrop\\:bg-black\\/60::backdrop{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}@media (hover:hover){.hover\\:bg-base-200:hover{background-color:var(--color-base-200)}.hover\\:bg-black\\/50:hover{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/50:hover{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.hover\\:text-base-content\\/80:hover{color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){.hover\\:text-base-content\\/80:hover{color:color-mix(in oklab, var(--color-base-content) 80%, transparent)}}.hover\\:text-error:hover{color:var(--color-error)}.hover\\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.has-\\[\\.cvi-video-surface\\]\\:will-change-transform:has(.cvi-video-surface){will-change:transform}@media (prefers-reduced-motion:no-preference){.motion-safe\\:animate-\\[tavusFadeOut_280ms_ease-out_forwards\\]{animation:.28s ease-out forwards tavusFadeOut}.motion-safe\\:animate-\\[tavusFadeUp_180ms_ease-out\\]{animation:.18s ease-out tavusFadeUp}.motion-safe\\:animate-\\[tavusFadeUp_280ms_ease-out\\]{animation:.28s ease-out tavusFadeUp}.motion-safe\\:backdrop\\:animate-\\[tavusFadeIn_180ms_ease-out\\]::backdrop{animation:.18s ease-out tavusFadeIn}}@container not (width>=56.25rem){.\\@max-mobile\\:inset-x-5{inset-inline:calc(var(--spacing) * 5)}.\\@max-mobile\\:right-3{right:calc(var(--spacing) * 3)}.\\@max-mobile\\:bottom-20{bottom:calc(var(--spacing) * 20)}.\\@max-mobile\\:left-3{left:calc(var(--spacing) * 3)}.\\@max-mobile\\:col-span-2{grid-column:span 2/span 2}.\\@max-mobile\\:row-start-1{grid-row-start:1}.\\@max-mobile\\:block{display:block}.\\@max-mobile\\:aspect-9\\/16{aspect-ratio:9/16}.\\@max-mobile\\:w-24{width:calc(var(--spacing) * 24)}.\\@max-mobile\\:w-full{width:100%}.\\@max-mobile\\:gap-1{gap:var(--spacing)}.\\@max-mobile\\:self-start{align-self:flex-start}.\\@max-mobile\\:p-5{padding:calc(var(--spacing) * 5)}.\\@max-mobile\\:px-5{padding-inline:calc(var(--spacing) * 5)}.\\@max-mobile\\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\\@max-mobile\\:text-preview-title-narrow{font-size:var(--text-preview-title-narrow)}}@container not (width>=48rem){.\\@max-3xl\\:px-10{padding-inline:calc(var(--spacing) * 10)}}@container not (width>=28rem){.\\@max-md\\:hidden{display:none}.\\@max-md\\:p-4{padding:calc(var(--spacing) * 4)}.\\@max-md\\:px-5{padding-inline:calc(var(--spacing) * 5)}@layer daisyui.l1.l2{.\\@max-md\\:btn-md{--fontsize:.875rem;--btn-p:1rem;--size:calc(var(--size-field,.25rem) * 10)}}}@container (width>=48rem){.\\@3xl\\:grid-cols-\\[1fr_1\\.2fr\\]{grid-template-columns:1fr 1.2fr}}@media (width<=768px){.\\[\\@media\\(max-width\\:768px\\)\\]\\:h-dvh{height:100dvh}.\\[\\@media\\(max-width\\:768px\\)\\]\\:max-h-none{max-height:none}.\\[\\@media\\(max-width\\:768px\\)\\]\\:w-screen{width:100vw}.\\[\\@media\\(max-width\\:768px\\)\\]\\:max-w-none{max-width:none}}@media (width>=2560px){.\\[\\@media\\(min-width\\:2560px\\)\\]\\:\\[--tavus-expand-default-max-height\\:1200px\\]{--tavus-expand-default-max-height:1200px}.\\[\\@media\\(min-width\\:2560px\\)\\]\\:\\[--tavus-expand-default-max-width\\:1600px\\]{--tavus-expand-default-max-width:1600px}}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-bg:var(--btn-color,var(--color-base-200));--btn-border:var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-border:color-mix(in oklab, var(--btn-bg), #000 calc(var(--depth) * 5%))}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-shadow:0 3px 2px -2px var(--btn-bg), 0 4px 3px -2px var(--btn-bg)}@supports (color:color-mix(in lab, red, red)){.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-shadow:0 3px 2px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000), 0 4px 3px -2px color-mix(in oklab, var(--btn-bg) calc(var(--depth) * 30%), #0000)}}.btn:is(:disabled,[disabled],[aria-disabled=true],.btn-disabled):not(.btn-link,.btn-ghost,.btn-outline){--btn-inset:0 .5px 0 .5px oklch(100% 0 0 / calc(var(--depth) * 6%));background-color:var(--btn-bg);background-image:none, var(--fx-noise);color:var(--btn-fg);opacity:.9}.cvi-autohide{transition-property:opacity,transform;transition-duration:.3s;transition-timing-function:cubic-bezier(.16,1,.3,1)}.cvi-control-rail{pointer-events:auto}.cvi-autohide[data-hidden=true]{opacity:0;transition-timing-function:cubic-bezier(.7,0,.84,0)}.cvi-autohide-slide[data-hidden=true]{transform:translateY(100%)}.cvi-control-rail[data-hidden=true]{pointer-events:none}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide{opacity:0;transition-timing-function:cubic-bezier(.7,0,.84,0)}.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide-slide{transform:translateY(100%)}.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-control-rail{pointer-events:none}}@media (prefers-reduced-motion:reduce){.cvi-autohide{transition:none}}@media (hover:hover) and (pointer:fine){.cvi-call-surface:not(:hover):not(:has(:focus-visible)) .cvi-autohide[data-pinned=true]:not([data-hidden=true]){opacity:1;transition-timing-function:cubic-bezier(.16,1,.3,1)}}.embed-loading-screen{isolation:isolate;background-color:var(--color-base-200);color:var(--color-base-content);flex-direction:column;justify-content:center;align-items:center;display:flex}.embed-loading-screen:before{content:"";z-index:0;pointer-events:none;opacity:.42;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'><rect x='0' y='0' width='1' height='1' fill='white' fill-opacity='0.55'/><rect x='2' y='1' width='1' height='1' fill='white' fill-opacity='0.24'/><rect x='1' y='3' width='1' height='1' fill='white' fill-opacity='0.36'/></svg>");background-size:4px 4px;position:absolute;inset:-2rem;-webkit-mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%);mask-image:radial-gradient(circle at 50% 48%,#000,#0000 72%)}.embed-loading-dot-field{z-index:1;grid-template-columns:repeat(var(--dot-columns,21), minmax(0, 1fr));grid-template-rows:repeat(var(--dot-rows,13), minmax(0, 1fr));pointer-events:none;grid-auto-rows:0;place-items:center;display:grid;position:absolute;inset:0;overflow:hidden}.embed-loading-field-dot{aspect-ratio:1;width:clamp(2px,.28vw,4px);opacity:var(--dot-opacity,.54);animation:embed-loading-field-dot 2.1s steps(5, end) var(--dot-delay,0s) infinite;background:currentColor;border-radius:999px;transform:scale(1)}@container conversation (width<=899.98px){.embed-loading-dot-field{inset:0}}@keyframes embed-loading-field-dot{0%,16%{opacity:var(--dot-opacity,.54);transform:scale(1)}42%,74%{opacity:0;transform:scale(.35)}to{opacity:var(--dot-opacity,.54);transform:scale(1)}}@media (prefers-reduced-motion:reduce){.embed-loading-field-dot{animation:none}}.cs-dot{opacity:0;animation:1.4s ease-in-out infinite cs-dot-fade;display:inline-block}.cs-dot:first-child{animation-delay:0s}.cs-dot:nth-child(2){animation-delay:.2s}.cs-dot:nth-child(3){animation-delay:.4s}@keyframes cs-dot-fade{0%,80%,to{opacity:0}40%{opacity:1}}@keyframes tavusFadeUp{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes tavusFadeOut{0%{opacity:1}to{opacity:0}}@keyframes tavusFadeIn{0%{opacity:0}to{opacity:1}}@keyframes tavusPopIn{0%{opacity:0;transform:scale(.92)translateY(8px)}to{opacity:1;transform:scale(1)translateY(0)}}@keyframes tavusOrbSpin{to{transform:rotate(360deg)}}@keyframes tavusOrbPulse{0%,to{opacity:.18;transform:scale(1)}50%{opacity:.34;transform:scale(1.18)}}@keyframes tavusAudioWave{0%{opacity:var(--wave-peak,.25);transform:scale(1)}to{opacity:0;transform:scale(1.9)}}.tavus-mesh-bg{isolation:isolate;background-color:var(--color-base-200);background-image:radial-gradient(ellipse 90% 90% at 18% 14%, var(--color-primary), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, var(--color-secondary), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, var(--color-accent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, var(--color-info,var(--color-secondary)), transparent 55%), radial-gradient(circle at 52% 48%, var(--color-primary), transparent 60%);width:100%;height:100%;position:relative;overflow:hidden}@supports (color:color-mix(in lab, red, red)){.tavus-mesh-bg{background-image:radial-gradient(ellipse 90% 90% at 18% 14%, color-mix(in oklab, var(--color-primary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 82% 18%, color-mix(in oklab, var(--color-secondary) 90%, transparent), transparent 55%), radial-gradient(ellipse 95% 90% at 22% 88%, color-mix(in oklab, var(--color-accent) 90%, transparent), transparent 55%), radial-gradient(ellipse 90% 95% at 80% 84%, color-mix(in oklab, var(--color-info,var(--color-secondary)) 90%, transparent), transparent 55%), radial-gradient(circle at 52% 48%, color-mix(in oklab, var(--color-primary) 35%, transparent), transparent 60%)}}.tavus-mesh-bg>.tavus-mesh-blob{filter:blur(60px);will-change:transform;pointer-events:none;opacity:.65;border-radius:50%;position:absolute}.tavus-mesh-bg>.tavus-mesh-blob-1{background-color:var(--color-primary);width:55%;height:60%;animation:23s ease-in-out infinite tavusMeshFlow1;top:6%;left:4%}.tavus-mesh-bg>.tavus-mesh-blob-2{background-color:var(--color-secondary);width:50%;height:55%;animation:28s ease-in-out infinite tavusMeshFlow2;top:10%;right:6%}.tavus-mesh-bg>.tavus-mesh-blob-3{background-color:var(--color-accent);width:58%;height:50%;animation:21s ease-in-out infinite tavusMeshFlow3;bottom:8%;left:6%}.tavus-mesh-bg>.tavus-mesh-blob-4{background-color:var(--color-info,var(--color-secondary));width:52%;height:55%;animation:26s ease-in-out infinite tavusMeshFlow4;bottom:6%;right:8%}.tavus-mesh-bg>.tavus-mesh-blob-5{background-color:var(--color-primary);opacity:.45;width:42%;height:46%;animation:19s ease-in-out infinite tavusMeshFlow5;top:28%;left:30%}@keyframes tavusMeshFlow1{0%,to{transform:translate(0%)scale(1)}20%{transform:translate(18%,10%)scale(1.08)}45%{transform:translate(10%,24%)scale(1.14)}70%{transform:translate(24%,18%)scale(1.06)}}@keyframes tavusMeshFlow2{0%,to{transform:translate(0%)scale(1)}30%{transform:translate(-22%,14%)scale(1.1)}55%{transform:translate(-30%,6%)scale(1.05)}80%{transform:translate(-12%,22%)scale(1.12)}}@keyframes tavusMeshFlow3{0%,to{transform:translate(0%)scale(1)}25%{transform:translate(20%,-14%)scale(1.06)}60%{transform:translate(28%,-22%)scale(1.14)}85%{transform:translate(14%,-10%)scale(1.04)}}@keyframes tavusMeshFlow4{0%,to{transform:translate(0%)scale(1)}35%{transform:translate(-18%,-22%)scale(1.12)}60%{transform:translate(-26%,-12%)scale(1.06)}85%{transform:translate(-8%,-26%)scale(1.1)}}@keyframes tavusMeshFlow5{0%,to{transform:translate(0%)scale(1)rotate(0)}25%{transform:translate(28%,-12%)scale(1.18)rotate(90deg)}50%{transform:translate(-6%,26%)scale(.85)rotate(180deg)}75%{transform:translate(-26%,-8%)scale(1.08)rotate(270deg)}}@media (prefers-reduced-motion:reduce){.tavus-mesh-bg>.tavus-mesh-blob{animation:none}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes radio{0%{padding:5px}50%{padding:3px}}@keyframes rotator{89.9999%,to{--first-item-position:0 0%}90%,99.9999%{--first-item-position:0 calc(var(--items) * 100%)}to{translate:0 -100%}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@keyframes dropdown{0%{opacity:0}}@keyframes aura{to{--aura-angle:360deg;transform:translateZ(1px)}}@keyframes aura-glow{20%,80%{opacity:.7;filter:blur(.25rem)}50%{opacity:1;filter:blur(.75rem)}}@keyframes aura-glow-after{20%,80%{opacity:.3;filter:blur(1rem)}50%{opacity:.6;filter:blur(1.5rem)}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes menu{0%{opacity:0}}@keyframes progress{50%{background-position-x:-115%}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}`,Le,Re,ze,Be,Ve=0,He=[],Ue=i,We=Ue.__b,Ge=Ue.__r,Ke=Ue.diffed,qe=Ue.__c,Je=Ue.unmount,Ye=Ue.__;function Xe(e,t){Ue.__h&&Ue.__h(Re,e,Ve||t),Ve=0;var n=Re.__H||(Re.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function A(e){return Ve=1,Ze(ot,e)}function Ze(e,t,n){var r=Xe(Le++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ot(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Re,!Re.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};Re.__f=!0;var a=Re.shouldComponentUpdate,o=Re.componentWillUpdate;Re.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},Re.shouldComponentUpdate=i}return r.__N||r.__}function j(e,t){var n=Xe(Le++,3);!Ue.__s&&at(n.__H,t)&&(n.__=e,n.u=t,Re.__H.__h.push(n))}function Qe(e,t){var n=Xe(Le++,4);!Ue.__s&&at(n.__H,t)&&(n.__=e,n.u=t,Re.__h.push(n))}function M(e){return Ve=5,N(function(){return{current:e}},[])}function N(e,t){var n=Xe(Le++,7);return at(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function P(e,t){return Ve=8,N(function(){return e},t)}function F(e){var t=Re.context[e.__c],n=Xe(Le++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(Re)),t.props.value):e.__}function $e(){var e=Xe(Le++,11);if(!e.__){for(var t=Re.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function et(){for(var e;e=He.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(rt),t.__h.some(it),t.__h=[]}catch(n){t.__h=[],Ue.__e(n,e.__v)}}}Ue.__b=function(e){Re=null,We&&We(e)},Ue.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ye&&Ye(e,t)},Ue.__r=function(e){Ge&&Ge(e),Le=0;var t=(Re=e.__c).__H;t&&(ze===Re?(t.__h=[],Re.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(rt),t.__h.some(it),t.__h=[],Le=0)),ze=Re},Ue.diffed=function(e){Ke&&Ke(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(He.push(t)!==1&&Be===Ue.requestAnimationFrame||((Be=Ue.requestAnimationFrame)||nt)(et)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),ze=Re=null},Ue.__c=function(e,t){t.some(function(e){try{e.__h.some(rt),e.__h=e.__h.filter(function(e){return!e.__||it(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Ue.__e(n,e.__v)}}),qe&&qe(e,t)},Ue.unmount=function(e){Je&&Je(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{rt(e)}catch(e){t=e}}),n.__H=void 0,t&&Ue.__e(t,n.__v))};var tt=typeof requestAnimationFrame==`function`;function nt(e){var t,n=function(){clearTimeout(r),tt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);tt&&(t=requestAnimationFrame(n))}function rt(e){var t=Re,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Re=t}function it(e){var t=Re;e.__c=e.__(),Re=t}function at(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function ot(e,t){return typeof t==`function`?t(e):t}var st=16/9,ct=9/16,lt=`var(--tavus-expand-default-max-width)`,ut=`var(--tavus-expand-default-max-height)`,dt=`100vw - 40px`,ft=`100dvh - 40px`;function pt(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t||Array.isArray(t))return;let n=t,r={};return typeof n.enabled==`boolean`&&(r.enabled=n.enabled),typeof n.fullscreen==`boolean`&&(r.fullscreen=n.fullscreen),(n.aspect===`horizontal`||n.aspect===`vertical`)&&(r.aspect=n.aspect),(typeof n.custom_aspect==`string`||typeof n.custom_aspect==`number`)&&(r.custom_aspect=n.custom_aspect),typeof n.max_width==`number`&&(r.max_width=n.max_width),typeof n.max_height==`number`&&(r.max_height=n.max_height),r}function mt(e){if(typeof e==`number`)return _t(e);if(typeof e!=`string`)return;let t=e.trim();if(!t)return;let n=t.split(/[/:]/);if(n.length===2){let e=_t(Number(n[0])),t=_t(Number(n[1]));return e&&t?e/t:void 0}return n.length===1?_t(Number(t)):void 0}function ht(e){let t=mt(e?.custom_aspect)??(e?.aspect===`vertical`?ct:st),n=_t(e?.max_width),r=_t(e?.max_height),i=t>=1?`landscape`:`portrait`;return e?.fullscreen?{ratio:t,orientation:i,maxWidth:n,maxHeight:r,vars:{"--tavus-expand-aspect":`auto`,"--tavus-expand-width":`100%`,"--tavus-expand-height":`100%`,"--tavus-expand-max-width":`none`,"--tavus-expand-max-height":`none`}}:{ratio:t,orientation:i,maxWidth:n,maxHeight:r,vars:i===`landscape`?{"--tavus-expand-aspect":String(t),"--tavus-expand-width":`min(${dt}, (${ft}) * ${t}, ${n?`${n}px`:lt})`,"--tavus-expand-height":`auto`,"--tavus-expand-max-width":`none`,"--tavus-expand-max-height":r?`${r}px`:`none`}:{"--tavus-expand-aspect":String(t),"--tavus-expand-width":`auto`,"--tavus-expand-height":`min(${ft}, (${dt}) / ${t}, ${r?`${r}px`:ut})`,"--tavus-expand-max-width":n?`${n}px`:`none`,"--tavus-expand-max-height":`none`}}}function gt(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}function _t(e){return e!==void 0&&Number.isFinite(e)&&e>0?e:void 0}var vt=0;Array.isArray;function I(e,t,n,r,a,o){t||={};var s,c,l=t;if(`ref`in l)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vt,__i:-1,__u:0,__source:a,__self:o};if(typeof e==`function`&&(s=e.defaultProps))for(c in s)l[c]===void 0&&(l[c]=s[c]);return i.vnode&&i.vnode(u),u}var yt=Ce(null);function bt(e){let t,n;if(e[`override-config`])try{t=JSON.parse(e[`override-config`])}catch{n=`invalid_override_config`}let r=!!e.token;return{surface:e.surface,layout:e.layout?.trim().toLowerCase()===`full-screen`?`full-screen`:`inline`,cameraOnStart:e[`camera-on-start`]===`off`?`off`:`on`,deploymentId:e[`deployment-id`],conversationUrl:e[`conversation-url`],previewToken:e.token,baseUrl:e[`base-url`],conversationalContext:St(e[`conversational-context`]),customGreeting:St(e[`custom-greeting`]),memoryStores:Ct(e[`memory-stores`]),overrideConfig:t,...n?{configInputError:n}:{},expandOptions:pt(e[`expand-options`]),mode:r?`preview`:`production`}}function xt(e){let t=N(()=>bt({surface:e.surface,layout:e.layout,"camera-on-start":e[`camera-on-start`],"deployment-id":e[`deployment-id`],"conversation-url":e[`conversation-url`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"memory-stores":e[`memory-stores`],"base-url":e[`base-url`],"expand-options":e[`expand-options`],token:e.token}),[e.surface,e.layout,e[`camera-on-start`],e[`deployment-id`],e[`conversation-url`],e[`override-config`],e[`conversational-context`],e[`custom-greeting`],e[`memory-stores`],e[`base-url`],e[`expand-options`],e.token]);return I(yt.Provider,{value:t,children:e.children})}function St(e){return e?.trim()||void 0}function Ct(e){let t=e?.split(`,`).map(e=>e.trim()).filter(Boolean);return t&&t.length?t:void 0}var wt=Symbol.for(`preact-signals`);function Tt(){if(jt>1)jt--;else{var e,t=!1;for((function(){var e=Ft;for(Ft=void 0;e!==void 0;){var t=e.S;if(t.v===e.v)for(var n=t.t;n!==void 0;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}})();At!==void 0;){var n=At;for(At=void 0,Mt++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Bt(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(Mt=0,jt--,t)throw e}}function Et(e){if(jt>0)return e();Pt=++Nt,jt++;try{return e()}finally{Tt()}}var Dt,Ot=void 0;function kt(e){var t=Ot,n=Dt;Ot=void 0,Dt=void 0;try{return e()}finally{Ot=t,Dt=n}}var At=void 0,jt=0,Mt=0,Nt=0,Pt=0,Ft=void 0,It=0;function Lt(e){if(Ot!==void 0){var t=e.n;if(t===void 0||t.t!==Ot)return t={i:0,S:e,p:Ot.s,n:void 0,t:Ot,e:void 0,x:void 0,r:t},Ot.s!==void 0&&(Ot.s.n=t),Ot.s=t,e.n=t,32&Ot.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Ot.s,t.n=void 0,Ot.s.n=t,Ot.s=t),t}}function Rt(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=t?.watched,this.Z=t?.unwatched,this.name=t?.name}Rt.prototype.brand=wt,Rt.prototype.h=function(){return!0},Rt.prototype.S=function(e){var t=this,n=this.t;n!==e&&e.e===void 0&&(e.x=n,this.t=e,n===void 0?kt(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},Rt.prototype.U=function(e){var t=this;if(this.t!==void 0){var n=e.e,r=e.x;n!==void 0&&(n.x=r,e.e=void 0),r!==void 0&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,r===void 0&&kt(function(){var e;(e=t.Z)==null||e.call(t)}))}},Rt.prototype.subscribe=function(e){var t=this;return Yt(function(){var n=t.value;kt(function(){return e(n)})},{name:`sub`})},Rt.prototype.valueOf=function(){return this.value},Rt.prototype.toString=function(){return this.value+``},Rt.prototype.toJSON=function(){return this.value},Rt.prototype.peek=function(){var e=this;return kt(function(){return e.value})},Object.defineProperty(Rt.prototype,"value",{get:function(){var e=Lt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Mt>100)throw Error(`Cycle detected`);(function(e){jt!==0&&Mt===0&&e.l!==Pt&&(e.l=Pt,Ft={S:e,v:e.v,i:e.i,o:Ft})})(this),this.v=e,this.i++,It++,jt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Tt()}}}});function zt(e,t){return new Rt(e,t)}function Bt(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Vt(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ht(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Ut(e,t){Rt.call(this,void 0,t),this.x=e,this.s=void 0,this.g=It-1,this.f=4}Ut.prototype=new Rt,Ut.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===It))return!0;if(this.g=It,this.f|=1,this.i>0&&!Bt(this))return this.f&=-2,!0;var e=Ot;try{Vt(this),Ot=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return Ot=e,Ht(this),this.f&=-2,!0},Ut.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Rt.prototype.S.call(this,e)},Ut.prototype.U=function(e){if(this.t!==void 0&&(Rt.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ut.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(Ut.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Lt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Wt(e,t){return new Ut(e,t)}function Gt(e){var t=e.m;if(e.m=void 0,typeof t==`function`){jt++;var n=Ot;Ot=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,Kt(e),t}finally{Ot=n,Tt()}}}function Kt(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Gt(e)}function qt(e){if(Ot!==this)throw Error(`Out-of-order effect`);Ht(this),Ot=e,this.f&=-2,8&this.f&&Kt(this),Tt()}function Jt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,Dt&&Dt.push(this)}Jt.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t==`function`&&(this.m=t)}finally{e()}},Jt.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Gt(this),Vt(this),jt++;var e=Ot;return Ot=this,qt.bind(this,e)},Jt.prototype.N=function(){2&this.f||(this.f|=2,this.u=At,At=this)},Jt.prototype.d=function(){this.f|=8,1&this.f||Kt(this)},Jt.prototype.dispose=function(){this.d()};function Yt(e,t){var n=new Jt(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Xt,Zt,Qt=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,$t=[],en=[];Yt(function(){Xt=this.N})();function tn(e,t){i[e]=t.bind(null,i[e]||function(){})}function nn(e){if(Zt){var t=Zt;Zt=void 0,t()}Zt=e&&e.S()}function rn(e){var t=this,n=e.data,r=on(n);r.name=`ReactiveDom`,r.value=n;var i=N(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=Wt(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),a=Wt(function(){return!Array.isArray(i.value)&&!o(i.value)}),s=Yt(function(){if(this.N=fn,a.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),c=t.__$u.d;return t.__$u.d=function(){s(),c.call(this)},[a,i]},[]),a=i[0],s=i[1];return a.value?s.peek():s.value}rn.displayName=`ReactiveTextNode`,Object.defineProperties(Rt.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:rn},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),tn(`__b`,function(e,t){if(nn(),typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof Rt&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),tn(`__r`,function(e,t){if(e(t),t.type!==D){nn();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return Yt(function(){n=this},{name:t}),n.c=e,n}(function(e){return function(){var t;Qt&&((t=this.y)==null||t.call(this)),e.__$f|=1,e.setState({})}}(r),typeof t.type==`function`?t.type.displayName||t.type.name:``))),nn(n)}}),tn(`__e`,function(e,t,n,r){nn(),e(t,n,r)}),tn(`diffed`,function(e,t){nn();var n;if(typeof t.type==`string`&&(n=t.__e)){var r=t.__np,i=t.props,a=n.U;if(a)for(var o in a){var s=a[o];s===void 0||r&&o in r||(s.d(),a[o]=void 0)}if(r)for(var c in a||(a={},n.U=a),r){var l=a[c],u=r[c];l===void 0?(l=an(n,c,u,i),a[c]=l):l.o(u,i)}}e(t)});function an(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=zt(n);return{o:function(e,t){a.value=e,r=t},d:Yt(function(){this.N=fn;var n=a.value.value;r[t]!==n&&(r[t]=n,i?e[t]=n:n!=null&&(!1!==n||t[4]===`-`)?e.setAttribute(t,n):e.removeAttribute(t))})}}tn(`unmount`,function(e,t){if(typeof t.type==`string`){var n=t.__e;if(n){var r=n.U;if(r)for(var i in n.U=void 0,r){var a=r[i];a&&a.d()}}var o=t.__np;if(o){var s=t.props;for(var c in o)s[c]=o[c]}t.__np=void 0}else{var l=t.__c;if(l){var u=l.__$u;u&&(l.__$u=void 0,u.d())}}e(t)}),tn(`__h`,function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)}),ee.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&n.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u==`boolean`&&!0===this.u){var a=2&this.__$f;if(!(r||a||4&this.__$f)||1&this.__$f)return!0}else if(!(r||4&this.__$f)||3&this.__$f)return!0;for(var o in e)if(o!==`__source`&&e[o]!==this.props[o])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};function on(e,t){return N(function(){return zt(e,t)},[])}var sn=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},cn=function(e){queueMicrotask(function(){queueMicrotask(e)})};function ln(){Et(function(){for(var e;e=$t.shift();)Xt.call(e)})}function un(){$t.push(this)===1&&(i.requestAnimationFrame||sn)(ln)}function dn(){Et(function(){for(var e;e=en.shift();)Xt.call(e)})}function fn(){en.push(this)===1&&(i.requestAnimationFrame||cn)(dn)}function pn(e,t){var n=M(e);n.current=e,j(function(){return Yt(function(){return this.N=un,n.current()},t)},[])}function mn(e){let t=`[Tavus:${e}]`;return{info:(...e)=>{},warn:(...e)=>console.warn(t,...e),error:(...e)=>console.error(t,...e)}}function hn(){if(!globalThis.crypto?.getRandomValues)return;let e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function gn(e){return typeof e==`string`&&/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/.test(e)}function _n(e,t){let n=e.split(`?`)[0];if(!n.startsWith(`/v2/deployments/${t}/`))return;let r=n.slice(n.lastIndexOf(`/`)+1);if(r===`start-token`)return`start_token`;if(r===`init`||r===`start`||r===`end`)return r}var vn=mn(`API`);function yn(e={}){let t=(e.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),n=e.token,r=e.deploymentId?{deploymentId:e.deploymentId,sessionId:hn()}:void 0;function i(e){try{r?.observe?.(e)}catch{vn.warn(`Diagnostic observer failed`)}}async function a(e,a,o,s){let c={};o!=null&&(c[`Content-Type`]=`application/json`),n&&(c.Authorization=`Bearer ${n}`);let l=r&&_n(a,r.deploymentId),u=l?hn():void 0,d=r?.attemptId,f=`${t}${a}`;vn.info(e,f);let p=performance.now(),m,h=!1,g,_=a.match(/\/conversations\/(c[A-Za-z0-9]{1,63})\/end(?:\?|$)/)?.[1],v=(e,t)=>{l&&u&&i({stage:l,outcome:e,client_request_id:u,request_id:g,attempt_id:d,conversation_id:_,status:m?.status,duration_ms:e===`started`?void 0:performance.now()-p,...e===`failed`?{error:t,networkFailure:h&&m===void 0}:{}})};v(`started`);try{let t=o==null?void 0:JSON.stringify(o);h=!0,m=await fetch(f,{method:e,headers:c,body:t,signal:s?.signal,keepalive:s?.keepalive});let n=m.headers.get(`X-Tavus-Request-Id`);if(g=gn(n)?n:void 0,l&&xn(r,m),!m.ok){let t=await m.text().catch(()=>``);throw vn.error(`${e} ${f} → ${m.status}`,t),new bn(m.status,t||m.statusText,m.headers)}if(m.headers.get(`content-type`)?.includes(`application/json`)){let e=await m.json();return _=Sn(e)??_,v(`succeeded`),e}v(`succeeded`);return}catch(e){throw v(`failed`,e),e}}return{...r?{diagnostics:r}:{},get:(e,t)=>a(`GET`,e,void 0,t),post:(e,t,n)=>a(`POST`,e,t,n)}}var bn=class extends Error{status;body;headers;constructor(e,t,n){super(`API error ${e}: ${t}`),this.status=e,this.body=t,this.headers=n,this.name=`ApiError`}};function xn(e,t){let n=t.headers.get(`X-Tavus-Telemetry-Version`);if(n&&/^[1-9][0-9]{0,8}$/.test(n))try{e?.capabilities?.(Number(n))}catch{vn.warn(`Diagnostic capability observer failed`)}}function Sn(e){if(e&&typeof e==`object`&&`conversation_id`in e&&typeof e.conversation_id==`string`&&/^c[A-Za-z0-9]{1,63}$/.test(e.conversation_id))return e.conversation_id}function Cn(e,t,n){return e.get(`/v2/deployments/${t}/init`,n)}function wn(e,t,n={},r){return e.post(`/v2/deployments/${t}/start`,n,r)}function Tn(e,t,n,r){return e.post(`/v2/deployments/${t}/conversations/${n}/end`,void 0,r)}function En(e,t,n,r){let i=`/v2/conversations/${t}/canvas/interactions`;return r?e.post(i,n,r):e.post(i,n)}function Dn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function On(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(n[r]=Dn(a)&&Dn(i)?On(a,i):i)}return n}var kn=L,An={type:`object`,properties:{schema_version:{type:`integer`,const:1,default:1},terms_content:{type:`string`,default:``},terms_enabled:{type:`boolean`,default:!1},show_haircheck:{type:`boolean`,default:!0},language_selector:{type:`boolean`,default:!1},conversation:{type:`object`,default:{},properties:{modality:{type:`string`,enum:[`audio`,`video`,`chat`],default:`video`},enable_chat:{type:`boolean`,default:!1},enable_closed_captions:{type:`boolean`,default:!1},enable_picture_in_picture:{type:`boolean`,default:!1},show_fullscreen_hint:{type:`boolean`,default:!0},unique_memory_tag:{type:`boolean`,default:!0},context:{type:`string`,default:``},magic_grid:{type:`boolean`}}},style:{type:`object`,default:{},properties:{mode:{type:`string`,enum:[`system`,`light`,`dark`],default:`system`},style:{type:`string`,enum:[`basic`,`wireframe`,`silk`,`cyberpunk`,`retro`,`lemonade`],default:`basic`},boxes_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},field_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},selectors_radius:{type:`integer`,enum:[0,1,2,3,4],default:1},border_width:{type:`integer`,enum:[0,1,2,3,4],default:0},depth_effect:{type:`boolean`,default:!1},noise_effect:{type:`boolean`,default:!1},fields_size:{type:`integer`,enum:[1,2,3],default:2},selectors_size:{type:`integer`,enum:[1,2,3],default:2},icon_library:{type:`string`,enum:[`pixelarticons`,`lucide`],default:`pixelarticons`},magic_canvas:{type:`object`,properties:{accent_color:{type:`string`}}}}},widget:{type:`object`,default:{},properties:{variant:{type:`string`,enum:[`tiny`,`compact`,`full`],default:`compact`},position:{type:`string`,enum:[`bottom-left`,`bottom-right`,`top-left`,`top-right`,`top`,`bottom`],default:`bottom-right`},expandable:{type:`string`,enum:[`default`,`always`,`start-expanded`],default:`default`},avatar:{type:`object`,default:{},properties:{type:{type:`string`,enum:[`orb`,`image`],default:`orb`}}},text:{type:`object`,default:{},properties:{title:{type:`string`,default:``},btn_title:{type:`string`,default:``}}}}},landing_page:{type:`object`,default:{},properties:{template:{type:`string`,enum:[`1`,`2`,`3`,`4`,`5`],default:`1`},access:{type:`string`,enum:[`public`,`auth_required`],default:`public`},logo:{type:`string`,default:``},title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},default:[]},background:{type:[`object`,`null`],default:null,properties:{type:{type:`string`,enum:[`default`,`image`],default:`default`},url:{type:[`string`,`null`],default:null}}}}},preview:{type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},btn_title:{type:`string`,default:``},background:{type:`object`,default:{},properties:{type:{type:[`string`,`null`],enum:[`replica`,`background-gradient`,`custom-image`,null],default:null},url:{type:`string`,default:``}}}}},haircheck:{type:`object`,default:{},properties:{permission_request_title:{type:`string`,default:``},permission_request_description:{type:`string`,default:``},permission_granted_title:{type:`string`,default:``},permission_granted_description:{type:`string`,default:``},permission_denied_title:{type:`string`,default:``},permission_denied_description:{type:`string`,default:``},join_button:{type:`string`,default:``},cancel_btn:{type:`string`,default:``}}},after_call:{type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},default:[]}}},branding:{type:`object`,default:{},properties:{hide_tavus_badge:{type:`boolean`,default:!1},logo:{type:`string`,default:``},text:{type:`string`,default:``}}},unavailable_screen:{type:`object`,properties:{daily_limit:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},total_limit:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},busy:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},error:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},captcha_unsupported:{type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},cta:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]}}}}}},jn=Object.prototype.hasOwnProperty;function L(e,{instancePath:t=``,parentData:n,parentDataProperty:r,rootData:i=e}={}){if(e&&typeof e==`object`&&!Array.isArray(e)){e.schema_version===void 0&&(e.schema_version=1),e.terms_content===void 0&&(e.terms_content=``),e.terms_enabled===void 0&&(e.terms_enabled=!1),e.show_haircheck===void 0&&(e.show_haircheck=!0),e.language_selector===void 0&&(e.language_selector=!1),e.conversation===void 0&&(e.conversation={}),e.style===void 0&&(e.style={}),e.widget===void 0&&(e.widget={}),e.landing_page===void 0&&(e.landing_page={}),e.preview===void 0&&(e.preview={}),e.haircheck===void 0&&(e.haircheck={}),e.after_call===void 0&&(e.after_call={}),e.branding===void 0&&(e.branding={});for(let t in e)jn.call(An.properties,t)||delete e[t];{let n=e.schema_version;if(typeof n!=`number`||n%1||isNaN(n))return L.errors=[{instancePath:t+`/schema_version`,schemaPath:`#/properties/schema_version/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(n!==1)return L.errors=[{instancePath:t+`/schema_version`,schemaPath:`#/properties/schema_version/const`,keyword:`const`,params:{allowedValue:1},message:`must be equal to constant`}],!1;var a=!0;if(a){if(typeof e.terms_content!=`string`)return L.errors=[{instancePath:t+`/terms_content`,schemaPath:`#/properties/terms_content/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var a=!0;if(a){if(typeof e.terms_enabled!=`boolean`)return L.errors=[{instancePath:t+`/terms_enabled`,schemaPath:`#/properties/terms_enabled/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){if(typeof e.show_haircheck!=`boolean`)return L.errors=[{instancePath:t+`/show_haircheck`,schemaPath:`#/properties/show_haircheck/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){if(typeof e.language_selector!=`boolean`)return L.errors=[{instancePath:t+`/language_selector`,schemaPath:`#/properties/language_selector/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var a=!0;if(a){let n=e.conversation;if(n&&typeof n==`object`&&!Array.isArray(n)){n.modality===void 0&&(n.modality=`video`),n.enable_chat===void 0&&(n.enable_chat=!1),n.enable_closed_captions===void 0&&(n.enable_closed_captions=!1),n.enable_picture_in_picture===void 0&&(n.enable_picture_in_picture=!1),n.show_fullscreen_hint===void 0&&(n.show_fullscreen_hint=!0),n.unique_memory_tag===void 0&&(n.unique_memory_tag=!0),n.context===void 0&&(n.context=``);for(let e in n)e!==`modality`&&e!==`enable_chat`&&e!==`enable_closed_captions`&&e!==`enable_picture_in_picture`&&e!==`show_fullscreen_hint`&&e!==`unique_memory_tag`&&e!==`context`&&e!==`magic_grid`&&delete n[e];{let e=n.modality;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/conversation/modality`,schemaPath:`#/properties/conversation/properties/modality/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`audio`&&e!==`video`&&e!==`chat`)return L.errors=[{instancePath:t+`/conversation/modality`,schemaPath:`#/properties/conversation/properties/modality/enum`,keyword:`enum`,params:{allowedValues:An.properties.conversation.properties.modality.enum},message:`must be equal to one of the allowed values`}],!1;var o=!0;if(o){if(typeof n.enable_chat!=`boolean`)return L.errors=[{instancePath:t+`/conversation/enable_chat`,schemaPath:`#/properties/conversation/properties/enable_chat/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.enable_closed_captions!=`boolean`)return L.errors=[{instancePath:t+`/conversation/enable_closed_captions`,schemaPath:`#/properties/conversation/properties/enable_closed_captions/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.enable_picture_in_picture!=`boolean`)return L.errors=[{instancePath:t+`/conversation/enable_picture_in_picture`,schemaPath:`#/properties/conversation/properties/enable_picture_in_picture/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.show_fullscreen_hint!=`boolean`)return L.errors=[{instancePath:t+`/conversation/show_fullscreen_hint`,schemaPath:`#/properties/conversation/properties/show_fullscreen_hint/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.unique_memory_tag!=`boolean`)return L.errors=[{instancePath:t+`/conversation/unique_memory_tag`,schemaPath:`#/properties/conversation/properties/unique_memory_tag/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0;if(o){if(typeof n.context!=`string`)return L.errors=[{instancePath:t+`/conversation/context`,schemaPath:`#/properties/conversation/properties/context/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var o=!0;if(o){if(n.magic_grid!==void 0){if(typeof n.magic_grid!=`boolean`)return L.errors=[{instancePath:t+`/conversation/magic_grid`,schemaPath:`#/properties/conversation/properties/magic_grid/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var o=!0}else var o=!0}}}}}}}}}else return L.errors=[{instancePath:t+`/conversation`,schemaPath:`#/properties/conversation/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.style;if(n&&typeof n==`object`&&!Array.isArray(n)){n.mode===void 0&&(n.mode=`system`),n.style===void 0&&(n.style=`basic`),n.boxes_radius===void 0&&(n.boxes_radius=1),n.field_radius===void 0&&(n.field_radius=1),n.selectors_radius===void 0&&(n.selectors_radius=1),n.border_width===void 0&&(n.border_width=0),n.depth_effect===void 0&&(n.depth_effect=!1),n.noise_effect===void 0&&(n.noise_effect=!1),n.fields_size===void 0&&(n.fields_size=2),n.selectors_size===void 0&&(n.selectors_size=2),n.icon_library===void 0&&(n.icon_library=`pixelarticons`);for(let e in n)jn.call(An.properties.style.properties,e)||delete n[e];{let e=n.mode;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/style/mode`,schemaPath:`#/properties/style/properties/mode/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`system`&&e!==`light`&&e!==`dark`)return L.errors=[{instancePath:t+`/style/mode`,schemaPath:`#/properties/style/properties/mode/enum`,keyword:`enum`,params:{allowedValues:An.properties.style.properties.mode.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.style;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/style/style`,schemaPath:`#/properties/style/properties/style/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`basic`&&e!==`wireframe`&&e!==`silk`&&e!==`cyberpunk`&&e!==`retro`&&e!==`lemonade`)return L.errors=[{instancePath:t+`/style/style`,schemaPath:`#/properties/style/properties/style/enum`,keyword:`enum`,params:{allowedValues:An.properties.style.properties.style.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.boxes_radius;if(typeof e!=`number`||e%1||isNaN(e))return L.errors=[{instancePath:t+`/style/boxes_radius`,schemaPath:`#/properties/style/properties/boxes_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return L.errors=[{instancePath:t+`/style/boxes_radius`,schemaPath:`#/properties/style/properties/boxes_radius/enum`,keyword:`enum`,params:{allowedValues:An.properties.style.properties.boxes_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.field_radius;if(typeof e!=`number`||e%1||isNaN(e))return L.errors=[{instancePath:t+`/style/field_radius`,schemaPath:`#/properties/style/properties/field_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return L.errors=[{instancePath:t+`/style/field_radius`,schemaPath:`#/properties/style/properties/field_radius/enum`,keyword:`enum`,params:{allowedValues:An.properties.style.properties.field_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.selectors_radius;if(typeof e!=`number`||e%1||isNaN(e))return L.errors=[{instancePath:t+`/style/selectors_radius`,schemaPath:`#/properties/style/properties/selectors_radius/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return L.errors=[{instancePath:t+`/style/selectors_radius`,schemaPath:`#/properties/style/properties/selectors_radius/enum`,keyword:`enum`,params:{allowedValues:An.properties.style.properties.selectors_radius.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.border_width;if(typeof e!=`number`||e%1||isNaN(e))return L.errors=[{instancePath:t+`/style/border_width`,schemaPath:`#/properties/style/properties/border_width/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==0&&e!==1&&e!==2&&e!==3&&e!==4)return L.errors=[{instancePath:t+`/style/border_width`,schemaPath:`#/properties/style/properties/border_width/enum`,keyword:`enum`,params:{allowedValues:An.properties.style.properties.border_width.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){if(typeof n.depth_effect!=`boolean`)return L.errors=[{instancePath:t+`/style/depth_effect`,schemaPath:`#/properties/style/properties/depth_effect/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0;if(s){if(typeof n.noise_effect!=`boolean`)return L.errors=[{instancePath:t+`/style/noise_effect`,schemaPath:`#/properties/style/properties/noise_effect/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var s=!0;if(s){let e=n.fields_size;if(typeof e!=`number`||e%1||isNaN(e))return L.errors=[{instancePath:t+`/style/fields_size`,schemaPath:`#/properties/style/properties/fields_size/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==1&&e!==2&&e!==3)return L.errors=[{instancePath:t+`/style/fields_size`,schemaPath:`#/properties/style/properties/fields_size/enum`,keyword:`enum`,params:{allowedValues:An.properties.style.properties.fields_size.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.selectors_size;if(typeof e!=`number`||e%1||isNaN(e))return L.errors=[{instancePath:t+`/style/selectors_size`,schemaPath:`#/properties/style/properties/selectors_size/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(e!==1&&e!==2&&e!==3)return L.errors=[{instancePath:t+`/style/selectors_size`,schemaPath:`#/properties/style/properties/selectors_size/enum`,keyword:`enum`,params:{allowedValues:An.properties.style.properties.selectors_size.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){let e=n.icon_library;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/style/icon_library`,schemaPath:`#/properties/style/properties/icon_library/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`pixelarticons`&&e!==`lucide`)return L.errors=[{instancePath:t+`/style/icon_library`,schemaPath:`#/properties/style/properties/icon_library/enum`,keyword:`enum`,params:{allowedValues:An.properties.style.properties.icon_library.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0;if(s){if(n.magic_canvas!==void 0){let e=n.magic_canvas;if(e&&typeof e==`object`&&!Array.isArray(e)){for(let t in e)t!==`accent_color`&&delete e[t];if(e.accent_color!==void 0&&typeof e.accent_color!=`string`)return L.errors=[{instancePath:t+`/style/magic_canvas/accent_color`,schemaPath:`#/properties/style/properties/magic_canvas/properties/accent_color/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return L.errors=[{instancePath:t+`/style/magic_canvas`,schemaPath:`#/properties/style/properties/magic_canvas/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var s=!0}else var s=!0}}}}}}}}}}}}}else return L.errors=[{instancePath:t+`/style`,schemaPath:`#/properties/style/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.widget;if(n&&typeof n==`object`&&!Array.isArray(n)){n.variant===void 0&&(n.variant=`compact`),n.position===void 0&&(n.position=`bottom-right`),n.expandable===void 0&&(n.expandable=`default`),n.avatar===void 0&&(n.avatar={}),n.text===void 0&&(n.text={});for(let e in n)e!==`variant`&&e!==`position`&&e!==`expandable`&&e!==`avatar`&&e!==`text`&&delete n[e];{let e=n.variant;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/widget/variant`,schemaPath:`#/properties/widget/properties/variant/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`tiny`&&e!==`compact`&&e!==`full`)return L.errors=[{instancePath:t+`/widget/variant`,schemaPath:`#/properties/widget/properties/variant/enum`,keyword:`enum`,params:{allowedValues:An.properties.widget.properties.variant.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.position;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/widget/position`,schemaPath:`#/properties/widget/properties/position/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`bottom-left`&&e!==`bottom-right`&&e!==`top-left`&&e!==`top-right`&&e!==`top`&&e!==`bottom`)return L.errors=[{instancePath:t+`/widget/position`,schemaPath:`#/properties/widget/properties/position/enum`,keyword:`enum`,params:{allowedValues:An.properties.widget.properties.position.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.expandable;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/widget/expandable`,schemaPath:`#/properties/widget/properties/expandable/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!=="default"&&e!==`always`&&e!==`start-expanded`)return L.errors=[{instancePath:t+`/widget/expandable`,schemaPath:`#/properties/widget/properties/expandable/enum`,keyword:`enum`,params:{allowedValues:An.properties.widget.properties.expandable.enum},message:`must be equal to one of the allowed values`}],!1;var c=!0;if(c){let e=n.avatar;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=`orb`);for(let t in e)t!==`type`&&delete e[t];{let n=e.type;if(typeof n!=`string`)return L.errors=[{instancePath:t+`/widget/avatar/type`,schemaPath:`#/properties/widget/properties/avatar/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!==`orb`&&n!==`image`)return L.errors=[{instancePath:t+`/widget/avatar/type`,schemaPath:`#/properties/widget/properties/avatar/properties/type/enum`,keyword:`enum`,params:{allowedValues:An.properties.widget.properties.avatar.properties.type.enum},message:`must be equal to one of the allowed values`}],!1}}else return L.errors=[{instancePath:t+`/widget/avatar`,schemaPath:`#/properties/widget/properties/avatar/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0;if(c){let e=n.text;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.btn_title===void 0&&(e.btn_title=``);for(let t in e)t!==`title`&&t!==`btn_title`&&delete e[t];if(typeof e.title!=`string`)return L.errors=[{instancePath:t+`/widget/text/title`,schemaPath:`#/properties/widget/properties/text/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.btn_title!=`string`)return L.errors=[{instancePath:t+`/widget/text/btn_title`,schemaPath:`#/properties/widget/properties/text/properties/btn_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return L.errors=[{instancePath:t+`/widget/text`,schemaPath:`#/properties/widget/properties/text/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var c=!0}}}}}}else return L.errors=[{instancePath:t+`/widget`,schemaPath:`#/properties/widget/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.landing_page;if(n&&typeof n==`object`&&!Array.isArray(n)){n.template===void 0&&(n.template=`1`),n.access===void 0&&(n.access=`public`),n.logo===void 0&&(n.logo=``),n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.cta===void 0&&(n.cta=[]),n.background===void 0&&(n.background=null);for(let e in n)e!==`template`&&e!==`access`&&e!==`logo`&&e!==`title`&&e!==`description`&&e!==`cta`&&e!==`background`&&delete n[e];{let e=n.template;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/landing_page/template`,schemaPath:`#/properties/landing_page/properties/template/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`1`&&e!==`2`&&e!==`3`&&e!==`4`&&e!==`5`)return L.errors=[{instancePath:t+`/landing_page/template`,schemaPath:`#/properties/landing_page/properties/template/enum`,keyword:`enum`,params:{allowedValues:An.properties.landing_page.properties.template.enum},message:`must be equal to one of the allowed values`}],!1;var l=!0;if(l){let e=n.access;if(typeof e!=`string`)return L.errors=[{instancePath:t+`/landing_page/access`,schemaPath:`#/properties/landing_page/properties/access/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(e!==`public`&&e!==`auth_required`)return L.errors=[{instancePath:t+`/landing_page/access`,schemaPath:`#/properties/landing_page/properties/access/enum`,keyword:`enum`,params:{allowedValues:An.properties.landing_page.properties.access.enum},message:`must be equal to one of the allowed values`}],!1;var l=!0;if(l){if(typeof n.logo!=`string`)return L.errors=[{instancePath:t+`/landing_page/logo`,schemaPath:`#/properties/landing_page/properties/logo/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){if(typeof n.title!=`string`)return L.errors=[{instancePath:t+`/landing_page/title`,schemaPath:`#/properties/landing_page/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){if(typeof n.description!=`string`)return L.errors=[{instancePath:t+`/landing_page/description`,schemaPath:`#/properties/landing_page/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var l=!0;if(l){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return L.errors=[{instancePath:t+`/landing_page/cta/`+r,schemaPath:`#/properties/landing_page/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return L.errors=[{instancePath:t+`/landing_page/cta/`+r+`/title`,schemaPath:`#/properties/landing_page/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=!0}else var u=!0;if(u){if(n.url!==void 0){if(typeof n.url!=`string`)return L.errors=[{instancePath:t+`/landing_page/cta/`+r+`/url`,schemaPath:`#/properties/landing_page/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var u=!0}else var u=!0}}else return L.errors=[{instancePath:t+`/landing_page/cta/`+r,schemaPath:`#/properties/landing_page/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return L.errors=[{instancePath:t+`/landing_page/cta`,schemaPath:`#/properties/landing_page/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var l=!0;if(l){let e=n.background;if((!e||typeof e!=`object`||Array.isArray(e))&&e!==null)return L.errors=[{instancePath:t+`/landing_page/background`,schemaPath:`#/properties/landing_page/properties/background/type`,keyword:`type`,params:{type:An.properties.landing_page.properties.background.type},message:`must be object,null`}],!1;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=`default`),e.url===void 0&&(e.url=null);for(let t in e)t!==`type`&&t!==`url`&&delete e[t];{let n=e.type;if(typeof n!=`string`)return L.errors=[{instancePath:t+`/landing_page/background/type`,schemaPath:`#/properties/landing_page/properties/background/properties/type/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(n!=="default"&&n!==`image`)return L.errors=[{instancePath:t+`/landing_page/background/type`,schemaPath:`#/properties/landing_page/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:An.properties.landing_page.properties.background.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;{let n=e.url;if(typeof n!=`string`&&n!==null)return L.errors=[{instancePath:t+`/landing_page/background/url`,schemaPath:`#/properties/landing_page/properties/background/properties/url/type`,keyword:`type`,params:{type:An.properties.landing_page.properties.background.properties.url.type},message:`must be string,null`}],!1}}}var l=!0}}}}}}}}else return L.errors=[{instancePath:t+`/landing_page`,schemaPath:`#/properties/landing_page/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.preview;if(n&&typeof n==`object`&&!Array.isArray(n)){n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.btn_title===void 0&&(n.btn_title=``),n.background===void 0&&(n.background={});for(let e in n)e!==`title`&&e!==`description`&&e!==`btn_title`&&e!==`background`&&delete n[e];if(typeof n.title!=`string`)return L.errors=[{instancePath:t+`/preview/title`,schemaPath:`#/properties/preview/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){if(typeof n.description!=`string`)return L.errors=[{instancePath:t+`/preview/description`,schemaPath:`#/properties/preview/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){if(typeof n.btn_title!=`string`)return L.errors=[{instancePath:t+`/preview/btn_title`,schemaPath:`#/properties/preview/properties/btn_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var d=!0;if(d){let e=n.background;if(e&&typeof e==`object`&&!Array.isArray(e)){e.type===void 0&&(e.type=null),e.url===void 0&&(e.url=``);for(let t in e)t!==`type`&&t!==`url`&&delete e[t];{let n=e.type;if(typeof n!=`string`&&n!==null)return L.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/type`,keyword:`type`,params:{type:An.properties.preview.properties.background.properties.type.type},message:`must be string,null`}],!1;if(n!==`replica`&&n!==`background-gradient`&&n!==`custom-image`&&n!==null)return L.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:An.properties.preview.properties.background.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;if(typeof e.url!=`string`)return L.errors=[{instancePath:t+`/preview/background/url`,schemaPath:`#/properties/preview/properties/background/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}}else return L.errors=[{instancePath:t+`/preview/background`,schemaPath:`#/properties/preview/properties/background/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var d=!0}}}}else return L.errors=[{instancePath:t+`/preview`,schemaPath:`#/properties/preview/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.haircheck;if(n&&typeof n==`object`&&!Array.isArray(n)){n.permission_request_title===void 0&&(n.permission_request_title=``),n.permission_request_description===void 0&&(n.permission_request_description=``),n.permission_granted_title===void 0&&(n.permission_granted_title=``),n.permission_granted_description===void 0&&(n.permission_granted_description=``),n.permission_denied_title===void 0&&(n.permission_denied_title=``),n.permission_denied_description===void 0&&(n.permission_denied_description=``),n.join_button===void 0&&(n.join_button=``),n.cancel_btn===void 0&&(n.cancel_btn=``);for(let e in n)e!==`permission_request_title`&&e!==`permission_request_description`&&e!==`permission_granted_title`&&e!==`permission_granted_description`&&e!==`permission_denied_title`&&e!==`permission_denied_description`&&e!==`join_button`&&e!==`cancel_btn`&&delete n[e];if(typeof n.permission_request_title!=`string`)return L.errors=[{instancePath:t+`/haircheck/permission_request_title`,schemaPath:`#/properties/haircheck/properties/permission_request_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_request_description!=`string`)return L.errors=[{instancePath:t+`/haircheck/permission_request_description`,schemaPath:`#/properties/haircheck/properties/permission_request_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_granted_title!=`string`)return L.errors=[{instancePath:t+`/haircheck/permission_granted_title`,schemaPath:`#/properties/haircheck/properties/permission_granted_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_granted_description!=`string`)return L.errors=[{instancePath:t+`/haircheck/permission_granted_description`,schemaPath:`#/properties/haircheck/properties/permission_granted_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_denied_title!=`string`)return L.errors=[{instancePath:t+`/haircheck/permission_denied_title`,schemaPath:`#/properties/haircheck/properties/permission_denied_title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.permission_denied_description!=`string`)return L.errors=[{instancePath:t+`/haircheck/permission_denied_description`,schemaPath:`#/properties/haircheck/properties/permission_denied_description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.join_button!=`string`)return L.errors=[{instancePath:t+`/haircheck/join_button`,schemaPath:`#/properties/haircheck/properties/join_button/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0;if(f){if(typeof n.cancel_btn!=`string`)return L.errors=[{instancePath:t+`/haircheck/cancel_btn`,schemaPath:`#/properties/haircheck/properties/cancel_btn/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var f=!0}}}}}}}}else return L.errors=[{instancePath:t+`/haircheck`,schemaPath:`#/properties/haircheck/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.after_call;if(n&&typeof n==`object`&&!Array.isArray(n)){n.title===void 0&&(n.title=``),n.description===void 0&&(n.description=``),n.cta===void 0&&(n.cta=[]);for(let e in n)e!==`title`&&e!==`description`&&e!==`cta`&&delete n[e];if(typeof n.title!=`string`)return L.errors=[{instancePath:t+`/after_call/title`,schemaPath:`#/properties/after_call/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var p=!0;if(p){if(typeof n.description!=`string`)return L.errors=[{instancePath:t+`/after_call/description`,schemaPath:`#/properties/after_call/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var p=!0;if(p){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return L.errors=[{instancePath:t+`/after_call/cta/`+r,schemaPath:`#/properties/after_call/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return L.errors=[{instancePath:t+`/after_call/cta/`+r+`/title`,schemaPath:`#/properties/after_call/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var m=!0}else var m=!0;if(m){if(n.url!==void 0){if(typeof n.url!=`string`)return L.errors=[{instancePath:t+`/after_call/cta/`+r+`/url`,schemaPath:`#/properties/after_call/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var m=!0}else var m=!0}}else return L.errors=[{instancePath:t+`/after_call/cta/`+r,schemaPath:`#/properties/after_call/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return L.errors=[{instancePath:t+`/after_call/cta`,schemaPath:`#/properties/after_call/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var p=!0}}}else return L.errors=[{instancePath:t+`/after_call`,schemaPath:`#/properties/after_call/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){let n=e.branding;if(n&&typeof n==`object`&&!Array.isArray(n)){n.hide_tavus_badge===void 0&&(n.hide_tavus_badge=!1),n.logo===void 0&&(n.logo=``),n.text===void 0&&(n.text=``);for(let e in n)e!==`hide_tavus_badge`&&e!==`logo`&&e!==`text`&&delete n[e];if(typeof n.hide_tavus_badge!=`boolean`)return L.errors=[{instancePath:t+`/branding/hide_tavus_badge`,schemaPath:`#/properties/branding/properties/hide_tavus_badge/type`,keyword:`type`,params:{type:`boolean`},message:`must be boolean`}],!1;var h=!0;if(h){if(typeof n.logo!=`string`)return L.errors=[{instancePath:t+`/branding/logo`,schemaPath:`#/properties/branding/properties/logo/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var h=!0;if(h){if(typeof n.text!=`string`)return L.errors=[{instancePath:t+`/branding/text`,schemaPath:`#/properties/branding/properties/text/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var h=!0}}}else return L.errors=[{instancePath:t+`/branding`,schemaPath:`#/properties/branding/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0;if(a){if(e.unavailable_screen!==void 0){let n=e.unavailable_screen;if(n&&typeof n==`object`&&!Array.isArray(n)){for(let e in n)e!==`daily_limit`&&e!==`total_limit`&&e!==`busy`&&e!==`error`&&e!==`captcha_unsupported`&&e!==`cta`&&delete n[e];if(n.daily_limit!==void 0){let e=n.daily_limit;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/daily_limit/title`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/daily_limit/description`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return L.errors=[{instancePath:t+`/unavailable_screen/daily_limit`,schemaPath:`#/properties/unavailable_screen/properties/daily_limit/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.total_limit!==void 0){let e=n.total_limit;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/total_limit/title`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/total_limit/description`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return L.errors=[{instancePath:t+`/unavailable_screen/total_limit`,schemaPath:`#/properties/unavailable_screen/properties/total_limit/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.busy!==void 0){let e=n.busy;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/busy/title`,schemaPath:`#/properties/unavailable_screen/properties/busy/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/busy/description`,schemaPath:`#/properties/unavailable_screen/properties/busy/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return L.errors=[{instancePath:t+`/unavailable_screen/busy`,schemaPath:`#/properties/unavailable_screen/properties/busy/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.error!==void 0){let e=n.error;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/error/title`,schemaPath:`#/properties/unavailable_screen/properties/error/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/error/description`,schemaPath:`#/properties/unavailable_screen/properties/error/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return L.errors=[{instancePath:t+`/unavailable_screen/error`,schemaPath:`#/properties/unavailable_screen/properties/error/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.captcha_unsupported!==void 0){let e=n.captcha_unsupported;if(e&&typeof e==`object`&&!Array.isArray(e)){e.title===void 0&&(e.title=``),e.description===void 0&&(e.description=``);for(let t in e)t!==`title`&&t!==`description`&&delete e[t];if(typeof e.title!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported/title`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;if(typeof e.description!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported/description`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/properties/description/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1}else return L.errors=[{instancePath:t+`/unavailable_screen/captcha_unsupported`,schemaPath:`#/properties/unavailable_screen/properties/captcha_unsupported/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var g=!0}else var g=!0;if(g){if(n.cta!==void 0){let e=n.cta;if(Array.isArray(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(n&&typeof n==`object`&&!Array.isArray(n)){let e;if(n.title===void 0&&(e=`title`)||n.url===void 0&&(e=`url`))return L.errors=[{instancePath:t+`/unavailable_screen/cta/`+r,schemaPath:`#/properties/unavailable_screen/properties/cta/items/required`,keyword:`required`,params:{missingProperty:e},message:`must have required property '`+e+`'`}],!1;for(let e in n)e!==`title`&&e!==`url`&&delete n[e];if(n.title!==void 0){if(typeof n.title!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/cta/`+r+`/title`,schemaPath:`#/properties/unavailable_screen/properties/cta/items/properties/title/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var _=!0}else var _=!0;if(_){if(n.url!==void 0){if(typeof n.url!=`string`)return L.errors=[{instancePath:t+`/unavailable_screen/cta/`+r+`/url`,schemaPath:`#/properties/unavailable_screen/properties/cta/items/properties/url/type`,keyword:`type`,params:{type:`string`},message:`must be string`}],!1;var _=!0}else var _=!0}}else return L.errors=[{instancePath:t+`/unavailable_screen/cta/`+r,schemaPath:`#/properties/unavailable_screen/properties/cta/items/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1}}else return L.errors=[{instancePath:t+`/unavailable_screen/cta`,schemaPath:`#/properties/unavailable_screen/properties/cta/type`,keyword:`type`,params:{type:`array`},message:`must be array`}],!1;var g=!0}else var g=!0}}}}}}else return L.errors=[{instancePath:t+`/unavailable_screen`,schemaPath:`#/properties/unavailable_screen/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;var a=!0}else var a=!0}}}}}}}}}}}}}}}else return L.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return L.errors=null,!0}var Mn=mn(`Config`);function Nn(e,t){let n=e.customization??{};return n.widget===null&&delete n.widget,n.landing_page===null&&delete n.landing_page,kn(n)||(t?.(),Mn.warn(`Customization validation failed`,kn.errors)),{...e,customization:n}}var Pn=class extends Error{code;constructor(e){super(e===`unsupported_security_version`?`This deployment requires a newer Tavus SDK. Update the integration to continue.`:`The start security response could not be validated. Please try again.`),this.code=e,this.name=`StartSecurityError`}},Fn={name:`@tavus/embed`,version:`0.11.0`,variant:`embed`},In=new Set([`Error`,`TypeError`,`RangeError`,`ReferenceError`,`SyntaxError`,`URIError`,`NotAllowedError`,`NotFoundError`,`NotReadableError`,`NotSupportedError`,`AbortError`,`TimeoutError`,`OperationError`,`SecurityError`,`ApiError`]),Ln={network:`The request did not receive a response.`,timeout:`The operation timed out.`,unsupported:`The browser does not support this operation.`,NotAllowedError:`Access to the requested device was denied.`,NotFoundError:`The requested device was not found.`,NotReadableError:`The requested device could not be opened.`,AbortError:`The operation was cancelled.`,meeting_error:`The conversation connection failed.`,http_error:`The API request returned an error.`,rate_limited:`The request was rate limited.`,start_token_invalid:`The start token was rejected.`,security_session_invalid:`The security session was rejected.`,start_in_progress:`A conversation start is already in progress.`,security_unavailable:`The security service is temporarily unavailable.`,captcha_unavailable:`CAPTCHA verification is temporarily unavailable.`,deployment_security_required:`The deployment requires an updated SDK.`,config_invalid:`Deployment configuration validation failed.`,security_response_invalid:`The security response could not be validated.`,asset_error:`A deployment preview asset failed to load.`,playback_error:`Media playback failed.`,device_error:`A media device failed during the conversation.`,connection_lost:`The conversation connection was interrupted.`,canvas_error:`A Magic Canvas operation failed.`,integration_error:`An SDK integration operation failed.`};function Rn(e){return e&&/^[0-9]{6}$/.test(e)?`CAPTCHA verification failed.`:e&&Object.hasOwn(Ln,e)&&Ln[e]||`An SDK operation failed.`}var zn=new Map;function Bn(e,t){if(!(!/^[a-z0-9_-]+\/[A-Za-z0-9_.-]+\.m?js$/.test(t)||t.length>128||zn.size>=32))try{let n=new URL(e);[`https:`,`http:`,`file:`].includes(n.protocol)&&zn.set(n.href,t)}catch{}}var Vn=typeof document>`u`?null:document.currentScript,Hn=typeof HTMLScriptElement<`u`&&Vn instanceof HTMLScriptElement?Vn.src:void 0,Un=t,Wn=Fn.variant,Gn=Wn===`core`?`index.js`:Wn===`core-embed`?`embed.js`:Wn===`core-widget`?`widget.js`:Hn?`index.iife.js`:`index.mjs`,Kn=Hn||Un;if(Kn)for(let e of qn(Kn,Fn,Gn))Bn(e,`${Wn}/${Gn}`);function qn(e,t,n){let r;try{r=new URL(e)}catch{return[]}if(r.pathname.endsWith(`/${n}`))return[r.href];if(t.variant!==`embed`&&t.variant!==`widget`||r.search)return[];let i=r.origin===`https://unpkg.com`?`/${t.name}`:r.origin===`https://cdn.jsdelivr.net`?`/npm/${t.name}`:void 0;return!i||!r.pathname.startsWith(i)||!/^(?:@[A-Za-z0-9_.-]+)?\/?$/.test(r.pathname.slice(i.length))?[]:[r.href,`${r.origin}${i}@${t.version}/dist/${n}`]}function Jn(e){if(!(e instanceof Error)||typeof e.stack!=`string`)return[];let t=[];for(let n of e.stack.slice(0,16384).split(`
3
+ `).slice(0,40)){let e=n.match(/(?:\(|@|\s)((?:https?|file):\/\/[^\s()]+):(\d+):(\d+)\)?$/);if(!e)continue;let r=zn.get(e[1]),i=Number(e[2]),a=Number(e[3]);if(!(!r||i<1||a<1||i>1e7||a>1e7)&&(t.push({artifact_id:r,line:i,column:a}),t.length===20))break}return t}function Yn(e){if(!Array.isArray(e))return[];let t=new Set(zn.values());return(e??[]).slice(0,20).flatMap(e=>e&&t.has(e.artifact_id)&&Number.isInteger(e.line)&&Number.isInteger(e.column)&&e.line>0&&e.line<=1e7&&e.column>0&&e.column<=1e7?[{artifact_id:e.artifact_id,line:e.line,column:e.column}]:[])}var Xn=mn(`Telemetry`),Zn=20,Qn=16384,$n=40,er=65536,tr=6e5,nr=2e3,rr=5e3,ir=new TextEncoder,ar=new Set([`init`,`captcha`,`start_token`,`start`,`join`,`end`,`permissions`,`runtime`,`media`,`connection`,`magic_canvas`,`host_bridge`,`telemetry`]),or=new Set([`started`,`succeeded`,`failed`,`cancelled`,`interactive`,`shown`,`expired`,`retry`,`unsupported`,`degraded`,`recovered`,`dropped`]),sr=new Set([`init`,`config.normalize`,`start_token`,`start`,`end`,`render`,`captcha.load`,`captcha.execute`,`daily.join`,`daily.leave`,`daily.connection`,`media.microphone`,`media.camera`,`media.output`,`media.playback`,`media.preview`,`media.devices`,`canvas.validate`,`canvas.load`,`canvas.bridge`,`host.command`,`host.event`,`telemetry.deliver`]),cr=new Set([`api`,`config`,`captcha`,`conversation`,`permissions`,`media`,`runtime`,`magic_canvas`,`host_bridge`,`telemetry`]);function lr(e,t,n){return e!==void 0&&Number.isInteger(e)&&e>=t&&e<=n?e:void 0}function ur(e){return e.severity===`error`||[`failed`,`unsupported`,`degraded`,`dropped`].includes(e.outcome)}function dr(e){return typeof e==`string`?yr.has(e)||/^[0-9]{6}$/.test(e)?e:`unknown`:e===void 0?void 0:`unknown`}function fr(e){return{stage:e.stage,outcome:e.outcome,code:dr(e.code),status:lr(e.status,100,599),operation:e.operation&&sr.has(e.operation)?e.operation:void 0,component:e.component&&cr.has(e.component)?e.component:void 0,severity:e.severity&&[`info`,`warning`,`error`].includes(e.severity)?e.severity:ur(e)?`error`:`info`,duration_ms:e.duration_ms!==void 0&&Number.isFinite(e.duration_ms)?Math.max(0,Math.min(864e5,Math.round(e.duration_ms))):void 0,dropped_events:e.stage===`telemetry`&&e.outcome===`dropped`?lr(e.dropped_events,1,1e6):void 0}}function pr(e){return{handled:typeof e.handled==`boolean`?e.handled:void 0,error_type:e.error_type&&In.has(e.error_type)?e.error_type:void 0,error_message:ur(e)||e.error_message!==void 0?Rn(dr(e.code)):void 0,stack_frames:e.stack_frames?Yn(e.stack_frames):void 0}}function mr(e,t,n){let r=e.attempt_id??t,i=e.conversation_id??n;return{conversation_id:typeof i==`string`&&/^c[A-Za-z0-9]{1,63}$/.test(i)?i:void 0,attempt_id:gn(r)?r:void 0,client_request_id:gn(e.client_request_id)?e.client_request_id:void 0,request_id:gn(e.request_id)?e.request_id:void 0}}function hr(e,t,n={name:Fn.name,version:Fn.version}){let r=e.diagnostics?.deploymentId===t?e.diagnostics:void 0,i=r?.sessionId??hn(),a=performance.now(),o,s,c,l,u,d=!1,f=!1,p=!1,m=0,h=Date.now(),g=0,_=0,v=0,y=[],b,x=new Map,S=e=>({version:1,session_id:i,sdk_name:n.name,sdk_version:n.version,events:e});function C(e,t){t?.stage!==`telemetry`&&x.set(e,Math.min(1e6,(x.get(e)??0)+1))}function w(){y=y.filter(e=>Date.now()-e.created<tr||(C(`expired`,e.event),!1))}function T(){d||b||f||!o||!y.length&&!(p&&x.size)||(b=setTimeout(()=>void ae(),Math.min(2147483647,Math.max(nr,m-Date.now(),g>=120?h+6e4-Date.now():0))))}function E(){o=!!(t&&i)&&(c??s)===1&&(s===void 0||s===1),o||(y=[]),T()}function D(e){if(!ar.has(e.stage)||!or.has(e.outcome)||d||o===!1||!t||!i)return;v+=1;let n=hn();if(!n)return;if(Date.now()-h>=6e4&&(h=Date.now(),g=0,_=0),g>=120||!ur(e)&&_>=100){C(`rate_limited`,e);return}w();let r={...fr(e),...pr(e),...mr(e,l,u),client_event_id:n,event_sequence:v,occurred_at:new Date().toISOString(),session_elapsed_ms:Math.max(0,Math.round(performance.now()-a))},s=ir.encode(JSON.stringify(r)).byteLength;for(s>8192&&(r.stack_frames=[],s=ir.encode(JSON.stringify(r)).byteLength);y.length>=$n||y.reduce((e,t)=>e+t.bytes,s)>er;){let e=ur(r)?y.findIndex(e=>!ur(e.event)):-1;if(e<0){C(`queue_full`,r);return}let[t]=y.splice(e,1);C(`queue_full`,t.event)}return g+=1,ur(r)||(_+=1),y.push({event:r,bytes:s,created:Date.now(),attempts:0}),T(),!0}function ee(e,t){let n=br(e,t.component===`api`);D({...n,...t,error_type:e instanceof Error&&In.has(e.name)?e.name:`Error`,error_message:Rn(t.code??n.code),stack_frames:Jn(e)})}let te=e=>{e.stage===`start`&&e.outcome===`succeeded`&&e.conversation_id&&(u=e.conversation_id);let t={...e,operation:e.stage,component:`api`,handled:!0};if(e.outcome===`failed`){let n=br(e.error,e.networkFailure);ee(e.error,{...t,...n,outcome:n.code===`AbortError`?`cancelled`:`failed`})}else D(t)},ne=e=>{s=e,E()};r&&(r.observe=te,r.capabilities=ne);function re(e,t){let n=!(e instanceof bn)||[408,429].includes(e.status)||e.status>=500,r=Math.max(...t.map(e=>e.attempts));for(m=Date.now()+Math.max(gr(e),n?Math.min(3e4,1e3*2**(r-1))*(.5+Math.random()*.5):3e4),y=[...t.filter(e=>{let t=n?e.attempts>=5?`retry_exhausted`:m-e.created>=tr?`expired`:void 0:`rejected`;return t&&C(t,e.event),!t&&!d}),...y];y.length>$n||y.reduce((e,t)=>e+t.bytes,0)>er;){let e=y.findIndex(e=>!ur(e.event)),[t]=y.splice(e>=0?e:y.length-1,1);C(`queue_full`,t.event)}}function ie(){let e=Array.from(x);for(let[t,n]of e)if(D({stage:`telemetry`,outcome:`dropped`,component:`telemetry`,operation:`telemetry.deliver`,severity:`warning`,code:t,dropped_events:n})){let e=(x.get(t)??0)-n;e>0?x.set(t,e):x.delete(t)}}async function ae(){if(clearTimeout(b),b=void 0,w(),p&&!d&&!y.length&&Date.now()>=m&&ie(),!o||f||!y.length||Date.now()<m){T();return}let n=[],r=[];for(;y.length&&n.length<Zn;){let e=y[0],t=e.event;if(ir.encode(JSON.stringify(S([...r,t]))).byteLength>Qn)break;y.shift(),e.attempts+=1,n.push(e),r.push(t)}if(!r.length){T();return}let i=new AbortController,a=setTimeout(()=>i.abort(),rr);f=!0;try{await e.post(`/v2/deployments/${t}/telemetry`,S(r),{keepalive:!0,signal:i.signal}),p=!0,d||ie()}catch(e){re(e,n),Xn.warn(`Delivery failed`,e instanceof bn?e.status:`network`)}finally{clearTimeout(a),f=!1,d&&(y=[]),T()}}return{sessionId:i,requestInstrumented:!!r,configure(e){c=e,E()},record(e){try{D(e)}catch{Xn.warn(`Event observation failed`)}},captureError:ee,beginAttempt(){l=hn(),u=void 0,r&&(r.attemptId=l)},flush:ae,dispose(){d=!0,clearTimeout(b),b=void 0,r?.observe===te&&(r.observe=void 0),r?.capabilities===ne&&(r.capabilities=void 0),ae(),f||(y=[])}}}function gr(e){let t=e instanceof bn?e.headers?.get(`Retry-After`):null;if(!t)return 0;let n=Number(t);if(Number.isFinite(n)&&n>=0)return Math.min(2**53-1-Date.now(),n*1e3);let r=Date.parse(t);return Number.isFinite(r)?Math.max(0,r-Date.now()):0}var _r=new Set([`NotAllowedError`,`NotFoundError`,`NotReadableError`,`AbortError`]),vr=new Set([`start_token_invalid`,`start_in_progress`,`security_session_invalid`,`deployment_security_required`,`security_unavailable`,`rate_limited`,`captcha_unavailable`]),yr=new Set([..._r,...vr,`network`,`timeout`,`unsupported`,`exhausted`,`broken`,`unknown`,`http_error`,`meeting_error`,`unsupported_security_version`,`Error`,`TypeError`,`RangeError`,`ReferenceError`,`SyntaxError`,`playback_error`,`asset_error`,`config_invalid`,`security_response_invalid`,`device_error`,`connection_lost`,`canvas_error`,`integration_error`,`queue_full`,`expired`,`retry_exhausted`,`rejected`]);function br(e,t=!0){if(e instanceof Pn)return{code:e.code};if(e instanceof Error&&e.name===`TimeoutError`)return{code:`timeout`};if(e instanceof bn){let t=`http_error`;try{let n=JSON.parse(e.body);n&&typeof n==`object`&&`code`in n&&typeof n.code==`string`&&vr.has(n.code)&&(t=n.code)}catch{}return{status:e.status,code:t}}return e instanceof Error&&_r.has(e.name)?{code:e.name}:{code:e instanceof TypeError&&t?`network`:e instanceof Error&&In.has(e.name)&&e.name!==`Error`?e.name:`unknown`}}function xr(e,t,n){try{e?.captureError?e.captureError(t,n):e?.record({...br(t,n.component===`api`),...n})}catch{Xn.warn(`Error observation failed`)}}async function Sr(e,t,n,r,i={}){if(e?.requestInstrumented&&[`init`,`start_token`,`start`,`end`].includes(t))return n();let a=performance.now(),o={stage:t,conversation_id:r,...i};e?.record({...o,outcome:`started`});try{let t=await n();return e?.record({...o,outcome:`succeeded`,duration_ms:performance.now()-a}),t}catch(n){let r=br(n,[`init`,`start_token`,`start`,`end`].includes(t));throw xr(e,n,{...o,...r,handled:i.handled??!0,outcome:r.code===`AbortError`?`cancelled`:`failed`,duration_ms:performance.now()-a}),n}}function Cr(e,t,n){try{return n()}catch(n){throw xr(e,n,t),n}}var wr=class extends ee{componentDidCatch(e){throw xr(this.props.telemetry,e,{stage:`runtime`,outcome:`failed`,component:`runtime`,operation:`render`,handled:!1,error_type:e instanceof Error&&In.has(e.name)?e.name:`Error`}),this.props.telemetry.flush(),e}render(){return this.props.children}},Tr=mn(`Config`);function Er(){return{is_available:!1}}var Dr=280,Or=Ce(null);function kr({children:e,fallback:t}){let n=F(yt),r=n.deploymentId??``,i=n.overrideConfig,a=n.baseUrl,o=n.previewToken,s=N(()=>yn({baseUrl:a??`https://tavusapi.com`,token:o,deploymentId:r}),[a,o,r]),c=N(()=>hr(s,r,{name:n.surface?`@tavus/${n.surface}`:Fn.name,version:Fn.version}),[s,r,n.surface]);j(()=>{c.sessionId&&console.info(`[Tavus:Diagnostics] Session:`,c.sessionId);let e=()=>{c.flush()},t=()=>{document.visibilityState===`hidden`&&e()};return window.addEventListener(`pagehide`,e),document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`pagehide`,e),document.removeEventListener(`visibilitychange`,t),c.dispose()}},[c]),j(()=>{n.configInputError&&c.record({stage:`init`,outcome:`failed`,operation:`config.normalize`,component:`config`,code:`SyntaxError`,error_type:`SyntaxError`,handled:!0})},[n.configInputError,c]);let l=N(()=>zt(null),[]),u=N(()=>zt(null),[]),d=N(()=>zt(!1),[]),f=N(()=>zt(0),[]),p=M([]),m=P(()=>{let e=p.current;p.current=[];for(let t of e)t()},[]),h=P(()=>r?new Promise(e=>{p.current.push(e),f.value=f.peek()+1}):Promise.resolve(),[r,f]);pn(()=>{if(f.value,!r){u.value=null,d.value=!1,l.value=i||null;return}let e=new AbortController;return Sr(c,`init`,async()=>{let t=await Cn(s,r,{signal:e.signal});return Cr(c,{stage:`init`,outcome:`failed`,operation:`config.normalize`,component:`config`,handled:!0},()=>(e.signal.aborted||c.configure(t.telemetry?.version),t))}).then(t=>{e.signal.aborted||(u.value=null,d.value=!1,l.value=t,Tr.info(`Deployment initialized`,t.deployment_id),m())}).catch(t=>{e.signal.aborted||(Tr.error(`Init failed:`,t),u.value=t,d.value=!i,l.value=i||Er(),m())}),()=>{e.abort()}});let g=N(()=>zt(null),[]);Qe(()=>l.subscribe(e=>{if(!e){g.value=null;return}let t=i?On(e,i):e;g.value=Cr(c,{stage:`init`,outcome:`failed`,operation:`config.normalize`,component:`config`,handled:!1},()=>Nn(t,()=>c.record({stage:`init`,outcome:`failed`,operation:`config.normalize`,component:`config`,code:`config_invalid`,handled:!0})))}),[g,l,i,c]);let _=g.value!==null,[v,y]=A(`pending`);if(j(()=>{if(!_){y(`pending`);return}if(!t){y(`done`);return}if(globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1){y(`done`);return}y(`fading`);let e=setTimeout(()=>y(`done`),Dr);return()=>clearTimeout(e)},[_]),!t){if(!_)return I(D,{});let t={telemetry:c,deploymentId:r,config:g,initError:u,configError:d,retryInit:h,client:s};return I(Or.Provider,{value:t,children:I(wr,{telemetry:c,children:e})})}let b=_?{telemetry:c,deploymentId:r,config:g,initError:u,configError:d,retryInit:h,client:s}:null;return I(`div`,{class:`relative w-full h-full`,children:[b&&I(Or.Provider,{value:b,children:I(wr,{telemetry:c,children:e})}),v!==`done`&&I(`div`,{class:`absolute inset-0 z-10${v===`fading`?` pointer-events-none motion-safe:animate-[tavusFadeOut_280ms_ease-out_forwards]`:``}`,"aria-hidden":v===`fading`?`true`:void 0,children:t})]})}var Ar=Ce(null);function jr({children:e}){let{client:t}=F(Or),n=N(()=>({client:t}),[t]);return I(Ar.Provider,{value:n,children:e})}function Mr(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Nr(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function R(e){return R=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},R(e)}function Pr(e){var t=function(e,t){if(R(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(R(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return R(t)==`symbol`?t:t+``}function Fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Pr(r.key),r)}}function Ir(e,t,n){return t&&Fr(e.prototype,t),n&&Fr(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lr(e,t){if(t&&(R(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function Rr(e){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rr(e)}function zr(e,t){return zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zr(e,t)}function Br(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zr(e,t)}function Vr(e,t,n){return(t=Pr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hr(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function z(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Hr(a,r,i,o,s,`next`,e)}function s(e){Hr(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Ur(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Wr(e,t){if(e){if(typeof e==`string`)return Ur(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ur(e,t):void 0}}function Gr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||Wr(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var qr,Jr={exports:{}},Yr=function(){if(qr)return Jr.exports;qr=1;var e,t=typeof Reflect==`object`?Reflect:null,n=t&&typeof t.apply==`function`?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};e=t&&typeof t.ownKeys==`function`?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}Jr.exports=i,Jr.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}m(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&m(e,`error`,t,n)}(e,i,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function s(e){return e._maxListeners===void 0?i.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,a,c,l;if(o(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),c=a[t]),c===void 0)c=a[t]=n,++e._eventsCount;else if(typeof c==`function`?c=a[t]=r?[n,c]:[c,n]:r?c.unshift(n):c.push(n),(i=s(e))>0&&c.length>i&&!c.warned){c.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+c.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=c.length,l=u,console&&console.warn&&console.warn(l)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function p(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);a=e}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||r(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)n(c,this,t);else{var l=c.length,u=p(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,i,a,s;if(o(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):f.call(e,t)},i.prototype.listenerCount=f,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},Jr.exports}(),Xr=Kr(Yr),Zr=Object.prototype.hasOwnProperty;function Qr(e,t,n){for(n of e.keys())if($r(n,t))return n}function $r(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&$r(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&typeof i==`object`&&!(i=Qr(t,i))||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&typeof i==`object`&&!(i=Qr(t,i))||!$r(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(Zr.call(e,n)&&++r&&!Zr.call(t,n)||!(n in t)||!$r(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var ei={AmazonBot:`amazonbot`,"Amazon Silk":`amazon_silk`,"Android Browser":`android`,BaiduSpider:`baiduspider`,Bada:`bada`,BingCrawler:`bingcrawler`,Brave:`brave`,BlackBerry:`blackberry`,"ChatGPT-User":`chatgpt_user`,Chrome:`chrome`,ClaudeBot:`claudebot`,Chromium:`chromium`,Diffbot:`diffbot`,DuckDuckBot:`duckduckbot`,DuckDuckGo:`duckduckgo`,Electron:`electron`,Epiphany:`epiphany`,FacebookExternalHit:`facebookexternalhit`,Firefox:`firefox`,Focus:`focus`,Generic:`generic`,"Google Search":`google_search`,Googlebot:`googlebot`,GPTBot:`gptbot`,"Internet Explorer":`ie`,InternetArchiveCrawler:`internetarchivecrawler`,"K-Meleon":`k_meleon`,LibreWolf:`librewolf`,Linespider:`linespider`,Maxthon:`maxthon`,"Meta-ExternalAds":`meta_externalads`,"Meta-ExternalAgent":`meta_externalagent`,"Meta-ExternalFetcher":`meta_externalfetcher`,"Meta-WebIndexer":`meta_webindexer`,"Microsoft Edge":`edge`,"MZ Browser":`mz`,"NAVER Whale Browser":`naver`,"OAI-SearchBot":`oai_searchbot`,Omgilibot:`omgilibot`,Opera:`opera`,"Opera Coast":`opera_coast`,"Pale Moon":`pale_moon`,PerplexityBot:`perplexitybot`,"Perplexity-User":`perplexity_user`,PhantomJS:`phantomjs`,PingdomBot:`pingdombot`,Puffin:`puffin`,QQ:`qq`,QQLite:`qqlite`,QupZilla:`qupzilla`,Roku:`roku`,Safari:`safari`,Sailfish:`sailfish`,"Samsung Internet for Android":`samsung_internet`,SlackBot:`slackbot`,SeaMonkey:`seamonkey`,Sleipnir:`sleipnir`,"Sogou Browser":`sogou`,Swing:`swing`,Tizen:`tizen`,"UC Browser":`uc`,Vivaldi:`vivaldi`,"WebOS Browser":`webos`,WeChat:`wechat`,YahooSlurp:`yahooslurp`,"Yandex Browser":`yandex`,YandexBot:`yandexbot`,YouBot:`youbot`},ti={amazonbot:`AmazonBot`,amazon_silk:`Amazon Silk`,android:`Android Browser`,baiduspider:`BaiduSpider`,bada:`Bada`,bingcrawler:`BingCrawler`,blackberry:`BlackBerry`,brave:`Brave`,chatgpt_user:`ChatGPT-User`,chrome:`Chrome`,claudebot:`ClaudeBot`,chromium:`Chromium`,diffbot:`Diffbot`,duckduckbot:`DuckDuckBot`,duckduckgo:`DuckDuckGo`,edge:`Microsoft Edge`,electron:`Electron`,epiphany:`Epiphany`,facebookexternalhit:`FacebookExternalHit`,firefox:`Firefox`,focus:`Focus`,generic:`Generic`,google_search:`Google Search`,googlebot:`Googlebot`,gptbot:`GPTBot`,ie:`Internet Explorer`,internetarchivecrawler:`InternetArchiveCrawler`,k_meleon:`K-Meleon`,librewolf:`LibreWolf`,linespider:`Linespider`,maxthon:`Maxthon`,meta_externalads:`Meta-ExternalAds`,meta_externalagent:`Meta-ExternalAgent`,meta_externalfetcher:`Meta-ExternalFetcher`,meta_webindexer:`Meta-WebIndexer`,mz:`MZ Browser`,naver:`NAVER Whale Browser`,oai_searchbot:`OAI-SearchBot`,omgilibot:`Omgilibot`,opera:`Opera`,opera_coast:`Opera Coast`,pale_moon:`Pale Moon`,perplexitybot:`PerplexityBot`,perplexity_user:`Perplexity-User`,phantomjs:`PhantomJS`,pingdombot:`PingdomBot`,puffin:`Puffin`,qq:`QQ Browser`,qqlite:`QQ Browser Lite`,qupzilla:`QupZilla`,roku:`Roku`,safari:`Safari`,sailfish:`Sailfish`,samsung_internet:`Samsung Internet for Android`,seamonkey:`SeaMonkey`,slackbot:`SlackBot`,sleipnir:`Sleipnir`,sogou:`Sogou Browser`,swing:`Swing`,tizen:`Tizen`,uc:`UC Browser`,vivaldi:`Vivaldi`,webos:`WebOS Browser`,wechat:`WeChat`,yahooslurp:`YahooSlurp`,yandex:`Yandex Browser`,yandexbot:`YandexBot`,youbot:`YouBot`},B={bot:`bot`,desktop:`desktop`,mobile:`mobile`,tablet:`tablet`,tv:`tv`},ni={Android:`Android`,Bada:`Bada`,BlackBerry:`BlackBerry`,ChromeOS:`Chrome OS`,HarmonyOS:`HarmonyOS`,iOS:`iOS`,Linux:`Linux`,MacOS:`macOS`,PlayStation4:`PlayStation 4`,Roku:`Roku`,Tizen:`Tizen`,WebOS:`WebOS`,Windows:`Windows`,WindowsPhone:`Windows Phone`},ri={Blink:`Blink`,EdgeHTML:`EdgeHTML`,Gecko:`Gecko`,Presto:`Presto`,Trident:`Trident`,WebKit:`WebKit`},V=class e{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||``}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||``}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case`NT`:return`NT`;case`XP`:case`NT 5.1`:return`XP`;case`NT 5.0`:return`2000`;case`NT 5.2`:return`2003`;case`NT 6.0`:return`Vista`;case`NT 6.1`:return`7`;case`NT 6.2`:return`8`;case`NT 6.3`:return`8.1`;case`NT 10.0`:return`10`;default:return}}static getMacOSVersionName(e){let t=e.split(`.`).splice(0,2).map(e=>parseInt(e,10)||0);t.push(0);let n=t[0],r=t[1];if(n===10)switch(r){case 5:return`Leopard`;case 6:return`Snow Leopard`;case 7:return`Lion`;case 8:return`Mountain Lion`;case 9:return`Mavericks`;case 10:return`Yosemite`;case 11:return`El Capitan`;case 12:return`Sierra`;case 13:return`High Sierra`;case 14:return`Mojave`;case 15:return`Catalina`;default:return}switch(n){case 11:return`Big Sur`;case 12:return`Monterey`;case 13:return`Ventura`;case 14:return`Sonoma`;case 15:return`Sequoia`;default:return}}static getAndroidVersionName(e){let t=e.split(`.`).splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5))return t[0]===1&&t[1]<6?`Cupcake`:t[0]===1&&t[1]>=6?`Donut`:t[0]===2&&t[1]<2?`Eclair`:t[0]===2&&t[1]===2?`Froyo`:t[0]===2&&t[1]>2?`Gingerbread`:t[0]===3?`Honeycomb`:t[0]===4&&t[1]<1?`Ice Cream Sandwich`:t[0]===4&&t[1]<4?`Jelly Bean`:t[0]===4&&t[1]>=4?`KitKat`:t[0]===5?`Lollipop`:t[0]===6?`Marshmallow`:t[0]===7?`Nougat`:t[0]===8?`Oreo`:t[0]===9?`Pie`:void 0}static getVersionPrecision(e){return e.split(`.`).length}static compareVersions(t,n,r=!1){let i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,c=e.map([t,n],t=>{let n=o-e.getVersionPrecision(t),r=t+Array(n+1).join(`.0`);return e.map(r.split(`.`),e=>Array(20-e.length).join(`0`)+e).reverse()});for(r&&(s=o-Math.min(i,a)),--o;o>=s;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===s)return 0;--o}else if(c[0][o]<c[1][o])return-1}}static map(e,t){let n=[],r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){let r=e[n];if(t(r,n))return r}}static assign(e,...t){let n=e,r,i;if(Object.assign)return Object.assign(e,...t);for(r=0,i=t.length;r<i;r+=1){let e=t[r];typeof e==`object`&&e&&Object.keys(e).forEach(t=>{n[t]=e[t]})}return e}static getBrowserAlias(e){return ei[e]}static getBrowserTypeByAlias(e){return ti[e]||``}},H=/version\/(\d+(\.?_?\d+)+)/i,ii=[{test:[/gptbot/i],describe(e){let t={name:`GPTBot`},n=V.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe(e){let t={name:`ChatGPT-User`},n=V.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe(e){let t={name:`OAI-SearchBot`},n=V.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe(e){let t={name:`ClaudeBot`},n=V.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe(e){let t={name:`Omgilibot`},n=V.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe(e){let t={name:`Diffbot`},n=V.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe(e){let t={name:`PerplexityBot`},n=V.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe(e){let t={name:`Perplexity-User`},n=V.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe(e){let t={name:`YouBot`},n=V.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe(e){let t={name:`Meta-WebIndexer`},n=V.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe(e){let t={name:`Meta-ExternalAds`},n=V.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe(e){let t={name:`Meta-ExternalAgent`},n=V.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe(e){let t={name:`Meta-ExternalFetcher`},n=V.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe(e){let t={name:`Googlebot`},n=V.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe(e){let t={name:`Linespider`},n=V.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe(e){let t={name:`AmazonBot`},n=V.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe(e){let t={name:`BingCrawler`},n=V.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe(e){let t={name:`BaiduSpider`},n=V.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe(e){let t={name:`DuckDuckBot`},n=V.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe(e){let t={name:`InternetArchiveCrawler`},n=V.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({name:`FacebookExternalHit`})},{test:[/slackbot/i,/slack-imgProxy/i],describe(e){let t={name:`SlackBot`},n=V.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:()=>({name:`YahooSlurp`})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({name:`YandexBot`})},{test:[/pingdom/i],describe:()=>({name:`PingdomBot`})},{test:[/opera/i],describe(e){let t={name:`Opera`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:`Opera`},n=V.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:`Samsung Internet for Android`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:`NAVER Whale Browser`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){let t={name:`Pale Moon`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:`MZ Browser`},n=V.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:`Focus`},n=V.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:`Swing`},n=V.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:`Opera Coast`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:`Opera Touch`},n=V.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:`Yandex Browser`},n=V.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:`UC Browser`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:`Maxthon`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:`Epiphany`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:`Puffin`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:`Sleipnir`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:`K-Meleon`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:`WeChat`},n=V.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?`QQ Browser Lite`:`QQ Browser`},n=V.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:`Internet Explorer`},n=V.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:`Microsoft Edge`},n=V.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:`Microsoft Edge`},n=V.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:`Vivaldi`},n=V.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:`SeaMonkey`},n=V.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:`Sailfish`},n=V.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:`Amazon Silk`},n=V.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:`PhantomJS`},n=V.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:`SlimerJS`},n=V.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:`BlackBerry`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:`WebOS Browser`},n=V.getFirstMatch(H,e)||V.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:`Bada`},n=V.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:`Tizen`},n=V.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:`QupZilla`},n=V.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe(e){let t={name:`LibreWolf`},n=V.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:`Firefox`},n=V.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:`Electron`},n=V.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe(e){let t={name:`Sogou Browser`},n=V.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=V.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=V.getFirstMatch(/se ([\d.]+)x/i,e),a=n||r||i;return a&&(t.version=a),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:`Miui`},n=V.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>!!e.hasBrand(`DuckDuckGo`)||e.test(/\sDdg\/[\d.]+$/i),describe(e,t){let n={name:`DuckDuckGo`};if(t){let e=t.getBrandVersion(`DuckDuckGo`);if(e)return n.version=e,n}let r=V.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return r&&(n.version=r),n}},{test:e=>e.hasBrand(`Brave`),describe(e,t){let n={name:`Brave`};if(t){let e=t.getBrandVersion(`Brave`);if(e)return n.version=e,n}return n}},{test:[/chromium/i],describe(e){let t={name:`Chromium`},n=V.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:`Chrome`},n=V.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:`Google Search`},n=V.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:`Android Browser`},n=V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:`PlayStation 4`},n=V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:`Safari`},n=V.getFirstMatch(H,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:V.getFirstMatch(t,e),version:V.getSecondMatch(t,e)}}}],ai=[{test:[/Roku\/DVP/],describe(e){let t=V.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:ni.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=V.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:ni.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=V.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=V.getWindowsVersionName(t);return{name:ni.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:ni.iOS},n=V.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=V.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=V.getMacOSVersionName(t),r={name:ni.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=V.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:ni.iOS,version:t}}},{test:[/OpenHarmony/i],describe(e){let t=V.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:ni.HarmonyOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=V.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=V.getAndroidVersionName(t),r={name:ni.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=V.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:ni.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=V.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||V.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||V.getFirstMatch(/\bbb(\d+)/i,e);return{name:ni.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=V.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:ni.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=V.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:ni.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:ni.Linux})},{test:[/CrOS/],describe:()=>({name:ni.ChromeOS})},{test:[/PlayStation 4/],describe(e){let t=V.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:ni.PlayStation4,version:t}}}],oi=[{test:[/googlebot/i],describe:()=>({type:B.bot,vendor:`Google`})},{test:[/linespider/i],describe:()=>({type:B.bot,vendor:`Line`})},{test:[/amazonbot/i],describe:()=>({type:B.bot,vendor:`Amazon`})},{test:[/gptbot/i],describe:()=>({type:B.bot,vendor:`OpenAI`})},{test:[/chatgpt-user/i],describe:()=>({type:B.bot,vendor:`OpenAI`})},{test:[/oai-searchbot/i],describe:()=>({type:B.bot,vendor:`OpenAI`})},{test:[/baiduspider/i],describe:()=>({type:B.bot,vendor:`Baidu`})},{test:[/bingbot/i],describe:()=>({type:B.bot,vendor:`Bing`})},{test:[/duckduckbot/i],describe:()=>({type:B.bot,vendor:`DuckDuckGo`})},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:()=>({type:B.bot,vendor:`Anthropic`})},{test:[/omgilibot/i,/webzio-extended/i],describe:()=>({type:B.bot,vendor:`Webz.io`})},{test:[/diffbot/i],describe:()=>({type:B.bot,vendor:`Diffbot`})},{test:[/perplexitybot/i],describe:()=>({type:B.bot,vendor:`Perplexity AI`})},{test:[/perplexity-user/i],describe:()=>({type:B.bot,vendor:`Perplexity AI`})},{test:[/youbot/i],describe:()=>({type:B.bot,vendor:`You.com`})},{test:[/ia_archiver/i],describe:()=>({type:B.bot,vendor:`Internet Archive`})},{test:[/meta-webindexer/i],describe:()=>({type:B.bot,vendor:`Meta`})},{test:[/meta-externalads/i],describe:()=>({type:B.bot,vendor:`Meta`})},{test:[/meta-externalagent/i],describe:()=>({type:B.bot,vendor:`Meta`})},{test:[/meta-externalfetcher/i],describe:()=>({type:B.bot,vendor:`Meta`})},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({type:B.bot,vendor:`Meta`})},{test:[/slackbot/i,/slack-imgProxy/i],describe:()=>({type:B.bot,vendor:`Slack`})},{test:[/yahoo/i],describe:()=>({type:B.bot,vendor:`Yahoo`})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({type:B.bot,vendor:`Yandex`})},{test:[/pingdom/i],describe:()=>({type:B.bot,vendor:`Pingdom`})},{test:[/huawei/i],describe(e){let t=V.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:B.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:B.tablet,vendor:`Nexus`})},{test:[/ipad/i],describe:()=>({type:B.tablet,vendor:`Apple`,model:`iPad`})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:B.tablet,vendor:`Apple`,model:`iPad`})},{test:[/kftt build/i],describe:()=>({type:B.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`})},{test:[/silk/i],describe:()=>({type:B.tablet,vendor:`Amazon`})},{test:[/tablet(?! pc)/i],describe:()=>({type:B.tablet})},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=V.getFirstMatch(/(ipod|iphone)/i,e);return{type:B.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:B.mobile,vendor:`Nexus`})},{test:[/Nokia/i],describe(e){let t=V.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:B.mobile,vendor:`Nokia`};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:()=>({type:B.mobile})},{test:e=>e.getBrowserName(!0)===`blackberry`,describe:()=>({type:B.mobile,vendor:`BlackBerry`})},{test:e=>e.getBrowserName(!0)===`bada`,describe:()=>({type:B.mobile})},{test:e=>e.getBrowserName()===`windows phone`,describe:()=>({type:B.mobile,vendor:`Microsoft`})},{test(e){let t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:()=>({type:B.tablet})},{test:e=>e.getOSName(!0)===`android`,describe:()=>({type:B.mobile})},{test:[/smart-?tv|smarttv/i],describe:()=>({type:B.tv})},{test:[/netcast/i],describe:()=>({type:B.tv})},{test:e=>e.getOSName(!0)===`macos`,describe:()=>({type:B.desktop,vendor:`Apple`})},{test:e=>e.getOSName(!0)===`windows`,describe:()=>({type:B.desktop})},{test:e=>e.getOSName(!0)===`linux`,describe:()=>({type:B.desktop})},{test:e=>e.getOSName(!0)===`playstation 4`,describe:()=>({type:B.tv})},{test:e=>e.getOSName(!0)===`roku`,describe:()=>({type:B.tv})}],si=[{test:e=>e.getBrowserName(!0)===`microsoft edge`,describe(e){if(/\sedg\//i.test(e))return{name:ri.Blink};let t=V.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:ri.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:ri.Trident},n=V.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){let t={name:ri.Presto},n=V.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:ri.Gecko},n=V.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:ri.Blink})},{test:[/(apple)?webkit/i],describe(e){let t={name:ri.WebKit},n=V.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],ci=class{constructor(e,t=!1,n=null){if(e==null||e===``)throw Error(`UserAgent parameter can't be empty`);this._ua=e;let r=!1;typeof t==`boolean`?(r=t,this._hints=n):this._hints=typeof t==`object`&&t?t:null,this.parsedResult={},!0!==r&&this.parse()}getHints(){return this._hints}hasBrand(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;let t=e.toLowerCase();return this._hints.brands.some(e=>e.brand&&e.brand.toLowerCase()===t)}getBrandVersion(e){if(!this._hints||!Array.isArray(this._hints.brands))return;let t=e.toLowerCase(),n=this._hints.brands.find(e=>e.brand&&e.brand.toLowerCase()===t);return n?n.version:void 0}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=V.find(ii,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.browser=e.describe(this.getUA(),this)),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||``:this.getBrowser().name||``}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=V.find(ai,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||``:t||``}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||``:t||``}parsePlatform(){this.parsedResult.platform={};let e=V.find(oi,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||``:this.getEngine().name||``}parseEngine(){this.parsedResult.engine={};let e=V.find(si,e=>{if(typeof e.test==`function`)return e.test(this);if(Array.isArray(e.test))return e.test.some(e=>this.test(e));throw Error(`Browser's test function is not valid`)});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return V.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},i=0;if(Object.keys(e).forEach(a=>{let o=e[a];typeof o==`string`?(r[a]=o,i+=1):typeof o==`object`&&(t[a]=o,n+=1)}),n>0){let e=Object.keys(t),n=V.find(e,e=>this.isOS(e));if(n){let e=this.satisfies(t[n]);if(e!==void 0)return e}let r=V.find(e,e=>this.isPlatform(e));if(r){let e=this.satisfies(t[r]);if(e!==void 0)return e}}if(i>0){let e=Object.keys(r),t=V.find(e,e=>this.isBrowser(e,!0));if(t!==void 0)return this.compareVersion(r[t])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=V.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,i=this.getBrowserVersion();if(typeof i==`string`)return e[0]===`>`||e[0]===`<`?(n=e.substr(1),e[1]===`=`?(r=!0,n=e.substr(2)):t=[],e[0]===`>`?t.push(1):t.push(-1)):e[0]===`=`?n=e.substr(1):e[0]===`~`&&(r=!0,n=e.substr(1)),t.indexOf(V.compareVersions(i,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(e=>this.is(e))}},li=class{static getParser(e,t=!1,n=null){if(typeof e!=`string`)throw Error(`UserAgent should be a string`);return new ci(e,t,n)}static parse(e,t=null){return new ci(e,t).getResult()}static get BROWSER_MAP(){return ti}static get ENGINE_MAP(){return ri}static get OS_MAP(){return ni}static get PLATFORMS_MAP(){return B}};function ui(e){return function(e){if(Array.isArray(e))return Ur(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||Wr(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
5
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function di(){return Date.now()+Math.random().toString()}function fi(){throw Error(`Method must be implemented in subclass`)}var pi=[`daily.co`,`dailywebrtc.com`,`dailywebrtc.net`],mi=null;function hi(){return mi}function gi(e){(e===null||pi.includes(e))&&(mi=e)}function _i(e){try{var t=new URL(e).hostname;return pi.find(function(e){return t===e||t.endsWith(`.${e}`)})||null}catch{return null}}function vi(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)===`/`?``:`/`)+e.substring(8):e}function yi(e,t){var n=pi.find(function(t){return e.includes(t)});return n?e.replace(n,t):e}function bi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mi??pi[0];return e!=null&&e.callObjectBundleUrlOverride?(console.warn(`The callObjectBundleUrlOverride property is deprecated and will be removed. Please use bundlePathOverride instead. When providing a bundlePathOverride, the URL should point to the directory containing all Daily bundles (call-machine-object-bundle.js and audio-processor-bundle.js).`),yi(e.callObjectBundleUrlOverride,t)):function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mi??pi[0];if(t&&t.trim()!==``||(t=mi??pi[0]),e!=null&&e.bundlePathOverride){var n=yi(e.bundlePathOverride,t);return n.endsWith(`/`)?n.slice(0,-1):n}if(e!=null&&e.callObjectBundleUrlOverride){var r=yi(e.callObjectBundleUrlOverride,t),i=r.substring(0,r.lastIndexOf(`/`));return i.endsWith(`/`)?i.slice(0,-1):i}var a=vi(`https://c.${t}/call-machine/versioned/0.92.2/static`,e);return a.endsWith(`/`)?a.slice(0,-1):a}(e,t)+`/call-machine-object-bundle.js`}function xi(e){var t=e?.bundlePathOverride||e?.callObjectBundleUrlOverride;return!(!t||pi.some(function(e){return t.includes(e)}))||!!(e?.proxyUrl||function(){try{return typeof localStorage<`u`&&localStorage.getItem(`daily:disable-base-domain-fallback`)===`1`}catch{return!1}}())}function Si(e){try{var t=e??window.location.hostname;return pi.find(function(e){return t===e||t.endsWith(`.${e}`)})??null}catch{return null}}function Ci(e,t){var n=_i(e);if(!n||xi(t))return[e];var r=mi??Si()??pi[0];return(r===pi[0]?pi:[r].concat(ui(pi.filter(function(e){return e!==r})))).map(function(t){return t===n?e:function(e,t,n){try{var r=new URL(e);return r.hostname.endsWith(`.${t}`)?r.hostname=r.hostname.slice(0,-t.length)+n:r.hostname===t&&(r.hostname=n),r.toString()}catch{return e}}(e,n,t)})}function wi(e){try{new URL(e)}catch{return!1}return!0}var Ti=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Ei=`8.55.2`,Di=globalThis;function Oi(e,t,n){let r=n||Di,i=r.__SENTRY__=r.__SENTRY__||{},a=i[Ei]=i[Ei]||{};return a[e]||(a[e]=t())}var ki=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Ai=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],ji={};function Mi(e){if(!(`console`in Di))return e();let t=Di.console,n={},r=Object.keys(ji);r.forEach(e=>{let r=ji[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}var U=Oi(`logger`,function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ki?Ai.forEach(n=>{t[n]=(...t)=>{e&&Mi(()=>{Di.console[n](`Sentry Logger [${n}]:`,...t)})}}):Ai.forEach(e=>{t[e]=()=>{}}),t}),Ni=`?`,Pi=/\(error: (.*)\)/,Fi=/captureMessage|captureException/;function Ii(e){return e[e.length-1]||{}}var Li=`<anonymous>`;function Ri(e){try{return e&&typeof e==`function`&&e.name||Li}catch{return Li}}function zi(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var Bi={},Vi={};function Hi(e,t){Bi[e]=Bi[e]||[],Bi[e].push(t)}function Ui(e,t){if(!Vi[e]){Vi[e]=!0;try{t()}catch(t){ki&&U.error(`Error while instrumenting ${e}`,t)}}}function Wi(e,t){let n=e&&Bi[e];if(n)for(let r of n)try{r(t)}catch(t){ki&&U.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Ri(r)}\nError:`,t)}}var Gi=null;function Ki(){Gi=Di.onerror,Di.onerror=function(e,t,n,r,i){return Wi(`error`,{column:r,error:i,line:n,msg:e,url:t}),!!Gi&&Gi.apply(this,arguments)},Di.onerror.__SENTRY_INSTRUMENTED__=!0}var qi=null;function Ji(){qi=Di.onunhandledrejection,Di.onunhandledrejection=function(e){return Wi(`unhandledrejection`,e),!qi||qi.apply(this,arguments)},Di.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Yi(){return Xi(Di),Di}function Xi(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ei,t[Ei]=t[Ei]||{}}var Zi=Object.prototype.toString;function Qi(e){switch(Zi.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return ca(e,Error)}}function $i(e,t){return Zi.call(e)===`[object ${t}]`}function ea(e){return $i(e,`ErrorEvent`)}function ta(e){return $i(e,`DOMError`)}function na(e){return $i(e,`String`)}function ra(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function ia(e){return e===null||ra(e)||typeof e!=`object`&&typeof e!=`function`}function aa(e){return $i(e,`Object`)}function oa(e){return typeof Event<`u`&&ca(e,Event)}function sa(e){return!!(e&&e.then&&typeof e.then==`function`)}function ca(e,t){try{return e instanceof t}catch{return!1}}function la(e){return!(typeof e!=`object`||!e||!e.__isVue&&!e._isVue)}var ua=Di;function da(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&i++<5&&(o=fa(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function fa(e,t){let n=e,r=[];if(!n||!n.tagName)return``;if(ua.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i&&i.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&na(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function pa(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ma(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{la(r)?n.push(`[VueViewModel]`):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function ha(e,t,n=!1){return!!na(e)&&($i(t,`RegExp`)?t.test(e):!!na(t)&&(n?e===t:e.includes(t)))}function ga(e,t=[],n=!1){return t.some(t=>ha(e,t,n))}function _a(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i==`function`&&ya(i,r);try{e[t]=i}catch{ki&&U.log(`Failed to replace method "${t}" in object`,e)}}function va(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ki&&U.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ya(e,t){try{e.prototype=t.prototype=t.prototype||{},va(e,`__sentry_original__`,t)}catch{}}function ba(e){return e.__sentry_original__}function xa(e){if(Qi(e))return{message:e.message,name:e.name,stack:e.stack,...Ca(e)};if(oa(e)){let t={type:e.type,target:Sa(e.target),currentTarget:Sa(e.currentTarget),...Ca(e)};return typeof CustomEvent<`u`&&ca(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Sa(e){try{return t=e,typeof Element<`u`&&ca(t,Element)?da(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}var t}function Ca(e){if(typeof e==`object`&&e){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function wa(e){return Ta(e,new Map)}function Ta(e,t){if(function(e){if(!aa(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||t===`Object`}catch{return!0}}(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let n of Object.getOwnPropertyNames(e))e[n]!==void 0&&(r[n]=Ta(e[n],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(e=>{r.push(Ta(e,t))}),r}return e}function Ea(){return Date.now()/1e3}var Da=function(){let{performance:e}=Di;if(!e||!e.now)return Ea;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function Oa(){let e=Di,t=e.crypto||e.msCrypto,n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,``);t&&t.getRandomValues&&(n=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return`10000000100040008000100000000000`.replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function ka(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Aa(e){let{message:t,event_id:n}=e;if(t)return t;let r=ka(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function ja(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function Ma(e,t){let n=ka(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:`generic`,handled:!0,...r,...t},t&&`data`in t){let e={...r&&r.data,...t.data};n.mechanism.data=e}}function Na(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{va(e,`__sentry_captured__`,!0)}catch{}return!1}var Pa;function Fa(e){return new La(t=>{t(e)})}function Ia(e){return new La((t,n)=>{n(e)})}(()=>{let{performance:e}=Di;if(!e||!e.now)return;let t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,a=i<t,o=e.timing&&e.timing.navigationStart,s=typeof o==`number`?Math.abs(o+n-r):t;(a||s<t)&&i<=s&&e.timeOrigin})(),function(e){e[e.PENDING=0]=`PENDING`,e[e.RESOLVED=1]=`RESOLVED`,e[e.REJECTED=2]=`REJECTED`}(Pa||={});var La=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=Pa.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(t)try{e(t(n))}catch(e){r(e)}else e(n)},t=>{if(n)try{e(n(t))}catch(e){r(e)}else r(t)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}__init(){this._resolve=e=>{this._setResult(Pa.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Pa.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===Pa.PENDING&&(sa(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Pa.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===Pa.RESOLVED&&e[1](this._value),this._state===Pa.REJECTED&&e[2](this._value),!0)})}}};function Ra(e){let t=Da(),n={sid:Oa(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>function(e){return wa({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&za(n,e),n}function za(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Da(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Oa()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Ba(){return Oa()}function Va(){return Oa().substring(16)}function Ha(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Ha(r[e],t[e],n-1));return r}var Ua=`_sentrySpan`;function Wa(e,t){t?va(e,Ua,t):delete e[Ua]}function Ga(e){return e[Ua]}var Ka=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ba(),spanId:Va()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Wa(t,Ga(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&za(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t=typeof e==`function`?e(this):e,[n,r]=t instanceof Ka?[t.getScopeData(),t.getRequestSession()]:aa(t)?[e,e.requestSession]:[],{tags:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Wa(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ba()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:100;if(n<=0)return this;let r={timestamp:Ea(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ga(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Ha(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Va(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:Oa();if(!this._client)return U.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n&&n.event_id?n.event_id:Oa();if(!this._client)return U.warn(`No client configured on scope - will not capture message!`),r;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:Oa();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(U.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}},qa=class{constructor(e,t){let n,r;n=e||new Ka,r=t||new Ka,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return sa(n)?n.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}};function Ja(){let e=Xi(Yi());return e.stack=e.stack||new qa(Oi(`defaultCurrentScope`,()=>new Ka),Oi(`defaultIsolationScope`,()=>new Ka))}function Ya(e){return Ja().withScope(e)}function Xa(e,t){let n=Ja();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Za(e){return Ja().withScope(()=>e(Ja().getIsolationScope()))}function Qa(e){let t=Xi(e);return t.acs?t.acs:{withIsolationScope:Za,withScope:Ya,withSetScope:Xa,withSetIsolationScope:(e,t)=>Za(t),getCurrentScope:()=>Ja().getScope(),getIsolationScope:()=>Ja().getIsolationScope()}}function $a(){return Qa(Yi()).getCurrentScope()}function eo(){return Qa(Yi()).getIsolationScope()}function to(){return $a().getClient()}function no(e){let{traceId:t,spanId:n,parentSpanId:r}=e.getPropagationContext();return wa({trace_id:t,span_id:n,parent_span_id:r})}function ro(e){let t=e._sentryMetrics;if(!t)return;let n={};for(let[,[e,r]]of t)(n[e]||(n[e]=[])).push(wa(r));return n}var io=/^sentry-/;function ao(e){let t=function(e){if(e&&(na(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=oo(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):oo(e)}(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>(t.match(io)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function oo(e){return e.split(`,`).map(e=>e.split(`=`).map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var so=!1;function co(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext();return wa({parent_span_id:r?t:fo(e).parent_span_id,span_id:r?Va():t,trace_id:n})}function lo(e){return typeof e==`number`?uo(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?uo(e.getTime()):Da()}function uo(e){return e>9999999999?e/1e3:e}function fo(e){if(function(e){return typeof e.getSpanJSON==`function`}(e))return e.getSpanJSON();try{let{spanId:t,traceId:n}=e.spanContext();if(function(e){let t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){let{attributes:r,startTime:i,name:a,endTime:o,parentSpanId:s,status:c}=e;return wa({span_id:t,trace_id:n,data:r,description:a,parent_span_id:s,start_timestamp:lo(i),timestamp:lo(o)||void 0,status:po(c),op:r[`sentry.op`],origin:r[`sentry.origin`],_metrics_summary:ro(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function po(e){if(e&&e.code!==0)return e.code===1?`ok`:e.message||`unknown_error`}function mo(e){return e._sentryRootSpan||e}function ho(){so||=(Mi(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),!0)}var go=`production`;function _o(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=wa({environment:n.environment||go,release:n.release,public_key:r,trace_id:e});return t.emit(`createDsc`,i),i}function vo(e){let t=to();if(!t)return{};let n=mo(e),r=n._frozenDsc;if(r)return r;let i=n.spanContext().traceState,a=i&&i.get(`sentry.dsc`),o=a&&ao(a);if(o)return o;let s=_o(e.spanContext().traceId,t),c=fo(n),l=c.data||{},u=l[`sentry.sample_rate`];u!=null&&(s.sample_rate=`${u}`);let d=l[`sentry.source`],f=c.description;return d!==`url`&&f&&(s.transaction=f),function(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=to(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||`tracesSampleRate`in n||`tracesSampler`in n)}()&&(s.sampled=String(function(e){let{traceFlags:t}=e.spanContext();return t===1}(n))),t.emit(`createDsc`,s,n),s}var yo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function bo(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function xo(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function So(e){let t=typeof e==`string`?function(e){let t=yo.exec(e);if(!t)return void Mi(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return xo({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}(e):xo(e);if(t&&function(e){if(!ki)return!0;let{port:t,projectId:n,protocol:r}=e;return!([`protocol`,`publicKey`,`host`,`projectId`].find(t=>!e[t]&&(U.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return e===`http`||e===`https`}(r)?t&&isNaN(parseInt(t,10))&&(U.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(U.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(U.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function Co(e,t=100,n=1/0){try{return To(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function wo(e,t=3,n=102400){let r=Co(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?wo(e,t-1,n):r;var i}function To(e,t,n=1/0,r=1/0,i=function(){let e=typeof WeakSet==`function`,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=function(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(la(t))return`[VueViewModel]`;if(aa(n=t)&&`nativeEvent`in n&&`preventDefault`in n&&`stopPropagation`in n)return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${Ri(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let r=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:`null prototype`}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!s.startsWith(`[object `))return s;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__==`number`?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let l=t;if(l&&typeof l.toJSON==`function`)try{return To(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=xa(t);for(let e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(d>=r){u[e]=`[MaxProperties ~]`;break}let t=f[e];u[e]=To(e,t,c-1,r,i),d++}return o(t),u}function Eo(e,t=[]){return[e,t]}function Do(e,t){let[n,r]=e;return[n,[...r,t]]}function Oo(e,t){let n=e[1];for(let e of n)if(t(e,e[0].type))return!0;return!1}function ko(e){return Di.__SENTRY__&&Di.__SENTRY__.encodePolyfill?Di.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Ao(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[ko(r),e]:r.push(typeof e==`string`?ko(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Co(n))}i(e)}}return typeof r==`string`?r:function(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}(r)}function jo(e){let t=typeof e.data==`string`?ko(e.data):e.data;return[wa({type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var Mo={session:`session`,sessions:`session`,attachment:`attachment`,transaction:`transaction`,event:`error`,client_report:`internal`,user_report:`default`,profile:`profile`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,feedback:`feedback`,span:`span`,statsd:`metric_bucket`,raw_security:`security`};function No(e){return Mo[e]}function Po(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Fo(e,t,n,r){let i=Po(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;(function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])})(e,n&&n.sdk);let o=function(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:bo(r)},...i&&{trace:wa({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Eo(o,[[{type:a},e]])}function Io(e,t,n,r=0){return new La((i,a)=>{let o=e[r];if(t===null||typeof o!=`function`)i(t);else{let s=o({...t},n);Ti&&o.id&&s===null&&U.log(`Event processor "${o.id}" dropped event`),sa(s)?s.then(t=>Io(e,t,n,r+1).then(i)).then(null,a):Io(e,s,n,r+1).then(i).then(null,a)}})}var Lo,Ro,zo;function Bo(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;(function(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t,c=wa(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=wa(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=wa(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=wa(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)})(e,t),r&&function(e,t){e.contexts={trace:co(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:vo(t),...e.sdkProcessingMetadata};let n=fo(mo(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}(e,r),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,i),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,a)}function Vo(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:f,transactionName:p,span:m}=t;Ho(e,`extra`,n),Ho(e,`tags`,r),Ho(e,`user`,i),Ho(e,`contexts`,a),e.sdkProcessingMetadata=Ha(e.sdkProcessingMetadata,s,2),o&&(e.level=o),p&&(e.transactionName=p),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function Ho(e,t,n){e[t]=Ha(e[t],n,1)}function Uo(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Oa(),timestamp:t.timestamp||Ea()},l=n.integrations||e.integrations.map(e=>e.name);(function(e,t){let{environment:n,release:r,dist:i,maxValueLength:a=250}=t;e.environment=e.environment||n||go,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&=pa(e.message,a);let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=pa(o.value,a));let s=e.request;s&&s.url&&(s.url=pa(s.url,a))})(c,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&function(e,t){let n=function(e){let t=Di._sentryDebugIds;if(!t)return{};let n=Object.keys(t);return zo&&n.length===Ro||(Ro=n.length,zo=n.reduce((n,r)=>{Lo||={};let i=Lo[r];if(i)n[i[0]]=i[1];else{let i=e(r);for(let e=i.length-1;e>=0;e--){let a=i[e],o=a&&a.filename,s=t[r];if(o&&s){n[o]=s,Lo[r]=[o,s];break}}}return n},{})),zo}(t);try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{n&&e.filename&&(e.debug_id=n[e.filename])})})}catch{}}(c,e.stackParser);let u=function(e,t){if(!t)return e;let n=e?e.clone():new Ka;return n.update(t),n}(r,n.captureContext);n.mechanism&&Ma(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Oi(`globalScope`,()=>new Ka).getScopeData();a&&Vo(f,a.getScopeData()),u&&Vo(f,u.getScopeData());let p=[...n.attachments||[],...f.attachments];return p.length&&(n.attachments=p),Bo(c,f),Io([...d,...f.eventProcessors],c,n).then(e=>(e&&function(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}(e),typeof o==`number`&&o>0?function(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Co(e.data,t,n)}}))},...e.user&&{user:Co(e.user,t,n)},...e.contexts&&{contexts:Co(e.contexts,t,n)},...e.extra&&{extra:Co(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Co(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Co(e.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Co(e.contexts.flags,3,n)),r}(e,o,s):e))}function Wo(e){if(e)return function(e){return e instanceof Ka||typeof e==`function`}(e)||function(e){return Object.keys(e).some(e=>Go.includes(e))}(e)?{captureContext:e}:e}var Go=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`requestSession`,`propagationContext`];function Ko(e,t){return $a().captureEvent(e,t)}function qo(e){let t=to(),n=eo(),r=$a(),{release:i,environment:a=go}=t&&t.getOptions()||{},{userAgent:o}=Di.navigator||{},s=Ra({release:i,environment:a,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status===`ok`&&za(c,{status:`exited`}),Jo(),n.setSession(s),r.setSession(s),s}function Jo(){let e=eo(),t=$a(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),za(e,n)}(n),Yo(),e.setSession(),t.setSession()}function Yo(){let e=eo(),t=$a(),n=to(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Xo(e=!1){e?Jo():Yo()}function Zo(e,t,n){return t||`${function(e){return`${function(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,n)}`}var Qo=[];function $o(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function es(e,t,n){if(n[t.name])Ti&&U.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Qo.indexOf(t.name)===-1&&typeof t.setupOnce==`function`&&(t.setupOnce(),Qo.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}Ti&&U.log(`Integration installed: ${t.name}`)}}var ts=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.logLevel=t}},ns=`Not capturing exception because it's already been captured.`,rs=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=So(e.dsn):Ti&&U.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Zo(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}let t=[`enableTracing`,`tracesSampleRate`,`tracesSampler`].find(t=>t in e&&e[t]==null);t&&Mi(()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(e,t,n){let r=Oa();if(Na(e))return Ti&&U.log(ns),r;let i={event_id:r,...t};return this._process(this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n))),i.event_id}captureMessage(e,t,n,r){let i={event_id:Oa(),...n},a=ra(e)?e:String(e),o=ia(e)?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(o.then(e=>this._captureEvent(e,i,r))),i.event_id}captureEvent(e,t,n){let r=Oa();if(t&&t.originalException&&Na(t.originalException))return Ti&&U.log(ns),r;let i={event_id:r,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,a||n)),i.event_id}captureSession(e){typeof e.release==`string`?(this.sendSession(e),za(e,{init:!1})):Ti&&U.warn(`Discarded session because of missing or non-string release`)}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit(`flush`),this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):Fa(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit(`close`),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];es(this,e,this._integrations),t||$o(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Fo(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=Do(n,jo(e));let r=this.sendEnvelope(n);r&&r.then(t=>this.emit(`afterSendEvent`,e,t),null)}sendSession(e){let t=function(e,t,n,r){let i=Po(n);return Eo({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:bo(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){let r=typeof n==`number`?n:1,i=`${e}:${t}`;Ti&&U.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{let e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}sendEnvelope(e){return this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,e=>(Ti&&U.error(`Error while sending envelope:`,e),e)):(Ti&&U.error(`Transport disabled`),Fa({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&es(e,t,n)}),n}(this,e),$o(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception&&t.exception.values;if(i){r=!0;for(let e of i){let t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(za(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new La(t=>{let n=0,r=setInterval(()=>{this._numProcessing==0?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&this._transport!==void 0}_prepareEvent(e,t,n=$a(),r=eo()){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Uo(i,e,t,n,this,r).then(e=>e===null?e:(e.contexts={trace:no(n),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let n=t.getPropagationContext();return n.dsc||_o(n.traceId,e)}(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{Ti&&(e instanceof ts&&e.logLevel===`log`?U.log(e.message):U.warn(e))})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=as(e),o=is(e),s=e.type||`error`,c=`before send for type \`${s}\``,l=i===void 0?void 0:function(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t;Ti&&U.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}(i);if(o&&typeof l==`number`&&Math.random()>l)return this.recordDroppedEvent(`sample_rate`,`error`,e),Ia(new ts(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,`log`));let u=s===`replay_event`?`replay`:s,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then(n=>{if(n===null)throw this.recordDroppedEvent(`event_processor`,u,e),new ts("An event processor returned `null`, will not send event.",`log`);return t.data&&!0===t.data.__sentry__?n:function(e,t){let n=`${t} must return \`null\` or a valid event.`;if(sa(e))return e.then(e=>{if(!aa(e)&&e!==null)throw new ts(n);return e},e=>{throw new ts(`${t} rejected with ${e}`)});if(!aa(e)&&e!==null)throw new ts(n);return e}(function(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o}=t;if(is(n)&&i)return i(n,r);if(as(n)){if(n.spans&&o){let t=[];for(let r of n.spans){let n=o(r);n?t.push(n):(ho(),e.recordDroppedEvent(`before_send`,`span`))}n.spans=t}if(a){if(n.spans){let e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(n,r)}}return n}(this,r,n,t),c)}).then(r=>{if(r===null){if(this.recordDroppedEvent(`before_send`,u,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw new ts(`${c} returned \`null\`, will not send event.`,`log`)}let i=n&&n.getSession();if(!a&&i&&this._updateSessionFromEvent(i,r),a){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let o=r.transaction_info;return a&&o&&r.transaction!==e.transaction&&(r.transaction_info={...o,source:`custom`}),this.sendEvent(r,t),r}).then(null,e=>{throw e instanceof ts?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new ts(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){Ti&&U.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0)return void(Ti&&U.log(`No outcomes to send`));if(!this._dsn)return void(Ti&&U.log(`No dsn provided, will not send outcomes`));Ti&&U.log(`Sending outcomes:`,e);let t=(n=e,Eo((r=this._options.tunnel&&bo(this._dsn))?{dsn:r}:{},[[{type:`client_report`},{timestamp:i||Ea(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}};function is(e){return e.type===void 0}function as(e){return e.type===`transaction`}function os(e){let t=[];function n(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(e===void 0||t.length<e))return Ia(new ts(`Not adding Promise because buffer limit was reached.`));let i=r();return t.indexOf(i)===-1&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new La((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{Fa(e).then(()=>{--i||(clearTimeout(a),n(!0))},r)})})}}}function ss(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},a=n&&n[`x-sentry-rate-limits`],o=n&&n[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=1e3*(isNaN(o)?60:o);if(n)for(let e of n.split(`;`))e===`metric_bucket`&&a&&!a.split(`;`).includes(`custom`)||(i[e]=r+s);else i.all=r+s}else o?i.all=r+function(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(o,r):t===429&&(i.all=r+6e4);return i}function cs(e,t,n=os(e.bufferSize||64)){let r={};return{send:function(i){let a=[];if(Oo(i,(t,n)=>{let i=No(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){let r=ls(t,n);e.recordDroppedEvent(`ratelimit_backoff`,i,r)}else a.push(t)}),a.length===0)return Fa({});let o=Eo(i[0],a),s=t=>{Oo(o,(n,r)=>{let i=ls(n,r);e.recordDroppedEvent(t,No(r),i)})};return n.add(()=>t({body:Ao(o)}).then(e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&Ti&&U.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=ss(r,e),e),e=>{throw s(`network_error`),e})).then(e=>e,e=>{if(e instanceof ts)return Ti&&U.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Fa({});throw e})},flush:e=>n.drain(e)}}function ls(e,t){if(t===`event`||t===`transaction`)return Array.isArray(e)?e[1]:void 0}var us=100;function ds(e,t){let n=to(),r=eo();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=us}=n.getOptions();if(a<=0)return;let o={timestamp:Ea(),...e},s=i?Mi(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var fs,ps=new WeakMap,ms=()=>({name:`FunctionToString`,setupOnce(){fs=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=ba(this),n=ps.has(to())&&t!==void 0?t:this;return fs.apply(n,e)}}catch{}},setup(e){ps.set(e,!0)}}),hs=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,`undefined is not an object (evaluating 'a.L')`,`can't redefine non-configurable property "solana"`,`vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)`,`Can't find variable: _AutofillCallbackHandler`,/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],gs=(e={})=>({name:`InboundFilters`,processEvent(t,n,r){return function(e,t){return t.ignoreInternal&&function(e){try{return e.exception.values[0].type===`SentryError`}catch{}return!1}(e)?(Ti&&U.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${Aa(e)}`),!0):function(e,t){return e.type||!t||!t.length?!1:function(e){let t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}(e).some(e=>ga(e,t))}(e,t.ignoreErrors)?(Ti&&U.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Aa(e)}`),!0):function(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value)}(e)?(Ti&&U.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Aa(e)}`),!0):function(e,t){if(e.type!==`transaction`||!t||!t.length)return!1;let n=e.transaction;return!!n&&ga(n,t)}(e,t.ignoreTransactions)?(Ti&&U.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Aa(e)}`),!0):function(e,t){if(!t||!t.length)return!1;let n=_s(e);return!!n&&ga(n,t)}(e,t.denyUrls)?(Ti&&U.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Aa(e)}.\nUrl: ${_s(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;let n=_s(e);return!n||ga(n,t)}(e,t.allowUrls)&&(Ti&&U.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Aa(e)}.\nUrl: ${_s(e)}`),!0)}(t,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:hs],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal===void 0||e.ignoreInternal}}(e,r.getOptions()))?null:t}});function _s(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}(t):null}catch{return Ti&&U.error(`Cannot extract url for event ${Aa(e)}`),null}}function vs(e,t,n=250,r,i,a,o){if(!(a.exception&&a.exception.values&&o&&ca(o.originalException,Error)))return;let s=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;var c,l;s&&(a.exception.values=(c=ys(e,t,i,o.originalException,r,a.exception.values,s,0),l=n,c.map(e=>(e.value&&=pa(e.value,l),e))))}function ys(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(ca(r[i],Error)){bs(o,s);let a=e(t,r[i]),l=c.length;xs(a,i,l,s),c=ys(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,a)=>{if(ca(r,Error)){bs(o,s);let l=e(t,r),u=c.length;xs(l,`errors[${a}]`,u,s),c=ys(e,t,n,r,i,[l,...c],l,u)}}),c}function bs(e,t){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,...e.type===`AggregateError`&&{is_exception_group:!0},exception_id:t}}function xs(e,t,n,r){e.mechanism=e.mechanism||{type:`generic`,handled:!0},e.mechanism={...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Ss(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Cs(){`console`in Di&&Ai.forEach(function(e){e in Di.console&&_a(Di.console,e,function(t){return ji[e]=t,function(...t){Wi(`console`,{args:t,level:e});let n=ji[e];n&&n.apply(Di.console,t)}})})}function ws(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Ts=()=>{let e;return{name:`Dedupe`,processEvent(t){if(t.type)return t;try{if(function(e,t){return t?!!(function(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ds(e,t)||!Es(e,t))}(e,t)||function(e,t){let n=Os(t),r=Os(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ds(e,t)||!Es(e,t))}(e,t)):!1}(t,e))return Ti&&U.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}};function Es(e,t){let n=zi(e),r=zi(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Ds(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join(``)===r.join(``)}catch{return!1}}function Os(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ks(e){return e===void 0?void 0:e>=400&&e<500?`warning`:e>=500?`error`:void 0}var As=Di;function js(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ms(){if(typeof EdgeRuntime==`string`)return!0;if(!function(){if(!(`fetch`in As))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}())return!1;if(js(As.fetch))return!0;let e=!1,t=As.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=js(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ki&&U.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Ns(e,t){let n=`fetch`;Hi(n,e),Ui(n,()=>function(e,t=!1){(!t||Ms())&&_a(Di,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=function(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Fs(t),method:Ps(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:Fs(t),method:Ps(t,`method`)?String(t.method).toUpperCase():`GET`}}(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:1e3*Da(),virtualError:r};return e||Wi(`fetch`,{...o}),t.apply(Di,n).then(async t=>(e?e(t):Wi(`fetch`,{...o,endTimestamp:1e3*Da(),response:t}),t),e=>{throw Wi(`fetch`,{...o,endTimestamp:1e3*Da(),error:e}),Qi(e)&&e.stack===void 0&&(e.stack=r.stack,va(e,`framesToPop`,1)),e})}})}(void 0,t))}function Ps(e,t){return!!e&&typeof e==`object`&&!!e[t]}function Fs(e){return typeof e==`string`?e:e?Ps(e,`url`)?e.url:e.toString?e.toString():``:``}var Is=Di,Ls=Di,Rs=0;function zs(){return Rs>0}function Bs(e,t={}){if(!function(e){return typeof e==`function`}(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(ba(e))return e}catch{return e}let n=function(...n){try{let r=n.map(e=>Bs(e,t));return e.apply(this,r)}catch(e){throw Rs++,setTimeout(()=>{Rs--}),function(...e){let t=Qa(Yi());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}t.withScope(e[0])}(r=>{var i,a;r.addEventProcessor(e=>(t.mechanism&&(ja(e,void 0,void 0),Ma(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),i=e,$a().captureException(i,Wo(a))}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}ya(n,e),va(e,`__sentry_wrapped__`,n);try{Object.getOwnPropertyDescriptor(n,`name`).configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}var Vs=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function Hs(e,t){let n=Gs(e,t),r={type:Js(t),value:Ys(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Us(e,t,n,r){let i=to(),a=i&&i.getOptions().normalizeDepth,o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}(t),s={__serialized__:wo(t,a)};if(o)return{exception:{values:[Hs(e,o)]},extra:s};let c={exception:{values:[{type:oa(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Qs(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=Gs(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Ws(e,t){return{exception:{values:[Hs(e,t)]}}}function Gs(e,t){let n=t.stacktrace||t.stack||``,r=function(e){return e&&Ks.test(e.message)?1:0}(t),i=function(e){return typeof e.framesToPop==`number`?e.framesToPop:0}(t);try{return e(n,r,i)}catch{}return[]}var Ks=/Minified React error #\d+;/i;function qs(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Js(e){let t=e&&e.name;return!t&&qs(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function Ys(e){let t=e&&e.message;return t?t.error&&typeof t.error.message==`string`?t.error.message:qs(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:`No error message`}function Xs(e,t,n,r,i){let a;if(ea(t)&&t.error)return Ws(e,t.error);if(ta(t)||$i(t,`DOMException`)){let i=t;if(`stack`in t)a=Ws(e,t);else{let t=i.name||(ta(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Zs(e,o,n,r),ja(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return Qi(t)?Ws(e,t):aa(t)||oa(t)?(a=Us(e,t,n,i),Ma(a,{synthetic:!0}),a):(a=Zs(e,t,n,r),ja(a,`${t}`,void 0),Ma(a,{synthetic:!0}),a)}function Zs(e,t,n,r){let i={};if(r&&n){let r=Gs(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),Ma(i,{synthetic:!0})}if(ra(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Qs(e,{isUnhandledRejection:t}){let n=function(e,t=40){let n=Object.keys(xa(e));n.sort();let r=n[0];if(!r)return`[object has no keys]`;if(r.length>=t)return pa(r,t);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(`, `);if(!(r.length>t))return e===n.length?r:pa(r,t)}return``}(e),r=t?`promise rejection`:`exception`;return ea(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:oa(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}var $s=class extends rs{constructor(e){let t={parentSpanIsAlwaysRootSpan:!0,...e};(function(e,t,n=[t],r=`npm`){let i=e._metadata||{};i.sdk||={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:Ei})),version:Ei},e._metadata=i})(t,`browser`,[`browser`],Ls.SENTRY_SDK_SOURCE||`npm`),super(t),t.sendClientReports&&Ls.document&&Ls.document.addEventListener(`visibilitychange`,()=>{Ls.document.visibilityState===`hidden`&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){let i=Xs(e,t,n&&n.syntheticException||void 0,r);return Ma(i),i.level=`error`,n&&n.event_id&&(i.event_id=n.event_id),Fa(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return function(e,t,n=`info`,r,i){let a=Zs(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),Fa(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Vs&&U.warn(`SDK not enabled, will not capture user feedback.`));let t=function(e,{metadata:t,tunnel:n,dsn:r}){return Eo({event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:bo(r)}},[function(e){return[{type:`user_report`},e]}(e)])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n)}},ec=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,tc=Di,nc,rc,ic,ac;function oc(){if(!tc.document)return;let e=Wi.bind(null,`dom`),t=sc(e,!0);tc.document.addEventListener(`click`,t,!1),tc.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=tc[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty(`addEventListener`)&&(_a(r,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=sc(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),_a(r,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function sc(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=function(e){try{return e.target}catch{return null}}(n);if(function(e,t){return e===`keypress`&&(!t||!t.tagName||t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!t.isContentEditable)}(n.type,r))return;va(n,`_sentryCaptured`,!0),r&&!r._sentryId&&va(r,`_sentryId`,Oa());let i=n.type===`keypress`?`input`:n.type;(function(e){if(e.type!==rc)return!1;try{if(!e.target||e.target._sentryId!==ic)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),rc=n.type,ic=r?r._sentryId:void 0),clearTimeout(nc),nc=tc.setTimeout(()=>{ic=void 0,rc=void 0},1e3)}}function cc(e){let t=`history`;Hi(t,e),Ui(t,lc)}function lc(){if(!function(){let e=Is.chrome,t=e&&e.app&&e.app.runtime,n=`history`in Is&&!!Is.history.pushState&&!!Is.history.replaceState;return!t&&n}())return;let e=tc.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=ac,t=String(n);ac=t,Wi(`history`,{from:e,to:t})}return e.apply(this,t)}}tc.onpopstate=function(...t){let n=tc.location.href,r=ac;if(ac=n,Wi(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},_a(tc.history,`pushState`,t),_a(tc.history,`replaceState`,t)}var uc={};function dc(e){uc[e]=void 0}var fc=`__sentry_xhr_v3__`;function pc(){if(!tc.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=1e3*Da(),a=na(n[0])?n[0].toUpperCase():void 0,o=function(e){if(na(e))return e;try{return e.toString()}catch{}}(n[1]);if(!a||!o)return e.apply(t,n);t[fc]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[fc];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}Wi(`xhr`,{endTimestamp:1e3*Da(),startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,n)=>(s(),e.apply(t,n))}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[fc];return a&&na(r)&&na(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[fc];return r?(n[0]!==void 0&&(r.body=n[0]),Wi(`xhr`,{startTimestamp:1e3*Da(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function mc(e,t=function(e){let t=uc[e];if(t)return t;let n=tc[e];if(js(n))return uc[e]=n.bind(tc);let r=tc.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){ec&&U.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(uc[e]=n.bind(tc))}(`fetch`)){let n=0,r=0;return cs(e,function(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return dc(`fetch`),Ia(`No fetch implementation available`);try{return t(e.url,o).then(e=>(n-=a,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get(`X-Sentry-Rate-Limits`),"retry-after":e.headers.get(`Retry-After`)}}))}catch(e){return dc(`fetch`),n-=a,r--,Ia(e)}})}function hc(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?Ni:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var gc=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,_c=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vc=/\((\S*)(?::(\d+))(?::(\d+))\)/,yc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,bc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,xc=function(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
6
+ `);for(let e=n;e<a.length;e++){let n=a[e];if(n.length>1024)continue;let o=Pi.test(n)?n.replace(Pi,`$1`):n;if(!o.match(/\S*Error: /)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=50+r)break}}return function(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Ii(t).function||``)&&t.pop(),t.reverse(),Fi.test(Ii(t).function||``)&&(t.pop(),Fi.test(Ii(t).function||``)&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||Ii(t).filename,function:e.function||Ni}))}(i.slice(r))}}([30,e=>{let t=gc.exec(e);if(t){let[,e,n,r]=t;return hc(e,Ni,+n,+r)}let n=_c.exec(e);if(n){if(n[2]&&n[2].indexOf(`eval`)===0){let e=vc.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}let[e,t]=Sc(n[1]||Ni,n[2]);return hc(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{let t=yc.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=bc.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||Ni;return[n,e]=Sc(n,e),hc(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Sc=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?Ni:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Cc=1024,wc=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:`Breadcrumbs`,setup(e){var n;t.console&&function(e){let t=`console`;Hi(t,e),Ui(t,Cs)}(function(e){return function(t){if(to()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:ws(t.level),message:ma(t.args,` `)};if(t.level===`assert`){if(!1!==t.args[0])return;n.message=`Assertion failed: ${ma(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1)}ds(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(to()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>Cc&&(Vs&&U.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=Cc),typeof a==`string`&&(a=[a]);try{let e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=da(t,{keyAttrs:a,maxStringLength:o}),i=function(e){if(!ua.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),ds(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),Hi(`dom`,n),Ui(`dom`,oc)),t.xhr&&function(e){Hi(`xhr`,e),Ui(`xhr`,pc)}(function(e){return function(t){if(to()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[fc];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r};ds({category:`xhr`,data:l,type:`http`,level:ks(s)},u)}}(e)),t.fetch&&Ns(function(e){return function(t){if(to()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||t.fetchData.method!==`POST`)){if(t.error)ds({category:`fetch`,data:t.fetchData,level:`error`,type:`http`},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r});else{let e=t.response,i={...t.fetchData,status_code:e&&e.status},a={input:t.args,response:e,startTimestamp:n,endTimestamp:r};ds({category:`fetch`,data:i,type:`http`,level:ks(i.status_code)},a)}}}}(e)),t.history&&cc(function(e){return function(t){if(to()!==e)return;let n=t.from,r=t.to,i=Ss(Ls.location.href),a=n?Ss(n):void 0,o=Ss(r);a&&a.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),ds({category:`navigation`,data:{from:n,to:r}})}}(e)),t.sentry&&e.on(`beforeSendEvent`,function(e){return function(t){to()===e&&ds({category:`sentry.`+(t.type===`transaction`?`transaction`:`event`),event_id:t.event_id,level:t.level,message:Aa(t)},{event:t})}}(e))}}},Tc=`EventTarget.Window.Node.ApplicationCache.AudioTrackList.BroadcastChannel.ChannelMergerNode.CryptoOperation.EventSource.FileReader.HTMLUnknownElement.IDBDatabase.IDBRequest.IDBTransaction.KeyOperation.MediaController.MessagePort.ModalWindow.Notification.SVGElementInstance.Screen.SharedWorker.TextTrack.TextTrackCue.TextTrackList.WebSocket.WebSocketWorker.Worker.XMLHttpRequest.XMLHttpRequestEventTarget.XMLHttpRequestUpload`.split(`.`),Ec=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:`BrowserApiErrors`,setupOnce(){t.setTimeout&&_a(Ls,`setTimeout`,Dc),t.setInterval&&_a(Ls,`setInterval`,Dc),t.requestAnimationFrame&&_a(Ls,`requestAnimationFrame`,Oc),t.XMLHttpRequest&&`XMLHttpRequest`in Ls&&_a(XMLHttpRequest.prototype,`send`,kc);let e=t.eventTarget;e&&(Array.isArray(e)?e:Tc).forEach(Ac)}}};function Dc(e){return function(...t){let n=t[0];return t[0]=Bs(n,{mechanism:{data:{function:Ri(e)},handled:!1,type:`instrument`}}),e.apply(this,t)}}function Oc(e){return function(t){return e.apply(this,[Bs(t,{mechanism:{data:{function:`requestAnimationFrame`,handler:Ri(e)},handled:!1,type:`instrument`}})])}}function kc(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&_a(n,e,function(t){let n={mechanism:{data:{function:e,handler:Ri(t)},handled:!1,type:`instrument`}},r=ba(t);return r&&(n.mechanism.data.handler=Ri(r)),Bs(t,n)})}),e.apply(this,t)}}function Ac(e){let t=Ls[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty(`addEventListener`)&&(_a(n,`addEventListener`,function(t){return function(n,r,i){try{typeof r.handleEvent==`function`&&(r.handleEvent=Bs(r.handleEvent,{mechanism:{data:{function:`handleEvent`,handler:Ri(r),target:e},handled:!1,type:`instrument`}}))}catch{}return t.apply(this,[n,Bs(r,{mechanism:{data:{function:`addEventListener`,handler:Ri(r),target:e},handled:!1,type:`instrument`}}),i])}}),_a(n,`removeEventListener`,function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))}var jc=()=>({name:`BrowserSession`,setupOnce(){Ls.document===void 0?Vs&&U.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(qo({ignoreDuration:!0}),Xo(),cc(({from:e,to:t})=>{e!==void 0&&e!==t&&(qo({ignoreDuration:!0}),Xo())}))}}),Mc=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:`GlobalHandlers`,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(function(e){(function(e){let t=`error`;Hi(t,e),Ui(t,Ki)})(t=>{let{stackParser:n,attachStacktrace:r}=Pc();if(to()!==e||zs())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=function(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[],l=r,u=n,d=na(t)&&t.length>0?t:function(){try{return ua.document.location.href}catch{return``}}();return c.length===0&&c.push({colno:l,filename:d,function:Ni,in_app:!0,lineno:u}),e}(Xs(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Ko(l,{originalException:c,mechanism:{handled:!1,type:`onerror`}})})}(e),Nc(`onerror`)),t.onunhandledrejection&&(function(e){(function(e){let t=`unhandledrejection`;Hi(t,e),Ui(t,Ji)})(t=>{let{stackParser:n,attachStacktrace:r}=Pc();if(to()!==e||zs())return;let i=function(e){if(ia(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}(t),a=ia(i)?{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Xs(n,i,void 0,r,!0);a.level=`error`,Ko(a,{originalException:i,mechanism:{handled:!1,type:`onunhandledrejection`}})})}(e),Nc(`onunhandledrejection`))}}};function Nc(e){Vs&&U.log(`Global Handler attached: ${e}`)}function Pc(){let e=to();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var Fc=()=>({name:`HttpContext`,preprocessEvent(e){if(!Ls.navigator&&!Ls.location&&!Ls.document)return;let t=e.request&&e.request.url||Ls.location&&Ls.location.href,{referrer:n}=Ls.document||{},{userAgent:r}=Ls.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};e.request={...e.request,...t&&{url:t},headers:i}}}),Ic=(e={})=>{let t=e.limit||5,n=e.key||`cause`;return{name:`LinkedErrors`,preprocessEvent(e,r,i){let a=i.getOptions();vs(Hs,a.stackParser,a.maxValueLength,n,t,e,r)}}},Lc=`loading`,Rc=`loaded`,zc=`joining-meeting`,Bc=`joined-meeting`,Vc=`left-meeting`,Hc=`error`,Uc=`unknown`,Wc=`full`,Gc=`base`,Kc=`iframe-ready-for-launch-config`,qc=`iframe-launch-config`,Jc=`theme-updated`,Yc=`load-attempt-failed`,Xc=`loaded`,Zc=`started-camera`,Qc=`camera-error`,$c=`joining-meeting`,el=`joined-meeting`,tl=`left-meeting`,nl=`participant-joined`,rl=`participant-updated`,il=`participant-left`,al=`participant-counts-updated`,ol=`access-state-updated`,sl=`meeting-session-summary-updated`,cl=`meeting-session-state-updated`,ll=`waiting-participant-added`,ul=`waiting-participant-updated`,dl=`waiting-participant-removed`,fl=`transcription-started`,pl=`transcription-stopped`,ml=`transcription-error`,hl=`recording-started`,gl=`recording-stopped`,_l=`recording-stats`,vl=`recording-error`,yl=`recording-upload-completed`,bl=`recording-data`,xl=`app-message`,Sl=`transcription-message`,Cl=`remote-media-player-started`,wl=`remote-media-player-updated`,Tl=`remote-media-player-stopped`,El=`local-screen-share-started`,Dl=`local-screen-share-stopped`,Ol=`local-screen-share-canceled`,kl=`active-speaker-change`,Al=`active-speaker-mode-change`,jl=`network-quality-change`,Ml=`network-connection`,Nl=`cpu-load-change`,Pl=`face-counts-updated`,Fl=`live-streaming-started`,Il=`live-streaming-updated`,Ll=`live-streaming-stopped`,Rl=`live-streaming-error`,zl=`lang-updated`,Bl=`receive-settings-updated`,Vl=`input-settings-updated`,Hl=`nonfatal-error`,Ul=`error`,Wl=4096,Gl=102400,Kl=`iframe-call-message`,ql=`local-screen-start`,Jl=`daily-method-update-live-streaming-endpoints`,Yl=`transmit-log`,Xl=`daily-custom-track`,Zl={NONE:`none`,BGBLUR:`background-blur`,BGIMAGE:`background-image`,FACE_DETECTION:`face-detection`},Ql={NONE:`none`,NOISE_CANCELLATION:`noise-cancellation`},$l={PLAY:`play`,PAUSE:`pause`},eu=`daily`,tu=`signalwire`,nu=[`jpg`,`png`,`jpeg`],ru=`add-endpoints`,iu=`remove-endpoints`,au=`sip-call-transfer`;function ou(){return!su()&&typeof window<`u`&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:``}function su(){return typeof navigator<`u`&&navigator.product&&navigator.product===`ReactNative`}function cu(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function lu(){return!!(navigator&&navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)&&(function(e,t){if(!e||!t)return!0;switch(e){case`Chrome`:return t.major>=75;case`Safari`:return RTCRtpTransceiver.prototype.hasOwnProperty(`currentDirection`)&&(t.major!==13||t.minor!==0||t.point!==0);case`Firefox`:return t.major>=67}return!0}(bu(),xu())||su())}function uu(){if(su()||!document)return!1;var e=document.createElement(`iframe`);return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var du=`none`,fu=`software`,pu=`hardware`,mu=function(){try{var e,t=document.createElement(`canvas`),n=!1;(e=t.getContext(`webgl2`,{failIfMajorPerformanceCaveat:!0}))||(n=!0,e=t.getContext(`webgl2`));var r=e!=null;return t.remove(),r?n?fu:pu:du}catch{return du}}();function hu(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!su()&&mu!==du&&(e?function(){return!yu()&&[`Chrome`,`Firefox`].includes(bu())}():function(){if(yu())return!1;var e=bu();if(e===`Safari`){var t=Tu();if(t.major<15||t.major===15&&t.minor<4)return!1}return e===`Chrome`?Su().major>=77:e===`Firefox`?Eu().major>=97:[`Chrome`,`Firefox`,`Safari`].includes(e)}())}function gu(){if(su()||vu()||typeof AudioWorkletNode>`u`)return!1;switch(bu()){case`Chrome`:case`Firefox`:return!0;case`Safari`:var e=xu();return e.major>17||e.major===17&&e.minor>=4}return!1}function _u(){return cu()&&typeof MediaStreamTrack<`u`&&!function(){var e,t=bu();if(!ou())return!0;switch(t){case`Chrome`:return(e=Su()).major&&e.major>0&&e.major<75;case`Firefox`:return(e=Eu()).major<91;case`Safari`:return(e=Tu()).major<13||e.major===13&&e.minor<1;default:return!0}}()}function vu(){return ou().match(/Linux; Android/)}function yu(){var e,t=ou(),n=t.match(/Mac/)&&(!su()&&typeof window<`u`&&(e=window)!=null&&(e=e.navigator)!=null&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||!!ou().match(/DailyAnd\//)||void 0}function bu(){if(typeof window<`u`){var e=ou();return Cu()?`Safari`:e.indexOf(`Edge`)>-1?`Edge`:e.match(/Chrome\//)?`Chrome`:e.indexOf(`Safari`)>-1||wu()?`Safari`:e.indexOf(`Firefox`)>-1?`Firefox`:e.indexOf(`MSIE`)>-1||e.indexOf(`.NET`)>-1?`IE`:`Unknown Browser`}}function xu(){switch(bu()){case`Chrome`:return Su();case`Safari`:return Tu();case`Firefox`:return Eu();case`Edge`:return function(){var e=0,t=0;if(typeof window<`u`){var n=ou().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}()}}function Su(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<`u`){var a=ou(),o=a.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(o)try{e=parseInt(o[1]),t=parseInt(o[2]),n=parseInt(o[3]),r=parseInt(o[4]),i=a.indexOf(`OPR/`)>-1}catch{}}return{major:e,minor:t,build:n,patch:r,opera:i}}function Cu(){return!!ou().match(/\((iPad|iPhone|iPod)/i)&&cu()}function wu(){return ou().indexOf(`AppleWebKit/605.1.15`)>-1}function Tu(){var e=0,t=0,n=0;if(typeof window<`u`){var r=ou().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else(Cu()||wu())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Eu(){var e=0,t=0;if(typeof window<`u`){var n=ou().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var Du=function(){return Ir(function e(){Nr(this,e)},[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){fi()}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){fi()}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){fi()}},{key:`sendMessageToDailyJs`,value:function(e,t){fi()}},{key:`removeListener`,value:function(e){fi()}}])}();function Ou(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ku(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ou(Object(n),!0).forEach(function(t){Vr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ou(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Au(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Au=function(){return!!e})()}var ju=function(){function e(){var t,n,r,i;return Nr(this,e),n=this,r=Rr(r=e),(t=Lr(n,Au()?Reflect.construct(r,i||[],Rr(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return Br(e,Du),Ir(e,[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){var r=this,i=function(i){if(i.data&&i.data.what===`iframe-call-message`&&(!i.data.callClientId||i.data.callClientId===t)&&(!i.data.from||i.data.from!==`module`)){var a=ku({},i.data);if(delete a.from,a.callbackStamp&&r._messageCallbacks[a.callbackStamp]){var o=a.callbackStamp;r._messageCallbacks[o].call(n,a),delete r._messageCallbacks[o]}delete a.what,delete a.callbackStamp,e.call(n,a)}};this._wrappedListeners[e]=i,window.addEventListener(`message`,i)}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){var r=function(r){var i;if(!(!r.data||r.data.what!==Kl||!r.data.action||r.data.from&&r.data.from!==`module`||r.data.callClientId&&t&&r.data.callClientId!==t||r!=null&&(i=r.data)!=null&&i.callFrameId)){var a=r.data;e.call(n,a)}};this._wrappedListeners[e]=r,window.addEventListener(`message`,r)}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){if(!n)throw Error(`undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?`);var i=ku({},e);if(i.what=Kl,i.from=`module`,i.callClientId=n,t){var a=di();this._messageCallbacks[a]=t,i.callbackStamp=a}var o=r?r.contentWindow:window,s=this._callMachineTargetOrigin(r);s&&o.postMessage(i,s)}},{key:`sendMessageToDailyJs`,value:function(e,t){e.what=Kl,e.callClientId=t,e.from=`embedded`,window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:`removeListener`,value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener(`message`,t),delete this._wrappedListeners[e])}},{key:`forwardPackagedMessageToCallMachine`,value:function(e,t,n){var r=ku({},e);r.callClientId=n;var i=t?t.contentWindow:window,a=this._callMachineTargetOrigin(t);a&&i.postMessage(r,a)}},{key:`addListenerForPackagedMessagesFromCallMachine`,value:function(e,t){var n=function(n){if(n.data&&n.data.what===`iframe-call-message`&&(!n.data.callClientId||n.data.callClientId===t)&&(!n.data.from||n.data.from!==`module`)){var r=n.data;e(r)}};return this._wrappedListeners[e]=n,window.addEventListener(`message`,n),e}},{key:`removeListenerForPackagedMessagesFromCallMachine`,value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener(`message`,t),delete this._wrappedListeners[e])}},{key:`_callMachineTargetOrigin`,value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:`_targetOriginFromWindowLocation`,value:function(){return window.location.protocol===`file:`?`*`:window.location.origin}}])}();function Mu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Nu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nu=function(){return!!e})()}var Pu=function(){function e(){var t,n,r,i;return Nr(this,e),n=this,r=Rr(r=e),t=Lr(n,Nu()?Reflect.construct(r,i||[],Rr(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new Yr.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new Yr.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return Br(e,Du),Ir(e,[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){this._addListener(e,global.callMachineToDailyJsEmitter,t,n,`received call machine message`)}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){this._addListener(e,global.dailyJsToCallMachineEmitter,t,n,`received daily-js message`)}},{key:`sendMessageToCallMachine`,value:function(e,t,n){this._sendMessage(e,global.dailyJsToCallMachineEmitter,n,t,`sending message to call machine`)}},{key:`sendMessageToDailyJs`,value:function(e,t){this._sendMessage(e,global.callMachineToDailyJsEmitter,t,null,`sending message to daily-js`)}},{key:`removeListener`,value:function(e){var t=this._wrappedListeners[e];t&&(global.callMachineToDailyJsEmitter.removeListener(`message`,t),global.dailyJsToCallMachineEmitter.removeListener(`message`,t),delete this._wrappedListeners[e])}},{key:`_addListener`,value:function(e,t,n,r,i){var a=this,o=function(t){if(t.callClientId===n){if(t.callbackStamp&&a._messageCallbacks[t.callbackStamp]){var i=t.callbackStamp;a._messageCallbacks[i].call(r,t),delete a._messageCallbacks[i]}e.call(r,t)}};this._wrappedListeners[e]=o,t.addListener(`message`,o)}},{key:`_sendMessage`,value:function(e,t,n,r,i){var a=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Mu(Object(n),!0).forEach(function(t){Vr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);if(a.callClientId=n,r){var o=di();this._messageCallbacks[o]=r,a.callbackStamp=o}t.emit(`message`,a)}}])}(),Fu=`replace`,Iu=`shallow-merge`,Lu=[Fu,Iu],Ru=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?Fu:r;Nr(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return Ir(e,[{key:`isNoOp`,value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:`isNoOpUpdate`,value:function(e,t){return Object.keys(e).length===0&&t===Iu}},{key:`_validateMergeStrategy`,value:function(e){if(!Lu.includes(e))throw Error(`Unrecognized mergeStrategy provided. Options are: [${Lu}]`)}},{key:`_validateData`,value:function(e,t){if(!function(e){if(e==null||R(e)!==`object`)return!1;var t=Object.getPrototypeOf(e);return t==null||t===Object.prototype}(e))throw Error(`Meeting session data must be a plain (map-like) object`);var n;try{if(n=JSON.stringify(e),t===Fu){var r=JSON.parse(n);$r(r,e)||console.warn(`The meeting session data provided will be modified when serialized.`,r,e)}else if(t===Iu){for(var i in e)if(Object.hasOwnProperty.call(e,i)&&e[i]!==void 0){var a=JSON.parse(JSON.stringify(e[i]));$r(e[i],a)||console.warn(`At least one key in the meeting session data provided will be modified when serialized.`,a,e[i])}}}catch(e){throw Error(`Meeting session data must be serializable to JSON: ${e}`)}if(n.length>Gl)throw Error(`Meeting session data is too large (${n.length} characters). Maximum size suppported is ${Gl}.`)}}])}();function zu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zu=function(){return!!e})()}function Bu(e){var t=typeof Map==`function`?new Map:void 0;return Bu=function(e){if(e===null||!function(e){try{return Function.toString.call(e).indexOf(`[native code]`)!==-1}catch{return typeof e==`function`}}(e))return e;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(zu())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&zr(i,n.prototype),i}(e,arguments,Rr(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),zr(n,e)},Bu(e)}function Vu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vu=function(){return!!e})()}function Hu(e){var t=window._daily?.pendings;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}}var Uu=function(){return Ir(function e(t){Nr(this,e),this._currentLoad=null,this._callClientId=t,this._publicPath=null},[{key:`load`,value:function(){var e,t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),window._daily.instances[this._callClientId].publicPath=this._publicPath,void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Wu(n,function(e){var n=e.substring(0,e.lastIndexOf(`/`));n.length&&n.slice(-1)!==`/`&&(n+=`/`),t._publicPath=n,window._daily.instances[t._callClientId].publicPath=n,gi(_i(e)),r(!1)},function(e,n){n||Hu(t._callClientId),i(e,n)}),this._currentLoad.start()}},{key:`cancel`,value:function(){this._currentLoad&&this._currentLoad.cancel(),Hu(this._callClientId)}},{key:`loaded`,get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),Wu=function(){return Ir(function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;Nr(this,e),this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._urls=function(e){if(xi(e))return[bi(e)];var t=mi??Si()??pi[0];return(t===pi[0]?pi:[t].concat(ui(pi.filter(function(e){return e!==t})))).map(function(t){return bi(e,t)})}(t),this._networkTimeoutMs=Ku,this._passesRemaining=3,this._urlIndex=0,this._currentAttempt=null},[{key:`start`,value:function(){this._currentAttempt||this._startAttempt()}},{key:`_startAttempt`,value:function(){this._currentAttempt=new qu(this._dailyConfig,this._urls[this._urlIndex],this._networkTimeoutMs,this._successCallback,this._retryOrFailureCallback.bind(this)),this._currentAttempt.start()}},{key:`_retryOrFailureCallback`,value:function(e){var t=this;if(!this._currentAttempt.cancelled){this._urlIndex++;var n=this._urlIndex<this._urls.length,r=this._passesRemaining>1,i=n||r;this._failureCallback(e,i),i&&(n?this._startAttempt():(this._passesRemaining--,this._urlIndex=0,setTimeout(function(){t._currentAttempt.cancelled||t._startAttempt()},3e3)))}}},{key:`cancel`,value:function(){this._currentAttempt&&this._currentAttempt.cancel()}},{key:`cancelled`,get:function(){return this._currentAttempt&&this._currentAttempt.cancelled}},{key:`succeeded`,get:function(){return this._currentAttempt&&this._currentAttempt.succeeded}}])}(),Gu=function(){function e(){return Nr(this,e),t=this,r=arguments,n=Rr(n=e),Lr(t,Vu()?Reflect.construct(n,r||[],Rr(t).constructor):n.apply(t,r));var t,n,r}return Br(e,Bu(Error)),Ir(e)}(),Ku=2e4,qu=function(){return Ir(function e(t,n,r,i,a){Nr(this,e),this._loadAttemptImpl=su()||!t.avoidEval?new Ju(t,n,r,i,a):new Yu(t,n,r,i,a)},[{key:`start`,value:(e=z(function*(){return this._loadAttemptImpl.start()}),function(){return e.apply(this,arguments)})},{key:`cancel`,value:function(){this._loadAttemptImpl.cancel()}},{key:`cancelled`,get:function(){return this._loadAttemptImpl.cancelled}},{key:`succeeded`,get:function(){return this._loadAttemptImpl.succeeded}}]);var e}(),Ju=function(){return Ir(function e(t,n,r,i,a){Nr(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._networkTimeoutMs=r,this._iosCache=typeof iOSCallObjectBundleCache<`u`&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._url=n,this._successCallback=i,this._failureCallback=a},[{key:`start`,value:(r=z(function*(){var e=this._url;!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)}),function(){return r.apply(this,arguments)})},{key:`cancel`,value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:`_tryLoadFromIOSCache`,value:(n=z(function*(e){if(!this._iosCache)return!1;try{var t=yield this._iosCache.get(e);return!!this.cancelled||!!t&&(t.code?(Function(`"use strict";`+t.code)(),this.succeeded=!0,this._successCallback(e),!0):(this._refetchHeaders=t.refetchHeaders,!1))}catch{return!1}}),function(e){return n.apply(this,arguments)})},{key:`_loadFromNetwork`,value:(t=z(function*(e){var t=this;this._networkTimeout=setTimeout(function(){t._networkTimedOut=!0,t._failureCallback({msg:`Timed out (>${t._networkTimeoutMs} ms) when loading call object bundle ${e}`,type:`timeout`})},this._networkTimeoutMs);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Gu;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new Gu;Function(`"use strict";`+i)(),this._iosCache&&this._iosCache.set(e,i,r.headers),this.succeeded=!0,this._successCallback(e)}catch(t){if(clearTimeout(this._networkTimeout),t instanceof Gu||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:`Failed to load call object bundle ${e}: ${t}`,type:t.message})}}),function(e){return t.apply(this,arguments)})},{key:`_getBundleCodeFromResponse`,value:(e=z(function*(e,t){if(t.ok)return yield t.text();if(this._iosCache&&t.status===304)return(yield this._iosCache.renew(e,t.headers)).code;throw Error(`Received ${t.status} response`)}),function(t,n){return e.apply(this,arguments)})}]);var e,t,n,r}(),Yu=function(){return Ir(function e(t,n,r,i,a){Nr(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._url=n,this._networkTimeoutMs=r,this._successCallback=i,this._failureCallback=a,this._attemptId=di(),this._networkTimeout=null,this._scriptElement=null},[{key:`start`,value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=this._url;(typeof document>`u`?`undefined`:R(document))===`object`?this._startLoading(e):this._failureCallback({msg:`Call object bundle must be loaded in a DOM/web context`,type:`missing context`})}},{key:`cancel`,value:function(){this._stopLoading(),this.cancelled=!0}},{key:`_startLoading`,value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout(function(){t._stopLoading(),t._failureCallback({msg:`Timed out (>${t._networkTimeoutMs} ms) when loading call object bundle ${e}`,type:`timeout`})},this._networkTimeoutMs);var n=document.getElementsByTagName(`head`)[0],r=document.createElement(`script`);this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback(e)},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:`Failed to load call object bundle ${e.target.src}`,type:e.message})},r.src=e,n.appendChild(r)}},{key:`_stopLoading`,value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:`_signUpForCallMachineLoadWaitlist`,value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:`_withdrawFromCallMachineLoadWaitlist`,value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}])}(),Xu=function(e,t,n){return!0===$u(e.local,t,n)},Zu=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream[`get${n===`video`?`Video`:`Audio`}Tracks`]()[0]},Qu=function(e,t,n,r){var i=ed(e,t,n,r);return i&&i.pendingTrack},$u=function(e,t,n){if(!e)return!1;var r=function(e){switch(e){case`avatar`:return!0;case`staged`:return e;default:return!!e}},i=e.public.subscribedTracks;return i&&i[t]?[`cam-audio`,`cam-video`,`screen-video`,`screen-audio`,`rmpAudio`,`rmpVideo`].indexOf(n)===-1&&i[t].custom?[!0,`staged`].includes(i[t].custom)?r(i[t].custom):r(i[t].custom[n]):r(i[t][n]):!i||r(i.ALL)},ed=function(e,t,n,r){var i=Object.values(e.streams||{}).filter(function(e){return e.participantId===t&&e.type===n&&e.pendingTrack&&e.pendingTrack.kind===r}).sort(function(e,t){return new Date(t.starttime)-new Date(e.starttime)});return i&&i[0]},td=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function nd(e,t){for(var n=t.getState(),r=0,i=[`cam`,`screen`];r<i.length;r++)for(var a=i[r],o=0,s=[`video`,`audio`];o<s.length;o++){var c=s[o],l=a===`cam`?c:`screen${c.charAt(0).toUpperCase()+c.slice(1)}`,u=e.tracks[l];if(u){var d=e.local?Zu(n,a,c):Qu(n,e.session_id,a,c);u.state===`playable`&&(u.track=d),u.persistentTrack=d}}}function rd(e,t){try{var n=t.getState();for(var r in e.tracks)if(!id(r)){var i=e.tracks[r].kind;if(i){var a=e.tracks[r];if(a){var o=e.local?td(n,r):Qu(n,e.session_id,r,i);a.state===`playable`&&(e.tracks[r].track=o),a.persistentTrack=o}}else console.error(`unknown type for custom track`)}}catch(e){console.error(e)}}function id(e){return[`video`,`audio`,`screenVideo`,`screenAudio`].includes(e)}function ad(e,t,n){var r=n.getState();if(e.local){if(e.audio)try{e.audioTrack=r.local.streams.cam.stream.getAudioTracks()[0],e.audioTrack||(e.audio=!1)}catch{}if(e.video)try{e.videoTrack=r.local.streams.cam.stream.getVideoTracks()[0],e.videoTrack||(e.video=!1)}catch{}if(e.screen)try{e.screenVideoTrack=r.local.streams.screen.stream.getVideoTracks()[0],e.screenAudioTrack=r.local.streams.screen.stream.getAudioTracks()[0],e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch{}}else{var i=!0;try{var a=r.participants[e.session_id];a&&a.public&&a.public.rtcType&&a.public.rtcType.impl===`peer-to-peer`&&a.private&&![`connected`,`completed`].includes(a.private.peeringState)&&(i=!1)}catch(e){console.error(e)}if(!i)return e.audio=!1,e.audioTrack=!1,e.video=!1,e.videoTrack=!1,e.screen=!1,void(e.screenTrack=!1);try{if(r.streams,e.audio&&Xu(r,e.session_id,`cam-audio`)){var o=Qu(r,e.session_id,`cam`,`audio`);o&&(t&&t.audioTrack&&t.audioTrack.id===o.id?e.audioTrack=o:o.muted||(e.audioTrack=o)),e.audioTrack||(e.audio=!1)}if(e.video&&Xu(r,e.session_id,`cam-video`)){var s=Qu(r,e.session_id,`cam`,`video`);s&&(t&&t.videoTrack&&t.videoTrack.id===s.id?e.videoTrack=s:s.muted||(e.videoTrack=s)),e.videoTrack||(e.video=!1)}if(e.screen&&Xu(r,e.session_id,`screen-audio`)){var c=Qu(r,e.session_id,`screen`,`audio`);c&&(t&&t.screenAudioTrack&&t.screenAudioTrack.id===c.id?e.screenAudioTrack=c:c.muted||(e.screenAudioTrack=c))}if(e.screen&&Xu(r,e.session_id,`screen-video`)){var l=Qu(r,e.session_id,`screen`,`video`);l&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===l.id?e.screenVideoTrack=l:l.muted||(e.screenVideoTrack=l))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){console.error(`unexpected error matching up tracks`,e)}}}function od(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return sd(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sd(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function sd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var cd=new Map,ld=null;function ud(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return dd(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dd(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
8
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function dd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var fd=new Map,pd=null;function md(e){gd()?function(e){cd.has(e)||(cd.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){cd.has(e)&&(cd.get(e).lastDevicesString=JSON.stringify(t),ld||(ld=function(){var e=z(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=od(cd.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==cd.get(r).lastDevicesString&&(cd.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}});return function(){return e.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener(`devicechange`,ld)))}).catch(function(){}))}(e):function(e){fd.has(e)||(fd.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){fd.has(e)&&(fd.get(e).lastDevicesString=JSON.stringify(t),pd||=setInterval(z(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=ud(fd.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==fd.get(r).lastDevicesString&&(fd.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}),3e3))}))}(e)}function hd(e){gd()?function(e){cd.has(e)&&(cd.delete(e),cd.size===0&&ld&&(navigator.mediaDevices.removeEventListener(`devicechange`,ld),ld=null))}(e):function(e){fd.has(e)&&(fd.delete(e),fd.size===0&&pd&&(clearInterval(pd),pd=null))}(e)}function gd(){return su()||navigator.mediaDevices?.ondevicechange!==void 0}var _d=new Set;function vd(e,t){var n=t.isLocalScreenVideo;return e&&e.readyState===`live`&&!function(e,t){return(!t.isLocalScreenVideo||bu()!==`Chrome`)&&e.muted&&!_d.has(e.id)}(e,{isLocalScreenVideo:n})}function yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yd(Object(n),!0).forEach(function(t){Vr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xd=Object.freeze({VIDEO:`video`,AUDIO:`audio`,SCREEN_VIDEO:`screenVideo`,SCREEN_AUDIO:`screenAudio`,CUSTOM_VIDEO:`customVideo`,CUSTOM_AUDIO:`customAudio`}),Sd=Object.freeze({PARTICIPANTS:`participants`,STREAMING:`streaming`,TRANSCRIPTION:`transcription`}),Cd=Object.values(xd),wd=[`v`,`a`,`sv`,`sa`,`cv`,`ca`];Object.freeze(Cd.reduce(function(e,t,n){return e[t]=wd[n],e},{})),Object.freeze(wd.reduce(function(e,t,n){return e[t]=Cd[n],e},{}));var Td=[xd.VIDEO,xd.AUDIO,xd.SCREEN_VIDEO,xd.SCREEN_AUDIO],Ed=Object.values(Sd),Dd=[`p`,`s`,`t`];Object.freeze(Ed.reduce(function(e,t,n){return e[t]=Dd[n],e},{})),Object.freeze(Dd.reduce(function(e,t,n){return e[t]=Ed[n],e},{}));var Od=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;Nr(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return Ir(e,[{key:`clone`,value:function(){var t=new e;if(t.base=this.base instanceof kd?this.base.clone():this.base,this.byUserId!==void 0)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof kd?r.clone():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var a=this.byParticipantId[i];t.byParticipantId[i]=a instanceof kd?a.clone():a}return t}},{key:`toJSONObject`,value:function(){var e={};if(typeof this.base==`boolean`?e.base=this.base:this.base instanceof kd&&(e.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var t in e.byUserId={},this.byUserId){var n=this.byUserId[t];e.byUserId[t]=n instanceof kd?n.toJSONObject():n}if(this.byParticipantId!==void 0)for(var r in e.byParticipantId={},this.byParticipantId){var i=this.byParticipantId[r];e.byParticipantId[r]=i instanceof kd?i.toJSONObject():i}return e}},{key:`toMinifiedJSONObject`,value:function(){var e={};if(this.base!==void 0&&(e.b=typeof this.base==`boolean`?this.base:this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var t in e.u={},this.byUserId){var n=this.byUserId[t];e.u[t]=typeof n==`boolean`?n:n.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var r in e.p={},this.byParticipantId){var i=this.byParticipantId[r];e.p[r]=typeof i==`boolean`?i:i.toMinifiedJSONObject()}return e}},{key:`normalize`,value:function(){return this.base instanceof kd&&(this.base=this.base.normalize()),this.byUserId&&=Object.fromEntries(Object.entries(this.byUserId).map(function(e){var t=Gr(e,2),n=t[0],r=t[1];return[n,r instanceof kd?r.normalize():r]})),this.byParticipantId&&=Object.fromEntries(Object.entries(this.byParticipantId).map(function(e){var t=Gr(e,2),n=t[0],r=t[1];return[n,r instanceof kd?r.normalize():r]})),this}}],[{key:`fromJSONObject`,value:function(t){var n,r,i;if(t.base!==void 0&&(n=typeof t.base==`boolean`?t.base:kd.fromJSONObject(t.base)),t.byUserId!==void 0)for(var a in r={},t.byUserId){var o=t.byUserId[a];r[a]=typeof o==`boolean`?o:kd.fromJSONObject(o)}if(t.byParticipantId!==void 0)for(var s in i={},t.byParticipantId){var c=t.byParticipantId[s];i[s]=typeof c==`boolean`?c:kd.fromJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:`fromMinifiedJSONObject`,value:function(t){var n,r,i;if(t.b!==void 0&&(n=typeof t.b==`boolean`?t.b:kd.fromMinifiedJSONObject(t.b)),t.u!==void 0)for(var a in r={},t.u){var o=t.u[a];r[a]=typeof o==`boolean`?o:kd.fromMinifiedJSONObject(o)}if(t.p!==void 0)for(var s in i={},t.p){var c=t.p[s];i[s]=typeof c==`boolean`?c:kd.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:`validateJSONObject`,value:function(e){if(R(e)!==`object`)return[!1,`canReceive must be an object`];for(var t=[`base`,`byUserId`,`byParticipantId`],n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return[!1,`canReceive can only contain keys (${t.join(`, `)})`];if(i===`base`){var a=Gr(kd.validateJSONObject(e.base,!0),2),o=a[0],s=a[1];if(!o)return[!1,s]}else{if(R(e[i])!==`object`)return[!1,`invalid (non-object) value for field '${i}' in canReceive`];for(var c=0,l=Object.values(e[i]);c<l.length;c++){var u=l[c],d=Gr(kd.validateJSONObject(u),2),f=d[0],p=d[1];if(!f)return[!1,p]}}}return[!0]}}])}(),kd=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.video,r=t.audio,i=t.screenVideo,a=t.screenAudio,o=t.customVideo,s=t.customAudio;Nr(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=a,this.customVideo=o,this.customAudio=s}return Ir(e,[{key:`clone`,value:function(){var t=new e;return this.video!==void 0&&(t.video=this.video),this.audio!==void 0&&(t.audio=this.audio),this.screenVideo!==void 0&&(t.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(t.screenAudio=this.screenAudio),this.customVideo!==void 0&&(t.customVideo=bd({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=bd({},this.customAudio)),t}},{key:`toJSONObject`,value:function(){var e={};return this.video!==void 0&&(e.video=this.video),this.audio!==void 0&&(e.audio=this.audio),this.screenVideo!==void 0&&(e.screenVideo=this.screenVideo),this.screenAudio!==void 0&&(e.screenAudio=this.screenAudio),this.customVideo!==void 0&&(e.customVideo=bd({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=bd({},this.customAudio)),e}},{key:`toMinifiedJSONObject`,value:function(){var e={};return this.video!==void 0&&(e.v=this.video),this.audio!==void 0&&(e.a=this.audio),this.screenVideo!==void 0&&(e.sv=this.screenVideo),this.screenAudio!==void 0&&(e.sa=this.screenAudio),this.customVideo!==void 0&&(e.cv=bd({},this.customVideo)),this.customAudio!==void 0&&(e.ca=bd({},this.customAudio)),e}},{key:`normalize`,value:function(){function e(e,t){return e&&Object.keys(e).length===1&&e[`*`]===t}return!(!0!==this.video||!0!==this.audio||!0!==this.screenVideo||!0!==this.screenAudio||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(!1!==this.video||!1!==this.audio||!1!==this.screenVideo||!1!==this.screenAudio||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:`fromBoolean`,value:function(t){return new e({video:t,audio:t,screenVideo:t,screenAudio:t,customVideo:{"*":t},customAudio:{"*":t}})}},{key:`fromJSONObject`,value:function(t){return new e({video:t.video,audio:t.audio,screenVideo:t.screenVideo,screenAudio:t.screenAudio,customVideo:t.customVideo===void 0?void 0:bd({},t.customVideo),customAudio:t.customAudio===void 0?void 0:bd({},t.customAudio)})}},{key:`fromMinifiedJSONObject`,value:function(t){return new e({video:t.v,audio:t.a,screenVideo:t.sv,screenAudio:t.sa,customVideo:t.cv,customAudio:t.ca})}},{key:`validateJSONObject`,value:function(e,t){if(typeof e==`boolean`)return[!0];if(R(e)!==`object`)return[!1,`invalid (non-object, non-boolean) value in canReceive`];for(var n=Object.keys(e),r=0,i=n;r<i.length;r++){var a=i[r];if(!Cd.includes(a))return[!1,`invalid media type '${a}' in canReceive`];if(Td.includes(a)){if(typeof e[a]!=`boolean`)return[!1,`invalid (non-boolean) value for media type '${a}' in canReceive`]}else{if(R(e[a])!==`object`)return[!1,`invalid (non-object) value for media type '${a}' in canReceive`];for(var o=0,s=Object.values(e[a]);o<s.length;o++)if(typeof s[o]!=`boolean`)return[!1,`invalid (non-boolean) value for entry within '${a}' in canReceive`];if(t&&e[a][`*`]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '${a}'`]}}return t&&n.length!==Cd.length?[!1,`canReceive "base" permission must specify all media types: ${Cd.join(`, `)} (or be set to a boolean shorthand)`]:[!0]}}])}(),Ad=[`result`],jd=[`preserveIframe`];function Md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Md(Object(n),!0).forEach(function(t){Vr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Md(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Nd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nd=function(){return!!e})()}function Pd(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return Fd(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fd(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function Fd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Id={},Ld=`video`,Rd=`voice`,zd=su()?{data:{}}:{data:{},topology:`none`},Bd={present:0,hidden:0},Vd={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Hd=Object.keys(Vd),Ud=[`state`,`volume`,`simulcastEncodings`],Wd={androidInCallNotification:{title:`string`,subtitle:`string`,iconName:`string`,disableForCustomOverride:`boolean`},disableAutoDeviceManagement:{audio:`boolean`,video:`boolean`}},Gd={id:{iconPath:`string`,iconPathDarkMode:`string`,label:`string`,tooltip:`string`,visualState:`'default' | 'sidebar-open' | 'active'`}},Kd={id:{allow:`string`,controlledBy:`'*' | 'owners' | string[]`,csp:`string`,iconURL:`string`,label:`string`,loading:`'eager' | 'lazy'`,location:`'main' | 'sidebar'`,name:`string`,referrerPolicy:`string`,sandbox:`string`,src:`string`,srcdoc:`string`,shared:`string[] | 'owners' | boolean`}},qd=/^[a-zA-Z0-9_-]+$/;function Jd(e){if(e!=null&&R(e)===`object`&&!Array.isArray(e)){var t,n={},r=Pd(Object.entries(e).slice(0,10));try{for(r.s();!(t=r.n()).done;){var i=Gr(t.value,2),a=i[0],o=i[1];typeof a!=`string`||a.length>64||qd.test(a)&&typeof o==`string`&&(n[a]=o.slice(0,256))}}catch(e){r.e(e)}finally{r.f()}return Object.keys(n).length?n:void 0}}var Yd={customIntegrations:{validate:xf,help:yf()},customTrayButtons:{validate:bf,help:`customTrayButtons should be a dictionary of the type ${JSON.stringify(Gd)}`},url:{validate:function(e){return typeof e==`string`},help:`url should be a string`},baseUrl:{validate:function(e){return console.warn(`baseUrl is deprecated and has no effect`),typeof e==`string`},help:`baseUrl should be a string`},token:{validate:function(e){return typeof e==`string`},help:`token should be a string`,queryString:`t`},dailyConfig:{validate:function(e,t){try{return t.validateDailyConfig(e),!0}catch(e){console.error(`Failed to validate dailyConfig`,e)}return!1},help:`Unsupported dailyConfig. Check error logs for detailed info.`},reactNativeConfig:{validate:function(e){return Sf(e,Wd)},help:`reactNativeConfig should look like ${JSON.stringify(Wd)}, all fields optional`},lang:{validate:function(e){return[`cs`,`da`,`de`,`en-us`,`en`,`es`,`fi`,`fr`,`it`,`jp`,`ka`,`nl`,`no`,`pl`,`pt`,`pt-BR`,`ru`,`sk`,`sv`,`tr`,`user`].includes(e)},help:`language not supported. Options are: cs, da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sk, sv, tr, user`},userName:!0,userData:{validate:function(e){try{return uf(e),!0}catch(e){return console.error(e),!1}},help:`invalid userData type provided`},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){if(typeof e==`boolean`)return t._preloadCache.allowLocalVideo=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.videoTrack=e,n={customTrack:Xl};else{if(delete t._sharedTracks.videoTrack,typeof e!=`string`)return console.error(`videoSource must be a MediaStreamTrack, boolean, or a string`),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({video:{settings:n}},!1),!0}},audioSource:{validate:function(e,t){if(typeof e==`boolean`)return t._preloadCache.allowLocalAudio=e,!0;var n;if(e instanceof MediaStreamTrack)t._sharedTracks.audioTrack=e,n={customTrack:Xl};else{if(delete t._sharedTracks.audioTrack,typeof e!=`string`)return console.error(`audioSource must be a MediaStreamTrack, boolean, or a string`),!1;n={deviceId:e}}return t._updatePreloadCacheInputSettings({audio:{settings:n}},!1),!0}},subscribeToTracksAutomatically:{validate:function(e,t){return t._preloadCache.subscribeToTracksAutomatically=e,!0}},theme:{validate:function(e){var t=[`accent`,`accentText`,`background`,`backgroundAccent`,`baseText`,`border`,`mainAreaBg`,`mainAreaBgAccent`,`mainAreaText`,`supportiveText`],n=function(e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return console.error(`unsupported color "${i}". Valid colors: ${t.join(`, `)}`),!1;if(!e[i].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error(`${i} theme color should be provided in valid hex color format. Received: "${e[i]}"`),!1}return!0};return R(e)===`object`&&(`light`in e&&`dark`in e||`colors`in e)?`light`in e&&`dark`in e?`colors`in e.light?`colors`in e.dark?n(e.light.colors)&&n(e.dark.colors):(console.error(`Dark theme is missing "colors" property.`,e),!1):(console.error(`Light theme is missing "colors" property.`,e),!1):n(e.colors):(console.error(`Theme must contain either both "light" and "dark" properties, or "colors".`,e),!1)},help:`unsupported theme configuration. Check error logs for detailed info.`},layoutConfig:{validate:function(e){if(`grid`in e){var t=e.grid;if(`maxTilesPerPage`in t){if(!Number.isInteger(t.maxTilesPerPage))return console.error(`grid.maxTilesPerPage should be an integer. You passed ${t.maxTilesPerPage}.`),!1;if(t.maxTilesPerPage>49)return console.error(`grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case.`),!1}if(`minTilesPerPage`in t){if(!Number.isInteger(t.minTilesPerPage))return console.error(`grid.minTilesPerPage should be an integer. You passed ${t.minTilesPerPage}.`),!1;if(t.minTilesPerPage<1)return console.error(`grid.minTilesPerPage can't be lower than 1.`),!1;if(`maxTilesPerPage`in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error(`grid.minTilesPerPage can't be higher than grid.maxTilesPerPage.`),!1}}return!0},help:`unsupported layoutConfig. Check error logs for detailed info.`},receiveSettings:{validate:function(e){return df(e,{allowAllParticipantsKey:!1})},help:vf({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error(`Failed to validate send settings`,e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:`Invalid sendSettings provided. Check error logs for detailed info.`},inputSettings:{validate:function(e,t){return!!ff(e)&&(t._inputSettings||={},pf(e,t.properties?.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:_f()},layout:{validate:function(e){return e===`custom-v1`||e===`browser`||e===`none`},help:`layout may only be set to "custom-v1"`,queryString:`layout`},emb:{queryString:`emb`},embHref:{queryString:`embHref`},dailyJsVersion:{queryString:`dailyJsVersion`},aboutClient:{validate:function(e){if(e==null)return!0;if(R(e)!==`object`||Array.isArray(e))return!1;var t=Object.entries(e);if(t.length>10)return!1;for(var n=0,r=t;n<r.length;n++){var i=Gr(r[n],2),a=i[0],o=i[1];if(typeof a!=`string`||a.length>64||!qd.test(a)||typeof o!=`string`||o.length>256)return!1}return!0},help:`aboutClient must be an object with up to 10 entries; keys must be strings made up of characters (a-z, 0-9, _, -) and a max length of 64; values must be strings with a max length of 256`},proxy:{queryString:`proxy`},strictMode:!0,allowMultipleCallInstances:!0},Xd={styles:{validate:function(e){for(var t in e)if(t!==`cam`&&t!==`screen`)return!1;if(e.cam){for(var n in e.cam)if(n!==`div`&&n!==`video`)return!1}if(e.screen){for(var r in e.screen)if(r!==`div`&&r!==`video`)return!1}return!0},help:`styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }`},setSubscribedTracks:{validate:function(e,t){if(t._preloadCache.subscribeToTracksAutomatically)return!1;var n=[!0,!1,`staged`];if(n.includes(e)||!su()&&e===`avatar`)return!0;var r=[`audio`,`video`,`screenAudio`,`screenVideo`,`rmpAudio`,`rmpVideo`],i=function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var a in e)if(a===`custom`){if(!n.includes(e[a])&&!i(e[a],!0))return!1}else{var o=!t&&!r.includes(a),s=!n.includes(e[a]);if(o||s)return!1}return!0};return i(e)},help:`setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: true${su()?``:` | 'avatar'`} | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }`},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return!1===e},help:`setScreenShare must be false, as it's only meant for stopping remote participants' screen shares`},eject:!0,updatePermissions:{validate:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Gr(n[t],2),i=r[0],a=r[1];switch(i){case`hasPresence`:if(typeof a!=`boolean`)return!1;break;case`canSend`:if(a instanceof Set||a instanceof Array||Array.isArray(a)){var o,s=[`video`,`audio`,`screenVideo`,`screenAudio`,`customVideo`,`customAudio`],c=Pd(a);try{for(c.s();!(o=c.n()).done;){var l=o.value;if(!s.includes(l))return!1}}catch(e){c.e(e)}finally{c.f()}}else if(typeof a!=`boolean`)return!1;(a instanceof Array||Array.isArray(a))&&(e.canSend=new Set(a));break;case`canReceive`:var u=Gr(Od.validateJSONObject(a),2),d=u[0],f=u[1];if(!d)return console.error(f),!1;break;case`canAdmin`:if(a instanceof Set||a instanceof Array||Array.isArray(a)){var p,m=[`participants`,`streaming`,`transcription`],h=Pd(a);try{for(h.s();!(p=h.n()).done;){var g=p.value;if(!m.includes(g))return!1}}catch(e){h.e(e)}finally{h.f()}}else if(typeof a!=`boolean`)return!1;(a instanceof Array||Array.isArray(a))&&(e.canAdmin=new Set(a));break;default:return!1}}return!0},help:`updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription).`}};Promise.any||(Promise.any=function(){var e=z(function*(e){return new Promise(function(t,n){var r=[];e.forEach(function(i){return Promise.resolve(i).then(function(e){t(e)}).catch(function(t){r.push(t),r.length===e.length&&n(r)})})})});return function(t){return e.apply(this,arguments)}}());var Zd=function(){function e(t){var n,r,i,a,o,s,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Nr(this,e),i=this,a=Rr(a=e),Vr(r=Lr(i,Nd()?Reflect.construct(a,o||[],Rr(i).constructor):a.apply(i,o)),`startListeningForDeviceChanges`,function(){md(r.handleDeviceChange)}),Vr(r,`stopListeningForDeviceChanges`,function(){hd(r.handleDeviceChange)}),Vr(r,`handleDeviceChange`,function(e){e=e.map(function(e){return JSON.parse(JSON.stringify(e))}),r.emitDailyJSEvent({action:`available-devices-updated`,availableDevices:e})}),Vr(r,`handleNativeAppStateChange`,function(){var e=z(function*(e){if(e===`destroyed`)return console.warn(`App has been destroyed before leaving the meeting. Cleaning up all the resources!`),void(yield r.destroy());var t=e===`active`;r.disableReactNativeAutoDeviceManagement(`video`)||(t?r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!0):(r.camUnmutedBeforeLosingNativeActiveState=r.localVideo(),r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!1)))});return function(t){return e.apply(this,arguments)}}()),Vr(r,`handleNativeAudioFocusChange`,function(e){r.disableReactNativeAutoDeviceManagement(`audio`)||(r._hasNativeAudioFocus=e,r.toggleParticipantAudioBasedOnNativeAudioFocus(),r._hasNativeAudioFocus?r.micUnmutedBeforeLosingNativeAudioFocus&&r.setLocalAudio(!0):(r.micUnmutedBeforeLosingNativeAudioFocus=r.localAudio(),r.setLocalAudio(!1)))}),Vr(r,`handleNativeSystemScreenCaptureStop`,function(){r.stopScreenShare()}),!_u()&&!su())throw Error(`WebRTC not supported or suppressed`);if(r.strictMode=c.strictMode===void 0||c.strictMode,r.allowMultipleCallInstances=(n=c.allowMultipleCallInstances)!=null&&n,Object.keys(Id).length&&(r._logDuplicateInstanceAttempt(),!r.allowMultipleCallInstances)){if(r.strictMode)throw Error(`Duplicate DailyIframe instances are not allowed`);console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),r.callClientId=di(),Id[(s=r).callClientId]=s,window._daily.instances[r.callClientId]={},r._sharedTracks={},window._daily.instances[r.callClientId].tracks=r._sharedTracks,c.dailyJsVersion=e.version(),c.aboutClient!==void 0&&(c.aboutClient=Jd(c.aboutClient)),r._iframe=t,r._callObjectMode=c.layout===`none`&&!r._iframe,r._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},c.showLocalVideo===void 0?r._showLocalVideo=!0:r._callObjectMode?console.error(`showLocalVideo is not available in call object mode`):r._showLocalVideo=!!c.showLocalVideo,c.showParticipantsBar===void 0?r._showParticipantsBar=!0:r._callObjectMode?console.error(`showParticipantsBar is not available in call object mode`):r._showParticipantsBar=!!c.showParticipantsBar,c.customIntegrations===void 0?r._customIntegrations={}:r._callObjectMode?console.error(`customIntegrations is not available in call object mode`):r._customIntegrations=c.customIntegrations,c.customTrayButtons===void 0?r._customTrayButtons={}:r._callObjectMode?console.error(`customTrayButtons is not available in call object mode`):r._customTrayButtons=c.customTrayButtons,c.activeSpeakerMode===void 0?r._activeSpeakerMode=!1:r._callObjectMode?console.error(`activeSpeakerMode is not available in call object mode`):r._activeSpeakerMode=!!c.activeSpeakerMode,c.receiveSettings?r._callObjectMode?r._receiveSettings=c.receiveSettings:console.error(`receiveSettings is only available in call object mode`):r._receiveSettings={},r.validateProperties(c),r.properties=W({},c),r.properties.aboutClient!==void 0&&(r.properties.aboutClient=Jd(r.properties.aboutClient)),r._inputSettings||(r._inputSettings={}),r._callObjectLoader=r._callObjectMode?new Uu(r.callClientId):null,r._callState=`new`,r._isPreparingToJoin=!1,r._accessState={access:`unknown`},r._meetingSessionSummary={},r._finalSummaryOfPrevSession={},r._meetingSessionState=Ef(zd,r._callObjectMode),r._nativeInCallAudioMode=Ld,r._participants={},r._isScreenSharing=!1,r._participantCounts=Bd,r._rmpPlayerState={},r._waitingParticipants={},r._network={threshold:`good`,quality:100,networkState:`unknown`,stats:{}},r._activeSpeaker={},r._localAudioLevel=0,r._isLocalAudioLevelObserverRunning=!1,r._remoteParticipantsAudioLevel={},r._isRemoteParticipantsAudioLevelObserverRunning=!1,r._maxAppMessageSize=Wl,r._messageChannel=su()?new Pu:new ju,r._iframe&&(r._iframe.requestFullscreen?r._iframe.addEventListener(`fullscreenchange`,function(){document.fullscreenElement===r._iframe?(r.emitDailyJSEvent({action:`fullscreen`}),r.sendMessageToCallMachine({action:`fullscreen`})):(r.emitDailyJSEvent({action:`exited-fullscreen`}),r.sendMessageToCallMachine({action:`exited-fullscreen`}))}):r._iframe.webkitRequestFullscreen&&r._iframe.addEventListener(`webkitfullscreenchange`,function(){document.webkitFullscreenElement===r._iframe?(r.emitDailyJSEvent({action:`fullscreen`}),r.sendMessageToCallMachine({action:`fullscreen`})):(r.emitDailyJSEvent({action:`exited-fullscreen`}),r.sendMessageToCallMachine({action:`exited-fullscreen`}))})),su()){var l=r.nativeUtils();l.addAudioFocusChangeListener&&l.removeAudioFocusChangeListener&&l.addAppStateChangeListener&&l.removeAppStateChangeListener&&l.addSystemScreenCaptureStopListener&&l.removeSystemScreenCaptureStopListener||console.warn(`expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native`),r._hasNativeAudioFocus=!0,l.addAudioFocusChangeListener(r.handleNativeAudioFocusChange),l.addAppStateChangeListener(r.handleNativeAppStateChange),l.addSystemScreenCaptureStopListener(r.handleNativeSystemScreenCaptureStop)}return r._callObjectMode&&r.startListeningForDeviceChanges(),r._messageChannel.addListenerForMessagesFromCallMachine(r.handleMessageFromCallMachine,r.callClientId,r),r}return Br(e,Xr),Ir(e,[{key:`destroy`,value:(le=z(function*(){var e;try{yield this.leave()}catch{}var t=this._iframe;if(t){var n=t.parentElement;n&&n.removeChild(t)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),su()){var r=this.nativeUtils();r.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),r.removeAppStateChangeListener(this.handleNativeAppStateChange),r.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:`call-instance-destroyed`}),delete Id[this.callClientId],(e=window)!=null&&(e=e._daily)!=null&&e.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)}),function(){return le.apply(this,arguments)})},{key:`isDestroyed`,value:function(){return!!this._destroyed}},{key:`loadCss`,value:function(e){var t=e.bodyClass,n=e.cssFile,r=e.cssText;return cf(),this.sendMessageToCallMachine({action:`load-css`,cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:`iframe`,value:function(){return cf(),this._iframe}},{key:`meetingState`,value:function(){return this._callState}},{key:`accessState`,value:function(){return of(this._callObjectMode,`accessState()`),this._accessState}},{key:`participants`,value:function(){return this._participants}},{key:`participantCounts`,value:function(){return this._participantCounts}},{key:`waitingParticipants`,value:function(){return of(this._callObjectMode,`waitingParticipants()`),this._waitingParticipants}},{key:`validateParticipantProperties`,value:function(e,t){for(var n in t){if(!Xd[n])throw Error(`unrecognized updateParticipant property ${n}`);if(Xd[n].validate&&!Xd[n].validate(t[n],this,this._participants[e]))throw Error(Xd[n].help)}}},{key:`updateParticipant`,value:function(e,t){return this._participants.local&&this._participants.local.session_id===e&&(e=`local`),e&&t&&(this.validateParticipantProperties(e,t),this.sendMessageToCallMachine({action:`update-participant`,id:e,properties:t})),this}},{key:`updateParticipants`,value:function(e){var t=this._participants.local&&this._participants.local.session_id;for(var n in e)n===t&&(n=`local`),n&&e[n]&&this.validateParticipantProperties(n,e[n]);return this.sendMessageToCallMachine({action:`update-participants`,participants:e}),this}},{key:`updateWaitingParticipant`,value:(ce=z(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(of(this._callObjectMode,`updateWaitingParticipant()`),ef(this._callState,`updateWaitingParticipant()`),typeof t!=`string`||R(n)!==`object`)throw Error(`updateWaitingParticipant() must take an id string and a updates object`);return new Promise(function(r,i){e.sendMessageToCallMachine({action:`daily-method-update-waiting-participant`,id:t,updates:n},function(e){e.error&&i(e.error),e.id||i(Error(`unknown error in updateWaitingParticipant()`)),r({id:e.id})})})}),function(){return ce.apply(this,arguments)})},{key:`updateWaitingParticipants`,value:(se=z(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(of(this._callObjectMode,`updateWaitingParticipants()`),ef(this._callState,`updateWaitingParticipants()`),R(t)!==`object`)throw Error(`updateWaitingParticipants() must take a mapping between ids and update objects`);return new Promise(function(n,r){e.sendMessageToCallMachine({action:`daily-method-update-waiting-participants`,updatesById:t},function(e){e.error&&r(e.error),e.ids||r(Error(`unknown error in updateWaitingParticipants()`)),n({ids:e.ids})})})}),function(){return se.apply(this,arguments)})},{key:`requestAccess`,value:(k=z(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.access,r=n===void 0?{level:Wc}:n,i=t.name,a=i===void 0?``:i;return of(this._callObjectMode,`requestAccess()`),ef(this._callState,`requestAccess()`),new Promise(function(t,n){e.sendMessageToCallMachine({action:`daily-method-request-access`,access:r,name:a},function(e){e.error&&n(e.error),e.access||n(Error(`unknown error in requestAccess()`)),t({access:e.access,granted:e.granted})})})}),function(){return k.apply(this,arguments)})},{key:`localAudio`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.audio.state):null}},{key:`localVideo`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.video.state):null}},{key:`setLocalAudio`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return`forceDiscardTrack`in t&&(su()?(console.warn(`forceDiscardTrack option not supported in React Native; ignoring`),t={}):e&&(console.warn(`forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring`),t={})),this.sendMessageToCallMachine({action:`local-audio`,state:e,options:t}),this}},{key:`localScreenAudio`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.screenAudio.state):null}},{key:`localScreenVideo`,value:function(){return this._participants.local?![`blocked`,`off`].includes(this._participants.local.tracks.screenVideo.state):null}},{key:`updateScreenShare`,value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:`local-screen-update`,options:e}),this;console.warn(`There is no screen share in progress. Try calling startScreenShare first.`)}},{key:`setLocalVideo`,value:function(e){return this.sendMessageToCallMachine({action:`local-video`,state:e}),this}},{key:`_setAllowLocalAudio`,value:function(e){if(this._preloadCache.allowLocalAudio=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-allow-local-audio`,state:e}),this}},{key:`_setAllowLocalVideo`,value:function(e){if(this._preloadCache.allowLocalVideo=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-allow-local-video`,state:e}),this}},{key:`getReceiveSettings`,value:(O=z(function*(e){var t=this,n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,r=n!==void 0&&n;if(of(this._callObjectMode,`getReceiveSettings()`),!this._callMachineInitialized)return this._receiveSettings;switch(R(e)){case`string`:return new Promise(function(n){t.sendMessageToCallMachine({action:`get-single-participant-receive-settings`,id:e,showInheritedValues:r},function(e){n(e.receiveSettings)})});case`undefined`:return this._receiveSettings;default:throw Error(`first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments`)}}),function(e){return O.apply(this,arguments)})},{key:`updateReceiveSettings`,value:(oe=z(function*(e){var t=this;if(of(this._callObjectMode,`updateReceiveSettings()`),!df(e,{allowAllParticipantsKey:!0}))throw Error(vf({allowAllParticipantsKey:!0}));return ef(this._callState,`updateReceiveSettings()`,`To specify receive settings earlier, use the receiveSettings config property.`),new Promise(function(n){t.sendMessageToCallMachine({action:`update-receive-settings`,receiveSettings:e},function(e){n({receiveSettings:e.receiveSettings})})})}),function(e){return oe.apply(this,arguments)})},{key:`_prepInputSettingsForSharing`,value:function(e,t){if(e){var n={};if(e.audio){var r;e.audio.settings&&(!Object.keys(e.audio.settings).length&&t||(n.audio={settings:W({},e.audio.settings)})),t&&(r=n.audio)!=null&&(r=r.settings)!=null&&r.customTrack&&(n.audio.settings={customTrack:this._sharedTracks.audioTrack});var i=e.audio.processor?.type===`none`&&e.audio.processor?._isDefaultWhenNone;if(e.audio.processor&&!i){var a=W({},e.audio.processor);delete a._isDefaultWhenNone,n.audio=W(W({},n.audio),{},{processor:a})}}if(e.video){var o;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:W({},e.video.settings)})),t&&(o=n.video)!=null&&(o=o.settings)!=null&&o.customTrack&&(n.video.settings={customTrack:this._sharedTracks.videoTrack});var s=e.video.processor?.type===`none`&&e.video.processor?._isDefaultWhenNone;if(e.video.processor&&!s){var c=W({},e.video.processor);delete c._isDefaultWhenNone,n.video=W(W({},n.video),{},{processor:c})}}return n}}},{key:`getInputSettings`,value:function(){var e=this;return cf(),new Promise(function(t){t(e._getInputSettings())})}},{key:`_getInputSettings`,value:function(){var e,t,n,r,i={processor:{type:`none`,_isDefaultWhenNone:!0}};this._inputSettings?(e=this._inputSettings?.video||i,t=this._inputSettings?.audio||i):(e=((n=this._preloadCache)==null||(n=n.inputSettings)==null?void 0:n.video)||i,t=((r=this._preloadCache)==null||(r=r.inputSettings)==null?void 0:r.audio)||i);var a={audio:t,video:e};return this._prepInputSettingsForSharing(a,!0)}},{key:`_updatePreloadCacheInputSettings`,value:function(e,t){var n=this._inputSettings||{},r={};if(e.video){var i,a,o;r.video={},e.video.settings?(r.video.settings={},t||e.video.settings.customTrack||(o=n.video)==null||!o.settings?r.video.settings=e.video.settings:r.video.settings=W(W({},n.video.settings),e.video.settings),Object.keys(r.video.settings).length||delete r.video.settings):(i=n.video)!=null&&i.settings&&(r.video.settings=n.video.settings),e.video.processor?r.video.processor=e.video.processor:(a=n.video)!=null&&a.processor&&(r.video.processor=n.video.processor)}else n.video&&(r.video=n.video);if(e.audio){var s,c,l;r.audio={},e.audio.settings?(r.audio.settings={},t||e.audio.settings.customTrack||(l=n.audio)==null||!l.settings?r.audio.settings=e.audio.settings:r.audio.settings=W(W({},n.audio.settings),e.audio.settings),Object.keys(r.audio.settings).length||delete r.audio.settings):(s=n.audio)!=null&&s.settings&&(r.audio.settings=n.audio.settings),e.audio.processor?r.audio.processor=e.audio.processor:(c=n.audio)!=null&&c.processor&&(r.audio.processor=n.audio.processor)}else n.audio&&(r.audio=n.audio);this._maybeUpdateInputSettings(r)}},{key:`_devicesFromInputSettings`,value:function(e){var t,n,r=(e==null||(t=e.video)==null||(t=t.settings)==null?void 0:t.deviceId)||null,i=(e==null||(n=e.audio)==null||(n=n.settings)==null?void 0:n.deviceId)||null,a=this._preloadCache.outputDeviceId||null;return{camera:r?{deviceId:r}:{},mic:i?{deviceId:i}:{},speaker:a?{deviceId:a}:{}}}},{key:`updateInputSettings`,value:(ae=z(function*(e){var t=this;return cf(),ff(e)?e.video||e.audio?(pf(e,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(e,!0),this._getInputSettings()):new Promise(function(n,r){t.sendMessageToCallMachine({action:`update-input-settings`,inputSettings:e},function(i){if(i.error)r(i.error);else{if(i.returnPreloadCache)return t._updatePreloadCacheInputSettings(e,!0),void n(t._getInputSettings());t._maybeUpdateInputSettings(i.inputSettings),n(t._prepInputSettingsForSharing(i.inputSettings,!0))}})})):this._getInputSettings():(console.error(_f()),Promise.reject(_f()))}),function(e){return ae.apply(this,arguments)})},{key:`setBandwidth`,value:function(e){var t=e.kbs,n=e.trackConstraints;if(cf(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-bandwidth`,kbs:t,trackConstraints:n}),this}},{key:`getDailyLang`,value:function(){var e=this;if(cf(),this._callMachineInitialized)return new Promise(function(t){e.sendMessageToCallMachine({action:`get-daily-lang`},function(e){delete e.action,delete e.callbackStamp,t(e)})})}},{key:`setDailyLang`,value:function(e){return cf(),this.sendMessageToCallMachine({action:`set-daily-lang`,lang:e}),this}},{key:`setProxyUrl`,value:function(e){return this.sendMessageToCallMachine({action:`set-proxy-url`,proxyUrl:e}),this}},{key:`setIceConfig`,value:function(e){return this.sendMessageToCallMachine({action:`set-ice-config`,iceConfig:e}),this}},{key:`meetingSessionSummary`,value:function(){return[`left-meeting`,`error`].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:`getMeetingSession`,value:(ie=z(function*(){var e=this;return console.warn(`getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately`),ef(this._callState,`getMeetingSession()`),new Promise(function(t){e.sendMessageToCallMachine({action:`get-meeting-session`},function(e){delete e.action,delete e.callbackStamp,t(e)})})}),function(){return ie.apply(this,arguments)})},{key:`meetingSessionState`,value:function(){return ef(this._callState,`meetingSessionState`),this._meetingSessionState}},{key:`setMeetingSessionData`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`replace`;of(this._callObjectMode,`setMeetingSessionData()`),ef(this._callState,`setMeetingSessionData`);try{(function(e,t){new Ru({data:e,mergeStrategy:t})})(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:`set-session-data`,data:e,mergeStrategy:t})}catch(e){throw Error(`Error setting meeting session data: ${e}`)}}},{key:`setUserName`,value:function(e,t){var n=this;return this.properties.userName=e,new Promise(function(r){n.sendMessageToCallMachine({action:`set-user-name`,name:e??``,thisMeetingOnly:su()||!!t&&!!t.thisMeetingOnly},function(e){delete e.action,delete e.callbackStamp,r(e)})})}},{key:`setUserData`,value:(re=z(function*(e){var t=this;try{uf(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise(function(n){try{t.sendMessageToCallMachine({action:`set-user-data`,userData:e},function(e){delete e.action,delete e.callbackStamp,n(e)})}catch(e){throw Error(`Error setting user data: ${e}`)}})}),function(e){return re.apply(this,arguments)})},{key:`validateAudioLevelInterval`,value:function(e){if(e&&(e<100||typeof e!=`number`))throw Error(`The interval must be a number greater than or equal to 100 milliseconds.`)}},{key:`startLocalAudioLevelObserver`,value:function(e){var t=this;if(typeof AudioWorkletNode>`u`&&!su())throw Error(`startLocalAudioLevelObserver() is not supported on this browser`);if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise(function(n,r){t.sendMessageToCallMachine({action:`start-local-audio-level-observer`,interval:e},function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()})});this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:`isLocalAudioLevelObserverRunning`,value:function(){return this._isLocalAudioLevelObserverRunning}},{key:`stopLocalAudioLevelObserver`,value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:`stop-local-audio-level-observer`})}},{key:`startRemoteParticipantsAudioLevelObserver`,value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise(function(n,r){t.sendMessageToCallMachine({action:`start-remote-participants-audio-level-observer`,interval:e},function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()})});this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:`isRemoteParticipantsAudioLevelObserverRunning`,value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:`stopRemoteParticipantsAudioLevelObserver`,value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:`stop-remote-participants-audio-level-observer`})}},{key:`startCamera`,value:(ne=z(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(of(this._callObjectMode,`startCamera()`),nf(this._callState,this._isPreparingToJoin,`startCamera()`,`Did you mean to use setLocalAudio() and/or setLocalVideo() instead?`),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error(`url in startCamera() is different than the one used in preAuth()`),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(`token in startCamera() is different than the one used in preAuth()`),Promise.reject()}this.validateProperties(t),this.properties=W(W({},this.properties),t)}return new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`start-camera`,properties:$d(e.properties,e.callClientId),preloadCache:$d(e._preloadCache,e.callClientId)},function(e){e.error?n(e.error):t({camera:e.camera,mic:e.mic,speaker:e.speaker})})})}),function(){return ne.apply(this,arguments)})},{key:`validateCustomTrack`,value:function(e,t,n){if(n&&n.length>50)throw Error("Custom track `trackName` must not be more than 50 characters");if(t&&t!==`music`&&t!==`speech`&&!(t instanceof Object))throw Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(n&&[`audio`,`video`,`cam-audio`,`cam-video`,`screenVideo`,`screenAudio`,`screen-video`,`screen-audio`,`rmpAudio`,`rmpVideo`,`customVideoDefaults`].includes(n))throw Error("Custom track `trackName` must not match a track name already used by daily: audio, video, cam-audio, cam-video, screenVideo, screenAudio, screen-video, screen-audio, rmpAudio, rmpVideo, customVideoDefaults");if(!(e instanceof MediaStreamTrack))throw Error(`Custom tracks provided must be instances of MediaStreamTrack`)}},{key:`startCustomTrack`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return cf(),ef(this._callState,`startCustomTrack()`),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise(function(n,r){e._sharedTracks.customTrack=t.track,t.track=Xl,e.sendMessageToCallMachine({action:`start-custom-track`,properties:t},function(e){e.error?r({error:e.error}):n(e.mediaTag)})})}},{key:`stopCustomTrack`,value:function(e){var t=this;return cf(),ef(this._callState,`stopCustomTrack()`),new Promise(function(n){t.sendMessageToCallMachine({action:`stop-custom-track`,mediaTag:e},function(e){n(e.mediaTag)})})}},{key:`setCamera`,value:function(e){var t=this;return lf(),rf(this._callMachineInitialized,`setCamera()`),new Promise(function(n){t.sendMessageToCallMachine({action:`set-camera`,cameraDeviceId:e},function(e){n({device:e.device})})})}},{key:`setAudioDevice`,value:(te=z(function*(e){return lf(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(e){return te.apply(this,arguments)})},{key:`cycleCamera`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise(function(n){e.sendMessageToCallMachine({action:`cycle-camera`,properties:t},function(e){n({device:e.device})})})}},{key:`cycleMic`,value:function(){var e=this;return cf(),new Promise(function(t){e.sendMessageToCallMachine({action:`cycle-mic`},function(e){t({device:e.device})})})}},{key:`getCameraFacingMode`,value:function(){var e=this;return lf(),new Promise(function(t){e.sendMessageToCallMachine({action:`get-camera-facing-mode`},function(e){t(e.facingMode)})})}},{key:`setInputDevicesAsync`,value:(ee=z(function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,a=e.videoSource;if(cf(),i!==void 0&&(n=i),a!==void 0&&(r=a),typeof n==`boolean`&&(this._setAllowLocalAudio(n),n=void 0),typeof r==`boolean`&&(this._setAllowLocalVideo(r),r=void 0),!n&&!r)return yield this.getInputDevices();var o={};return n&&(n instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=n,n=Xl,o.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,o.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=Xl,o.video={settings:{customTrack:r}}):(delete this._sharedTracks.videoTrack,o.video={settings:{deviceId:r}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(o,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise(function(e){t.sendMessageToCallMachine({action:`set-input-devices`,audioDeviceId:n,videoDeviceId:r},function(n){if(delete n.action,delete n.callbackStamp,n.returnPreloadCache)return t._updatePreloadCacheInputSettings(o,!1),void e(t._devicesFromInputSettings(t._inputSettings));e(n)})})}),function(e){return ee.apply(this,arguments)})},{key:`setOutputDeviceAsync`,value:(D=z(function*(e){var t=this,n=e.outputDeviceId;if(cf(),!n||typeof n!=`string`)throw Error(`outputDeviceId must be provided and must be a valid device id`);return this._preloadCache.outputDeviceId=n,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(e,r){t.sendMessageToCallMachine({action:`set-output-device`,outputDeviceId:n},function(n){if(delete n.action,delete n.callbackStamp,n.error){var i=Error(n.error.message);i.type=n.error.type,r(i);return}n.returnPreloadCache?e(t._devicesFromInputSettings(t._inputSettings)):e(n)})})}),function(e){return D.apply(this,arguments)})},{key:`getInputDevices`,value:(E=z(function*(){var e=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(t){e.sendMessageToCallMachine({action:`get-input-devices`},function(n){n.returnPreloadCache?t(e._devicesFromInputSettings(e._inputSettings)):t({camera:n.camera,mic:n.mic,speaker:n.speaker})})})}),function(){return E.apply(this,arguments)})},{key:`nativeInCallAudioMode`,value:function(){return lf(),this._nativeInCallAudioMode}},{key:`setNativeInCallAudioMode`,value:function(e){if(lf(),[Ld,Rd].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement(`audio`)&&tf(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error(`invalid in-call audio mode specified: `,e)}},{key:`preAuth`,value:(T=z(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(of(this._callObjectMode,`preAuth()`),nf(this._callState,this._isPreparingToJoin,`preAuth()`),this.needsLoad()&&(yield this.load(t)),!t.url)throw Error(`preAuth() requires at least a url to be provided`);return this.validateProperties(t),this.properties=W(W({},this.properties),t),new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`daily-method-preauth`,properties:$d(e.properties,e.callClientId),preloadCache:$d(e._preloadCache,e.callClientId)},function(r){return r.error?n(r.error):r.access?(e._didPreAuth=!0,void t({access:r.access})):n(Error(`unknown error in preAuth()`))})})}),function(){return T.apply(this,arguments)})},{key:`load`,value:(w=z(function*(e){var t=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error(`Use after destroy`);if(e&&(this.validateProperties(e),this.properties=W(W({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw Error(`can't load iframe meeting because url property isn't set`);if(this._updateCallState(Lc),this.emitDailyJSEvent({action:`loading`}),this._callObjectMode)return new Promise(function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,function(n){t._bundleLoadTime=n?`no-op`:Date.now()-r,t._updateCallState(Rc),n&&t.emitDailyJSEvent({action:`loaded`}),e()},function(e,r){t.emitDailyJSEvent({action:Yc}),r||(t._handleFatalError({action:`error`,errorMsg:e.msg,error:{type:`connection-error`,msg:`Failed to load call object bundle.`,details:{on:`load`,sourceError:e,bundleUrl:bi(t.properties.dailyConfig)}}}),n(e.msg))})});var n=Ci(this.assembleMeetingUrl(),this.properties.dailyConfig);return new Promise(function(e,r){var i=0,a=function(){if(i>=n.length){var o=`Timed out attempting to load the call. Please check your network connection and try again.`;t._iframe.srcdoc=(s=o,`<!DOCTYPE html>
9
10
  <html>
10
11
  <head>
11
12
  <meta charset="utf-8">
@@ -37,12 +38,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
37
38
  <body>
38
39
  <div class="card"><h1>Failed to load</h1><p>${s}</p></div>
39
40
  </body>
40
- </html>`),t._handleFatalError({action:Jc,errorMsg:o,error:{type:`connection-error`,msg:o,details:{on:`load`,sourceError:{msg:`Timed out (>25000 ms) when loading call frame`,type:`timeout`},candidateCount:n.length}},preserveIframe:!0}),r(o);return}var s,c=n[i++];t._iframe.src=Cr(c,t.properties.dailyConfig);var l=setTimeout(function(){t._loadedCallback&&(t._loadedCallback=null,a())},25e3);t._loadedCallback=function(n){clearTimeout(l),t._callState===`error`?r(n):(xr(Sr(c)),t._updateCallState(Us),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e())}};a()})}}),function(e){return w.apply(this,arguments)})},{key:`join`,value:(C=L(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._testCallInProgress&&this.stopTestCallQuality(),!t.url&&!this.properties.url){var n=`No room URL has been provided`;return console.error(n),Promise.reject(Error(n))}var r=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(r=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error(`url in join() is different than the one used in preAuth()`),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(`token in join() is different than the one used in preAuth()`),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error(`url in join() is different than the one used in load() (${this.properties.url} -> ${t.url})`),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=H(H({},this.properties),t)}return t.showLocalVideo!==void 0&&(this._callObjectMode?console.error(`showLocalVideo is not available in callObject mode`):this._showLocalVideo=!!t.showLocalVideo),t.showParticipantsBar!==void 0&&(this._callObjectMode?console.error(`showParticipantsBar is not available in callObject mode`):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===`joined-meeting`||this._callState===`joining-meeting`?(console.warn(`already joined meeting, call leave() before joining again`),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(Ws,!1),this.emitDailyJSEvent({action:ic}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:`join-meeting`,properties:id(this.properties,this.callClientId),preloadCache:id(this._preloadCache,this.callClientId)},function(t){t.error&&e._joinedCallback&&(e._joinedCallback(null,t.error),e._joinedCallback=null)}),new Promise(function(t,n){e._joinedCallback=function(i,a){if(e._callState!==`error`){if(a)return e._updateCallState(Ks),void n(a);if(e._updateCallState(`joined-meeting`),i)for(var o in i){if(e._callObjectMode){var s=e._callMachine().store;su(i[o],s),cu(i[o],s),uu(i[o],e._participants[o],s)}e._participants[o]=H({},i[o]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}r&&e.loadCss(e.properties),t(i)}else n(a)}}))}),function(){return C.apply(this,arguments)})},{key:`leave`,value:(S=L(function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise(function(t){e._callState===`left-meeting`||e._callState===`error`?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(Ks),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:Ks}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:`leave-meeting`}))})}),function(){return S.apply(this,arguments)})},{key:`startScreenShare`,value:(x=L(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(cd(this._callMachineInitialized,`startScreenShare()`),t.screenVideoSendSettings&&this._validateVideoSendSettings(`screenVideo`,t.screenVideoSendSettings),t.mediaStream&&=(this._sharedTracks.screenMediaStream=t.mediaStream,tl),typeof DailyNativeUtils<`u`&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:qc,type:`screen-share-error`,errorMsg:`Could not start the screen sharing. The screen is already been captured!`});n.setSystemScreenCaptureStartCallback(function(){n.setSystemScreenCaptureStartCallback(null),e.sendMessageToCallMachine({action:Qc,captureOptions:t})}),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:Qc,captureOptions:t})}),function(){return x.apply(this,arguments)})},{key:`stopScreenShare`,value:function(){cd(this._callMachineInitialized,`stopScreenShare()`),this.sendMessageToCallMachine({action:`local-screen-stop`})}},{key:`startRecording`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.type;if(t&&t!==`cloud`&&t!==`cloud-audio-only`&&t!==`raw-tracks`&&t!==`local`)throw Error(`invalid type: ${t}, allowed values 'cloud', 'cloud-audio-only', 'raw-tracks', or 'local'`);this.sendMessageToCallMachine(H({action:`local-recording-start`},e))}},{key:`updateRecording`,value:function(e){var t=e.layout,n=t===void 0?{preset:`default`}:t,r=e.instanceId;this.sendMessageToCallMachine({action:`daily-method-update-recording`,layout:n,instanceId:r})}},{key:`stopRecording`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(H({action:`local-recording-stop`},e))}},{key:`startLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(H({action:`daily-method-start-live-streaming`},e))}},{key:`updateLiveStreaming`,value:function(e){var t=e.layout,n=t===void 0?{preset:`default`}:t,r=e.instanceId;this.sendMessageToCallMachine({action:`daily-method-update-live-streaming`,layout:n,instanceId:r})}},{key:`addLiveStreamingEndpoints`,value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:$c,endpointsOp:cl,endpoints:t,instanceId:n})}},{key:`removeLiveStreamingEndpoints`,value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:$c,endpointsOp:ll,endpoints:t,instanceId:n})}},{key:`stopLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(H({action:`daily-method-stop-live-streaming`},e))}},{key:`validateDailyConfig`,value:function(e){e.camSimulcastEncodings&&(console.warn(`camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings.`),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn(`screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings.`),Cl()&&e.noAutoDefaultDeviceChange&&console.warn(`noAutoDefaultDeviceChange is not supported on Android, and will be ignored.`)}},{key:`validateSimulcastEncodings`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw Error(`encodings must be an Array`);if(!kd(e.length,1,3))throw Error(`encodings must be an Array with between 1 to 3 layers`);for(var r=0;r<e.length;r++){var i=e[r];for(var a in this._validateEncodingLayerHasValidProperties(i),i)if(qu.includes(a)){if(typeof i[a]!=`number`)throw Error(`${a} must be a number`);if(t){var o=t[a],s=o.min,c=o.max;if(!kd(i[a],s,c))throw Error(`${a} value not in range. valid range: ${s} to ${c}`)}}else if(![`active`,`scalabilityMode`].includes(a))throw Error(`Invalid key ${a}, valid keys are:`+Object.values(qu));if(n&&!i.hasOwnProperty(`maxBitrate`))throw Error(`maxBitrate is not specified`)}}}},{key:`startRemoteMediaPlayer`,value:(b=L(function*(e){var t=this,n=e.url,r=e.settings,i=r===void 0?{state:il.PLAY}:r;try{(function(e){if(typeof e!=`string`)throw Error(`url parameter must be "string" type`)})(n),Od(i),function(e){for(var t in e)if(!Ju.includes(t))throw Error(`Invalid key ${t}, valid keys are: ${Ju}`);e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,Ku,!0)}(i)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`startRemoteMediaPlayer arguments must be of the form:
41
+ </html>`),t._handleFatalError({action:Ul,errorMsg:o,error:{type:`connection-error`,msg:o,details:{on:`load`,sourceError:{msg:`Timed out (>25000 ms) when loading call frame`,type:`timeout`},candidateCount:n.length}},preserveIframe:!0}),r(o);return}var s,c=n[i++];t._iframe.src=vi(c,t.properties.dailyConfig);var l=setTimeout(function(){t._loadedCallback&&(t._loadedCallback=null,a())},25e3);t._loadedCallback=function(n){clearTimeout(l),t._callState===`error`?r(n):(gi(_i(c)),t._updateCallState(Rc),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e())}};a()})}}),function(e){return w.apply(this,arguments)})},{key:`join`,value:(C=z(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this._testCallInProgress&&this.stopTestCallQuality(),!t.url&&!this.properties.url){var n=`No room URL has been provided`;return console.error(n),Promise.reject(Error(n))}var r=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(r=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error(`url in join() is different than the one used in preAuth()`),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(`token in join() is different than the one used in preAuth()`),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error(`url in join() is different than the one used in load() (${this.properties.url} -> ${t.url})`),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=W(W({},this.properties),t)}return t.showLocalVideo!==void 0&&(this._callObjectMode?console.error(`showLocalVideo is not available in callObject mode`):this._showLocalVideo=!!t.showLocalVideo),t.showParticipantsBar!==void 0&&(this._callObjectMode?console.error(`showParticipantsBar is not available in callObject mode`):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===`joined-meeting`||this._callState===`joining-meeting`?(console.warn(`already joined meeting, call leave() before joining again`),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(zc,!1),this.emitDailyJSEvent({action:$c}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:`join-meeting`,properties:$d(this.properties,this.callClientId),preloadCache:$d(this._preloadCache,this.callClientId)},function(t){t.error&&e._joinedCallback&&(e._joinedCallback(null,t.error),e._joinedCallback=null)}),new Promise(function(t,n){e._joinedCallback=function(i,a){if(e._callState!==`error`){if(a)return e._updateCallState(Vc),void n(a);if(e._updateCallState(`joined-meeting`),i)for(var o in i){if(e._callObjectMode){var s=e._callMachine().store;nd(i[o],s),rd(i[o],s),ad(i[o],e._participants[o],s)}e._participants[o]=W({},i[o]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}r&&e.loadCss(e.properties),t(i)}else n(a)}}))}),function(){return C.apply(this,arguments)})},{key:`leave`,value:(S=z(function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise(function(t){e._callState===`left-meeting`||e._callState===`error`?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(Vc),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:Vc}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:`leave-meeting`}))})}),function(){return S.apply(this,arguments)})},{key:`startScreenShare`,value:(x=z(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(rf(this._callMachineInitialized,`startScreenShare()`),t.screenVideoSendSettings&&this._validateVideoSendSettings(`screenVideo`,t.screenVideoSendSettings),t.mediaStream&&=(this._sharedTracks.screenMediaStream=t.mediaStream,Xl),typeof DailyNativeUtils<`u`&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:Hl,type:`screen-share-error`,errorMsg:`Could not start the screen sharing. The screen is already been captured!`});n.setSystemScreenCaptureStartCallback(function(){n.setSystemScreenCaptureStartCallback(null),e.sendMessageToCallMachine({action:ql,captureOptions:t})}),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:ql,captureOptions:t})}),function(){return x.apply(this,arguments)})},{key:`stopScreenShare`,value:function(){rf(this._callMachineInitialized,`stopScreenShare()`),this.sendMessageToCallMachine({action:`local-screen-stop`})}},{key:`startRecording`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.type;if(t&&t!==`cloud`&&t!==`cloud-audio-only`&&t!==`raw-tracks`&&t!==`local`)throw Error(`invalid type: ${t}, allowed values 'cloud', 'cloud-audio-only', 'raw-tracks', or 'local'`);this.sendMessageToCallMachine(W({action:`local-recording-start`},e))}},{key:`updateRecording`,value:function(e){var t=e.layout,n=t===void 0?{preset:`default`}:t,r=e.instanceId;this.sendMessageToCallMachine({action:`daily-method-update-recording`,layout:n,instanceId:r})}},{key:`stopRecording`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(W({action:`local-recording-stop`},e))}},{key:`startLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(W({action:`daily-method-start-live-streaming`},e))}},{key:`updateLiveStreaming`,value:function(e){var t=e.layout,n=t===void 0?{preset:`default`}:t,r=e.instanceId;this.sendMessageToCallMachine({action:`daily-method-update-live-streaming`,layout:n,instanceId:r})}},{key:`addLiveStreamingEndpoints`,value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:Jl,endpointsOp:ru,endpoints:t,instanceId:n})}},{key:`removeLiveStreamingEndpoints`,value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:Jl,endpointsOp:iu,endpoints:t,instanceId:n})}},{key:`stopLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(W({action:`daily-method-stop-live-streaming`},e))}},{key:`validateDailyConfig`,value:function(e){e.camSimulcastEncodings&&(console.warn(`camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings.`),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn(`screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings.`),vu()&&e.noAutoDefaultDeviceChange&&console.warn(`noAutoDefaultDeviceChange is not supported on Android, and will be ignored.`)}},{key:`validateSimulcastEncodings`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw Error(`encodings must be an Array`);if(!Tf(e.length,1,3))throw Error(`encodings must be an Array with between 1 to 3 layers`);for(var r=0;r<e.length;r++){var i=e[r];for(var a in this._validateEncodingLayerHasValidProperties(i),i)if(Hd.includes(a)){if(typeof i[a]!=`number`)throw Error(`${a} must be a number`);if(t){var o=t[a],s=o.min,c=o.max;if(!Tf(i[a],s,c))throw Error(`${a} value not in range. valid range: ${s} to ${c}`)}}else if(![`active`,`scalabilityMode`].includes(a))throw Error(`Invalid key ${a}, valid keys are:`+Object.values(Hd));if(n&&!i.hasOwnProperty(`maxBitrate`))throw Error(`maxBitrate is not specified`)}}}},{key:`startRemoteMediaPlayer`,value:(b=z(function*(e){var t=this,n=e.url,r=e.settings,i=r===void 0?{state:$l.PLAY}:r;try{(function(e){if(typeof e!=`string`)throw Error(`url parameter must be "string" type`)})(n),wf(i),function(e){for(var t in e)if(!Ud.includes(t))throw Error(`Invalid key ${t}, valid keys are: ${Ud}`);e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,Vd,!0)}(i)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`startRemoteMediaPlayer arguments must be of the form:
41
42
  { url: "playback url",
42
43
  settings?:
43
- {state: "play"|"pause", simulcastEncodings?: [{}] } }`),e}return new Promise(function(e,r){t.sendMessageToCallMachine({action:`daily-method-start-remote-media-player`,url:n,settings:i},function(t){t.error?r({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})})})}),function(e){return b.apply(this,arguments)})},{key:`stopRemoteMediaPlayer`,value:(y=L(function*(e){var t=this;if(typeof e!=`string`)throw Error(` remotePlayerID must be of type string`);return new Promise(function(n,r){t.sendMessageToCallMachine({action:`daily-method-stop-remote-media-player`,session_id:e},function(e){e.error?r({error:e.error,errorMsg:e.errorMsg}):n()})})}),function(e){return y.apply(this,arguments)})},{key:`updateRemoteMediaPlayer`,value:(v=L(function*(e){var t=this,n=e.session_id,r=e.settings;try{Od(r)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`updateRemoteMediaPlayer arguments must be of the form:
44
+ {state: "play"|"pause", simulcastEncodings?: [{}] } }`),e}return new Promise(function(e,r){t.sendMessageToCallMachine({action:`daily-method-start-remote-media-player`,url:n,settings:i},function(t){t.error?r({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})})})}),function(e){return b.apply(this,arguments)})},{key:`stopRemoteMediaPlayer`,value:(y=z(function*(e){var t=this;if(typeof e!=`string`)throw Error(` remotePlayerID must be of type string`);return new Promise(function(n,r){t.sendMessageToCallMachine({action:`daily-method-stop-remote-media-player`,session_id:e},function(e){e.error?r({error:e.error,errorMsg:e.errorMsg}):n()})})}),function(e){return y.apply(this,arguments)})},{key:`updateRemoteMediaPlayer`,value:(v=z(function*(e){var t=this,n=e.session_id,r=e.settings;try{wf(r)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`updateRemoteMediaPlayer arguments must be of the form:
44
45
  session_id: "participant session",
45
- { settings?: {state: "play"|"pause"} }`),e}return new Promise(function(e,i){t.sendMessageToCallMachine({action:`daily-method-update-remote-media-player`,session_id:n,settings:r},function(t){t.error?i({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})})})}),function(e){return v.apply(this,arguments)})},{key:`startTranscription`,value:function(e){ad(this._callState,`startTranscription()`),this.sendMessageToCallMachine(H({action:`daily-method-start-transcription`},e))}},{key:`updateTranscription`,value:function(e){if(ad(this._callState,`updateTranscription()`),!e)throw Error(`updateTranscription Error: options is mandatory`);if(I(e)!==`object`)throw Error(`updateTranscription Error: options must be object type`);if(e.participants&&!Array.isArray(e.participants))throw Error(`updateTranscription Error: participants must be an array`);this.sendMessageToCallMachine(H({action:`daily-method-update-transcription`},e))}},{key:`stopTranscription`,value:function(e){if(ad(this._callState,`stopTranscription()`),e&&I(e)!==`object`)throw Error(`stopTranscription Error: options must be object type`);if(e&&!e.instanceId)throw Error(`"instanceId" not provided`);this.sendMessageToCallMachine(H({action:`daily-method-stop-transcription`},e))}},{key:`startDialOut`,value:(_=L(function*(e){var t=this;ad(this._callState,`startDialOut()`);var n=function(e){if(e){if(!Array.isArray(e))throw Error(`Error starting dial out: audio codec must be an array`);if(e.length<=0)throw Error(`Error starting dial out: audio codec array specified but empty`);e.forEach(function(e){if(typeof e!=`string`)throw Error(`Error starting dial out: audio codec must be a string`);if(e!==`OPUS`&&e!==`PCMU`&&e!==`PCMA`&&e!==`G722`)throw Error(`Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722`)})}};if(!e.sipUri&&!e.phoneNumber)throw Error(`Error starting dial out: either a sip uri or phone number must be provided`);if(e.sipUri&&e.phoneNumber)throw Error(`Error starting dial out: only one of sip uri or phone number must be provided`);if(e.sipUri){if(typeof e.sipUri!=`string`)throw Error(`Error starting dial out: sipUri must be a string`);if(!e.sipUri.startsWith(`sip:`))throw Error(`Error starting dial out: Invalid SIP URI, must start with 'sip:'`);if(e.video&&typeof e.video!=`boolean`)throw Error(`Error starting dial out: video must be a boolean value`);if(e.videoSettings!==void 0){if(I(e.videoSettings)!==`object`||e.videoSettings===null)throw Error(`Error starting dial out: videoSettings must be an object`);if(!e.video)throw Error(`Error starting dial out: videoSettings provided but video is not enabled`);var r=e.videoSettings;if(r.width!==void 0){if(!Number.isInteger(r.width)||r.width<=0)throw Error(`Error starting dial out: videoSettings.width must be a positive integer`);if(r.width>1280)throw Error(`Error starting dial out: videoSettings.width must be less than or equal to 1280`)}if(r.height!==void 0){if(!Number.isInteger(r.height)||r.height<=0)throw Error(`Error starting dial out: videoSettings.height must be a positive integer`);if(r.height>720)throw Error(`Error starting dial out: videoSettings.height must be less than or equal to 720`)}if(r.fps!==void 0){if(!Number.isInteger(r.fps)||r.fps<=0)throw Error(`Error starting dial out: videoSettings.fps must be a positive integer`);if(r.fps>30)throw Error(`Error starting dial out: videoSettings.fps must be less than or equal to 30`)}if(r.videoBitrate!==void 0){if(!Number.isInteger(r.videoBitrate)||r.videoBitrate<=0)throw Error(`Error starting dial out: videoSettings.videoBitrate must be a positive integer`);if(r.videoBitrate>1e3)throw Error(`Error starting dial out: videoSettings.videoBitrate must be less than or equal to 1000 kbps`)}}(function(e){if(e&&(n(e.audio),e.video)){if(!Array.isArray(e.video))throw Error(`Error starting dial out: video codec must be an array`);if(e.video.length<=0)throw Error(`Error starting dial out: video codec array specified but empty`);e.video.forEach(function(e){if(typeof e!=`string`)throw Error(`Error starting dial out: video codec must be a string`);if(e!==`H264`&&e!==`VP8`)throw Error(`Error starting dial out: video codec must be H264 or VP8`)})}})(e.codecs)}if(e.phoneNumber){if(typeof e.phoneNumber!=`string`)throw Error(`Error starting dial out: phoneNumber must be a string`);if(!/^\+\d{1,}$/.test(e.phoneNumber))throw Error(`Error starting dial out: Invalid phone number, must be valid phone number as per E.164`);e.codecs&&n(e.codecs.audio)}if(e.callerId){if(typeof e.callerId!=`string`)throw Error(`Error starting dial out: callerId must be a string`);if(e.sipUri)throw Error(`Error starting dial out: callerId not allowed with sipUri`)}if(e.displayName){if(typeof e.displayName!=`string`)throw Error(`Error starting dial out: displayName must be a string`);if(e.displayName.length>=200)throw Error(`Error starting dial out: displayName length must be less than 200`)}if(e.userId){if(typeof e.userId!=`string`)throw Error(`Error starting dial out: userId must be a string`);if(e.userId.length>36)throw Error(`Error starting dial out: userId length must be less than or equal to 36`)}if(rd(e),e.permissions&&e.permissions.canReceive){var i=Xn(Nu.validateJSONObject(e.permissions.canReceive),2),a=i[0],o=i[1];if(!a)throw Error(o)}if(e.provider){if(e.provider!==al&&e.provider!==ol)throw Error(`Error: provider can be set only to '${al}' or '${ol}', got: ${e.provider}`);if(e.phoneNumber)throw Error(`Error starting dial out: provider valid only for sipUri, not phoneNumber`);e.provider===al&&console.warn(`(pre-beta) provider=${al} is currently in pre-beta, things might break!`)}else e.provider=ol;return new Promise(function(n,r){t.sendMessageToCallMachine(H({action:`dialout-start`},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return _.apply(this,arguments)})},{key:`startDialIn`,value:(g=L(function*(e){var t=this;if(ad(this._callState,`startDialIn()`),!e||I(e)!==`object`)throw Error(`Error starting dial in: args must be an object`);if(typeof e.displayName!=`string`||e.displayName.length===0)throw Error(`Error starting dial in: displayName is required and must be a non-empty string`);if(e.displayName.length>=200)throw Error(`Error starting dial in: displayName length must be less than 200`);if(e.userId!==void 0&&typeof e.userId!=`string`)throw Error(`Error starting dial in: userId must be a string`);if(e.userId!==void 0&&e.userId.length>36)throw Error(`Error starting dial in: userId length must be less than or equal to 36`);if(e.video!==void 0&&typeof e.video!=`boolean`)throw Error(`Error starting dial in: video must be a boolean`);if(e.sipEndpoint!==void 0&&typeof e.sipEndpoint!=`string`)throw Error(`Error starting dial in: sipEndpoint must be a string`);if(e.codecs!==void 0&&(I(e.codecs)!==`object`||e.codecs===null))throw Error(`Error starting dial in: codecs must be an object`);if(e.permissions!==void 0&&(I(e.permissions)!==`object`||e.permissions===null))throw Error(`Error starting dial in: permissions must be an object`);if(e.provider){if(e.provider!==al&&e.provider!==ol)throw Error(`Error starting dial in: provider must be '${al}' or '${ol}'`)}else e=H(H({},e),{},{provider:ol});return new Promise(function(n,r){t.sendMessageToCallMachine(H({action:`dialin-start`,sipMode:`dial-in`},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return g.apply(this,arguments)})},{key:`stopDialOut`,value:function(e){var t=this;return ad(this._callState,`stopDialOut()`),new Promise(function(n,r){t.sendMessageToCallMachine(H({action:`dialout-stop`},e),function(e){e.error?r(e.error):n(e)})})}},{key:`sipCallTransfer`,value:(h=L(function*(e){var t=this;if(ad(this._callState,`sipCallTransfer()`),!e)throw Error(`sipCallTransfer() requires a sessionId and toEndPoint`);return e.useSipRefer=!1,Dd(e,`sipCallTransfer`),rd(e),new Promise(function(n,r){t.sendMessageToCallMachine(H({action:ul},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return h.apply(this,arguments)})},{key:`sipRefer`,value:(m=L(function*(e){var t=this;if(ad(this._callState,`sipRefer()`),!e)throw Error(`sessionId and toEndPoint are mandatory parameter`);return e.useSipRefer=!0,Dd(e,`sipRefer`),new Promise(function(n,r){t.sendMessageToCallMachine(H({action:ul},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return m.apply(this,arguments)})},{key:`sendDTMF`,value:(p=L(function*(e){var t=this;return ad(this._callState,`sendDTMF()`),function(e){var t=e.sessionId,n=e.tones,r=e.method,i=e.digitDurationMs;if(!t||!n)throw Error(`sessionId and tones are mandatory parameter`);if(typeof t!=`string`||typeof n!=`string`)throw Error(`sessionId and tones should be of string type`);if(n.length>20)throw Error(`tones string must be upto 20 characters`);var a=n.match(/[^0-9A-D*#]/g);if(a&&a[0])throw Error(`${a[0]} is not valid DTMF tone`);if(r&&![`sip-info`,`telephone-event`,`auto`].includes(r))throw Error(`method must be one of 'sip-info', 'telephone-event', or 'auto'`);if(i!==void 0){if(typeof i!=`number`)throw Error(`digitDurationMs must be a number`);if(!Number.isFinite(i)||!Number.isInteger(i))throw Error(`digitDurationMs must be a finite integer number`);if(i<50||i>2e3)throw Error(`digitDurationMs must be between 50ms and 2000ms`)}}(e),e.method=e.method||`auto`,e.digitDurationMs=e.digitDurationMs||500,new Promise(function(n,r){t.sendMessageToCallMachine(H({action:`send-dtmf`},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return p.apply(this,arguments)})},{key:`getNetworkStats`,value:function(){var e=this;return this._callState===`joined-meeting`?new Promise(function(t){e.sendMessageToCallMachine({action:`get-calc-stats`},function(n){t(H(H({},e._network),{},{stats:n.stats}))})}):Promise.resolve(H({stats:{latest:{}}},this._network))}},{key:`testWebsocketConnectivity`,value:(f=L(function*(){var e=this;if(ld(this._testCallInProgress,`testWebsocketConnectivity()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}return new Promise(function(t,n){e.sendMessageToCallMachine({action:`test-websocket-connectivity`},function(e){e.error?n(e.error):t(e.results)})})}),function(){return f.apply(this,arguments)})},{key:`abortTestWebsocketConnectivity`,value:function(){this.sendMessageToCallMachine({action:`abort-test-websocket-connectivity`})}},{key:`_validateVideoTrackForNetworkTests`,value:function(e){return e?e instanceof MediaStreamTrack?!!Cu(e,{isLocalScreenVideo:!1})||(console.error(`Video track is not playable. This test needs a live video track.`),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error(`Missing video track. You must provide a video track in order to run this test.`),!1)}},{key:`testCallQuality`,value:(d=L(function*(){var e=this;fd(),ud(this._callObjectMode,`testCallQuality()`),cd(this._callMachineInitialized,`testCallQuality()`,null,!0),sd(this._callState,this._isPreparingToJoin,`testCallQuality()`);var t=this._testCallAlreadyInProgress,n=function(n){t||(e._testCallInProgress=n)};if(n(!0),this.needsLoad())try{var r=this._callState;yield this.load(),this._callState=r}catch(e){return n(!1),Promise.reject(e)}return new Promise(function(t){e.sendMessageToCallMachine({action:`test-call-quality`,dailyJsVersion:e.properties.dailyJsVersion},function(r){var i=r.results,a=i.result,o=Ln(i,Fu);if(a===`failed`){var s,c=H({},o);(s=o.error)!=null&&s.details?(o.error.details=JSON.parse(o.error.details),c.error=H(H({},c.error),{},{details:H({},c.error.details)}),c.error.details.duringTest=`testCallQuality`):(c.error=c.error?H({},c.error):{},c.error.details={duringTest:`testCallQuality`}),e._maybeSendToSentry(c)}n(!1),t(H({result:a},o))})})}),function(){return d.apply(this,arguments)})},{key:`stopTestCallQuality`,value:function(){this.sendMessageToCallMachine({action:`stop-test-call-quality`})}},{key:`testConnectionQuality`,value:(u=L(function*(e){var t;fl()?(console.warn(`testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead`),t=yield this.testPeerToPeerCallQuality(e)):(console.warn(`testConnectionQuality() is deprecated: use testCallQuality() instead`),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n}),function(e){return u.apply(this,arguments)})},{key:`testPeerToPeerCallQuality`,value:(l=L(function*(e){var t=this;if(ld(this._testCallInProgress,`testPeerToPeerCallQuality()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw Error(`Video track error`);return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise(function(e,n){t.sendMessageToCallMachine({action:`test-p2p-call-quality`,duration:r},function(t){t.error?n(t.error):e(t.results)})})}),function(e){return l.apply(this,arguments)})},{key:`stopTestConnectionQuality`,value:function(){fl()?(console.warn(`stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead`),this.stopTestPeerToPeerCallQuality()):(console.warn(`stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead`),this.stopTestCallQuality())}},{key:`stopTestPeerToPeerCallQuality`,value:function(){this.sendMessageToCallMachine({action:`stop-test-p2p-call-quality`})}},{key:`testNetworkConnectivity`,value:(c=L(function*(e){var t=this;if(ld(this._testCallInProgress,`testNetworkConnectivity()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}if(!this._validateVideoTrackForNetworkTests(e))throw Error(`Video track error`);return this._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise(function(e,n){t.sendMessageToCallMachine({action:`test-network-connectivity`},function(t){t.error?n(t.error):e(t.results)})})}),function(e){return c.apply(this,arguments)})},{key:`abortTestNetworkConnectivity`,value:function(){this.sendMessageToCallMachine({action:`abort-test-network-connectivity`})}},{key:`getCpuLoadStats`,value:function(){var e=this;return new Promise(function(t){e._callState===`joined-meeting`?e.sendMessageToCallMachine({action:`get-cpu-load-stats`},function(e){t(e.cpuStats)}):t({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})})}},{key:`_validateEncodingLayerHasValidProperties`,value:function(e){if(!(Object.keys(e)?.length>0))throw Error(`Empty encoding is not allowed. At least one of these valid keys should be specified:`+Object.values(qu))}},{key:`_validateVideoSendSettings`,value:function(e,t){var n=e===`screenVideo`?[`default-screen-video`,`detail-optimized`,`motion-optimized`,`motion-and-detail-balanced`]:[`default-video`,`bandwidth-optimized`,`bandwidth-and-quality-balanced`,`quality-optimized`,`adaptive-2-layers`,`adaptive-3-layers`],r=`Video send settings should be either an object or one of the supported presets: ${n.join()}`;if(typeof t==`string`){if(!n.includes(t))throw Error(r)}else{if(I(t)!==`object`)throw Error(r);if(!t.maxQuality&&!t.encodings&&t.allowAdaptiveLayers===void 0)throw Error(`Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute`);if(t.maxQuality&&[`low`,`medium`,`high`].indexOf(t.maxQuality)===-1)throw Error(`maxQuality must be either low, medium or high`);if(t.encodings){var i=!1;switch(Object.keys(t.encodings).length){case 1:i=!t.encodings.low;break;case 2:i=!t.encodings.low||!t.encodings.medium;break;case 3:i=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:i=!0}if(i)throw Error(`Encodings must be defined as: low, low and medium, or low, medium and high.`);t.encodings.low&&this._validateEncodingLayerHasValidProperties(t.encodings.low),t.encodings.medium&&this._validateEncodingLayerHasValidProperties(t.encodings.medium),t.encodings.high&&this._validateEncodingLayerHasValidProperties(t.encodings.high)}}}},{key:`validateUpdateSendSettings`,value:function(e){var t=this;if(!e||Object.keys(e).length===0)throw Error(`Send settings must contain at least information for one track!`);Object.entries(e).forEach(function(e){var n=Xn(e,2),r=n[0],i=n[1];t._validateVideoSendSettings(r,i)})}},{key:`updateSendSettings`,value:function(e){var t=this;return this.validateUpdateSendSettings(e),this.needsLoad()?(this._preloadCache.sendSettings=e,{sendSettings:this._preloadCache.sendSettings}):new Promise(function(n,r){t.sendMessageToCallMachine({action:`update-send-settings`,sendSettings:e},function(e){e.error?r(e.error):n(e.sendSettings)})})}},{key:`getSendSettings`,value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:`getLocalAudioLevel`,value:function(){return this._localAudioLevel}},{key:`getRemoteParticipantsAudioLevel`,value:function(){return this._remoteParticipantsAudioLevel}},{key:`getActiveSpeaker`,value:function(){return fd(),this._activeSpeaker}},{key:`setActiveSpeakerMode`,value:function(e){return fd(),this.sendMessageToCallMachine({action:`set-active-speaker-mode`,enabled:e}),this}},{key:`activeSpeakerMode`,value:function(){return fd(),this._activeSpeakerMode}},{key:`subscribeToTracksAutomatically`,value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:`setSubscribeToTracksAutomatically`,value:function(e){return ad(this._callState,`setSubscribeToTracksAutomatically()`,`Use the subscribeToTracksAutomatically configuration property.`),this._preloadCache.subscribeToTracksAutomatically=e,this.sendMessageToCallMachine({action:`daily-method-subscribe-to-tracks-automatically`,enabled:e}),this}},{key:`enumerateDevices`,value:(s=L(function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return Tl()===`Firefox`&&El().major>115&&El().major<123&&(t=t.filter(function(e){return e.kind!==`audiooutput`})),{devices:t.map(function(e){var t=JSON.parse(JSON.stringify(e));if(!fl()&&e.kind===`videoinput`&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(r==null||(n=r.facingMode)==null?void 0:n.length)>=1?r.facingMode[0]:void 0}return t})}}return new Promise(function(t){e.sendMessageToCallMachine({action:`enumerate-devices`},function(e){t({devices:e.devices})})})}),function(){return s.apply(this,arguments)})},{key:`sendAppMessage`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`*`;if(ad(this._callState,`sendAppMessage()`),JSON.stringify(e).length>this._maxAppMessageSize)throw Error(`Message data too large. Max size is `+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:`app-msg`,data:e,to:t}),this}},{key:`addFakeParticipant`,value:function(e){return fd(),ad(this._callState,`addFakeParticipant()`),this.sendMessageToCallMachine(H({action:`add-fake-participant`},e)),this}},{key:`setShowNamesMode`,value:function(e){return dd(this._callObjectMode,`setShowNamesMode()`),fd(),e&&e!==`always`&&e!==`never`?(console.error(`setShowNamesMode argument should be "always", "never", or false`),this):(this.sendMessageToCallMachine({action:`set-show-names`,mode:e}),this)}},{key:`setShowLocalVideo`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return dd(this._callObjectMode,`setShowLocalVideo()`),fd(),ad(this._callState,`setShowLocalVideo()`),typeof e==`boolean`?(this.sendMessageToCallMachine({action:`set-show-local-video`,show:e}),this._showLocalVideo=e,this):(console.error(`setShowLocalVideo only accepts a boolean value`),this)}},{key:`showLocalVideo`,value:function(){return dd(this._callObjectMode,`showLocalVideo()`),fd(),this._showLocalVideo}},{key:`setShowParticipantsBar`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return dd(this._callObjectMode,`setShowParticipantsBar()`),fd(),ad(this._callState,`setShowParticipantsBar()`),typeof e==`boolean`?(this.sendMessageToCallMachine({action:`set-show-participants-bar`,show:e}),this._showParticipantsBar=e,this):(console.error(`setShowParticipantsBar only accepts a boolean value`),this)}},{key:`showParticipantsBar`,value:function(){return dd(this._callObjectMode,`showParticipantsBar()`),fd(),this._showParticipantsBar}},{key:`customIntegrations`,value:function(){return fd(),dd(this._callObjectMode,`customIntegrations()`),this._customIntegrations}},{key:`setCustomIntegrations`,value:function(e){return fd(),dd(this._callObjectMode,`setCustomIntegrations()`),ad(this._callState,`setCustomIntegrations()`),Td(e)?(this.sendMessageToCallMachine({action:`set-custom-integrations`,integrations:e}),this._customIntegrations=e,this):this}},{key:`startCustomIntegrations`,value:function(e){var t=this;if(fd(),dd(this._callObjectMode,`startCustomIntegrations()`),ad(this._callState,`startCustomIntegrations()`),Array.isArray(e)&&e.some(function(e){return typeof e!=`string`})||!Array.isArray(e)&&typeof e!=`string`)return console.error(`startCustomIntegrations() only accepts string | string[]`),this;var n=typeof e==`string`?[e]:e,r=n.filter(function(e){return!(e in t._customIntegrations)});return r.length?(console.error(`Can't find custom integration(s): "${r.join(`, `)}"`),this):(this.sendMessageToCallMachine({action:`start-custom-integrations`,ids:n}),this)}},{key:`stopCustomIntegrations`,value:function(e){var t=this;if(fd(),dd(this._callObjectMode,`stopCustomIntegrations()`),ad(this._callState,`stopCustomIntegrations()`),Array.isArray(e)&&e.some(function(e){return typeof e!=`string`})||!Array.isArray(e)&&typeof e!=`string`)return console.error(`stopCustomIntegrations() only accepts string | string[]`),this;var n=typeof e==`string`?[e]:e,r=n.filter(function(e){return!(e in t._customIntegrations)});return r.length?(console.error(`Can't find custom integration(s): "${r.join(`, `)}"`),this):(this.sendMessageToCallMachine({action:`stop-custom-integrations`,ids:n}),this)}},{key:`customTrayButtons`,value:function(){return dd(this._callObjectMode,`customTrayButtons()`),fd(),this._customTrayButtons}},{key:`updateCustomTrayButtons`,value:function(e){return dd(this._callObjectMode,`updateCustomTrayButtons()`),fd(),ad(this._callState,`updateCustomTrayButtons()`),wd(e)?(this.sendMessageToCallMachine({action:`update-custom-tray-buttons`,btns:e}),this._customTrayButtons=e,this):(console.error(`updateCustomTrayButtons only accepts a dictionary of the type ${JSON.stringify(Xu)}`),this)}},{key:`theme`,value:function(){return dd(this._callObjectMode,`theme()`),this.properties.theme}},{key:`setTheme`,value:function(e){var t=this;return dd(this._callObjectMode,`setTheme()`),new Promise(function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=H({},e),t.sendMessageToCallMachine({action:`set-theme`,theme:t.properties.theme});try{t.emitDailyJSEvent({action:$s,theme:t.properties.theme})}catch(e){console.log(`could not emit 'theme-updated'`,e)}n(t.properties.theme)}catch(e){r(e)}})}},{key:`requestFullscreen`,value:(o=L(function*(){if(fd(),this._iframe&&!document.fullscreenElement&&hl())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log(`could not make video call fullscreen`,e)}}),function(){return o.apply(this,arguments)})},{key:`exitFullscreen`,value:function(){fd(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:`getSidebarView`,value:(a=L(function*(){var e=this;return this._callObjectMode?(console.error(`getSidebarView is not available in callObject mode`),Promise.resolve(null)):new Promise(function(t){e.sendMessageToCallMachine({action:`get-sidebar-view`},function(e){t(e.view)})})}),function(){return a.apply(this,arguments)})},{key:`setSidebarView`,value:function(e){return this._callObjectMode?(console.error(`setSidebarView is not available in callObject mode`),this):(this.sendMessageToCallMachine({action:`set-sidebar-view`,view:e}),this)}},{key:`room`,value:(i=L(function*(){var e=this,t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,n=t===void 0||t;return this._accessState.access===`unknown`||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise(function(t){e.sendMessageToCallMachine({action:`lib-room-info`,includeRoomConfigDefaults:n},function(e){delete e.action,delete e.callbackStamp,t(e)})})}),function(){return i.apply(this,arguments)})},{key:`geo`,value:(r=L(function*(){return console.error(`The geo() function is no longer supported. Geographical decisions now depend upon domain and room settings.`),{current:``}}),function(){return r.apply(this,arguments)})},{key:`setNetworkTopology`,value:(n=L(function*(e){var t=this;return fd(),ad(this._callState,`setNetworkTopology()`),new Promise(function(n,r){t.sendMessageToCallMachine({action:`set-network-topology`,opts:e},function(e){e.error?r({error:e.error}):n({workerId:e.workerId})})})}),function(e){return n.apply(this,arguments)})},{key:`getNetworkTopology`,value:(t=L(function*(){var e=this;return new Promise(function(t,n){e.needsLoad()&&t({topology:`none`}),e.sendMessageToCallMachine({action:`get-network-topology`},function(e){e.error?n({error:e.error}):t({topology:e.topology})})})}),function(){return t.apply(this,arguments)})},{key:`setPlayNewParticipantSound`,value:function(e){if(fd(),typeof e!=`number`&&!0!==e&&!1!==e)throw Error(`argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ${e}`);this.sendMessageToCallMachine({action:`daily-method-set-play-ding`,arg:e})}},{key:`on`,value:function(e,t){return tr.prototype.on.call(this,e,t)}},{key:`once`,value:function(e,t){return tr.prototype.once.call(this,e,t)}},{key:`off`,value:function(e,t){return tr.prototype.off.call(this,e,t)}},{key:`validateProperties`,value:function(e){var t,n;if(e!=null&&(t=e.dailyConfig)!=null&&t.userMediaAudioConstraints){var r;fl()||console.warn(`userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.`);var i=e.inputSettings||{};i.audio=e.inputSettings?.audio||{},i.audio.settings=((r=e.inputSettings)==null||(r=r.audio)==null?void 0:r.settings)||{},i.audio.settings=H(H({},i.audio.settings),e.dailyConfig.userMediaAudioConstraints),e.inputSettings=i,delete e.dailyConfig.userMediaAudioConstraints}if(e!=null&&(n=e.dailyConfig)!=null&&n.userMediaVideoConstraints){var a;fl()||console.warn(`userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.`);var o=e.inputSettings||{};o.video=e.inputSettings?.video||{},o.video.settings=((a=e.inputSettings)==null||(a=a.video)==null?void 0:a.settings)||{},o.video.settings=H(H({},o.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=o,delete e.dailyConfig.userMediaVideoConstraints}for(var s in e)if(ed[s]){if(ed[s].validate&&!ed[s].validate(e[s],this))throw Error(`property '${s}': ${ed[s].help}`)}else console.warn(`Ignoring unrecognized property '${s}'`),delete e[s]}},{key:`assembleMeetingUrl`,value:function(){var e,t=H(H({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(e=this.properties.dailyConfig)!=null&&e.proxyUrl?encodeURIComponent(this.properties.dailyConfig?.proxyUrl):void 0}),n=t.url.match(/\?/)?`&`:`?`;return t.url+n+Object.keys(ed).filter(function(e){return ed[e].queryString&&t[e]!==void 0}).map(function(e){return`${ed[e].queryString}=${t[e]}`}).join(`&`)}},{key:`needsLoad`,value:function(){return[`new`,Hs,Ks,qs].includes(this._callState)}},{key:`sendMessageToCallMachine`,value:function(e,t){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error(`Use after destroy`);this._messageChannel.sendMessageToCallMachine(e,t,this.callClientId,this._iframe)}},{key:`forwardPackagedMessageToCallMachine`,value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:`addListenerForPackagedMessagesFromCallMachine`,value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:`removeListenerForPackagedMessagesFromCallMachine`,value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:`handleMessageFromCallMachine`,value:function(e){switch(e.action){case Zs:this.sendMessageToCallMachine(H({action:Qs},this.properties));break;case`call-machine-initialized`:this._callMachineInitialized=!0;var t=br(),n={action:el,level:`log`,code:1011,stats:{event:`bundle load`,time:this._bundleLoadTime===`no-op`?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime===`no-op`,url:Tr(this.properties.dailyConfig),resolvedBaseDomain:t,failedOver:t!=null&&t!==`daily.co`}};this.sendMessageToCallMachine(n),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case tc:this._loadedCallback&&=(this._loadedCallback(),null),this.emitDailyJSEvent(e);break;case ac:var r=H({},e);delete r.internal,this._maxAppMessageSize=e.internal?._maxAppMessageSize||Yc,this._joinedCallback&&=(this._joinedCallback(e.participants),null),this.emitDailyJSEvent(r);break;case sc:case cc:if(this._callState===`left-meeting`)return;if(e.participant&&e.participant.session_id){var i=e.participant.local?`local`:e.participant.session_id;if(this._callObjectMode){var a=this._callMachine().store;su(e.participant,a),cu(e.participant,a),uu(e.participant,this._participants[i],a)}try{this.maybeParticipantTracksStopped(this._participants[i],e.participant),this.maybeParticipantTracksStarted(this._participants[i],e.participant),this.maybeEventRecordingStopped(this._participants[i],e.participant),this.maybeEventRecordingStarted(this._participants[i],e.participant)}catch(e){console.error(`track events error`,e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[i])||(this._participants[i]=H({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case lc:if(e.participant&&e.participant.session_id){var o=this._participants[e.participant.session_id];o&&this.maybeParticipantTracksStopped(o,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case uc:ir(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case dc:var s={access:e.access};e.awaitingAccess&&(s.awaitingAccess=e.awaitingAccess),ir(this._accessState,s)||(this._accessState=s,this.emitDailyJSEvent(e));break;case fc:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var c=H(H({},e),{},{action:`meeting-session-updated`});this.emitDailyJSEvent(c)}break;case Jc:this._handleFatalError(e);break;case oc:this._callState!==`error`&&this._updateCallState(`left-meeting`),this.resetMeetingDependentVars(),this._resolveLeave&&=(this._resolveLeave(),null),this.emitDailyJSEvent(e);break;case`selected-devices-updated`:e.devices&&this.emitDailyJSEvent(e);break;case Ic:var l=e.state,u=e.threshold,d=e.quality,f=l.state,p=l.reasons;f===this._network.networkState&&ir(p,this._network.networkStateReasons)&&u===this._network.threshold&&d===this._network.quality||(this._network.networkState=f,this._network.networkStateReasons=p,this._network.quality=d,this._network.threshold=u,e.networkState=f,p.length&&(e.networkStateReasons=p),delete e.state,this.emitDailyJSEvent(e));break;case Rc:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case zc:e&&e.faceCounts!==void 0&&this.emitDailyJSEvent(e);break;case Pc:var m=e.activeSpeaker;this._activeSpeaker.peerId!==m.peerId&&(this._activeSpeaker.peerId=m.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case`show-local-video-changed`:if(this._callObjectMode)return;var h=e.show;this._showLocalVideo=h,this.emitDailyJSEvent({action:e.action,show:h});break;case Fc:var g=e.enabled;this._activeSpeakerMode!==g&&(this._activeSpeakerMode=g,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case mc:case hc:case gc:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case Gc:ir(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case Kc:this._maybeUpdateInputSettings(e.inputSettings);break;case`send-settings-updated`:ir(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case`local-audio-level`:this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case`remote-participants-audio-level`:this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case Oc:var _=e.session_id;this._rmpPlayerState[_]=e.playerState,this.emitDailyJSEvent(e);break;case Ac:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case kc:var v=e.session_id,y=this._rmpPlayerState[v];y&&this.compareEqualForRMPUpdateEvent(y,e.remoteMediaPlayerState)||(this._rmpPlayerState[v]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case`custom-button-click`:case`sidebar-view-changed`:case`pip-started`:case`pip-stopped`:this.emitDailyJSEvent(e);break;case pc:var b=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=Ad(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||b)&&this.emitDailyJSEvent(e);break;case jc:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case Mc:case Nc:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case bc:case xc:case Sc:case Cc:case wc:case _c:case vc:case yc:case nc:case rc:case Ec:case Dc:case`test-completed`:case Lc:case Tc:case Bc:case Vc:case Hc:case Uc:case qc:case Wc:case`dialin-ready`:case`dialin-connected`:case`dialin-error`:case`dialin-stopped`:case`dialin-warning`:case`dialout-connected`:case`dtmf-event`:case`dialout-answered`:case`dialout-error`:case`dialout-stopped`:case`dialout-warning`:this.emitDailyJSEvent(e);break;case`request-fullscreen`:this.requestFullscreen();break;case`request-exit-fullscreen`:this.exitFullscreen()}}},{key:`maybeEventRecordingStopped`,value:function(e,t){var n=`record`;e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:`recording-stopped`}))}},{key:`maybeEventRecordingStarted`,value:function(e,t){var n=`record`;e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:`recording-started`}))}},{key:`_trackStatePlayable`,value:function(e){return!(!e||e.state!==`playable`)}},{key:`_trackChanged`,value:function(e,t){return e?.id!==t?.id}},{key:`maybeEventTrackStopped`,value:function(e,t,n){var r=t?.tracks[e]??null,i=n?.tracks[e]??null,a=r?.track;if(a){var o=this._trackStatePlayable(r),s=this._trackStatePlayable(i),c=this._trackChanged(a,i?.track);o&&(s&&!c||this.emitDailyJSEvent({action:`track-stopped`,track:a,participant:n??t,type:e}))}}},{key:`maybeEventTrackStarted`,value:function(e,t,n){var r=t?.tracks[e]??null,i=n?.tracks[e]??null,a=i?.track;if(a){var o=this._trackStatePlayable(r),s=this._trackStatePlayable(i),c=this._trackChanged(r?.track,a);s&&(o&&!c||this.emitDailyJSEvent({action:`track-started`,track:a,participant:n,type:e}))}}},{key:`maybeParticipantTracksStopped`,value:function(e,t){if(e)for(var n in e.tracks)this.maybeEventTrackStopped(n,e,t)}},{key:`maybeParticipantTracksStarted`,value:function(e,t){if(t)for(var n in t.tracks)this.maybeEventTrackStarted(n,e,t)}},{key:`compareEqualForRMPUpdateEvent`,value:function(e,t){return e.state===t.state&&e.settings?.volume===t.settings?.volume}},{key:`emitDailyJSEvent`,value:function(e){try{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log(`could not emit`,e,t)}}},{key:`compareEqualForParticipantUpdateEvent`,value:function(e,t){return!!ir(e,t)&&(!e.videoTrack||!t.videoTrack||e.videoTrack.id===t.videoTrack.id&&e.videoTrack.muted===t.videoTrack.muted&&e.videoTrack.enabled===t.videoTrack.enabled)&&(!e.audioTrack||!t.audioTrack||e.audioTrack.id===t.audioTrack.id&&e.audioTrack.muted===t.audioTrack.muted&&e.audioTrack.enabled===t.audioTrack.enabled)}},{key:`nativeUtils`,value:function(){return fl()?typeof DailyNativeUtils>`u`?(console.warn(`in React Native, DailyNativeUtils is expected to be available`),null):DailyNativeUtils:null}},{key:`updateIsPreparingToJoin`,value:function(e){this._updateCallState(this._callState,e)}},{key:`_updateCallState`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=this._callState===Gs;this.updateShowAndroidOngoingMeetingNotification(i);var a=od(n,r),o=od(this._callState,this._isPreparingToJoin);a!==o&&(this.updateKeepDeviceAwake(o),this.updateDeviceAudioMode(o),this.updateNoOpRecordingEnsuringBackgroundContinuity(o))}}},{key:`_handleFatalError`,value:function(e){var t;this._iframe&&!e.preserveIframe&&(this._iframe.src=``),this._updateCallState(qs),this.resetMeetingDependentVars(),this._loadedCallback&&=(this._loadedCallback(e.errorMsg),null),e.preserveIframe;var n=Ln(e,Iu);typeof(n==null||(t=n.error)==null?void 0:t.details)==`string`&&(n.error.details=JSON.parse(n.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&=(this._joinedCallback(null,n),null),this.emitDailyJSEvent(n)}},{key:`resetMeetingDependentVars`,value:function(){this._participants={},this._participantCounts=Gu,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Js},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Ad(Wu,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=Yc,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:`updateKeepDeviceAwake`,value:function(e){fl()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:`updateDeviceAudioMode`,value:function(e){if(fl()&&!this.disableReactNativeAutoDeviceManagement(`audio`)){var t=e?this._nativeInCallAudioMode:`idle`;this.nativeUtils().setAudioMode(t)}}},{key:`updateShowAndroidOngoingMeetingNotification`,value:function(e){if(fl()&&this.nativeUtils().setShowOngoingMeetingNotification){var t,n,r,i;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var a=this.properties.reactNativeConfig.androidInCallNotification;t=a.title,n=a.subtitle,r=a.iconName,i=a.disableForCustomOverride}i&&(e=!1),this.nativeUtils().setShowOngoingMeetingNotification(e,t,n,r,this.callClientId)}}},{key:`updateNoOpRecordingEnsuringBackgroundContinuity`,value:function(e){fl()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:`toggleParticipantAudioBasedOnNativeAudioFocus`,value:function(){var e;if(fl()){var t=(e=this._callMachine())==null||(e=e.store)==null?void 0:e.getState();for(var n in t?.streams){var r=t.streams[n];r&&r.pendingTrack&&r.pendingTrack.kind===`audio`&&(r.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:`disableReactNativeAutoDeviceManagement`,value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:`absoluteUrl`,value:function(e){if(e!==void 0){var t=document.createElement(`a`);return t.href=e,t.href}}},{key:`sayHello`,value:function(){var e=`hello, world.`;return console.log(e),e}},{key:`_logUseAfterDestroy`,value:function(){var e=Object.values(Vu)[0];if(this.needsLoad()){if(e&&!e.needsLoad()){var t={action:el,level:`error`,code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.")}else{var n={action:el,level:`error`,code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:`_logDuplicateInstanceAttempt`,value:function(){for(var e=0,t=Object.values(Vu);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:el,level:`warn`,code:this.allowMultipleCallInstances?9993:9992}),n._delayDuplicateInstanceLog=!1):n._delayDuplicateInstanceLog=!0}}},{key:`_maybeSendToSentry`,value:function(t){var n,r,i,a;if(!((n=t.error)!=null&&n.type&&(![`connection-error`,`end-of-life`,`no-room`].includes(t.error.type)||t.error.type===`no-room`&&t.error.msg.includes(`deleted`)))){var o=(r=this.properties)!=null&&r.url?new URL(this.properties.url):void 0,s=`production`;o&&o.host.includes(`.staging.daily`)&&(s=`staging`);var c,l,u,d,f,p=new is({dsn:`https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844`,transport:ys,stackParser:Es,integrations:function(e){let t=[xo(),yo(),js(),ks(),Ls(),Vs(),Ao(),Bs()];return!1!==e.autoSessionTracking&&t.push(Is()),t}({}).filter(function(e){return![`BrowserApiErrors`,`Breadcrumbs`,`GlobalHandlers`].includes(e.name)}),environment:s}),m=new Zi;if(m.setClient(p),p.init(),(i=this._participants)!=null&&(i=i.local)!=null&&i.session_id&&m.setExtra(`sessionId`,this._participants.local.session_id),this.properties){var h=H({},this.properties);h.userName=h.userName?`[Filtered]`:void 0,h.userData=h.userData?`[Filtered]`:void 0,h.token=h.token?`[Filtered]`:void 0,m.setExtra(`properties`,h)}if(o){var g=o.searchParams.get(`domain`);if(!g){var _=o.host.match(/(.*?)\./);g=_&&_[1]||``}g&&m.setTag(`domain`,g)}t.error&&(m.setTag(`fatalErrorType`,t.error.type),m.setExtra(`errorDetails`,t.error.details),(c=t.error.details)!=null&&c.uri&&m.setTag(`serverAddress`,t.error.details.uri),(l=t.error.details)!=null&&l.workerGroup&&m.setTag(`workerGroup`,t.error.details.workerGroup),(u=t.error.details)!=null&&u.geoGroup&&m.setTag(`geoGroup`,t.error.details.geoGroup),(d=t.error.details)!=null&&d.on&&m.setTag(`connectionAttempt`,t.error.details.on),(f=t.error.details)!=null&&f.bundleUrl&&(m.setTag(`bundleUrl`,t.error.details.bundleUrl),m.setTag(`bundleError`,t.error.details.sourceError.type))),m.setTags({callMode:this._callObjectMode?fl()?`reactNative`:(a=this.properties)!=null&&(a=a.dailyConfig)!=null&&(a=a.callMode)!=null&&a.includes(`prebuilt`)?this.properties.dailyConfig.callMode:`custom`:`prebuilt-frame`,version:e.version()});var v=t.error?.msg||t.errorMsg;m.captureException(Error(v))}}},{key:`_callMachine`,value:function(){var e;return(e=window._daily)==null||(e=e.instances)==null||(e=e[this.callClientId])==null?void 0:e.callMachine}},{key:`_maybeUpdateInputSettings`,value:function(e){if(!ir(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();ir(t,n)||this.emitDailyJSEvent({action:`input-settings-updated`,inputSettings:n})}}}],[{key:`supportedBrowser`,value:function(){if(fl())return{supported:!0,mobile:!0,name:`React Native`,version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=mr.getParser(dl());return{supported:!!Sl(),mobile:e.getPlatformType()===`mobile`,name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!hl(),supportsScreenShare:!!ml(),supportsSfu:!!Sl(),supportsVideoProcessing:bl(),supportsAudioProcessing:xl()}}},{key:`version`,value:function(){return`0.92.2`}},{key:`createCallObject`,value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.layout=`none`,new e(null,t)}},{key:`wrap`,value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(fd(),!t||!t.contentWindow||typeof t.src!=`string`)throw Error(`DailyIframe::Wrap needs an iframe-like first argument`);return n.layout||=n.customLayout?`custom-v1`:`browser`,new e(t,n)}},{key:`createFrame`,value:function(t,n){var r,i;fd(),t&&n?(r=t,i=n):t&&t.append?(r=t,i={}):(r=document.body,i=t||{});var a=i.iframeStyle;a||=r===document.body?{position:`fixed`,border:`1px solid black`,backgroundColor:`white`,width:`375px`,height:`450px`,right:`1em`,bottom:`1em`}:{border:0,width:`100%`,height:`100%`};var o=document.createElement(`iframe`);o.allow=window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?`microphone, camera`:`microphone; camera; autoplay; display-capture; screen-wake-lock; compute-pressure;`,o.style.visibility=`hidden`,r.appendChild(o),o.style.visibility=null,Object.keys(a).forEach(function(e){return o.style[e]=a[e]}),i.layout||(i.customLayout?i.layout=`custom-v1`:i.layout=`browser`);try{return new e(o,i)}catch(e){throw r.removeChild(o),e}}},{key:`createTransparentFrame`,value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fd();var n=document.createElement(`iframe`);return n.allow=`microphone; camera; autoplay`,n.style.cssText=`
46
+ { settings?: {state: "play"|"pause"} }`),e}return new Promise(function(e,i){t.sendMessageToCallMachine({action:`daily-method-update-remote-media-player`,session_id:n,settings:r},function(t){t.error?i({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})})})}),function(e){return v.apply(this,arguments)})},{key:`startTranscription`,value:function(e){ef(this._callState,`startTranscription()`),this.sendMessageToCallMachine(W({action:`daily-method-start-transcription`},e))}},{key:`updateTranscription`,value:function(e){if(ef(this._callState,`updateTranscription()`),!e)throw Error(`updateTranscription Error: options is mandatory`);if(R(e)!==`object`)throw Error(`updateTranscription Error: options must be object type`);if(e.participants&&!Array.isArray(e.participants))throw Error(`updateTranscription Error: participants must be an array`);this.sendMessageToCallMachine(W({action:`daily-method-update-transcription`},e))}},{key:`stopTranscription`,value:function(e){if(ef(this._callState,`stopTranscription()`),e&&R(e)!==`object`)throw Error(`stopTranscription Error: options must be object type`);if(e&&!e.instanceId)throw Error(`"instanceId" not provided`);this.sendMessageToCallMachine(W({action:`daily-method-stop-transcription`},e))}},{key:`startDialOut`,value:(_=z(function*(e){var t=this;ef(this._callState,`startDialOut()`);var n=function(e){if(e){if(!Array.isArray(e))throw Error(`Error starting dial out: audio codec must be an array`);if(e.length<=0)throw Error(`Error starting dial out: audio codec array specified but empty`);e.forEach(function(e){if(typeof e!=`string`)throw Error(`Error starting dial out: audio codec must be a string`);if(e!==`OPUS`&&e!==`PCMU`&&e!==`PCMA`&&e!==`G722`)throw Error(`Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722`)})}};if(!e.sipUri&&!e.phoneNumber)throw Error(`Error starting dial out: either a sip uri or phone number must be provided`);if(e.sipUri&&e.phoneNumber)throw Error(`Error starting dial out: only one of sip uri or phone number must be provided`);if(e.sipUri){if(typeof e.sipUri!=`string`)throw Error(`Error starting dial out: sipUri must be a string`);if(!e.sipUri.startsWith(`sip:`))throw Error(`Error starting dial out: Invalid SIP URI, must start with 'sip:'`);if(e.video&&typeof e.video!=`boolean`)throw Error(`Error starting dial out: video must be a boolean value`);if(e.videoSettings!==void 0){if(R(e.videoSettings)!==`object`||e.videoSettings===null)throw Error(`Error starting dial out: videoSettings must be an object`);if(!e.video)throw Error(`Error starting dial out: videoSettings provided but video is not enabled`);var r=e.videoSettings;if(r.width!==void 0){if(!Number.isInteger(r.width)||r.width<=0)throw Error(`Error starting dial out: videoSettings.width must be a positive integer`);if(r.width>1280)throw Error(`Error starting dial out: videoSettings.width must be less than or equal to 1280`)}if(r.height!==void 0){if(!Number.isInteger(r.height)||r.height<=0)throw Error(`Error starting dial out: videoSettings.height must be a positive integer`);if(r.height>720)throw Error(`Error starting dial out: videoSettings.height must be less than or equal to 720`)}if(r.fps!==void 0){if(!Number.isInteger(r.fps)||r.fps<=0)throw Error(`Error starting dial out: videoSettings.fps must be a positive integer`);if(r.fps>30)throw Error(`Error starting dial out: videoSettings.fps must be less than or equal to 30`)}if(r.videoBitrate!==void 0){if(!Number.isInteger(r.videoBitrate)||r.videoBitrate<=0)throw Error(`Error starting dial out: videoSettings.videoBitrate must be a positive integer`);if(r.videoBitrate>1e3)throw Error(`Error starting dial out: videoSettings.videoBitrate must be less than or equal to 1000 kbps`)}}(function(e){if(e&&(n(e.audio),e.video)){if(!Array.isArray(e.video))throw Error(`Error starting dial out: video codec must be an array`);if(e.video.length<=0)throw Error(`Error starting dial out: video codec array specified but empty`);e.video.forEach(function(e){if(typeof e!=`string`)throw Error(`Error starting dial out: video codec must be a string`);if(e!==`H264`&&e!==`VP8`)throw Error(`Error starting dial out: video codec must be H264 or VP8`)})}})(e.codecs)}if(e.phoneNumber){if(typeof e.phoneNumber!=`string`)throw Error(`Error starting dial out: phoneNumber must be a string`);if(!/^\+\d{1,}$/.test(e.phoneNumber))throw Error(`Error starting dial out: Invalid phone number, must be valid phone number as per E.164`);e.codecs&&n(e.codecs.audio)}if(e.callerId){if(typeof e.callerId!=`string`)throw Error(`Error starting dial out: callerId must be a string`);if(e.sipUri)throw Error(`Error starting dial out: callerId not allowed with sipUri`)}if(e.displayName){if(typeof e.displayName!=`string`)throw Error(`Error starting dial out: displayName must be a string`);if(e.displayName.length>=200)throw Error(`Error starting dial out: displayName length must be less than 200`)}if(e.userId){if(typeof e.userId!=`string`)throw Error(`Error starting dial out: userId must be a string`);if(e.userId.length>36)throw Error(`Error starting dial out: userId length must be less than or equal to 36`)}if(Qd(e),e.permissions&&e.permissions.canReceive){var i=Gr(Od.validateJSONObject(e.permissions.canReceive),2),a=i[0],o=i[1];if(!a)throw Error(o)}if(e.provider){if(e.provider!==eu&&e.provider!==tu)throw Error(`Error: provider can be set only to '${eu}' or '${tu}', got: ${e.provider}`);if(e.phoneNumber)throw Error(`Error starting dial out: provider valid only for sipUri, not phoneNumber`);e.provider===eu&&console.warn(`(pre-beta) provider=${eu} is currently in pre-beta, things might break!`)}else e.provider=tu;return new Promise(function(n,r){t.sendMessageToCallMachine(W({action:`dialout-start`},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return _.apply(this,arguments)})},{key:`startDialIn`,value:(g=z(function*(e){var t=this;if(ef(this._callState,`startDialIn()`),!e||R(e)!==`object`)throw Error(`Error starting dial in: args must be an object`);if(typeof e.displayName!=`string`||e.displayName.length===0)throw Error(`Error starting dial in: displayName is required and must be a non-empty string`);if(e.displayName.length>=200)throw Error(`Error starting dial in: displayName length must be less than 200`);if(e.userId!==void 0&&typeof e.userId!=`string`)throw Error(`Error starting dial in: userId must be a string`);if(e.userId!==void 0&&e.userId.length>36)throw Error(`Error starting dial in: userId length must be less than or equal to 36`);if(e.video!==void 0&&typeof e.video!=`boolean`)throw Error(`Error starting dial in: video must be a boolean`);if(e.sipEndpoint!==void 0&&typeof e.sipEndpoint!=`string`)throw Error(`Error starting dial in: sipEndpoint must be a string`);if(e.codecs!==void 0&&(R(e.codecs)!==`object`||e.codecs===null))throw Error(`Error starting dial in: codecs must be an object`);if(e.permissions!==void 0&&(R(e.permissions)!==`object`||e.permissions===null))throw Error(`Error starting dial in: permissions must be an object`);if(e.provider){if(e.provider!==eu&&e.provider!==tu)throw Error(`Error starting dial in: provider must be '${eu}' or '${tu}'`)}else e=W(W({},e),{},{provider:tu});return new Promise(function(n,r){t.sendMessageToCallMachine(W({action:`dialin-start`,sipMode:`dial-in`},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return g.apply(this,arguments)})},{key:`stopDialOut`,value:function(e){var t=this;return ef(this._callState,`stopDialOut()`),new Promise(function(n,r){t.sendMessageToCallMachine(W({action:`dialout-stop`},e),function(e){e.error?r(e.error):n(e)})})}},{key:`sipCallTransfer`,value:(h=z(function*(e){var t=this;if(ef(this._callState,`sipCallTransfer()`),!e)throw Error(`sipCallTransfer() requires a sessionId and toEndPoint`);return e.useSipRefer=!1,Cf(e,`sipCallTransfer`),Qd(e),new Promise(function(n,r){t.sendMessageToCallMachine(W({action:au},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return h.apply(this,arguments)})},{key:`sipRefer`,value:(m=z(function*(e){var t=this;if(ef(this._callState,`sipRefer()`),!e)throw Error(`sessionId and toEndPoint are mandatory parameter`);return e.useSipRefer=!0,Cf(e,`sipRefer`),new Promise(function(n,r){t.sendMessageToCallMachine(W({action:au},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return m.apply(this,arguments)})},{key:`sendDTMF`,value:(p=z(function*(e){var t=this;return ef(this._callState,`sendDTMF()`),function(e){var t=e.sessionId,n=e.tones,r=e.method,i=e.digitDurationMs;if(!t||!n)throw Error(`sessionId and tones are mandatory parameter`);if(typeof t!=`string`||typeof n!=`string`)throw Error(`sessionId and tones should be of string type`);if(n.length>20)throw Error(`tones string must be upto 20 characters`);var a=n.match(/[^0-9A-D*#]/g);if(a&&a[0])throw Error(`${a[0]} is not valid DTMF tone`);if(r&&![`sip-info`,`telephone-event`,`auto`].includes(r))throw Error(`method must be one of 'sip-info', 'telephone-event', or 'auto'`);if(i!==void 0){if(typeof i!=`number`)throw Error(`digitDurationMs must be a number`);if(!Number.isFinite(i)||!Number.isInteger(i))throw Error(`digitDurationMs must be a finite integer number`);if(i<50||i>2e3)throw Error(`digitDurationMs must be between 50ms and 2000ms`)}}(e),e.method=e.method||`auto`,e.digitDurationMs=e.digitDurationMs||500,new Promise(function(n,r){t.sendMessageToCallMachine(W({action:`send-dtmf`},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return p.apply(this,arguments)})},{key:`getNetworkStats`,value:function(){var e=this;return this._callState===`joined-meeting`?new Promise(function(t){e.sendMessageToCallMachine({action:`get-calc-stats`},function(n){t(W(W({},e._network),{},{stats:n.stats}))})}):Promise.resolve(W({stats:{latest:{}}},this._network))}},{key:`testWebsocketConnectivity`,value:(f=z(function*(){var e=this;if(af(this._testCallInProgress,`testWebsocketConnectivity()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}return new Promise(function(t,n){e.sendMessageToCallMachine({action:`test-websocket-connectivity`},function(e){e.error?n(e.error):t(e.results)})})}),function(){return f.apply(this,arguments)})},{key:`abortTestWebsocketConnectivity`,value:function(){this.sendMessageToCallMachine({action:`abort-test-websocket-connectivity`})}},{key:`_validateVideoTrackForNetworkTests`,value:function(e){return e?e instanceof MediaStreamTrack?!!vd(e,{isLocalScreenVideo:!1})||(console.error(`Video track is not playable. This test needs a live video track.`),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error(`Missing video track. You must provide a video track in order to run this test.`),!1)}},{key:`testCallQuality`,value:(d=z(function*(){var e=this;cf(),of(this._callObjectMode,`testCallQuality()`),rf(this._callMachineInitialized,`testCallQuality()`,null,!0),nf(this._callState,this._isPreparingToJoin,`testCallQuality()`);var t=this._testCallAlreadyInProgress,n=function(n){t||(e._testCallInProgress=n)};if(n(!0),this.needsLoad())try{var r=this._callState;yield this.load(),this._callState=r}catch(e){return n(!1),Promise.reject(e)}return new Promise(function(t){e.sendMessageToCallMachine({action:`test-call-quality`,dailyJsVersion:e.properties.dailyJsVersion},function(r){var i=r.results,a=i.result,o=Mr(i,Ad);if(a===`failed`){var s,c=W({},o);(s=o.error)!=null&&s.details?(o.error.details=JSON.parse(o.error.details),c.error=W(W({},c.error),{},{details:W({},c.error.details)}),c.error.details.duringTest=`testCallQuality`):(c.error=c.error?W({},c.error):{},c.error.details={duringTest:`testCallQuality`}),e._maybeSendToSentry(c)}n(!1),t(W({result:a},o))})})}),function(){return d.apply(this,arguments)})},{key:`stopTestCallQuality`,value:function(){this.sendMessageToCallMachine({action:`stop-test-call-quality`})}},{key:`testConnectionQuality`,value:(u=z(function*(e){var t;su()?(console.warn(`testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead`),t=yield this.testPeerToPeerCallQuality(e)):(console.warn(`testConnectionQuality() is deprecated: use testCallQuality() instead`),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n}),function(e){return u.apply(this,arguments)})},{key:`testPeerToPeerCallQuality`,value:(l=z(function*(e){var t=this;if(af(this._testCallInProgress,`testPeerToPeerCallQuality()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw Error(`Video track error`);return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise(function(e,n){t.sendMessageToCallMachine({action:`test-p2p-call-quality`,duration:r},function(t){t.error?n(t.error):e(t.results)})})}),function(e){return l.apply(this,arguments)})},{key:`stopTestConnectionQuality`,value:function(){su()?(console.warn(`stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead`),this.stopTestPeerToPeerCallQuality()):(console.warn(`stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead`),this.stopTestCallQuality())}},{key:`stopTestPeerToPeerCallQuality`,value:function(){this.sendMessageToCallMachine({action:`stop-test-p2p-call-quality`})}},{key:`testNetworkConnectivity`,value:(c=z(function*(e){var t=this;if(af(this._testCallInProgress,`testNetworkConnectivity()`),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}if(!this._validateVideoTrackForNetworkTests(e))throw Error(`Video track error`);return this._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise(function(e,n){t.sendMessageToCallMachine({action:`test-network-connectivity`},function(t){t.error?n(t.error):e(t.results)})})}),function(e){return c.apply(this,arguments)})},{key:`abortTestNetworkConnectivity`,value:function(){this.sendMessageToCallMachine({action:`abort-test-network-connectivity`})}},{key:`getCpuLoadStats`,value:function(){var e=this;return new Promise(function(t){e._callState===`joined-meeting`?e.sendMessageToCallMachine({action:`get-cpu-load-stats`},function(e){t(e.cpuStats)}):t({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})})}},{key:`_validateEncodingLayerHasValidProperties`,value:function(e){if(!(Object.keys(e)?.length>0))throw Error(`Empty encoding is not allowed. At least one of these valid keys should be specified:`+Object.values(Hd))}},{key:`_validateVideoSendSettings`,value:function(e,t){var n=e===`screenVideo`?[`default-screen-video`,`detail-optimized`,`motion-optimized`,`motion-and-detail-balanced`]:[`default-video`,`bandwidth-optimized`,`bandwidth-and-quality-balanced`,`quality-optimized`,`adaptive-2-layers`,`adaptive-3-layers`],r=`Video send settings should be either an object or one of the supported presets: ${n.join()}`;if(typeof t==`string`){if(!n.includes(t))throw Error(r)}else{if(R(t)!==`object`)throw Error(r);if(!t.maxQuality&&!t.encodings&&t.allowAdaptiveLayers===void 0)throw Error(`Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute`);if(t.maxQuality&&[`low`,`medium`,`high`].indexOf(t.maxQuality)===-1)throw Error(`maxQuality must be either low, medium or high`);if(t.encodings){var i=!1;switch(Object.keys(t.encodings).length){case 1:i=!t.encodings.low;break;case 2:i=!t.encodings.low||!t.encodings.medium;break;case 3:i=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:i=!0}if(i)throw Error(`Encodings must be defined as: low, low and medium, or low, medium and high.`);t.encodings.low&&this._validateEncodingLayerHasValidProperties(t.encodings.low),t.encodings.medium&&this._validateEncodingLayerHasValidProperties(t.encodings.medium),t.encodings.high&&this._validateEncodingLayerHasValidProperties(t.encodings.high)}}}},{key:`validateUpdateSendSettings`,value:function(e){var t=this;if(!e||Object.keys(e).length===0)throw Error(`Send settings must contain at least information for one track!`);Object.entries(e).forEach(function(e){var n=Gr(e,2),r=n[0],i=n[1];t._validateVideoSendSettings(r,i)})}},{key:`updateSendSettings`,value:function(e){var t=this;return this.validateUpdateSendSettings(e),this.needsLoad()?(this._preloadCache.sendSettings=e,{sendSettings:this._preloadCache.sendSettings}):new Promise(function(n,r){t.sendMessageToCallMachine({action:`update-send-settings`,sendSettings:e},function(e){e.error?r(e.error):n(e.sendSettings)})})}},{key:`getSendSettings`,value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:`getLocalAudioLevel`,value:function(){return this._localAudioLevel}},{key:`getRemoteParticipantsAudioLevel`,value:function(){return this._remoteParticipantsAudioLevel}},{key:`getActiveSpeaker`,value:function(){return cf(),this._activeSpeaker}},{key:`setActiveSpeakerMode`,value:function(e){return cf(),this.sendMessageToCallMachine({action:`set-active-speaker-mode`,enabled:e}),this}},{key:`activeSpeakerMode`,value:function(){return cf(),this._activeSpeakerMode}},{key:`subscribeToTracksAutomatically`,value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:`setSubscribeToTracksAutomatically`,value:function(e){return ef(this._callState,`setSubscribeToTracksAutomatically()`,`Use the subscribeToTracksAutomatically configuration property.`),this._preloadCache.subscribeToTracksAutomatically=e,this.sendMessageToCallMachine({action:`daily-method-subscribe-to-tracks-automatically`,enabled:e}),this}},{key:`enumerateDevices`,value:(s=z(function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return bu()===`Firefox`&&xu().major>115&&xu().major<123&&(t=t.filter(function(e){return e.kind!==`audiooutput`})),{devices:t.map(function(e){var t=JSON.parse(JSON.stringify(e));if(!su()&&e.kind===`videoinput`&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(r==null||(n=r.facingMode)==null?void 0:n.length)>=1?r.facingMode[0]:void 0}return t})}}return new Promise(function(t){e.sendMessageToCallMachine({action:`enumerate-devices`},function(e){t({devices:e.devices})})})}),function(){return s.apply(this,arguments)})},{key:`sendAppMessage`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`*`;if(ef(this._callState,`sendAppMessage()`),JSON.stringify(e).length>this._maxAppMessageSize)throw Error(`Message data too large. Max size is `+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:`app-msg`,data:e,to:t}),this}},{key:`addFakeParticipant`,value:function(e){return cf(),ef(this._callState,`addFakeParticipant()`),this.sendMessageToCallMachine(W({action:`add-fake-participant`},e)),this}},{key:`setShowNamesMode`,value:function(e){return sf(this._callObjectMode,`setShowNamesMode()`),cf(),e&&e!==`always`&&e!==`never`?(console.error(`setShowNamesMode argument should be "always", "never", or false`),this):(this.sendMessageToCallMachine({action:`set-show-names`,mode:e}),this)}},{key:`setShowLocalVideo`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return sf(this._callObjectMode,`setShowLocalVideo()`),cf(),ef(this._callState,`setShowLocalVideo()`),typeof e==`boolean`?(this.sendMessageToCallMachine({action:`set-show-local-video`,show:e}),this._showLocalVideo=e,this):(console.error(`setShowLocalVideo only accepts a boolean value`),this)}},{key:`showLocalVideo`,value:function(){return sf(this._callObjectMode,`showLocalVideo()`),cf(),this._showLocalVideo}},{key:`setShowParticipantsBar`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return sf(this._callObjectMode,`setShowParticipantsBar()`),cf(),ef(this._callState,`setShowParticipantsBar()`),typeof e==`boolean`?(this.sendMessageToCallMachine({action:`set-show-participants-bar`,show:e}),this._showParticipantsBar=e,this):(console.error(`setShowParticipantsBar only accepts a boolean value`),this)}},{key:`showParticipantsBar`,value:function(){return sf(this._callObjectMode,`showParticipantsBar()`),cf(),this._showParticipantsBar}},{key:`customIntegrations`,value:function(){return cf(),sf(this._callObjectMode,`customIntegrations()`),this._customIntegrations}},{key:`setCustomIntegrations`,value:function(e){return cf(),sf(this._callObjectMode,`setCustomIntegrations()`),ef(this._callState,`setCustomIntegrations()`),xf(e)?(this.sendMessageToCallMachine({action:`set-custom-integrations`,integrations:e}),this._customIntegrations=e,this):this}},{key:`startCustomIntegrations`,value:function(e){var t=this;if(cf(),sf(this._callObjectMode,`startCustomIntegrations()`),ef(this._callState,`startCustomIntegrations()`),Array.isArray(e)&&e.some(function(e){return typeof e!=`string`})||!Array.isArray(e)&&typeof e!=`string`)return console.error(`startCustomIntegrations() only accepts string | string[]`),this;var n=typeof e==`string`?[e]:e,r=n.filter(function(e){return!(e in t._customIntegrations)});return r.length?(console.error(`Can't find custom integration(s): "${r.join(`, `)}"`),this):(this.sendMessageToCallMachine({action:`start-custom-integrations`,ids:n}),this)}},{key:`stopCustomIntegrations`,value:function(e){var t=this;if(cf(),sf(this._callObjectMode,`stopCustomIntegrations()`),ef(this._callState,`stopCustomIntegrations()`),Array.isArray(e)&&e.some(function(e){return typeof e!=`string`})||!Array.isArray(e)&&typeof e!=`string`)return console.error(`stopCustomIntegrations() only accepts string | string[]`),this;var n=typeof e==`string`?[e]:e,r=n.filter(function(e){return!(e in t._customIntegrations)});return r.length?(console.error(`Can't find custom integration(s): "${r.join(`, `)}"`),this):(this.sendMessageToCallMachine({action:`stop-custom-integrations`,ids:n}),this)}},{key:`customTrayButtons`,value:function(){return sf(this._callObjectMode,`customTrayButtons()`),cf(),this._customTrayButtons}},{key:`updateCustomTrayButtons`,value:function(e){return sf(this._callObjectMode,`updateCustomTrayButtons()`),cf(),ef(this._callState,`updateCustomTrayButtons()`),bf(e)?(this.sendMessageToCallMachine({action:`update-custom-tray-buttons`,btns:e}),this._customTrayButtons=e,this):(console.error(`updateCustomTrayButtons only accepts a dictionary of the type ${JSON.stringify(Gd)}`),this)}},{key:`theme`,value:function(){return sf(this._callObjectMode,`theme()`),this.properties.theme}},{key:`setTheme`,value:function(e){var t=this;return sf(this._callObjectMode,`setTheme()`),new Promise(function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=W({},e),t.sendMessageToCallMachine({action:`set-theme`,theme:t.properties.theme});try{t.emitDailyJSEvent({action:Jc,theme:t.properties.theme})}catch(e){console.log(`could not emit 'theme-updated'`,e)}n(t.properties.theme)}catch(e){r(e)}})}},{key:`requestFullscreen`,value:(o=z(function*(){if(cf(),this._iframe&&!document.fullscreenElement&&uu())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log(`could not make video call fullscreen`,e)}}),function(){return o.apply(this,arguments)})},{key:`exitFullscreen`,value:function(){cf(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:`getSidebarView`,value:(a=z(function*(){var e=this;return this._callObjectMode?(console.error(`getSidebarView is not available in callObject mode`),Promise.resolve(null)):new Promise(function(t){e.sendMessageToCallMachine({action:`get-sidebar-view`},function(e){t(e.view)})})}),function(){return a.apply(this,arguments)})},{key:`setSidebarView`,value:function(e){return this._callObjectMode?(console.error(`setSidebarView is not available in callObject mode`),this):(this.sendMessageToCallMachine({action:`set-sidebar-view`,view:e}),this)}},{key:`room`,value:(i=z(function*(){var e=this,t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,n=t===void 0||t;return this._accessState.access===`unknown`||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise(function(t){e.sendMessageToCallMachine({action:`lib-room-info`,includeRoomConfigDefaults:n},function(e){delete e.action,delete e.callbackStamp,t(e)})})}),function(){return i.apply(this,arguments)})},{key:`geo`,value:(r=z(function*(){return console.error(`The geo() function is no longer supported. Geographical decisions now depend upon domain and room settings.`),{current:``}}),function(){return r.apply(this,arguments)})},{key:`setNetworkTopology`,value:(n=z(function*(e){var t=this;return cf(),ef(this._callState,`setNetworkTopology()`),new Promise(function(n,r){t.sendMessageToCallMachine({action:`set-network-topology`,opts:e},function(e){e.error?r({error:e.error}):n({workerId:e.workerId})})})}),function(e){return n.apply(this,arguments)})},{key:`getNetworkTopology`,value:(t=z(function*(){var e=this;return new Promise(function(t,n){e.needsLoad()&&t({topology:`none`}),e.sendMessageToCallMachine({action:`get-network-topology`},function(e){e.error?n({error:e.error}):t({topology:e.topology})})})}),function(){return t.apply(this,arguments)})},{key:`setPlayNewParticipantSound`,value:function(e){if(cf(),typeof e!=`number`&&!0!==e&&!1!==e)throw Error(`argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ${e}`);this.sendMessageToCallMachine({action:`daily-method-set-play-ding`,arg:e})}},{key:`on`,value:function(e,t){return Xr.prototype.on.call(this,e,t)}},{key:`once`,value:function(e,t){return Xr.prototype.once.call(this,e,t)}},{key:`off`,value:function(e,t){return Xr.prototype.off.call(this,e,t)}},{key:`validateProperties`,value:function(e){var t,n;if(e!=null&&(t=e.dailyConfig)!=null&&t.userMediaAudioConstraints){var r;su()||console.warn(`userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.`);var i=e.inputSettings||{};i.audio=e.inputSettings?.audio||{},i.audio.settings=((r=e.inputSettings)==null||(r=r.audio)==null?void 0:r.settings)||{},i.audio.settings=W(W({},i.audio.settings),e.dailyConfig.userMediaAudioConstraints),e.inputSettings=i,delete e.dailyConfig.userMediaAudioConstraints}if(e!=null&&(n=e.dailyConfig)!=null&&n.userMediaVideoConstraints){var a;su()||console.warn(`userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.`);var o=e.inputSettings||{};o.video=e.inputSettings?.video||{},o.video.settings=((a=e.inputSettings)==null||(a=a.video)==null?void 0:a.settings)||{},o.video.settings=W(W({},o.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=o,delete e.dailyConfig.userMediaVideoConstraints}for(var s in e)if(Yd[s]){if(Yd[s].validate&&!Yd[s].validate(e[s],this))throw Error(`property '${s}': ${Yd[s].help}`)}else console.warn(`Ignoring unrecognized property '${s}'`),delete e[s]}},{key:`assembleMeetingUrl`,value:function(){var e,t=W(W({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(e=this.properties.dailyConfig)!=null&&e.proxyUrl?encodeURIComponent(this.properties.dailyConfig?.proxyUrl):void 0}),n=t.url.match(/\?/)?`&`:`?`;return t.url+n+Object.keys(Yd).filter(function(e){return Yd[e].queryString&&t[e]!==void 0}).map(function(e){return`${Yd[e].queryString}=${t[e]}`}).join(`&`)}},{key:`needsLoad`,value:function(){return[`new`,Lc,Vc,Hc].includes(this._callState)}},{key:`sendMessageToCallMachine`,value:function(e,t){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error(`Use after destroy`);this._messageChannel.sendMessageToCallMachine(e,t,this.callClientId,this._iframe)}},{key:`forwardPackagedMessageToCallMachine`,value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:`addListenerForPackagedMessagesFromCallMachine`,value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:`removeListenerForPackagedMessagesFromCallMachine`,value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:`handleMessageFromCallMachine`,value:function(e){switch(e.action){case Kc:this.sendMessageToCallMachine(W({action:qc},this.properties));break;case`call-machine-initialized`:this._callMachineInitialized=!0;var t=hi(),n={action:Yl,level:`log`,code:1011,stats:{event:`bundle load`,time:this._bundleLoadTime===`no-op`?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime===`no-op`,url:bi(this.properties.dailyConfig),resolvedBaseDomain:t,failedOver:t!=null&&t!==`daily.co`}};this.sendMessageToCallMachine(n),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case Xc:this._loadedCallback&&=(this._loadedCallback(),null),this.emitDailyJSEvent(e);break;case el:var r=W({},e);delete r.internal,this._maxAppMessageSize=e.internal?._maxAppMessageSize||Wl,this._joinedCallback&&=(this._joinedCallback(e.participants),null),this.emitDailyJSEvent(r);break;case nl:case rl:if(this._callState===`left-meeting`)return;if(e.participant&&e.participant.session_id){var i=e.participant.local?`local`:e.participant.session_id;if(this._callObjectMode){var a=this._callMachine().store;nd(e.participant,a),rd(e.participant,a),ad(e.participant,this._participants[i],a)}try{this.maybeParticipantTracksStopped(this._participants[i],e.participant),this.maybeParticipantTracksStarted(this._participants[i],e.participant),this.maybeEventRecordingStopped(this._participants[i],e.participant),this.maybeEventRecordingStarted(this._participants[i],e.participant)}catch(e){console.error(`track events error`,e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[i])||(this._participants[i]=W({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case il:if(e.participant&&e.participant.session_id){var o=this._participants[e.participant.session_id];o&&this.maybeParticipantTracksStopped(o,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case al:$r(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case ol:var s={access:e.access};e.awaitingAccess&&(s.awaitingAccess=e.awaitingAccess),$r(this._accessState,s)||(this._accessState=s,this.emitDailyJSEvent(e));break;case sl:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var c=W(W({},e),{},{action:`meeting-session-updated`});this.emitDailyJSEvent(c)}break;case Ul:this._handleFatalError(e);break;case tl:this._callState!==`error`&&this._updateCallState(`left-meeting`),this.resetMeetingDependentVars(),this._resolveLeave&&=(this._resolveLeave(),null),this.emitDailyJSEvent(e);break;case`selected-devices-updated`:e.devices&&this.emitDailyJSEvent(e);break;case jl:var l=e.state,u=e.threshold,d=e.quality,f=l.state,p=l.reasons;f===this._network.networkState&&$r(p,this._network.networkStateReasons)&&u===this._network.threshold&&d===this._network.quality||(this._network.networkState=f,this._network.networkStateReasons=p,this._network.quality=d,this._network.threshold=u,e.networkState=f,p.length&&(e.networkStateReasons=p),delete e.state,this.emitDailyJSEvent(e));break;case Nl:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case Pl:e&&e.faceCounts!==void 0&&this.emitDailyJSEvent(e);break;case kl:var m=e.activeSpeaker;this._activeSpeaker.peerId!==m.peerId&&(this._activeSpeaker.peerId=m.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case`show-local-video-changed`:if(this._callObjectMode)return;var h=e.show;this._showLocalVideo=h,this.emitDailyJSEvent({action:e.action,show:h});break;case Al:var g=e.enabled;this._activeSpeakerMode!==g&&(this._activeSpeakerMode=g,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case ll:case ul:case dl:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case Bl:$r(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case Vl:this._maybeUpdateInputSettings(e.inputSettings);break;case`send-settings-updated`:$r(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case`local-audio-level`:this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case`remote-participants-audio-level`:this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case Cl:var _=e.session_id;this._rmpPlayerState[_]=e.playerState,this.emitDailyJSEvent(e);break;case Tl:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case wl:var v=e.session_id,y=this._rmpPlayerState[v];y&&this.compareEqualForRMPUpdateEvent(y,e.remoteMediaPlayerState)||(this._rmpPlayerState[v]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case`custom-button-click`:case`sidebar-view-changed`:case`pip-started`:case`pip-stopped`:this.emitDailyJSEvent(e);break;case cl:var b=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=Ef(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||b)&&this.emitDailyJSEvent(e);break;case El:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case Dl:case Ol:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case hl:case gl:case _l:case vl:case yl:case fl:case pl:case ml:case Zc:case Qc:case xl:case Sl:case`test-completed`:case Ml:case bl:case Fl:case Il:case Ll:case Rl:case Hl:case zl:case`dialin-ready`:case`dialin-connected`:case`dialin-error`:case`dialin-stopped`:case`dialin-warning`:case`dialout-connected`:case`dtmf-event`:case`dialout-answered`:case`dialout-error`:case`dialout-stopped`:case`dialout-warning`:this.emitDailyJSEvent(e);break;case`request-fullscreen`:this.requestFullscreen();break;case`request-exit-fullscreen`:this.exitFullscreen()}}},{key:`maybeEventRecordingStopped`,value:function(e,t){var n=`record`;e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:`recording-stopped`}))}},{key:`maybeEventRecordingStarted`,value:function(e,t){var n=`record`;e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:`recording-started`}))}},{key:`_trackStatePlayable`,value:function(e){return!(!e||e.state!==`playable`)}},{key:`_trackChanged`,value:function(e,t){return e?.id!==t?.id}},{key:`maybeEventTrackStopped`,value:function(e,t,n){var r=t?.tracks[e]??null,i=n?.tracks[e]??null,a=r?.track;if(a){var o=this._trackStatePlayable(r),s=this._trackStatePlayable(i),c=this._trackChanged(a,i?.track);o&&(s&&!c||this.emitDailyJSEvent({action:`track-stopped`,track:a,participant:n??t,type:e}))}}},{key:`maybeEventTrackStarted`,value:function(e,t,n){var r=t?.tracks[e]??null,i=n?.tracks[e]??null,a=i?.track;if(a){var o=this._trackStatePlayable(r),s=this._trackStatePlayable(i),c=this._trackChanged(r?.track,a);s&&(o&&!c||this.emitDailyJSEvent({action:`track-started`,track:a,participant:n,type:e}))}}},{key:`maybeParticipantTracksStopped`,value:function(e,t){if(e)for(var n in e.tracks)this.maybeEventTrackStopped(n,e,t)}},{key:`maybeParticipantTracksStarted`,value:function(e,t){if(t)for(var n in t.tracks)this.maybeEventTrackStarted(n,e,t)}},{key:`compareEqualForRMPUpdateEvent`,value:function(e,t){return e.state===t.state&&e.settings?.volume===t.settings?.volume}},{key:`emitDailyJSEvent`,value:function(e){try{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log(`could not emit`,e,t)}}},{key:`compareEqualForParticipantUpdateEvent`,value:function(e,t){return!!$r(e,t)&&(!e.videoTrack||!t.videoTrack||e.videoTrack.id===t.videoTrack.id&&e.videoTrack.muted===t.videoTrack.muted&&e.videoTrack.enabled===t.videoTrack.enabled)&&(!e.audioTrack||!t.audioTrack||e.audioTrack.id===t.audioTrack.id&&e.audioTrack.muted===t.audioTrack.muted&&e.audioTrack.enabled===t.audioTrack.enabled)}},{key:`nativeUtils`,value:function(){return su()?typeof DailyNativeUtils>`u`?(console.warn(`in React Native, DailyNativeUtils is expected to be available`),null):DailyNativeUtils:null}},{key:`updateIsPreparingToJoin`,value:function(e){this._updateCallState(this._callState,e)}},{key:`_updateCallState`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=this._callState===Bc;this.updateShowAndroidOngoingMeetingNotification(i);var a=tf(n,r),o=tf(this._callState,this._isPreparingToJoin);a!==o&&(this.updateKeepDeviceAwake(o),this.updateDeviceAudioMode(o),this.updateNoOpRecordingEnsuringBackgroundContinuity(o))}}},{key:`_handleFatalError`,value:function(e){var t;this._iframe&&!e.preserveIframe&&(this._iframe.src=``),this._updateCallState(Hc),this.resetMeetingDependentVars(),this._loadedCallback&&=(this._loadedCallback(e.errorMsg),null),e.preserveIframe;var n=Mr(e,jd);typeof(n==null||(t=n.error)==null?void 0:t.details)==`string`&&(n.error.details=JSON.parse(n.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&=(this._joinedCallback(null,n),null),this.emitDailyJSEvent(n)}},{key:`resetMeetingDependentVars`,value:function(){this._participants={},this._participantCounts=Bd,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Uc},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Ef(zd,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=Wl,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:`updateKeepDeviceAwake`,value:function(e){su()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:`updateDeviceAudioMode`,value:function(e){if(su()&&!this.disableReactNativeAutoDeviceManagement(`audio`)){var t=e?this._nativeInCallAudioMode:`idle`;this.nativeUtils().setAudioMode(t)}}},{key:`updateShowAndroidOngoingMeetingNotification`,value:function(e){if(su()&&this.nativeUtils().setShowOngoingMeetingNotification){var t,n,r,i;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var a=this.properties.reactNativeConfig.androidInCallNotification;t=a.title,n=a.subtitle,r=a.iconName,i=a.disableForCustomOverride}i&&(e=!1),this.nativeUtils().setShowOngoingMeetingNotification(e,t,n,r,this.callClientId)}}},{key:`updateNoOpRecordingEnsuringBackgroundContinuity`,value:function(e){su()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:`toggleParticipantAudioBasedOnNativeAudioFocus`,value:function(){var e;if(su()){var t=(e=this._callMachine())==null||(e=e.store)==null?void 0:e.getState();for(var n in t?.streams){var r=t.streams[n];r&&r.pendingTrack&&r.pendingTrack.kind===`audio`&&(r.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:`disableReactNativeAutoDeviceManagement`,value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:`absoluteUrl`,value:function(e){if(e!==void 0){var t=document.createElement(`a`);return t.href=e,t.href}}},{key:`sayHello`,value:function(){var e=`hello, world.`;return console.log(e),e}},{key:`_logUseAfterDestroy`,value:function(){var e=Object.values(Id)[0];if(this.needsLoad()){if(e&&!e.needsLoad()){var t={action:Yl,level:`error`,code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.")}else{var n={action:Yl,level:`error`,code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:`_logDuplicateInstanceAttempt`,value:function(){for(var e=0,t=Object.values(Id);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:Yl,level:`warn`,code:this.allowMultipleCallInstances?9993:9992}),n._delayDuplicateInstanceLog=!1):n._delayDuplicateInstanceLog=!0}}},{key:`_maybeSendToSentry`,value:function(t){var n,r,i,a;if(!((n=t.error)!=null&&n.type&&(![`connection-error`,`end-of-life`,`no-room`].includes(t.error.type)||t.error.type===`no-room`&&t.error.msg.includes(`deleted`)))){var o=(r=this.properties)!=null&&r.url?new URL(this.properties.url):void 0,s=`production`;o&&o.host.includes(`.staging.daily`)&&(s=`staging`);var c,l,u,d,f,p=new $s({dsn:`https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844`,transport:mc,stackParser:xc,integrations:function(e){let t=[gs(),ms(),Ec(),wc(),Mc(),Ic(),Ts(),Fc()];return!1!==e.autoSessionTracking&&t.push(jc()),t}({}).filter(function(e){return![`BrowserApiErrors`,`Breadcrumbs`,`GlobalHandlers`].includes(e.name)}),environment:s}),m=new Ka;if(m.setClient(p),p.init(),(i=this._participants)!=null&&(i=i.local)!=null&&i.session_id&&m.setExtra(`sessionId`,this._participants.local.session_id),this.properties){var h=W({},this.properties);h.userName=h.userName?`[Filtered]`:void 0,h.userData=h.userData?`[Filtered]`:void 0,h.token=h.token?`[Filtered]`:void 0,m.setExtra(`properties`,h)}if(o){var g=o.searchParams.get(`domain`);if(!g){var _=o.host.match(/(.*?)\./);g=_&&_[1]||``}g&&m.setTag(`domain`,g)}t.error&&(m.setTag(`fatalErrorType`,t.error.type),m.setExtra(`errorDetails`,t.error.details),(c=t.error.details)!=null&&c.uri&&m.setTag(`serverAddress`,t.error.details.uri),(l=t.error.details)!=null&&l.workerGroup&&m.setTag(`workerGroup`,t.error.details.workerGroup),(u=t.error.details)!=null&&u.geoGroup&&m.setTag(`geoGroup`,t.error.details.geoGroup),(d=t.error.details)!=null&&d.on&&m.setTag(`connectionAttempt`,t.error.details.on),(f=t.error.details)!=null&&f.bundleUrl&&(m.setTag(`bundleUrl`,t.error.details.bundleUrl),m.setTag(`bundleError`,t.error.details.sourceError.type))),m.setTags({callMode:this._callObjectMode?su()?`reactNative`:(a=this.properties)!=null&&(a=a.dailyConfig)!=null&&(a=a.callMode)!=null&&a.includes(`prebuilt`)?this.properties.dailyConfig.callMode:`custom`:`prebuilt-frame`,version:e.version()});var v=t.error?.msg||t.errorMsg;m.captureException(Error(v))}}},{key:`_callMachine`,value:function(){var e;return(e=window._daily)==null||(e=e.instances)==null||(e=e[this.callClientId])==null?void 0:e.callMachine}},{key:`_maybeUpdateInputSettings`,value:function(e){if(!$r(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();$r(t,n)||this.emitDailyJSEvent({action:`input-settings-updated`,inputSettings:n})}}}],[{key:`supportedBrowser`,value:function(){if(su())return{supported:!0,mobile:!0,name:`React Native`,version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=li.getParser(ou());return{supported:!!_u(),mobile:e.getPlatformType()===`mobile`,name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!uu(),supportsScreenShare:!!lu(),supportsSfu:!!_u(),supportsVideoProcessing:hu(),supportsAudioProcessing:gu()}}},{key:`version`,value:function(){return`0.92.2`}},{key:`createCallObject`,value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t.layout=`none`,new e(null,t)}},{key:`wrap`,value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(cf(),!t||!t.contentWindow||typeof t.src!=`string`)throw Error(`DailyIframe::Wrap needs an iframe-like first argument`);return n.layout||=n.customLayout?`custom-v1`:`browser`,new e(t,n)}},{key:`createFrame`,value:function(t,n){var r,i;cf(),t&&n?(r=t,i=n):t&&t.append?(r=t,i={}):(r=document.body,i=t||{});var a=i.iframeStyle;a||=r===document.body?{position:`fixed`,border:`1px solid black`,backgroundColor:`white`,width:`375px`,height:`450px`,right:`1em`,bottom:`1em`}:{border:0,width:`100%`,height:`100%`};var o=document.createElement(`iframe`);o.allow=window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?`microphone, camera`:`microphone; camera; autoplay; display-capture; screen-wake-lock; compute-pressure;`,o.style.visibility=`hidden`,r.appendChild(o),o.style.visibility=null,Object.keys(a).forEach(function(e){return o.style[e]=a[e]}),i.layout||(i.customLayout?i.layout=`custom-v1`:i.layout=`browser`);try{return new e(o,i)}catch(e){throw r.removeChild(o),e}}},{key:`createTransparentFrame`,value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cf();var n=document.createElement(`iframe`);return n.allow=`microphone; camera; autoplay`,n.style.cssText=`
46
47
  position: fixed;
47
48
  top: 0;
48
49
  left: 0;
@@ -50,13 +51,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
50
51
  height: 100%;
51
52
  border: 0;
52
53
  pointer-events: none;
53
- `,document.body.appendChild(n),t.layout||=`custom-v1`,e.wrap(n,t)}},{key:`getCallInstance`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return e?Vu[e]:Object.values(Vu)[0]}}]);var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,ee,te,ne,re,ie,ae,oe,se,ce,D,le,ue,de}();function rd(e){if(e.extension){if(typeof e.extension!=`string`)throw Error(`Error starting dial out: extension must be a string`);if(e.extension.length>20)throw Error(`Error starting dial out: extension length must be less than or equal to 20`)}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!=`number`)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be a number`);if(e.waitBeforeExtensionDialSec>60)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60`);if(!e.extension)throw Error(`Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension`)}}function id(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)console.warn(`MediaStreamTrack found in props or cache.`,r),n[r]=tl;else if(r===`dailyConfig`){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var a=window._daily.instances[t].customCallbacks||{};a.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=a,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function ad(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==`joined-meeting`){var n=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} only supported after join.`;throw t&&(n+=` ${t}`),console.error(n),Error(n)}}function od(e,t){return[`joining-meeting`,`joined-meeting`].includes(e)||t}function sd(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`This daily-js method`,r=arguments.length>3?arguments[3]:void 0;if(od(e,t)){var i=`${n} not supported after joining a meeting.`;throw r&&(i+=` ${r}`),console.error(i),Error(i)}}function cd(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`,n=arguments.length>2?arguments[2]:void 0;if(!e){var r=`${t}${arguments.length>3&&arguments[3]!==void 0&&arguments[3]?` requires preAuth() or startCamera() to initialize call state.`:` requires preAuth(), startCamera(), or join() to initialize call state.`}`;throw n&&(r+=` ${n}`),console.error(r),Error(r)}}function ld(e){if(e){var t=`A pre-call quality test is in progress. Please try ${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} again once testing has completed. Use stopTestCallQuality() to end it early.`;throw console.error(t),Error(t)}}function ud(e){if(!e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} is only supported on custom callObject instances`;throw console.error(t),Error(t)}}function dd(e){if(e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} is only supported as part of Daily's Prebuilt`;throw console.error(t),Error(t)}}function fd(){if(fl())throw Error(`This daily-js method is not currently supported in React Native`)}function pd(){if(!fl())throw Error(`This daily-js method is only supported in React Native`)}function md(e){if(e===void 0)return!0;var t;if(typeof e==`string`)t=e;else try{t=JSON.stringify(e),ir(JSON.parse(t),e)||console.warn(`The userData provided will be modified when serialized.`)}catch(e){throw Error(`userData must be serializable to JSON: ${e}`)}if(t.length>4096)throw Error(`userData is too large (${t.length} characters). Maximum size suppported is 4096.`);return!0}function hd(e,t){for(var n=t.allowAllParticipantsKey,r=function(e){var t=[`local`];return n||t.push(`*`),e&&!t.includes(e)},i=function(e){return!!(e.layer===void 0||Number.isInteger(e.layer)&&e.layer>=0||e.layer===`inherit`)},a=function(e){return!!e&&!(e.video&&!i(e.video))&&!(e.screenVideo&&!i(e.screenVideo))},o=0,s=Object.entries(e);o<s.length;o++){var c=Xn(s[o],2),l=c[0],u=c[1];if(!r(l)||!a(u))return!1}return!0}function gd(e){if(I(e)!==`object`)return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Xn(n[t],2),i=r[0],a=r[1];switch(i){case`video`:if(I(a)!==`object`)return!1;for(var o=0,s=Object.entries(a);o<s.length;o++){var c=Xn(s[o],2),l=c[0],u=c[1];switch(l){case`processor`:if(!yd(u))return!1;break;case`settings`:if(!bd(u))return!1;break;default:return!1}}break;case`audio`:if(I(a)!==`object`)return!1;for(var d=0,f=Object.entries(a);d<f.length;d++){var p=Xn(f[d],2),m=p[0],h=p[1];switch(m){case`processor`:if(!vd(h))return!1;break;case`settings`:if(!bd(h))return!1;break;default:return!1}}break;default:return!1}}return!0}function _d(e,t,n){var r,i=[];e.video&&e.video.processor&&(bl((r=t?.useLegacyVideoProcessor)!=null&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push(`video`))),e.audio&&e.audio.processor&&(xl()||(e.audio.settings?delete e.audio.processor:delete e.audio,i.push(`audio`))),i.length>0&&console.error(`Ignoring settings for browser- or platform-unsupported input processor(s): ${i.join(`, `)}`),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:tl}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:tl}):delete n.videoTrack)}function vd(e){if(fl())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`];return!!e&&I(e)===`object`&&(Object.keys(e).filter(function(e){return!t.includes(e)}).forEach(function(t){console.warn(`invalid key inputSettings -> audio -> processor : ${t}`),delete e[t]}),!!function(e){return typeof e==`string`?Object.values(rl).includes(e)?!0:(console.error(`inputSettings audio processor type invalid`),!1):!1}(e.type))}function yd(e){if(fl())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`,`config`];return!e||I(e)!==`object`||!function(e){return typeof e==`string`?Object.values(nl).includes(e)?!0:(console.error(`inputSettings video processor type invalid`),!1):!1}(e.type)||e.config&&(I(e.config)!==`object`||!function(e,t){var n=Object.keys(t);if(n.length===0)return!0;var r=`invalid object in inputSettings -> video -> processor -> config`;switch(e){case nl.BGBLUR:return n.length>1||n[0]!==`strength`?(console.error(r),!1):!(typeof t.strength!=`number`||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error(`${r}; expected: {0 < strength <= 1}, got: ${t.strength}`),!1);case nl.BGIMAGE:return!(t.source!==void 0&&!function(e){if(e.source==="default")return e.type=`default`,!0;if(e.source instanceof ArrayBuffer)return!0;if(kr(e.source))return e.type=`url`,!!function(e){var t=new URL(e),n=t.pathname;if(t.protocol===`data:`)try{var r=n.substring(n.indexOf(`:`)+1,n.indexOf(`;`)).split(`/`)[1];return sl.includes(r)}catch(e){return console.error(`failed to deduce blob content type`,e),!1}var i=n.split(`.`).at(-1).toLowerCase().trim();return sl.includes(i)}(e.source)||(console.error(`invalid image type; supported types: [${sl.join(`, `)}]`),!1);return t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error(`invalid image selection; must be an int, > 0, <= 10`),!1):(e.type=`daily-preselect`,!0);var t,n}(t));default:return!0}}(e.type,e.config))?!1:(Object.keys(e).filter(function(e){return!t.includes(e)}).forEach(function(t){console.warn(`invalid key inputSettings -> video -> processor : ${t}`),delete e[t]}),!0)}function bd(e){return I(e)===`object`&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function xd(){return`inputSettings must be of the form: { video?: { processor?: { type: [ ${Object.values(nl).join(` | `)} ], config?: {} } }, audio?: { processor: {type: [ ${Object.values(rl).join(` | `)} ] } } }`}function Sd(e){return`receiveSettings must be of the form { [<remote participant id> | ${Xs}${e.allowAllParticipantsKey?` | "*"`:``}]: { [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}`}function Cd(){return`customIntegrations should be an object of type ${JSON.stringify(Zu)}.`}function wd(e){if(e&&I(e)!==`object`||Array.isArray(e))return console.error(`customTrayButtons should be an Object of the type ${JSON.stringify(Xu)}.`),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=Xn(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var o=Xn(a[i],2),s=o[0],c=o[1],l=Xu.id[s];if(!l)return console.error(`customTrayButton does not support key ${s}`),!1;switch(s){case`iconPath`:case`iconPathDarkMode`:if(!kr(c))return console.error(`customTrayButton ${s} should be a url.`),!1;break;case`visualState`:if(![`default`,`sidebar-open`,`active`].includes(c))return console.error(`customTrayButton ${s} should be ${l}. Got: ${c}`),!1;break;default:if(I(c)!==l)return console.error(`customTrayButton ${s} should be a ${l}.`),!1}}return!0}function Td(e){if(!e||e&&I(e)!==`object`||Array.isArray(e))return console.error(Cd()),!1;for(var t=function(e){return`${e} should be ${Zu.id[e]}`},n=function(e,t){return console.error(`customIntegration ${e}: ${t}`)},r=0,i=Object.entries(e);r<i.length;r++){var a=Xn(i[r],1)[0];if(!(`label`in e[a]))return n(a,`label is required`),!1;if(!(`location`in e[a]))return n(a,`location is required`),!1;if(!(`src`in e[a])&&!(`srcdoc`in e[a]))return n(a,`src or srcdoc is required`),!1;for(var o=0,s=Object.entries(e[a]);o<s.length;o++){var c=Xn(s[o],2),l=c[0],u=c[1];switch(l){case`allow`:case`csp`:case`name`:case`referrerPolicy`:case`sandbox`:if(typeof u!=`string`)return n(a,t(l)),!1;break;case`iconURL`:if(!kr(u))return n(a,`${l} should be a url`),!1;break;case`src`:if(`srcdoc`in e[a])return n(a,`cannot have both src and srcdoc`),!1;if(!kr(u))return n(a,`src "${u}" is not a valid URL`),!1;break;case`srcdoc`:if(`src`in e[a])return n(a,`cannot have both src and srcdoc`),!1;if(typeof u!=`string`)return n(a,t(l)),!1;break;case`location`:if(![`main`,`sidebar`].includes(u))return n(a,t(l)),!1;break;case`controlledBy`:if(u!==`*`&&u!==`owners`&&(!Array.isArray(u)||u.some(function(e){return typeof e!=`string`})))return n(a,t(l)),!1;break;case`shared`:if((!Array.isArray(u)||u.some(function(e){return typeof e!=`string`}))&&u!==`owners`&&typeof u!=`boolean`)return n(a,t(l)),!1;break;default:if(!Zu.id[l])return console.error(`customIntegration does not support key ${l}`),!1}}}return!0}function Ed(e,t){if(t===void 0)return!1;switch(I(t)){case`string`:return I(e)===t;case`object`:if(I(e)!==`object`)return!1;for(var n in e)if(!Ed(e[n],t[n]))return!1;return!0;default:return!1}}function Dd(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,a=e.useSipRefer;if(!n||!r)throw Error(`${t}() requires a sessionId and toEndPoint`);if(typeof n!=`string`||typeof r!=`string`)throw Error(`Invalid paramater: sessionId and toEndPoint must be of type string`);if(a&&!r.startsWith(`sip:`))throw Error(`"toEndPoint" must be a "sip" address`);if(!r.startsWith(`sip:`)&&!r.startsWith(`+`))throw Error(`toEndPoint: ${r} must starts with either "sip:" or "+"`);if(i&&typeof i!=`string`)throw Error(`callerId must be of type string`);if(i&&!r.startsWith(`+`))throw Error(`callerId is only valid when transferring to a PSTN number`)}function Od(e){if(I(e)!==`object`)throw Error(`RemoteMediaPlayerSettings: must be "object" type`);if(e.state&&!Object.values(il).includes(e.state))throw Error(`Invalid value for RemoteMediaPlayerSettings.state, valid values are: `+JSON.stringify(il));if(e.volume){if(typeof e.volume!=`number`)throw Error(`RemoteMediaPlayerSettings.volume: must be "number" type`);if(e.volume<0||e.volume>2)throw Error(`RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0`)}}function kd(e,t,n){return!(typeof e!=`number`||e<t||e>n)}function Ad(e,t){return e&&!t&&delete e.data,e}function jd(e,t,n){if(e.blocked?.byDeviceInUse)return`in-use`;if(e.blocked?.byDeviceMissing)return`not-found`;if(e.blocked?.byPermissions||n===`denied`)return`blocked`;if((t===`idle`||t===`pending`)&&!e.persistentTrack){if(n===`prompt`&&e.state===`interrupted`)return`pending`;if(e.off?.byUser)return`idle`}return`granted`}function Md(e,t,n,r){return e.filter(e=>e.kind===t&&e.deviceId!==``).map(e=>{let t=r.find(t=>t.device.deviceId===e.deviceId);return{device:e,selected:`deviceId`in n?n.deviceId===e.deviceId:!!t?.selected,state:t?.state??`granted`}}).sort((e,t)=>e.device.deviceId===t.device.deviceId?0:e.device.deviceId==="default"?-1:t.device.deviceId==="default"?1:e.device.label<t.device.label?-1:+(e.device.label>t.device.label))}function Nd(e,t){let n=Bt(`idle`),r=Bt(`idle`),i=Bt([]),a=Bt([]),o=Bt([]),s=0,c=0,l=!1;async function u(){let t=++s;if(!navigator.mediaDevices?.getUserMedia||!navigator.mediaDevices?.enumerateDevices){Dt(()=>{n.value=`not-supported`,r.value=`not-supported`});return}try{let{devices:n}=await e.enumerateDevices(),{camera:r,mic:c,speaker:u}=await e.getInputDevices();if(l||t!==s)return;Dt(()=>{i.value=Md(n,`videoinput`,r,i.peek()),a.value=Md(n,`audioinput`,c,a.peek()),o.value=Md(n,`audiooutput`,u,o.peek())})}catch(e){if(l||t!==s)return;console.warn(`Unable to enumerate Daily devices`,e),Dt(()=>{n.value=`not-supported`,r.value=`not-supported`})}}async function d(e){try{return(await navigator.permissions.query({name:e})).state}catch{return`prompt`}}async function f(){let t=++c,o=e.participants().local;if(!o)return;let[s,f]=await Promise.all([d(`camera`),d(`microphone`)]);l||t!==c||(Dt(()=>{n.value=jd(o.tracks.video,n.peek(),s),r.value=jd(o.tracks.audio,r.peek(),f),i.value=i.peek().map(e=>e.selected?{...e,state:n.peek()===`in-use`?`in-use`:`granted`}:e),a.value=a.peek().map(e=>e.selected?{...e,state:r.peek()===`in-use`?`in-use`:`granted`}:e)}),await u())}return t(`participant-updated`,e=>{e.participant.local&&f()}),t(`available-devices-updated`,()=>{u()}),t(`selected-devices-updated`,()=>{u()}),t(`started-camera`,()=>{Dt(()=>{n.value=`granted`,r.value=`granted`}),f()}),t(`camera-error`,({error:e})=>{++c,Dt(()=>{switch(e.type){case`cam-in-use`:n.value=`in-use`;break;case`mic-in-use`:r.value=`in-use`;break;case`cam-mic-in-use`:n.value=r.value=`in-use`;break;case`not-found`:e.missingMedia.includes(`video`)&&(n.value=`not-found`),e.missingMedia.includes(`audio`)&&(r.value=`not-found`);break;case`permissions`:e.blockedMedia.includes(`video`)&&(n.value=`blocked`),e.blockedMedia.includes(`audio`)&&(r.value=`blocked`);break;case`constraints`:n.value=r.value=e.reason===`invalid`?`constraints-invalid`:`constraints-none-specified`;break;case`undefined-mediadevices`:n.value=r.value=`undefined-mediadevices`;break;default:n.value=r.value=`unknown`}})}),e.participants().local&&f(),{camState:n,micState:r,cameras:i,microphones:a,speakers:o,refreshDevices:u,async setCamera(t){await e.setInputDevicesAsync({audioDeviceId:null,videoDeviceId:t})},async setMicrophone(t){await e.setInputDevicesAsync({audioDeviceId:t,videoDeviceId:null})},async setSpeaker(t){await e.setOutputDeviceAsync({outputDeviceId:t})},reset(){++s,++c,Dt(()=>{n.value=r.value=`idle`,i.value=[],a.value=[],o.value=[]})},dispose(){l=!0,++s,++c}}}function Pd(e){return{...e,tracks:{...e.tracks,audio:{...e.tracks.audio},video:{...e.tracks.video},screenAudio:{...e.tracks.screenAudio},screenVideo:{...e.tracks.screenVideo}}}}function Fd(e){let t=Bt(e.meetingState()),n=Bt({}),r=Bt(e.getActiveSpeaker()?.peerId??null),i=[],a=!1;function o(t,n){e.on(t,n);let r=()=>{e.off(t,n)};return i.push(r),r}function s(){n.value=Object.fromEntries(Object.values(e.participants()).filter(Boolean).map(e=>[e.session_id,Pd(e)]))}let c=Gt(()=>Object.values(n.value).find(e=>e.local)?.session_id??null),l=Nd(e,o);for(let n of[`loading`,`loaded`,`joining-meeting`,`joined-meeting`,`left-meeting`,`error`])o(n,()=>{t.value=e.meetingState()});for(let e of[`participant-joined`,`participant-updated`])o(e,({participant:e})=>{n.value={...n.peek(),[e.session_id]:Pd(e)}});o(`started-camera`,s),o(`joined-meeting`,s),o(`participant-left`,({participant:e})=>{let t={...n.peek()};delete t[e.session_id],n.value=t,r.peek()===e.session_id&&(r.value=null)}),o(`active-speaker-change`,({activeSpeaker:e})=>{r.value=e.peerId??null});function u(){Dt(()=>{n.value={},r.value=null,l.reset()})}return o(`left-meeting`,u),o(`call-instance-destroyed`,()=>{u(),t.value=`new`}),s(),{call:e,meetingState:t,participants:n,localSessionId:c,activeSpeakerId:r,devices:l,dispose(){a||(a=!0,i.forEach(e=>e()),l.dispose())}}}var Id=`default`in nd?nd.default:nd,Ld=we(null);function Rd({children:e,callObject:t}){let[n,r]=O(null);return $e(()=>{let e=!1,n;function i(){if(e)return;let a=t??Id.getCallInstance(),o=a&&!a.isDestroyed()?a:Id.createCallObject(),s=Fd(o),c=()=>{n?.(),r(null),t||queueMicrotask(i)};o.on(`call-instance-destroyed`,c),n=()=>{s.dispose(),o.off(`call-instance-destroyed`,c)},r({call:o,store:s})}return i(),()=>{e=!0,n?.()}},[t]),P(Ld.Provider,{value:n,children:e})}function zd(){return N(Ld)}var Bd=new WeakMap;function Vd(e,t,n,r){let i=Bd.get(e)??new Map;Bd.set(e,i);let a=t?`local`:`remote`,o=i.get(a);if(!o){let r=t?!e.isLocalAudioLevelObserverRunning():!e.isRemoteParticipantsAudioLevelObserverRunning(),s=()=>{t?e.stopLocalAudioLevelObserver():e.stopRemoteParticipantsAudioLevelObserver()};async function c(){r&&(t?await e.startLocalAudioLevelObserver(n):await e.startRemoteParticipantsAudioLevelObserver(n),!i.has(a)&&!e.isDestroyed()&&s())}o={consumers:0,owned:r,ready:c(),stop:s},i.set(a,o)}o.consumers++;let s=!0;return o.ready.catch(e=>{s&&r(e)}),()=>{s=!1,!(--o.consumers>0)&&(i.delete(a),o.owned&&!e.isDestroyed()&&o.stop())}}function Hd(){return zd()?.call??null}function Ud(){return zd()?.store.meetingState.value??`new`}function Wd(){return zd()?.store.localSessionId.value??null}function Gd(){return zd()?.store.activeSpeakerId.value??null}function Kd(e,t){let n=Hd(),r=A(t);r.current=t,$e(()=>{if(!n||n.isDestroyed())return;let t=e=>r.current(e);return n.on(e,t),()=>{n.off(e,t)}},[n,e])}function qd({onAppMessage:e}={}){let t=Hd();return Kd(`app-message`,t=>e?.(t)),M((e,n=`*`)=>{t?.sendAppMessage(e,n)},[t])}function Jd({filter:e}){let t=zd()?.store;return j(()=>{let n=[];return Gt(()=>{let r=Object.values(t?.participants.value??{}).filter(e).map(e=>e.session_id);return r.length===n.length&&r.every((e,t)=>e===n[t])?n:(n=r,r)})},[t,e]).value}function Yd(e,t=`video`){let n=zd()?.store,r=j(()=>Gt(()=>n?.participants.value[e??``]?.tracks[t]),[n,e,t]).value;return r?{...r,isOff:r.state===`off`||r.state===`blocked`}:{state:`off`,subscribed:!1,isOff:!0}}function Xd(e){return Yd(e,`video`)}function Zd(e){return Yd(e,`audio`)}function Qd(e){return Yd(e,`screenVideo`)}function $d(){let e=zd()?.store.devices,t=e?.cameras.value??[],n=e?.microphones.value??[],r=e?.speakers.value??[];return{cameras:t,microphones:n,speakers:r,camState:e?.camState.value??`idle`,micState:e?.micState.value??`idle`,currentCam:t.find(e=>e.selected),currentMic:n.find(e=>e.selected),currentSpeaker:r.find(e=>e.selected),setCamera:M(async t=>{await e?.setCamera(t)},[e]),setMicrophone:M(async t=>{await e?.setMicrophone(t)},[e]),setSpeaker:M(async t=>{await e?.setSpeaker(t)},[e])}}function ef(e,t,n,r){let i=Hd(),a=Wd(),o=!!e&&e===a,s=A(n);s.current=n,Kd(`local-audio-level`,n=>{e&&o&&t(n.audioLevel)}),Kd(`remote-participants-audio-level`,n=>{e&&!o&&t(n.participantsAudioLevel[e]??0)}),$e(()=>{if(i&&e&&!i.isDestroyed())return Vd(i,o,r,e=>{s.current?s.current(`Audio level observer not supported in this browser`):console.warn(`Unable to start audio level observer`,e)})},[i,e,o,r])}function tf(e,t){for(var n in t)e[n]=t[n];return e}function nf(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function rf(e,t){this.props=e,this.context=t}function U(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&(typeof n==`function`?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:nf(this.props,e)}function r(t){return this.shouldComponentUpdate=n,w(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(rf.prototype=new ee).isPureReactComponent=!0,rf.prototype.shouldComponentUpdate=function(e,t){return nf(this.props,e)||nf(this.state,t)};var af=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),af&&af(e)};var of=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function sf(e){function t(t){var n=tf({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=of,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var cf=r.__e;r.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k||[]),i.__c(e,t)}cf(e,t,n,r)};var lf=r.unmount;function uf(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=tf({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return uf(e,t,n)})),e}function df(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return df(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ff(){this.__u=0,this.o=null,this.__b=null}function pf(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function mf(){this.i=null,this.l=null}r.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),lf&&lf(e)},(ff.prototype=new ee).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=pf(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=df(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},ff.prototype.componentWillUnmount=function(){this.o=[]},ff.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=uf(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&w(E,null,e.fallback);return i&&(i.__u&=-33),[w(E,null,t.__a?null:e.children),i]};var hf=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function gf(e){return this.getChildContext=function(){return e.context},e.children}function _f(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){xe(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}xe(w(gf,{context:t.context},e.__v),t.v)}function vf(e,t){var n=w(_f,{__v:e,h:t});return n.containerInfo=t,n}(mf.prototype=new ee).__a=function(e){var t=this,n=pf(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),hf(t,e,r)):i()};n?n(a):a()}},mf.prototype.render=function(e){this.i=null,this.l=new Map;var t=D(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},mf.prototype.componentDidUpdate=mf.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){hf(e,n,t)})};var yf=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,bf=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,xf=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Sf=/[A-Z0-9]/g,Cf=typeof document<`u`,wf=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};ee.prototype.isReactComponent=!0,[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(ee.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Tf=r.event;r.event=function(e){return Tf&&(e=Tf(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Ef={configurable:!0,get:function(){return this.class}},Df=r.vnode;r.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)==-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Cf&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||wf(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:xf.test(a)&&(a=s):s=a=`oninput`:i&&bf.test(a)?a=a.replace(Sf,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&(r.multiple&&Array.isArray(r.value)&&(r.value=D(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=D(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Ef)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=yf,Df&&Df(e)};var Of=r.__r;r.__r=function(e){Of&&Of(e),e.__c};var kf=r.diffed;r.diffed=function(e){kf&&kf(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value)};function Af(e,t){return j(()=>n=>{for(let r of[e,t])typeof r==`function`?r(n):r&&(r.current=n)},[e,t])}var jf=U(sf(function({automirror:e,fit:t=`contain`,mirror:n,onResize:r,playableStyle:i={},sessionId:a,style:o={},type:s=`video`,...c},l){let u=Wd()===a,d=s===`screenVideo`,f=u&&s===`video`,p=A(null),m=Af(p,l),h=A(!1),g=Yd(a,s),_=g.persistentTrack,v=f||d||!g.isOff,y=g.subscribed,b=j(()=>{if(typeof n==`boolean`)return n;if(!e)return!1;if(!_)return f;let t=_.getSettings();return`facingMode`in t?f&&t.facingMode===`user`:f},[e,f,n,_]);return k(()=>{h.current=b},[b]),k(function(){let e=p.current;if(!e)return;let t=()=>{let t=e.srcObject;if(!t)return;let n=e.play();n!==void 0&&n.then(()=>{e.srcObject===t&&(e.controls=!1)}).catch(n=>{e.srcObject===t&&(e.controls=!0,console.warn(`Failed to play video`,n))})},n=()=>{e.paused&&t()},r=()=>{e.style.transform=`scale(1)`},i=()=>{e.style.transform=h.current?`scale(-1, 1)`:``,e.paused&&t()},a=()=>{document.visibilityState!==`hidden`&&e.paused&&t()};return e.addEventListener(`canplay`,n),e.addEventListener(`enterpictureinpicture`,r),e.addEventListener(`leavepictureinpicture`,i),document.addEventListener(`visibilitychange`,a),()=>{e.removeEventListener(`canplay`,n),e.removeEventListener(`enterpictureinpicture`,r),e.removeEventListener(`leavepictureinpicture`,i),document.removeEventListener(`visibilitychange`,a)}},[]),k(function(){let e=p.current;if(e&&_){if(typeof MediaStream>`u`){console.warn(`MediaStream API not available. Can't setup ${s} for ${a}`);return}return e.srcObject=new MediaStream([_]),e.load(),()=>{e.srcObject=null,e.load()}}},[a,s,_,_?.id]),k(function(){let e=p.current;if(!r||!e)return;let t;function n(){t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let e=p.current;if(!e||document.hidden)return;let t=e.videoWidth,n=e.videoHeight;t&&n&&r?.({aspectRatio:t/n,height:n,width:t})})}return n(),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`resize`,n),()=>{t&&cancelAnimationFrame(t),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`resize`,n)}},[r]),P(`video`,{autoPlay:!0,muted:!0,playsInline:!0,ref:m,"data-local":u,"data-mirrored":b||void 0,"data-playable":v||void 0,"data-session-id":a,"data-subscribed":y,"data-video-type":s,style:Object.assign({objectFit:t,transform:b?`scale(-1, 1)`:``},o,v?i:{}),...c})}));jf.displayName=`DailyVideo`;var Mf=U(sf(({onPlayFailed:e,sessionId:t,type:n=`audio`,...r},i)=>{let a=A(null),o=Yd(t,n),s=Af(a,i),c=o.subscribed,l=A(e);return l.current=e,k(()=>{let e=a.current;if(!e||!o?.persistentTrack)return;if(typeof MediaStream>`u`){console.warn(`MediaStream API not available. Can't setup ${n} for ${t}`),l.current?.({sessionId:t,target:e,type:n,message:`MediaStream API not available`,name:`MediaStream API not available`});return}let r=!1,i=()=>{e.play().catch(i=>{if(r)return;let a={sessionId:t,target:e,type:n,message:i instanceof Error?i.message:String(i),name:i instanceof Error?i.name:void 0};l.current?l.current(a):console.warn(`Failed to play Daily audio`,i)})};return e.addEventListener(`loadedmetadata`,i),e.srcObject=new MediaStream([o.persistentTrack]),e.load(),()=>{r=!0,e.removeEventListener(`loadedmetadata`,i),e.pause(),e.srcObject=null}},[o.persistentTrack,o.persistentTrack?.id,t,n]),Kd(`participant-left`,M(e=>{let n=a.current;e.participant.session_id===t&&n&&(n.pause(),n.srcObject=null)},[t])),Kd(`left-meeting`,M(()=>{let e=a.current;e&&(e.pause(),e.srcObject=null)},[])),P(`audio`,{autoPlay:!0,ref:s,...r,"data-session-id":t,"data-audio-type":n,"data-subscribed":c})}));Mf.displayName=`DailyAudioTrack`;var Nf=class extends Error{constructor(){super(`Microphone blocked by the browser at join`),this.name=`MicrophoneBlockedError`}};function Pf(e){return e instanceof Nf}var Ff=new Set([`network`,`server`,`unavailable`,`busy`,`rate_limited`]);function If(e){return e===401||e===403?`forbidden`:e===402?`limit_exceeded`:e===423?`busy`:e===429?`rate_limited`:e===409?`concurrency`:e===503?`unavailable`:e>=500?`server`:`unknown`}function Lf(e){if(!e)return;let t=e.get(`Retry-After`);if(!t)return;let n=Number.parseInt(t,10);if(!Number.isNaN(n)&&n>=0)return n;let r=Date.parse(t);if(!Number.isNaN(r)){let e=Math.floor((r-Date.now())/1e3);return e>0?e:0}}function Rf(e){if(e instanceof vn){let t=If(e.status);return{kind:t,status:e.status,raw:e.body,retryable:Ff.has(t),retryAfterSec:Lf(e.headers)}}return e instanceof TypeError?{kind:`network`,raw:String(e),retryable:!0}:{kind:`unknown`,raw:String(e),retryable:!1}}var zf=new Set([`Captcha token required`,`Captcha verification failed`]);function Bf(e){if(!(e instanceof vn)||e.status!==403)return null;try{let t=JSON.parse(e.body.trim()).error;return typeof t==`string`?t:null}catch{return null}}function Vf(e){return Bf(e)===`Captcha token required`}function Hf(e){let t=Bf(e);return t!==null&&zf.has(t)}var Uf=`Origin not allowed`;function Wf(e){return Bf(e)===Uf}function Gf(e){return e===`limit_exceeded`?`daily_limit`:e===`forbidden`||e===`concurrency`?null:`busy`}var Kf=we(null),qf=`tavus:memory-user-id:`,Jf=new Map;function Yf(e){return`${qf}${e}`}function Xf(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function Zf(e){if(!e)return``;let t=Yf(e);try{let e=window.localStorage.getItem(t);if(e)return e;let n=Xf();return window.localStorage.setItem(t,n),n}catch{}let n=Jf.get(t);if(n)return n;let r=Xf();return Jf.set(t,r),r}var Qf=`tavus:terms-accepted:`;function $f(e){let t=5381;for(let n=0;n<e.length;n++)t=(t*33^e.charCodeAt(n))>>>0;return t.toString(36)}function ep(e,t){return`${Qf}${e}:${$f(t)}`}function tp(e,t){if(!e||!t)return!1;try{return globalThis.localStorage?.getItem(ep(e,t))===`1`}catch{return!1}}function np(e,t){if(e&&t)try{globalThis.localStorage?.setItem(ep(e,t),`1`)}catch{}}var rp=null;function ip(e,t){e&&t&&(rp={deploymentId:e,content:t})}function ap(){rp&&=(np(rp.deploymentId,rp.content),null)}function op(e){return e===`user`?`user`:e===`pal`?`replica`:null}function sp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function cp(e){if(!sp(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!sp(e.properties))return null;if(e.event_type===`conversation.utterance`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=op(t.role);return n?{kind:`chat-message`,sender:n===`user`?`user`:`agent`,text:t.speech}:null}if(e.event_type===`conversation.utterance.streaming`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=op(t.role);if(!n)return null;let r=t.final===!0||t.is_interrupted===!0;return{kind:`caption-update`,text:t.speech,final:r,role:n}}return null}function lp(e,t){return{message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e,properties:{text:t}}}function up(e,t){return typeof e[t]==`number`?{[t]:e[t]}:{}}function dp(e){let t=op(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance`,event_type:`conversation.utterance`,properties:{role:t,speech:e.speech,...up(e,`seq`),...up(e,`turn_idx`)}}}function fp(e){let t=op(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance.streaming`,event_type:`conversation.utterance.streaming`,properties:{role:t,speech:e.speech,...typeof e.final==`boolean`?{final:e.final}:{},...typeof e.is_interrupted==`boolean`?{is_interrupted:e.is_interrupted}:{},...up(e,`seq`)}}}function pp(e){return typeof e.name!=`string`||typeof e.arguments!=`string`?null:{kind:`tool_call`,event_type:`conversation.tool_call`,properties:{name:e.name,arguments:e.arguments,...up(e,`seq`),...up(e,`turn_idx`)}}}function mp(e){if(typeof e==`string`)return e;try{let t=JSON.stringify(e??{});return typeof t==`string`?t:null}catch{return null}}function hp(e){if(typeof e.name!=`string`)return null;let t=e.modality===`vision`||e.modality===`audio`?e.modality:null;if(!t)return null;let n=mp(e.arguments);return n===null?null:{kind:`perception_tool_call`,event_type:`conversation.perception_tool_call`,properties:{name:e.name,arguments:n,modality:t}}}function gp(e){return{kind:`perception_analysis`,event_type:`conversation.perception_analysis`,properties:e}}function _p(e,t){return{kind:`speaking`,event_type:t,properties:{...up(e,`seq`),...up(e,`turn_idx`)}}}var vp={"conversation.utterance":dp,"conversation.utterance.streaming":fp,"conversation.tool_call":pp,"conversation.perception_tool_call":hp,"conversation.perception_analysis":gp,"conversation.replica_started_speaking":_p,"conversation.replica_stopped_speaking":_p,"conversation.user_started_speaking":_p,"conversation.user_stopped_speaking":_p};function yp(e){if(!sp(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!sp(e.properties))return null;let t=vp[e.event_type];return t?t(e.properties,e.event_type):{kind:`unknown`,event_type:e.event_type,properties:e.properties}}function bp(e,t){return{message_type:`conversation`,event_type:t.event_type,conversation_id:e,properties:t.properties??{}}}function xp(e,t){let n=cp(e);return n?n.kind===`chat-message`?(t.appendChatMessage(n.sender,n.text),!0):(t.setCaption(n.text,n.final,n.role),!0):!1}function Sp(e=5e3){let t=[],n=n=>{for(;t.length>0&&n-t[0].ts>e;)t.shift()};return{markSent(e){t.push({text:e,ts:Date.now()})},consumeMatch(e){n(Date.now());let r=t.findIndex(t=>t.text===e);return r!==-1&&(t.splice(r,1),!0)}}}var Cp=hn(`Conversation`),wp=1500;function Tp(e,t){if(!t)return e;let n=()=>t.reason??new DOMException(`The operation was aborted`,`AbortError`);return t.aborted?Promise.reject(n()):new Promise((r,i)=>{let a=()=>i(n());t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{t.removeEventListener(`abort`,a),r(e)},e=>{t.removeEventListener(`abort`,a),i(e)})})}var Ep=we(null);function Dp({children:e}){return P(Rd,{children:P(Lp,{children:e})})}function Op(e,t,n){let{role:r,speech:i}=e.properties;if(!(r===`user`&&n.consumeMatch(i)))for(let n of t)n.onUtterance?.({...e.properties})}function kp(e,t){for(let n of t)n.onToolCall?.({...e.properties})}function Ap(e,t){for(let n of t)n.onPerception?.(e)}function jp(e,t){let n=e.event_type,r=n.startsWith(`conversation.replica`)?`replica`:`user`,i=n.endsWith(`started_speaking`)?`started`:`stopped`;for(let n of t)n.onSpeakingState?.({who:r,state:i,...e.properties})}function Mp(e,t){for(let n of t)n.onMessage?.(e)}function Np(e,t,n){switch(e.kind){case`utterance`:case`utterance.streaming`:Op(e,t,n);return;case`tool_call`:kp(e,t);return;case`perception_tool_call`:case`perception_analysis`:Ap(e,t);return;case`speaking`:jp(e,t);return;case`unknown`:Mp(e,t);return}}function Pp(e,t,n){let r=e;return t&&r?.conversational_context==null&&(r={...r,conversational_context:t}),n&&r?.custom_greeting==null&&(r={...r,custom_greeting:n}),r}function Fp(e){let t=e.participants().local?.tracks.audio;return t?.state===`blocked`&&t.blocked?.byPermissions===!0}function Ip(e,t){return t?e instanceof vn&&e.status===401:!1}function Lp({children:e}){let{deploymentId:t,client:n,config:r}=N(Nn),{memoryStores:i,conversationalContext:a,customGreeting:o}=N(bt),s=Hd(),c=Ud(),l=N(Kf),u=j(()=>Bt(`idle`),[]),d=j(()=>Bt(null),[]),f=j(()=>Bt([]),[]),p=j(()=>Bt(``),[]),m=j(()=>Bt(null),[]),h=j(()=>Bt(null),[]),g=j(()=>Bt(null),[]),_=j(()=>Bt(null),[]),v=A(null),y=A(null),b=j(()=>Bt(null),[]),x=A(null),S=j(()=>Sp(),[]),C=j(()=>new Set,[]),w=j(()=>Bt(`idle`),[]),T=l?.flowSignal??w,E=M(e=>{g.value=e},[g]),ee=M(e=>{_.value=e},[_]),te=M(()=>{let e=b.peek();return e!==null&&(b.value=null,d.peek()?.conversationId===e)},[b,d]);Kd(`joined-meeting`,()=>{let e=b.peek();e!==null&&e===d.peek()?.conversationId&&u.peek()===`connecting`&&(u.value=`connected`,Cp.info(`Connected to meeting`))}),Kd(`left-meeting`,()=>{te()&&(u.value=`ended`,ap(),Cp.info(`Left meeting`))}),Kd(`error`,()=>{te()&&(h.value=`Meeting error`,u.value=`error`)});let ne=M(()=>b.peek()===null?c===`joining-meeting`||c===`joined-meeting`:!1,[b,c]),re=M(()=>x.current,[]);mn(()=>{let e=u.value;if(e===`connected`)for(let e of C)e.onConnect?.();else if(e===`ended`||e===`disconnecting`)for(let e of C)e.onDisconnect?.();else if(e===`error`){let e=h.peek()??`Unknown error`;for(let t of C)t.onError?.({code:`CONVERSATION_ERROR`,message:e})}}),mn(()=>{let e=T.value;for(let t of C)t.onModeChange?.(e)}),qd({onAppMessage:M(e=>{xp(e?.data,{appendChatMessage(e,t){e===`user`&&S.consumeMatch(t)||(f.value=[...f.peek(),{id:crypto.randomUUID(),sender:e,text:t,timestamp:Date.now()}])},setCaption(e,t,n){p.value=e,m.value=n,v.current!==null&&(clearTimeout(v.current),v.current=null),t&&(v.current=setTimeout(()=>{p.value=``,m.value=null,v.current=null},wp))}});let t=yp(e?.data);t&&Np(t,C,S)},[f,p,m,S,C])}),k(()=>()=>{v.current!==null&&(clearTimeout(v.current),v.current=null)},[]);let ie=M(()=>{y.current=null,d.value=null,f.value=[],p.value=``,m.value=null,v.current!==null&&(clearTimeout(v.current),v.current=null),(u.peek()===`ended`||u.peek()===`error`)&&(u.value=`idle`)},[d,u,f,p,m]),ae=M(()=>{let e=d.peek()?.conversationId??null,r=y.current;if(r?.conversationId===e)return r.promise;u.value=`disconnecting`;let i=!1,a=e?xn(n,t,e,{keepalive:!0}).catch(e=>{i=!0,Cp.error(`End conversation API failed`,e)}):Promise.resolve(),o;try{o=s?.leave()}catch(e){i=!0,Cp.error(`Daily leave failed`,e)}let c=Promise.resolve(o).catch(e=>{i=!0,Cp.error(`Daily leave failed`,e)}),l=c.then(()=>{x.current===l&&(x.current=null)});x.current=l;let f=Promise.all([a,c]).then(()=>{y.current?.promise===f&&(b.peek()===e&&(b.value=null),u.value=`ended`,i&&(y.current=null))});return y.current={conversationId:e,promise:f},f},[n,t,s,d,u,b]),oe=M(async(e,c)=>{let l=null;try{ie(),u.value=`connecting`,h.value=null;let f=e,p=g.peek();p&&f?.password==null&&(f={...f,password:p});let m=r.value.customization.conversation.unique_memory_tag===!0;if(!f?.memory_stores){let e=i??(m?[Zf(t)]:[]);e.length&&(f={...f,memory_stores:e})}f=Pp(f,a,o);let v=_.peek();_.value=null,v&&f?.captcha_token==null&&(f={...f,captcha_token:v});let y=await bn(n,t,f,c);if(l=y.conversation_id,d.value={conversationId:y.conversation_id,conversationName:y.conversation_name,conversationUrl:y.conversation_url,callbackUrl:y.callback_url,createdAt:y.created_at,magicGrid:y.magic_grid===!0},console.info(`[Tavus:Conversation] Conversation created:`,y.conversation_id),c?.signal?.aborted)throw c.signal.reason??new DOMException(`The operation was aborted`,`AbortError`);let S=r.value.customization.conversation.modality===`chat`,C=x.current;if(C&&await Tp(C,c?.signal),b.value=y.conversation_id,await Tp(Promise.resolve(s?.join({url:y.conversation_url,...S?{startAudioOff:!0,startVideoOff:!0}:{}})),c?.signal),!S&&s&&Fp(s))throw new Nf}catch(e){throw await ae(),l&&(d.value=null),Ip(e,r.value.has_password===!0)&&(g.value=null),Cp.error(`Start failed`,e),h.value=String(e),u.value=`error`,e}},[n,t,s,u,h,d,g,_,r,i,a,o,ie,ae,b]),se=M(e=>{if(!s)return;let t=d.peek();if(!t){Cp.warn(`sendChat called before session was established; dropping message`);return}S.markSent(e),s.sendAppMessage(lp(t.conversationId,e),`*`),f.value=[...f.peek(),{id:crypto.randomUUID(),sender:`user`,text:e,timestamp:Date.now()}]},[s,f,d,S]),ce=M(e=>{if(!s){Cp.warn(`sendMessage called before Daily was ready; dropping message`);return}let t=d.peek();if(!t){Cp.warn(`sendMessage called before session was established; dropping message`);return}e.event_type===`conversation.respond`&&S.markSent(e.properties.text),s.sendAppMessage(bp(t.conversationId,e),`*`)},[s,d,S]),D=M(e=>{C.add(e)},[C]),le=M(e=>{C.delete(e)},[C]),ue=j(()=>({state:u,session:d,chatMessages:f,captionText:p,captionRole:m,error:h,password:g,setPassword:E,captchaToken:_,setCaptchaToken:ee,mode:T,start:oe,end:ae,sendChat:se,sendMessage:ce,conversation:{start:oe,end:ae,sendMessage:ce},__registerSubscriber:D,__unregisterSubscriber:le,__beginAttempt:ie,isSharedCallBusy:ne,pendingLeave:re}),[u,d,f,p,m,h,g,E,_,ee,T,oe,ae,se,ce,D,le,ie,ne,re]);return P(Ep.Provider,{value:ue,children:e})}var Rp=hn(`CaptchaChallenge`),zp=new Set([`110600`,`110620`,`200500`]);function Bp(e){return e.startsWith(`3`)||e.startsWith(`6`)}var Vp=new Set([`110500`,`110510`]);function Hp(e){return e.startsWith(`3`)||e.startsWith(`6`)||zp.has(e)}function Up(e){return typeof e==`object`&&!!e&&e.source===`tavus-captcha`&&typeof e.type==`string`}function Wp(e,t,n,r,i){return`${e.replace(/\/+$/,``)}${t.startsWith(`/`)?t:`/${t}`}?deployment_uuid=${encodeURIComponent(n)}&action=${encodeURIComponent(r)}&parent_origin=${encodeURIComponent(i)}`}function Gp({captcha:e,deploymentId:t,onToken:n,onFallback:r,onInteractive:i,presented:a=!0}){let o=(N(bt).baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),s=new URL(o).origin,[c,l]=O(0),[u,d]=O(!1),[f,p]=O(!1),m=A(0),h=A(0),g=Wp(o,e.challenge_path,t,e.action,window.location.origin),_=M(()=>{p(!1),i?.(!1),m.current=0,h.current=0,l(e=>e+1)},[i]);if(k(()=>{function e(e){if(u||e.origin!==s)return;let a=e.data;if(Up(a)&&a.deployment_uuid===t){if(a.type===`interactive`){p(!0),i?.(!0);return}if(a.type===`token`&&a.token){Rp.info(`Captcha token received`),p(!1),i?.(!1),n(a.token);return}if(a.type===`expired`){Rp.info(`Captcha token expired, reloading iframe`),_();return}if(a.type===`error`){let e=String(a.code??``);if(Rp.warn(`Captcha error received`,e),Hp(e)){if(m.current+=1,Bp(e)&&(h.current+=1),m.current<2){p(!1),i?.(!1);return}Rp.warn(`Captcha error keeps recurring, falling back to no-token mode`),d(!0),r(h.current>=2?`unsupported`:`exhausted`);return}Rp.warn(`Captcha error is not retryable, falling back to no-token mode`),d(!0),r(Vp.has(e)?`unsupported`:`broken`)}}}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[s,t,u,n,r,i,_]),u)return null;let v=f&&a;return P(`div`,{class:v?`absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm animate-[tavusFadeUp_180ms_ease-out]`:`absolute top-0 left-0 w-0 h-0 overflow-hidden opacity-0 pointer-events-none`,"aria-hidden":!v,children:P(`iframe`,{src:g,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`,title:`Security challenge`,style:{border:`none`,width:`300px`,height:`65px`},scrolling:`no`},c)})}var Kp=hn(`Captcha`),qp=15e3,Jp=we(null);function Yp({children:e}){let{config:t,deploymentId:n}=N(Nn),r=N(Ep),i=sn(!0),a=sn(null),o=sn(!1),s=sn(0),c=sn(!1),l=sn(!1),u=A([]),d=t.value.captcha??null,f=r?.state.value??`idle`,p=f===`connecting`||f===`connected`,m=d!==null&&!c.value&&!p&&o.value,h=M(e=>{let t=u.current;u.current=[];for(let n of t)n(e)},[]),g=M(()=>{o.value=!1,l.value=!1},[o,l]),_=M((e,t)=>{Kp.warn(e),c.value=!0,g(),h({kind:`unavailable`,reason:t})},[c,h,g]),v=M(e=>{r?.setCaptchaToken(e)},[r]),y=r?.captchaToken;k(()=>{if(y)return y.subscribe(e=>{e!==null&&g()})},[y,g]);let b=M(e=>{_(`Captcha challenge unavailable; not attempting /start without a token`,e)},[_]),x=M(e=>{l.value=e},[l]),S=M(async e=>(t.peek().captcha??null)===null?{kind:`not-required`}:(r?.captchaToken.peek()??null)===null?(c.peek()&&(c.value=!1,s.value=s.peek()+1),o.value=!0,new Promise(t=>{let n=!1,i,a,o=l.subscribe(e=>{clearTimeout(i),!e&&(i=setTimeout(()=>_(`Captcha mint timed out`,`timeout`),qp))}),s=r=>{if(n)return;n=!0,clearTimeout(i),o(),e?.removeEventListener(`abort`,c),a?.();let l=u.current.indexOf(s);l!==-1&&u.current.splice(l,1),t(r)},c=()=>{s({kind:`unavailable`,reason:`cancelled`}),u.current.length===0&&g()};a=r?.captchaToken.subscribe(e=>{e!==null&&s({kind:`token`})}),u.current.push(s),e?.aborted?c():e?.addEventListener(`abort`,c,{once:!0})})):{kind:`token`},[o,t,r,s,c,_,l,g]),C=j(()=>({ensureToken:S,hostVisible:i,promptSlot:a}),[S,i,a]),w=a.value,T=m&&d?P(Gp,{captcha:d,deploymentId:n,presented:i.value,onToken:v,onFallback:b,onInteractive:x},s.value):null;return P(Jp.Provider,{value:C,children:[e,w&&T?vf(T,w):T]})}function Xp(){let e=N(Nn);if(!e)throw Error(`useConfig must be used within ConfigProvider`);return e}var Zp=`tavus_pudl_`,Qp=172800,$p=new Map;function em(){let e=new Date;return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function tm(e){return`${Zp}${e}`}function nm(e){try{let t=`${tm(e)}=`,n=document.cookie.split(`; `).find(e=>e.startsWith(t));if(!n)return 0;let[r,i]=decodeURIComponent(n.slice(t.length)).split(`.`);if(r!==em())return 0;let a=Number.parseInt(i,10);return Number.isFinite(a)&&a>0?a:0}catch{return 0}}function rm(e,t){try{let n=encodeURIComponent(`${em()}.${t}`);document.cookie=`${tm(e)}=${n}; max-age=${Qp}; path=/; SameSite=Lax`}catch{return}}function im(e){let t=$p.get(e);return t||(t=Bt(e?nm(e):0),$p.set(e,t)),t}function am(e){if(!e)return;rm(e,nm(e)+1);let t=nm(e),n=$p.get(e);n?n.value=t:$p.set(e,Bt(t))}function om(e){switch(e){case`blocked`:return`blocked`;case`in-use`:return`in-use`;case`not-found`:return`not-found`;case`not-supported`:case`undefined-mediadevices`:return`unsupported`;default:return null}}function sm(e,t,n,r){return e===`granted`&&r?`granted`:om(e)||(t===`denied`?`blocked`:t===`prompt`?e===`granted`&&n?`granted`:`prompt`:t===`granted`?n?`checking`:`prompt`:e===`granted`?`granted`:n?`checking`:`prompt`)}function cm(e,t){let n=e===`granted`,r=e===`blocked`||e===`in-use`||e===`not-found`||e===`unsupported`;return{status:e,isGranted:n,isBlocked:r,canRequest:e===`prompt`,needsAttention:r||e===`prompt`&&t!==`granted`}}function lm(e){let[t,n]=O(null);return k(()=>{let t=!1,r=navigator.permissions;if(r?.query)return r.query({name:e}).then(e=>{t||(n(e.state),e.onchange=()=>{t||n(e.state)})}).catch(()=>{}),()=>{t=!0}},[e]),t}function um(){let e=Hd(),t=Ud(),n=Wd(),{micState:r,camState:i,currentMic:a,currentCam:o}=$d(),s=lm(`microphone`),c=lm(`camera`),l=t===`joined-meeting`||!!n,[u,d]=O(!1),[f,p]=O(!1),[m,h]=O(!1),g=M(e=>{l?e.setLocalAudio(!0):Promise.resolve(e.startCamera({videoSource:!1})).catch(()=>{})},[l]),_=M(()=>{if(d(!0),!e){h(!0);return}g(e)},[e,g]);k(()=>{m&&e&&(h(!1),g(e))},[m,e,g]);let v=M(async()=>{if(e){p(!0);try{await e.setInputDevicesAsync({videoSource:!0})}catch{}e.setLocalVideo(!0)}},[e]);return{mic:j(()=>cm(sm(r,s,u,!!a),s),[r,s,u,a]),camera:j(()=>cm(sm(i,c,f,!!o),c),[i,c,f,o]),requestMic:_,requestCamera:v}}var dm=hn(`Flow`),fm=[`idle`,`unavailable`,`ended`];function pm({children:e}){let{config:t,retryInit:n}=Xp(),{cameraOnStart:r}=N(bt),{start:i,end:a,session:o,state:s,__beginAttempt:c,isSharedCallBusy:l,pendingLeave:u}=N(Ep),d=t.value.deployment_id??``,f=im(d),p=M(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;return n==null||e.channel!==`widget`&&e.channel!==`embed`?null:n},[t]),m=N(Jp),[h,g]=O(`idle`),[_,v]=O(!1),[y,b]=O(null),[x,S]=O(null),[C,w]=O(!1),{mic:T,camera:E,requestMic:ee,requestCamera:te}=um(),ne=j(()=>Bt(`idle`),[]);k(()=>{ne.value=h},[h,ne]),mn(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;n!=null&&(e.channel===`widget`||e.channel===`embed`)&&ne.value===`idle`&&f.value>=n&&(S(`daily_limit`),w(!1),g(`unavailable`))});let re=A(!1),ie=A(!1),ae=A(async()=>{}),oe=A(!1),se=A(null),ce=A(null),D=M(()=>{let e=se.current;se.current=null,e?.resolve()},[]),le=M(async(e=new AbortController)=>{ce.current=e;let{signal:r}=e;v(!0);try{let e=await m?.ensureToken(r)??{kind:`not-required`};if(r.aborted)return;if(e.kind===`unavailable`){S(e.reason===`unsupported`?`captcha_unsupported`:`error`),w(e.reason===`timeout`||e.reason===`exhausted`),g(`unavailable`);return}if(await i(void 0,{signal:r}),r.aborted)return;re.current=!1,ie.current=!1,p()!=null&&am(d),g(`call`)}catch(i){if(r.aborted)return;let a=Rf(i);if(Pf(i)){D(),b({kind:`microphone`,status:`blocked`}),g(`idle`);return}if(Vf(i)&&(t.peek().captcha??null)===null&&!ie.current)return ie.current=!0,dm.info(`/start demands a captcha the loaded config lacks; refreshing config`),await n(),r.aborted?void 0:await ae.current(e);if(Hf(i)&&!re.current){re.current=!0,v(!1),g(`idle`);return}if(re.current=!1,Wf(i)){dm.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`),S(`error`),w(!1),g(`unavailable`);return}if(a.status===401&&t.value.has_password===!0){g(`idle`);return}let o=Gf(a.kind)??`busy`;S(o),w(a.retryable),g(`unavailable`)}finally{ce.current===e&&(ce.current=null),v(!1)}},[i,t,p,d,m,n,D]);ae.current=le;let ue=M(async()=>{let e=se.current;if(e){b(null);try{await le(e.controller)}finally{se.current===e&&(se.current=null),e.resolve()}}},[le]),de=M(()=>{let e=se.current;if(e&&!e.proceeding){if(e.proceeding=!0,t.peek().customization.conversation.modality===`video`&&r===`on`&&!E.isGranted&&!E.isBlocked){b({kind:`camera`,status:E.status}),te().finally(()=>{ue()});return}ue()}},[t,r,E,te,ue]);k(()=>{if(se.current&&y?.kind===`microphone`){if(y.status!==T.status&&b({kind:`microphone`,status:T.status}),T.isGranted){de();return}if(T.isBlocked){let e=se.current;se.current=null,v(!1),e.resolve()}}},[y,T,de]);let fe=M(()=>{if(se.current)return se.current.promise;let e,t=new Promise(t=>{e=t});return se.current={promise:t,resolve:e,proceeding:!1,controller:new AbortController},v(!0),T.isGranted?de():T.isBlocked?(b({kind:`microphone`,status:T.status}),se.current=null,v(!1),e()):(b({kind:`microphone`,status:T.status}),ee()),t},[T,ee,de]),pe=M(async()=>{if(!fm.includes(h))return;let e=t.peek().customization,n=e.show_haircheck,r=e.conversation.modality,i=n&&r!==`chat`,a=!n&&r!==`chat`,o=p();if(o!=null&&f.value>=o){S(`daily_limit`),w(!1),g(`unavailable`);return}if(l()){S(`busy`),w(!0),g(`unavailable`);return}let s=u();if(s&&await s,c(),i&&!oe.current){g(`haircheck`);return}return a?fe():le()},[h,t,fe,le,p,f,c,l,u]),me=M(async()=>{h===`haircheck`&&(oe.current=!0,await le())},[h,le]),he=M(()=>{let e=se.current,t=e?.controller??ce.current;e&&(se.current=null,e.resolve(),b(null)),t?.abort(),t&&v(!1),h===`haircheck`&&g(`idle`)},[h]),ge=M(()=>{h===`call`&&g(`ended`)},[h]);k(()=>{let e=()=>{let e=se.current!==null||ce.current!==null,t=h===`haircheck`||h===`call`,n=o.peek()!==null,r=n&&s.peek()!==`ended`;(e||t||n)&&(he(),(h===`call`||r)&&g(`ended`),a())};return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[h,o,s,he,a]);let _e=M(()=>{S(null),w(!1),g(`idle`)},[]),ve=j(()=>({flowSignal:ne,setFlowState:g,isStarting:_,permissionRequest:y,unavailableCause:x,canRetry:C,start:pe,join:me,cancel:he,leave:ge,restart:_e}),[ne,_,y,x,C,pe,me,he,ge,_e]);return P(Kf.Provider,{value:ve,children:e})}var mm=we(null),hm=hn(`HostBridge`),gm=we(null);function _m(e){if(!e)return null;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}function vm({children:e}){let t=N(Ep),n=N(Nn),r=N(Kf),i=N(mm),a=N(bt),o=sn(null),s=a?.overrideConfig,c=M(e=>{o.value=_m(e)},[o]),l=M((e,t)=>{let n=o.peek();n&&n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})),hm.info(`Event:`,e,t)},[o]);k(()=>{let e=o.value;if(!e)return;let n={tavus:{start:t.start,end:t.end,sendChat:t.sendChat,sendMessage:t.sendMessage},startConversation:async()=>{try{r?await r.start():await t.start()}catch(e){hm.error(`startConversation failed`,e)}},endConversation:async()=>{try{let e=r?.flowSignal.peek();if(e===`call`){r?.leave();return}r?.cancel(),e!==`haircheck`&&t.session.peek()&&await t.end()}catch(e){hm.error(`endConversation failed`,e)}},sendMessage:e=>{t.sendMessage(typeof e==`string`?{event_type:`conversation.respond`,properties:{text:e}}:e)},updateConfig:t=>{let n=wn(s??{},t);e.setAttribute(`override-config`,JSON.stringify(n))},destroy:()=>{t.session.peek()&&t.end(),e.remove()}},a=i?{...n,open:i.expand,close:i.collapse}:n;return Object.assign(e,a),()=>{for(let t of Object.keys(a))delete e[t]}},[o.value,t,r,s,i]);let u=A(!1);k(()=>{u.current||o.value&&n&&(u.current=!0,l(`tavus:ready`,{deploymentId:n.deploymentId}))},[o.value,n,l]);let d=A(null),f=A(new Set);k(()=>t.state.subscribe(e=>{if(e!==d.current)switch(d.current=e,e){case`connected`:{let n=t.session.peek()?.conversationId??``;f.current.add(n),l(`tavus:conversation-started`,{conversationId:n}),l(`tavus:state-change`,{state:e});break}case`ended`:{let n=t.session.peek()?.conversationId??``;f.current.delete(n),l(`tavus:conversation-ended`,{conversationId:n}),l(`tavus:state-change`,{state:e});break}case`error`:l(`tavus:error`,{code:`CONVERSATION_ERROR`,message:t.error.peek()??`Unknown error`}),l(`tavus:state-change`,{state:e});break;default:l(`tavus:state-change`,{state:e})}}),[t,l]),mn(()=>{if(!r)return;let e=r.flowSignal.value;l(`tavus:mode-change`,{mode:e})}),k(()=>{let e={onUtterance(e){l(`tavus:protocol-message`,{kind:`utterance`,event_type:`conversation.utterance`,properties:e})},onToolCall(e){l(`tavus:tool-call`,e),l(`tavus:protocol-message`,{kind:`tool_call`,event_type:`conversation.tool_call`,properties:e})},onPerception(e){l(`tavus:protocol-message`,e)},onSpeakingState({who:e,state:t,seq:n,turn_idx:r}){let i={state:t,...n===void 0?{}:{seq:n},...r===void 0?{}:{turn_idx:r}};l(`tavus:protocol-message`,{kind:`speaking`,event_type:e===`replica`?t===`started`?`conversation.replica_started_speaking`:`conversation.replica_stopped_speaking`:t===`started`?`conversation.user_started_speaking`:`conversation.user_stopped_speaking`,properties:i})},onMessage(e){l(`tavus:protocol-message`,e)}};return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[t,l]);let p=j(()=>({shadowHost:o,dispatchEvent:l}),[o,l]);return P(gm.Provider,{value:p,children:[P(`div`,{ref:c,style:`display:contents`}),e]})}var ym=we(null);function bm({children:e}){let{config:t}=N(Nn),n=j(()=>Gt(()=>{let e=t.value.customization.style;return e.mode===`dark`||e.mode===`system`&&(globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1)}),[t]),r=j(()=>Gt(()=>{let e=t.value.customization.style;return e.style===`basic`?n.value?`white-black`:`black-white`:n.value?`${e.style}-dark`:e.style}),[t,n]),i=j(()=>Gt(()=>wm(t.value.customization.style)),[t]),a=j(()=>({dataTheme:r,isDark:n,cssVars:i}),[r,n,i]);return P(ym.Provider,{value:a,children:P(`div`,{"data-theme":r.value,style:Tm(i.value),class:`contents`,children:e})})}var xm=[0,.125,.25,.5,.75],Sm=[0,1,2,3,4],Cm=[0,.2,.25,.3];function wm(e){return{"--radius-box":`${xm[e.boxes_radius]??.5}rem`,"--radius-field":`${xm[e.field_radius]??.25}rem`,"--radius-selector":`${xm[e.selectors_radius]??.5}rem`,"--border":`${Sm[e.border_width]??1}px`,"--size-field":`${Cm[e.fields_size]??.25}rem`,"--size-selector":`${Cm[e.selectors_size]??.25}rem`,"--depth":e.depth_effect?`1`:`0`,"--noise":e.noise_effect?`1`:`0`}}function Tm(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}var Em=.5,Dm=.01;function Om(e,t){if(!jm(e)||!jm(t))return null;let n=e.left-t.left,r=e.top-t.top,i=e.width/t.width,a=e.height/t.height;return Math.abs(n)<Em&&Math.abs(r)<Em&&Math.abs(i-1)<Dm&&Math.abs(a-1)<Dm?null:`translate(${Mm(n)}px, ${Mm(r)}px) scale(${Mm(i)}, ${Mm(a)})`}function km(e){if(e==null)return null;let t=Am(e.width),n=Am(e.height);return t===null&&n===null?null:{width:t,height:n}}function Am(e){return Number.isFinite(e)&&e>0?e:null}function jm(e){return Number.isFinite(e.left)&&Number.isFinite(e.top)&&Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>0&&e.height>0}function Mm(e){return Math.round(e*1e3)/1e3}function Nm(e,t){k(()=>{let n=e.current;if(!n)return;let r=new ResizeObserver(e=>{let n=e[0];n&&t(n)});return r.observe(n),()=>r.disconnect()},[e,t])}var Pm=new WeakMap;function Fm(e){let t=Pm.get(e);t?t.holders+=1:Pm.set(e,{holders:1,restore:Im(e)});let n=!1;return()=>{if(n)return;n=!0;let t=Pm.get(e);t&&(--t.holders,!(t.holders>0)&&(Pm.delete(e),t.restore()))}}function Im(e){let{body:t,documentElement:n}=e,r=n.style.overflowX,i=n.style.overflowY,a=t.style.paddingRight,o=n.clientWidth;n.style.overflow=`hidden`;let s=n.clientWidth-o,c=s>0?`${Lm(t)+s}px`:null;return c&&(t.style.paddingRight=c),()=>{n.style.overflow===`hidden`&&(n.style.overflow=``,n.style.overflowX=r,n.style.overflowY=i),c&&t.style.paddingRight===c&&(t.style.paddingRight=a)}}function Lm(e){let t=e.ownerDocument.defaultView?.getComputedStyle(e).paddingRight,n=Number.parseFloat(t??``);return Number.isFinite(n)?n:0}var Rm=we(null),zm=480,Bm=768,Vm=`relative w-full h-full`,Hm=`m-0 p-0 border-0 bg-transparent text-inherit max-w-none max-h-none`,Um=`${Hm} block static w-full h-full`,Wm=`${Hm} fixed inset-0 flex items-center justify-center w-screen h-dvh backdrop:bg-black/60 motion-safe:backdrop:animate-[tavusFadeIn_180ms_ease-out]`,Gm=`relative outline-none aspect-[var(--tavus-expand-aspect)] [--tavus-expand-default-max-width:1280px] [--tavus-expand-default-max-height:900px] [@media(min-width:2560px)]:[--tavus-expand-default-max-width:1600px] [@media(min-width:2560px)]:[--tavus-expand-default-max-height:1200px] w-[var(--tavus-expand-width)] h-[var(--tavus-expand-height)] max-w-[var(--tavus-expand-max-width)] max-h-[var(--tavus-expand-max-height)] [@media(max-width:768px)]:w-screen [@media(max-width:768px)]:h-dvh [@media(max-width:768px)]:max-w-none [@media(max-width:768px)]:max-h-none`,Km=280,qm=`cubic-bezier(0.22, 1, 0.36, 1)`,Jm={kind:`inline`};function Ym(e,t,{isStarting:n=!1,awaitingPermission:r=!1,startWasUnderway:i=!1}={}){return e?t===`haircheck`||t===`call`||n||r?!0:t===`unavailable`&&i:!1}function Xm(e){return typeof e?.showModal==`function`&&typeof e.close==`function`}function Zm(e,t){let n=e.flowSignal.peek(),r=n===`call`,i=r||n===`haircheck`||e.isStarting;e.cancel(),r&&e.leave(),i&&t?.()}function Qm({children:e}){let t=A(null),n=A(null),r=j(()=>Bt(`full`),[]),[i,a]=O(Jm),o=N(bt),s=N(Kf),c=N(gm),l=N(Jp),u=N(Ep),d=o?.expandOptions,f=c?.shadowHost.value??null,p=s?.flowSignal.value??`idle`,m=s?.isStarting??!1,h=s?.permissionRequest!=null,g=A(!1);k(()=>{m||p===`haircheck`||p===`call`?g.current=!0:(p===`idle`||p===`ended`)&&(g.current=!1)},[m,p]);let _=Ym(d?.enabled===!0,p,{isStarting:m,awaitingPermission:h,startWasUnderway:g.current}),v=i.kind!==`inline`;$e(()=>{let e=t.current;if(e){if(i.kind===`inline`){if(!_||!Xm(n.current))return;let t=e.getBoundingClientRect();a({kind:`expanding`,from:t,slot:km(f?.getBoundingClientRect())})}else!_&&i.kind!==`collapsing`?a({kind:`collapsing`,from:e.getBoundingClientRect(),slot:i.slot}):_&&i.kind===`collapsing`&&a({kind:`expanding`,from:e.getBoundingClientRect(),slot:i.slot})}},[_,i,f]);let y=i.kind===`inline`?null:i.slot;$e(()=>{if(!f||!y)return;let e=f.style.minWidth,t=f.style.minHeight;return y.width!==null&&(f.style.minWidth=`${y.width}px`),y.height!==null&&(f.style.minHeight=`${y.height}px`),()=>{f.style.minWidth=e,f.style.minHeight=t}},[f,y]);let b=M(()=>{s&&Zm(s,u?.end)},[s,u]),x=A(b);x.current=b,$e(()=>{let e=n.current;if(!e||!v||!Xm(e))return;let t=()=>{e.isConnected&&!e.open&&(e.showModal(),x.current())};return e.addEventListener(`close`,t),e.open||e.showModal(),()=>{e.removeEventListener(`close`,t),e.open&&e.close()}},[v]),$e(()=>{if(f&&v)return Fm(f.ownerDocument)},[f,v]),$e(()=>{let e=t.current;if(!e||i.kind!==`expanding`&&i.kind!==`collapsing`)return;let n=()=>a(i.kind===`expanding`?{kind:`expanded`,slot:i.slot}:Jm),r=e.getBoundingClientRect(),o=c?.shadowHost.peek()??null,s=i.kind===`expanding`?r:o?.getBoundingClientRect()??r,l=Om(i.from,r)??`none`,u=Om(s,r)??`none`,d=globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1;if(l===u||d||typeof e.animate!=`function`){n();return}let f=e.animate([{transform:l,transformOrigin:`top left`},{transform:u,transformOrigin:`top left`}],{duration:Km,easing:qm,fill:`forwards`}),p=!1;return f.finished.then(()=>{p||n()},()=>{}),()=>{p=!0,f.cancel()}},[i,c]),$e(()=>{let e=n.current;if(!e||!v)return;let t=e=>{e.preventDefault(),x.current()};return e.addEventListener(`cancel`,t),()=>e.removeEventListener(`cancel`,t)},[v]);let S=M(e=>{let t=e.contentRect.width;t<zm?r.value=`compact`:t<Bm?r.value=`medium`:r.value=`full`},[r]);k(()=>{if(l)return l.promptSlot.value=t.current,()=>{l.promptSlot.value=null}},[l,v]),Nm(t,S);let C=j(()=>({layoutMode:r,containerRef:t}),[r,t]);return P(Rm.Provider,{value:C,children:P(`dialog`,{ref:n,class:v?Wm:Um,"aria-label":v?`Conversation`:void 0,role:v?void 0:`none`,children:P(`div`,{ref:t,class:v?Gm:Vm,style:v?_t(gt(d).vars):void 0,tabIndex:v?-1:void 0,autofocus:v,children:e})})})}var $m=`@container/conversation w-full h-full`,eh=`motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,th=`relative w-full h-full max-h-screen aspect-video @max-mobile:aspect-9/16 overflow-hidden rounded-box`;function nh({animate:e=!1,innerClassName:t,innerStyle:n,innerRef:r,role:i,"aria-live":a,"aria-label":o,children:s}){return P(`div`,{class:e?`${$m} ${eh}`:$m,children:P(`div`,{ref:r,class:t?`${th} ${t}`:th,style:n,role:i,"aria-live":a,"aria-label":o,children:s})})}var rh=41/2,ih=23/2,ah=Math.hypot(rh,ih),oh=Array.from({length:1008},(e,t)=>{let n=t%42,r=Math.floor(t/42),i=Math.hypot(n-rh,r-ih)/ah*.82,a=.34+(n*13+r*7)%34/100;return{delay:`${i.toFixed(3)}s`,opacity:a.toFixed(2)}});function sh(){return P(nh,{innerClassName:`embed-loading-screen`,role:`status`,"aria-live":`polite`,"aria-label":`Loading deployment`,children:P(`div`,{class:`embed-loading-dot-field`,"aria-hidden":`true`,style:{"--dot-columns":`42`,"--dot-rows":`24`},children:oh.map((e,t)=>P(`span`,{class:`embed-loading-field-dot`,style:{"--dot-delay":e.delay,"--dot-opacity":e.opacity}},t))})})}var ch=we(null);function lh({children:e}){let t=A(null);return P(ch.Provider,{value:{frameRef:t},children:P(`div`,{class:`@container/conversation w-full h-full`,children:P(`div`,{ref:t,class:`relative w-full h-full max-h-screen aspect-video @max-mobile:aspect-9/16 overflow-hidden rounded-box bg-base-100 has-[.cvi-video-surface]:will-change-transform`,children:e})})})}var uh=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),dh=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function fh(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:dh(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var ph=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},mh=e=>{let t=ph(e);return t.charAt(0).toUpperCase()+t.slice(1)},hh={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function gh(e){return e!=null}function _h(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??hh.width,a=e.size??e.height??hh.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?uh(...c):uh(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??hh[`stroke-width`])*Number(e.size??e.width??hh.width)/Number(t.size??t.width??hh.width):t.strokeWidth??hh[`stroke-width`];return[`svg`,{...Object.entries(hh).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&gh(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&gh(t.width)&&{[r(`width`)]:t.width},...`height`in t&&gh(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var vh=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},yh=we({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,nonScalingStroke:!1,class:``}),bh=()=>N(yh),xh=({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,children:s,iconNode:c=[],icon:l={node:c,aliases:[],size:24},class:u=``,...d})=>{let{size:f=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,nonScalingStroke:h=!1,color:g=`currentColor`,class:_=``}=bh()??{},[v,y,b=[]]=_h(l,{color:e??g,width:n??t??f,height:r??t??f,strokeWidth:i??p,absoluteStrokeWidth:a??m,nonScalingStroke:o??h,className:uh(_,u),hasA11yProp:!!s||vh(d),attributes:d});return w(v,{...y},[...b.map(([e,t])=>w(e,t)),...D(s)])};function Sh(e,t,n=[]){let r=typeof e==`string`?fh(e,t,n):e,i=({class:e=``,className:t=``,children:n,...i})=>w(xh,{...i,icon:r,class:uh(e,t)},n);return r.name&&(i.displayName=mh(r.name)),i}var Ch=Sh({name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]}),wh=Sh({name:`camera-off`,size:24,node:[[`path`,{d:`M14.564 14.558a3 3 0 1 1-4.122-4.121`,key:`1rnrzw`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M20 20H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 .819-.175`,key:`1x3arw`}],[`path`,{d:`M9.695 4.024A2 2 0 0 1 10.004 4h3.993a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v7.344`,key:`1i84u0`}]]}),Th=Sh({name:`captions`,size:24,node:[[`rect`,{width:`18`,height:`14`,x:`3`,y:`5`,rx:`2`,ry:`2`,key:`12ruh7`}],[`path`,{d:`M7 15h4M15 15h2M7 11h2M13 11h4`,key:`1ueiar`}]],aliases:[`subtitles`]}),Eh=Sh({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]}),Dh=Sh({name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]}),Oh=Sh({name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]}),kh=Sh({name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]}),Ah=Sh({name:`face-slightly-smiling`,size:24,node:[[`path`,{d:`M15 10V9`,key:`4dkmfx`}],[`path`,{d:`M16.472 15a6 6 0 01-8.943 0`,key:`7qomzy`}],[`path`,{d:`M9 10V9`,key:`1lazqi`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],aliases:[`smile`]}),jh=Sh({name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]}),Mh=Sh({name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]}),Nh=Sh({name:`mic-off`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]}),Ph=Sh({name:`mic`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]}),Fh=Sh({name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]}),Ih=Sh({name:`monitor-up`,size:24,node:[[`path`,{d:`m9 10 3-3 3 3`,key:`11gsxs`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}]]}),Lh=Sh({name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]}),Rh=Sh({name:`phone-off`,size:24,node:[[`path`,{d:`M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272`,key:`1wngk7`}],[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}],[`path`,{d:`M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473`,key:`10hv5p`}]]}),zh=Sh({name:`picture-in-picture-2`,size:24,node:[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`,key:`daa4of`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`,key:`1nb8gs`}]]}),Bh=Sh({name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]}),Vh=Sh({name:`shrink`,size:24,node:[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`,key:`17vawe`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`,key:`chjx8e`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`,key:`lav6yq`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`,key:`1pxi2q`}]]}),Hh=Sh({name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]}),Uh=Sh({name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]}),Wh=Sh({name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]}),Gh=Sh({name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]});function Kh(e,t){return({size:n=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>P(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,children:P(e,{size:n})})}var qh={close:Kh(Gh,`Close`),cancel:Kh(Gh,`Cancel`),leave:Kh(Rh,`Leave call`),more:Kh(Dh,`More`),error:Kh(Hh,`Error`),mic:Kh(Ph,`Microphone`),"mic-off":Kh(Nh,`Microphone muted`),cam:Kh(Ch,`Camera`),"cam-off":Kh(wh,`Camera off`),"screen-share":Kh(Ih,`Screen share`),pip:Kh(zh,`Picture in picture`),user:Kh(Uh,`User`),"face-smile":Kh(Ah,`Camera off`),captions:Kh(Th,`Closed captions`),chat:Kh(Mh,`Chat`),fullscreen:Kh(jh,`Enter fullscreen`),"fullscreen-exit":Kh(Fh,`Exit fullscreen`),expand:Kh(Oh,`Expand`),collapse:Kh(Vh,`Collapse`),send:Kh(Bh,`Send`),"external-link":Kh(kh,`External link`),clock:Kh(Eh,`Clock`),moon:Kh(Lh,`Unavailable`),users:Kh(Wh,`Busy`)},Jh=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 21h-2v-2h2v2Zm-6-2H4v-2h10v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h-2v-2h-2v-2h-2V7h2v2h2V7h2V5h2v14ZM4 17H2V7h2v10Zm12 0h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2H8V9h2v2ZM8 9H6V7h2v2ZM6 7H4V5h2v2Zm8 0h-4V5h4v2ZM4 5H2V3h2v2Z"/></svg>`,Yh=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M3 4h18v2H3zm0 14h18v2H3zM1 6h2v12H1zm20 0h2v12h-2zM5 10h2v4H5zm8 0h2v4h-2zM7 8h4v2H7zm0 6h4v2H7zm8 0h4v2h-4zm0-6h4v2h-4z"/></svg>`,Xh=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M22 22h-2v-2h-2v-2h2v-8h2v12Zm-4-4h-8v-2h8v2ZM4 12h2v2H4v2H2V4h2v8Zm6 4H8v-6h2v6Zm10-6H10V8h10v2Zm-4-4h-2V4h2v2Zm-2-2H4V2h10v2Z"/></svg>`,Zh=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12Zm-5-1h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2V6h2v7ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,Qh=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm4 0H6v-2h2v2Zm14 0h-2V6h2v12Zm-12-2H8v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V8h2v2Zm2-2h-2V6h2v2ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,$h=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M7 19H5v-2h2v2Zm12 0h-2v-2h2v2ZM9 15v2H7v-2h2Zm8 2h-2v-2h2v2Zm-6-2H9v-2h2v2Zm4 0h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2H9V9h2v2Zm4 0h-2V9h2v2ZM9 9H7V7h2v2Zm8 0h-2V7h2v2ZM7 7H5V5h2v2Zm12 0h-2V5h2v2Z"/></svg>`,eg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M7 19h2v-2h2v-2h2v2h2v2h2v2H7v-2Zm13-6H4v-2h16v2Zm-3-8h-2v2h-2v2h-2V7H9V5H7V3h10v2Z"/></svg>`,tg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2V4h2v16Zm18 0h-2V4h2v16Zm-9-2h-2v-2h2v2Zm0-4h-2V6h2v8Zm7-10H4V2h16v2Z"/></svg>`,ng=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M15 19h-2v2h-2v-2H9v-2H7v-2h10v2h-2v2Zm5-6H4v-2h16v2Zm-7-8h2v2h2v2H7V7h2V5h2V3h2v2Z"/></svg>`,rg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M8 22H4v-2h4v2Zm12 0h-4v-2h4v2ZM4 20H2v-4h2v4Zm18 0h-2v-4h2v4Zm-6-3H8v-2h8v2Zm-8-2H6V9h2v6Zm10 0h-2V9h2v6Zm-2-6H8V7h8v2ZM4 8H2V4h2v4Zm18 0h-2V4h2v4ZM8 4H4V2h4v2Zm12 0h-4V2h4v2Z"/></svg>`,ig=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4V4h2v16Zm14 0h-2v-3h2v3ZM16 9h2v2h2v2h-2v2h-2v2h-2v-4H8v-2h6V7h2v2Zm4-2h-2V4h2v3Zm-2-3H6V2h12v2Z"/></svg>`,ag=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm-5-4H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8 0h-4v-2h4v2Zm6 0h-2v-6h2v6Zm-10-2H8V4h2v10Zm6 0h-2V4h2v10ZM14 4h-4V2h4v2Z"/></svg>`,og=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm9 0h-2v-2h2v2Zm-2-2h-2v-2h2v2ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8-2h2v2h-6v-2h2v-2h2v2Zm-4-4h2v2h-2v2H8V8h2v2Zm10 4h-2v-4h2v4Zm-4-4h-2V4h2v6ZM8 8H6V6h2v2ZM6 6H4V4h2v2ZM4 4H2V2h2v2Zm10 0h-4V2h4v2Z"/></svg>`,sg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H8v-2h10v2ZM8 20H6v-2h2v2Zm12 0h-2v-2h2v2ZM6 18H4v-2h2v2Zm16 0h-2v-4h-2v-2h2v-2h2v8ZM4 16H2V6h2v10Zm14 0h-6v-2h6v2Zm-6-2h-2v-2h2v2Zm-2-2H8V6h2v6ZM6 6H4V4h2v2Zm8-2h-2v2h-2V4H6V2h8v2Z"/></svg>`,cg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M5 15H3v-2h2v2Zm8 0h-2v-2h2v2Zm8 0h-2v-2h2v2ZM3 13H1v-2h2v2Zm4 0H5v-2h2v2Zm4 0H9v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2ZM5 11H3V9h2v2Zm8 0h-2V9h2v2Zm8 0h-2V9h2v2Z"/></svg>`,lg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 20H4v-2h16v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12ZM18 8v6h-8V8h8Zm2-2H4V4h16v2Zm-4 4h-4v2h4v-2Z"/></svg>`,ug=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 18h-7v2h3v2H8v-2h3v-2H4v-2h16v2ZM4 16H2V4h2v12Zm18 0h-2v-6h2v6Zm-6-6h-2V8h2v2Zm2-2h-2V6h2v2Zm4-6v6h-2V6h-2V4h-2V2h6Zm-8 2H4V2h10v2Z"/></svg>`,dg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M4 19h4v2H2v-8h2v6Zm8 0H8v-2h4v2Zm4-2h-4v-2h4v2Zm4-2h-4v-2h4v2Zm-10-2H4v-2h6v2Zm12 0h-2v-2h2v2ZM8 5H4v6H2V3h6v2Zm12 6h-4V9h4v2Zm-4-2h-4V7h4v2Zm-4-2H8V5h4v2Z"/></svg>`,fg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M6 22H4v-4h2v4Zm14 0h-2v-4h2v4ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2Zm-2-2H8v-2h8v2Zm-1-4H9v-2h6v2Zm-6-2H7V4h2v6Zm8 0h-2V4h2v6Zm-2-6H9V2h6v2Z"/></svg>`,pg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M2 22H0v-4h2v4Zm14 0h-2v-4h2v4Zm8 0h-2v-4h2v4ZM4 18H2v-2h2v2Zm10 0h-2v-2h2v2Zm8 0h-2v-2h2v2Zm-10-2H4v-2h8v2Zm8 0h-4v-2h4v2Zm-9-4H5v-2h6v2Zm8 0h-4v-2h4v2ZM5 10H3V4h2v6Zm8 0h-2V4h2v6Zm8 0h-2V4h2v6ZM11 4H5V2h6v2Zm8 0h-4V2h4v2Z"/></svg>`,mg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2v-6H0v-2h2V8h2v12Zm18-8h2v2h-2v6h-2V8h2v4Zm-8 6h-4v-2h4v2Zm-4-2H8v-2h2v2Zm6 0h-2v-2h2v2Zm-6-4H8v-2h2v2Zm6 0h-2v-2h2v2Zm-3-6h7v2H4V6h7V4h2v2Zm4-2h-4V2h4v2Z"/></svg>`,hg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M17 21H5v-2h12v2ZM5 19H3V7h2v12Zm14 0h-2v-6h2v6Zm-8-4H9v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V9h2v2Zm6 0h-2V7h-2V5h-4V3h8v8Zm-4-2h-2V7h2v2Zm-6-2H5V5h6v2Z"/></svg>`,gg=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M16 9h2V7h2V5h2v14h-2v-2h-2v-2h-2v4H2V5h14v4ZM4 17h10V7H4v10Z"/></svg>
54
- `;function _g(e){return e.replace(/\s(width|height)="\d+"/g,``)}function vg(e,t){let n=_g(e);return({size:e=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>P(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,style:{display:`inline-flex`,width:e,height:e},dangerouslySetInnerHTML:{__html:n.replace(`<svg`,`<svg width="100%" height="100%"`)}})}var yg={pixelarticons:{close:vg(Qh,`Close`),cancel:vg($h,`Cancel`),leave:vg(ig,`Leave call`),more:vg(cg,`More`),error:vg(tg,`Error`),mic:vg(ag,`Microphone`),"mic-off":vg(og,`Microphone muted`),cam:vg(gg,`Camera`),"cam-off":vg(Jh,`Camera off`),"screen-share":vg(ug,`Screen share`),pip:vg(lg,`Picture in picture`),user:vg(fg,`User`),"face-smile":vg(mg,`Camera off`),captions:vg(Yh,`Closed captions`),chat:vg(Xh,`Chat`),fullscreen:vg(rg,`Enter fullscreen`),"fullscreen-exit":vg(eg,`Exit fullscreen`),expand:vg(ng,`Expand`),collapse:vg(eg,`Collapse`),send:vg(dg,`Send`),"external-link":vg(hg,`External link`),clock:vg(Zh,`Clock`),moon:vg(sg,`Unavailable`),users:vg(pg,`Busy`)},lucide:qh};function bg({name:e,...t}){let{config:n}=Xp(),r=(yg[n.value.customization.style.icon_library]??yg.pixelarticons)[e];return P(r,{...t})}var xg=`Ready when you are`,Sg=`Start the conversation`;function Cg(e){return typeof e==`string`&&e.length>0?e:``}function wg(e){let t=Cg(e.replica_thumbnail_image_url)||null,n=Cg(e.replica_thumbnail_video_url)||null;return!t&&!n?null:{imageUrl:t,videoUrl:n}}function Tg(e){let{preview:t}=e.customization,{background:n}=t,r=wg(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=Cg(n.url);return{title:t.title||xg,description:t.description||``,btn_title:t.btn_title||Sg,background:{type:i,url:a}}}var Eg={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`},Dg=`#t=0.1`;function Og(e){return e.includes(`#`)?e:`${e}${Dg}`}function kg({replica:e,fallback:t=null}){let[n,r]=O(()=>new Set),i=e=>r(t=>new Set(t).add(e)),a=`absolute inset-0 w-full h-full object-cover`,{imageUrl:o,videoUrl:s}=e;return o&&!n.has(o)?P(`img`,{class:a,src:o,loading:`lazy`,alt:``,onError:()=>i(o)}):s&&!n.has(s)?P(`video`,{class:a,src:Og(s),muted:!0,playsinline:!0,preload:`metadata`,controls:!1,onError:()=>i(s)}):P(E,{children:t})}function Ag({variant:e,replica:t}){let[n,r]=O(!1);return k(()=>{r(!1)},[e.url]),e.type===`replica`&&t?P(kg,{replica:t,fallback:P(`div`,{class:`absolute inset-0`,style:Eg})}):e.type===`custom-image`&&e.url&&!n?P(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:e.url,loading:`lazy`,alt:``,onError:()=>r(!0)}):P(`div`,{class:`absolute inset-0`,style:Eg})}function jg({className:e=``}){let{config:t}=Xp(),n=Tg(t.value),r=wg(t.value);return P(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:P(Ag,{variant:n.background,replica:r})})}var Mg=`absolute inset-0 bg-base-100 text-base-content flex flex-col items-center justify-center gap-6 px-6 py-8 text-center overflow-y-auto motion-safe:animate-[tavusFadeUp_280ms_ease-out]`;function Ng({title:e,description:t,media:n,children:r,overlay:i}){return P(`div`,{class:Mg,children:[n===void 0?P(jg,{}):n,(e||t)&&P(`div`,{class:`flex flex-col items-center gap-3 max-w-sm`,children:[e&&P(`h2`,{class:`text-lg font-medium leading-snug`,children:e}),t&&P(`p`,{class:`text-base text-base-content/60 tracking-wide leading-snug`,children:t})]}),r&&P(`div`,{class:`flex flex-col items-center gap-3`,children:r}),i]})}function Pg({loading:e=!1,disabled:t,class:n,children:r,...i}){return P(`button`,{type:`button`,class:`btn relative ${n?` ${n}`:``}`,disabled:t||e,"aria-busy":e||void 0,...i,children:[P(`span`,{children:r}),e&&P(`span`,{class:`absolute inset-0 flex items-center justify-center backdrop-blur-xs`,"aria-hidden":`true`,children:P(`span`,{class:`loading loading-spinner loading-sm`})})]})}var Fg={daily_limit:{title:`PAL is at today's limit`,description:`This PAL can take more conversations tomorrow.`},total_limit:{title:`PAL is unavailable`,description:`This PAL isn't available right now. Please check back later.`},busy:{title:`PAL is in another conversation`,description:`Please try again in a moment.`},error:{title:`Couldn't load this PAL`,description:`This PAL couldn't be loaded. Please try again later.`},captcha_unsupported:{title:`This PAL isn't available on this device`,description:`The security check couldn't run in this browser. Please try another device.`}};function Ig(e,t){let n=t?.[e];return{title:n?.title||Fg[e].title,description:n?.description||Fg[e].description}}var Lg={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`,captcha_unsupported:`error`},Rg={daily_limit:`never`,total_limit:`never`,busy:`always`,error:`when-retryable`,captcha_unsupported:`never`};function zg({cause:e}){return P(`div`,{class:`flex size-16 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/70`,children:P(bg,{name:Lg[e],size:`2rem`})})}function Bg({cause:e,canRetry:t,onRetry:n,onCancel:r,isStarting:i=!1}){let{config:a}=Xp(),o=a.value.customization?.unavailable_screen,s=Ig(e,o),c=o?.cta??[],l=Rg[e],u=l===`always`||l===`when-retryable`&&t,d=u||c.length>0||!!r;return P(Ng,{media:P(zg,{cause:e}),title:s.title,description:s.description,children:d&&P(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:[u&&P(Pg,{class:`btn-neutral rounded-box`,disabled:!t,loading:i,onClick:n,children:`Try again`}),c.map(e=>P(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url)),r&&P(`button`,{type:`button`,class:`btn btn-ghost`,onClick:r,children:`Close`})]})})}function Vg(){let e=N(Kf);return{state:e.flowSignal.value,isStarting:e.isStarting,permissionRequest:e.permissionRequest,unavailableCause:e.unavailableCause,canRetry:e.canRetry,start:e.start,join:e.join,cancel:e.cancel,leave:e.leave,restart:e.restart}}var Hg={start_button:`Start the conversation`,ready_to_start:``};function Ug(){let{config:e}=Xp(),{preview:t}=e.value.customization;return j(()=>({start_button:t.btn_title??Hg.start_button,ready_to_start:t.description??Hg.ready_to_start}),[t])}function Wg(){return N(bt)?.layout??`inline`}function Gg({kind:e,status:t}){if(e===`camera`)return`Allow camera access to use video. Camera is optional.`;switch(t){case`blocked`:return`Microphone is blocked. Allow access in your browser settings to continue.`;case`in-use`:return`Your microphone is in use by another app. Close it and try again.`;case`not-found`:return`No microphone found. Connect one to continue.`;case`unsupported`:return`This browser can't access your microphone.`;default:return`Allow microphone access to start the conversation.`}}function Kg({message:e,class:t}){return P(`div`,{class:`w-max max-w-[min(20rem,80vw)] ${t??``}`,children:[P(`div`,{class:`px-4 py-2 rounded-box bg-neutral text-neutral-content text-sm font-medium shadow-lg text-center`,role:`status`,"aria-live":`polite`,children:e}),P(`svg`,{class:`absolute left-1/2 -translate-x-1/2 top-full text-neutral`,width:`16`,height:`8`,viewBox:`0 0 16 8`,"aria-hidden":`true`,children:P(`path`,{d:`M0 0 L8 8 L16 0 Z`,fill:`currentColor`})})]})}var qg=`text-preview-title @max-mobile:text-preview-title-narrow`,Jg=`text-preview-title-full-screen`,Yg=`text-sm @max-mobile:text-xs`,Xg=`text-preview-description-full-screen`;function Zg({title:e,description:t,fullScreen:n}){return!e&&!t?null:P(`div`,{class:`flex flex-col gap-1 text-left ${n?`max-w-xl`:`max-w-sm`}`,children:[e&&P(`h2`,{class:`${n?Jg:qg} font-medium leading-tight`,children:e}),t&&P(`p`,{class:`${n?Xg:Yg} text-white/80 leading-snug`,children:t})]})}var Qg=`absolute inset-0 overflow-hidden bg-base-100 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,$g=`absolute inset-x-0 top-0 h-2/5 bg-linear-to-b from-black/60 to-transparent`,e_=`absolute inset-x-0 bottom-0 h-2/5 bg-linear-to-t from-black/70 to-transparent`,t_=`absolute inset-0 bg-black/45`,n_=`absolute inset-0 overflow-y-auto p-8 @max-mobile:p-5 text-white [text-shadow:0_1px_3px_rgb(0_0_0/0.45)]`;function r_({title:e,description:t,children:n,align:r=`low`,overlay:i,class:a,role:o,"aria-live":s}){let{config:c}=Xp(),l=Tg(c.value),u=wg(c.value),d=Wg()===`full-screen`;return P(`div`,{class:a?`${Qg} ${a}`:Qg,role:o,"aria-live":s,children:[P(Ag,{variant:l.background,replica:u}),r===`center`?P(E,{children:[P(`div`,{class:t_}),P(`div`,{class:`${n_} flex flex-col items-center justify-center gap-3`,children:n})]}):P(E,{children:[(e||t)&&(d?P(`div`,{class:$g}):P(E,{children:[P(`div`,{class:`${$g} hidden @max-mobile:block`}),P(`div`,{class:e_})]})),d?P(`div`,{class:n_,children:[P(Zg,{title:e,description:t,fullScreen:!0}),P(`div`,{class:`absolute inset-x-8 @max-mobile:inset-x-5 bottom-[20%] flex flex-col items-center gap-3`,children:n})]}):P(`div`,{class:`${n_} grid grid-cols-[1fr_auto] grid-rows-[1fr_auto] gap-x-6`,children:[P(`div`,{class:`col-start-1 row-start-2 self-center @max-mobile:col-span-2 @max-mobile:row-start-1 @max-mobile:self-start`,children:P(Zg,{title:e,description:t})}),P(`div`,{class:`col-start-2 row-start-2 self-end justify-self-end flex flex-col items-end gap-3`,children:n})]})]}),i]})}var i_={video:`cam`,audio:`mic`,chat:`chat`},a_={"full-screen":`btn-lg px-16 @max-3xl:px-10 @max-md:btn-md @max-md:px-5`,inline:`px-8 @max-mobile:px-5`};function o_({children:e,loading:t=!1,...n}){let{config:r}=Xp(),i=Wg(),a=i_[r.value.customization.conversation.modality],o=a!==void 0&&i===`full-screen`;return P(Pg,{class:`btn-preview-action rounded-box ${a_[i]}`,loading:t,...n,children:o?P(`span`,{class:`flex items-center justify-center gap-2`,children:[P(bg,{name:a,"aria-hidden":!0}),e]}):e})}var s_=`Thanks for joining`,c_=`You can start a new conversation whenever you're ready.`,l_=`Start a new conversation`;function u_(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function d_({text:e,onRestart:t,isStarting:n=!1,permissionRequest:r=null}){let{config:i}=Xp(),a=Wg()===`full-screen`,o=i.value.customization.after_call,s=o.cta.filter(e=>u_(e.url)),c=o.title||e?.title||s_,l=o.description||e?.description||c_,u=e?.restart||l_;return P(r_,{title:c,description:l,children:[P(`div`,{class:`relative`,children:[r&&P(Kg,{message:Gg(r),class:`absolute bottom-full mb-3 z-20 ${a?`left-1/2 -translate-x-1/2`:`right-0`}`}),P(o_,{onClick:t,loading:n,children:u})]}),s.length>0&&P(`div`,{class:`flex flex-wrap items-center gap-2 ${a?`justify-center`:`justify-end`}`,children:s.map(e=>P(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn rounded-box border-white/50 bg-black/35 text-white backdrop-blur-xs hover:bg-black/50`,children:e.title},e.url))})]})}function f_(){let e=Hd(),t=Wd(),{isOff:n}=Xd(t),{camState:r}=$d();return{isCamReady:j(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:M(()=>{e?.setLocalVideo(n)},[e,n])}}function p_(){let e=Hd(),t=Wd(),{isOff:n}=Zd(t),{micState:r}=$d();return{isMicReady:j(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:M(()=>{e?.setLocalAudio(n)},[e,n])}}function m_(){let e=Hd(),t=Wd(),{isOff:n}=Qd(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:M(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}var h_={microphone:`microphone`,camera:`camera`};function g_({class:e}){return P(`svg`,{class:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[P(`circle`,{cx:`7`,cy:`8`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),P(`circle`,{cx:`16`,cy:`16`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),P(`path`,{d:`M2 8h2.5M9.5 8H22M2 16h11.5M18.5 16H22`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`})]})}function __(){return P(`svg`,{viewBox:`0 0 240 180`,class:`w-full h-auto text-base-content/70`,fill:`none`,"aria-hidden":`true`,children:[P(`rect`,{x:`10`,y:`20`,width:`220`,height:`150`,rx:`10`,stroke:`currentColor`,"stroke-width":`2`}),P(`path`,{d:`M10 46h220`,stroke:`currentColor`,"stroke-width":`2`}),P(`circle`,{cx:`26`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),P(`circle`,{cx:`40`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),P(`circle`,{cx:`54`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),P(`path`,{d:`M78 33h14M86 27l-6 6 6 6M104 27v12`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),P(`rect`,{x:`118`,y:`25`,width:`96`,height:`16`,rx:`8`,stroke:`currentColor`,"stroke-width":`1.6`}),P(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,fill:`currentColor`,opacity:`0.18`}),P(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,stroke:`currentColor`,"stroke-width":`1.6`}),P(`g`,{class:`text-info`,transform:`translate(120 25) scale(0.66)`,children:P(g_,{})}),P(`g`,{transform:`translate(34 78)`,children:[P(`rect`,{x:`0`,y:`8`,width:`34`,height:`26`,rx:`5`,stroke:`currentColor`,"stroke-width":`2`}),P(`path`,{d:`M34 16l14-8v26l-14-8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]}),P(`g`,{transform:`translate(40 120)`,children:[P(`rect`,{x:`6`,y:`0`,width:`14`,height:`24`,rx:`7`,stroke:`currentColor`,"stroke-width":`2`}),P(`path`,{d:`M0 20a13 13 0 0 0 26 0M13 33v8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`})]}),P(`path`,{d:`M150 64l34 14-14 4-2 16-18-34Z`,fill:`currentColor`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]})}var v_=U(({device:e,onClose:t})=>{let n=h_[e];return k(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),P(`div`,{class:`absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/50 motion-safe:animate-[tavusFadeUp_180ms_ease-out]`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tavus-blocked-title`,onClick:t,children:P(`div`,{class:`relative w-full max-w-md rounded-box bg-base-100 text-base-content shadow-xl overflow-hidden`,onClick:e=>e.stopPropagation(),children:[P(`button`,{type:`button`,class:`btn btn-sm btn-circle btn-ghost absolute top-2 right-2 z-10`,onClick:t,"aria-label":`Close`,children:P(bg,{name:`close`,size:`1.1rem`})}),P(`div`,{class:`grid @3xl:grid-cols-[1fr_1.2fr] gap-4 p-5 @max-md:p-4`,children:[P(`div`,{class:`flex items-center justify-center @max-md:hidden`,children:P(__,{})}),P(`div`,{class:`flex flex-col gap-4`,children:[P(`h2`,{id:`tavus-blocked-title`,class:`text-lg font-semibold leading-snug pr-6`,children:[`Access to your `,n,` is blocked`]}),P(`ol`,{class:`flex flex-col gap-3 text-sm`,children:[P(`li`,{class:`flex items-start gap-2`,children:[P(`span`,{class:`font-semibold tabular-nums`,children:`1.`}),P(`span`,{class:`leading-snug`,children:[`Click the `,P(g_,{class:`inline-block align-text-bottom h-4 w-4 mx-0.5`}),` `,`settings icon in your browser's address bar`]})]}),P(`li`,{class:`flex items-start gap-2`,children:[P(`span`,{class:`font-semibold tabular-nums`,children:`2.`}),P(`span`,{class:`leading-snug`,children:[`Allow `,n,` access, then reload the page`]})]})]}),P(`button`,{type:`button`,class:`btn btn-neutral btn-sm self-start`,onClick:t,children:`Got it`})]})]})]})})}),y_=we({open:()=>{},close:()=>{}});function b_(){return N(y_)}function x_({children:e}){let[t,n]=O(null),r=M(e=>n(e),[]),i=M(()=>n(null),[]),a=j(()=>({open:r,close:i}),[r,i]);return P(y_.Provider,{value:a,children:[e,t&&P(v_,{device:t,onClose:i})]})}var S_=U(()=>P(`span`,{"aria-hidden":`true`,class:`absolute -top-0.5 -right-0.5 z-20 flex h-4 w-4 items-center justify-center rounded-full bg-warning text-warning-content text-[0.6rem] font-bold leading-none ring-2 ring-base-100 pointer-events-none`,children:`!`})),C_=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,w_=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,T_=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,E_=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,D_=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function O_(){return P(`svg`,{style:{width:`var(--chevron-size, 0.75rem)`,height:`var(--chevron-size, 0.75rem)`},viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:P(`path`,{d:`M4 6L8 10L12 6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})}function k_(){let e=Wd(),t=A(null),n=A(void 0);return ef(e??``,M(e=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let n=Math.max(0,Math.min(1,e**.6));t.current?.style.setProperty(`--mic-level`,String(n))})},[])),P(`span`,{ref:t,"aria-hidden":`true`,class:`pointer-events-none absolute inset-x-0 bottom-0 z-0 bg-success/70`,style:{"--mic-level":`0`,height:`calc(var(--mic-level, 0) * 100%)`,transition:`height 100ms ease-out`}})}function A_({value:e,devices:t,disabled:n,onChange:r,label:i}){return P(E,{children:[P(`select`,{class:w_,value:e,onChange:e=>r(e.target.value),disabled:n,"aria-label":i,children:t.map(({device:e})=>P(`option`,{value:e.deviceId,children:e.label},e.deviceId))}),P(`span`,{class:T_,children:P(O_,{})})]})}function j_(e){return P(`div`,{class:C_,children:P(A_,{...e})})}function M_({iconName:e,...t}){return P(`div`,{class:C_,children:[P(`span`,{class:E_,"aria-hidden":`true`,children:P(bg,{name:e})}),P(A_,{...t})]})}var N_=U(({level:e=!1})=>{let{onToggleMicrophone:t,isMicReady:n,isMicMuted:r}=p_(),{microphones:i,currentMic:a,setMicrophone:o}=$d();if(!a||(i?.length??0)<=1)return P(I_,{level:e});let s=e&&n&&!r;return P(`div`,{class:`relative inline-flex items-center`,children:[P(j_,{value:a?.device?.deviceId,devices:i||[],disabled:!n,onChange:e=>o(e),label:`Select microphone`}),P(`button`,{type:`button`,onClick:t,disabled:!n,class:`${D_} overflow-hidden`,"aria-label":r?`Unmute microphone`:`Mute microphone`,"aria-pressed":r,children:[s&&P(k_,{}),P(`span`,{class:`relative z-10 inline-flex`,children:P(bg,{name:r||!n?`mic-off`:`mic`})})]})]})});function P_(){let{onToggleCamera:e,isCamMuted:t}=f_(),{camera:n,requestCamera:r}=um(),{open:i}=b_(),a=n.isGranted&&!t;return{isOn:a,onClick:()=>{if(n.isBlocked)return i(`camera`);if(a)return e();r()},label:a?`Turn camera off`:n.isGranted?`Turn camera on`:`Enable camera`,needsAttention:n.needsAttention}}var F_=U(()=>{let{isCamReady:e}=f_(),{currentCam:t,cameras:n,setCamera:r}=$d(),i=P_();return!t||(n?.length??0)<=1?P(L_,{}):P(`div`,{class:`relative inline-flex items-center`,children:[P(j_,{value:t?.device?.deviceId,devices:n||[],disabled:!e,onChange:e=>r(e),label:`Select camera`}),P(`button`,{type:`button`,onClick:i.onClick,class:D_,"aria-label":i.label,"aria-pressed":!i.isOn,children:P(bg,{name:i.isOn?`cam`:`cam-off`})})]})}),I_=U(({level:e=!1})=>{let{onToggleMicrophone:t,isMicMuted:n}=p_(),{mic:r,requestMic:i}=um(),{open:a}=b_(),o=()=>{if(r.isGranted)return t();if(r.isBlocked)return a(`microphone`);i()},s=r.isGranted?n?`Unmute microphone`:`Mute microphone`:`Allow microphone access`,c=e&&r.isGranted&&!n;return P(`span`,{class:`relative inline-flex`,children:[P(`button`,{type:`button`,onClick:o,class:`btn btn-control btn-neutral relative overflow-hidden`,"aria-label":s,"aria-pressed":r.isGranted?n:void 0,children:[c&&P(k_,{}),P(`span`,{class:`relative z-10 inline-flex`,children:P(bg,{name:n||!r.isGranted?`mic-off`:`mic`})})]}),r.needsAttention&&P(S_,{})]})}),L_=U(()=>{let{isOn:e,onClick:t,label:n,needsAttention:r}=P_();return P(`span`,{class:`relative inline-flex`,children:[P(`button`,{type:`button`,onClick:t,class:`btn btn-control btn-neutral`,"aria-label":n,"aria-pressed":!e,children:P(bg,{name:e?`cam`:`cam-off`})}),r&&P(S_,{})]})});U(({compact:e=!1}={})=>{let{isMicReady:t}=p_(),{microphones:n,currentMic:r,setMicrophone:i}=$d();return(n?.length??0)<=1?null:P(M_,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),U(({compact:e=!1}={})=>{let{isCamReady:t}=f_(),{currentCam:n,cameras:r,setCamera:i}=$d();return(r?.length??0)<=1?null:P(M_,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var R_=U((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=m_();return P(`button`,{type:`button`,onClick:t,class:`btn btn-control ${n?`btn-primary`:`btn-neutral`}`,"aria-label":n?`Stop screen share`:`Start screen share`,"aria-pressed":n,children:P(bg,{name:`screen-share`})})});function z_(e){let t=N(Ep);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return k(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var B_=we(null);function V_({children:e,defaultEnabled:t=!1}){let[n,r]=O(t),i=M(()=>r(e=>!e),[]),a=j(()=>({isEnabled:n,toggle:i}),[n,i]);return P(B_.Provider,{value:a,children:e})}function H_(){let e=N(B_);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var U_=U(()=>{let{isEnabled:e,toggle:t}=H_();return P(`button`,{type:`button`,onClick:t,"aria-pressed":e,class:`btn btn-control ${e?`btn-primary`:`btn-neutral`}`,"aria-label":e?`Hide captions`:`Show captions`,children:P(bg,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),W_=U(()=>{let{isEnabled:e}=H_(),{captionText:t,captionRole:n}=z_(),r=t.value,i=n.value;return!e||!r?null:P(`div`,{class:`pointer-events-none absolute bottom-24 left-1/2 -translate-x-1/2 max-w-[80%] px-4 py-2 rounded-box bg-black/60 text-white z-40`,role:`status`,"aria-live":`polite`,children:P(`div`,{class:`text-sm leading-5 max-h-15 overflow-hidden flex flex-col justify-end text-center`,children:P(`div`,{children:[P(`span`,{class:`text-xs ${i===`replica`?`text-secondary`:`text-primary`} mr-2`,children:i===`replica`?`PAL`:`You`}),r]})})})}),G_=we(null);function K_({children:e,defaultOpen:t=!1}){let[n,r]=O(t),i=M(()=>r(e=>!e),[]),a=M(()=>r(!1),[]),o=j(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return P(G_.Provider,{value:o,children:e})}function q_(){let e=N(G_);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var J_=U((e={})=>{let{isOpen:t,toggle:n}=q_();return P(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":t?`Close chat`:`Open chat`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:P(bg,{name:`chat`})})}),Y_=U(({message:e})=>{let t=e.sender===`user`;return P(`li`,{class:`flex flex-col gap-1 ${t?`items-end`:`items-start`}`,children:[P(`span`,{class:`text-xs ${t?`text-primary`:`text-secondary`}`,children:t?`You`:`PAL`}),P(`span`,{class:`px-3 py-2 rounded-field text-sm max-w-[80%] ${t?`bg-primary text-primary-content`:`bg-base-200 text-base-content`}`,children:e.text})]})}),X_=U(({docked:e=!1,headerAction:t}={})=>{let{isOpen:n,close:r}=q_(),{chatMessages:i,sendChat:a,session:o}=z_(),s=o.value?.conversationId??null,c=i.value,[l,u]=O(``),d=A(null);k(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[c.length]);let f=M(()=>{let e=l.trim();e&&s&&(a(e),u(``))},[l,a,s]),p=M(e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),f())},[f]),m=!!l.trim()&&!!s;return P(`aside`,{class:e?`absolute inset-0 w-full h-full bg-base-100 flex flex-col z-30`:`absolute top-0 right-0 w-80 h-full bg-base-100 border-l border-base-300 flex flex-col z-30 transition-transform ${n?`translate-x-0`:`translate-x-full`} @max-mobile:w-full`,"aria-hidden":!e&&!n,inert:!e&&!n,children:[P(`header`,{class:`flex items-center justify-between px-4 py-3 border-b border-base-300`,children:[P(`span`,{class:`font-medium text-base-content`,children:`Chat`}),e?t:P(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle`,onClick:r,"aria-label":`Close chat`,children:P(bg,{name:`close`,size:20})})]}),P(`ul`,{ref:d,class:`flex-1 overflow-y-auto p-4 flex flex-col gap-3`,role:`log`,"aria-live":`polite`,children:c.length===0?P(`li`,{class:`text-center text-sm opacity-70`,children:s?`Send a message to start the conversation.`:`Connecting…`}):c.map(e=>P(Y_,{message:e},e.id))}),P(`form`,{class:`flex items-end gap-2 p-3 border-t border-base-300`,onSubmit:e=>{e.preventDefault(),f()},children:[P(`textarea`,{class:`textarea textarea-bordered textarea-sm flex-1 resize-none`,value:l,onChange:e=>u(e.target.value),onKeyDown:p,placeholder:s?`Type a message…`:`Connecting…`,disabled:!s,rows:1,"aria-label":`Message`}),P(`button`,{type:`submit`,class:`btn btn-primary btn-sm btn-circle`,disabled:!m,"aria-label":`Send message`,children:P(bg,{name:`send`,size:18})})]})]})});function Z_({label:e}){return P(r_,{align:`center`,role:`status`,"aria-live":`polite`,class:`z-2`,children:P(`div`,{class:`flex items-center gap-2`,children:[P(`span`,{class:`loading loading-spinner loading-sm`}),P(`span`,{class:`text-base font-medium`,children:e})]})})}var Q_=U(()=>P(Z_,{label:`Connecting…`})),$_=U(()=>P(Z_,{label:`Leaving…`}));function ev({active:e,onToggle:t,tooltip:n,nudge:r=!1}){return P(`div`,{class:`flex items-center gap-2`,children:[r&&P(`span`,{class:`rounded-field bg-base-100 px-2 py-1 text-xs font-medium whitespace-nowrap text-base-content shadow-md motion-safe:animate-[tavusFadeUp_180ms_ease-out]`,children:`Expand for a better view`}),P(`button`,{type:`button`,onClick:t,class:`btn btn-xs btn-control ${r?`btn-primary`:e?`btn-info`:`btn-neutral`}`,"aria-label":n??(e?`Exit fullscreen`:`Enter fullscreen`),title:n,children:P(bg,{name:e?`fullscreen-exit`:`fullscreen`,size:`calc(var(--size-field, 0.25rem) * 3.5)`})})]})}var tv=U(({id:e})=>{let t=Gd()===e,n=A(null),r=A(null),i=A(null),a=A(void 0);ef(e,M(e=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{let t=Number(Math.max(.01,e).toFixed(2));n.current&&r.current&&i.current&&(n.current.style.height=`${20+t*40}%`,r.current.style.height=`${20+t*130}%`,i.current.style.height=`${20+t*40}%`)})},[]));let o=`w-[3px] rounded-full bg-base-100 transition-[opacity] ${t?`opacity-100`:`opacity-50`}`;return P(`div`,{class:`flex items-center justify-center w-6 h-6`,children:P(`div`,{class:`flex items-center justify-center gap-[2px] w-full h-full`,children:[P(`div`,{ref:n,class:o,style:{height:`20%`}}),P(`div`,{ref:r,class:o,style:{height:`20%`}}),P(`div`,{ref:i,class:o,style:{height:`20%`}})]})})}),nv=[0,1,2],rv=.05,iv=450;function av({sessionId:e,className:t=``}){let{config:n}=Xp(),r=Tg(n.value),i=wg(n.value),a=A(null),o=A(void 0),s=A(void 0),[c,l]=O(!1),u=A(!1);return ef(e??``,M(t=>{e&&(o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{let e=Math.max(0,Math.min(1,t**.6));a.current?.style.setProperty(`--audio-level`,String(e)),e>rv?(s.current&&=(clearTimeout(s.current),void 0),u.current||(u.current=!0,l(!0))):u.current&&s.current===void 0&&(s.current=setTimeout(()=>{s.current=void 0,u.current=!1,l(!1)},iv))}))},[e])),k(()=>()=>{o.current&&cancelAnimationFrame(o.current),s.current&&clearTimeout(s.current)},[]),P(`div`,{ref:a,class:`relative aspect-square w-full max-w-[min(48cqi,16rem)] mx-auto pointer-events-none ${t}`,style:{"--audio-level":`0`},"aria-hidden":`true`,children:[nv.map(e=>P(`div`,{class:`absolute inset-[16%] rounded-full will-change-transform`,style:{border:`2px solid var(--color-primary)`,opacity:0,animation:c?`tavusAudioWave 2.4s ease-out ${e*.8}s infinite`:`none`,"--wave-peak":`calc(0.18 + var(--audio-level, 0) * 0.5)`}},e)),P(`div`,{class:`absolute inset-[16%] rounded-full`,style:{background:`radial-gradient(circle, color-mix(in oklab, var(--color-primary) 60%, transparent), transparent 70%)`,filter:`blur(20px)`,scale:`calc(1 + var(--audio-level, 0) * 0.25)`,opacity:`calc(0.35 + var(--audio-level, 0) * 0.5)`,transition:`scale 120ms ease-out, opacity 120ms ease-out`}}),P(`div`,{class:`absolute inset-[20%] rounded-full overflow-hidden bg-base-300 ring-2 ring-base-100/20 shadow-xl will-change-transform`,style:{scale:`calc(1 + var(--audio-level, 0) * 0.06)`,transition:`scale 100ms ease-out`},children:P(Ag,{variant:r.background,replica:i})})]})}function ov({children:e,class:t,className:n,...r}){return P(`div`,{class:`tavus-mesh-bg ${t??n??``}`,...r,children:[P(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-1`}),P(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-2`}),P(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-3`}),P(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-4`}),P(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-5`}),P(`div`,{class:`absolute inset-0 bg-linear-to-t from-black/30 via-black/10 to-transparent pointer-events-none backdrop-blur-xs`}),e]})}var sv=e=>!!e.user_id?.includes(`tavus-replica`);function cv(){return Jd({filter:sv})}function lv(e){let t=cv()[0],n=Xd(t??``),r=Ud(),[i,a]=O(!1);return k(()=>{t&&(n.state===`playable`||e)&&a(!0)},[t,n.state,e]),r===`left-meeting`||r===`error`?{phase:`left`}:!i||!t?{phase:`connecting`}:{phase:`ready`,replicaId:t,videoState:n}}var uv=U(({isAudioOnly:e})=>{let t=lv(e);return t.phase===`left`?P($_,{}):t.phase===`connecting`?P(Q_,{}):e?P(ov,{class:`flex items-center justify-center`,children:[P(av,{sessionId:t.replicaId}),P(Mf,{sessionId:t.replicaId})]}):P(`div`,{class:`relative w-full h-full`,children:[P(jf,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`}),P(Mf,{sessionId:t.replicaId})]})}),dv=U(({onLeave:e})=>{let{config:t}=Xp(),n=t.value.customization.conversation.modality===`audio`;return P(`div`,{class:`@container/pip w-full h-full`,children:P(`div`,{class:`relative w-full h-full overflow-hidden bg-linear-to-br from-base-300 to-base-200 text-base-content`,children:[P(`div`,{class:`relative w-full h-full z-5`,children:P(uv,{isAudioOnly:n})}),P(`div`,{class:`absolute bottom-4 w-full inset-x-0 z-20 flex justify-center items-center gap-2 @max-mobile:gap-1`,children:[P(I_,{}),!n&&P(L_,{}),P(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:P(bg,{name:`leave`,"aria-label":`Leave Call`})})]})]})})});function fv(e,t){return e<=0||t<=0?!1:e/t<.75}var pv=U(({personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})=>{let a=A(null),o=i??a,[s,c]=O(0),[l,u]=O(0),d=M(({aspectRatio:e})=>c(e),[]);k(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let{width:t,height:n}=e[e.length-1].contentRect;u(n>0?t/n:0)});return t.observe(e),()=>t.disconnect()},[o]);let f=n?t??``:e,p=!n&&r,m=!n&&fv(s,l),h=n||m;return P(E,{children:[m&&P(jf,{sessionId:e,type:`video`,fit:`cover`,"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 w-full h-full object-cover scale-110 blur-xl brightness-[0.55] ${p?`hidden`:``}`}),P(jf,{ref:o,automirror:!0,sessionId:f,type:n?`screenVideo`:`video`,fit:h?`contain`:`cover`,onResize:n?void 0:d,className:`absolute inset-0 w-full h-full transition-all ${h?`object-contain`:`object-cover`} ${p?`hidden`:``}`})]})}),mv=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),hv=[`.sandbox-tavus.io`],gv=new Set([`tavusapi.com`]);function _v(e){let t;try{t=new URL(e)}catch{return!1}return xv(t)?!0:t.protocol===`https:`?mv.has(t.hostname)?!0:hv.some(e=>t.hostname.endsWith(e)):!1}function vv(e){return _v(e)}function yv(e){try{return xv(new URL(e))}catch{return!1}}function bv(e){let t;try{t=new URL(e)}catch{return!1}return Sv(t)?!0:t.protocol===`https:`&&gv.has(t.hostname)}function xv(e){return Sv(e)}function Sv(e){return!Cv()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function Cv(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}function wv(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Tv=new Set([`canvas.question`,`canvas.input`,`canvas.calendar`,`canvas.scheduling_embed`]);[...new Set([`direct_user`,`autonomous`,`system`])];var Ev=new Set([`clear`,`replacement`]);function Dv(e,t,n){return t===`submit`&&n===`direct_user`&&Tv.has(e)}function Ov(e,t,n,r){if(r!==void 0&&(!r||n===void 0||!Dv(e,t,n)))throw Error(`Canvas response text is allowed only for a supported direct-user submit.`)}function kv(e,t){if(t===`system`||Ev.has(e))throw Error(`Canvas producer interactions cannot mint host-only system actions.`)}async function Av(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close?.()}catch{}}var jv=`tavus.canvas.interaction`,Mv=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],Nv=`safe-area-right`,Pv={x:275/1280,y:111/720,width:730/1280,height:609/720},Fv={type:`snapshot_mirror`};function Iv(e){return oy(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&oy(e.properties):!1}function Lv(e){if(!oy(e))return null;let t=by(e,`component`),n=by(e,`component_version`),r=by(e,`sandbox_url`),i=Cy(e,`mcp_server_url`,vv),a=Cy(e,`api_base_url`,bv),o=Cy(e,`interaction_url`,bv),s=uy(e.layout),c=Ty(e),l=e.version;return l!==1||!t||!n||!r||!_v(r)||!zv(r,t,n)||i===null||a===null||o===null||s===null||c===null?null:{version:l,component:t,component_version:n,resource_uri:by(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:by(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,...c,layout:s,host_context:oy(e.host_context)?e.host_context:void 0}}var Rv=/^\/canvas\/([^/]+)\/([^/]+)(?:\/|$)/;function zv(e,t,n){let r;try{r=new URL(e)}catch{return!1}let i=Rv.exec(r.pathname);return i?t===`canvas.${i[1]}`&&n===i[2]:yv(e)}function Bv(e){if(e===void 0)return{ok:!0,value:{}};if(oy(e))return{ok:!0,value:e};if(typeof e!=`string`)return{ok:!1,error:Error(`Magic Canvas tool arguments must be an object or JSON string.`)};try{let t=JSON.parse(e);return oy(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:sy(e)}}}function Vv(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=Bv(e.properties.arguments);if(!n.ok)throw n.error;if(t===`canvas_clear`){let t=n.value.tool_call_id,r=n.value.reason;if(t!==void 0&&typeof t!=`string`)throw Error(`Magic Canvas clear tool_call_id must be a string when provided.`);if(r!==void 0&&typeof r!=`string`)throw Error(`Magic Canvas clear reason must be a string when provided.`);return{kind:`clear`,conversation_id:e.conversation_id,tool_call_id:t,reason:r}}let r=n.value.tool_call_id,i=n.value.updates;if(typeof r!=`string`||r.length===0)throw Error(`Magic Canvas update_component requires a target tool_call_id.`);if(!oy(i))throw Error(`Magic Canvas update_component requires an object updates payload.`);return{kind:`update`,conversation_id:e.conversation_id,tool_call_id:r,updates:i}}var Hv=[`safe-area-left`,`safe-area-right`];function Uv(e){let t=Hv.includes(e.preferred_slot)?e.preferred_slot:Nv;return t===e.preferred_slot&&e.display_mode===`inline`?e:{...e,preferred_slot:t,display_mode:`inline`}}function Wv(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function Gv(e,t){return[t]}function Kv(e,t){switch(t.kind){case`show`:{let n=e.find(e=>e.id===t.instance.id),r=n?{...t.instance,revision:n.revision+1}:t.instance;return Gv(e.filter(e=>e.id!==t.instance.id),r)}case`update`:{let n=e=>e.conversation_id===t.conversation_id&&e.tool_call_id===t.tool_call_id,r=ny(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:Uv({preferred_slot:r.preferredSlot??e.layout.preferred_slot,display_mode:r.displayMode??e.layout.display_mode,avoid_safe_area:r.avoidSafeArea??e.layout.avoid_safe_area,safe_area:r.safeArea??e.layout.safe_area,backdrop:r.backdrop??e.layout.backdrop}),revision:e.revision+1};return i=t,t});if(i===void 0)return a;let o=e.find(n);return o&&Wv(o.layout)===Wv(i.layout)?a:Gv(a.filter(e=>!n(e)),i)}case`clear`:return t.tool_call_id?e.filter(e=>e.conversation_id!==t.conversation_id||e.tool_call_id!==t.tool_call_id):e.filter(e=>e.conversation_id!==t.conversation_id)}}function qv(e){if(!oy(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!oy(t))continue;let e=(oy(t._meta)?t._meta:null)?.[jv];if(oy(e))return wy(e)}return null}function Jv(e,t){let n=t.type,r=t.value;if(!n)throw Error(`Magic Canvas interaction is missing type.`);if(r===void 0)throw Error(`Magic Canvas interaction is missing value.`);if(e.canvas_config.protocol_mode===`v1`&&!t.interaction_id)throw Error(`Magic Canvas v1 interaction requires a producer-supplied interaction_id.`);if(e.canvas_config.protocol_mode===`v1`&&(t.protocol_version!==1||!t.initiation_source||!t.initiated_at||!Number.isSafeInteger(t.producer_revision)||(t.producer_revision??-1)<0||!t.payload_digest))throw Error(`Magic Canvas v1 interaction causal envelope is incomplete.`);if(e.canvas_config.protocol_mode===`v1`&&t.producer_revision!==e.revision)throw Error(`Magic Canvas v1 interaction does not match the mounted card revision.`);return kv(n,t.initiation_source),Ov(e.canvas_config.component,n,t.initiation_source,t.response_text),{interaction_id:t.interaction_id??ay(e.tool_call_id,n),conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:e.canvas_config.component,component_version:e.canvas_config.component_version,type:n,value:r,metadata:oy(t.metadata)?t.metadata:{},protocol_mode:e.canvas_config.protocol_mode,protocol_version:t.protocol_version,initiation_source:t.initiation_source,initiated_at:t.initiated_at,producer_revision:t.producer_revision,payload_digest:t.payload_digest,response_text:t.response_text,issued_card_capability:e.canvas_config.issued_card_capability}}function Yv(e){return e.type===`dismiss`||e.type===`clear`?!0:e.type!==`submit`&&e.type!==`skip`?!1:e.component===`canvas.question`||e.component===`canvas.input`||e.component===`canvas.calendar`}function Xv(e,t){if(!oy(e)||!Array.isArray(e.content))return``;let n=e.content.map(e=>oy(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
55
- `).trim();if(!t){if(n)throw Error(`Magic Canvas response text requires a validated interaction.`);return``}if(t.protocol_mode===void 0&&t.response_text===void 0)return n?(Ov(t.component,t.type,`direct_user`,n),n):``;if(t.response_text===void 0){if(n)throw Error(`Magic Canvas silent interaction included raw text.`);return``}if(n!==t.response_text)throw Error(`Magic Canvas raw text does not match the validated response text.`);return t.response_text}function Zv(e,t){let n=oy(t.structuredContent)?t.structuredContent:void 0,r=cy(t.content),i=typeof n?.state==`string`?n.state:`updated`,a=typeof n?.summary==`string`?n.summary:r,o=[`Magic Canvas state update for ${e.canvas_config.component} (${e.tool_call_id}).`,`State: ${i}.`];return a&&o.push(`Summary: ${a}`),n&&o.push(`Structured state: ${ly(n)}`),r&&r!==a&&o.push(r),o.join(`
56
- `)}function Qv({conversationId:e,toolCallId:t,args:n,canvasConfig:r}){let i=ny(n);return{id:t,conversation_id:e,tool_call_id:t,arguments:i.componentArguments,canvas_config:r,layout:Uv({preferred_slot:i.preferredSlot??r.layout?.preferred_slot??ry(r.component),display_mode:i.displayMode??`inline`,avoid_safe_area:i.avoidSafeArea??r.layout?.avoid_safe_area??!0,safe_area:i.safeArea??r.layout?.safe_area??Pv,backdrop:i.backdrop??r.layout?.backdrop??Fv}),revision:0}}function $v(e,t){let n=e.layout.display_mode;return{...e.layout,display_mode:n,viable_slot:n===`fullscreen`?`full`:ty(e.layout.preferred_slot,t)}}function ey(e,t){let n=e.filter(e=>!e.avoid_safe_area||e.display_mode===`fullscreen`?!1:e.viable_slot===`safe-area-left`||e.viable_slot===`safe-area-right`),r=n.some(e=>e.viable_slot===`safe-area-left`),i=n.some(e=>e.viable_slot===`safe-area-right`);if(r&&i)return{active:!1,video_shift_x:0,backdrop:Fv};let a=[...n].reverse()[0];if(!a||t.width<900)return{active:!1,video_shift_x:0,backdrop:Fv};let o=Math.min(448,Math.max(0,t.width-32)),s=a.safe_area,c=s.x*t.width,l=(s.x+s.width)*t.width,u=Math.min(360,t.width*.3),d=0;return d=a.viable_slot===`safe-area-left`?Sy(16+o+24-c,0,u):-Sy(l-(t.width-16-o-24),0,u),{active:!0,side:a.viable_slot===`safe-area-left`?`left`:`right`,video_shift_x:Math.round(d),safe_area:s,backdrop:a.backdrop}}function ty(e,t){return e===`full`||e===`safe-area-bottom`&&t.visualViewportHeight!==void 0&&t.visualViewportHeight<t.height*.75?`full`:(e===`safe-area-left`||e===`safe-area-right`)&&t.width<768&&t.height>=t.width?`safe-area-bottom`:e}function ny(e){let t={};for(let[n,r]of Object.entries(e))n!==`layout`&&n!==`preferred_slot`&&n!==`preferredSlot`&&n!==`display_mode`&&n!==`displayMode`&&n!==`presentation`&&n!==`fullscreen`&&n!==`avoid_safe_area`&&n!==`avoidSafeArea`&&n!==`safe_area`&&n!==`safeArea`&&n!==`backdrop`&&(t[n]=r);return{componentArguments:t,preferredSlot:dy(e.layout)??dy(e.preferred_slot)??dy(e.preferredSlot),displayMode:fy(e),avoidSafeArea:py(e),safeArea:my(e),backdrop:hy(e)}}function ry(e){switch(e){case`canvas.alert`:return`safe-area-bottom`;case`canvas.chart`:case`canvas.image`:case`canvas.video`:return`full`;default:return Nv}}function iy(e,t){let n=t?.displayScale??1;if(e.display_mode===`fullscreen`||e.viable_slot===`full`)return{maxWidth:void 0,maxHeight:void 0,displayScale:n};let r=t?.maxHeight??720;return e.viable_slot===`safe-area-bottom`?{maxWidth:720,maxHeight:r,displayScale:n}:{width:384,maxHeight:r,displayScale:n}}function ay(e,t){return`ci_${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}_${t}_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,10)}`}var oy=wv;function sy(e){return e instanceof Error?e:Error(String(e))}function cy(e){return Array.isArray(e)?e.map(e=>oy(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
57
- `).trim():``}function ly(e){let t=JSON.stringify(e);return t?t.length<=2e3?t:`${t.slice(0,2e3)}...`:`{}`}function uy(e){if(e===void 0)return;if(!oy(e))return null;let t=dy(e),n=gy(e.safe_area??e.safeArea),r=_y(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},...vy(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function dy(e){if(typeof e==`string`&&yy(e))return e;if(!oy(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&yy(t)?t:void 0}function fy(e){if(e.presentation===!0||e.fullscreen===!0)return`fullscreen`;if(e.presentation===!1||e.fullscreen===!1)return`inline`;let t=e.display_mode??e.displayMode;return t===`fullscreen`||t===`inline`?t:void 0}function py(e){let t=oy(e.layout)?e.layout:void 0,n=e.avoid_safe_area??e.avoidSafeArea??t?.avoid_safe_area??t?.avoidSafeArea;return typeof n==`boolean`?n:void 0}function my(e){let t=oy(e.layout)?e.layout:void 0;return gy(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function hy(e){let t=oy(e.layout)?e.layout:void 0;return _y(e.backdrop??t?.backdrop)??void 0}function gy(e){if(e===void 0)return;if(!oy(e))return null;let t=xy(e,`x`),n=xy(e,`y`),r=xy(e,`width`),i=xy(e,`height`);return t===void 0||n===void 0||r===void 0||i===void 0||t<0||n<0||r<=0||i<=0||t+r>1.001||n+i>1.001?null:{x:Sy(t,0,1),y:Sy(n,0,1),width:Sy(r,0,1),height:Sy(i,0,1)}}function _y(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!oy(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function vy(e,t){return typeof e==`boolean`?{[t]:e}:{}}function yy(e){return Mv.includes(e)}function by(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function xy(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function Sy(e,t,n){return Math.min(Math.max(e,t),n)}function Cy(e,t,n){let r=by(e,t);if(r)return n(r)?r:null}function wy(e){return e.interaction_id!==void 0&&typeof e.interaction_id!=`string`||e.component!==void 0&&typeof e.component!=`string`||e.component_version!==void 0&&typeof e.component_version!=`string`||e.type!==void 0&&typeof e.type!=`string`||e.metadata!==void 0&&!oy(e.metadata)||e.protocol_version!==void 0&&typeof e.protocol_version!=`number`||e.initiation_source!==void 0&&e.initiation_source!==`direct_user`&&e.initiation_source!==`autonomous`&&e.initiation_source!==`system`&&e.initiation_source!==`unknown`||e.initiated_at!==void 0&&typeof e.initiated_at!=`string`||e.producer_revision!==void 0&&typeof e.producer_revision!=`number`||e.payload_digest!==void 0&&typeof e.payload_digest!=`string`||e.response_text!==void 0&&typeof e.response_text!=`string`?null:e}function Ty(e){let t=Object.hasOwn(e,`protocol_mode`),n=Object.hasOwn(e,`protocol_version`),r=Object.hasOwn(e,`issued_card_capability`);if(!t&&!n&&!r)return{};if(e.protocol_mode===`legacy`)return n&&e.protocol_version!==null||r?null:{protocol_mode:`legacy`,protocol_version:null};if(e.protocol_mode!==`v1`||e.protocol_version!==1)return null;let i=by(e,`issued_card_capability`);return i?{protocol_mode:`v1`,protocol_version:1,issued_card_capability:i}:null}var Ey=`tavus-deployment magic-canvas/0.0.0`;function Dy(e){if(!Iv(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=Lv(e.canvas_config),n=e.properties.tool_call_id;if(!t)return null;if(!n)throw Error(`Received Magic Canvas tool call without tool_call_id.`);let r=Bv(e.properties.arguments);if(!r.ok)throw r.error;return Qv({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function Oy(e){if(!Iv(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=Dy(e);return t?{kind:`show`,instance:t}:null}return Vv(e)}function ky(e){return{body:{interaction_id:e.interaction_id,tool_call_id:e.tool_call_id,component:e.component,component_version:e.component_version,type:e.type,value:e.value,metadata:e.metadata}}}function Ay(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:iy(t),layout:{preferred_slot:t.preferred_slot,viable_slot:t.viable_slot,avoid_safe_area:t.avoid_safe_area,safe_area:t.safe_area,backdrop:t.backdrop}}:{},platform:`web`,userAgent:Ey,styles:{variables:jy(e.cssVars)}}}function jy(e){return{"--border-radius-md":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.5rem`,"--border-radius-sm":e[`--radius-field`]??e[`--tavus-field-radius`]??`0.375rem`,"--border-radius-xs":e[`--radius-selector`]??`0.25rem`,"--border-radius-lg":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.75rem`,"--border-width-regular":e[`--border`]??e[`--tavus-border-width`]??`1px`,"--font-text-sm-size":`0.875rem`,"--font-text-md-size":`1rem`,...My(e)}}function My(e){let t=e[`--color-base-content`],n=e[`--color-base-100`],r=e[`--color-base-200`],i=e[`--color-base-300`],a=e[`--color-error`],o=e[`--color-primary`],s={},c=(e,t)=>{t&&(s[e]=t)},l=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return c(`--color-background-primary`,n),c(`--color-background-secondary`,r),c(`--color-border-secondary`,i),c(`--color-border-primary`,l(t,28,n)),c(`--color-text-primary`,t),c(`--color-text-secondary`,l(t,62,n)),c(`--color-text-danger`,a),c(`--color-border-danger`,a),c(`--color-ring-primary`,o),s}var Ny=96;function Py(e=document){let t=Array.from(e.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect());return t.length===0?null:{left:Math.min(...t.map(e=>e.left)),right:Math.max(...t.map(e=>e.right)),top:Math.min(...t.map(e=>e.top)),bottom:Math.max(...t.map(e=>e.bottom))}}function Fy(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function Iy(e){if(!e)return null;let t=e.getBoundingClientRect();return t.width<=0||t.height<=0?null:{left:t.left,right:t.right,top:t.top,bottom:t.bottom}}function Ly(e,t,n,r){if(!t)return!1;let i=r?r.left:0,a=r?r.top:0,o=r?r.right-r.left:globalThis.innerWidth,s=r?r.bottom-r.top:globalThis.innerHeight,c=e?.safe_area??Pv,l=i+c.x*o+n,u=i+(c.x+c.width)*o+n,d=a+c.y*s,f=a+(c.y+c.height)*s;return l<t.right&&u>t.left&&d<t.bottom&&f>t.top}function Ry(e,t,n){let[r,i]=O(()=>e?Py(Fy(n?.current)):null);return $e(()=>{if(!e){i(null);return}let t=Fy(n?.current),r=()=>i(Py(t)),a=new ResizeObserver(r),o=()=>{for(let e of t.querySelectorAll(`[data-canvas-card]`))a.observe(e)};r(),o(),a.observe(document.documentElement);let s=globalThis.requestAnimationFrame(()=>{r(),o()});return globalThis.addEventListener(`resize`,r),()=>{a.disconnect(),globalThis.removeEventListener(`resize`,r),globalThis.cancelAnimationFrame(s)}},[e,t,n]),e?r:null}function zy(e,t,n){let[r,i]=O(()=>t?Iy(e.current):null);return $e(()=>{if(!t){i(null);return}let n=()=>i(Iy(e.current)),r=new ResizeObserver(n);n(),e.current&&r.observe(e.current),r.observe(document.documentElement);let a=globalThis.requestAnimationFrame(n);return globalThis.addEventListener(`resize`,n),()=>{r.disconnect(),globalThis.removeEventListener(`resize`,n),globalThis.cancelAnimationFrame(a)}},[t,n,e]),t?r:null}function By(e,t,n,r,i,a){let o=e?.side??(n===`safe-area-left`?`left`:n===`safe-area-right`?`right`:null);return{usePip:o!=null&&(t===`pip`||t===`auto`&&Ly(e,r,i,a)),side:o}}function Vy(e,t=document,n){let r=n?n.left:0,i=n?n.right:globalThis.innerWidth,a=n?n.top:0,o=n?n.bottom:globalThis.innerHeight,s=i-r,c=o-a,l=Array.from(t.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect()),u,d,f,p;if(l.length>0){let t=Math.min(...l.map(e=>e.left)),n=Math.max(...l.map(e=>e.right));f=Math.min(...l.map(e=>e.top)),p=Math.max(...l.map(e=>e.bottom)),[u,d]=e===`right`?[r,t]:[n,i]}else{let t=Math.min(448,Math.max(0,s-32));[u,d]=e===`right`?[r,i-16-t]:[r+16+t,i],f=a,p=o}let m=d-u>=144&&p-f>=Ny&&u>=r&&d<=i;if(l.length>0&&!m){let t=Math.min(448,Math.max(0,s-32));[u,d]=e===`right`?[r,i-16-t]:[r+16+t,i],f=a,p=o}let h=Math.max(0,d-u-48),g=Math.max(Ny,Math.min(h,c-48));return{centerX:(u+d)/2-r,centerY:(f+p)/2-a,diameter:g}}var Hy=`560ms linear(0, 0, .0001, .0002, .0003, .0005, .0007, .001, .0013, .0016, .002, .0024, .0029, .0033, .0039, .0044, .005, .0057, .0063, .007, .0079, .0086, .0094, .0103, .0112, .0121, .0132 1.84%, .0153, .0175, .0201, .0226, .0253, .0283, .0313, .0345, .038, .0416, .0454, .0493, .0535, .0576, .0621, .0667, .0714, .0764, .0816 5.04%, .0897, .098 5.62%, .1071, .1165, .1263 6.56%, .137, .1481 7.25%, .1601 7.62%, .1706 7.94%, .1819 8.28%, .194, .2068 9.02%, .2331 9.79%, .2898 11.44%, .3151 12.18%, .3412 12.95%, .3533, .365 13.66%, .3786, .3918, .4045, .4167, .4288, .4405, .452, .4631 16.72%, .4759, .4884, .5005, .5124, .5242, .5354, .5467, .5576, .5686, .5791, .5894, .5995, .6094, .6194, .6289, .6385, .6477, .6569, .6659 24.45%, .6702, .6747, .6789, .6833, .6877, .6919, .696, .7002, .7043, .7084, .7125, .7165, .7205, .7244, .7283, .7321, .7358, .7396, .7433, .7471, .7507, .7544, .7579, .7615, .7649, .7685, .7718, .7752, .7786, .782, .7853, .7885, .7918, .7951, .7982, .8013, .8043, .8075, .8104, .8135, .8165, .8195, .8224, .8253, .8281, .8309, .8336, .8365, .8391, .8419, .8446, .8472, .8499, .8524, .855, .8575, .8599, .8625 37.27%, .8651, .8678, .8703, .8729, .8754, .8779, .8803, .8827, .8851, .8875, .8898, .892, .8942, .8965, .8987, .9009, .903, .9051, .9071, .9092, .9112, .9132, .9151, .9171, .919, .9209, .9227, .9245, .9262, .928, .9297, .9314, .9331, .9347, .9364, .9379, .9395, .941, .9425, .944, .9454, .9469, .9483, .9497, .951, .9524, .9537, .955, .9562, .9574, .9586, .9599, .961, .9622, .9633, .9644, .9655, .9665, .9676, .9686, .9696, .9705, .9715, .9724, .9733, .9742, .975, .9758, .9766, .9774, .9782, .9789, .9796, .9804, .9811, .9817, .9824, .9831, .9837, .9843, .9849, .9855, .986, .9866, .9871, .9877, .9882, .9887, .9892, .9896 70.56%, .9905 71.67%, .9914 72.82%, .9922, .9929 75.2%, .9936 76.43%, .9942 77.71%, .9948 79.03%, .9954 80.39%, .9959 81.81%, .9963 83.28%, .9968 84.82%, .9972 86.41%, .9975 88.07%, .9979 89.81%, .9982 91.64%, .9984 93.56%, .9987 95.58%, .9989 97.72%, .9991)`;function Uy(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function Wy(e,t,n){let[r,i]=O(()=>e&&t?Vy(t,Fy(n?.current),Iy(n?.current)):null);return $e(()=>{if(!e||!t){i(null);return}let r=Fy(n?.current),a=()=>i(Vy(t,r,Iy(n?.current))),o=new ResizeObserver(a),s=()=>{for(let e of r.querySelectorAll(`[data-canvas-card]`))o.observe(e)};a(),s(),n?.current&&o.observe(n.current),o.observe(document.documentElement);let c=globalThis.requestAnimationFrame(()=>{a(),s()});return globalThis.addEventListener(`resize`,a),()=>{o.disconnect(),globalThis.removeEventListener(`resize`,a),globalThis.cancelAnimationFrame(c)}},[e,t,n]),e&&t?r:null}function Gy(e,t){let[n,r]=O(null);return $e(()=>{if(!t){r(null);return}let n=e.current;if(!n)return;let i=()=>{let e=n.clientWidth,t=n.clientHeight;r(e&&t?{width:e,height:t}:null)},a=new ResizeObserver(i);return a.observe(n),i(),()=>a.disconnect()},[t,e]),t?n:null}var Ky=1;function qy(e,t,n){return Math.min(Math.max(e,t),n)}function Jy(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??Pv,o=((a.x+a.width/2)*t.width+n)*i,s=(a.y+a.height/2)*t.height*i,c=e.diameter/2;return{scale:i,tx:qy(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:qy(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var Yy=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function Xy(e,t,n,r,i){if(!n)return null;let{width:a,height:o}=n,s={x:a/2,y:o/2},c=null;if(e&&(c=Jy(e,n,r,i),s={x:(e.centerX-c.tx)/c.scale,y:(e.centerY-c.ty)/c.scale}),t&&c&&e)return{cx:s.x,cy:s.y,r:e.diameter/2/c.scale,tx:c.tx,ty:c.ty,s:c.scale,shift:r};let l=Math.hypot(Math.max(s.x,a-s.x),Math.max(s.y,o-s.y));return{cx:s.x,cy:s.y,r:l*1.1,tx:0,ty:0,s:1,shift:r}}function Zy(e,t,n){let r=A(null),i=A(e),a=A(n),o=A(0),s=A(0);i.current=e,a.current=n,k(()=>{let e=i.current;if(!e)return;if(!r.current||Qy()){r.current={values:{...e},velocity:{cx:0,cy:0,r:0,tx:0,ty:0,s:0,shift:0}},a.current(e,!0);return}if(o.current)return;let n=Math.max(t,160)/4e3;s.current=performance.now();let c=e=>{o.current=0;let t=i.current,l=r.current;if(!t||!l)return;let u=Math.min((e-s.current)/1e3,1/30);s.current=e;let d=!0;for(let e of Yy){let r=(t[e]-l.values[e])/(n*n)-2/n*l.velocity[e],i=l.velocity[e]+r*u,a=l.values[e]+i*u,o=e===`s`?.001:.25;Math.abs(t[e]-a)<o&&Math.abs(i)*n<o?(l.values[e]=t[e],l.velocity[e]=0):(l.values[e]=a,l.velocity[e]=i,d=!1)}a.current(l.values,d),d||(o.current=globalThis.requestAnimationFrame(c))};o.current=globalThis.requestAnimationFrame(c)},[e?Yy.map(t=>Math.round(e[t]*100)).join():``,t]),k(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function Qy(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function $y({geom:e,visible:t}){return P(`div`,{"aria-hidden":`true`,"data-morph":`ring`,class:`pointer-events-none absolute z-10 rounded-full`,style:{top:`${e.centerY-e.diameter/2}px`,left:`${e.centerX-e.diameter/2}px`,width:`${e.diameter}px`,height:`${e.diameter}px`,boxShadow:`0 0 0 3px rgb(255 255 255 / 12%), 0 18px 50px rgb(0 0 0 / 55%)`,opacity:+!!t,transition:`opacity 240ms ease-out`}})}function eb(e,t){let n=t>=0?`left`:`right`,r=A({side:n,shift:t});k(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:Uy(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function tb(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function nb({snapshotUrl:e,transformOrigin:t}){return P(`div`,{class:`absolute inset-0 bg-cover bg-center`,style:{backgroundImage:`url("${e}")`,transform:`scaleX(-1)`,transformOrigin:t}})}function rb({snapshotUrl:e,translateX:t,transition:n,transformOrigin:r}){return P(`div`,{"aria-hidden":`true`,"data-morph":`mirror`,class:`pointer-events-none absolute z-0 overflow-hidden`,style:{inset:`0 0`,transform:`translate3d(${t}px, 0, 0)`,transition:`transform ${n}`,willChange:`transform`},children:P(nb,{snapshotUrl:e,transformOrigin:r})})}function ib({ambient:e,usePip:t,transition:n}){return e===`none`?null:P(`div`,{"aria-hidden":`true`,"data-morph":`ambient`,class:`pointer-events-none absolute inset-0 z-0`,style:{opacity:+!!t,transition:`opacity ${n}`,background:e===`darker`?`rgb(0 0 0 / 40%)`:`rgb(0 0 0 / 15%)`}})}function ab({morphCapable:e,snapshotUrl:t,mirrorSide:n,videoShiftX:r,transition:i,sceneRef:a,videoWrapRef:o,fill:s,videoRef:c}){return P(`div`,{ref:a,"data-morph":`scene`,class:`absolute inset-0`,style:e?{transformOrigin:`top left`}:void 0,children:P(`div`,{ref:o,class:`absolute inset-0`,style:e?void 0:{transform:`translate3d(${r}px, 0, 0)`,transition:`transform ${i}`},children:[s(c),e&&t!==null&&P(`div`,{"aria-hidden":`true`,"data-morph":`window-mirror`,class:`absolute top-0 bottom-0 w-full`,style:n===`right`?{left:`calc(100% - ${Ky}px)`}:{right:`calc(100% - ${Ky}px)`},children:P(nb,{snapshotUrl:t,transformOrigin:`center`})})]})})}function ob({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=Hy,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=A(null),[f,p]=O(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=A(null),_=tb(e,h,c),{usePip:v,side:y}=By(e,s,c,Ry(s!==`shift`,_,g),h,zy(g,s!==`shift`,_)),b=Wy(s!==`shift`,y,g),x=eb(m,h);k(()=>{if(!m)return;let e=!1,t=0,n,r=0,a=()=>{if(e)return;let t=i(d.current);if(t){p(t);return}r+=1,r<8&&(n=globalThis.setTimeout(a,150))};return typeof globalThis.requestAnimationFrame==`function`?t=globalThis.requestAnimationFrame(a):n=globalThis.setTimeout(a,0),()=>{e=!0,t&&globalThis.cancelAnimationFrame?.(t),n&&globalThis.clearTimeout(n)}},[m,e.side,e.video_shift_x,i]),k(()=>{if(m||f===null)return;let e=globalThis.setTimeout(()=>{p(null)},o);return()=>globalThis.clearTimeout(e)},[m,f,o]);let S=v&&y!=null&&b!=null,C=s!==`shift`,w=Gy(g,C),T=f!==null&&!C,E=C&&y!=null,ee=A(null),te=A(null),[ne,re]=O(!0),ie=A(!0),ae=M((e,t)=>{let n=ee.current;n&&(n.style.clipPath=`circle(${e.r}px at ${e.cx}px ${e.cy}px)`,n.style.transform=`translate(${e.tx}px, ${e.ty}px) scale(${e.s})`);let r=te.current;r&&(r.style.transform=`translate3d(${e.shift}px, 0, 0)`),ie.current!==t&&(ie.current=t,re(t))},[]);return Zy(C?Xy(b,S,w,h,e):null,o,ae),P(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[T&&f!==null&&P(rb,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),E&&P(ib,{ambient:l,usePip:v,transition:a}),P(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:P(ab,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:ee,videoWrapRef:te,fill:r,videoRef:d})}),C&&b&&P($y,{geom:b,visible:S&&ne}),u]})}var sb=480,cb=U(({personaSessionId:e,isAudioOnly:t,avatarOff:n,canvasLayoutEffect:r,smartSidecarActive:i})=>{let a=t||n,o=i?r.video_shift_x:0;return P(`div`,{class:`absolute inset-0 overflow-hidden`,children:P(`div`,{class:`absolute top-0 bottom-0`,style:{left:o>0?`${sb}px`:`0px`,right:o<0?`${sb}px`:`0px`,transition:`left ${Hy}, right ${Hy}`},children:[P(jf,{automirror:!0,sessionId:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 w-full h-full object-contain`}),P(`div`,{class:`absolute bottom-4 right-4 aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10`,children:a?P(`div`,{class:`flex w-full h-full items-center justify-center`,children:P(av,{sessionId:e})}):P(jf,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover`})})]})})});function W(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function lb(e){return e&&Object.assign(pb,e),pb}var ub,db,fb,pb,mb=t((()=>{db=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},fb=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(ub=globalThis).__zod_globalConfig??(ub.__zod_globalConfig={}),pb=globalThis.__zod_globalConfig}));function hb(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function gb(e,t){return typeof t==`bigint`?t.toString():t}function _b(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function vb(e){return e==null}function yb(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function bb(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function xb(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Kb)return r===void 0&&(r=Kb,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Sb(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Cb(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function wb(e){return JSON.stringify(e)}function Tb(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function Eb(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Db(e){if(Eb(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Eb(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Ob(e){return Db(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function kb(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ab(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function G(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function jb(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function Mb(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Ab(e,Cb(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return Sb(this,`shape`,e),e},checks:[]}))}function Nb(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Ab(e,Cb(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return Sb(this,`shape`,r),r},checks:[]}))}function Pb(e,t){if(!Db(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ab(e,Cb(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Sb(this,`shape`,n),n}}))}function Fb(e,t){if(!Db(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ab(e,Cb(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Sb(this,`shape`,n),n}}))}function Ib(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Ab(e,Cb(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Sb(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Lb(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return Ab(t,Cb(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Sb(this,`shape`,i),i},checks:[]}))}function Rb(e,t,n){return Ab(t,Cb(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return Sb(this,`shape`,i),i}}))}function zb(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Bb(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Vb(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Hb(e){return typeof e==`string`?e:e?.message}function Ub(e,t,n){let r=e.message?e.message:Hb(e.inst?._zod.def?.error?.(e))??Hb(t?.error?.(e))??Hb(n.customError?.(e))??Hb(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Wb(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Gb(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Kb,qb,Jb,Yb,Xb,Zb=t((()=>{mb(),Kb=Symbol(`evaluating`),qb=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},Jb=_b(()=>{if(pb.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Yb=new Set([`string`,`number`,`symbol`]),Xb={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function Qb(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function $b(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var ex,tx,nx,rx=t((()=>{mb(),Zb(),ex=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,gb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tx=W(`$ZodError`,ex),nx=W(`$ZodError`,ex,{Parent:Error})})),ix,ax,ox,sx,cx,lx,ux,dx,fx,px,mx,hx,gx,_x,vx=t((()=>{mb(),rx(),Zb(),ix=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new db;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Ub(e,a,lb())));throw qb(t,i?.callee),t}return o.value},ax=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Ub(e,a,lb())));throw qb(t,i?.callee),t}return o.value},ox=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new db;return a.issues.length?{success:!1,error:new(e??tx)(a.issues.map(e=>Ub(e,i,lb())))}:{success:!0,data:a.value}},sx=ox(nx),cx=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Ub(e,i,lb())))}:{success:!0,data:a.value}},lx=cx(nx),ux=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ix(e)(t,n,i)},dx=e=>(t,n,r)=>ix(e)(t,n,r),fx=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ax(e)(t,n,i)},px=e=>async(t,n,r)=>ax(e)(t,n,r),mx=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ox(e)(t,n,i)},hx=e=>(t,n,r)=>ox(e)(t,n,r),gx=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return cx(e)(t,n,i)},_x=e=>async(t,n,r)=>cx(e)(t,n,r)}));function yx(){return new RegExp(Nx,`u`)}function bx(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function xx(e){return RegExp(`^${bx(e)}$`)}function Sx(e){let t=bx({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Hx}T(?:${r})$`)}var Cx,wx,Tx,Ex,Dx,Ox,kx,Ax,jx,Mx,Nx,Px,Fx,Ix,Lx,Rx,zx,Bx,Vx,Hx,Ux,Wx,Gx,Kx,qx,Jx,Yx,Xx,Zx,Qx=t((()=>{Cx=/^[cC][0-9a-z]{6,}$/,wx=/^[0-9a-z]+$/,Tx=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ex=/^[0-9a-vA-V]{20}$/,Dx=/^[A-Za-z0-9]{27}$/,Ox=/^[a-zA-Z0-9_-]{21}$/,kx=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ax=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,jx=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Mx=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Nx=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Px=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Fx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ix=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Lx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Rx=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,zx=/^[A-Za-z0-9_-]*$/,Bx=/^https?$/,Vx=/^\+[1-9]\d{6,14}$/,Hx=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Ux=RegExp(`^${Hx}$`),Wx=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Gx=/^-?\d+$/,Kx=/^-?\d+(?:\.\d+)?$/,qx=/^(?:true|false)$/i,Jx=/^null$/i,Yx=/^undefined$/i,Xx=/^[^A-Z]*$/,Zx=/^[^a-z]*$/})),$x,eS,tS,nS,rS,iS,aS,oS,sS,cS,lS,uS,dS,fS,pS,mS,hS,gS=t((()=>{mb(),Qx(),Zb(),$x=W(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),eS={number:`number`,bigint:`bigint`,object:`date`},tS=W(`$ZodCheckLessThan`,(e,t)=>{$x.init(e,t);let n=eS[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nS=W(`$ZodCheckGreaterThan`,(e,t)=>{$x.init(e,t);let n=eS[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rS=W(`$ZodCheckMultipleOf`,(e,t)=>{$x.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):bb(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),iS=W(`$ZodCheckNumberFormat`,(e,t)=>{$x.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Xb[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Gx)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),aS=W(`$ZodCheckMaxLength`,(e,t)=>{var n;$x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!vb(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Wb(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),oS=W(`$ZodCheckMinLength`,(e,t)=>{var n;$x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!vb(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Wb(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sS=W(`$ZodCheckLengthEquals`,(e,t)=>{var n;$x.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!vb(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Wb(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),cS=W(`$ZodCheckStringFormat`,(e,t)=>{var n,r;$x.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),lS=W(`$ZodCheckRegex`,(e,t)=>{cS.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),uS=W(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Xx,cS.init(e,t)}),dS=W(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Zx,cS.init(e,t)}),fS=W(`$ZodCheckIncludes`,(e,t)=>{$x.init(e,t);let n=kb(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),pS=W(`$ZodCheckStartsWith`,(e,t)=>{$x.init(e,t);let n=RegExp(`^${kb(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),mS=W(`$ZodCheckEndsWith`,(e,t)=>{$x.init(e,t);let n=RegExp(`.*${kb(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),hS=W(`$ZodCheckOverwrite`,(e,t)=>{$x.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),_S,vS=t((()=>{_S=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
54
+ `,document.body.appendChild(n),t.layout||=`custom-v1`,e.wrap(n,t)}},{key:`getCallInstance`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return e?Id[e]:Object.values(Id)[0]}}]);var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,ee,te,ne,re,ie,ae,oe,O,k,se,ce,le}();function Qd(e){if(e.extension){if(typeof e.extension!=`string`)throw Error(`Error starting dial out: extension must be a string`);if(e.extension.length>20)throw Error(`Error starting dial out: extension length must be less than or equal to 20`)}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!=`number`)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be a number`);if(e.waitBeforeExtensionDialSec>60)throw Error(`Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60`);if(!e.extension)throw Error(`Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension`)}}function $d(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)console.warn(`MediaStreamTrack found in props or cache.`,r),n[r]=Xl;else if(r===`dailyConfig`){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var a=window._daily.instances[t].customCallbacks||{};a.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=a,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function ef(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==`joined-meeting`){var n=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} only supported after join.`;throw t&&(n+=` ${t}`),console.error(n),Error(n)}}function tf(e,t){return[`joining-meeting`,`joined-meeting`].includes(e)||t}function nf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`This daily-js method`,r=arguments.length>3?arguments[3]:void 0;if(tf(e,t)){var i=`${n} not supported after joining a meeting.`;throw r&&(i+=` ${r}`),console.error(i),Error(i)}}function rf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`,n=arguments.length>2?arguments[2]:void 0;if(!e){var r=`${t}${arguments.length>3&&arguments[3]!==void 0&&arguments[3]?` requires preAuth() or startCamera() to initialize call state.`:` requires preAuth(), startCamera(), or join() to initialize call state.`}`;throw n&&(r+=` ${n}`),console.error(r),Error(r)}}function af(e){if(e){var t=`A pre-call quality test is in progress. Please try ${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} again once testing has completed. Use stopTestCallQuality() to end it early.`;throw console.error(t),Error(t)}}function of(e){if(!e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} is only supported on custom callObject instances`;throw console.error(t),Error(t)}}function sf(e){if(e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:`This daily-js method`} is only supported as part of Daily's Prebuilt`;throw console.error(t),Error(t)}}function cf(){if(su())throw Error(`This daily-js method is not currently supported in React Native`)}function lf(){if(!su())throw Error(`This daily-js method is only supported in React Native`)}function uf(e){if(e===void 0)return!0;var t;if(typeof e==`string`)t=e;else try{t=JSON.stringify(e),$r(JSON.parse(t),e)||console.warn(`The userData provided will be modified when serialized.`)}catch(e){throw Error(`userData must be serializable to JSON: ${e}`)}if(t.length>4096)throw Error(`userData is too large (${t.length} characters). Maximum size suppported is 4096.`);return!0}function df(e,t){for(var n=t.allowAllParticipantsKey,r=function(e){var t=[`local`];return n||t.push(`*`),e&&!t.includes(e)},i=function(e){return!!(e.layer===void 0||Number.isInteger(e.layer)&&e.layer>=0||e.layer===`inherit`)},a=function(e){return!!e&&!(e.video&&!i(e.video))&&!(e.screenVideo&&!i(e.screenVideo))},o=0,s=Object.entries(e);o<s.length;o++){var c=Gr(s[o],2),l=c[0],u=c[1];if(!r(l)||!a(u))return!1}return!0}function ff(e){if(R(e)!==`object`)return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Gr(n[t],2),i=r[0],a=r[1];switch(i){case`video`:if(R(a)!==`object`)return!1;for(var o=0,s=Object.entries(a);o<s.length;o++){var c=Gr(s[o],2),l=c[0],u=c[1];switch(l){case`processor`:if(!hf(u))return!1;break;case`settings`:if(!gf(u))return!1;break;default:return!1}}break;case`audio`:if(R(a)!==`object`)return!1;for(var d=0,f=Object.entries(a);d<f.length;d++){var p=Gr(f[d],2),m=p[0],h=p[1];switch(m){case`processor`:if(!mf(h))return!1;break;case`settings`:if(!gf(h))return!1;break;default:return!1}}break;default:return!1}}return!0}function pf(e,t,n){var r,i=[];e.video&&e.video.processor&&(hu((r=t?.useLegacyVideoProcessor)!=null&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push(`video`))),e.audio&&e.audio.processor&&(gu()||(e.audio.settings?delete e.audio.processor:delete e.audio,i.push(`audio`))),i.length>0&&console.error(`Ignoring settings for browser- or platform-unsupported input processor(s): ${i.join(`, `)}`),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:Xl}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:Xl}):delete n.videoTrack)}function mf(e){if(su())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`];return!!e&&R(e)===`object`&&(Object.keys(e).filter(function(e){return!t.includes(e)}).forEach(function(t){console.warn(`invalid key inputSettings -> audio -> processor : ${t}`),delete e[t]}),!!function(e){return typeof e==`string`?Object.values(Ql).includes(e)?!0:(console.error(`inputSettings audio processor type invalid`),!1):!1}(e.type))}function hf(e){if(su())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`,`config`];return!e||R(e)!==`object`||!function(e){return typeof e==`string`?Object.values(Zl).includes(e)?!0:(console.error(`inputSettings video processor type invalid`),!1):!1}(e.type)||e.config&&(R(e.config)!==`object`||!function(e,t){var n=Object.keys(t);if(n.length===0)return!0;var r=`invalid object in inputSettings -> video -> processor -> config`;switch(e){case Zl.BGBLUR:return n.length>1||n[0]!==`strength`?(console.error(r),!1):!(typeof t.strength!=`number`||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error(`${r}; expected: {0 < strength <= 1}, got: ${t.strength}`),!1);case Zl.BGIMAGE:return!(t.source!==void 0&&!function(e){if(e.source==="default")return e.type=`default`,!0;if(e.source instanceof ArrayBuffer)return!0;if(wi(e.source))return e.type=`url`,!!function(e){var t=new URL(e),n=t.pathname;if(t.protocol===`data:`)try{var r=n.substring(n.indexOf(`:`)+1,n.indexOf(`;`)).split(`/`)[1];return nu.includes(r)}catch(e){return console.error(`failed to deduce blob content type`,e),!1}var i=n.split(`.`).at(-1).toLowerCase().trim();return nu.includes(i)}(e.source)||(console.error(`invalid image type; supported types: [${nu.join(`, `)}]`),!1);return t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error(`invalid image selection; must be an int, > 0, <= 10`),!1):(e.type=`daily-preselect`,!0);var t,n}(t));default:return!0}}(e.type,e.config))?!1:(Object.keys(e).filter(function(e){return!t.includes(e)}).forEach(function(t){console.warn(`invalid key inputSettings -> video -> processor : ${t}`),delete e[t]}),!0)}function gf(e){return R(e)===`object`&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function _f(){return`inputSettings must be of the form: { video?: { processor?: { type: [ ${Object.values(Zl).join(` | `)} ], config?: {} } }, audio?: { processor: {type: [ ${Object.values(Ql).join(` | `)} ] } } }`}function vf(e){return`receiveSettings must be of the form { [<remote participant id> | ${Gc}${e.allowAllParticipantsKey?` | "*"`:``}]: { [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}`}function yf(){return`customIntegrations should be an object of type ${JSON.stringify(Kd)}.`}function bf(e){if(e&&R(e)!==`object`||Array.isArray(e))return console.error(`customTrayButtons should be an Object of the type ${JSON.stringify(Gd)}.`),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=Gr(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var o=Gr(a[i],2),s=o[0],c=o[1],l=Gd.id[s];if(!l)return console.error(`customTrayButton does not support key ${s}`),!1;switch(s){case`iconPath`:case`iconPathDarkMode`:if(!wi(c))return console.error(`customTrayButton ${s} should be a url.`),!1;break;case`visualState`:if(![`default`,`sidebar-open`,`active`].includes(c))return console.error(`customTrayButton ${s} should be ${l}. Got: ${c}`),!1;break;default:if(R(c)!==l)return console.error(`customTrayButton ${s} should be a ${l}.`),!1}}return!0}function xf(e){if(!e||e&&R(e)!==`object`||Array.isArray(e))return console.error(yf()),!1;for(var t=function(e){return`${e} should be ${Kd.id[e]}`},n=function(e,t){return console.error(`customIntegration ${e}: ${t}`)},r=0,i=Object.entries(e);r<i.length;r++){var a=Gr(i[r],1)[0];if(!(`label`in e[a]))return n(a,`label is required`),!1;if(!(`location`in e[a]))return n(a,`location is required`),!1;if(!(`src`in e[a])&&!(`srcdoc`in e[a]))return n(a,`src or srcdoc is required`),!1;for(var o=0,s=Object.entries(e[a]);o<s.length;o++){var c=Gr(s[o],2),l=c[0],u=c[1];switch(l){case`allow`:case`csp`:case`name`:case`referrerPolicy`:case`sandbox`:if(typeof u!=`string`)return n(a,t(l)),!1;break;case`iconURL`:if(!wi(u))return n(a,`${l} should be a url`),!1;break;case`src`:if(`srcdoc`in e[a])return n(a,`cannot have both src and srcdoc`),!1;if(!wi(u))return n(a,`src "${u}" is not a valid URL`),!1;break;case`srcdoc`:if(`src`in e[a])return n(a,`cannot have both src and srcdoc`),!1;if(typeof u!=`string`)return n(a,t(l)),!1;break;case`location`:if(![`main`,`sidebar`].includes(u))return n(a,t(l)),!1;break;case`controlledBy`:if(u!==`*`&&u!==`owners`&&(!Array.isArray(u)||u.some(function(e){return typeof e!=`string`})))return n(a,t(l)),!1;break;case`shared`:if((!Array.isArray(u)||u.some(function(e){return typeof e!=`string`}))&&u!==`owners`&&typeof u!=`boolean`)return n(a,t(l)),!1;break;default:if(!Kd.id[l])return console.error(`customIntegration does not support key ${l}`),!1}}}return!0}function Sf(e,t){if(t===void 0)return!1;switch(R(t)){case`string`:return R(e)===t;case`object`:if(R(e)!==`object`)return!1;for(var n in e)if(!Sf(e[n],t[n]))return!1;return!0;default:return!1}}function Cf(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,a=e.useSipRefer;if(!n||!r)throw Error(`${t}() requires a sessionId and toEndPoint`);if(typeof n!=`string`||typeof r!=`string`)throw Error(`Invalid paramater: sessionId and toEndPoint must be of type string`);if(a&&!r.startsWith(`sip:`))throw Error(`"toEndPoint" must be a "sip" address`);if(!r.startsWith(`sip:`)&&!r.startsWith(`+`))throw Error(`toEndPoint: ${r} must starts with either "sip:" or "+"`);if(i&&typeof i!=`string`)throw Error(`callerId must be of type string`);if(i&&!r.startsWith(`+`))throw Error(`callerId is only valid when transferring to a PSTN number`)}function wf(e){if(R(e)!==`object`)throw Error(`RemoteMediaPlayerSettings: must be "object" type`);if(e.state&&!Object.values($l).includes(e.state))throw Error(`Invalid value for RemoteMediaPlayerSettings.state, valid values are: `+JSON.stringify($l));if(e.volume){if(typeof e.volume!=`number`)throw Error(`RemoteMediaPlayerSettings.volume: must be "number" type`);if(e.volume<0||e.volume>2)throw Error(`RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0`)}}function Tf(e,t,n){return!(typeof e!=`number`||e<t||e>n)}function Ef(e,t){return e&&!t&&delete e.data,e}function Df(e,t,n){if(e.blocked?.byDeviceInUse)return`in-use`;if(e.blocked?.byDeviceMissing)return`not-found`;if(e.blocked?.byPermissions||n===`denied`)return`blocked`;if((t===`idle`||t===`pending`)&&!e.persistentTrack){if(n===`prompt`&&e.state===`interrupted`)return`pending`;if(e.off?.byUser)return`idle`}return`granted`}function Of(e,t,n,r){return e.filter(e=>e.kind===t&&e.deviceId!==``).map(e=>{let t=r.find(t=>t.device.deviceId===e.deviceId);return{device:e,selected:`deviceId`in n?n.deviceId===e.deviceId:!!t?.selected,state:t?.state??`granted`}}).sort((e,t)=>e.device.deviceId===t.device.deviceId?0:e.device.deviceId==="default"?-1:t.device.deviceId==="default"?1:e.device.label<t.device.label?-1:+(e.device.label>t.device.label))}function kf(e,t){let n=zt(`idle`),r=zt(`idle`),i=zt([]),a=zt([]),o=zt([]),s=0,c=0,l=!1;async function u(){let t=++s;if(!navigator.mediaDevices?.getUserMedia||!navigator.mediaDevices?.enumerateDevices){Et(()=>{n.value=`not-supported`,r.value=`not-supported`});return}try{let{devices:n}=await e.enumerateDevices(),{camera:r,mic:c,speaker:u}=await e.getInputDevices();if(l||t!==s)return;Et(()=>{i.value=Of(n,`videoinput`,r,i.peek()),a.value=Of(n,`audioinput`,c,a.peek()),o.value=Of(n,`audiooutput`,u,o.peek())})}catch(e){if(l||t!==s)return;console.warn(`Unable to enumerate Daily devices`,e),Et(()=>{n.value=`not-supported`,r.value=`not-supported`})}}async function d(e){try{return(await navigator.permissions.query({name:e})).state}catch{return`prompt`}}async function f(){let t=++c,o=e.participants().local;if(!o)return;let[s,f]=await Promise.all([d(`camera`),d(`microphone`)]);l||t!==c||(Et(()=>{n.value=Df(o.tracks.video,n.peek(),s),r.value=Df(o.tracks.audio,r.peek(),f),i.value=i.peek().map(e=>e.selected?{...e,state:n.peek()===`in-use`?`in-use`:`granted`}:e),a.value=a.peek().map(e=>e.selected?{...e,state:r.peek()===`in-use`?`in-use`:`granted`}:e)}),await u())}return t(`participant-updated`,e=>{e.participant.local&&f()}),t(`available-devices-updated`,()=>{u()}),t(`selected-devices-updated`,()=>{u()}),t(`started-camera`,()=>{Et(()=>{n.value=`granted`,r.value=`granted`}),f()}),t(`camera-error`,({error:e})=>{++c,Et(()=>{switch(e.type){case`cam-in-use`:n.value=`in-use`;break;case`mic-in-use`:r.value=`in-use`;break;case`cam-mic-in-use`:n.value=r.value=`in-use`;break;case`not-found`:e.missingMedia.includes(`video`)&&(n.value=`not-found`),e.missingMedia.includes(`audio`)&&(r.value=`not-found`);break;case`permissions`:e.blockedMedia.includes(`video`)&&(n.value=`blocked`),e.blockedMedia.includes(`audio`)&&(r.value=`blocked`);break;case`constraints`:n.value=r.value=e.reason===`invalid`?`constraints-invalid`:`constraints-none-specified`;break;case`undefined-mediadevices`:n.value=r.value=`undefined-mediadevices`;break;default:n.value=r.value=`unknown`}})}),e.participants().local&&f(),{camState:n,micState:r,cameras:i,microphones:a,speakers:o,refreshDevices:u,async setCamera(t){await e.setInputDevicesAsync({audioDeviceId:null,videoDeviceId:t})},async setMicrophone(t){await e.setInputDevicesAsync({audioDeviceId:t,videoDeviceId:null})},async setSpeaker(t){await e.setOutputDeviceAsync({outputDeviceId:t})},reset(){++s,++c,Et(()=>{n.value=r.value=`idle`,i.value=[],a.value=[],o.value=[]})},dispose(){l=!0,++s,++c}}}function Af(e){return{...e,tracks:{...e.tracks,audio:{...e.tracks.audio},video:{...e.tracks.video},screenAudio:{...e.tracks.screenAudio},screenVideo:{...e.tracks.screenVideo}}}}function jf(e){let t=zt(e.meetingState()),n=zt({}),r=zt(e.getActiveSpeaker()?.peerId??null),i=[],a=!1;function o(t,n){e.on(t,n);let r=()=>{e.off(t,n)};return i.push(r),r}function s(){n.value=Object.fromEntries(Object.values(e.participants()).filter(Boolean).map(e=>[e.session_id,Af(e)]))}let c=Wt(()=>Object.values(n.value).find(e=>e.local)?.session_id??null),l=kf(e,o);for(let n of[`loading`,`loaded`,`joining-meeting`,`joined-meeting`,`left-meeting`,`error`])o(n,()=>{t.value=e.meetingState()});for(let e of[`participant-joined`,`participant-updated`])o(e,({participant:e})=>{n.value={...n.peek(),[e.session_id]:Af(e)}});o(`started-camera`,s),o(`joined-meeting`,s),o(`participant-left`,({participant:e})=>{let t={...n.peek()};delete t[e.session_id],n.value=t,r.peek()===e.session_id&&(r.value=null)}),o(`active-speaker-change`,({activeSpeaker:e})=>{r.value=e.peerId??null});function u(){Et(()=>{n.value={},r.value=null,l.reset()})}return o(`left-meeting`,u),o(`call-instance-destroyed`,()=>{u(),t.value=`new`}),s(),{call:e,meetingState:t,participants:n,localSessionId:c,activeSpeakerId:r,devices:l,dispose(){a||(a=!0,i.forEach(e=>e()),l.dispose())}}}var Mf=`default`in Zd?Zd.default:Zd,Nf=Ce(null);function Pf({children:e,callObject:t}){let[n,r]=A(null);return Qe(()=>{let e=!1,n;function i(){if(e)return;let a=t??Mf.getCallInstance(),o=a&&!a.isDestroyed()?a:Mf.createCallObject(),s=jf(o),c=()=>{n?.(),r(null),t||queueMicrotask(i)};o.on(`call-instance-destroyed`,c),n=()=>{s.dispose(),o.off(`call-instance-destroyed`,c)},r({call:o,store:s})}return i(),()=>{e=!0,n?.()}},[t]),I(Nf.Provider,{value:n,children:e})}function Ff(){return F(Nf)}var If=new WeakMap;function Lf(e,t,n,r){let i=If.get(e)??new Map;If.set(e,i);let a=t?`local`:`remote`,o=i.get(a);if(!o){let r=t?!e.isLocalAudioLevelObserverRunning():!e.isRemoteParticipantsAudioLevelObserverRunning(),s=()=>{t?e.stopLocalAudioLevelObserver():e.stopRemoteParticipantsAudioLevelObserver()};async function c(){r&&(t?await e.startLocalAudioLevelObserver(n):await e.startRemoteParticipantsAudioLevelObserver(n),!i.has(a)&&!e.isDestroyed()&&s())}o={consumers:0,owned:r,ready:c(),stop:s},i.set(a,o)}o.consumers++;let s=!0;return o.ready.catch(e=>{s&&r(e)}),()=>{s=!1,!(--o.consumers>0)&&(i.delete(a),o.owned&&!e.isDestroyed()&&o.stop())}}function Rf(){return Ff()?.call??null}function zf(){return Ff()?.store.meetingState.value??`new`}function Bf(){return Ff()?.store.localSessionId.value??null}function Vf(){return Ff()?.store.activeSpeakerId.value??null}function Hf(e,t){let n=Rf(),r=M(t);r.current=t,Qe(()=>{if(!n||n.isDestroyed())return;let t=e=>r.current(e);return n.on(e,t),()=>{n.off(e,t)}},[n,e])}function Uf({onAppMessage:e}={}){let t=Rf();return Hf(`app-message`,t=>e?.(t)),P((e,n=`*`)=>{t?.sendAppMessage(e,n)},[t])}function Wf({filter:e}){let t=Ff()?.store;return N(()=>{let n=[];return Wt(()=>{let r=Object.values(t?.participants.value??{}).filter(e).map(e=>e.session_id);return r.length===n.length&&r.every((e,t)=>e===n[t])?n:(n=r,r)})},[t,e]).value}function Gf(e,t=`video`){let n=Ff()?.store,r=N(()=>Wt(()=>n?.participants.value[e??``]?.tracks[t]),[n,e,t]).value;return r?{...r,isOff:r.state===`off`||r.state===`blocked`}:{state:`off`,subscribed:!1,isOff:!0}}function Kf(e){return Gf(e,`video`)}function qf(e){return Gf(e,`audio`)}function Jf(e){return Gf(e,`screenVideo`)}function Yf(){let e=Ff()?.store.devices,t=e?.cameras.value??[],n=e?.microphones.value??[],r=e?.speakers.value??[];return{cameras:t,microphones:n,speakers:r,camState:e?.camState.value??`idle`,micState:e?.micState.value??`idle`,currentCam:t.find(e=>e.selected),currentMic:n.find(e=>e.selected),currentSpeaker:r.find(e=>e.selected),setCamera:P(async t=>{await e?.setCamera(t)},[e]),setMicrophone:P(async t=>{await e?.setMicrophone(t)},[e]),setSpeaker:P(async t=>{await e?.setSpeaker(t)},[e])}}function Xf(e,t,n,r){let i=Rf(),a=Bf(),o=!!e&&e===a,s=M(n);s.current=n,Hf(`local-audio-level`,n=>{e&&o&&t(n.audioLevel)}),Hf(`remote-participants-audio-level`,n=>{e&&!o&&t(n.participantsAudioLevel[e]??0)}),Qe(()=>{if(i&&e&&!i.isDestroyed())return Lf(i,o,r,e=>{s.current?s.current(`Audio level observer not supported in this browser`):console.warn(`Unable to start audio level observer`,e)})},[i,e,o,r])}function Zf(e,t){for(var n in t)e[n]=t[n];return e}function Qf(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function $f(e,t){this.props=e,this.context=t}function ep(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&(typeof n==`function`?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:Qf(this.props,e)}function r(t){return this.shouldComponentUpdate=n,T(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.__f=r.prototype.isReactComponent=!0,r.type=e,r}($f.prototype=new ee).isPureReactComponent=!0,$f.prototype.shouldComponentUpdate=function(e,t){return Qf(this.props,e)||Qf(this.state,t)};var tp=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),tp&&tp(e)};var np=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function rp(e){function t(t){var n=Zf({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=np,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var ip=i.__e;i.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k||[]),i.__c(e,t)}ip(e,t,n,r)};var ap=i.unmount;function op(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=Zf({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return op(e,t,n)})),e}function sp(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return sp(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function cp(){this.__u=0,this.o=null,this.__b=null}function lp(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function up(){this.i=null,this.l=null}i.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),ap&&ap(e)},(cp.prototype=new ee).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=lp(r.__v),a=!1,o=function(){a||r.__z||(a=!0,n.__R=null,i?i(c):c())};n.__R=o;var s=n.__P;n.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=sp(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},cp.prototype.componentWillUnmount=function(){this.o=[]},cp.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=op(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&T(D,null,e.fallback);return i&&(i.__u&=-33),[T(D,null,t.__a?null:e.children),i]};var dp=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function fp(e){return this.getChildContext=function(){return e.context},e.children}function pp(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){be(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}be(T(fp,{context:t.context},e.__v),t.v)}function mp(e,t){var n=T(pp,{__v:e,h:t});return n.containerInfo=t,n}(up.prototype=new ee).__a=function(e){var t=this,n=lp(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),dp(t,e,r)):i()};n?n(a):a()}},up.prototype.render=function(e){this.i=null,this.l=new Map;var t=se(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},up.prototype.componentDidUpdate=up.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){dp(e,n,t)})};var hp=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,gp=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,_p=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,vp=/[A-Z0-9]/g,yp=typeof document<`u`,bp=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};ee.prototype.isReactComponent=!0,[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(ee.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var xp=i.event;i.event=function(e){return xp&&(e=xp(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Sp={configurable:!0,get:function(){return this.class}},Cp=i.vnode;i.vnode=function(e){typeof e.type==`string`&&function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)==-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||yp&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){var s=a.toLowerCase();a===`defaultValue`&&`value`in t&&t.value==null?a=`value`:a===`download`&&!0===o?o=``:s===`translate`&&o===`no`?o=!1:s[0]===`o`&&s[1]===`n`?s===`ondoubleclick`?a=`ondblclick`:s!==`onchange`||n!==`input`&&n!==`textarea`||bp(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:_p.test(a)&&(a=s):s=a=`oninput`:i&&gp.test(a)?a=a.replace(vp,`-$&`).toLowerCase():o===null&&(o=void 0),s===`oninput`&&r[a=s]&&(a=`oninputCapture`),r[a]=o}}n==`select`&&(r.multiple&&Array.isArray(r.value)&&(r.value=se(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=se(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Sp)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=hp,Cp&&Cp(e)};var wp=i.__r;i.__r=function(e){wp&&wp(e),e.__c};var Tp=i.diffed;i.diffed=function(e){Tp&&Tp(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value)};function Ep(e,t){return N(()=>n=>{for(let r of[e,t])typeof r==`function`?r(n):r&&(r.current=n)},[e,t])}var Dp=ep(rp(function({automirror:e,fit:t=`contain`,mirror:n,onResize:r,onPlayFailed:i,playableStyle:a={},sessionId:o,style:s={},type:c=`video`,...l},u){let d=Bf()===o,f=c===`screenVideo`,p=d&&c===`video`,m=M(null),h=Ep(m,u),g=M(!1),_=M(i);_.current=i;let v=Gf(o,c),y=v.persistentTrack,b=p||f||!v.isOff,x=v.subscribed,S=N(()=>{if(typeof n==`boolean`)return n;if(!e)return!1;if(!y)return p;let t=y.getSettings();return`facingMode`in t?p&&t.facingMode===`user`:p},[e,p,n,y]);return j(()=>{g.current=S},[S]),j(function(){let e=m.current;if(!e)return;let t=()=>{let t=e.srcObject;if(!t)return;let n=e.play();n!==void 0&&n.then(()=>{e.srcObject===t&&(e.controls=!1)}).catch(n=>{e.srcObject===t&&(e.controls=!0,console.warn(`Failed to play video`,n),_.current?.(n))})},n=()=>{e.paused&&t()},r=()=>{e.style.transform=`scale(1)`},i=()=>{e.style.transform=g.current?`scale(-1, 1)`:``,e.paused&&t()},a=()=>{document.visibilityState!==`hidden`&&e.paused&&t()};return e.addEventListener(`canplay`,n),e.addEventListener(`enterpictureinpicture`,r),e.addEventListener(`leavepictureinpicture`,i),document.addEventListener(`visibilitychange`,a),()=>{e.removeEventListener(`canplay`,n),e.removeEventListener(`enterpictureinpicture`,r),e.removeEventListener(`leavepictureinpicture`,i),document.removeEventListener(`visibilitychange`,a)}},[]),j(function(){let e=m.current;if(e&&y){if(typeof MediaStream>`u`){console.warn(`MediaStream API not available. Can't setup ${c} for ${o}`);return}return e.srcObject=new MediaStream([y]),e.load(),()=>{e.srcObject=null,e.load()}}},[o,c,y,y?.id]),j(function(){let e=m.current;if(!r||!e)return;let t;function n(){t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{let e=m.current;if(!e||document.hidden)return;let t=e.videoWidth,n=e.videoHeight;t&&n&&r?.({aspectRatio:t/n,height:n,width:t})})}return n(),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`resize`,n),()=>{t&&cancelAnimationFrame(t),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`resize`,n)}},[r]),I(`video`,{autoPlay:!0,muted:!0,playsInline:!0,ref:h,"data-local":d,"data-mirrored":S||void 0,"data-playable":b||void 0,"data-session-id":o,"data-subscribed":x,"data-video-type":c,style:Object.assign({objectFit:t,transform:S?`scale(-1, 1)`:``},s,b?a:{}),...l})}));Dp.displayName=`DailyVideo`;var Op=ep(rp(({onPlayFailed:e,sessionId:t,type:n=`audio`,...r},i)=>{let a=M(null),o=Gf(t,n),s=Ep(a,i),c=o.subscribed,l=M(e);return l.current=e,j(()=>{let e=a.current;if(!e||!o?.persistentTrack)return;if(typeof MediaStream>`u`){console.warn(`MediaStream API not available. Can't setup ${n} for ${t}`),l.current?.({sessionId:t,target:e,type:n,message:`MediaStream API not available`,name:`MediaStream API not available`});return}let r=!1,i=()=>{e.play().catch(i=>{if(r)return;let a={sessionId:t,target:e,type:n,message:i instanceof Error?i.message:String(i),name:i instanceof Error?i.name:void 0};l.current?l.current(a):console.warn(`Failed to play Daily audio`,i)})};return e.addEventListener(`loadedmetadata`,i),e.srcObject=new MediaStream([o.persistentTrack]),e.load(),()=>{r=!0,e.removeEventListener(`loadedmetadata`,i),e.pause(),e.srcObject=null}},[o.persistentTrack,o.persistentTrack?.id,t,n]),Hf(`participant-left`,P(e=>{let n=a.current;e.participant.session_id===t&&n&&(n.pause(),n.srcObject=null)},[t])),Hf(`left-meeting`,P(()=>{let e=a.current;e&&(e.pause(),e.srcObject=null)},[])),I(`audio`,{autoPlay:!0,ref:s,...r,"data-session-id":t,"data-audio-type":n,"data-subscribed":c})}));Op.displayName=`DailyAudioTrack`;var kp=class extends Error{constructor(){super(`Microphone blocked by the browser at join`),this.name=`MicrophoneBlockedError`}};function Ap(e){return e instanceof kp}var jp=new Set([`network`,`server`,`unavailable`,`busy`,`rate_limited`]);function Mp(e){return e===401||e===403?`forbidden`:e===402?`limit_exceeded`:e===423?`busy`:e===429?`rate_limited`:e===409?`concurrency`:e===503?`unavailable`:e>=500?`server`:`unknown`}function Np(e){if(!e)return;let t=e.get(`Retry-After`);if(!t)return;let n=Number.parseInt(t,10);if(!Number.isNaN(n)&&n>=0)return n;let r=Date.parse(t);if(!Number.isNaN(r)){let e=Math.floor((r-Date.now())/1e3);return e>0?e:0}}function Pp(e){if(e instanceof Pn)return{kind:`unavailable`,raw:e.message,retryable:e.code===`security_response_invalid`};if(e instanceof Error&&e.name===`TimeoutError`)return{kind:`network`,raw:e.message,retryable:!0};if(e instanceof bn){let{code:t}=br(e),n=t===`start_token_invalid`||t===`security_session_invalid`?`unavailable`:Mp(e.status);return{kind:n,status:e.status,raw:e.body,retryable:jp.has(n),retryAfterSec:Np(e.headers)}}return e instanceof TypeError?{kind:`network`,raw:String(e),retryable:!0}:{kind:`unknown`,raw:String(e),retryable:!1}}var Fp=new Set([`Captcha token required`,`Captcha verification failed`]);function Ip(e){if(!(e instanceof bn)||e.status!==403)return null;try{let t=JSON.parse(e.body.trim()).error;return typeof t==`string`?t:null}catch{return null}}function Lp(e){return Ip(e)===`Captcha token required`}function Rp(e){return e instanceof bn&&e.status===426&&br(e).code===`deployment_security_required`}function zp(e){let t=Ip(e);return t!==null&&Fp.has(t)}var Bp=`Origin not allowed`;function Vp(e){return Ip(e)===Bp}function Hp(e){return e===`limit_exceeded`?`daily_limit`:e===`forbidden`||e===`concurrency`?null:`busy`}function Up(e,t){let{code:n}=br(e);return n===`security_unavailable`||n===`captcha_unavailable`||n===`deployment_security_required`||n===`start_token_invalid`||n===`security_session_invalid`||n===`unsupported_security_version`||n===`security_response_invalid`?`error`:Hp(t)}var Wp=1e4;function Gp(e){if(e?.aborted)throw e.reason??new DOMException(`The operation was aborted`,`AbortError`)}function Kp(e,t){if(!e||typeof e!=`object`||!(`version`in e)||e.version!==1||!(`start_token`in e)||typeof e.start_token!=`string`||!/^dst1_[A-Za-z0-9_-]{43}$/.test(e.start_token))throw new Pn(`security_response_invalid`);if(!t)return{token:e.start_token};if(!(`security_session`in e)||typeof e.security_session!=`string`||!/^dss1_[A-Za-z0-9_-]{43}$/.test(e.security_session)||!(`session_expires_in`in e)||typeof e.session_expires_in!=`number`||!Number.isSafeInteger(e.session_expires_in)||e.session_expires_in<=0)throw new Pn(`security_response_invalid`);return{token:e.start_token,session:{token:e.security_session,expiresAt:Date.now()+e.session_expires_in*1e3}}}async function qp(e,t,n,r,i,a){let o=new AbortController,s=()=>o.abort(i?.signal?.reason);i?.signal?.aborted?s():i?.signal?.addEventListener(`abort`,s,{once:!0});let c=setTimeout(()=>o.abort(new DOMException(`Security check timed out`,`TimeoutError`)),Wp);(!r||n.current&&n.current.expiresAt<=Date.now())&&(n.current=null);try{for(let i=0;i<2;i+=1){Gp(o.signal);try{let i=await e.post(`/v2/deployments/${t}/start-token`,n.current?{security_session:n.current.token}:{},{signal:o.signal}),s=a?.requestInstrumented?Cr(a,{stage:`start_token`,outcome:`failed`,operation:`start_token`,component:`api`,code:`security_response_invalid`,handled:!0},()=>Kp(i,r)):Kp(i,r);return n.current=s.session??null,s}catch(e){if(i!==0||!n.current||!(e instanceof bn)||e.status!==403||br(e).code!==`security_session_invalid`)throw e;n.current=null}}throw new Pn(`security_response_invalid`)}finally{clearTimeout(c),i?.signal?.removeEventListener(`abort`,s)}}async function Jp(e,t,n,r,i,a,o={current:null},s){let c=n=>(Gp(i?.signal),s?.(),Sr(a,`start`,()=>wn(e,t,n,i)));if(!n)return c(r);if(n.version!==1)throw a?.record({stage:`start_token`,outcome:`failed`,code:`unsupported_security_version`}),new Pn(`unsupported_security_version`);for(let s=0;s<2;s+=1){Gp(i?.signal);let l=await Sr(a,`start_token`,()=>qp(e,t,o,n.session_ttl_seconds!==void 0,i,a));Gp(i?.signal);try{return await c({...r,start_security_version:1,start_token:l.token,...l.session&&{security_session:l.session.token}})}catch(e){let t=br(e).code;if(s!==0||!(e instanceof bn)||e.status!==403||t!==`start_token_invalid`&&t!==`security_session_invalid`)throw e;t===`security_session_invalid`&&(o.current=null),a?.record({stage:`start_token`,outcome:`retry`,code:t})}}throw new Pn(`security_response_invalid`)}var Yp=Ce(null),Xp=`tavus:memory-user-id:`,Zp=new Map;function Qp(e){return`${Xp}${e}`}function $p(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function em(e){if(!e)return``;let t=Qp(e);try{let e=window.localStorage.getItem(t);if(e)return e;let n=$p();return window.localStorage.setItem(t,n),n}catch{}let n=Zp.get(t);if(n)return n;let r=$p();return Zp.set(t,r),r}var tm=`tavus:terms-accepted:`;function nm(e){let t=5381;for(let n=0;n<e.length;n++)t=(t*33^e.charCodeAt(n))>>>0;return t.toString(36)}function rm(e,t){return`${tm}${e}:${nm(t)}`}function im(e,t){if(!e||!t)return!1;try{return globalThis.localStorage?.getItem(rm(e,t))===`1`}catch{return!1}}function am(e,t){if(e&&t)try{globalThis.localStorage?.setItem(rm(e,t),`1`)}catch{}}var om=null;function sm(e,t){e&&t&&(om={deploymentId:e,content:t})}function cm(){om&&=(am(om.deploymentId,om.content),null)}function lm(e){return e===`user`?`user`:e===`pal`?`replica`:null}function um(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function dm(e){if(!um(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!um(e.properties))return null;if(e.event_type===`conversation.utterance`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=lm(t.role);return n?{kind:`chat-message`,sender:n===`user`?`user`:`agent`,text:t.speech}:null}if(e.event_type===`conversation.utterance.streaming`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=lm(t.role);if(!n)return null;let r=t.final===!0||t.is_interrupted===!0;return{kind:`caption-update`,text:t.speech,final:r,role:n}}return null}function fm(e,t,n=!1){return{message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e,properties:{text:t,...n?{needs_only_chat_response:!0}:{}}}}function pm(e,t){return typeof e[t]==`number`?{[t]:e[t]}:{}}function mm(e){let t=lm(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance`,event_type:`conversation.utterance`,properties:{role:t,speech:e.speech,...pm(e,`seq`),...pm(e,`turn_idx`)}}}function hm(e){let t=lm(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance.streaming`,event_type:`conversation.utterance.streaming`,properties:{role:t,speech:e.speech,...typeof e.final==`boolean`?{final:e.final}:{},...typeof e.is_interrupted==`boolean`?{is_interrupted:e.is_interrupted}:{},...pm(e,`seq`)}}}function gm(e){return typeof e.name!=`string`||typeof e.arguments!=`string`?null:{kind:`tool_call`,event_type:`conversation.tool_call`,properties:{name:e.name,arguments:e.arguments,...pm(e,`seq`),...pm(e,`turn_idx`)}}}function _m(e){if(typeof e==`string`)return e;try{let t=JSON.stringify(e??{});return typeof t==`string`?t:null}catch{return null}}function vm(e){if(typeof e.name!=`string`)return null;let t=e.modality===`vision`||e.modality===`audio`?e.modality:null;if(!t)return null;let n=_m(e.arguments);return n===null?null:{kind:`perception_tool_call`,event_type:`conversation.perception_tool_call`,properties:{name:e.name,arguments:n,modality:t}}}function ym(e){return{kind:`perception_analysis`,event_type:`conversation.perception_analysis`,properties:e}}function bm(e,t){return{kind:`speaking`,event_type:t,properties:{...pm(e,`seq`),...pm(e,`turn_idx`)}}}var xm={"conversation.utterance":mm,"conversation.utterance.streaming":hm,"conversation.tool_call":gm,"conversation.perception_tool_call":vm,"conversation.perception_analysis":ym,"conversation.replica_started_speaking":bm,"conversation.replica_stopped_speaking":bm,"conversation.user_started_speaking":bm,"conversation.user_stopped_speaking":bm};function Sm(e){if(!um(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!um(e.properties))return null;let t=xm[e.event_type];return t?t(e.properties,e.event_type):{kind:`unknown`,event_type:e.event_type,properties:e.properties}}function Cm(e,t,n=!1){return{message_type:`conversation`,event_type:t.event_type,conversation_id:e,properties:{...t.properties,...t.event_type===`conversation.respond`&&n?{needs_only_chat_response:!0}:{}}}}function wm(e,t){let n=dm(e);return n?n.kind===`chat-message`?(t.appendChatMessage(n.sender,n.text),!0):(t.setCaption(n.text,n.final,n.role),!0):!1}function Tm(e=5e3){let t=[],n=n=>{for(;t.length>0&&n-t[0].ts>e;)t.shift()};return{markSent(e){t.push({text:e,ts:Date.now()})},consumeMatch(e){n(Date.now());let r=t.findIndex(t=>t.text===e);return r!==-1&&(t.splice(r,1),!0)}}}var Em=mn(`Conversation`),Dm=1500;function Om(e,t){if(!t)return e;let n=()=>t.reason??new DOMException(`The operation was aborted`,`AbortError`);return t.aborted?Promise.reject(n()):new Promise((r,i)=>{let a=()=>i(n());t.addEventListener(`abort`,a,{once:!0}),e.then(e=>{t.removeEventListener(`abort`,a),r(e)},e=>{t.removeEventListener(`abort`,a),i(e)})})}var km=Ce(null);function Am({children:e}){return I(Pf,{children:I(Bm,{children:e})})}function jm(e,t,n){let{role:r,speech:i}=e.properties;if(!(r===`user`&&n.consumeMatch(i)))for(let n of t)n.onUtterance?.({...e.properties})}function Mm(e,t){for(let n of t)n.onToolCall?.({...e.properties})}function Nm(e,t){for(let n of t)n.onPerception?.(e)}function Pm(e,t){let n=e.event_type,r=n.startsWith(`conversation.replica`)?`replica`:`user`,i=n.endsWith(`started_speaking`)?`started`:`stopped`;for(let n of t)n.onSpeakingState?.({who:r,state:i,...e.properties})}function Fm(e,t){for(let n of t)n.onMessage?.(e)}function Im(e,t,n){switch(e.kind){case`utterance`:case`utterance.streaming`:jm(e,t,n);return;case`tool_call`:Mm(e,t);return;case`perception_tool_call`:case`perception_analysis`:Nm(e,t);return;case`speaking`:Pm(e,t);return;case`unknown`:Fm(e,t);return}}function Lm(e,t,n){let r=e;return t&&r?.conversational_context==null&&(r={...r,conversational_context:t}),n&&r?.custom_greeting==null&&(r={...r,custom_greeting:n}),r}function Rm(e){let t=e.participants().local?.tracks.audio;return t?.state===`blocked`&&t.blocked?.byPermissions===!0}function zm(e,t){return t?e instanceof bn&&e.status===401:!1}function Bm({children:e}){let{deploymentId:t,client:n,config:r,telemetry:i}=F(Or),a=N(()=>({current:null}),[n,t]),{memoryStores:o,conversationalContext:s,customGreeting:c}=F(yt),l=Rf(),u=zf(),d=F(Yp),f=N(()=>zt(`idle`),[]),p=N(()=>zt(null),[]),m=N(()=>zt([]),[]),h=N(()=>zt(``),[]),g=N(()=>zt(null),[]),_=N(()=>zt(null),[]),v=N(()=>zt(null),[]),y=N(()=>zt(null),[]),b=M(null),x=M(null),S=N(()=>zt(null),[]),C=M(null),w=N(()=>Tm(),[]),T=N(()=>new Set,[]),E=N(()=>zt(`idle`),[]),D=d?.flowSignal??E,ee=P(e=>{v.value=e},[v]),te=P(e=>{y.value=e},[y]);j(()=>{if(!l?.on||!i)return;let e,t=S.subscribe(t=>{if(e?.(),e=void 0,t===null)return;let r={conversation_id:t,attempt_id:n.diagnostics?.attemptId},a=new Set,o=e=>{if(e.event===`interrupted`){if(a.has(e.type))return;a.add(e.type),i.record({...r,stage:`connection`,outcome:`degraded`,operation:`daily.connection`,component:`conversation`,code:`connection_lost`,handled:!0})}else e.event===`connected`&&a.delete(e.type)&&a.size===0&&i.record({...r,stage:`connection`,outcome:`recovered`,operation:`daily.connection`,component:`conversation`})},s=()=>i.record({...r,stage:`media`,outcome:`failed`,operation:`media.devices`,component:`media`,code:`device_error`,handled:!0}),c=e=>i.record({...r,stage:`media`,outcome:`degraded`,operation:e.type===`audio-playback-error`?`media.playback`:`media.devices`,component:`media`,code:e.type===`audio-playback-error`?`playback_error`:`device_error`,handled:!0});l.on(`network-connection`,o),l.on(`camera-error`,s),l.on(`nonfatal-error`,c),e=()=>{l.off(`network-connection`,o),l.off(`camera-error`,s),l.off(`nonfatal-error`,c)}});return()=>{t(),e?.()}},[l,i,n,S]);let ne=P(()=>{let e=S.peek();return e!==null&&(S.value=null,p.peek()?.conversationId===e)},[S,p]);Hf(`joined-meeting`,()=>{let e=S.peek();e!==null&&e===p.peek()?.conversationId&&f.peek()===`connecting`&&(f.value=`connected`,Em.info(`Connected to meeting`))}),Hf(`left-meeting`,()=>{ne()&&(f.value=`ended`,cm(),Em.info(`Left meeting`))}),Hf(`error`,()=>{ne()&&(i?.record({stage:`join`,outcome:`failed`,code:`meeting_error`,conversation_id:p.peek()?.conversationId}),_.value=`Meeting error`,f.value=`error`)});let re=P(()=>S.peek()===null?u===`joining-meeting`||u===`joined-meeting`:!1,[S,u]),ie=P(()=>C.current,[]);pn(()=>{let e=f.value;if(e===`connected`)for(let e of T)e.onConnect?.();else if(e===`ended`||e===`disconnecting`)for(let e of T)e.onDisconnect?.();else if(e===`error`){let e=_.peek()??`Unknown error`;for(let t of T)t.onError?.({code:`CONVERSATION_ERROR`,message:e})}}),pn(()=>{let e=D.value;for(let t of T)t.onModeChange?.(e)}),Uf({onAppMessage:P(e=>{wm(e?.data,{appendChatMessage(e,t){e===`user`&&w.consumeMatch(t)||(m.value=[...m.peek(),{id:crypto.randomUUID(),sender:e,text:t,timestamp:Date.now()}])},setCaption(e,t,n){h.value=e,g.value=n,b.current!==null&&(clearTimeout(b.current),b.current=null),t&&(b.current=setTimeout(()=>{h.value=``,g.value=null,b.current=null},Dm))}});let t=Sm(e?.data);t&&Im(t,T,w)},[m,h,g,w,T])}),j(()=>()=>{b.current!==null&&(clearTimeout(b.current),b.current=null)},[]);let ae=M(!1),oe=P((e=!1)=>{e||i?.beginAttempt?.(),ae.current=!0,x.current=null,p.value=null,m.value=[],h.value=``,g.value=null,b.current!==null&&(clearTimeout(b.current),b.current=null),(f.peek()===`ended`||f.peek()===`error`)&&(f.value=`idle`)},[p,f,m,h,g,i]),O=P(()=>{let e=p.peek()?.conversationId??null,r=x.current;if(r?.conversationId===e)return r.promise;f.value=`disconnecting`;let a=!1,o=e?Sr(i,`end`,()=>Tn(n,t,e,{keepalive:!0}),e).catch(e=>{a=!0,Em.error(`End conversation API failed`,e)}):Promise.resolve(),s;try{s=l?.leave()}catch(t){a=!0,xr(i,t,{stage:`end`,outcome:`failed`,operation:`daily.leave`,component:`conversation`,handled:!0,conversation_id:e??void 0}),Em.error(`Daily leave failed`,t)}let c=Promise.resolve(s).catch(t=>{a=!0,xr(i,t,{stage:`end`,outcome:`failed`,operation:`daily.leave`,component:`conversation`,handled:!0,conversation_id:e??void 0}),Em.error(`Daily leave failed`,t)}),u=c.then(()=>{C.current===u&&(C.current=null)});C.current=u;let d=Promise.all([o,c]).then(()=>{x.current?.promise===d&&(S.peek()===e&&(S.value=null),f.value=`ended`,a&&(x.current=null))});return x.current={conversationId:e,promise:d},d},[n,t,l,p,f,S,i]),k=P(async(e,u)=>{let d=null;try{ae.current||oe(),ae.current=!1,f.value=`connecting`,_.value=null;let m=e,h=v.peek();h&&m?.password==null&&(m={...m,password:h});let g=r.value.customization.conversation.unique_memory_tag===!0;if(!m?.memory_stores){let e=o??(g?[em(t)]:[]);e.length&&(m={...m,memory_stores:e})}m=Lm(m,s,c);let b=y.peek();b&&m?.captcha_token==null&&(m={...m,captcha_token:b});let x=await Jp(n,t,r.peek().start_security,m,u,i,a,()=>{y.value=null});if(d=x.conversation_id,p.value={conversationId:x.conversation_id,conversationName:x.conversation_name,conversationUrl:x.conversation_url,callbackUrl:x.callback_url,createdAt:x.created_at,magicGrid:x.magic_grid===!0},console.info(`[Tavus:Conversation] Conversation created:`,x.conversation_id),u?.signal?.aborted)throw u.signal.reason??new DOMException(`The operation was aborted`,`AbortError`);let w=r.value.customization.conversation.modality===`chat`,T=C.current;if(T&&await Om(T,u?.signal),S.value=x.conversation_id,await Sr(i,`join`,()=>Om(Promise.resolve(l?.join({url:x.conversation_url,...w?{startAudioOff:!0,startVideoOff:!0}:{}})),u?.signal),x.conversation_id,{operation:`daily.join`,component:`conversation`}),!w&&l&&Rm(l)){let e=new kp;throw xr(i,e,{stage:`permissions`,outcome:`failed`,operation:`media.microphone`,component:`permissions`,code:`NotAllowedError`,handled:!0}),e}ae.current=!1}catch(e){throw await O(),d&&(p.value=null),zm(e,r.value.has_password===!0)&&(v.value=null),Em.error(`Start failed`,e),_.value=String(e),f.value=`error`,e}},[n,a,i,t,l,f,_,p,v,y,r,o,s,c,oe,O,S]),se=P(e=>{if(!l)return;let t=p.peek();if(!t){Em.warn(`sendChat called before session was established; dropping message`);return}w.markSent(e),l.sendAppMessage(fm(t.conversationId,e,r.peek().customization.conversation.modality===`chat`),`*`),m.value=[...m.peek(),{id:crypto.randomUUID(),sender:`user`,text:e,timestamp:Date.now()}]},[l,m,p,w,r]),ce=P(e=>{if(!l){Em.warn(`sendMessage called before Daily was ready; dropping message`);return}let t=p.peek();if(!t){Em.warn(`sendMessage called before session was established; dropping message`);return}e.event_type===`conversation.respond`&&w.markSent(e.properties.text),l.sendAppMessage(Cm(t.conversationId,e,r.peek().customization.conversation.modality===`chat`),`*`)},[l,p,w,r]),le=P(e=>{T.add(e)},[T]),ue=P(e=>{T.delete(e)},[T]),de=N(()=>({state:f,session:p,chatMessages:m,captionText:h,captionRole:g,error:_,password:v,setPassword:ee,captchaToken:y,setCaptchaToken:te,mode:D,start:k,end:O,sendChat:se,sendMessage:ce,conversation:{start:k,end:O,sendMessage:ce},__registerSubscriber:le,__unregisterSubscriber:ue,__beginAttempt:oe,isSharedCallBusy:re,pendingLeave:ie}),[f,p,m,h,g,_,v,ee,y,te,D,k,O,se,ce,le,ue,oe,re,ie]);return I(km.Provider,{value:de,children:e})}var Vm=mn(`CaptchaChallenge`),Hm=new Set([`110600`,`110620`,`200500`]);function Um(e){return e.startsWith(`3`)||e.startsWith(`6`)}var Wm=new Set([`110500`,`110510`]);function Gm(e){return e.startsWith(`3`)||e.startsWith(`6`)||Hm.has(e)}function Km(e){return typeof e==`object`&&!!e&&e.source===`tavus-captcha`&&typeof e.type==`string`}function qm(e,t,n,r,i){return`${e.replace(/\/+$/,``)}${t.startsWith(`/`)?t:`/${t}`}?deployment_uuid=${encodeURIComponent(n)}&action=${encodeURIComponent(r)}&parent_origin=${encodeURIComponent(i)}`}function Jm({captcha:e,deploymentId:t,onToken:n,onFallback:r,onInteractive:i,presented:a=!0}){let o=F(yt),s=F(Or)?.telemetry,c=(o.baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),l=new URL(c).origin,[u,d]=A(0),[f,p]=A(!1),[m,h]=A(!1),g=M(0),_=M(0),v=M(null),y=M(!1);j(()=>{m||(y.current=!1);let e=v.current;if(!m||!a||f||!e||typeof IntersectionObserver>`u`)return;let t=!1,n=()=>{t&&document.visibilityState===`visible`&&!y.current&&(y.current=!0,s?.record({stage:`captcha`,outcome:`shown`}))},r=new IntersectionObserver(([e])=>{t=!!e?.isIntersecting&&e.intersectionRatio>=.5,n()},{threshold:.5});return r.observe(e),document.addEventListener(`visibilitychange`,n),()=>{r.disconnect(),document.removeEventListener(`visibilitychange`,n)}},[m,a,f,u,s]);let b=qm(c,e.challenge_path,t,e.action,window.location.origin),x=P(()=>{h(!1),i?.(!1),g.current=0,_.current=0,d(e=>e+1)},[i]);if(Qe(()=>{function e(e){if(s?.record({stage:`captcha`,outcome:`failed`,code:/^[0-9]{6}$/.test(e)?e:`unknown`}),Vm.warn(`Captcha error received`,e),Gm(e)){if(g.current+=1,Um(e)&&(_.current+=1),g.current<2){h(!1),i?.(!1);return}Vm.warn(`Captcha error keeps recurring, falling back to no-token mode`),p(!0),r(_.current>=2?`unsupported`:`exhausted`);return}Vm.warn(`Captcha error is not retryable, falling back to no-token mode`),p(!0),r(Wm.has(e)?`unsupported`:`broken`)}function a(a){if(f||a.origin!==l)return;let o=v.current?.contentWindow;if(!o||a.source!==o)return;let c=a.data;if(Km(c)&&c.deployment_uuid===t){if(c.type===`interactive`){h(!0),i?.(!0);return}if(c.type===`interaction-ended`){h(!1),i?.(!1);return}if(c.type===`unsupported`){p(!0),r(`unsupported`);return}if(c.type===`token`&&c.token){Vm.info(`Captcha token received`),h(!1),i?.(!1),n(c.token);return}if(c.type===`expired`){s?.record({stage:`captcha`,outcome:`expired`}),Vm.info(`Captcha token expired, reloading iframe`),x();return}c.type===`error`&&e(String(c.code??``))}}return window.addEventListener(`message`,a),()=>window.removeEventListener(`message`,a)},[l,t,f,n,r,i,x,s]),f)return null;let S=m&&a;return I(`div`,{class:S?`absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm animate-[tavusFadeUp_180ms_ease-out]`:`absolute top-0 left-0 w-0 h-0 overflow-hidden opacity-0 pointer-events-none`,"aria-hidden":!S,children:I(`iframe`,{ref:v,src:b,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups`,title:`Security challenge`,style:{border:`none`,width:`300px`,height:`65px`},scrolling:`no`},u)})}var Ym=mn(`Captcha`),Xm=15e3,Zm=Ce(null);function Qm({children:e}){let{config:t,deploymentId:n,telemetry:r}=F(Or),i=F(km),a=on(!0),o=on(null),s=on(!1),c=on(0),l=on(!1),u=on(!1),d=M([]),f=M(0),p=t.value.captcha??null,m=i?.state.value??`idle`,h=m===`connecting`||m===`connected`,g=p!==null&&!l.value&&!h&&s.value,_=P(e=>{let t=d.current;d.current=[];for(let n of t)n(e)},[]),v=P(()=>{s.value=!1,u.value=!1},[s,u]),y=P((e,t)=>{Ym.warn(e),r?.record({stage:`captcha`,outcome:t===`unsupported`?`unsupported`:`failed`,code:t,duration_ms:performance.now()-f.current}),l.value=!0,v(),_({kind:`unavailable`,reason:t})},[l,_,v,r]),b=P(e=>{i?.setCaptchaToken(e)},[i]),x=i?.captchaToken;j(()=>{if(x)return x.subscribe(e=>{e!==null&&(s.peek()&&r?.record({stage:`captcha`,outcome:`succeeded`,duration_ms:performance.now()-f.current}),v())})},[x,v,s,r]);let S=P(e=>{y(`Captcha challenge unavailable; not attempting /start without a token`,e)},[y]),C=P(e=>{e&&!u.peek()&&r?.record({stage:`captcha`,outcome:`interactive`}),u.value=e},[u,r]),w=P(async e=>(t.peek().captcha??null)===null?{kind:`not-required`}:(i?.captchaToken.peek()??null)===null?(l.peek()&&(l.value=!1,c.value=c.peek()+1),s.peek()||(f.current=performance.now(),r?.record({stage:`captcha`,outcome:`started`})),s.value=!0,new Promise(t=>{let n=!1,a,o,s=u.subscribe(e=>{clearTimeout(a),!e&&(a=setTimeout(()=>y(`Captcha mint timed out`,`timeout`),Xm))}),c=r=>{if(n)return;n=!0,clearTimeout(a),s(),e?.removeEventListener(`abort`,l),o?.();let i=d.current.indexOf(c);i!==-1&&d.current.splice(i,1),t(r)},l=()=>{c({kind:`unavailable`,reason:`cancelled`}),d.current.length===0&&(r?.record({stage:`captcha`,outcome:`cancelled`,duration_ms:performance.now()-f.current}),v())};o=i?.captchaToken.subscribe(e=>{e!==null&&c({kind:`token`})}),d.current.push(c),e?.aborted?l():e?.addEventListener(`abort`,l,{once:!0})})):{kind:`token`},[s,t,i,c,l,y,u,v,r]),T=N(()=>({ensureToken:w,hostVisible:a,promptSlot:o}),[w,a,o]),E=o.value,D=g&&p?I(Jm,{captcha:p,deploymentId:n,presented:a.value,onToken:b,onFallback:S,onInteractive:C},c.value):null;return I(Zm.Provider,{value:T,children:[e,E&&D?mp(D,E):D]})}function $m(){let e=F(Or);if(!e)throw Error(`useConfig must be used within ConfigProvider`);return e}var eh=`tavus_pudl_`,th=172800,nh=new Map;function rh(){let e=new Date;return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function ih(e){return`${eh}${e}`}function ah(e){try{let t=`${ih(e)}=`,n=document.cookie.split(`; `).find(e=>e.startsWith(t));if(!n)return 0;let[r,i]=decodeURIComponent(n.slice(t.length)).split(`.`);if(r!==rh())return 0;let a=Number.parseInt(i,10);return Number.isFinite(a)&&a>0?a:0}catch{return 0}}function oh(e,t){try{let n=encodeURIComponent(`${rh()}.${t}`);document.cookie=`${ih(e)}=${n}; max-age=${th}; path=/; SameSite=Lax`}catch{return}}function sh(e){let t=nh.get(e);return t||(t=zt(e?ah(e):0),nh.set(e,t)),t}function ch(e){if(!e)return;oh(e,ah(e)+1);let t=ah(e),n=nh.get(e);n?n.value=t:nh.set(e,zt(t))}function lh(e){switch(e){case`blocked`:return`blocked`;case`in-use`:return`in-use`;case`not-found`:return`not-found`;case`not-supported`:case`undefined-mediadevices`:return`unsupported`;default:return null}}function uh(e,t,n,r){return e===`granted`&&r?`granted`:lh(e)||(t===`denied`?`blocked`:t===`prompt`?e===`granted`&&n?`granted`:`prompt`:t===`granted`?n?`checking`:`prompt`:e===`granted`?`granted`:n?`checking`:`prompt`)}function dh(e,t){let n=e===`granted`,r=e===`blocked`||e===`in-use`||e===`not-found`||e===`unsupported`;return{status:e,isGranted:n,isBlocked:r,canRequest:e===`prompt`,needsAttention:r||e===`prompt`&&t!==`granted`}}function fh(e){let[t,n]=A(null);return j(()=>{let t=!1,r=navigator.permissions;if(r?.query)return r.query({name:e}).then(e=>{t||(n(e.state),e.onchange=()=>{t||n(e.state)})}).catch(()=>{}),()=>{t=!0}},[e]),t}function ph(){let e=F(Or)?.telemetry,t=Rf(),n=zf(),r=Bf(),{micState:i,camState:a,currentMic:o,currentCam:s}=Yf(),c=fh(`microphone`),l=fh(`camera`),u=n===`joined-meeting`||!!r,[d,f]=A(!1),[p,m]=A(!1),[h,g]=A(!1),_=P(t=>{u?t.setLocalAudio(!0):Promise.resolve(t.startCamera({videoSource:!1})).catch(t=>xr(e,t,{stage:`permissions`,outcome:`failed`,operation:`media.microphone`,component:`permissions`,handled:!0}))},[u,e]),v=P(()=>{if(f(!0),!t){g(!0);return}_(t)},[t,_]);j(()=>{h&&t&&(g(!1),_(t))},[h,t,_]);let y=P(async()=>{if(t){m(!0);try{await t.setInputDevicesAsync({videoSource:!0})}catch(t){xr(e,t,{stage:`permissions`,outcome:`failed`,operation:`media.camera`,component:`permissions`,handled:!0})}t.setLocalVideo(!0)}},[t,e]);return{mic:N(()=>dh(uh(i,c,d,!!o),c),[i,c,d,o]),camera:N(()=>dh(uh(a,l,p,!!s),l),[a,l,p,s]),requestMic:v,requestCamera:y}}var mh=mn(`Flow`),hh=[`idle`,`unavailable`,`ended`];function gh({children:e}){let{config:t,retryInit:n,telemetry:r}=$m(),{cameraOnStart:i}=F(yt),{start:a,end:o,session:s,state:c,__beginAttempt:l,isSharedCallBusy:u,pendingLeave:d}=F(km),f=t.value.deployment_id??``,p=sh(f),m=P(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;return n==null||e.channel!==`widget`&&e.channel!==`embed`?null:n},[t]),h=F(Zm),[g,_]=A(`idle`),[v,y]=A(!1),[b,x]=A(null),[S,C]=A(null),[w,T]=A(!1),{mic:E,camera:D,requestMic:ee,requestCamera:te}=ph();j(()=>{if(!b||![`blocked`,`unsupported`,`not-found`,`in-use`].includes(b.status))return;let e=b.status===`blocked`?`NotAllowedError`:b.status===`not-found`?`NotFoundError`:b.status===`in-use`?`NotReadableError`:`unsupported`;r?.record({stage:`permissions`,outcome:`failed`,code:e,operation:b.kind===`camera`?`media.camera`:`media.microphone`,component:`permissions`,handled:!0})},[b,r]);let ne=N(()=>zt(`idle`),[]);j(()=>{ne.value=g},[g,ne]),pn(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;n!=null&&(e.channel===`widget`||e.channel===`embed`)&&ne.value===`idle`&&p.value>=n&&(C(`daily_limit`),T(!1),_(`unavailable`))});let re=M(!1),ie=M(!1),ae=M(async()=>{}),oe=M(!1),O=M(null),k=M(null),se=P(()=>{let e=O.current;O.current=null,e?.resolve()},[]),ce=P(async(e=new AbortController)=>{k.current=e;let{signal:r}=e;y(!0);try{let e=await h?.ensureToken(r)??{kind:`not-required`};if(r.aborted)return;if(e.kind===`unavailable`){C(e.reason===`unsupported`?`captcha_unsupported`:`error`),T(e.reason===`timeout`||e.reason===`exhausted`),_(`unavailable`);return}if(await a(void 0,{signal:r}),r.aborted)return;re.current=!1,ie.current=!1,m()!=null&&ch(f),_(`call`)}catch(i){if(r.aborted)return;let a=Pp(i);if(Ap(i)){se(),x({kind:`microphone`,status:`blocked`}),_(`idle`);return}if((Lp(i)&&!t.peek().captcha||Rp(i)&&!t.peek().start_security)&&!ie.current)return ie.current=!0,mh.info(`/start requires protection the loaded config lacks; refreshing config`),await n(),r.aborted?void 0:(l(!0),await ae.current(e));if(zp(i)&&!re.current){re.current=!0,y(!1),_(`idle`);return}if(re.current=!1,Vp(i)){mh.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`),C(`error`),T(!1),_(`unavailable`);return}if(a.status===401&&t.value.has_password===!0){_(`idle`);return}let o=Up(i,a.kind)??`busy`;C(o),T(a.retryable),_(`unavailable`)}finally{k.current===e&&(k.current=null),y(!1)}},[a,t,m,f,h,n,se,l]);ae.current=ce;let le=P(async()=>{let e=O.current;if(e){x(null);try{await ce(e.controller)}finally{O.current===e&&(O.current=null),e.resolve()}}},[ce]),ue=P(()=>{let e=O.current;if(e&&!e.proceeding){if(e.proceeding=!0,t.peek().customization.conversation.modality===`video`&&i===`on`&&!D.isGranted&&!D.isBlocked){x({kind:`camera`,status:D.status}),te().finally(()=>{le()});return}le()}},[t,i,D,te,le]);j(()=>{if(O.current&&b?.kind===`microphone`){if(b.status!==E.status&&x({kind:`microphone`,status:E.status}),E.isGranted){ue();return}if(E.isBlocked){let e=O.current;O.current=null,y(!1),e.resolve()}}},[b,E,ue]);let de=P(()=>{if(O.current)return O.current.promise;let e,t=new Promise(t=>{e=t});return O.current={promise:t,resolve:e,proceeding:!1,controller:new AbortController},y(!0),E.isGranted?ue():E.isBlocked?(x({kind:`microphone`,status:E.status}),O.current=null,y(!1),e()):(x({kind:`microphone`,status:E.status}),ee()),t},[E,ee,ue]),fe=P(async()=>{if(!hh.includes(g))return;let e=t.peek().customization,n=e.show_haircheck,r=e.conversation.modality,i=n&&r!==`chat`,a=!n&&r!==`chat`,o=m();if(o!=null&&p.value>=o){C(`daily_limit`),T(!1),_(`unavailable`);return}if(u()){C(`busy`),T(!0),_(`unavailable`);return}let s=d();if(s&&await s,l(),i&&!oe.current){_(`haircheck`);return}return a?de():ce()},[g,t,de,ce,m,p,l,u,d]),pe=P(async()=>{g===`haircheck`&&(oe.current=!0,await ce())},[g,ce]),me=P(()=>{let e=O.current,t=e?.controller??k.current;e&&(O.current=null,e.resolve(),x(null)),t?.abort(),t&&y(!1),g===`haircheck`&&_(`idle`)},[g]),he=P(()=>{g===`call`&&_(`ended`)},[g]);j(()=>{let e=()=>{let e=O.current!==null||k.current!==null,t=g===`haircheck`||g===`call`,n=s.peek()!==null,r=n&&c.peek()!==`ended`;(e||t||n)&&(me(),(g===`call`||r)&&_(`ended`),o())};return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[g,s,c,me,o]);let ge=P(()=>{C(null),T(!1),_(`idle`)},[]),_e=N(()=>({flowSignal:ne,setFlowState:_,isStarting:v,permissionRequest:b,unavailableCause:S,canRetry:w,start:fe,join:pe,cancel:me,leave:he,restart:ge}),[ne,v,b,S,w,fe,pe,me,he,ge]);return I(Yp.Provider,{value:_e,children:e})}var _h=Ce(null),vh=mn(`HostBridge`),yh=Ce(null);function bh(e){if(!e)return null;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}function xh({children:e}){let t=F(km),n=F(Or),r=F(Yp),i=F(_h),a=F(yt),o=on(null),s=a?.overrideConfig,c=P(e=>{o.value=bh(e)},[o]),l=P((e,t)=>{let n=o.peek();n&&n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})),vh.info(`Event:`,e,t)},[o]);j(()=>{let e=o.value;if(!e)return;let a={tavus:{start:t.start,end:t.end,sendChat:t.sendChat,sendMessage:t.sendMessage},startConversation:async()=>{try{r?await r.start():await t.start()}catch(e){vh.error(`startConversation failed`,e)}},endConversation:async()=>{try{let e=r?.flowSignal.peek();if(e===`call`){r?.leave();return}r?.cancel(),e!==`haircheck`&&t.session.peek()&&await t.end()}catch(e){vh.error(`endConversation failed`,e)}},sendMessage:e=>{t.sendMessage(typeof e==`string`?{event_type:`conversation.respond`,properties:{text:e}}:e)},updateConfig:t=>{let r=s??{};Cr(n?.telemetry,{stage:`host_bridge`,outcome:`failed`,operation:`host.command`,component:`host_bridge`,code:`integration_error`,handled:!1},()=>{let n=On(r,t);e.setAttribute(`override-config`,JSON.stringify(n))})},destroy:()=>{t.session.peek()&&t.end(),e.remove()}},c=i?{...a,open:i.expand,close:i.collapse}:a;return Object.assign(e,c),()=>{for(let t of Object.keys(c))delete e[t]}},[o.value,t,r,s,n,i]);let u=M(!1);j(()=>{u.current||o.value&&n&&(u.current=!0,l(`tavus:ready`,{deploymentId:n.deploymentId}))},[o.value,n,l]);let d=M(null),f=M(new Set);j(()=>t.state.subscribe(e=>{if(e!==d.current)switch(d.current=e,e){case`connected`:{let n=t.session.peek()?.conversationId??``;f.current.add(n),l(`tavus:conversation-started`,{conversationId:n}),l(`tavus:state-change`,{state:e});break}case`ended`:{let n=t.session.peek()?.conversationId??``;f.current.delete(n),l(`tavus:conversation-ended`,{conversationId:n}),l(`tavus:state-change`,{state:e});break}case`error`:l(`tavus:error`,{code:`CONVERSATION_ERROR`,message:t.error.peek()??`Unknown error`}),l(`tavus:state-change`,{state:e});break;default:l(`tavus:state-change`,{state:e})}}),[t,l]),pn(()=>{if(!r)return;let e=r.flowSignal.value;l(`tavus:mode-change`,{mode:e})}),j(()=>{let e={onUtterance(e){l(`tavus:protocol-message`,{kind:`utterance`,event_type:`conversation.utterance`,properties:e})},onToolCall(e){l(`tavus:tool-call`,e),l(`tavus:protocol-message`,{kind:`tool_call`,event_type:`conversation.tool_call`,properties:e})},onPerception(e){l(`tavus:protocol-message`,e)},onSpeakingState({who:e,state:t,seq:n,turn_idx:r}){let i={state:t,...n===void 0?{}:{seq:n},...r===void 0?{}:{turn_idx:r}};l(`tavus:protocol-message`,{kind:`speaking`,event_type:e===`replica`?t===`started`?`conversation.replica_started_speaking`:`conversation.replica_stopped_speaking`:t===`started`?`conversation.user_started_speaking`:`conversation.user_stopped_speaking`,properties:i})},onMessage(e){l(`tavus:protocol-message`,e)}};return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[t,l]);let p=N(()=>({shadowHost:o,dispatchEvent:l}),[o,l]);return I(yh.Provider,{value:p,children:[I(`div`,{ref:c,style:`display:contents`}),e]})}var Sh=Ce(null);function Ch({children:e}){let{config:t}=F(Or),n=N(()=>Wt(()=>{let e=t.value.customization.style;return e.mode===`dark`||e.mode===`system`&&(globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1)}),[t]),r=N(()=>Wt(()=>{let e=t.value.customization.style;return e.style===`basic`?n.value?`white-black`:`black-white`:n.value?`${e.style}-dark`:e.style}),[t,n]),i=N(()=>Wt(()=>Ah(t.value.customization.style)),[t]),a=N(()=>({dataTheme:r,isDark:n,cssVars:i}),[r,n,i]);return I(Sh.Provider,{value:a,children:I(`div`,{"data-theme":r.value,style:jh(i.value),class:`contents`,children:e})})}var wh=[0,.125,.25,.5,.75],Th=[0,1,2,3,4],Eh=[0,.2,.25,.3],Dh=/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Oh=/^(?:rgba?|hsla?|oklch)\([0-9a-z%.,\s/+-]{1,64}\)$/i;function kh(e){let t=e?.trim();if(t)return Dh.test(t)||Oh.test(t)?t:void 0}function Ah(e){let t=kh(e.magic_canvas?.accent_color);return{"--radius-box":`${wh[e.boxes_radius]??.5}rem`,"--radius-field":`${wh[e.field_radius]??.25}rem`,"--radius-selector":`${wh[e.selectors_radius]??.5}rem`,"--border":`${Th[e.border_width]??1}px`,"--size-field":`${Eh[e.fields_size]??.25}rem`,"--size-selector":`${Eh[e.selectors_size]??.25}rem`,"--depth":e.depth_effect?`1`:`0`,"--noise":e.noise_effect?`1`:`0`,...t?{"--tavus-magic-canvas-accent":t}:{}}}function jh(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}var Mh=.5,Nh=.01;function Ph(e,t){if(!Lh(e)||!Lh(t))return null;let n=e.left-t.left,r=e.top-t.top,i=e.width/t.width,a=e.height/t.height;return Math.abs(n)<Mh&&Math.abs(r)<Mh&&Math.abs(i-1)<Nh&&Math.abs(a-1)<Nh?null:`translate(${Rh(n)}px, ${Rh(r)}px) scale(${Rh(i)}, ${Rh(a)})`}function Fh(e){if(e==null)return null;let t=Ih(e.width),n=Ih(e.height);return t===null&&n===null?null:{width:t,height:n}}function Ih(e){return Number.isFinite(e)&&e>0?e:null}function Lh(e){return Number.isFinite(e.left)&&Number.isFinite(e.top)&&Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>0&&e.height>0}function Rh(e){return Math.round(e*1e3)/1e3}function zh(e,t){j(()=>{let n=e.current;if(!n)return;let r=new ResizeObserver(e=>{let n=e[0];n&&t(n)});return r.observe(n),()=>r.disconnect()},[e,t])}var Bh=new WeakMap;function Vh(e){let t=Bh.get(e);t?t.holders+=1:Bh.set(e,{holders:1,restore:Hh(e)});let n=!1;return()=>{if(n)return;n=!0;let t=Bh.get(e);t&&(--t.holders,!(t.holders>0)&&(Bh.delete(e),t.restore()))}}function Hh(e){let{body:t,documentElement:n}=e,r=n.style.overflowX,i=n.style.overflowY,a=t.style.paddingRight,o=n.clientWidth;n.style.overflow=`hidden`;let s=n.clientWidth-o,c=s>0?`${Uh(t)+s}px`:null;return c&&(t.style.paddingRight=c),()=>{n.style.overflow===`hidden`&&(n.style.overflow=``,n.style.overflowX=r,n.style.overflowY=i),c&&t.style.paddingRight===c&&(t.style.paddingRight=a)}}function Uh(e){let t=e.ownerDocument.defaultView?.getComputedStyle(e).paddingRight,n=Number.parseFloat(t??``);return Number.isFinite(n)?n:0}var Wh=Ce(null),Gh=480,Kh=768,qh=`relative w-full h-full`,Jh=`m-0 p-0 border-0 bg-transparent text-inherit max-w-none max-h-none`,Yh=`${Jh} block static w-full h-full`,Xh=`${Jh} fixed inset-0 flex items-center justify-center w-screen h-dvh backdrop:bg-black/60 motion-safe:backdrop:animate-[tavusFadeIn_180ms_ease-out]`,Zh=`relative outline-none aspect-[var(--tavus-expand-aspect)] [--tavus-expand-default-max-width:1280px] [--tavus-expand-default-max-height:900px] [@media(min-width:2560px)]:[--tavus-expand-default-max-width:1600px] [@media(min-width:2560px)]:[--tavus-expand-default-max-height:1200px] w-[var(--tavus-expand-width)] h-[var(--tavus-expand-height)] max-w-[var(--tavus-expand-max-width)] max-h-[var(--tavus-expand-max-height)] [@media(max-width:768px)]:w-screen [@media(max-width:768px)]:h-dvh [@media(max-width:768px)]:max-w-none [@media(max-width:768px)]:max-h-none`,Qh=280,$h=`cubic-bezier(0.22, 1, 0.36, 1)`,eg={kind:`inline`};function tg(e,t,{isStarting:n=!1,awaitingPermission:r=!1,startWasUnderway:i=!1}={}){return e?t===`haircheck`||t===`call`||n||r?!0:t===`unavailable`&&i:!1}function ng(e){return typeof e?.showModal==`function`&&typeof e.close==`function`}function rg(e,t){let n=e.flowSignal.peek(),r=n===`call`,i=r||n===`haircheck`||e.isStarting;e.cancel(),r&&e.leave(),i&&t?.()}function ig({children:e}){let t=M(null),n=M(null),r=N(()=>zt(`full`),[]),[i,a]=A(eg),o=F(yt),s=F(Yp),c=F(yh),l=F(Zm),u=F(km),d=o?.expandOptions,f=c?.shadowHost.value??null,p=s?.flowSignal.value??`idle`,m=s?.isStarting??!1,h=s?.permissionRequest!=null,g=M(!1);j(()=>{m||p===`haircheck`||p===`call`?g.current=!0:(p===`idle`||p===`ended`)&&(g.current=!1)},[m,p]);let _=tg(d?.enabled===!0,p,{isStarting:m,awaitingPermission:h,startWasUnderway:g.current}),v=i.kind!==`inline`;Qe(()=>{let e=t.current;if(e){if(i.kind===`inline`){if(!_||!ng(n.current))return;let t=e.getBoundingClientRect();a({kind:`expanding`,from:t,slot:Fh(f?.getBoundingClientRect())})}else!_&&i.kind!==`collapsing`?a({kind:`collapsing`,from:e.getBoundingClientRect(),slot:i.slot}):_&&i.kind===`collapsing`&&a({kind:`expanding`,from:e.getBoundingClientRect(),slot:i.slot})}},[_,i,f]);let y=i.kind===`inline`?null:i.slot;Qe(()=>{if(!f||!y)return;let e=f.style.minWidth,t=f.style.minHeight;return y.width!==null&&(f.style.minWidth=`${y.width}px`),y.height!==null&&(f.style.minHeight=`${y.height}px`),()=>{f.style.minWidth=e,f.style.minHeight=t}},[f,y]);let b=P(()=>{s&&rg(s,u?.end)},[s,u]),x=M(b);x.current=b,Qe(()=>{let e=n.current;if(!e||!v||!ng(e))return;let t=()=>{e.isConnected&&!e.open&&(e.showModal(),x.current())};return e.addEventListener(`close`,t),e.open||e.showModal(),()=>{e.removeEventListener(`close`,t),e.open&&e.close()}},[v]),Qe(()=>{if(f&&v)return Vh(f.ownerDocument)},[f,v]),Qe(()=>{let e=t.current;if(!e||i.kind!==`expanding`&&i.kind!==`collapsing`)return;let n=()=>a(i.kind===`expanding`?{kind:`expanded`,slot:i.slot}:eg),r=e.getBoundingClientRect(),o=c?.shadowHost.peek()??null,s=i.kind===`expanding`?r:o?.getBoundingClientRect()??r,l=Ph(i.from,r)??`none`,u=Ph(s,r)??`none`,d=globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1;if(l===u||d||typeof e.animate!=`function`){n();return}let f=e.animate([{transform:l,transformOrigin:`top left`},{transform:u,transformOrigin:`top left`}],{duration:Qh,easing:$h,fill:`forwards`}),p=!1;return f.finished.then(()=>{p||n()},()=>{}),()=>{p=!0,f.cancel()}},[i,c]),Qe(()=>{let e=n.current;if(!e||!v)return;let t=e=>{e.preventDefault(),x.current()};return e.addEventListener(`cancel`,t),()=>e.removeEventListener(`cancel`,t)},[v]);let S=P(e=>{let t=e.contentRect.width;t<Gh?r.value=`compact`:t<Kh?r.value=`medium`:r.value=`full`},[r]);j(()=>{if(l)return l.promptSlot.value=t.current,()=>{l.promptSlot.value=null}},[l,v]),zh(t,S);let C=N(()=>({layoutMode:r,containerRef:t}),[r,t]);return I(Wh.Provider,{value:C,children:I(`dialog`,{ref:n,class:v?Xh:Yh,"aria-label":v?`Conversation`:void 0,role:v?void 0:`none`,children:I(`div`,{ref:t,class:v?Zh:qh,style:v?gt(ht(d).vars):void 0,tabIndex:v?-1:void 0,autofocus:v,children:e})})})}var ag=`@container/conversation w-full h-full`,og=`motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,sg=`relative w-full h-full max-h-screen aspect-video @max-mobile:aspect-9/16 overflow-hidden rounded-box`;function cg({animate:e=!1,innerClassName:t,innerStyle:n,innerRef:r,role:i,"aria-live":a,"aria-label":o,children:s}){return I(`div`,{class:e?`${ag} ${og}`:ag,children:I(`div`,{ref:r,class:t?`${sg} ${t}`:sg,style:n,role:i,"aria-live":a,"aria-label":o,children:s})})}var lg=41/2,ug=23/2,dg=Math.hypot(lg,ug),fg=Array.from({length:1008},(e,t)=>{let n=t%42,r=Math.floor(t/42),i=Math.hypot(n-lg,r-ug)/dg*.82,a=.34+(n*13+r*7)%34/100;return{delay:`${i.toFixed(3)}s`,opacity:a.toFixed(2)}});function pg(){return I(cg,{innerClassName:`embed-loading-screen`,role:`status`,"aria-live":`polite`,"aria-label":`Loading deployment`,children:I(`div`,{class:`embed-loading-dot-field`,"aria-hidden":`true`,style:{"--dot-columns":`42`,"--dot-rows":`24`},children:fg.map((e,t)=>I(`span`,{class:`embed-loading-field-dot`,style:{"--dot-delay":e.delay,"--dot-opacity":e.opacity}},t))})})}var mg=Ce(null);function hg({children:e}){let t=M(null);return I(mg.Provider,{value:{frameRef:t},children:I(`div`,{class:`@container/conversation w-full h-full`,children:I(`div`,{ref:t,class:`relative w-full h-full max-h-screen aspect-video @max-mobile:aspect-9/16 overflow-hidden rounded-box bg-base-100 has-[.cvi-video-surface]:will-change-transform`,children:e})})})}var gg=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),_g=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function vg(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:_g(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var yg=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},bg=e=>{let t=yg(e);return t.charAt(0).toUpperCase()+t.slice(1)},xg={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Sg(e){return e!=null}function Cg(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??xg.width,a=e.size??e.height??xg.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?gg(...c):gg(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??xg[`stroke-width`])*Number(e.size??e.width??xg.width)/Number(t.size??t.width??xg.width):t.strokeWidth??xg[`stroke-width`];return[`svg`,{...Object.entries(xg).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Sg(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Sg(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Sg(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var wg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Tg=Ce({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,nonScalingStroke:!1,class:``}),Eg=()=>F(Tg),Dg=({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,children:s,iconNode:c=[],icon:l={node:c,aliases:[],size:24},class:u=``,...d})=>{let{size:f=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,nonScalingStroke:h=!1,color:g=`currentColor`,class:_=``}=Eg()??{},[v,y,b=[]]=Cg(l,{color:e??g,width:n??t??f,height:r??t??f,strokeWidth:i??p,absoluteStrokeWidth:a??m,nonScalingStroke:o??h,className:gg(_,u),hasA11yProp:!!s||wg(d),attributes:d});return T(v,{...y},[...b.map(([e,t])=>T(e,t)),...se(s)])};function Og(e,t,n=[]){let r=typeof e==`string`?vg(e,t,n):e,i=({class:e=``,className:t=``,children:n,...i})=>T(Dg,{...i,icon:r,class:gg(e,t)},n);return r.name&&(i.displayName=bg(r.name)),i}var kg=Og({name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]}),Ag=Og({name:`camera-off`,size:24,node:[[`path`,{d:`M14.564 14.558a3 3 0 1 1-4.122-4.121`,key:`1rnrzw`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M20 20H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 .819-.175`,key:`1x3arw`}],[`path`,{d:`M9.695 4.024A2 2 0 0 1 10.004 4h3.993a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v7.344`,key:`1i84u0`}]]}),jg=Og({name:`captions`,size:24,node:[[`rect`,{width:`18`,height:`14`,x:`3`,y:`5`,rx:`2`,ry:`2`,key:`12ruh7`}],[`path`,{d:`M7 15h4M15 15h2M7 11h2M13 11h4`,key:`1ueiar`}]],aliases:[`subtitles`]}),Mg=Og({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]}),Ng=Og({name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]}),Pg=Og({name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`,key:`1s409w`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}],[`path`,{d:`M21 16v5h-5`,key:`1ck2sf`}],[`path`,{d:`M21 8V3h-5`,key:`1qoq8a`}],[`path`,{d:`M3 16v5h5`,key:`1t08am`}],[`path`,{d:`m3 21 6-6`,key:`wwnumi`}],[`path`,{d:`M3 8V3h5`,key:`1ln10m`}],[`path`,{d:`M9 9 3 3`,key:`v551iv`}]]}),Fg=Og({name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]}),Ig=Og({name:`face-slightly-smiling`,size:24,node:[[`path`,{d:`M15 10V9`,key:`4dkmfx`}],[`path`,{d:`M16.472 15a6 6 0 01-8.943 0`,key:`7qomzy`}],[`path`,{d:`M9 10V9`,key:`1lazqi`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],aliases:[`smile`]}),Lg=Og({name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]}),Rg=Og({name:`message-circle`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]}),zg=Og({name:`mic-off`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]}),Bg=Og({name:`mic`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]}),Vg=Og({name:`minimize-2`,size:24,node:[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]}),Hg=Og({name:`monitor-up`,size:24,node:[[`path`,{d:`m9 10 3-3 3 3`,key:`11gsxs`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}]]}),Ug=Og({name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]}),Wg=Og({name:`phone-off`,size:24,node:[[`path`,{d:`M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272`,key:`1wngk7`}],[`path`,{d:`M22 2 2 22`,key:`y4kqgn`}],[`path`,{d:`M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473`,key:`10hv5p`}]]}),Gg=Og({name:`picture-in-picture-2`,size:24,node:[[`path`,{d:`M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4`,key:`daa4of`}],[`rect`,{width:`10`,height:`7`,x:`12`,y:`13`,rx:`2`,key:`1nb8gs`}]]}),Kg=Og({name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]}),qg=Og({name:`shrink`,size:24,node:[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`,key:`17vawe`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`,key:`chjx8e`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`,key:`lav6yq`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`,key:`1pxi2q`}]]}),Jg=Og({name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]}),Yg=Og({name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]}),Xg=Og({name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]}),Zg=Og({name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]});function Qg(e,t){return({size:n=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>I(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,children:I(e,{size:n})})}var $g={close:Qg(Zg,`Close`),cancel:Qg(Zg,`Cancel`),leave:Qg(Wg,`Leave call`),more:Qg(Ng,`More`),error:Qg(Jg,`Error`),mic:Qg(Bg,`Microphone`),"mic-off":Qg(zg,`Microphone muted`),cam:Qg(kg,`Camera`),"cam-off":Qg(Ag,`Camera off`),"screen-share":Qg(Hg,`Screen share`),pip:Qg(Gg,`Picture in picture`),user:Qg(Yg,`User`),"face-smile":Qg(Ig,`Camera off`),captions:Qg(jg,`Closed captions`),chat:Qg(Rg,`Chat`),fullscreen:Qg(Lg,`Enter fullscreen`),"fullscreen-exit":Qg(Vg,`Exit fullscreen`),expand:Qg(Pg,`Expand`),collapse:Qg(qg,`Collapse`),send:Qg(Kg,`Send`),"external-link":Qg(Fg,`External link`),clock:Qg(Mg,`Clock`),moon:Qg(Ug,`Unavailable`),users:Qg(Xg,`Busy`)},e_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 21h-2v-2h2v2Zm-6-2H4v-2h10v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h-2v-2h-2v-2h-2V7h2v2h2V7h2V5h2v14ZM4 17H2V7h2v10Zm12 0h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2H8V9h2v2ZM8 9H6V7h2v2ZM6 7H4V5h2v2Zm8 0h-4V5h4v2ZM4 5H2V3h2v2Z"/></svg>`,t_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M3 4h18v2H3zm0 14h18v2H3zM1 6h2v12H1zm20 0h2v12h-2zM5 10h2v4H5zm8 0h2v4h-2zM7 8h4v2H7zm0 6h4v2H7zm8 0h4v2h-4zm0-6h4v2h-4z"/></svg>`,n_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M22 22h-2v-2h-2v-2h2v-8h2v12Zm-4-4h-8v-2h8v2ZM4 12h2v2H4v2H2V4h2v8Zm6 4H8v-6h2v6Zm10-6H10V8h10v2Zm-4-4h-2V4h2v2Zm-2-2H4V2h10v2Z"/></svg>`,r_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12Zm-5-1h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2h-2V6h2v7ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,i_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4v-2h2v2Zm14 0h-2v-2h2v2ZM4 18H2V6h2v12Zm4 0H6v-2h2v2Zm14 0h-2V6h2v12Zm-12-2H8v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V8h2v2Zm2-2h-2V6h2v2ZM6 6H4V4h2v2Zm14 0h-2V4h2v2Zm-2-2H6V2h12v2Z"/></svg>`,a_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M7 19H5v-2h2v2Zm12 0h-2v-2h2v2ZM9 15v2H7v-2h2Zm8 2h-2v-2h2v2Zm-6-2H9v-2h2v2Zm4 0h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-2-2H9V9h2v2Zm4 0h-2V9h2v2ZM9 9H7V7h2v2Zm8 0h-2V7h2v2ZM7 7H5V5h2v2Zm12 0h-2V5h2v2Z"/></svg>`,o_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M7 19h2v-2h2v-2h2v2h2v2h2v2H7v-2Zm13-6H4v-2h16v2Zm-3-8h-2v2h-2v2h-2V7H9V5H7V3h10v2Z"/></svg>`,s_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2V4h2v16Zm18 0h-2V4h2v16Zm-9-2h-2v-2h2v2Zm0-4h-2V6h2v8Zm7-10H4V2h16v2Z"/></svg>`,c_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M15 19h-2v2h-2v-2H9v-2H7v-2h10v2h-2v2Zm5-6H4v-2h16v2Zm-7-8h2v2h2v2H7V7h2V5h2V3h2v2Z"/></svg>`,l_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M8 22H4v-2h4v2Zm12 0h-4v-2h4v2ZM4 20H2v-4h2v4Zm18 0h-2v-4h2v4Zm-6-3H8v-2h8v2Zm-8-2H6V9h2v6Zm10 0h-2V9h2v6Zm-2-6H8V7h8v2ZM4 8H2V4h2v4Zm18 0h-2V4h2v4ZM8 4H4V2h4v2Zm12 0h-4V2h4v2Z"/></svg>`,u_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H6v-2h12v2ZM6 20H4V4h2v16Zm14 0h-2v-3h2v3ZM16 9h2v2h2v2h-2v2h-2v2h-2v-4H8v-2h6V7h2v2Zm4-2h-2V4h2v3Zm-2-3H6V2h12v2Z"/></svg>`,d_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm-5-4H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8 0h-4v-2h4v2Zm6 0h-2v-6h2v6Zm-10-2H8V4h2v10Zm6 0h-2V4h2v10ZM14 4h-4V2h4v2Z"/></svg>`,f_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M13 22h-2v-2H8v-2h8v2h-3v2Zm9 0h-2v-2h2v2Zm-2-2h-2v-2h2v2ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2ZM6 16H4v-6h2v6Zm8-2h2v2h-6v-2h2v-2h2v2Zm-4-4h2v2h-2v2H8V8h2v2Zm10 4h-2v-4h2v4Zm-4-4h-2V4h2v6ZM8 8H6V6h2v2ZM6 6H4V4h2v2ZM4 4H2V2h2v2Zm10 0h-4V2h4v2Z"/></svg>`,p_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M18 22H8v-2h10v2ZM8 20H6v-2h2v2Zm12 0h-2v-2h2v2ZM6 18H4v-2h2v2Zm16 0h-2v-4h-2v-2h2v-2h2v8ZM4 16H2V6h2v10Zm14 0h-6v-2h6v2Zm-6-2h-2v-2h2v2Zm-2-2H8V6h2v6ZM6 6H4V4h2v2Zm8-2h-2v2h-2V4H6V2h8v2Z"/></svg>`,m_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M5 15H3v-2h2v2Zm8 0h-2v-2h2v2Zm8 0h-2v-2h2v2ZM3 13H1v-2h2v2Zm4 0H5v-2h2v2Zm4 0H9v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2Zm4 0h-2v-2h2v2ZM5 11H3V9h2v2Zm8 0h-2V9h2v2Zm8 0h-2V9h2v2Z"/></svg>`,h_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 20H4v-2h16v2ZM4 18H2V6h2v12Zm18 0h-2V6h2v12ZM18 8v6h-8V8h8Zm2-2H4V4h16v2Zm-4 4h-4v2h4v-2Z"/></svg>`,g_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 18h-7v2h3v2H8v-2h3v-2H4v-2h16v2ZM4 16H2V4h2v12Zm18 0h-2v-6h2v6Zm-6-6h-2V8h2v2Zm2-2h-2V6h2v2Zm4-6v6h-2V6h-2V4h-2V2h6Zm-8 2H4V2h10v2Z"/></svg>`,__=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M4 19h4v2H2v-8h2v6Zm8 0H8v-2h4v2Zm4-2h-4v-2h4v2Zm4-2h-4v-2h4v2Zm-10-2H4v-2h6v2Zm12 0h-2v-2h2v2ZM8 5H4v6H2V3h6v2Zm12 6h-4V9h4v2Zm-4-2h-4V7h4v2Zm-4-2H8V5h4v2Z"/></svg>`,v_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M6 22H4v-4h2v4Zm14 0h-2v-4h2v4ZM8 18H6v-2h2v2Zm10 0h-2v-2h2v2Zm-2-2H8v-2h8v2Zm-1-4H9v-2h6v2Zm-6-2H7V4h2v6Zm8 0h-2V4h2v6Zm-2-6H9V2h6v2Z"/></svg>`,y_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M2 22H0v-4h2v4Zm14 0h-2v-4h2v4Zm8 0h-2v-4h2v4ZM4 18H2v-2h2v2Zm10 0h-2v-2h2v2Zm8 0h-2v-2h2v2Zm-10-2H4v-2h8v2Zm8 0h-4v-2h4v2Zm-9-4H5v-2h6v2Zm8 0h-4v-2h4v2ZM5 10H3V4h2v6Zm8 0h-2V4h2v6Zm8 0h-2V4h2v6ZM11 4H5V2h6v2Zm8 0h-4V2h4v2Z"/></svg>`,b_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M20 22H4v-2h16v2ZM4 20H2v-6H0v-2h2V8h2v12Zm18-8h2v2h-2v6h-2V8h2v4Zm-8 6h-4v-2h4v2Zm-4-2H8v-2h2v2Zm6 0h-2v-2h2v2Zm-6-4H8v-2h2v2Zm6 0h-2v-2h2v2Zm-3-6h7v2H4V6h7V4h2v2Zm4-2h-4V2h4v2Z"/></svg>`,x_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M17 21H5v-2h12v2ZM5 19H3V7h2v12Zm14 0h-2v-6h2v6Zm-8-4H9v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V9h2v2Zm6 0h-2V7h-2V5h-4V3h8v8Zm-4-2h-2V7h2v2Zm-6-2H5V5h6v2Z"/></svg>`,S_=`<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M16 9h2V7h2V5h2v14h-2v-2h-2v-2h-2v4H2V5h14v4ZM4 17h10V7H4v10Z"/></svg>
55
+ `;function C_(e){return e.replace(/\s(width|height)="\d+"/g,``)}function w_(e,t){let n=C_(e);return({size:e=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>I(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,style:{display:`inline-flex`,width:e,height:e},dangerouslySetInnerHTML:{__html:n.replace(`<svg`,`<svg width="100%" height="100%"`)}})}var T_={pixelarticons:{close:w_(i_,`Close`),cancel:w_(a_,`Cancel`),leave:w_(u_,`Leave call`),more:w_(m_,`More`),error:w_(s_,`Error`),mic:w_(d_,`Microphone`),"mic-off":w_(f_,`Microphone muted`),cam:w_(S_,`Camera`),"cam-off":w_(e_,`Camera off`),"screen-share":w_(g_,`Screen share`),pip:w_(h_,`Picture in picture`),user:w_(v_,`User`),"face-smile":w_(b_,`Camera off`),captions:w_(t_,`Closed captions`),chat:w_(n_,`Chat`),fullscreen:w_(l_,`Enter fullscreen`),"fullscreen-exit":w_(o_,`Exit fullscreen`),expand:w_(c_,`Expand`),collapse:w_(o_,`Collapse`),send:w_(__,`Send`),"external-link":w_(x_,`External link`),clock:w_(r_,`Clock`),moon:w_(p_,`Unavailable`),users:w_(y_,`Busy`)},lucide:$g};function E_({name:e,...t}){let{config:n}=$m(),r=(T_[n.value.customization.style.icon_library]??T_.pixelarticons)[e];return I(r,{...t})}var D_=`Ready when you are`,O_=`Start the conversation`;function k_(e){return typeof e==`string`&&e.length>0?e:``}function A_(e){let t=k_(e.replica_thumbnail_image_url)||null,n=k_(e.replica_thumbnail_video_url)||null;return!t&&!n?null:{imageUrl:t,videoUrl:n}}function j_(e){let{preview:t}=e.customization,{background:n}=t,r=A_(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=k_(n.url);return{title:t.title||D_,description:t.description||``,btn_title:t.btn_title||O_,background:{type:i,url:a}}}var M_={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`},N_=`#t=0.1`;function P_(e){return e.includes(`#`)?e:`${e}${N_}`}function F_({replica:e,fallback:t=null}){let[n,r]=A(()=>new Set),i=F(Or)?.telemetry,a=e=>{i?.record({stage:`media`,outcome:`degraded`,operation:`media.preview`,component:`media`,code:`asset_error`,handled:!0}),r(t=>new Set(t).add(e))},o=`absolute inset-0 w-full h-full object-cover`,{imageUrl:s,videoUrl:c}=e;return s&&!n.has(s)?I(`img`,{class:o,src:s,loading:`lazy`,alt:``,onError:()=>a(s)}):c&&!n.has(c)?I(`video`,{class:o,src:P_(c),muted:!0,playsinline:!0,preload:`metadata`,controls:!1,onError:()=>a(c)}):I(D,{children:t})}function I_({variant:e,replica:t}){let n=F(Or)?.telemetry,[r,i]=A(!1);return j(()=>{i(!1)},[e.url]),e.type===`replica`&&t?I(F_,{replica:t,fallback:I(`div`,{class:`absolute inset-0`,style:M_})}):e.type===`custom-image`&&e.url&&!r?I(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:e.url,loading:`lazy`,alt:``,onError:()=>{n?.record({stage:`media`,outcome:`degraded`,operation:`media.preview`,component:`media`,code:`asset_error`,handled:!0}),i(!0)}}):I(`div`,{class:`absolute inset-0`,style:M_})}function L_({className:e=``}){let{config:t}=$m(),n=j_(t.value),r=A_(t.value);return I(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:I(I_,{variant:n.background,replica:r})})}var R_=`absolute inset-0 bg-base-100 text-base-content flex flex-col items-center justify-center gap-6 px-6 py-8 text-center overflow-y-auto motion-safe:animate-[tavusFadeUp_280ms_ease-out]`;function z_({title:e,description:t,media:n,children:r,overlay:i}){return I(`div`,{class:R_,children:[n===void 0?I(L_,{}):n,(e||t)&&I(`div`,{class:`flex flex-col items-center gap-3 max-w-sm`,children:[e&&I(`h2`,{class:`text-lg font-medium leading-snug`,children:e}),t&&I(`p`,{class:`text-base text-base-content/60 tracking-wide leading-snug`,children:t})]}),r&&I(`div`,{class:`flex flex-col items-center gap-3`,children:r}),i]})}function B_({loading:e=!1,disabled:t,class:n,children:r,...i}){return I(`button`,{type:`button`,class:`btn relative ${n?` ${n}`:``}`,disabled:t||e,"aria-busy":e||void 0,...i,children:[I(`span`,{children:r}),e&&I(`span`,{class:`absolute inset-0 flex items-center justify-center backdrop-blur-xs`,"aria-hidden":`true`,children:I(`span`,{class:`loading loading-spinner loading-sm`})})]})}var V_={daily_limit:{title:`PAL is at today's limit`,description:`This PAL can take more conversations tomorrow.`},total_limit:{title:`PAL is unavailable`,description:`This PAL isn't available right now. Please check back later.`},busy:{title:`PAL is in another conversation`,description:`Please try again in a moment.`},error:{title:`Couldn't load this PAL`,description:`This PAL couldn't be loaded. Please try again later.`},captcha_unsupported:{title:`This PAL isn't available on this device`,description:`The security check couldn't run in this browser. Please try another device.`}};function H_(e,t){let n=t?.[e];return{title:n?.title||V_[e].title,description:n?.description||V_[e].description}}var U_={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`,captcha_unsupported:`error`},W_={daily_limit:`never`,total_limit:`never`,busy:`always`,error:`when-retryable`,captcha_unsupported:`never`};function G_({cause:e}){return I(`div`,{class:`flex size-16 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/70`,children:I(E_,{name:U_[e],size:`2rem`})})}function K_({cause:e,canRetry:t,onRetry:n,onCancel:r,isStarting:i=!1}){let{config:a}=$m(),o=a.value.customization?.unavailable_screen,s=H_(e,o),c=o?.cta??[],l=W_[e],u=l===`always`||l===`when-retryable`&&t,d=u||c.length>0||!!r;return I(z_,{media:I(G_,{cause:e}),title:s.title,description:s.description,children:d&&I(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:[u&&I(B_,{class:`btn-neutral rounded-box`,disabled:!t,loading:i,onClick:n,children:`Try again`}),c.map(e=>I(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url)),r&&I(`button`,{type:`button`,class:`btn btn-ghost`,onClick:r,children:`Close`})]})})}function q_(){let e=F(Yp);return{state:e.flowSignal.value,isStarting:e.isStarting,permissionRequest:e.permissionRequest,unavailableCause:e.unavailableCause,canRetry:e.canRetry,start:e.start,join:e.join,cancel:e.cancel,leave:e.leave,restart:e.restart}}var J_={start_button:`Start the conversation`,ready_to_start:``};function Y_(){let{config:e}=$m(),{preview:t}=e.value.customization;return N(()=>({start_button:t.btn_title??J_.start_button,ready_to_start:t.description??J_.ready_to_start}),[t])}function X_(){return F(yt)?.layout??`inline`}function Z_({kind:e,status:t}){if(e===`camera`)return`Allow camera access to use video. Camera is optional.`;switch(t){case`blocked`:return`Microphone is blocked. Allow access in your browser settings to continue.`;case`in-use`:return`Your microphone is in use by another app. Close it and try again.`;case`not-found`:return`No microphone found. Connect one to continue.`;case`unsupported`:return`This browser can't access your microphone.`;default:return`Allow microphone access to start the conversation.`}}function Q_({message:e,class:t}){return I(`div`,{class:`w-max max-w-[min(20rem,80vw)] ${t??``}`,children:[I(`div`,{class:`px-4 py-2 rounded-box bg-neutral text-neutral-content text-sm font-medium shadow-lg text-center`,role:`status`,"aria-live":`polite`,children:e}),I(`svg`,{class:`absolute left-1/2 -translate-x-1/2 top-full text-neutral`,width:`16`,height:`8`,viewBox:`0 0 16 8`,"aria-hidden":`true`,children:I(`path`,{d:`M0 0 L8 8 L16 0 Z`,fill:`currentColor`})})]})}var $_=`text-preview-title @max-mobile:text-preview-title-narrow`,ev=`text-preview-title-full-screen`,tv=`text-sm @max-mobile:text-xs`,nv=`text-preview-description-full-screen`;function rv({title:e,description:t,fullScreen:n}){return!e&&!t?null:I(`div`,{class:`flex flex-col gap-1 text-left ${n?`max-w-xl`:`max-w-sm`}`,children:[e&&I(`h2`,{class:`${n?ev:$_} font-medium leading-tight`,children:e}),t&&I(`p`,{class:`${n?nv:tv} text-white/80 leading-snug`,children:t})]})}var iv=`absolute inset-0 overflow-hidden bg-base-100 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,av=`absolute inset-x-0 top-0 h-2/5 bg-linear-to-b from-black/60 to-transparent`,ov=`absolute inset-x-0 bottom-0 h-2/5 bg-linear-to-t from-black/70 to-transparent`,sv=`absolute inset-0 bg-black/45`,cv=`absolute inset-0 overflow-y-auto p-8 @max-mobile:p-5 text-white [text-shadow:0_1px_3px_rgb(0_0_0/0.45)]`;function lv({title:e,description:t,children:n,align:r=`low`,overlay:i,class:a,role:o,"aria-live":s}){let{config:c}=$m(),l=j_(c.value),u=A_(c.value),d=X_()===`full-screen`;return I(`div`,{class:a?`${iv} ${a}`:iv,role:o,"aria-live":s,children:[I(I_,{variant:l.background,replica:u}),r===`center`?I(D,{children:[I(`div`,{class:sv}),I(`div`,{class:`${cv} flex flex-col items-center justify-center gap-3`,children:n})]}):I(D,{children:[(e||t)&&(d?I(`div`,{class:av}):I(D,{children:[I(`div`,{class:`${av} hidden @max-mobile:block`}),I(`div`,{class:ov})]})),d?I(`div`,{class:cv,children:[I(rv,{title:e,description:t,fullScreen:!0}),I(`div`,{class:`absolute inset-x-8 @max-mobile:inset-x-5 bottom-[20%] flex flex-col items-center gap-3`,children:n})]}):I(`div`,{class:`${cv} grid grid-cols-[1fr_auto] grid-rows-[1fr_auto] gap-x-6`,children:[I(`div`,{class:`col-start-1 row-start-2 self-center @max-mobile:col-span-2 @max-mobile:row-start-1 @max-mobile:self-start`,children:I(rv,{title:e,description:t})}),I(`div`,{class:`col-start-2 row-start-2 self-end justify-self-end flex flex-col items-end gap-3`,children:n})]})]}),i]})}var uv={video:`cam`,audio:`mic`,chat:`chat`},dv={"full-screen":`btn-lg px-16 @max-3xl:px-10 @max-md:btn-md @max-md:px-5`,inline:`px-8 @max-mobile:px-5`};function fv({children:e,loading:t=!1,...n}){let{config:r}=$m(),i=X_(),a=uv[r.value.customization.conversation.modality],o=a!==void 0&&i===`full-screen`;return I(B_,{class:`btn-preview-action rounded-box ${dv[i]}`,loading:t,...n,children:o?I(`span`,{class:`flex items-center justify-center gap-2`,children:[I(E_,{name:a,"aria-hidden":!0}),e]}):e})}var pv=`Thanks for joining`,mv=`You can start a new conversation whenever you're ready.`,hv=`Start a new conversation`;function gv(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function _v({text:e,onRestart:t,isStarting:n=!1,permissionRequest:r=null}){let{config:i}=$m(),a=X_()===`full-screen`,o=i.value.customization.after_call,s=o.cta.filter(e=>gv(e.url)),c=o.title||e?.title||pv,l=o.description||e?.description||mv,u=e?.restart||hv;return I(lv,{title:c,description:l,children:[I(`div`,{class:`relative`,children:[r&&I(Q_,{message:Z_(r),class:`absolute bottom-full mb-3 z-20 ${a?`left-1/2 -translate-x-1/2`:`right-0`}`}),I(fv,{onClick:t,loading:n,children:u})]}),s.length>0&&I(`div`,{class:`flex flex-wrap items-center gap-2 ${a?`justify-center`:`justify-end`}`,children:s.map(e=>I(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn rounded-box border-white/50 bg-black/35 text-white backdrop-blur-xs hover:bg-black/50`,children:e.title},e.url))})]})}function vv(){let e=F(Or)?.telemetry,t=M(!1);return{report:P(n=>{t.current||(t.current=!0,e?.record({stage:`media`,outcome:`failed`,operation:`media.playback`,component:`media`,code:`playback_error`,handled:!0,error_type:n&&In.has(n)?n:void 0}))},[e]),recover:P(()=>{t.current&&(t.current=!1,e?.record({stage:`media`,outcome:`recovered`,operation:`media.playback`,component:`media`}))},[e])}}var yv=rp((e,t)=>{let{report:n,recover:r}=vv();return I(Dp,{...e,ref:t,onPlayFailed:t=>{n(t instanceof Error?t.name:void 0),e.onPlayFailed?.(t)},onError:t=>{n(),e.onError?.(t)},onPlaying:t=>{r(),e.onPlaying?.(t)}})}),bv=rp((e,t)=>{let{report:n,recover:r}=vv();return I(Op,{...e,ref:t,onPlayFailed:t=>{n(t.name),e.onPlayFailed?.(t)},onError:t=>{n(),e.onError?.(t)},onPlaying:t=>{r(),e.onPlaying?.(t)}})});function xv(){let e=Rf(),t=Bf(),{isOff:n}=Kf(t),{camState:r}=Yf();return{isCamReady:N(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:P(()=>{e?.setLocalVideo(n)},[e,n])}}function Sv(){let e=Rf(),t=Bf(),{isOff:n}=qf(t),{micState:r}=Yf();return{isMicReady:N(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:P(()=>{e?.setLocalAudio(n)},[e,n])}}function Cv(){let e=Rf(),t=Bf(),{isOff:n}=Jf(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:P(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}var wv={microphone:`microphone`,camera:`camera`};function Tv({class:e}){return I(`svg`,{class:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[I(`circle`,{cx:`7`,cy:`8`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),I(`circle`,{cx:`16`,cy:`16`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),I(`path`,{d:`M2 8h2.5M9.5 8H22M2 16h11.5M18.5 16H22`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`})]})}function Ev(){return I(`svg`,{viewBox:`0 0 240 180`,class:`w-full h-auto text-base-content/70`,fill:`none`,"aria-hidden":`true`,children:[I(`rect`,{x:`10`,y:`20`,width:`220`,height:`150`,rx:`10`,stroke:`currentColor`,"stroke-width":`2`}),I(`path`,{d:`M10 46h220`,stroke:`currentColor`,"stroke-width":`2`}),I(`circle`,{cx:`26`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),I(`circle`,{cx:`40`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),I(`circle`,{cx:`54`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),I(`path`,{d:`M78 33h14M86 27l-6 6 6 6M104 27v12`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),I(`rect`,{x:`118`,y:`25`,width:`96`,height:`16`,rx:`8`,stroke:`currentColor`,"stroke-width":`1.6`}),I(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,fill:`currentColor`,opacity:`0.18`}),I(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,stroke:`currentColor`,"stroke-width":`1.6`}),I(`g`,{class:`text-info`,transform:`translate(120 25) scale(0.66)`,children:I(Tv,{})}),I(`g`,{transform:`translate(34 78)`,children:[I(`rect`,{x:`0`,y:`8`,width:`34`,height:`26`,rx:`5`,stroke:`currentColor`,"stroke-width":`2`}),I(`path`,{d:`M34 16l14-8v26l-14-8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]}),I(`g`,{transform:`translate(40 120)`,children:[I(`rect`,{x:`6`,y:`0`,width:`14`,height:`24`,rx:`7`,stroke:`currentColor`,"stroke-width":`2`}),I(`path`,{d:`M0 20a13 13 0 0 0 26 0M13 33v8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`})]}),I(`path`,{d:`M150 64l34 14-14 4-2 16-18-34Z`,fill:`currentColor`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]})}var Dv=ep(({device:e,onClose:t})=>{let n=wv[e];return j(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),I(`div`,{class:`absolute inset-0 z-50 flex items-center justify-center p-4 bg-black/50 motion-safe:animate-[tavusFadeUp_180ms_ease-out]`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`tavus-blocked-title`,onClick:t,children:I(`div`,{class:`relative w-full max-w-md rounded-box bg-base-100 text-base-content shadow-xl overflow-hidden`,onClick:e=>e.stopPropagation(),children:[I(`button`,{type:`button`,class:`btn btn-sm btn-circle btn-ghost absolute top-2 right-2 z-10`,onClick:t,"aria-label":`Close`,children:I(E_,{name:`close`,size:`1.1rem`})}),I(`div`,{class:`grid @3xl:grid-cols-[1fr_1.2fr] gap-4 p-5 @max-md:p-4`,children:[I(`div`,{class:`flex items-center justify-center @max-md:hidden`,children:I(Ev,{})}),I(`div`,{class:`flex flex-col gap-4`,children:[I(`h2`,{id:`tavus-blocked-title`,class:`text-lg font-semibold leading-snug pr-6`,children:[`Access to your `,n,` is blocked`]}),I(`ol`,{class:`flex flex-col gap-3 text-sm`,children:[I(`li`,{class:`flex items-start gap-2`,children:[I(`span`,{class:`font-semibold tabular-nums`,children:`1.`}),I(`span`,{class:`leading-snug`,children:[`Click the `,I(Tv,{class:`inline-block align-text-bottom h-4 w-4 mx-0.5`}),` `,`settings icon in your browser's address bar`]})]}),I(`li`,{class:`flex items-start gap-2`,children:[I(`span`,{class:`font-semibold tabular-nums`,children:`2.`}),I(`span`,{class:`leading-snug`,children:[`Allow `,n,` access, then reload the page`]})]})]}),I(`button`,{type:`button`,class:`btn btn-neutral btn-sm self-start`,onClick:t,children:`Got it`})]})]})]})})}),Ov=Ce({open:()=>{},close:()=>{}});function kv(){return F(Ov)}function Av({children:e}){let[t,n]=A(null),r=P(e=>n(e),[]),i=P(()=>n(null),[]),a=N(()=>({open:r,close:i}),[r,i]);return I(Ov.Provider,{value:a,children:[e,t&&I(Dv,{device:t,onClose:i})]})}var jv=ep(()=>I(`span`,{"aria-hidden":`true`,class:`absolute -top-0.5 -right-0.5 z-20 flex h-4 w-4 items-center justify-center rounded-full bg-warning text-warning-content text-[0.6rem] font-bold leading-none ring-2 ring-base-100 pointer-events-none`,children:`!`})),Mv=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,Nv=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,Pv=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,Fv=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,Iv=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function Lv(){return I(`svg`,{style:{width:`var(--chevron-size, 0.75rem)`,height:`var(--chevron-size, 0.75rem)`},viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,children:I(`path`,{d:`M4 6L8 10L12 6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})}function Rv(){let e=Bf(),t=M(null),n=M(void 0);return Xf(e??``,P(e=>{n.current&&cancelAnimationFrame(n.current),n.current=requestAnimationFrame(()=>{let n=Math.max(0,Math.min(1,e**.6));t.current?.style.setProperty(`--mic-level`,String(n))})},[])),I(`span`,{ref:t,"aria-hidden":`true`,class:`pointer-events-none absolute inset-x-0 bottom-0 z-0 bg-success/70`,style:{"--mic-level":`0`,height:`calc(var(--mic-level, 0) * 100%)`,transition:`height 100ms ease-out`}})}function zv({value:e,devices:t,disabled:n,onChange:r,label:i}){return I(D,{children:[I(`select`,{class:Nv,value:e,onChange:e=>r(e.target.value),disabled:n,"aria-label":i,children:t.map(({device:e})=>I(`option`,{value:e.deviceId,children:e.label},e.deviceId))}),I(`span`,{class:Pv,children:I(Lv,{})})]})}function Bv(e){return I(`div`,{class:Mv,children:I(zv,{...e})})}function Vv({iconName:e,...t}){return I(`div`,{class:Mv,children:[I(`span`,{class:Fv,"aria-hidden":`true`,children:I(E_,{name:e})}),I(zv,{...t})]})}var Hv=ep(({level:e=!1})=>{let{onToggleMicrophone:t,isMicReady:n,isMicMuted:r}=Sv(),{microphones:i,currentMic:a,setMicrophone:o}=Yf();if(!a||(i?.length??0)<=1)return I(Gv,{level:e});let s=e&&n&&!r;return I(`div`,{class:`relative inline-flex items-center`,children:[I(Bv,{value:a?.device?.deviceId,devices:i||[],disabled:!n,onChange:e=>o(e),label:`Select microphone`}),I(`button`,{type:`button`,onClick:t,disabled:!n,class:`${Iv} overflow-hidden`,"aria-label":r?`Unmute microphone`:`Mute microphone`,"aria-pressed":r,children:[s&&I(Rv,{}),I(`span`,{class:`relative z-10 inline-flex`,children:I(E_,{name:r||!n?`mic-off`:`mic`})})]})]})});function Uv(){let{onToggleCamera:e,isCamMuted:t}=xv(),{camera:n,requestCamera:r}=ph(),{open:i}=kv(),a=n.isGranted&&!t;return{isOn:a,onClick:()=>{if(n.isBlocked)return i(`camera`);if(a)return e();r()},label:a?`Turn camera off`:n.isGranted?`Turn camera on`:`Enable camera`,needsAttention:n.needsAttention}}var Wv=ep(()=>{let{isCamReady:e}=xv(),{currentCam:t,cameras:n,setCamera:r}=Yf(),i=Uv();return!t||(n?.length??0)<=1?I(Kv,{}):I(`div`,{class:`relative inline-flex items-center`,children:[I(Bv,{value:t?.device?.deviceId,devices:n||[],disabled:!e,onChange:e=>r(e),label:`Select camera`}),I(`button`,{type:`button`,onClick:i.onClick,class:Iv,"aria-label":i.label,"aria-pressed":!i.isOn,children:I(E_,{name:i.isOn?`cam`:`cam-off`})})]})}),Gv=ep(({level:e=!1})=>{let{onToggleMicrophone:t,isMicMuted:n}=Sv(),{mic:r,requestMic:i}=ph(),{open:a}=kv(),o=()=>{if(r.isGranted)return t();if(r.isBlocked)return a(`microphone`);i()},s=r.isGranted?n?`Unmute microphone`:`Mute microphone`:`Allow microphone access`,c=e&&r.isGranted&&!n;return I(`span`,{class:`relative inline-flex`,children:[I(`button`,{type:`button`,onClick:o,class:`btn btn-control btn-neutral relative overflow-hidden`,"aria-label":s,"aria-pressed":r.isGranted?n:void 0,children:[c&&I(Rv,{}),I(`span`,{class:`relative z-10 inline-flex`,children:I(E_,{name:n||!r.isGranted?`mic-off`:`mic`})})]}),r.needsAttention&&I(jv,{})]})}),Kv=ep(()=>{let{isOn:e,onClick:t,label:n,needsAttention:r}=Uv();return I(`span`,{class:`relative inline-flex`,children:[I(`button`,{type:`button`,onClick:t,class:`btn btn-control btn-neutral`,"aria-label":n,"aria-pressed":!e,children:I(E_,{name:e?`cam`:`cam-off`})}),r&&I(jv,{})]})});ep(({compact:e=!1}={})=>{let{isMicReady:t}=Sv(),{microphones:n,currentMic:r,setMicrophone:i}=Yf();return(n?.length??0)<=1?null:I(Vv,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),ep(({compact:e=!1}={})=>{let{isCamReady:t}=xv(),{currentCam:n,cameras:r,setCamera:i}=Yf();return(r?.length??0)<=1?null:I(Vv,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var qv=ep((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=Cv();return I(`button`,{type:`button`,onClick:t,class:`btn btn-control ${n?`btn-primary`:`btn-neutral`}`,"aria-label":n?`Stop screen share`:`Start screen share`,"aria-pressed":n,children:I(E_,{name:`screen-share`})})});function Jv(e){let t=F(km);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return j(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var Yv=Ce(null);function Xv({children:e,defaultEnabled:t=!1}){let[n,r]=A(t),i=P(()=>r(e=>!e),[]),a=N(()=>({isEnabled:n,toggle:i}),[n,i]);return I(Yv.Provider,{value:a,children:e})}function Zv(){let e=F(Yv);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var Qv=ep(()=>{let{isEnabled:e,toggle:t}=Zv();return I(`button`,{type:`button`,onClick:t,"aria-pressed":e,class:`btn btn-control ${e?`btn-primary`:`btn-neutral`}`,"aria-label":e?`Hide captions`:`Show captions`,children:I(E_,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),$v=ep(()=>{let{isEnabled:e}=Zv(),{captionText:t,captionRole:n}=Jv(),r=t.value,i=n.value;return!e||!r?null:I(`div`,{class:`pointer-events-none absolute bottom-24 left-1/2 -translate-x-1/2 max-w-[80%] px-4 py-2 rounded-box bg-black/60 text-white z-40`,role:`status`,"aria-live":`polite`,children:I(`div`,{class:`text-sm leading-5 max-h-15 overflow-hidden flex flex-col justify-end text-center`,children:I(`div`,{children:[I(`span`,{class:`text-xs ${i===`replica`?`text-secondary`:`text-primary`} mr-2`,children:i===`replica`?`PAL`:`You`}),r]})})})}),ey=Ce(null);function ty({children:e,defaultOpen:t=!1}){let[n,r]=A(t),i=P(()=>r(e=>!e),[]),a=P(()=>r(!1),[]),o=N(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return I(ey.Provider,{value:o,children:e})}function ny(){let e=F(ey);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var ry=ep((e={})=>{let{isOpen:t,toggle:n}=ny();return I(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":t?`Close chat`:`Open chat`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:I(E_,{name:`chat`})})}),iy=ep(({message:e})=>{let t=e.sender===`user`;return I(`li`,{class:`flex flex-col gap-1 ${t?`items-end`:`items-start`}`,children:[I(`span`,{class:`text-xs ${t?`text-primary`:`text-secondary`}`,children:t?`You`:`PAL`}),I(`span`,{class:`px-3 py-2 rounded-field text-sm max-w-[80%] ${t?`bg-primary text-primary-content`:`bg-base-200 text-base-content`}`,children:e.text})]})}),ay=ep(({docked:e=!1,headerAction:t}={})=>{let{isOpen:n,close:r}=ny(),{chatMessages:i,sendChat:a,session:o}=Jv(),s=o.value?.conversationId??null,c=i.value,[l,u]=A(``),d=M(null);j(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[c.length]);let f=P(()=>{let e=l.trim();e&&s&&(a(e),u(``))},[l,a,s]),p=P(e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),f())},[f]),m=!!l.trim()&&!!s;return I(`aside`,{class:e?`absolute inset-0 w-full h-full bg-base-100 flex flex-col z-30`:`absolute top-0 right-0 w-80 h-full bg-base-100 border-l border-base-300 flex flex-col z-30 transition-transform ${n?`translate-x-0`:`translate-x-full`} @max-mobile:w-full`,"aria-hidden":!e&&!n,inert:!e&&!n,children:[I(`header`,{class:`flex items-center justify-between px-4 py-3 border-b border-base-300`,children:[I(`span`,{class:`font-medium text-base-content`,children:`Chat`}),e?t:I(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle`,onClick:r,"aria-label":`Close chat`,children:I(E_,{name:`close`,size:20})})]}),I(`ul`,{ref:d,class:`flex-1 overflow-y-auto p-4 flex flex-col gap-3`,role:`log`,"aria-live":`polite`,children:c.length===0?I(`li`,{class:`text-center text-sm opacity-70`,children:s?`Send a message to start the conversation.`:`Connecting…`}):c.map(e=>I(iy,{message:e},e.id))}),I(`form`,{class:`flex items-end gap-2 p-3 border-t border-base-300`,onSubmit:e=>{e.preventDefault(),f()},children:[I(`textarea`,{class:`textarea textarea-bordered textarea-sm flex-1 resize-none`,value:l,onChange:e=>u(e.target.value),onKeyDown:p,placeholder:s?`Type a message…`:`Connecting…`,disabled:!s,rows:1,"aria-label":`Message`}),I(`button`,{type:`submit`,class:`btn btn-primary btn-sm btn-circle`,disabled:!m,"aria-label":`Send message`,children:I(E_,{name:`send`,size:18})})]})]})});function oy({label:e}){return I(lv,{align:`center`,role:`status`,"aria-live":`polite`,class:`z-2`,children:I(`div`,{class:`flex items-center gap-2`,children:[I(`span`,{class:`loading loading-spinner loading-sm`}),I(`span`,{class:`text-base font-medium`,children:e})]})})}var sy=ep(()=>I(oy,{label:`Connecting…`})),cy=ep(()=>I(oy,{label:`Leaving…`}));function ly({active:e,onToggle:t,tooltip:n,nudge:r=!1}){return I(`div`,{class:`flex items-center gap-2`,children:[r&&I(`span`,{class:`rounded-field bg-base-100 px-2 py-1 text-xs font-medium whitespace-nowrap text-base-content shadow-md motion-safe:animate-[tavusFadeUp_180ms_ease-out]`,children:`Expand for a better view`}),I(`button`,{type:`button`,onClick:t,class:`btn btn-xs btn-control ${r?`btn-primary`:e?`btn-info`:`btn-neutral`}`,"aria-label":n??(e?`Exit fullscreen`:`Enter fullscreen`),title:n,children:I(E_,{name:e?`fullscreen-exit`:`fullscreen`,size:`calc(var(--size-field, 0.25rem) * 3.5)`})})]})}var uy=ep(({id:e})=>{let t=Vf()===e,n=M(null),r=M(null),i=M(null),a=M(void 0);Xf(e,P(e=>{a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{let t=Number(Math.max(.01,e).toFixed(2));n.current&&r.current&&i.current&&(n.current.style.height=`${20+t*40}%`,r.current.style.height=`${20+t*130}%`,i.current.style.height=`${20+t*40}%`)})},[]));let o=`w-[3px] rounded-full bg-base-100 transition-[opacity] ${t?`opacity-100`:`opacity-50`}`;return I(`div`,{class:`flex items-center justify-center w-6 h-6`,children:I(`div`,{class:`flex items-center justify-center gap-[2px] w-full h-full`,children:[I(`div`,{ref:n,class:o,style:{height:`20%`}}),I(`div`,{ref:r,class:o,style:{height:`20%`}}),I(`div`,{ref:i,class:o,style:{height:`20%`}})]})})}),dy=[0,1,2],fy=.05,py=450;function my({sessionId:e,className:t=``}){let{config:n}=$m(),r=j_(n.value),i=A_(n.value),a=M(null),o=M(void 0),s=M(void 0),[c,l]=A(!1),u=M(!1);return Xf(e??``,P(t=>{e&&(o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{let e=Math.max(0,Math.min(1,t**.6));a.current?.style.setProperty(`--audio-level`,String(e)),e>fy?(s.current&&=(clearTimeout(s.current),void 0),u.current||(u.current=!0,l(!0))):u.current&&s.current===void 0&&(s.current=setTimeout(()=>{s.current=void 0,u.current=!1,l(!1)},py))}))},[e])),j(()=>()=>{o.current&&cancelAnimationFrame(o.current),s.current&&clearTimeout(s.current)},[]),I(`div`,{ref:a,class:`relative aspect-square w-full max-w-[min(48cqi,16rem)] mx-auto pointer-events-none ${t}`,style:{"--audio-level":`0`},"aria-hidden":`true`,children:[dy.map(e=>I(`div`,{class:`absolute inset-[16%] rounded-full will-change-transform`,style:{border:`2px solid var(--color-primary)`,opacity:0,animation:c?`tavusAudioWave 2.4s ease-out ${e*.8}s infinite`:`none`,"--wave-peak":`calc(0.18 + var(--audio-level, 0) * 0.5)`}},e)),I(`div`,{class:`absolute inset-[16%] rounded-full`,style:{background:`radial-gradient(circle, color-mix(in oklab, var(--color-primary) 60%, transparent), transparent 70%)`,filter:`blur(20px)`,scale:`calc(1 + var(--audio-level, 0) * 0.25)`,opacity:`calc(0.35 + var(--audio-level, 0) * 0.5)`,transition:`scale 120ms ease-out, opacity 120ms ease-out`}}),I(`div`,{class:`absolute inset-[20%] rounded-full overflow-hidden bg-base-300 ring-2 ring-base-100/20 shadow-xl will-change-transform`,style:{scale:`calc(1 + var(--audio-level, 0) * 0.06)`,transition:`scale 100ms ease-out`},children:I(I_,{variant:r.background,replica:i})})]})}function hy({children:e,class:t,className:n,...r}){return I(`div`,{class:`tavus-mesh-bg ${t??n??``}`,...r,children:[I(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-1`}),I(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-2`}),I(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-3`}),I(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-4`}),I(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-5`}),I(`div`,{class:`absolute inset-0 bg-linear-to-t from-black/30 via-black/10 to-transparent pointer-events-none backdrop-blur-xs`}),e]})}var gy=e=>!!e.user_id?.includes(`tavus-replica`);function _y(){return Wf({filter:gy})}function vy(e){let t=_y()[0],n=Kf(t??``),r=zf(),[i,a]=A(!1);return j(()=>{t&&(n.state===`playable`||e)&&a(!0)},[t,n.state,e]),r===`left-meeting`||r===`error`?{phase:`left`}:!i||!t?{phase:`connecting`}:{phase:`ready`,replicaId:t,videoState:n}}var yy=ep(({isAudioOnly:e})=>{let t=vy(e);return t.phase===`left`?I(cy,{}):t.phase===`connecting`?I(sy,{}):e?I(hy,{class:`flex items-center justify-center`,children:[I(my,{sessionId:t.replicaId}),I(bv,{sessionId:t.replicaId})]}):I(`div`,{class:`relative w-full h-full`,children:[I(yv,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`}),I(bv,{sessionId:t.replicaId})]})}),by=ep(({onLeave:e})=>{let{config:t}=$m(),n=t.value.customization.conversation.modality===`audio`;return I(`div`,{class:`@container/pip w-full h-full`,children:I(`div`,{class:`relative w-full h-full overflow-hidden bg-linear-to-br from-base-300 to-base-200 text-base-content`,children:[I(`div`,{class:`relative w-full h-full z-5`,children:I(yy,{isAudioOnly:n})}),I(`div`,{class:`absolute bottom-4 w-full inset-x-0 z-20 flex justify-center items-center gap-2 @max-mobile:gap-1`,children:[I(Gv,{}),!n&&I(Kv,{}),I(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:I(E_,{name:`leave`,"aria-label":`Leave Call`})})]})]})})});function xy(e,t){return e<=0||t<=0?!1:e/t<.75}var Sy=ep(({personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})=>{let a=M(null),o=i??a,[s,c]=A(0),[l,u]=A(0),d=P(({aspectRatio:e})=>c(e),[]);j(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(e=>{let{width:t,height:n}=e[e.length-1].contentRect;u(n>0?t/n:0)});return t.observe(e),()=>t.disconnect()},[o]);let f=n?t??``:e,p=!n&&r,m=!n&&xy(s,l),h=n||m;return I(D,{children:[m&&I(yv,{sessionId:e,type:`video`,fit:`cover`,"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 w-full h-full object-cover scale-110 blur-xl brightness-[0.55] ${p?`hidden`:``}`}),I(yv,{ref:o,automirror:!0,sessionId:f,type:n?`screenVideo`:`video`,fit:h?`contain`:`cover`,onResize:n?void 0:d,className:`absolute inset-0 w-full h-full transition-all ${h?`object-contain`:`object-cover`} ${p?`hidden`:``}`})]})}),Cy=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),wy=[`.sandbox-tavus.io`],Ty=new Set([`tavusapi.com`]);function Ey(e){let t;try{t=new URL(e)}catch{return!1}return Ay(t)?!0:t.protocol===`https:`?Cy.has(t.hostname)?!0:wy.some(e=>t.hostname.endsWith(e)):!1}function Dy(e){return Ey(e)}function Oy(e){try{return Ay(new URL(e))}catch{return!1}}function ky(e){let t;try{t=new URL(e)}catch{return!1}return jy(t)?!0:t.protocol===`https:`&&Ty.has(t.hostname)}function Ay(e){return jy(e)}function jy(e){return!My()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function My(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}function Ny(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Py=new Set([`canvas.question`,`canvas.input`,`canvas.calendar`,`canvas.scheduling_embed`]);[...new Set([`direct_user`,`autonomous`,`system`])];var Fy=new Set([`clear`,`replacement`]);function Iy(e,t,n){return t===`submit`&&n===`direct_user`&&Py.has(e)}function Ly(e,t,n,r){if(r!==void 0&&(!r||n===void 0||!Iy(e,t,n)))throw Error(`Canvas response text is allowed only for a supported direct-user submit.`)}function Ry(e,t){if(t===`system`||Fy.has(e))throw Error(`Canvas producer interactions cannot mint host-only system actions.`)}async function zy(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close?.()}catch{}}var By=`tavus.canvas.interaction`,Vy=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],Hy=`safe-area-right`,Uy={x:275/1280,y:111/720,width:730/1280,height:609/720},Wy={type:`snapshot_mirror`};function Gy(e){return hb(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&hb(e.properties):!1}function Ky(e){if(!hb(e))return null;let t=kb(e,`component`),n=kb(e,`component_version`),r=kb(e,`sandbox_url`),i=Mb(e,`mcp_server_url`,Dy),a=Mb(e,`api_base_url`,ky),o=Mb(e,`interaction_url`,ky),s=yb(e.layout),c=Pb(e),l=e.version;return l!==1||!t||!n||!r||!Ey(r)||!Jy(r,t,n)||i===null||a===null||o===null||s===null||c===null?null:{version:l,component:t,component_version:n,resource_uri:kb(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:kb(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,...c,layout:s,host_context:hb(e.host_context)?e.host_context:void 0}}var qy=/^\/canvas\/([^/]+)\/([^/]+)(?:\/|$)/;function Jy(e,t,n){let r;try{r=new URL(e)}catch{return!1}let i=qy.exec(r.pathname);return i?t===`canvas.${i[1]}`&&n===i[2]:Oy(e)}function Yy(e){if(e===void 0)return{ok:!0,value:{}};if(hb(e))return{ok:!0,value:e};if(typeof e!=`string`)return{ok:!1,error:Error(`Magic Canvas tool arguments must be an object or JSON string.`)};try{let t=JSON.parse(e);return hb(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:gb(e)}}}function Xy(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=Yy(e.properties.arguments);if(!n.ok)throw n.error;if(t===`canvas_clear`){let t=n.value.tool_call_id,r=n.value.reason;if(t!==void 0&&typeof t!=`string`)throw Error(`Magic Canvas clear tool_call_id must be a string when provided.`);if(r!==void 0&&typeof r!=`string`)throw Error(`Magic Canvas clear reason must be a string when provided.`);return{kind:`clear`,conversation_id:e.conversation_id,tool_call_id:t,reason:r}}let r=n.value.tool_call_id,i=n.value.updates;if(typeof r!=`string`||r.length===0)throw Error(`Magic Canvas update_component requires a target tool_call_id.`);if(!hb(i))throw Error(`Magic Canvas update_component requires an object updates payload.`);return{kind:`update`,conversation_id:e.conversation_id,tool_call_id:r,updates:i}}var Zy=[`safe-area-left`,`safe-area-right`];function Qy(e){let t=Zy.includes(e.preferred_slot)?e.preferred_slot:Hy;return t===e.preferred_slot&&e.display_mode===`inline`?e:{...e,preferred_slot:t,display_mode:`inline`}}function $y(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function eb(e,t){return[t]}function tb(e,t){switch(t.kind){case`show`:{let n=e.find(e=>e.id===t.instance.id),r=n?{...t.instance,revision:n.revision+1}:t.instance;return eb(e.filter(e=>e.id!==t.instance.id),r)}case`update`:{let n=e=>e.conversation_id===t.conversation_id&&e.tool_call_id===t.tool_call_id,r=db(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:Qy({preferred_slot:r.preferredSlot??e.layout.preferred_slot,display_mode:r.displayMode??e.layout.display_mode,avoid_safe_area:r.avoidSafeArea??e.layout.avoid_safe_area,safe_area:r.safeArea??e.layout.safe_area,backdrop:r.backdrop??e.layout.backdrop}),revision:e.revision+1};return i=t,t});if(i===void 0)return a;let o=e.find(n);return o&&$y(o.layout)===$y(i.layout)?a:eb(a.filter(e=>!n(e)),i)}case`clear`:return t.tool_call_id?e.filter(e=>e.conversation_id!==t.conversation_id||e.tool_call_id!==t.tool_call_id):e.filter(e=>e.conversation_id!==t.conversation_id)}}function nb(e){if(!hb(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!hb(t))continue;let e=(hb(t._meta)?t._meta:null)?.[By];if(hb(e))return Nb(e)}return null}function rb(e,t){let n=t.type,r=t.value;if(!n)throw Error(`Magic Canvas interaction is missing type.`);if(r===void 0)throw Error(`Magic Canvas interaction is missing value.`);if(e.canvas_config.protocol_mode===`v1`&&!t.interaction_id)throw Error(`Magic Canvas v1 interaction requires a producer-supplied interaction_id.`);if(e.canvas_config.protocol_mode===`v1`&&(t.protocol_version!==1||!t.initiation_source||!t.initiated_at||!Number.isSafeInteger(t.producer_revision)||(t.producer_revision??-1)<0||!t.payload_digest))throw Error(`Magic Canvas v1 interaction causal envelope is incomplete.`);if(e.canvas_config.protocol_mode===`v1`&&t.producer_revision!==e.revision)throw Error(`Magic Canvas v1 interaction does not match the mounted card revision.`);return Ry(n,t.initiation_source),Ly(e.canvas_config.component,n,t.initiation_source,t.response_text),{interaction_id:t.interaction_id??mb(e.tool_call_id,n),conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:e.canvas_config.component,component_version:e.canvas_config.component_version,type:n,value:r,metadata:hb(t.metadata)?t.metadata:{},protocol_mode:e.canvas_config.protocol_mode,protocol_version:t.protocol_version,initiation_source:t.initiation_source,initiated_at:t.initiated_at,producer_revision:t.producer_revision,payload_digest:t.payload_digest,response_text:t.response_text,issued_card_capability:e.canvas_config.issued_card_capability}}function ib(e){return e.type===`dismiss`||e.type===`clear`?!0:e.type!==`submit`&&e.type!==`skip`?!1:e.component===`canvas.question`||e.component===`canvas.input`||e.component===`canvas.calendar`}function ab(e,t){if(!hb(e)||!Array.isArray(e.content))return``;let n=e.content.map(e=>hb(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
56
+ `).trim();if(!t){if(n)throw Error(`Magic Canvas response text requires a validated interaction.`);return``}if(t.protocol_mode===void 0&&t.response_text===void 0)return n?(Ly(t.component,t.type,`direct_user`,n),n):``;if(t.response_text===void 0){if(n)throw Error(`Magic Canvas silent interaction included raw text.`);return``}if(n!==t.response_text)throw Error(`Magic Canvas raw text does not match the validated response text.`);return t.response_text}function ob(e,t){let n=hb(t.structuredContent)?t.structuredContent:void 0,r=_b(t.content),i=typeof n?.state==`string`?n.state:`updated`,a=typeof n?.summary==`string`?n.summary:r,o=[`Magic Canvas state update for ${e.canvas_config.component} (${e.tool_call_id}).`,`State: ${i}.`];return a&&o.push(`Summary: ${a}`),n&&o.push(`Structured state: ${vb(n)}`),r&&r!==a&&o.push(r),o.join(`
57
+ `)}function sb({conversationId:e,toolCallId:t,args:n,canvasConfig:r}){let i=db(n);return{id:t,conversation_id:e,tool_call_id:t,arguments:i.componentArguments,canvas_config:r,layout:Qy({preferred_slot:i.preferredSlot??r.layout?.preferred_slot??fb(r.component),display_mode:i.displayMode??`inline`,avoid_safe_area:i.avoidSafeArea??r.layout?.avoid_safe_area??!0,safe_area:i.safeArea??r.layout?.safe_area??Uy,backdrop:i.backdrop??r.layout?.backdrop??Wy}),revision:0}}function cb(e,t){let n=e.layout.display_mode;return{...e.layout,display_mode:n,viable_slot:n===`fullscreen`?`full`:ub(e.layout.preferred_slot,t)}}function lb(e,t){let n=e.filter(e=>!e.avoid_safe_area||e.display_mode===`fullscreen`?!1:e.viable_slot===`safe-area-left`||e.viable_slot===`safe-area-right`),r=n.some(e=>e.viable_slot===`safe-area-left`),i=n.some(e=>e.viable_slot===`safe-area-right`);if(r&&i)return{active:!1,video_shift_x:0,backdrop:Wy};let a=[...n].reverse()[0];if(!a||t.width<900)return{active:!1,video_shift_x:0,backdrop:Wy};let o=Math.min(448,Math.max(0,t.width-32)),s=a.safe_area,c=s.x*t.width,l=(s.x+s.width)*t.width,u=Math.min(360,t.width*.3),d=0;return d=a.viable_slot===`safe-area-left`?jb(16+o+24-c,0,u):-jb(l-(t.width-16-o-24),0,u),{active:!0,side:a.viable_slot===`safe-area-left`?`left`:`right`,video_shift_x:Math.round(d),safe_area:s,backdrop:a.backdrop}}function ub(e,t){return e===`full`||e===`safe-area-bottom`&&t.visualViewportHeight!==void 0&&t.visualViewportHeight<t.height*.75?`full`:(e===`safe-area-left`||e===`safe-area-right`)&&t.width<768&&t.height>=t.width?`safe-area-bottom`:e}function db(e){let t={};for(let[n,r]of Object.entries(e))n!==`layout`&&n!==`preferred_slot`&&n!==`preferredSlot`&&n!==`display_mode`&&n!==`displayMode`&&n!==`presentation`&&n!==`fullscreen`&&n!==`avoid_safe_area`&&n!==`avoidSafeArea`&&n!==`safe_area`&&n!==`safeArea`&&n!==`backdrop`&&(t[n]=r);return{componentArguments:t,preferredSlot:bb(e.layout)??bb(e.preferred_slot)??bb(e.preferredSlot),displayMode:xb(e),avoidSafeArea:Sb(e),safeArea:Cb(e),backdrop:wb(e)}}function fb(e){switch(e){case`canvas.alert`:return`safe-area-bottom`;case`canvas.chart`:case`canvas.image`:case`canvas.video`:return`full`;default:return Hy}}function pb(e,t){let n=t?.displayScale??1;if(e.display_mode===`fullscreen`||e.viable_slot===`full`)return{maxWidth:void 0,maxHeight:void 0,displayScale:n};let r=t?.maxHeight??720;return e.viable_slot===`safe-area-bottom`?{maxWidth:720,maxHeight:r,displayScale:n}:{width:384,maxHeight:r,displayScale:n}}function mb(e,t){return`ci_${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}_${t}_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,10)}`}var hb=Ny;function gb(e){return e instanceof Error?e:Error(String(e))}function _b(e){return Array.isArray(e)?e.map(e=>hb(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
58
+ `).trim():``}function vb(e){let t=JSON.stringify(e);return t?t.length<=2e3?t:`${t.slice(0,2e3)}...`:`{}`}function yb(e){if(e===void 0)return;if(!hb(e))return null;let t=bb(e),n=Tb(e.safe_area??e.safeArea),r=Eb(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},...Db(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function bb(e){if(typeof e==`string`&&Ob(e))return e;if(!hb(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&Ob(t)?t:void 0}function xb(e){if(e.presentation===!0||e.fullscreen===!0)return`fullscreen`;if(e.presentation===!1||e.fullscreen===!1)return`inline`;let t=e.display_mode??e.displayMode;return t===`fullscreen`||t===`inline`?t:void 0}function Sb(e){let t=hb(e.layout)?e.layout:void 0,n=e.avoid_safe_area??e.avoidSafeArea??t?.avoid_safe_area??t?.avoidSafeArea;return typeof n==`boolean`?n:void 0}function Cb(e){let t=hb(e.layout)?e.layout:void 0;return Tb(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function wb(e){let t=hb(e.layout)?e.layout:void 0;return Eb(e.backdrop??t?.backdrop)??void 0}function Tb(e){if(e===void 0)return;if(!hb(e))return null;let t=Ab(e,`x`),n=Ab(e,`y`),r=Ab(e,`width`),i=Ab(e,`height`);return t===void 0||n===void 0||r===void 0||i===void 0||t<0||n<0||r<=0||i<=0||t+r>1.001||n+i>1.001?null:{x:jb(t,0,1),y:jb(n,0,1),width:jb(r,0,1),height:jb(i,0,1)}}function Eb(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!hb(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function Db(e,t){return typeof e==`boolean`?{[t]:e}:{}}function Ob(e){return Vy.includes(e)}function kb(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function Ab(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function jb(e,t,n){return Math.min(Math.max(e,t),n)}function Mb(e,t,n){let r=kb(e,t);if(r)return n(r)?r:null}function Nb(e){return e.interaction_id!==void 0&&typeof e.interaction_id!=`string`||e.component!==void 0&&typeof e.component!=`string`||e.component_version!==void 0&&typeof e.component_version!=`string`||e.type!==void 0&&typeof e.type!=`string`||e.metadata!==void 0&&!hb(e.metadata)||e.protocol_version!==void 0&&typeof e.protocol_version!=`number`||e.initiation_source!==void 0&&e.initiation_source!==`direct_user`&&e.initiation_source!==`autonomous`&&e.initiation_source!==`system`&&e.initiation_source!==`unknown`||e.initiated_at!==void 0&&typeof e.initiated_at!=`string`||e.producer_revision!==void 0&&typeof e.producer_revision!=`number`||e.payload_digest!==void 0&&typeof e.payload_digest!=`string`||e.response_text!==void 0&&typeof e.response_text!=`string`?null:e}function Pb(e){let t=Object.hasOwn(e,`protocol_mode`),n=Object.hasOwn(e,`protocol_version`),r=Object.hasOwn(e,`issued_card_capability`);if(!t&&!n&&!r)return{};if(e.protocol_mode===`legacy`)return n&&e.protocol_version!==null||r?null:{protocol_mode:`legacy`,protocol_version:null};if(e.protocol_mode!==`v1`||e.protocol_version!==1)return null;let i=kb(e,`issued_card_capability`);return i?{protocol_mode:`v1`,protocol_version:1,issued_card_capability:i}:null}var Fb=`tavus-deployment magic-canvas/0.0.0`;function Ib(e){if(!Gy(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=Ky(e.canvas_config),n=e.properties.tool_call_id;if(!t)return null;if(!n)throw Error(`Received Magic Canvas tool call without tool_call_id.`);let r=Yy(e.properties.arguments);if(!r.ok)throw r.error;return sb({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function Lb(e){if(!Gy(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=Ib(e);return t?{kind:`show`,instance:t}:null}return Xy(e)}function Rb(e){return{body:{interaction_id:e.interaction_id,tool_call_id:e.tool_call_id,component:e.component,component_version:e.component_version,type:e.type,value:e.value,metadata:e.metadata}}}function zb(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:pb(t),layout:{preferred_slot:t.preferred_slot,viable_slot:t.viable_slot,avoid_safe_area:t.avoid_safe_area,safe_area:t.safe_area,backdrop:t.backdrop}}:{},platform:`web`,userAgent:Fb,styles:{variables:Bb(e.cssVars)}}}function Bb(e){return{"--border-radius-md":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.5rem`,"--border-radius-sm":e[`--radius-field`]??e[`--tavus-field-radius`]??`0.375rem`,"--border-radius-xs":e[`--radius-selector`]??`0.25rem`,"--border-radius-lg":e[`--radius-box`]??e[`--tavus-boxes-radius`]??`0.75rem`,"--border-width-regular":e[`--border`]??e[`--tavus-border-width`]??`1px`,"--font-text-sm-size":`0.875rem`,"--font-text-md-size":`1rem`,...Vb(e)}}function Vb(e){let t=e[`--color-base-content`],n=e[`--color-base-100`],r=e[`--color-base-200`],i=e[`--color-base-300`],a=e[`--color-error`],o=e[`--color-primary`],s=e[`--tavus-magic-canvas-accent`],c={},l=(e,t)=>{t&&(c[e]=t)},u=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return l(`--color-background-primary`,n),l(`--color-background-secondary`,r),l(`--color-border-secondary`,i),l(`--color-border-primary`,u(t,28,n)),l(`--color-text-primary`,t),l(`--color-text-secondary`,u(t,62,n)),l(`--color-text-danger`,a),l(`--color-border-danger`,a),l(`--color-ring-primary`,s||o),c}var Hb=96;function Ub(e=document){let t=Array.from(e.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect());return t.length===0?null:{left:Math.min(...t.map(e=>e.left)),right:Math.max(...t.map(e=>e.right)),top:Math.min(...t.map(e=>e.top)),bottom:Math.max(...t.map(e=>e.bottom))}}function Wb(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function Gb(e){if(!e)return null;let t=e.getBoundingClientRect();return t.width<=0||t.height<=0?null:{left:t.left,right:t.right,top:t.top,bottom:t.bottom}}function Kb(e,t,n,r){if(!t)return!1;let i=r?r.left:0,a=r?r.top:0,o=r?r.right-r.left:globalThis.innerWidth,s=r?r.bottom-r.top:globalThis.innerHeight,c=e?.safe_area??Uy,l=i+c.x*o+n,u=i+(c.x+c.width)*o+n,d=a+c.y*s,f=a+(c.y+c.height)*s;return l<t.right&&u>t.left&&d<t.bottom&&f>t.top}function qb(e,t,n){let[r,i]=A(()=>e?Ub(Wb(n?.current)):null);return Qe(()=>{if(!e){i(null);return}let t=Wb(n?.current),r=()=>i(Ub(t)),a=new ResizeObserver(r),o=()=>{for(let e of t.querySelectorAll(`[data-canvas-card]`))a.observe(e)};r(),o(),a.observe(document.documentElement);let s=globalThis.requestAnimationFrame(()=>{r(),o()});return globalThis.addEventListener(`resize`,r),()=>{a.disconnect(),globalThis.removeEventListener(`resize`,r),globalThis.cancelAnimationFrame(s)}},[e,t,n]),e?r:null}function Jb(e,t,n){let[r,i]=A(()=>t?Gb(e.current):null);return Qe(()=>{if(!t){i(null);return}let n=()=>i(Gb(e.current)),r=new ResizeObserver(n);n(),e.current&&r.observe(e.current),r.observe(document.documentElement);let a=globalThis.requestAnimationFrame(n);return globalThis.addEventListener(`resize`,n),()=>{r.disconnect(),globalThis.removeEventListener(`resize`,n),globalThis.cancelAnimationFrame(a)}},[t,n,e]),t?r:null}function Yb(e,t,n,r,i,a){let o=e?.side??(n===`safe-area-left`?`left`:n===`safe-area-right`?`right`:null);return{usePip:o!=null&&(t===`pip`||t===`auto`&&Kb(e,r,i,a)),side:o}}function Xb(e,t=document,n){let r=n?n.left:0,i=n?n.right:globalThis.innerWidth,a=n?n.top:0,o=n?n.bottom:globalThis.innerHeight,s=i-r,c=o-a,l=Array.from(t.querySelectorAll(`[data-canvas-card]`)).map(e=>e.getBoundingClientRect()),u,d,f,p;if(l.length>0){let t=Math.min(...l.map(e=>e.left)),n=Math.max(...l.map(e=>e.right));f=Math.min(...l.map(e=>e.top)),p=Math.max(...l.map(e=>e.bottom)),[u,d]=e===`right`?[r,t]:[n,i]}else{let t=Math.min(448,Math.max(0,s-32));[u,d]=e===`right`?[r,i-16-t]:[r+16+t,i],f=a,p=o}let m=d-u>=144&&p-f>=Hb&&u>=r&&d<=i;if(l.length>0&&!m){let t=Math.min(448,Math.max(0,s-32));[u,d]=e===`right`?[r,i-16-t]:[r+16+t,i],f=a,p=o}let h=Math.max(0,d-u-48),g=Math.max(Hb,Math.min(h,c-48));return{centerX:(u+d)/2-r,centerY:(f+p)/2-a,diameter:g}}var Zb=`560ms linear(0, 0, .0001, .0002, .0003, .0005, .0007, .001, .0013, .0016, .002, .0024, .0029, .0033, .0039, .0044, .005, .0057, .0063, .007, .0079, .0086, .0094, .0103, .0112, .0121, .0132 1.84%, .0153, .0175, .0201, .0226, .0253, .0283, .0313, .0345, .038, .0416, .0454, .0493, .0535, .0576, .0621, .0667, .0714, .0764, .0816 5.04%, .0897, .098 5.62%, .1071, .1165, .1263 6.56%, .137, .1481 7.25%, .1601 7.62%, .1706 7.94%, .1819 8.28%, .194, .2068 9.02%, .2331 9.79%, .2898 11.44%, .3151 12.18%, .3412 12.95%, .3533, .365 13.66%, .3786, .3918, .4045, .4167, .4288, .4405, .452, .4631 16.72%, .4759, .4884, .5005, .5124, .5242, .5354, .5467, .5576, .5686, .5791, .5894, .5995, .6094, .6194, .6289, .6385, .6477, .6569, .6659 24.45%, .6702, .6747, .6789, .6833, .6877, .6919, .696, .7002, .7043, .7084, .7125, .7165, .7205, .7244, .7283, .7321, .7358, .7396, .7433, .7471, .7507, .7544, .7579, .7615, .7649, .7685, .7718, .7752, .7786, .782, .7853, .7885, .7918, .7951, .7982, .8013, .8043, .8075, .8104, .8135, .8165, .8195, .8224, .8253, .8281, .8309, .8336, .8365, .8391, .8419, .8446, .8472, .8499, .8524, .855, .8575, .8599, .8625 37.27%, .8651, .8678, .8703, .8729, .8754, .8779, .8803, .8827, .8851, .8875, .8898, .892, .8942, .8965, .8987, .9009, .903, .9051, .9071, .9092, .9112, .9132, .9151, .9171, .919, .9209, .9227, .9245, .9262, .928, .9297, .9314, .9331, .9347, .9364, .9379, .9395, .941, .9425, .944, .9454, .9469, .9483, .9497, .951, .9524, .9537, .955, .9562, .9574, .9586, .9599, .961, .9622, .9633, .9644, .9655, .9665, .9676, .9686, .9696, .9705, .9715, .9724, .9733, .9742, .975, .9758, .9766, .9774, .9782, .9789, .9796, .9804, .9811, .9817, .9824, .9831, .9837, .9843, .9849, .9855, .986, .9866, .9871, .9877, .9882, .9887, .9892, .9896 70.56%, .9905 71.67%, .9914 72.82%, .9922, .9929 75.2%, .9936 76.43%, .9942 77.71%, .9948 79.03%, .9954 80.39%, .9959 81.81%, .9963 83.28%, .9968 84.82%, .9972 86.41%, .9975 88.07%, .9979 89.81%, .9982 91.64%, .9984 93.56%, .9987 95.58%, .9989 97.72%, .9991)`;function Qb(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function $b(e,t,n){let[r,i]=A(()=>e&&t?Xb(t,Wb(n?.current),Gb(n?.current)):null);return Qe(()=>{if(!e||!t){i(null);return}let r=Wb(n?.current),a=()=>i(Xb(t,r,Gb(n?.current))),o=new ResizeObserver(a),s=()=>{for(let e of r.querySelectorAll(`[data-canvas-card]`))o.observe(e)};a(),s(),n?.current&&o.observe(n.current),o.observe(document.documentElement);let c=globalThis.requestAnimationFrame(()=>{a(),s()});return globalThis.addEventListener(`resize`,a),()=>{o.disconnect(),globalThis.removeEventListener(`resize`,a),globalThis.cancelAnimationFrame(c)}},[e,t,n]),e&&t?r:null}function ex(e,t){let[n,r]=A(null);return Qe(()=>{if(!t){r(null);return}let n=e.current;if(!n)return;let i=()=>{let e=n.clientWidth,t=n.clientHeight;r(e&&t?{width:e,height:t}:null)},a=new ResizeObserver(i);return a.observe(n),i(),()=>a.disconnect()},[t,e]),t?n:null}var tx=1;function nx(e,t,n){return Math.min(Math.max(e,t),n)}function rx(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??Uy,o=((a.x+a.width/2)*t.width+n)*i,s=(a.y+a.height/2)*t.height*i,c=e.diameter/2;return{scale:i,tx:nx(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:nx(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var ix=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function ax(e,t,n,r,i){if(!n)return null;let{width:a,height:o}=n,s={x:a/2,y:o/2},c=null;if(e&&(c=rx(e,n,r,i),s={x:(e.centerX-c.tx)/c.scale,y:(e.centerY-c.ty)/c.scale}),t&&c&&e)return{cx:s.x,cy:s.y,r:e.diameter/2/c.scale,tx:c.tx,ty:c.ty,s:c.scale,shift:r};let l=Math.hypot(Math.max(s.x,a-s.x),Math.max(s.y,o-s.y));return{cx:s.x,cy:s.y,r:l*1.1,tx:0,ty:0,s:1,shift:r}}function ox(e,t,n){let r=M(null),i=M(e),a=M(n),o=M(0),s=M(0);i.current=e,a.current=n,j(()=>{let e=i.current;if(!e)return;if(!r.current||sx()){r.current={values:{...e},velocity:{cx:0,cy:0,r:0,tx:0,ty:0,s:0,shift:0}},a.current(e,!0);return}if(o.current)return;let n=Math.max(t,160)/4e3;s.current=performance.now();let c=e=>{o.current=0;let t=i.current,l=r.current;if(!t||!l)return;let u=Math.min((e-s.current)/1e3,1/30);s.current=e;let d=!0;for(let e of ix){let r=(t[e]-l.values[e])/(n*n)-2/n*l.velocity[e],i=l.velocity[e]+r*u,a=l.values[e]+i*u,o=e===`s`?.001:.25;Math.abs(t[e]-a)<o&&Math.abs(i)*n<o?(l.values[e]=t[e],l.velocity[e]=0):(l.values[e]=a,l.velocity[e]=i,d=!1)}a.current(l.values,d),d||(o.current=globalThis.requestAnimationFrame(c))};o.current=globalThis.requestAnimationFrame(c)},[e?ix.map(t=>Math.round(e[t]*100)).join():``,t]),j(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function sx(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function cx({geom:e,visible:t}){return I(`div`,{"aria-hidden":`true`,"data-morph":`ring`,class:`pointer-events-none absolute z-10 rounded-full`,style:{top:`${e.centerY-e.diameter/2}px`,left:`${e.centerX-e.diameter/2}px`,width:`${e.diameter}px`,height:`${e.diameter}px`,boxShadow:`0 0 0 3px rgb(255 255 255 / 12%), 0 18px 50px rgb(0 0 0 / 55%)`,opacity:+!!t,transition:`opacity 240ms ease-out`}})}function lx(e,t){let n=t>=0?`left`:`right`,r=M({side:n,shift:t});j(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:Qb(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function ux(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function dx({snapshotUrl:e,transformOrigin:t}){return I(`div`,{class:`absolute inset-0 bg-cover bg-center`,style:{backgroundImage:`url("${e}")`,transform:`scaleX(-1)`,transformOrigin:t}})}function fx({snapshotUrl:e,translateX:t,transition:n,transformOrigin:r}){return I(`div`,{"aria-hidden":`true`,"data-morph":`mirror`,class:`pointer-events-none absolute z-0 overflow-hidden`,style:{inset:`0 0`,transform:`translate3d(${t}px, 0, 0)`,transition:`transform ${n}`,willChange:`transform`},children:I(dx,{snapshotUrl:e,transformOrigin:r})})}function px({ambient:e,usePip:t,transition:n}){return e===`none`?null:I(`div`,{"aria-hidden":`true`,"data-morph":`ambient`,class:`pointer-events-none absolute inset-0 z-0`,style:{opacity:+!!t,transition:`opacity ${n}`,background:e===`darker`?`rgb(0 0 0 / 40%)`:`rgb(0 0 0 / 15%)`}})}function mx({morphCapable:e,snapshotUrl:t,mirrorSide:n,videoShiftX:r,transition:i,sceneRef:a,videoWrapRef:o,fill:s,videoRef:c}){return I(`div`,{ref:a,"data-morph":`scene`,class:`absolute inset-0`,style:e?{transformOrigin:`top left`}:void 0,children:I(`div`,{ref:o,class:`absolute inset-0`,style:e?void 0:{transform:`translate3d(${r}px, 0, 0)`,transition:`transform ${i}`},children:[s(c),e&&t!==null&&I(`div`,{"aria-hidden":`true`,"data-morph":`window-mirror`,class:`absolute top-0 bottom-0 w-full`,style:n===`right`?{left:`calc(100% - ${tx}px)`}:{right:`calc(100% - ${tx}px)`},children:I(dx,{snapshotUrl:t,transformOrigin:`center`})})]})})}function hx({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=Zb,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=M(null),[f,p]=A(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=M(null),_=ux(e,h,c),{usePip:v,side:y}=Yb(e,s,c,qb(s!==`shift`,_,g),h,Jb(g,s!==`shift`,_)),b=$b(s!==`shift`,y,g),x=lx(m,h);j(()=>{if(!m)return;let e=!1,t=0,n,r=0,a=()=>{if(e)return;let t=i(d.current);if(t){p(t);return}r+=1,r<8&&(n=globalThis.setTimeout(a,150))};return typeof globalThis.requestAnimationFrame==`function`?t=globalThis.requestAnimationFrame(a):n=globalThis.setTimeout(a,0),()=>{e=!0,t&&globalThis.cancelAnimationFrame?.(t),n&&globalThis.clearTimeout(n)}},[m,e.side,e.video_shift_x,i]),j(()=>{if(m||f===null)return;let e=globalThis.setTimeout(()=>{p(null)},o);return()=>globalThis.clearTimeout(e)},[m,f,o]);let S=v&&y!=null&&b!=null,C=s!==`shift`,w=ex(g,C),T=f!==null&&!C,E=C&&y!=null,D=M(null),ee=M(null),[te,ne]=A(!0),re=M(!0),ie=P((e,t)=>{let n=D.current;n&&(n.style.clipPath=`circle(${e.r}px at ${e.cx}px ${e.cy}px)`,n.style.transform=`translate(${e.tx}px, ${e.ty}px) scale(${e.s})`);let r=ee.current;r&&(r.style.transform=`translate3d(${e.shift}px, 0, 0)`),re.current!==t&&(re.current=t,ne(t))},[]);return ox(C?ax(b,S,w,h,e):null,o,ie),I(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[T&&f!==null&&I(fx,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),E&&I(px,{ambient:l,usePip:v,transition:a}),I(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:I(mx,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:D,videoWrapRef:ee,fill:r,videoRef:d})}),C&&b&&I(cx,{geom:b,visible:S&&te}),u]})}var gx=480,_x=ep(({personaSessionId:e,isAudioOnly:t,avatarOff:n,canvasLayoutEffect:r,smartSidecarActive:i})=>{let a=t||n,o=i?r.video_shift_x:0;return I(`div`,{class:`absolute inset-0 overflow-hidden`,children:I(`div`,{class:`absolute top-0 bottom-0`,style:{left:o>0?`${gx}px`:`0px`,right:o<0?`${gx}px`:`0px`,transition:`left ${Zb}, right ${Zb}`},children:[I(yv,{automirror:!0,sessionId:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 w-full h-full object-contain`}),I(`div`,{class:`absolute bottom-4 right-4 aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10`,children:a?I(`div`,{class:`flex w-full h-full items-center justify-center`,children:I(my,{sessionId:e})}):I(yv,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover`})})]})})});function G(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function vx(e){return e&&Object.assign(Sx,e),Sx}var yx,bx,xx,Sx,Cx=n((()=>{bx=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},xx=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(yx=globalThis).__zod_globalConfig??(yx.__zod_globalConfig={}),Sx=globalThis.__zod_globalConfig}));function wx(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function Tx(e,t){return typeof t==`bigint`?t.toString():t}function Ex(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Dx(e){return e==null}function Ox(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function kx(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function Ax(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==tS)return r===void 0&&(r=tS,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function jx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Mx(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Nx(e){return JSON.stringify(e)}function Px(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function Fx(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ix(e){if(Fx(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Fx(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Lx(e){return Ix(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Rx(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function zx(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function K(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Bx(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function Vx(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return zx(e,Mx(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return jx(this,`shape`,e),e},checks:[]}))}function Hx(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return zx(e,Mx(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return jx(this,`shape`,r),r},checks:[]}))}function Ux(e,t){if(!Ix(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return zx(e,Mx(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return jx(this,`shape`,n),n}}))}function Wx(e,t){if(!Ix(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return zx(e,Mx(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return jx(this,`shape`,n),n}}))}function Gx(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return zx(e,Mx(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return jx(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Kx(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return zx(t,Mx(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return jx(this,`shape`,i),i},checks:[]}))}function qx(e,t,n){return zx(t,Mx(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return jx(this,`shape`,i),i}}))}function Jx(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Yx(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Xx(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Zx(e){return typeof e==`string`?e:e?.message}function Qx(e,t,n){let r=e.message?e.message:Zx(e.inst?._zod.def?.error?.(e))??Zx(t?.error?.(e))??Zx(n.customError?.(e))??Zx(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function $x(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function eS(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var tS,nS,rS,iS,aS,oS=n((()=>{Cx(),tS=Symbol(`evaluating`),nS=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},rS=Ex(()=>{if(Sx.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),iS=new Set([`string`,`number`,`symbol`]),aS={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function sS(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function cS(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var lS,uS,dS,fS=n((()=>{Cx(),oS(),lS=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Tx,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},uS=G(`$ZodError`,lS),dS=G(`$ZodError`,lS,{Parent:Error})})),pS,mS,hS,gS,_S,vS,yS,bS,xS,SS,CS,wS,TS,ES,DS=n((()=>{Cx(),fS(),oS(),pS=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new bx;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Qx(e,a,vx())));throw nS(t,i?.callee),t}return o.value},mS=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Qx(e,a,vx())));throw nS(t,i?.callee),t}return o.value},hS=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new bx;return a.issues.length?{success:!1,error:new(e??uS)(a.issues.map(e=>Qx(e,i,vx())))}:{success:!0,data:a.value}},gS=hS(dS),_S=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Qx(e,i,vx())))}:{success:!0,data:a.value}},vS=_S(dS),yS=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pS(e)(t,n,i)},bS=e=>(t,n,r)=>pS(e)(t,n,r),xS=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return mS(e)(t,n,i)},SS=e=>async(t,n,r)=>mS(e)(t,n,r),CS=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return hS(e)(t,n,i)},wS=e=>(t,n,r)=>hS(e)(t,n,r),TS=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return _S(e)(t,n,i)},ES=e=>async(t,n,r)=>_S(e)(t,n,r)}));function OS(){return new RegExp(HS,`u`)}function kS(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function AS(e){return RegExp(`^${kS(e)}$`)}function jS(e){let t=kS({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${ZS}T(?:${r})$`)}var MS,NS,PS,FS,IS,LS,RS,zS,BS,VS,HS,US,WS,GS,KS,qS,JS,YS,XS,ZS,QS,$S,eC,tC,nC,rC,iC,aC,oC,sC=n((()=>{MS=/^[cC][0-9a-z]{6,}$/,NS=/^[0-9a-z]+$/,PS=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,FS=/^[0-9a-vA-V]{20}$/,IS=/^[A-Za-z0-9]{27}$/,LS=/^[a-zA-Z0-9_-]{21}$/,RS=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zS=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,BS=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,VS=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,HS=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,US=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,WS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,GS=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,KS=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,qS=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,JS=/^[A-Za-z0-9_-]*$/,YS=/^https?$/,XS=/^\+[1-9]\d{6,14}$/,ZS=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,QS=RegExp(`^${ZS}$`),$S=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},eC=/^-?\d+$/,tC=/^-?\d+(?:\.\d+)?$/,nC=/^(?:true|false)$/i,rC=/^null$/i,iC=/^undefined$/i,aC=/^[^A-Z]*$/,oC=/^[^a-z]*$/})),cC,lC,uC,dC,fC,pC,mC,hC,gC,_C,vC,yC,bC,xC,SC,CC,wC,TC=n((()=>{Cx(),sC(),oS(),cC=G(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),lC={number:`number`,bigint:`bigint`,object:`date`},uC=G(`$ZodCheckLessThan`,(e,t)=>{cC.init(e,t);let n=lC[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),dC=G(`$ZodCheckGreaterThan`,(e,t)=>{cC.init(e,t);let n=lC[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fC=G(`$ZodCheckMultipleOf`,(e,t)=>{cC.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):kx(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),pC=G(`$ZodCheckNumberFormat`,(e,t)=>{cC.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=aS[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=eC)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),mC=G(`$ZodCheckMaxLength`,(e,t)=>{var n;cC.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Dx(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=$x(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),hC=G(`$ZodCheckMinLength`,(e,t)=>{var n;cC.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Dx(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=$x(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),gC=G(`$ZodCheckLengthEquals`,(e,t)=>{var n;cC.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Dx(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=$x(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),_C=G(`$ZodCheckStringFormat`,(e,t)=>{var n,r;cC.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),vC=G(`$ZodCheckRegex`,(e,t)=>{_C.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),yC=G(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=aC,_C.init(e,t)}),bC=G(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=oC,_C.init(e,t)}),xC=G(`$ZodCheckIncludes`,(e,t)=>{cC.init(e,t);let n=Rx(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),SC=G(`$ZodCheckStartsWith`,(e,t)=>{cC.init(e,t);let n=RegExp(`^${Rx(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),CC=G(`$ZodCheckEndsWith`,(e,t)=>{cC.init(e,t);let n=RegExp(`.*${Rx(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),wC=G(`$ZodCheckOverwrite`,(e,t)=>{cC.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),EC,DC=n((()=>{EC=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
58
59
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
59
- `))}}})),yS,bS=t((()=>{yS={major:4,minor:4,patch:3}}));function xS(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function SS(e){if(!zx.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return xS(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function CS(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function wS(e,t,n){e.issues.length&&t.issues.push(...Vb(n,e.issues)),t.value[n]=e.value}function TS(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Vb(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function ES(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=jb(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function DS(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>TS(e,n,i,t,u,d))):TS(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}function OS(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!zb(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ub(e,r,lb())))}),t)}function kS(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Db(e)&&Db(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=kS(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=kS(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function AS(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),zb(e))return e;let o=kS(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function jS(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function MS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function NS(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function PS(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function FS(e){return e.value=Object.freeze(e.value),e}function IS(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Gb(e))}}var LS,RS,zS,BS,VS,HS,US,WS,GS,KS,qS,JS,YS,XS,ZS,QS,$S,eC,tC,nC,rC,iC,aC,oC,sC,cC,lC,uC,dC,fC,pC,mC,hC,gC,_C,vC,yC,bC,xC,SC,CC,wC,TC,EC,DC,OC,kC,AC,jC,MC,NC,PC,FC,IC,LC=t((()=>{gS(),mb(),vS(),vx(),Qx(),Zb(),bS(),LS=W(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=yS;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=zb(e),i;for(let a of t){if(a._zod.def.when){if(Bb(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new db;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=zb(e,t))});else{if(e.issues.length===t)continue;r||=zb(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(zb(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new db;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new db;return o.then(e=>t(e,r,a))}return t(o,r,a)}}xb(e,`~standard`,()=>({validate:t=>{try{let n=sx(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return lx(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),RS=W(`$ZodString`,(e,t)=>{LS.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Wx(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),zS=W(`$ZodStringFormat`,(e,t)=>{cS.init(e,t),RS.init(e,t)}),BS=W(`$ZodGUID`,(e,t)=>{t.pattern??=Ax,zS.init(e,t)}),VS=W(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=jx(e)}else t.pattern??=jx();zS.init(e,t)}),HS=W(`$ZodEmail`,(e,t)=>{t.pattern??=Mx,zS.init(e,t)}),US=W(`$ZodURL`,(e,t)=>{zS.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Bx.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),WS=W(`$ZodEmoji`,(e,t)=>{t.pattern??=yx(),zS.init(e,t)}),GS=W(`$ZodNanoID`,(e,t)=>{t.pattern??=Ox,zS.init(e,t)}),KS=W(`$ZodCUID`,(e,t)=>{t.pattern??=Cx,zS.init(e,t)}),qS=W(`$ZodCUID2`,(e,t)=>{t.pattern??=wx,zS.init(e,t)}),JS=W(`$ZodULID`,(e,t)=>{t.pattern??=Tx,zS.init(e,t)}),YS=W(`$ZodXID`,(e,t)=>{t.pattern??=Ex,zS.init(e,t)}),XS=W(`$ZodKSUID`,(e,t)=>{t.pattern??=Dx,zS.init(e,t)}),ZS=W(`$ZodISODateTime`,(e,t)=>{t.pattern??=Sx(t),zS.init(e,t)}),QS=W(`$ZodISODate`,(e,t)=>{t.pattern??=Ux,zS.init(e,t)}),$S=W(`$ZodISOTime`,(e,t)=>{t.pattern??=xx(t),zS.init(e,t)}),eC=W(`$ZodISODuration`,(e,t)=>{t.pattern??=kx,zS.init(e,t)}),tC=W(`$ZodIPv4`,(e,t)=>{t.pattern??=Px,zS.init(e,t),e._zod.bag.format=`ipv4`}),nC=W(`$ZodIPv6`,(e,t)=>{t.pattern??=Fx,zS.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),rC=W(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Ix,zS.init(e,t)}),iC=W(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Lx,zS.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),aC=W(`$ZodBase64`,(e,t)=>{t.pattern??=Rx,zS.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{xS(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),oC=W(`$ZodBase64URL`,(e,t)=>{t.pattern??=zx,zS.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{SS(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),sC=W(`$ZodE164`,(e,t)=>{t.pattern??=Vx,zS.init(e,t)}),cC=W(`$ZodJWT`,(e,t)=>{zS.init(e,t),e._zod.check=n=>{CS(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),lC=W(`$ZodNumber`,(e,t)=>{LS.init(e,t),e._zod.pattern=e._zod.bag.pattern??Kx,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),uC=W(`$ZodNumberFormat`,(e,t)=>{iS.init(e,t),lC.init(e,t)}),dC=W(`$ZodBoolean`,(e,t)=>{LS.init(e,t),e._zod.pattern=qx,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),fC=W(`$ZodUndefined`,(e,t)=>{LS.init(e,t),e._zod.pattern=Yx,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),pC=W(`$ZodNull`,(e,t)=>{LS.init(e,t),e._zod.pattern=Jx,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),mC=W(`$ZodUnknown`,(e,t)=>{LS.init(e,t),e._zod.parse=e=>e}),hC=W(`$ZodNever`,(e,t)=>{LS.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),gC=W(`$ZodArray`,(e,t)=>{LS.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>wS(t,n,e))):wS(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),_C=W(`$ZodObject`,(e,t)=>{if(LS.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=_b(()=>ES(t));xb(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Eb,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>TS(n,t,e,s,r,i))):TS(a,t,e,s,r,i)}return i?DS(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),vC=W(`$ZodObjectJIT`,(e,t)=>{_C.init(e,t);let n=e._zod.parse,r=_b(()=>ES(t)),i=e=>{let t=new _S([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=wb(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=wb(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
60
+ `))}}})),OC,kC=n((()=>{OC={major:4,minor:4,patch:3}}));function AC(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function jC(e){if(!JS.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return AC(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function MC(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function NC(e,t,n){e.issues.length&&t.issues.push(...Xx(n,e.issues)),t.value[n]=e.value}function PC(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Xx(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function FC(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=Bx(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function IC(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>PC(e,n,i,t,u,d))):PC(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}function LC(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Jx(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Qx(e,r,vx())))}),t)}function RC(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ix(e)&&Ix(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=RC(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=RC(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function zC(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),Jx(e))return e;let o=RC(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function BC(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function VC(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function HC(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function UC(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function WC(e){return e.value=Object.freeze(e.value),e}function GC(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(eS(e))}}var KC,qC,JC,YC,XC,ZC,QC,$C,ew,tw,nw,rw,iw,aw,ow,sw,cw,lw,uw,dw,fw,pw,mw,hw,gw,_w,vw,yw,bw,xw,Sw,Cw,ww,Tw,Ew,Dw,Ow,kw,Aw,jw,Mw,Nw,Pw,Fw,Iw,Lw,Rw,zw,Bw,Vw,Hw,Uw,Ww,Gw,Kw=n((()=>{TC(),Cx(),DC(),DS(),sC(),oS(),kC(),KC=G(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=OC;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=Jx(e),i;for(let a of t){if(a._zod.def.when){if(Yx(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new bx;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Jx(e,t))});else{if(e.issues.length===t)continue;r||=Jx(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Jx(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new bx;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new bx;return o.then(e=>t(e,r,a))}return t(o,r,a)}}Ax(e,`~standard`,()=>({validate:t=>{try{let n=gS(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return vS(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),qC=G(`$ZodString`,(e,t)=>{KC.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$S(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),JC=G(`$ZodStringFormat`,(e,t)=>{_C.init(e,t),qC.init(e,t)}),YC=G(`$ZodGUID`,(e,t)=>{t.pattern??=zS,JC.init(e,t)}),XC=G(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=BS(e)}else t.pattern??=BS();JC.init(e,t)}),ZC=G(`$ZodEmail`,(e,t)=>{t.pattern??=VS,JC.init(e,t)}),QC=G(`$ZodURL`,(e,t)=>{JC.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===YS.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),n.value=t.normalize?i.href:r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),$C=G(`$ZodEmoji`,(e,t)=>{t.pattern??=OS(),JC.init(e,t)}),ew=G(`$ZodNanoID`,(e,t)=>{t.pattern??=LS,JC.init(e,t)}),tw=G(`$ZodCUID`,(e,t)=>{t.pattern??=MS,JC.init(e,t)}),nw=G(`$ZodCUID2`,(e,t)=>{t.pattern??=NS,JC.init(e,t)}),rw=G(`$ZodULID`,(e,t)=>{t.pattern??=PS,JC.init(e,t)}),iw=G(`$ZodXID`,(e,t)=>{t.pattern??=FS,JC.init(e,t)}),aw=G(`$ZodKSUID`,(e,t)=>{t.pattern??=IS,JC.init(e,t)}),ow=G(`$ZodISODateTime`,(e,t)=>{t.pattern??=jS(t),JC.init(e,t)}),sw=G(`$ZodISODate`,(e,t)=>{t.pattern??=QS,JC.init(e,t)}),cw=G(`$ZodISOTime`,(e,t)=>{t.pattern??=AS(t),JC.init(e,t)}),lw=G(`$ZodISODuration`,(e,t)=>{t.pattern??=RS,JC.init(e,t)}),uw=G(`$ZodIPv4`,(e,t)=>{t.pattern??=US,JC.init(e,t),e._zod.bag.format=`ipv4`}),dw=G(`$ZodIPv6`,(e,t)=>{t.pattern??=WS,JC.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),fw=G(`$ZodCIDRv4`,(e,t)=>{t.pattern??=GS,JC.init(e,t)}),pw=G(`$ZodCIDRv6`,(e,t)=>{t.pattern??=KS,JC.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),mw=G(`$ZodBase64`,(e,t)=>{t.pattern??=qS,JC.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{AC(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),hw=G(`$ZodBase64URL`,(e,t)=>{t.pattern??=JS,JC.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{jC(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),gw=G(`$ZodE164`,(e,t)=>{t.pattern??=XS,JC.init(e,t)}),_w=G(`$ZodJWT`,(e,t)=>{JC.init(e,t),e._zod.check=n=>{MC(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),vw=G(`$ZodNumber`,(e,t)=>{KC.init(e,t),e._zod.pattern=e._zod.bag.pattern??tC,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),yw=G(`$ZodNumberFormat`,(e,t)=>{pC.init(e,t),vw.init(e,t)}),bw=G(`$ZodBoolean`,(e,t)=>{KC.init(e,t),e._zod.pattern=nC,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),xw=G(`$ZodUndefined`,(e,t)=>{KC.init(e,t),e._zod.pattern=iC,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Sw=G(`$ZodNull`,(e,t)=>{KC.init(e,t),e._zod.pattern=rC,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Cw=G(`$ZodUnknown`,(e,t)=>{KC.init(e,t),e._zod.parse=e=>e}),ww=G(`$ZodNever`,(e,t)=>{KC.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Tw=G(`$ZodArray`,(e,t)=>{KC.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>NC(t,n,e))):NC(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),Ew=G(`$ZodObject`,(e,t)=>{if(KC.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=Ex(()=>FC(t));Ax(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Fx,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>PC(n,t,e,s,r,i))):PC(a,t,e,s,r,i)}return i?IC(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Dw=G(`$ZodObjectJIT`,(e,t)=>{Ew.init(e,t);let n=e._zod.parse,r=Ex(()=>FC(t)),i=e=>{let t=new EC([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Nx(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Nx(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
60
61
  if (${n}.issues.length) {
61
62
  if (${o} in input) {
62
63
  payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
@@ -115,15 +116,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
115
116
  }
116
117
  }
117
118
 
118
- `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Eb,s=!pb.jitless,c=s&&Jb.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?DS([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),yC=W(`$ZodUnion`,(e,t)=>{LS.init(e,t),xb(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),xb(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),xb(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),xb(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>yb(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>OS(t,r,e,i)):OS(o,r,e,i)}}),bC=W(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,yC.init(e,t);let n=e._zod.parse;xb(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=_b(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Eb(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),xC=W(`$ZodIntersection`,(e,t)=>{LS.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>AS(e,t,n)):AS(e,i,a)}}),SC=W(`$ZodRecord`,(e,t)=>{LS.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Db(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Ub(e,r,lb())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...Vb(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Vb(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Kx.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ub(e,r,lb())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Vb(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Vb(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),CC=W(`$ZodEnum`,(e,t)=>{LS.init(e,t);let n=hb(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Yb.has(typeof e)).map(e=>typeof e==`string`?kb(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),wC=W(`$ZodLiteral`,(e,t)=>{if(LS.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?kb(e):e?kb(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),TC=W(`$ZodTransform`,(e,t)=>{LS.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new fb(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new db;return n.value=i,n.fallback=!0,n}}),EC=W(`$ZodOptional`,(e,t)=>{LS.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,xb(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),xb(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${yb(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>jS(e,r)):jS(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),DC=W(`$ZodExactOptional`,(e,t)=>{EC.init(e,t),xb(e._zod,`values`,()=>t.innerType._zod.values),xb(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),OC=W(`$ZodNullable`,(e,t)=>{LS.init(e,t),xb(e._zod,`optin`,()=>t.innerType._zod.optin),xb(e._zod,`optout`,()=>t.innerType._zod.optout),xb(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${yb(e.source)}|null)$`):void 0}),xb(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),kC=W(`$ZodDefault`,(e,t)=>{LS.init(e,t),e._zod.optin=`optional`,xb(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>MS(e,t)):MS(r,t)}}),AC=W(`$ZodPrefault`,(e,t)=>{LS.init(e,t),e._zod.optin=`optional`,xb(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),jC=W(`$ZodNonOptional`,(e,t)=>{LS.init(e,t),xb(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>NS(t,e)):NS(i,e)}}),MC=W(`$ZodCatch`,(e,t)=>{LS.init(e,t),e._zod.optin=`optional`,xb(e._zod,`optout`,()=>t.innerType._zod.optout),xb(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ub(e,n,lb()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Ub(e,n,lb()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),NC=W(`$ZodPipe`,(e,t)=>{LS.init(e,t),xb(e._zod,`values`,()=>t.in._zod.values),xb(e._zod,`optin`,()=>t.in._zod.optin),xb(e._zod,`optout`,()=>t.out._zod.optout),xb(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>PS(e,t.in,n)):PS(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>PS(e,t.out,n)):PS(r,t.out,n)}}),PC=W(`$ZodPreprocess`,(e,t)=>{NC.init(e,t)}),FC=W(`$ZodReadonly`,(e,t)=>{LS.init(e,t),xb(e._zod,`propValues`,()=>t.innerType._zod.propValues),xb(e._zod,`values`,()=>t.innerType._zod.values),xb(e._zod,`optin`,()=>t.innerType?._zod?.optin),xb(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(FS):FS(r)}}),IC=W(`$ZodCustom`,(e,t)=>{$x.init(e,t),LS.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>IS(t,n,r,e));IS(i,n,r,e)}})}));function RC(){return new BC}var zC,BC,VC,HC=t((()=>{BC=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(zC=globalThis).__zod_globalRegistry??(zC.__zod_globalRegistry=RC()),VC=globalThis.__zod_globalRegistry}));function UC(e,t){return new e({type:`string`,...G(t)})}function WC(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...G(t)})}function GC(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...G(t)})}function KC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...G(t)})}function qC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...G(t)})}function JC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...G(t)})}function YC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...G(t)})}function XC(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...G(t)})}function ZC(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...G(t)})}function QC(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...G(t)})}function $C(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...G(t)})}function ew(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...G(t)})}function tw(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...G(t)})}function nw(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...G(t)})}function rw(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...G(t)})}function iw(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...G(t)})}function aw(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...G(t)})}function ow(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...G(t)})}function sw(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...G(t)})}function cw(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...G(t)})}function lw(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...G(t)})}function uw(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...G(t)})}function dw(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...G(t)})}function fw(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...G(t)})}function pw(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...G(t)})}function mw(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...G(t)})}function hw(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...G(t)})}function gw(e,t){return new e({type:`number`,checks:[],...G(t)})}function _w(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...G(t)})}function vw(e,t){return new e({type:`boolean`,...G(t)})}function yw(e,t){return new e({type:`undefined`,...G(t)})}function bw(e,t){return new e({type:`null`,...G(t)})}function xw(e){return new e({type:`unknown`})}function Sw(e,t){return new e({type:`never`,...G(t)})}function Cw(e,t){return new tS({check:`less_than`,...G(t),value:e,inclusive:!1})}function ww(e,t){return new tS({check:`less_than`,...G(t),value:e,inclusive:!0})}function Tw(e,t){return new nS({check:`greater_than`,...G(t),value:e,inclusive:!1})}function Ew(e,t){return new nS({check:`greater_than`,...G(t),value:e,inclusive:!0})}function Dw(e,t){return new rS({check:`multiple_of`,...G(t),value:e})}function Ow(e,t){return new aS({check:`max_length`,...G(t),maximum:e})}function kw(e,t){return new oS({check:`min_length`,...G(t),minimum:e})}function Aw(e,t){return new sS({check:`length_equals`,...G(t),length:e})}function jw(e,t){return new lS({check:`string_format`,format:`regex`,...G(t),pattern:e})}function Mw(e){return new uS({check:`string_format`,format:`lowercase`,...G(e)})}function Nw(e){return new dS({check:`string_format`,format:`uppercase`,...G(e)})}function Pw(e,t){return new fS({check:`string_format`,format:`includes`,...G(t),includes:e})}function Fw(e,t){return new pS({check:`string_format`,format:`starts_with`,...G(t),prefix:e})}function Iw(e,t){return new mS({check:`string_format`,format:`ends_with`,...G(t),suffix:e})}function Lw(e){return new hS({check:`overwrite`,tx:e})}function Rw(e){return Lw(t=>t.normalize(e))}function zw(){return Lw(e=>e.trim())}function Bw(){return Lw(e=>e.toLowerCase())}function Vw(){return Lw(e=>e.toUpperCase())}function Hw(){return Lw(e=>Tb(e))}function Uw(e,t,n){return new e({type:`array`,element:t,...G(n)})}function Ww(e,t,n){let r=G(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Gw(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...G(n)})}function Kw(e,t){let n=qw(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Gb(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Gb(r))}},e(t.value,t)),t);return n}function qw(e,t){let n=new $x({check:`custom`,...G(t)});return n._zod.check=e,n}var Jw=t((()=>{gS(),Zb()}));function Yw(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??VC,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function Xw(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,Xw(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&$w(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Zw(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
119
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Fx,s=!Sx.jitless,c=s&&rS.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?IC([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),Ow=G(`$ZodUnion`,(e,t)=>{KC.init(e,t),Ax(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),Ax(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),Ax(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),Ax(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Ox(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>LC(t,r,e,i)):LC(o,r,e,i)}}),kw=G(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Ow.init(e,t);let n=e._zod.parse;Ax(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=Ex(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Fx(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Aw=G(`$ZodIntersection`,(e,t)=>{KC.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>zC(e,t,n)):zC(e,i,a)}}),jw=G(`$ZodRecord`,(e,t)=>{KC.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Ix(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Qx(e,r,vx())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...Xx(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Xx(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&tC.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Qx(e,r,vx())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Xx(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Xx(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Mw=G(`$ZodEnum`,(e,t)=>{KC.init(e,t);let n=wx(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>iS.has(typeof e)).map(e=>typeof e==`string`?Rx(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Nw=G(`$ZodLiteral`,(e,t)=>{if(KC.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?Rx(e):e?Rx(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Pw=G(`$ZodTransform`,(e,t)=>{KC.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new xx(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new bx;return n.value=i,n.fallback=!0,n}}),Fw=G(`$ZodOptional`,(e,t)=>{KC.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,Ax(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ax(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ox(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>BC(e,r)):BC(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Iw=G(`$ZodExactOptional`,(e,t)=>{Fw.init(e,t),Ax(e._zod,`values`,()=>t.innerType._zod.values),Ax(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Lw=G(`$ZodNullable`,(e,t)=>{KC.init(e,t),Ax(e._zod,`optin`,()=>t.innerType._zod.optin),Ax(e._zod,`optout`,()=>t.innerType._zod.optout),Ax(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Ox(e.source)}|null)$`):void 0}),Ax(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Rw=G(`$ZodDefault`,(e,t)=>{KC.init(e,t),e._zod.optin=`optional`,Ax(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>VC(e,t)):VC(r,t)}}),zw=G(`$ZodPrefault`,(e,t)=>{KC.init(e,t),e._zod.optin=`optional`,Ax(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Bw=G(`$ZodNonOptional`,(e,t)=>{KC.init(e,t),Ax(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>HC(t,e)):HC(i,e)}}),Vw=G(`$ZodCatch`,(e,t)=>{KC.init(e,t),e._zod.optin=`optional`,Ax(e._zod,`optout`,()=>t.innerType._zod.optout),Ax(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Qx(e,n,vx()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Qx(e,n,vx()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),Hw=G(`$ZodPipe`,(e,t)=>{KC.init(e,t),Ax(e._zod,`values`,()=>t.in._zod.values),Ax(e._zod,`optin`,()=>t.in._zod.optin),Ax(e._zod,`optout`,()=>t.out._zod.optout),Ax(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>UC(e,t.in,n)):UC(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>UC(e,t.out,n)):UC(r,t.out,n)}}),Uw=G(`$ZodPreprocess`,(e,t)=>{Hw.init(e,t)}),Ww=G(`$ZodReadonly`,(e,t)=>{KC.init(e,t),Ax(e._zod,`propValues`,()=>t.innerType._zod.propValues),Ax(e._zod,`values`,()=>t.innerType._zod.values),Ax(e._zod,`optin`,()=>t.innerType?._zod?.optin),Ax(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(WC):WC(r)}}),Gw=G(`$ZodCustom`,(e,t)=>{cC.init(e,t),KC.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>GC(t,n,r,e));GC(i,n,r,e)}})}));function qw(){return new Yw}var Jw,Yw,Xw,Zw=n((()=>{Yw=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(Jw=globalThis).__zod_globalRegistry??(Jw.__zod_globalRegistry=qw()),Xw=globalThis.__zod_globalRegistry}));function Qw(e,t){return new e({type:`string`,...K(t)})}function $w(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...K(t)})}function eT(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...K(t)})}function tT(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...K(t)})}function nT(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...K(t)})}function rT(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...K(t)})}function iT(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...K(t)})}function aT(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...K(t)})}function oT(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...K(t)})}function sT(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...K(t)})}function cT(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...K(t)})}function lT(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...K(t)})}function uT(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...K(t)})}function dT(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...K(t)})}function fT(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...K(t)})}function pT(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...K(t)})}function mT(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...K(t)})}function hT(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...K(t)})}function gT(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...K(t)})}function _T(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...K(t)})}function vT(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...K(t)})}function yT(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...K(t)})}function bT(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...K(t)})}function xT(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...K(t)})}function ST(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...K(t)})}function CT(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...K(t)})}function wT(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...K(t)})}function TT(e,t){return new e({type:`number`,checks:[],...K(t)})}function ET(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...K(t)})}function DT(e,t){return new e({type:`boolean`,...K(t)})}function OT(e,t){return new e({type:`undefined`,...K(t)})}function kT(e,t){return new e({type:`null`,...K(t)})}function AT(e){return new e({type:`unknown`})}function jT(e,t){return new e({type:`never`,...K(t)})}function MT(e,t){return new uC({check:`less_than`,...K(t),value:e,inclusive:!1})}function NT(e,t){return new uC({check:`less_than`,...K(t),value:e,inclusive:!0})}function PT(e,t){return new dC({check:`greater_than`,...K(t),value:e,inclusive:!1})}function FT(e,t){return new dC({check:`greater_than`,...K(t),value:e,inclusive:!0})}function IT(e,t){return new fC({check:`multiple_of`,...K(t),value:e})}function LT(e,t){return new mC({check:`max_length`,...K(t),maximum:e})}function RT(e,t){return new hC({check:`min_length`,...K(t),minimum:e})}function zT(e,t){return new gC({check:`length_equals`,...K(t),length:e})}function BT(e,t){return new vC({check:`string_format`,format:`regex`,...K(t),pattern:e})}function VT(e){return new yC({check:`string_format`,format:`lowercase`,...K(e)})}function HT(e){return new bC({check:`string_format`,format:`uppercase`,...K(e)})}function UT(e,t){return new xC({check:`string_format`,format:`includes`,...K(t),includes:e})}function WT(e,t){return new SC({check:`string_format`,format:`starts_with`,...K(t),prefix:e})}function GT(e,t){return new CC({check:`string_format`,format:`ends_with`,...K(t),suffix:e})}function KT(e){return new wC({check:`overwrite`,tx:e})}function qT(e){return KT(t=>t.normalize(e))}function JT(){return KT(e=>e.trim())}function YT(){return KT(e=>e.toLowerCase())}function XT(){return KT(e=>e.toUpperCase())}function ZT(){return KT(e=>Px(e))}function QT(e,t,n){return new e({type:`array`,element:t,...K(n)})}function $T(e,t,n){let r=K(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function eE(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...K(n)})}function tE(e,t){let n=nE(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(eS(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(eS(r))}},e(t.value,t)),t);return n}function nE(e,t){let n=new cC({check:`custom`,...K(t)});return n._zod.check=e,n}var rE=n((()=>{TC(),oS()}));function iE(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Xw,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function aE(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,aE(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&cE(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function oE(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
119
120
 
120
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Qw(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:tT(t,`input`,e.processors),output:tT(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function $w(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return $w(r.element,n);if(r.type===`set`)return $w(r.valueType,n);if(r.type===`lazy`)return $w(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return $w(r.innerType,n);if(r.type===`intersection`)return $w(r.left,n)||$w(r.right,n);if(r.type===`record`||r.type===`map`)return $w(r.keyType,n)||$w(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:$w(r.in,n)||$w(r.out,n);if(r.type===`object`){for(let e in r.shape)if($w(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if($w(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if($w(e,n))return!0;return!!(r.rest&&$w(r.rest,n))}return!1}var eT,tT,nT=t((()=>{HC(),eT=(e,t={})=>n=>{let r=Yw({...n,processors:t});return Xw(e,r),Zw(r,e),Qw(r,e)},tT=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Yw({...i??{},target:a,io:t,processors:n});return Xw(e,o),Zw(o,e),Qw(o,e)}})),rT,iT,aT,oT,sT,cT,lT,uT,dT,fT,pT,mT,hT,gT,_T,vT,yT,bT,xT,ST,CT,wT,TT,ET,DT,OT=t((()=>{nT(),Zb(),rT={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},iT=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=rT[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},aT=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},oT=(e,t,n,r)=>{n.type=`boolean`},sT=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},cT=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},lT=(e,t,n,r)=>{n.not={}},uT=(e,t,n,r)=>{},dT=(e,t,n,r)=>{let i=e._zod.def,a=hb(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},fT=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},pT=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},mT=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},hT=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Xw(a.element,t,{...r,path:[...r.path,`items`]})},gT=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Xw(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Xw(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},_T=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Xw(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},vT=(e,t,n,r)=>{let i=e._zod.def,a=Xw(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Xw(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},yT=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Xw(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Xw(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Xw(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},bT=(e,t,n,r)=>{let i=e._zod.def,a=Xw(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},xT=(e,t,n,r)=>{let i=e._zod.def;Xw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ST=(e,t,n,r)=>{let i=e._zod.def;Xw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},CT=(e,t,n,r)=>{let i=e._zod.def;Xw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},wT=(e,t,n,r)=>{let i=e._zod.def;Xw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},TT=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Xw(o,t,r);let s=t.seen.get(e);s.ref=o},ET=(e,t,n,r)=>{let i=e._zod.def;Xw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},DT=(e,t,n,r)=>{let i=e._zod.def;Xw(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),kT=t((()=>{mb(),vx(),rx(),LC(),gS(),bS(),Zb(),Qx(),HC(),vS(),Jw(),nT(),OT(),nT()})),AT=t((()=>{kT()}));function jT(e){return fw(FT,e)}function MT(e){return pw(IT,e)}function NT(e){return mw(LT,e)}function PT(e){return hw(RT,e)}var FT,IT,LT,RT,zT=t((()=>{kT(),ED(),FT=W(`ZodISODateTime`,(e,t)=>{ZS.init(e,t),NE.init(e,t)}),IT=W(`ZodISODate`,(e,t)=>{QS.init(e,t),NE.init(e,t)}),LT=W(`ZodISOTime`,(e,t)=>{$S.init(e,t),NE.init(e,t)}),RT=W(`ZodISODuration`,(e,t)=>{eC.init(e,t),NE.init(e,t)})})),BT,VT,HT=t((()=>{kT(),Zb(),BT=(e,t)=>{tx.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>$b(e,t)},flatten:{value:t=>Qb(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,gb,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,gb,2)}},isEmpty:{get(){return e.issues.length===0}}})},VT=W(`ZodError`,BT,{Parent:Error})})),UT,WT,GT,KT,qT,JT,YT,XT,ZT,QT,$T,eE,tE=t((()=>{kT(),HT(),UT=ix(VT),WT=ax(VT),GT=ox(VT),KT=cx(VT),qT=ux(VT),JT=dx(VT),YT=fx(VT),XT=px(VT),ZT=mx(VT),QT=hx(VT),$T=gx(VT),eE=_x(VT)}));function nE(e,t,n){let r=Object.getPrototypeOf(e),i=kE.get(r);if(i||(i=new Set,kE.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}function K(e){return UC(ME,e)}function q(e){return gw($E,e)}function rE(e){return _w(eD,e)}function iE(e){return vw(tD,e)}function aE(e){return yw(nD,e)}function oE(e){return bw(rD,e)}function sE(){return xw(iD)}function cE(e){return Sw(aD,e)}function J(e,t){return Uw(oD,e,t)}function Y(e,t){let n={type:`object`,shape:e??{},...G(t)};return new sD(n)}function lE(e,t){return new sD({type:`object`,shape:e,catchall:sE(),...G(t)})}function uE(e,t){return new cD({type:`union`,options:e,...G(t)})}function dE(e,t,n){return new lD({type:`union`,options:t,discriminator:e,...G(n)})}function fE(e,t){return new uD({type:`intersection`,left:e,right:t})}function pE(e,t,n){return!t||!t._zod?new dD({type:`record`,keyType:K(),valueType:e,...G(t)}):new dD({type:`record`,keyType:e,valueType:t,...G(n)})}function mE(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new fD({type:`enum`,entries:n,...G(t)})}function X(e,t){return new pD({type:`literal`,values:Array.isArray(e)?e:[e],...G(t)})}function hE(e){return new mD({type:`transform`,transform:e})}function gE(e){return new hD({type:`optional`,innerType:e})}function _E(e){return new gD({type:`optional`,innerType:e})}function vE(e){return new _D({type:`nullable`,innerType:e})}function yE(e,t){return new vD({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ob(t)}})}function bE(e,t){return new yD({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ob(t)}})}function xE(e,t){return new bD({type:`nonoptional`,innerType:e,...G(t)})}function SE(e,t){return new xD({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function CE(e,t){return new SD({type:`pipe`,in:e,out:t})}function wE(e){return new wD({type:`readonly`,innerType:e})}function TE(e,t){return Ww(TD,e??(()=>!0),t)}function EE(e,t={}){return Gw(TD,e,t)}function DE(e,t){return Kw(e,t)}function OE(e,t){return new CD({type:`pipe`,in:hE(e),out:t})}var kE,AE,jE,ME,NE,PE,FE,IE,LE,RE,zE,BE,VE,HE,UE,WE,GE,KE,qE,JE,YE,XE,ZE,QE,$E,eD,tD,nD,rD,iD,aD,oD,sD,cD,lD,uD,dD,fD,pD,mD,hD,gD,_D,vD,yD,bD,xD,SD,CD,wD,TD,ED=t((()=>{kT(),OT(),nT(),AT(),zT(),tE(),kE=new WeakMap,AE=W(`ZodType`,(e,t)=>(LS.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:tT(e,`input`),output:tT(e,`output`)}}),e.toJSONSchema=eT(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>UT(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>GT(e,t,n),e.parseAsync=async(t,n)=>WT(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>KT(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>qT(e,t,n),e.decode=(t,n)=>JT(e,t,n),e.encodeAsync=async(t,n)=>YT(e,t,n),e.decodeAsync=async(t,n)=>XT(e,t,n),e.safeEncode=(t,n)=>ZT(e,t,n),e.safeDecode=(t,n)=>QT(e,t,n),e.safeEncodeAsync=async(t,n)=>$T(e,t,n),e.safeDecodeAsync=async(t,n)=>eE(e,t,n),nE(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Cb(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ab(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(EE(e,t))},superRefine(e,t){return this.check(DE(e,t))},overwrite(e){return this.check(Lw(e))},optional(){return gE(this)},exactOptional(){return _E(this)},nullable(){return vE(this)},nullish(){return gE(vE(this))},nonoptional(e){return xE(this,e)},array(){return J(this)},or(e){return uE([this,e])},and(e){return fE(this,e)},transform(e){return CE(this,hE(e))},default(e){return yE(this,e)},prefault(e){return bE(this,e)},catch(e){return SE(this,e)},pipe(e){return CE(this,e)},readonly(){return wE(this)},describe(e){let t=this.clone();return VC.add(t,{description:e}),t},meta(...e){if(e.length===0)return VC.get(this);let t=this.clone();return VC.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return VC.get(e)?.description},configurable:!0}),e)),jE=W(`_ZodString`,(e,t)=>{RS.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iT(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,nE(e,`_ZodString`,{regex(...e){return this.check(jw(...e))},includes(...e){return this.check(Pw(...e))},startsWith(...e){return this.check(Fw(...e))},endsWith(...e){return this.check(Iw(...e))},min(...e){return this.check(kw(...e))},max(...e){return this.check(Ow(...e))},length(...e){return this.check(Aw(...e))},nonempty(...e){return this.check(kw(1,...e))},lowercase(e){return this.check(Mw(e))},uppercase(e){return this.check(Nw(e))},trim(){return this.check(zw())},normalize(...e){return this.check(Rw(...e))},toLowerCase(){return this.check(Bw())},toUpperCase(){return this.check(Vw())},slugify(){return this.check(Hw())}})}),ME=W(`ZodString`,(e,t)=>{RS.init(e,t),jE.init(e,t),e.email=t=>e.check(WC(PE,t)),e.url=t=>e.check(XC(LE,t)),e.jwt=t=>e.check(dw(QE,t)),e.emoji=t=>e.check(ZC(RE,t)),e.guid=t=>e.check(GC(FE,t)),e.uuid=t=>e.check(KC(IE,t)),e.uuidv4=t=>e.check(qC(IE,t)),e.uuidv6=t=>e.check(JC(IE,t)),e.uuidv7=t=>e.check(YC(IE,t)),e.nanoid=t=>e.check(QC(zE,t)),e.guid=t=>e.check(GC(FE,t)),e.cuid=t=>e.check($C(BE,t)),e.cuid2=t=>e.check(ew(VE,t)),e.ulid=t=>e.check(tw(HE,t)),e.base64=t=>e.check(cw(YE,t)),e.base64url=t=>e.check(lw(XE,t)),e.xid=t=>e.check(nw(UE,t)),e.ksuid=t=>e.check(rw(WE,t)),e.ipv4=t=>e.check(iw(GE,t)),e.ipv6=t=>e.check(aw(KE,t)),e.cidrv4=t=>e.check(ow(qE,t)),e.cidrv6=t=>e.check(sw(JE,t)),e.e164=t=>e.check(uw(ZE,t)),e.datetime=t=>e.check(jT(t)),e.date=t=>e.check(MT(t)),e.time=t=>e.check(NT(t)),e.duration=t=>e.check(PT(t))}),NE=W(`ZodStringFormat`,(e,t)=>{zS.init(e,t),jE.init(e,t)}),PE=W(`ZodEmail`,(e,t)=>{HS.init(e,t),NE.init(e,t)}),FE=W(`ZodGUID`,(e,t)=>{BS.init(e,t),NE.init(e,t)}),IE=W(`ZodUUID`,(e,t)=>{VS.init(e,t),NE.init(e,t)}),LE=W(`ZodURL`,(e,t)=>{US.init(e,t),NE.init(e,t)}),RE=W(`ZodEmoji`,(e,t)=>{WS.init(e,t),NE.init(e,t)}),zE=W(`ZodNanoID`,(e,t)=>{GS.init(e,t),NE.init(e,t)}),BE=W(`ZodCUID`,(e,t)=>{KS.init(e,t),NE.init(e,t)}),VE=W(`ZodCUID2`,(e,t)=>{qS.init(e,t),NE.init(e,t)}),HE=W(`ZodULID`,(e,t)=>{JS.init(e,t),NE.init(e,t)}),UE=W(`ZodXID`,(e,t)=>{YS.init(e,t),NE.init(e,t)}),WE=W(`ZodKSUID`,(e,t)=>{XS.init(e,t),NE.init(e,t)}),GE=W(`ZodIPv4`,(e,t)=>{tC.init(e,t),NE.init(e,t)}),KE=W(`ZodIPv6`,(e,t)=>{nC.init(e,t),NE.init(e,t)}),qE=W(`ZodCIDRv4`,(e,t)=>{rC.init(e,t),NE.init(e,t)}),JE=W(`ZodCIDRv6`,(e,t)=>{iC.init(e,t),NE.init(e,t)}),YE=W(`ZodBase64`,(e,t)=>{aC.init(e,t),NE.init(e,t)}),XE=W(`ZodBase64URL`,(e,t)=>{oC.init(e,t),NE.init(e,t)}),ZE=W(`ZodE164`,(e,t)=>{sC.init(e,t),NE.init(e,t)}),QE=W(`ZodJWT`,(e,t)=>{cC.init(e,t),NE.init(e,t)}),$E=W(`ZodNumber`,(e,t)=>{lC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aT(e,t,n,r),nE(e,`ZodNumber`,{gt(e,t){return this.check(Tw(e,t))},gte(e,t){return this.check(Ew(e,t))},min(e,t){return this.check(Ew(e,t))},lt(e,t){return this.check(Cw(e,t))},lte(e,t){return this.check(ww(e,t))},max(e,t){return this.check(ww(e,t))},int(e){return this.check(rE(e))},safe(e){return this.check(rE(e))},positive(e){return this.check(Tw(0,e))},nonnegative(e){return this.check(Ew(0,e))},negative(e){return this.check(Cw(0,e))},nonpositive(e){return this.check(ww(0,e))},multipleOf(e,t){return this.check(Dw(e,t))},step(e,t){return this.check(Dw(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),eD=W(`ZodNumberFormat`,(e,t)=>{uC.init(e,t),$E.init(e,t)}),tD=W(`ZodBoolean`,(e,t)=>{dC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oT(e,t,n,r)}),nD=W(`ZodUndefined`,(e,t)=>{fC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cT(e,t,n,r)}),rD=W(`ZodNull`,(e,t)=>{pC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sT(e,t,n,r)}),iD=W(`ZodUnknown`,(e,t)=>{mC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uT(e,t,n,r)}),aD=W(`ZodNever`,(e,t)=>{hC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lT(e,t,n,r)}),oD=W(`ZodArray`,(e,t)=>{gC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hT(e,t,n,r),e.element=t.element,nE(e,`ZodArray`,{min(e,t){return this.check(kw(e,t))},nonempty(e){return this.check(kw(1,e))},max(e,t){return this.check(Ow(e,t))},length(e,t){return this.check(Aw(e,t))},unwrap(){return this.element}})}),sD=W(`ZodObject`,(e,t)=>{vC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gT(e,t,n,r),xb(e,`shape`,()=>t.shape),nE(e,`ZodObject`,{keyof(){return mE(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:sE()})},loose(){return this.clone({...this._zod.def,catchall:sE()})},strict(){return this.clone({...this._zod.def,catchall:cE()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Pb(this,e)},safeExtend(e){return Fb(this,e)},merge(e){return Ib(this,e)},pick(e){return Mb(this,e)},omit(e){return Nb(this,e)},partial(...e){return Lb(hD,this,e[0])},required(...e){return Rb(bD,this,e[0])}})}),cD=W(`ZodUnion`,(e,t)=>{yC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_T(e,t,n,r),e.options=t.options}),lD=W(`ZodDiscriminatedUnion`,(e,t)=>{cD.init(e,t),bC.init(e,t)}),uD=W(`ZodIntersection`,(e,t)=>{xC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vT(e,t,n,r)}),dD=W(`ZodRecord`,(e,t)=>{SC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yT(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),fD=W(`ZodEnum`,(e,t)=>{CC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dT(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new fD({...t,checks:[],...G(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new fD({...t,checks:[],...G(r),entries:i})}}),pD=W(`ZodLiteral`,(e,t)=>{wC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fT(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),mD=W(`ZodTransform`,(e,t)=>{TC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mT(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new fb(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Gb(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(Gb(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}}),hD=W(`ZodOptional`,(e,t)=>{EC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),gD=W(`ZodExactOptional`,(e,t)=>{DC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),_D=W(`ZodNullable`,(e,t)=>{OC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),vD=W(`ZodDefault`,(e,t)=>{kC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ST(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),yD=W(`ZodPrefault`,(e,t)=>{AC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),bD=W(`ZodNonOptional`,(e,t)=>{jC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),xD=W(`ZodCatch`,(e,t)=>{MC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),SD=W(`ZodPipe`,(e,t)=>{NC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TT(e,t,n,r),e.in=t.in,e.out=t.out}),CD=W(`ZodPreprocess`,(e,t)=>{SD.init(e,t),PC.init(e,t)}),wD=W(`ZodReadonly`,(e,t)=>{FC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ET(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),TD=W(`ZodCustom`,(e,t)=>{IC.init(e,t),AE.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pT(e,t,n,r)})})),DD=t((()=>{kT()})),OD=t((()=>{kT(),ED(),AT(),HT(),tE(),DD(),OT(),HC(),AT(),zT(),ED(),Zb()})),kD=t((()=>{OD(),OD()})),AD=t((()=>{kD()}));AD();var jD=`io.modelcontextprotocol/related-task`,MD=TE(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),ND=uE([K(),q().int()]),PD=K();lE({ttl:q().optional(),pollInterval:q().optional()});var FD=Y({ttl:q().optional()}),ID=Y({taskId:K()}),LD=lE({progressToken:ND.optional(),[jD]:ID.optional()}),RD=Y({_meta:LD.optional()}),zD=RD.extend({task:FD.optional()}),BD=e=>zD.safeParse(e).success,VD=Y({method:K(),params:RD.loose().optional()}),HD=Y({_meta:LD.optional()}),UD=Y({method:K(),params:HD.loose().optional()}),WD=lE({_meta:LD.optional()}),GD=uE([K(),q().int()]),KD=Y({jsonrpc:X(`2.0`),id:GD,...VD.shape}).strict(),qD=e=>KD.safeParse(e).success,JD=Y({jsonrpc:X(`2.0`),...UD.shape}).strict(),YD=e=>JD.safeParse(e).success,XD=Y({jsonrpc:X(`2.0`),id:GD,result:WD}).strict(),ZD=e=>XD.safeParse(e).success,QD;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(QD||={});var $D=Y({jsonrpc:X(`2.0`),id:GD.optional(),error:Y({code:q().int(),message:K(),data:sE().optional()})}).strict(),eO=e=>$D.safeParse(e).success;uE([KD,JD,XD,$D]),uE([XD,$D]);var tO=WD.strict(),nO=HD.extend({requestId:GD.optional(),reason:K().optional()}),rO=UD.extend({method:X(`notifications/cancelled`),params:nO}),iO=Y({icons:J(Y({src:K(),mimeType:K().optional(),sizes:J(K()).optional(),theme:mE([`light`,`dark`]).optional()})).optional()}),aO=Y({name:K(),title:K().optional()}),oO=aO.extend({...aO.shape,...iO.shape,version:K(),websiteUrl:K().optional(),description:K().optional()}),sO=OE(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,fE(Y({form:fE(Y({applyDefaults:iE().optional()}),pE(K(),sE())).optional(),url:MD.optional()}),pE(K(),sE()).optional())),cO=lE({list:MD.optional(),cancel:MD.optional(),requests:lE({sampling:lE({createMessage:MD.optional()}).optional(),elicitation:lE({create:MD.optional()}).optional()}).optional()}),lO=lE({list:MD.optional(),cancel:MD.optional(),requests:lE({tools:lE({call:MD.optional()}).optional()}).optional()}),uO=Y({experimental:pE(K(),MD).optional(),sampling:Y({context:MD.optional(),tools:MD.optional()}).optional(),elicitation:sO.optional(),roots:Y({listChanged:iE().optional()}).optional(),tasks:cO.optional(),extensions:pE(K(),MD).optional()}),dO=RD.extend({protocolVersion:K(),capabilities:uO,clientInfo:oO}),fO=VD.extend({method:X(`initialize`),params:dO}),pO=Y({experimental:pE(K(),MD).optional(),logging:MD.optional(),completions:MD.optional(),prompts:Y({listChanged:iE().optional()}).optional(),resources:Y({subscribe:iE().optional(),listChanged:iE().optional()}).optional(),tools:Y({listChanged:iE().optional()}).optional(),tasks:lO.optional(),extensions:pE(K(),MD).optional()}),mO=WD.extend({protocolVersion:K(),capabilities:pO,serverInfo:oO,instructions:K().optional()}),hO=UD.extend({method:X(`notifications/initialized`),params:HD.optional()}),gO=VD.extend({method:X(`ping`),params:RD.optional()}),_O=Y({progress:q(),total:gE(q()),message:gE(K())}),vO=Y({...HD.shape,..._O.shape,progressToken:ND}),yO=UD.extend({method:X(`notifications/progress`),params:vO}),bO=RD.extend({cursor:PD.optional()}),xO=VD.extend({params:bO.optional()}),SO=WD.extend({nextCursor:PD.optional()}),CO=mE([`working`,`input_required`,`completed`,`failed`,`cancelled`]),wO=Y({taskId:K(),status:CO,ttl:uE([q(),oE()]),createdAt:K(),lastUpdatedAt:K(),pollInterval:gE(q()),statusMessage:gE(K())}),TO=WD.extend({task:wO}),EO=HD.merge(wO),DO=UD.extend({method:X(`notifications/tasks/status`),params:EO}),OO=VD.extend({method:X(`tasks/get`),params:RD.extend({taskId:K()})}),kO=WD.merge(wO),AO=VD.extend({method:X(`tasks/result`),params:RD.extend({taskId:K()})});WD.loose();var jO=xO.extend({method:X(`tasks/list`)}),MO=SO.extend({tasks:J(wO)}),NO=VD.extend({method:X(`tasks/cancel`),params:RD.extend({taskId:K()})}),PO=WD.merge(wO),FO=Y({uri:K(),mimeType:gE(K()),_meta:pE(K(),sE()).optional()}),IO=FO.extend({text:K()}),LO=K().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),RO=FO.extend({blob:LO}),zO=mE([`user`,`assistant`]),BO=Y({audience:J(zO).optional(),priority:q().min(0).max(1).optional(),lastModified:jT({offset:!0}).optional()}),VO=Y({...aO.shape,...iO.shape,uri:K(),description:gE(K()),mimeType:gE(K()),size:gE(q()),annotations:BO.optional(),_meta:gE(lE({}))}),HO=Y({...aO.shape,...iO.shape,uriTemplate:K(),description:gE(K()),mimeType:gE(K()),annotations:BO.optional(),_meta:gE(lE({}))}),UO=xO.extend({method:X(`resources/list`)}),WO=SO.extend({resources:J(VO)}),GO=xO.extend({method:X(`resources/templates/list`)}),KO=SO.extend({resourceTemplates:J(HO)}),qO=RD.extend({uri:K()}),JO=qO,YO=VD.extend({method:X(`resources/read`),params:JO}),XO=WD.extend({contents:J(uE([IO,RO]))}),ZO=UD.extend({method:X(`notifications/resources/list_changed`),params:HD.optional()}),QO=qO,$O=VD.extend({method:X(`resources/subscribe`),params:QO}),ek=qO,tk=VD.extend({method:X(`resources/unsubscribe`),params:ek}),nk=HD.extend({uri:K()}),rk=UD.extend({method:X(`notifications/resources/updated`),params:nk}),ik=Y({name:K(),description:gE(K()),required:gE(iE())}),ak=Y({...aO.shape,...iO.shape,description:gE(K()),arguments:gE(J(ik)),_meta:gE(lE({}))}),ok=xO.extend({method:X(`prompts/list`)}),sk=SO.extend({prompts:J(ak)}),ck=RD.extend({name:K(),arguments:pE(K(),K()).optional()}),lk=VD.extend({method:X(`prompts/get`),params:ck}),uk=Y({type:X(`text`),text:K(),annotations:BO.optional(),_meta:pE(K(),sE()).optional()}),dk=Y({type:X(`image`),data:LO,mimeType:K(),annotations:BO.optional(),_meta:pE(K(),sE()).optional()}),fk=Y({type:X(`audio`),data:LO,mimeType:K(),annotations:BO.optional(),_meta:pE(K(),sE()).optional()}),pk=Y({type:X(`tool_use`),name:K(),id:K(),input:pE(K(),sE()),_meta:pE(K(),sE()).optional()}),mk=Y({type:X(`resource`),resource:uE([IO,RO]),annotations:BO.optional(),_meta:pE(K(),sE()).optional()}),hk=VO.extend({type:X(`resource_link`)}),gk=uE([uk,dk,fk,hk,mk]),_k=Y({role:zO,content:gk}),vk=WD.extend({description:K().optional(),messages:J(_k)}),yk=UD.extend({method:X(`notifications/prompts/list_changed`),params:HD.optional()}),bk=Y({title:K().optional(),readOnlyHint:iE().optional(),destructiveHint:iE().optional(),idempotentHint:iE().optional(),openWorldHint:iE().optional()}),xk=Y({taskSupport:mE([`required`,`optional`,`forbidden`]).optional()}),Sk=Y({...aO.shape,...iO.shape,description:K().optional(),inputSchema:Y({type:X(`object`),properties:pE(K(),MD).optional(),required:J(K()).optional()}).catchall(sE()),outputSchema:Y({type:X(`object`),properties:pE(K(),MD).optional(),required:J(K()).optional()}).catchall(sE()).optional(),annotations:bk.optional(),execution:xk.optional(),_meta:pE(K(),sE()).optional()}),Ck=xO.extend({method:X(`tools/list`)}),wk=SO.extend({tools:J(Sk)}),Tk=WD.extend({content:J(gk).default([]),structuredContent:pE(K(),sE()).optional(),isError:iE().optional()});Tk.or(WD.extend({toolResult:sE()}));var Ek=zD.extend({name:K(),arguments:pE(K(),sE()).optional()}),Dk=VD.extend({method:X(`tools/call`),params:Ek}),Ok=UD.extend({method:X(`notifications/tools/list_changed`),params:HD.optional()});Y({autoRefresh:iE().default(!0),debounceMs:q().int().nonnegative().default(300)});var kk=mE([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Ak=RD.extend({level:kk}),jk=VD.extend({method:X(`logging/setLevel`),params:Ak}),Mk=HD.extend({level:kk,logger:K().optional(),data:sE()}),Nk=UD.extend({method:X(`notifications/message`),params:Mk}),Pk=Y({hints:J(Y({name:K().optional()})).optional(),costPriority:q().min(0).max(1).optional(),speedPriority:q().min(0).max(1).optional(),intelligencePriority:q().min(0).max(1).optional()}),Fk=Y({mode:mE([`auto`,`required`,`none`]).optional()}),Ik=Y({type:X(`tool_result`),toolUseId:K().describe(`The unique identifier for the corresponding tool call.`),content:J(gk).default([]),structuredContent:Y({}).loose().optional(),isError:iE().optional(),_meta:pE(K(),sE()).optional()}),Lk=dE(`type`,[uk,dk,fk]),Rk=dE(`type`,[uk,dk,fk,pk,Ik]),zk=Y({role:zO,content:uE([Rk,J(Rk)]),_meta:pE(K(),sE()).optional()}),Bk=zD.extend({messages:J(zk),modelPreferences:Pk.optional(),systemPrompt:K().optional(),includeContext:mE([`none`,`thisServer`,`allServers`]).optional(),temperature:q().optional(),maxTokens:q().int(),stopSequences:J(K()).optional(),metadata:MD.optional(),tools:J(Sk).optional(),toolChoice:Fk.optional()}),Vk=VD.extend({method:X(`sampling/createMessage`),params:Bk}),Hk=WD.extend({model:K(),stopReason:gE(mE([`endTurn`,`stopSequence`,`maxTokens`]).or(K())),role:zO,content:Lk}),Uk=WD.extend({model:K(),stopReason:gE(mE([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(K())),role:zO,content:uE([Rk,J(Rk)])}),Wk=Y({type:X(`boolean`),title:K().optional(),description:K().optional(),default:iE().optional()}),Gk=Y({type:X(`string`),title:K().optional(),description:K().optional(),minLength:q().optional(),maxLength:q().optional(),format:mE([`email`,`uri`,`date`,`date-time`]).optional(),default:K().optional()}),Kk=Y({type:mE([`number`,`integer`]),title:K().optional(),description:K().optional(),minimum:q().optional(),maximum:q().optional(),default:q().optional()}),qk=Y({type:X(`string`),title:K().optional(),description:K().optional(),enum:J(K()),default:K().optional()}),Jk=Y({type:X(`string`),title:K().optional(),description:K().optional(),oneOf:J(Y({const:K(),title:K()})),default:K().optional()}),Yk=uE([uE([Y({type:X(`string`),title:K().optional(),description:K().optional(),enum:J(K()),enumNames:J(K()).optional(),default:K().optional()}),uE([qk,Jk]),uE([Y({type:X(`array`),title:K().optional(),description:K().optional(),minItems:q().optional(),maxItems:q().optional(),items:Y({type:X(`string`),enum:J(K())}),default:J(K()).optional()}),Y({type:X(`array`),title:K().optional(),description:K().optional(),minItems:q().optional(),maxItems:q().optional(),items:Y({anyOf:J(Y({const:K(),title:K()}))}),default:J(K()).optional()})])]),Wk,Gk,Kk]),Xk=uE([zD.extend({mode:X(`form`).optional(),message:K(),requestedSchema:Y({type:X(`object`),properties:pE(K(),Yk),required:J(K()).optional()})}),zD.extend({mode:X(`url`),message:K(),elicitationId:K(),url:K().url()})]),Zk=VD.extend({method:X(`elicitation/create`),params:Xk}),Qk=HD.extend({elicitationId:K()}),$k=UD.extend({method:X(`notifications/elicitation/complete`),params:Qk}),eA=WD.extend({action:mE([`accept`,`decline`,`cancel`]),content:OE(e=>e===null?void 0:e,pE(K(),uE([K(),q(),iE(),J(K())])).optional())}),tA=Y({type:X(`ref/resource`),uri:K()}),nA=Y({type:X(`ref/prompt`),name:K()}),rA=RD.extend({ref:uE([nA,tA]),argument:Y({name:K(),value:K()}),context:Y({arguments:pE(K(),K()).optional()}).optional()}),iA=VD.extend({method:X(`completion/complete`),params:rA}),aA=WD.extend({completion:lE({values:J(K()).max(100),total:gE(q().int()),hasMore:gE(iE())})}),oA=Y({uri:K().startsWith(`file://`),name:K().optional(),_meta:pE(K(),sE()).optional()}),sA=VD.extend({method:X(`roots/list`),params:RD.optional()}),cA=WD.extend({roots:J(oA)}),lA=UD.extend({method:X(`notifications/roots/list_changed`),params:HD.optional()});uE([gO,fO,iA,jk,lk,ok,UO,GO,YO,$O,tk,Dk,Ck,OO,AO,jO,NO]),uE([rO,yO,hO,lA,DO]),uE([tO,Hk,Uk,eA,cA,kO,MO,TO]),uE([gO,Vk,Zk,sA,OO,AO,jO,NO]),uE([rO,yO,Nk,rk,ZO,Ok,yk,DO,$k]),uE([tO,mO,aA,vk,sk,WO,KO,XO,Tk,wk,kO,MO,TO]);var uA=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===QD.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new dA(e.elicitations,n)}return new e(t,n,r)}},dA=class extends uA{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(QD.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};vx();function fA(e){return!!e._zod}function pA(e,t){return fA(e)?sx(e,t):e.safeParse(t)}function mA(e){if(!e)return;let t;if(t=fA(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function hA(e){if(fA(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function gA(e){return e===`completed`||e===`failed`||e===`cancelled`}function _A(e){let t=mA(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=hA(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function vA(e,t){let n=pA(e,t);if(!n.success)throw n.error;return n.data}var yA=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(rO,e=>{this._oncancel(e)}),this.setNotificationHandler(yO,e=>{this._onprogress(e)}),this.setRequestHandler(gO,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(OO,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new uA(QD.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(AO,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new uA(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new uA(QD.InvalidParams,`Task not found: ${r}`);if(!gA(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(gA(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[jD]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(jO,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new uA(QD.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(NO,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new uA(QD.InvalidParams,`Task not found: ${e.params.taskId}`);if(gA(n.status))throw new uA(QD.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new uA(QD.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof uA?e:new uA(QD.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),uA.fromError(QD.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),ZD(e)||eO(e)?this._onresponse(e):qD(e)?this._onrequest(e,t):YD(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=uA.fromError(QD.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[jD]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:QD.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=BD(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new uA(QD.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:QD.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),ZD(e)?n(e):n(new uA(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(ZD(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),ZD(e)?r(e):r(uA.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof uA?e:new uA(QD.InternalError,String(e))}}return}let i;try{let r=await this.request(e,TO,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new uA(QD.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},gA(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new uA(QD.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new uA(QD.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof uA?e:new uA(QD.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[jD]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof uA?e:new uA(QD.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=pA(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(uA.fromError(QD.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},kO,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},MO,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},PO,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[jD]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[jD]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[jD]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=_A(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=vA(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=_A(e);this._notificationHandlers.set(n,n=>{let r=vA(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&qD(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new uA(QD.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new uA(QD.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new uA(QD.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new uA(QD.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=DO.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),gA(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new uA(QD.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(gA(a.status))throw new uA(QD.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=DO.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),gA(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};AD(),(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var bA=class extends yA{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},xA=`2026-01-26`,SA=uE([X(`light`),X(`dark`)]).describe(`Color theme preference for the host environment.`),CA=uE([X(`inline`),X(`fullscreen`),X(`pip`)]).describe(`Display mode for UI presentation.`),wA=pE(uE([X(`--color-background-primary`),X(`--color-background-secondary`),X(`--color-background-tertiary`),X(`--color-background-inverse`),X(`--color-background-ghost`),X(`--color-background-info`),X(`--color-background-danger`),X(`--color-background-success`),X(`--color-background-warning`),X(`--color-background-disabled`),X(`--color-text-primary`),X(`--color-text-secondary`),X(`--color-text-tertiary`),X(`--color-text-inverse`),X(`--color-text-ghost`),X(`--color-text-info`),X(`--color-text-danger`),X(`--color-text-success`),X(`--color-text-warning`),X(`--color-text-disabled`),X(`--color-border-primary`),X(`--color-border-secondary`),X(`--color-border-tertiary`),X(`--color-border-inverse`),X(`--color-border-ghost`),X(`--color-border-info`),X(`--color-border-danger`),X(`--color-border-success`),X(`--color-border-warning`),X(`--color-border-disabled`),X(`--color-ring-primary`),X(`--color-ring-secondary`),X(`--color-ring-inverse`),X(`--color-ring-info`),X(`--color-ring-danger`),X(`--color-ring-success`),X(`--color-ring-warning`),X(`--font-sans`),X(`--font-mono`),X(`--font-weight-normal`),X(`--font-weight-medium`),X(`--font-weight-semibold`),X(`--font-weight-bold`),X(`--font-text-xs-size`),X(`--font-text-sm-size`),X(`--font-text-md-size`),X(`--font-text-lg-size`),X(`--font-heading-xs-size`),X(`--font-heading-sm-size`),X(`--font-heading-md-size`),X(`--font-heading-lg-size`),X(`--font-heading-xl-size`),X(`--font-heading-2xl-size`),X(`--font-heading-3xl-size`),X(`--font-text-xs-line-height`),X(`--font-text-sm-line-height`),X(`--font-text-md-line-height`),X(`--font-text-lg-line-height`),X(`--font-heading-xs-line-height`),X(`--font-heading-sm-line-height`),X(`--font-heading-md-line-height`),X(`--font-heading-lg-line-height`),X(`--font-heading-xl-line-height`),X(`--font-heading-2xl-line-height`),X(`--font-heading-3xl-line-height`),X(`--border-radius-xs`),X(`--border-radius-sm`),X(`--border-radius-md`),X(`--border-radius-lg`),X(`--border-radius-xl`),X(`--border-radius-full`),X(`--border-width-regular`),X(`--shadow-hairline`),X(`--shadow-sm`),X(`--shadow-md`),X(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
121
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function sE(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:uE(t,`input`,e.processors),output:uE(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function cE(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return cE(r.element,n);if(r.type===`set`)return cE(r.valueType,n);if(r.type===`lazy`)return cE(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return cE(r.innerType,n);if(r.type===`intersection`)return cE(r.left,n)||cE(r.right,n);if(r.type===`record`||r.type===`map`)return cE(r.keyType,n)||cE(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:cE(r.in,n)||cE(r.out,n);if(r.type===`object`){for(let e in r.shape)if(cE(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(cE(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(cE(e,n))return!0;return!!(r.rest&&cE(r.rest,n))}return!1}var lE,uE,dE=n((()=>{Zw(),lE=(e,t={})=>n=>{let r=iE({...n,processors:t});return aE(e,r),oE(r,e),sE(r,e)},uE=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=iE({...i??{},target:a,io:t,processors:n});return aE(e,o),oE(o,e),sE(o,e)}})),fE,pE,mE,hE,gE,_E,vE,yE,bE,xE,SE,CE,wE,TE,EE,DE,OE,kE,AE,jE,ME,NE,PE,FE,IE,LE=n((()=>{dE(),oS(),fE={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},pE=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=fE[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},mE=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},hE=(e,t,n,r)=>{n.type=`boolean`},gE=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},_E=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},vE=(e,t,n,r)=>{n.not={}},yE=(e,t,n,r)=>{},bE=(e,t,n,r)=>{let i=e._zod.def,a=wx(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},xE=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},SE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},CE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},wE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=aE(a.element,t,{...r,path:[...r.path,`items`]})},TE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=aE(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=aE(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},EE=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>aE(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},DE=(e,t,n,r)=>{let i=e._zod.def,a=aE(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=aE(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},OE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=aE(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=aE(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=aE(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},kE=(e,t,n,r)=>{let i=e._zod.def,a=aE(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},AE=(e,t,n,r)=>{let i=e._zod.def;aE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},jE=(e,t,n,r)=>{let i=e._zod.def;aE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ME=(e,t,n,r)=>{let i=e._zod.def;aE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},NE=(e,t,n,r)=>{let i=e._zod.def;aE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},PE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;aE(o,t,r);let s=t.seen.get(e);s.ref=o},FE=(e,t,n,r)=>{let i=e._zod.def;aE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},IE=(e,t,n,r)=>{let i=e._zod.def;aE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),RE=n((()=>{Cx(),DS(),fS(),Kw(),TC(),kC(),oS(),sC(),Zw(),DC(),rE(),dE(),LE(),dE()})),zE=n((()=>{RE()}));function BE(e){return xT(WE,e)}function VE(e){return ST(GE,e)}function HE(e){return CT(KE,e)}function UE(e){return wT(qE,e)}var WE,GE,KE,qE,JE=n((()=>{RE(),FO(),WE=G(`ZodISODateTime`,(e,t)=>{ow.init(e,t),HD.init(e,t)}),GE=G(`ZodISODate`,(e,t)=>{sw.init(e,t),HD.init(e,t)}),KE=G(`ZodISOTime`,(e,t)=>{cw.init(e,t),HD.init(e,t)}),qE=G(`ZodISODuration`,(e,t)=>{lw.init(e,t),HD.init(e,t)})})),YE,XE,ZE=n((()=>{RE(),oS(),YE=(e,t)=>{uS.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>cS(e,t)},flatten:{value:t=>sS(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Tx,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Tx,2)}},isEmpty:{get(){return e.issues.length===0}}})},XE=G(`ZodError`,YE,{Parent:Error})})),QE,$E,eD,tD,nD,rD,iD,aD,oD,sD,cD,lD,uD=n((()=>{RE(),ZE(),QE=pS(XE),$E=mS(XE),eD=hS(XE),tD=_S(XE),nD=yS(XE),rD=bS(XE),iD=xS(XE),aD=SS(XE),oD=CS(XE),sD=wS(XE),cD=TS(XE),lD=ES(XE)}));function dD(e,t,n){let r=Object.getPrototypeOf(e),i=RD.get(r);if(i||(i=new Set,RD.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}function q(e){return Qw(VD,e)}function J(e){return TT(cO,e)}function fD(e){return ET(lO,e)}function pD(e){return DT(uO,e)}function mD(e){return OT(dO,e)}function hD(e){return kT(fO,e)}function gD(){return AT(pO)}function _D(e){return jT(mO,e)}function Y(e,t){return QT(hO,e,t)}function X(e,t){let n={type:`object`,shape:e??{},...K(t)};return new gO(n)}function vD(e,t){return new gO({type:`object`,shape:e,catchall:gD(),...K(t)})}function yD(e,t){return new _O({type:`union`,options:e,...K(t)})}function bD(e,t,n){return new vO({type:`union`,options:t,discriminator:e,...K(n)})}function xD(e,t){return new yO({type:`intersection`,left:e,right:t})}function SD(e,t,n){return!t||!t._zod?new bO({type:`record`,keyType:q(),valueType:e,...K(t)}):new bO({type:`record`,keyType:e,valueType:t,...K(n)})}function CD(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new xO({type:`enum`,entries:n,...K(t)})}function Z(e,t){return new SO({type:`literal`,values:Array.isArray(e)?e:[e],...K(t)})}function wD(e){return new CO({type:`transform`,transform:e})}function TD(e){return new wO({type:`optional`,innerType:e})}function ED(e){return new TO({type:`optional`,innerType:e})}function DD(e){return new EO({type:`nullable`,innerType:e})}function OD(e,t){return new DO({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Lx(t)}})}function kD(e,t){return new OO({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Lx(t)}})}function AD(e,t){return new kO({type:`nonoptional`,innerType:e,...K(t)})}function jD(e,t){return new AO({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function MD(e,t){return new jO({type:`pipe`,in:e,out:t})}function ND(e){return new NO({type:`readonly`,innerType:e})}function PD(e,t){return $T(PO,e??(()=>!0),t)}function FD(e,t={}){return eE(PO,e,t)}function ID(e,t){return tE(e,t)}function LD(e,t){return new MO({type:`pipe`,in:wD(e),out:t})}var RD,zD,BD,VD,HD,UD,WD,GD,KD,qD,JD,YD,XD,ZD,QD,$D,eO,tO,nO,rO,iO,aO,oO,sO,cO,lO,uO,dO,fO,pO,mO,hO,gO,_O,vO,yO,bO,xO,SO,CO,wO,TO,EO,DO,OO,kO,AO,jO,MO,NO,PO,FO=n((()=>{RE(),LE(),dE(),zE(),JE(),uD(),RD=new WeakMap,zD=G(`ZodType`,(e,t)=>(KC.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:uE(e,`input`),output:uE(e,`output`)}}),e.toJSONSchema=lE(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>QE(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>eD(e,t,n),e.parseAsync=async(t,n)=>$E(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>tD(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>nD(e,t,n),e.decode=(t,n)=>rD(e,t,n),e.encodeAsync=async(t,n)=>iD(e,t,n),e.decodeAsync=async(t,n)=>aD(e,t,n),e.safeEncode=(t,n)=>oD(e,t,n),e.safeDecode=(t,n)=>sD(e,t,n),e.safeEncodeAsync=async(t,n)=>cD(e,t,n),e.safeDecodeAsync=async(t,n)=>lD(e,t,n),dD(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Mx(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return zx(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(FD(e,t))},superRefine(e,t){return this.check(ID(e,t))},overwrite(e){return this.check(KT(e))},optional(){return TD(this)},exactOptional(){return ED(this)},nullable(){return DD(this)},nullish(){return TD(DD(this))},nonoptional(e){return AD(this,e)},array(){return Y(this)},or(e){return yD([this,e])},and(e){return xD(this,e)},transform(e){return MD(this,wD(e))},default(e){return OD(this,e)},prefault(e){return kD(this,e)},catch(e){return jD(this,e)},pipe(e){return MD(this,e)},readonly(){return ND(this)},describe(e){let t=this.clone();return Xw.add(t,{description:e}),t},meta(...e){if(e.length===0)return Xw.get(this);let t=this.clone();return Xw.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Xw.get(e)?.description},configurable:!0}),e)),BD=G(`_ZodString`,(e,t)=>{qC.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pE(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,dD(e,`_ZodString`,{regex(...e){return this.check(BT(...e))},includes(...e){return this.check(UT(...e))},startsWith(...e){return this.check(WT(...e))},endsWith(...e){return this.check(GT(...e))},min(...e){return this.check(RT(...e))},max(...e){return this.check(LT(...e))},length(...e){return this.check(zT(...e))},nonempty(...e){return this.check(RT(1,...e))},lowercase(e){return this.check(VT(e))},uppercase(e){return this.check(HT(e))},trim(){return this.check(JT())},normalize(...e){return this.check(qT(...e))},toLowerCase(){return this.check(YT())},toUpperCase(){return this.check(XT())},slugify(){return this.check(ZT())}})}),VD=G(`ZodString`,(e,t)=>{qC.init(e,t),BD.init(e,t),e.email=t=>e.check($w(UD,t)),e.url=t=>e.check(aT(KD,t)),e.jwt=t=>e.check(bT(sO,t)),e.emoji=t=>e.check(oT(qD,t)),e.guid=t=>e.check(eT(WD,t)),e.uuid=t=>e.check(tT(GD,t)),e.uuidv4=t=>e.check(nT(GD,t)),e.uuidv6=t=>e.check(rT(GD,t)),e.uuidv7=t=>e.check(iT(GD,t)),e.nanoid=t=>e.check(sT(JD,t)),e.guid=t=>e.check(eT(WD,t)),e.cuid=t=>e.check(cT(YD,t)),e.cuid2=t=>e.check(lT(XD,t)),e.ulid=t=>e.check(uT(ZD,t)),e.base64=t=>e.check(_T(iO,t)),e.base64url=t=>e.check(vT(aO,t)),e.xid=t=>e.check(dT(QD,t)),e.ksuid=t=>e.check(fT($D,t)),e.ipv4=t=>e.check(pT(eO,t)),e.ipv6=t=>e.check(mT(tO,t)),e.cidrv4=t=>e.check(hT(nO,t)),e.cidrv6=t=>e.check(gT(rO,t)),e.e164=t=>e.check(yT(oO,t)),e.datetime=t=>e.check(BE(t)),e.date=t=>e.check(VE(t)),e.time=t=>e.check(HE(t)),e.duration=t=>e.check(UE(t))}),HD=G(`ZodStringFormat`,(e,t)=>{JC.init(e,t),BD.init(e,t)}),UD=G(`ZodEmail`,(e,t)=>{ZC.init(e,t),HD.init(e,t)}),WD=G(`ZodGUID`,(e,t)=>{YC.init(e,t),HD.init(e,t)}),GD=G(`ZodUUID`,(e,t)=>{XC.init(e,t),HD.init(e,t)}),KD=G(`ZodURL`,(e,t)=>{QC.init(e,t),HD.init(e,t)}),qD=G(`ZodEmoji`,(e,t)=>{$C.init(e,t),HD.init(e,t)}),JD=G(`ZodNanoID`,(e,t)=>{ew.init(e,t),HD.init(e,t)}),YD=G(`ZodCUID`,(e,t)=>{tw.init(e,t),HD.init(e,t)}),XD=G(`ZodCUID2`,(e,t)=>{nw.init(e,t),HD.init(e,t)}),ZD=G(`ZodULID`,(e,t)=>{rw.init(e,t),HD.init(e,t)}),QD=G(`ZodXID`,(e,t)=>{iw.init(e,t),HD.init(e,t)}),$D=G(`ZodKSUID`,(e,t)=>{aw.init(e,t),HD.init(e,t)}),eO=G(`ZodIPv4`,(e,t)=>{uw.init(e,t),HD.init(e,t)}),tO=G(`ZodIPv6`,(e,t)=>{dw.init(e,t),HD.init(e,t)}),nO=G(`ZodCIDRv4`,(e,t)=>{fw.init(e,t),HD.init(e,t)}),rO=G(`ZodCIDRv6`,(e,t)=>{pw.init(e,t),HD.init(e,t)}),iO=G(`ZodBase64`,(e,t)=>{mw.init(e,t),HD.init(e,t)}),aO=G(`ZodBase64URL`,(e,t)=>{hw.init(e,t),HD.init(e,t)}),oO=G(`ZodE164`,(e,t)=>{gw.init(e,t),HD.init(e,t)}),sO=G(`ZodJWT`,(e,t)=>{_w.init(e,t),HD.init(e,t)}),cO=G(`ZodNumber`,(e,t)=>{vw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mE(e,t,n,r),dD(e,`ZodNumber`,{gt(e,t){return this.check(PT(e,t))},gte(e,t){return this.check(FT(e,t))},min(e,t){return this.check(FT(e,t))},lt(e,t){return this.check(MT(e,t))},lte(e,t){return this.check(NT(e,t))},max(e,t){return this.check(NT(e,t))},int(e){return this.check(fD(e))},safe(e){return this.check(fD(e))},positive(e){return this.check(PT(0,e))},nonnegative(e){return this.check(FT(0,e))},negative(e){return this.check(MT(0,e))},nonpositive(e){return this.check(NT(0,e))},multipleOf(e,t){return this.check(IT(e,t))},step(e,t){return this.check(IT(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),lO=G(`ZodNumberFormat`,(e,t)=>{yw.init(e,t),cO.init(e,t)}),uO=G(`ZodBoolean`,(e,t)=>{bw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hE(e,t,n,r)}),dO=G(`ZodUndefined`,(e,t)=>{xw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_E(e,t,n,r)}),fO=G(`ZodNull`,(e,t)=>{Sw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gE(e,t,n,r)}),pO=G(`ZodUnknown`,(e,t)=>{Cw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yE(e,t,n,r)}),mO=G(`ZodNever`,(e,t)=>{ww.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vE(e,t,n,r)}),hO=G(`ZodArray`,(e,t)=>{Tw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wE(e,t,n,r),e.element=t.element,dD(e,`ZodArray`,{min(e,t){return this.check(RT(e,t))},nonempty(e){return this.check(RT(1,e))},max(e,t){return this.check(LT(e,t))},length(e,t){return this.check(zT(e,t))},unwrap(){return this.element}})}),gO=G(`ZodObject`,(e,t)=>{Dw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TE(e,t,n,r),Ax(e,`shape`,()=>t.shape),dD(e,`ZodObject`,{keyof(){return CD(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:gD()})},loose(){return this.clone({...this._zod.def,catchall:gD()})},strict(){return this.clone({...this._zod.def,catchall:_D()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Ux(this,e)},safeExtend(e){return Wx(this,e)},merge(e){return Gx(this,e)},pick(e){return Vx(this,e)},omit(e){return Hx(this,e)},partial(...e){return Kx(wO,this,e[0])},required(...e){return qx(kO,this,e[0])}})}),_O=G(`ZodUnion`,(e,t)=>{Ow.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EE(e,t,n,r),e.options=t.options}),vO=G(`ZodDiscriminatedUnion`,(e,t)=>{_O.init(e,t),kw.init(e,t)}),yO=G(`ZodIntersection`,(e,t)=>{Aw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DE(e,t,n,r)}),bO=G(`ZodRecord`,(e,t)=>{jw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OE(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),xO=G(`ZodEnum`,(e,t)=>{Mw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bE(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new xO({...t,checks:[],...K(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new xO({...t,checks:[],...K(r),entries:i})}}),SO=G(`ZodLiteral`,(e,t)=>{Nw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xE(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),CO=G(`ZodTransform`,(e,t)=>{Pw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CE(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new xx(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(eS(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(eS(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}}),wO=G(`ZodOptional`,(e,t)=>{Fw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),TO=G(`ZodExactOptional`,(e,t)=>{Iw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),EO=G(`ZodNullable`,(e,t)=>{Lw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),DO=G(`ZodDefault`,(e,t)=>{Rw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),OO=G(`ZodPrefault`,(e,t)=>{zw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ME(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),kO=G(`ZodNonOptional`,(e,t)=>{Bw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),AO=G(`ZodCatch`,(e,t)=>{Vw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),jO=G(`ZodPipe`,(e,t)=>{Hw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PE(e,t,n,r),e.in=t.in,e.out=t.out}),MO=G(`ZodPreprocess`,(e,t)=>{jO.init(e,t),Uw.init(e,t)}),NO=G(`ZodReadonly`,(e,t)=>{Ww.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),PO=G(`ZodCustom`,(e,t)=>{Gw.init(e,t),zD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SE(e,t,n,r)})})),IO=n((()=>{RE()})),LO=n((()=>{RE(),FO(),zE(),ZE(),uD(),IO(),LE(),Zw(),zE(),JE(),FO(),oS()})),RO=n((()=>{LO(),LO()})),zO=n((()=>{RO()}));zO();var BO=`io.modelcontextprotocol/related-task`,VO=PD(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),HO=yD([q(),J().int()]),UO=q();vD({ttl:J().optional(),pollInterval:J().optional()});var WO=X({ttl:J().optional()}),GO=X({taskId:q()}),KO=vD({progressToken:HO.optional(),[BO]:GO.optional()}),qO=X({_meta:KO.optional()}),JO=qO.extend({task:WO.optional()}),YO=e=>JO.safeParse(e).success,XO=X({method:q(),params:qO.loose().optional()}),ZO=X({_meta:KO.optional()}),QO=X({method:q(),params:ZO.loose().optional()}),$O=vD({_meta:KO.optional()}),ek=yD([q(),J().int()]),tk=X({jsonrpc:Z(`2.0`),id:ek,...XO.shape}).strict(),nk=e=>tk.safeParse(e).success,rk=X({jsonrpc:Z(`2.0`),...QO.shape}).strict(),ik=e=>rk.safeParse(e).success,ak=X({jsonrpc:Z(`2.0`),id:ek,result:$O}).strict(),ok=e=>ak.safeParse(e).success,sk;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(sk||={});var ck=X({jsonrpc:Z(`2.0`),id:ek.optional(),error:X({code:J().int(),message:q(),data:gD().optional()})}).strict(),lk=e=>ck.safeParse(e).success;yD([tk,rk,ak,ck]),yD([ak,ck]);var uk=$O.strict(),dk=ZO.extend({requestId:ek.optional(),reason:q().optional()}),fk=QO.extend({method:Z(`notifications/cancelled`),params:dk}),pk=X({icons:Y(X({src:q(),mimeType:q().optional(),sizes:Y(q()).optional(),theme:CD([`light`,`dark`]).optional()})).optional()}),mk=X({name:q(),title:q().optional()}),hk=mk.extend({...mk.shape,...pk.shape,version:q(),websiteUrl:q().optional(),description:q().optional()}),gk=LD(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,xD(X({form:xD(X({applyDefaults:pD().optional()}),SD(q(),gD())).optional(),url:VO.optional()}),SD(q(),gD()).optional())),_k=vD({list:VO.optional(),cancel:VO.optional(),requests:vD({sampling:vD({createMessage:VO.optional()}).optional(),elicitation:vD({create:VO.optional()}).optional()}).optional()}),vk=vD({list:VO.optional(),cancel:VO.optional(),requests:vD({tools:vD({call:VO.optional()}).optional()}).optional()}),yk=X({experimental:SD(q(),VO).optional(),sampling:X({context:VO.optional(),tools:VO.optional()}).optional(),elicitation:gk.optional(),roots:X({listChanged:pD().optional()}).optional(),tasks:_k.optional(),extensions:SD(q(),VO).optional()}),bk=qO.extend({protocolVersion:q(),capabilities:yk,clientInfo:hk}),xk=XO.extend({method:Z(`initialize`),params:bk}),Sk=X({experimental:SD(q(),VO).optional(),logging:VO.optional(),completions:VO.optional(),prompts:X({listChanged:pD().optional()}).optional(),resources:X({subscribe:pD().optional(),listChanged:pD().optional()}).optional(),tools:X({listChanged:pD().optional()}).optional(),tasks:vk.optional(),extensions:SD(q(),VO).optional()}),Ck=$O.extend({protocolVersion:q(),capabilities:Sk,serverInfo:hk,instructions:q().optional()}),wk=QO.extend({method:Z(`notifications/initialized`),params:ZO.optional()}),Tk=XO.extend({method:Z(`ping`),params:qO.optional()}),Ek=X({progress:J(),total:TD(J()),message:TD(q())}),Dk=X({...ZO.shape,...Ek.shape,progressToken:HO}),Ok=QO.extend({method:Z(`notifications/progress`),params:Dk}),kk=qO.extend({cursor:UO.optional()}),Ak=XO.extend({params:kk.optional()}),jk=$O.extend({nextCursor:UO.optional()}),Mk=CD([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Nk=X({taskId:q(),status:Mk,ttl:yD([J(),hD()]),createdAt:q(),lastUpdatedAt:q(),pollInterval:TD(J()),statusMessage:TD(q())}),Pk=$O.extend({task:Nk}),Fk=ZO.merge(Nk),Ik=QO.extend({method:Z(`notifications/tasks/status`),params:Fk}),Lk=XO.extend({method:Z(`tasks/get`),params:qO.extend({taskId:q()})}),Rk=$O.merge(Nk),zk=XO.extend({method:Z(`tasks/result`),params:qO.extend({taskId:q()})});$O.loose();var Bk=Ak.extend({method:Z(`tasks/list`)}),Vk=jk.extend({tasks:Y(Nk)}),Hk=XO.extend({method:Z(`tasks/cancel`),params:qO.extend({taskId:q()})}),Uk=$O.merge(Nk),Wk=X({uri:q(),mimeType:TD(q()),_meta:SD(q(),gD()).optional()}),Gk=Wk.extend({text:q()}),Kk=q().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),qk=Wk.extend({blob:Kk}),Jk=CD([`user`,`assistant`]),Yk=X({audience:Y(Jk).optional(),priority:J().min(0).max(1).optional(),lastModified:BE({offset:!0}).optional()}),Xk=X({...mk.shape,...pk.shape,uri:q(),description:TD(q()),mimeType:TD(q()),size:TD(J()),annotations:Yk.optional(),_meta:TD(vD({}))}),Zk=X({...mk.shape,...pk.shape,uriTemplate:q(),description:TD(q()),mimeType:TD(q()),annotations:Yk.optional(),_meta:TD(vD({}))}),Qk=Ak.extend({method:Z(`resources/list`)}),$k=jk.extend({resources:Y(Xk)}),eA=Ak.extend({method:Z(`resources/templates/list`)}),tA=jk.extend({resourceTemplates:Y(Zk)}),nA=qO.extend({uri:q()}),rA=nA,iA=XO.extend({method:Z(`resources/read`),params:rA}),aA=$O.extend({contents:Y(yD([Gk,qk]))}),oA=QO.extend({method:Z(`notifications/resources/list_changed`),params:ZO.optional()}),sA=nA,cA=XO.extend({method:Z(`resources/subscribe`),params:sA}),lA=nA,uA=XO.extend({method:Z(`resources/unsubscribe`),params:lA}),dA=ZO.extend({uri:q()}),fA=QO.extend({method:Z(`notifications/resources/updated`),params:dA}),pA=X({name:q(),description:TD(q()),required:TD(pD())}),mA=X({...mk.shape,...pk.shape,description:TD(q()),arguments:TD(Y(pA)),_meta:TD(vD({}))}),hA=Ak.extend({method:Z(`prompts/list`)}),gA=jk.extend({prompts:Y(mA)}),_A=qO.extend({name:q(),arguments:SD(q(),q()).optional()}),vA=XO.extend({method:Z(`prompts/get`),params:_A}),yA=X({type:Z(`text`),text:q(),annotations:Yk.optional(),_meta:SD(q(),gD()).optional()}),bA=X({type:Z(`image`),data:Kk,mimeType:q(),annotations:Yk.optional(),_meta:SD(q(),gD()).optional()}),xA=X({type:Z(`audio`),data:Kk,mimeType:q(),annotations:Yk.optional(),_meta:SD(q(),gD()).optional()}),SA=X({type:Z(`tool_use`),name:q(),id:q(),input:SD(q(),gD()),_meta:SD(q(),gD()).optional()}),CA=X({type:Z(`resource`),resource:yD([Gk,qk]),annotations:Yk.optional(),_meta:SD(q(),gD()).optional()}),wA=Xk.extend({type:Z(`resource_link`)}),TA=yD([yA,bA,xA,wA,CA]),EA=X({role:Jk,content:TA}),DA=$O.extend({description:q().optional(),messages:Y(EA)}),OA=QO.extend({method:Z(`notifications/prompts/list_changed`),params:ZO.optional()}),kA=X({title:q().optional(),readOnlyHint:pD().optional(),destructiveHint:pD().optional(),idempotentHint:pD().optional(),openWorldHint:pD().optional()}),AA=X({taskSupport:CD([`required`,`optional`,`forbidden`]).optional()}),jA=X({...mk.shape,...pk.shape,description:q().optional(),inputSchema:X({type:Z(`object`),properties:SD(q(),VO).optional(),required:Y(q()).optional()}).catchall(gD()),outputSchema:X({type:Z(`object`),properties:SD(q(),VO).optional(),required:Y(q()).optional()}).catchall(gD()).optional(),annotations:kA.optional(),execution:AA.optional(),_meta:SD(q(),gD()).optional()}),MA=Ak.extend({method:Z(`tools/list`)}),NA=jk.extend({tools:Y(jA)}),PA=$O.extend({content:Y(TA).default([]),structuredContent:SD(q(),gD()).optional(),isError:pD().optional()});PA.or($O.extend({toolResult:gD()}));var FA=JO.extend({name:q(),arguments:SD(q(),gD()).optional()}),IA=XO.extend({method:Z(`tools/call`),params:FA}),LA=QO.extend({method:Z(`notifications/tools/list_changed`),params:ZO.optional()});X({autoRefresh:pD().default(!0),debounceMs:J().int().nonnegative().default(300)});var RA=CD([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),zA=qO.extend({level:RA}),BA=XO.extend({method:Z(`logging/setLevel`),params:zA}),VA=ZO.extend({level:RA,logger:q().optional(),data:gD()}),HA=QO.extend({method:Z(`notifications/message`),params:VA}),UA=X({hints:Y(X({name:q().optional()})).optional(),costPriority:J().min(0).max(1).optional(),speedPriority:J().min(0).max(1).optional(),intelligencePriority:J().min(0).max(1).optional()}),WA=X({mode:CD([`auto`,`required`,`none`]).optional()}),GA=X({type:Z(`tool_result`),toolUseId:q().describe(`The unique identifier for the corresponding tool call.`),content:Y(TA).default([]),structuredContent:X({}).loose().optional(),isError:pD().optional(),_meta:SD(q(),gD()).optional()}),KA=bD(`type`,[yA,bA,xA]),qA=bD(`type`,[yA,bA,xA,SA,GA]),JA=X({role:Jk,content:yD([qA,Y(qA)]),_meta:SD(q(),gD()).optional()}),YA=JO.extend({messages:Y(JA),modelPreferences:UA.optional(),systemPrompt:q().optional(),includeContext:CD([`none`,`thisServer`,`allServers`]).optional(),temperature:J().optional(),maxTokens:J().int(),stopSequences:Y(q()).optional(),metadata:VO.optional(),tools:Y(jA).optional(),toolChoice:WA.optional()}),XA=XO.extend({method:Z(`sampling/createMessage`),params:YA}),ZA=$O.extend({model:q(),stopReason:TD(CD([`endTurn`,`stopSequence`,`maxTokens`]).or(q())),role:Jk,content:KA}),QA=$O.extend({model:q(),stopReason:TD(CD([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(q())),role:Jk,content:yD([qA,Y(qA)])}),$A=X({type:Z(`boolean`),title:q().optional(),description:q().optional(),default:pD().optional()}),ej=X({type:Z(`string`),title:q().optional(),description:q().optional(),minLength:J().optional(),maxLength:J().optional(),format:CD([`email`,`uri`,`date`,`date-time`]).optional(),default:q().optional()}),tj=X({type:CD([`number`,`integer`]),title:q().optional(),description:q().optional(),minimum:J().optional(),maximum:J().optional(),default:J().optional()}),nj=X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),default:q().optional()}),rj=X({type:Z(`string`),title:q().optional(),description:q().optional(),oneOf:Y(X({const:q(),title:q()})),default:q().optional()}),ij=yD([yD([X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),enumNames:Y(q()).optional(),default:q().optional()}),yD([nj,rj]),yD([X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({type:Z(`string`),enum:Y(q())}),default:Y(q()).optional()}),X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({anyOf:Y(X({const:q(),title:q()}))}),default:Y(q()).optional()})])]),$A,ej,tj]),aj=yD([JO.extend({mode:Z(`form`).optional(),message:q(),requestedSchema:X({type:Z(`object`),properties:SD(q(),ij),required:Y(q()).optional()})}),JO.extend({mode:Z(`url`),message:q(),elicitationId:q(),url:q().url()})]),oj=XO.extend({method:Z(`elicitation/create`),params:aj}),sj=ZO.extend({elicitationId:q()}),cj=QO.extend({method:Z(`notifications/elicitation/complete`),params:sj}),lj=$O.extend({action:CD([`accept`,`decline`,`cancel`]),content:LD(e=>e===null?void 0:e,SD(q(),yD([q(),J(),pD(),Y(q())])).optional())}),uj=X({type:Z(`ref/resource`),uri:q()}),dj=X({type:Z(`ref/prompt`),name:q()}),fj=qO.extend({ref:yD([dj,uj]),argument:X({name:q(),value:q()}),context:X({arguments:SD(q(),q()).optional()}).optional()}),pj=XO.extend({method:Z(`completion/complete`),params:fj}),mj=$O.extend({completion:vD({values:Y(q()).max(100),total:TD(J().int()),hasMore:TD(pD())})}),hj=X({uri:q().startsWith(`file://`),name:q().optional(),_meta:SD(q(),gD()).optional()}),gj=XO.extend({method:Z(`roots/list`),params:qO.optional()}),_j=$O.extend({roots:Y(hj)}),vj=QO.extend({method:Z(`notifications/roots/list_changed`),params:ZO.optional()});yD([Tk,xk,pj,BA,vA,hA,Qk,eA,iA,cA,uA,IA,MA,Lk,zk,Bk,Hk]),yD([fk,Ok,wk,vj,Ik]),yD([uk,ZA,QA,lj,_j,Rk,Vk,Pk]),yD([Tk,XA,oj,gj,Lk,zk,Bk,Hk]),yD([fk,Ok,HA,fA,oA,LA,OA,Ik,cj]),yD([uk,Ck,mj,DA,gA,$k,tA,aA,PA,NA,Rk,Vk,Pk]);var yj=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===sk.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new bj(e.elicitations,n)}return new e(t,n,r)}},bj=class extends yj{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(sk.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};DS();function xj(e){return!!e._zod}function Sj(e,t){return xj(e)?gS(e,t):e.safeParse(t)}function Cj(e){if(!e)return;let t;if(t=xj(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function wj(e){if(xj(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}function Tj(e){return e===`completed`||e===`failed`||e===`cancelled`}function Ej(e){let t=Cj(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=wj(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function Dj(e,t){let n=Sj(e,t);if(!n.success)throw n.error;return n.data}var Oj=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(fk,e=>{this._oncancel(e)}),this.setNotificationHandler(Ok,e=>{this._onprogress(e)}),this.setRequestHandler(Tk,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Lk,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new yj(sk.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(zk,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new yj(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new yj(sk.InvalidParams,`Task not found: ${r}`);if(!Tj(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(Tj(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[BO]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(Bk,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new yj(sk.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Hk,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new yj(sk.InvalidParams,`Task not found: ${e.params.taskId}`);if(Tj(n.status))throw new yj(sk.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new yj(sk.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof yj?e:new yj(sk.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),yj.fromError(sk.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),ok(e)||lk(e)?this._onresponse(e):nk(e)?this._onrequest(e,t):ik(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=yj.fromError(sk.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[BO]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:sk.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=YO(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new yj(sk.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:sk.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),ok(e)?n(e):n(new yj(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(ok(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),ok(e)?r(e):r(yj.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof yj?e:new yj(sk.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Pk,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new yj(sk.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},Tj(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new yj(sk.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new yj(sk.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof yj?e:new yj(sk.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[BO]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof yj?e:new yj(sk.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=Sj(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(yj.fromError(sk.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Rk,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},Vk,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Uk,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[BO]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[BO]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[BO]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=Ej(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=Dj(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=Ej(e);this._notificationHandlers.set(n,n=>{let r=Dj(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&nk(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new yj(sk.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new yj(sk.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new yj(sk.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new yj(sk.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Ik.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),Tj(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new yj(sk.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(Tj(a.status))throw new yj(sk.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Ik.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),Tj(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};zO(),(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var kj=class extends Oj{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},Aj=`2026-01-26`,jj=yD([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),Mj=yD([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),Nj=SD(yD([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
121
122
 
122
123
  Individual style keys are optional - hosts may provide any subset of these values.
123
124
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
124
125
 
125
126
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
126
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),uE([K(),aE()]).describe(`Style variables for theming MCP apps.
127
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),yD([q(),mD()]).describe(`Style variables for theming MCP apps.
127
128
 
128
129
  Individual style keys are optional - hosts may provide any subset of these values.
129
130
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -135,18 +136,18 @@ Individual style keys are optional - hosts may provide any subset of these value
135
136
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
136
137
 
137
138
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
138
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),TA=Y({method:X(`ui/open-link`),params:Y({url:K().describe(`URL to open in the host's browser`)})});Y({isError:iE().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),Y({isError:iE().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),Y({isError:iE().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();var EA=Y({method:X(`ui/notifications/sandbox-proxy-ready`),params:Y({})}),DA=Y({connectDomains:J(K()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
139
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Pj=X({method:Z(`ui/open-link`),params:X({url:q().describe(`URL to open in the host's browser`)})});X({isError:pD().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),X({isError:pD().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),X({isError:pD().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();var Fj=X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})}),Ij=X({connectDomains:Y(q()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
139
140
 
140
141
  - Maps to CSP \`connect-src\` directive
141
- - Empty or omitted → no network connections (secure default)`),resourceDomains:J(K()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:J(K()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:J(K()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),OA=Y({camera:Y({}).optional().describe(`Request camera access.
142
+ - Empty or omitted → no network connections (secure default)`),resourceDomains:Y(q()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y(q()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y(q()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Lj=X({camera:X({}).optional().describe(`Request camera access.
142
143
 
143
- Maps to Permission Policy \`camera\` feature.`),microphone:Y({}).optional().describe(`Request microphone access.
144
+ Maps to Permission Policy \`camera\` feature.`),microphone:X({}).optional().describe(`Request microphone access.
144
145
 
145
- Maps to Permission Policy \`microphone\` feature.`),geolocation:Y({}).optional().describe(`Request geolocation access.
146
+ Maps to Permission Policy \`microphone\` feature.`),geolocation:X({}).optional().describe(`Request geolocation access.
146
147
 
147
- Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:Y({}).optional().describe(`Request clipboard write access.
148
+ Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:X({}).optional().describe(`Request clipboard write access.
148
149
 
149
- Maps to Permission Policy \`clipboard-write\` feature.`)}),kA=Y({method:X(`ui/notifications/size-changed`),params:Y({width:q().optional().describe(`New width in pixels.`),height:q().optional().describe(`New height in pixels.`)})});Y({method:X(`ui/notifications/tool-input`),params:Y({arguments:pE(K(),sE().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Y({method:X(`ui/notifications/tool-input-partial`),params:Y({arguments:pE(K(),sE().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Y({method:X(`ui/notifications/tool-cancelled`),params:Y({reason:K().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})});var AA=Y({fonts:K().optional()}),jA=Y({variables:wA.optional().describe(`CSS variables for theming the app.`),css:AA.optional().describe(`CSS blocks that apps can inject.`)});Y({method:X(`ui/resource-teardown`),params:Y({})});var MA=pE(K(),sE()),NA=Y({text:Y({}).optional().describe(`Host supports text content blocks.`),image:Y({}).optional().describe(`Host supports image content blocks.`),audio:Y({}).optional().describe(`Host supports audio content blocks.`),resource:Y({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Y({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Y({}).optional().describe(`Host supports structured content.`)}),PA=Y({method:X(`ui/notifications/request-teardown`),params:Y({}).optional()}),FA=Y({experimental:Y({}).optional().describe(`Experimental features (structure TBD).`),openLinks:Y({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Y({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Y({listChanged:iE().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Y({listChanged:iE().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Y({}).optional().describe(`Host accepts log messages.`),sandbox:Y({permissions:OA.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:DA.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:NA.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:NA.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Y({tools:Y({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),IA=Y({experimental:Y({}).optional().describe(`Experimental features (structure TBD).`),tools:Y({listChanged:iE().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:J(CA).optional().describe(`Display modes the app supports.`)}),LA=Y({method:X(`ui/notifications/initialized`),params:Y({}).optional()});Y({csp:DA.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:OA.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:K().optional().describe(`Dedicated origin for view sandbox.
150
+ Maps to Permission Policy \`clipboard-write\` feature.`)}),Rj=X({method:Z(`ui/notifications/size-changed`),params:X({width:J().optional().describe(`New width in pixels.`),height:J().optional().describe(`New height in pixels.`)})});X({method:Z(`ui/notifications/tool-input`),params:X({arguments:SD(q(),gD().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),X({method:Z(`ui/notifications/tool-input-partial`),params:X({arguments:SD(q(),gD().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),X({method:Z(`ui/notifications/tool-cancelled`),params:X({reason:q().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})});var zj=X({fonts:q().optional()}),Bj=X({variables:Nj.optional().describe(`CSS variables for theming the app.`),css:zj.optional().describe(`CSS blocks that apps can inject.`)});X({method:Z(`ui/resource-teardown`),params:X({})});var Vj=SD(q(),gD()),Hj=X({text:X({}).optional().describe(`Host supports text content blocks.`),image:X({}).optional().describe(`Host supports image content blocks.`),audio:X({}).optional().describe(`Host supports audio content blocks.`),resource:X({}).optional().describe(`Host supports resource content blocks.`),resourceLink:X({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:X({}).optional().describe(`Host supports structured content.`)}),Uj=X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()}),Wj=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),openLinks:X({}).optional().describe(`Host supports opening external URLs.`),downloadFile:X({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:X({listChanged:pD().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:pD().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:X({}).optional().describe(`Host accepts log messages.`),sandbox:X({permissions:Lj.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:Ij.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Hj.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Hj.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:X({tools:X({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Gj=X({experimental:X({}).optional().describe(`Experimental features (structure TBD).`),tools:X({listChanged:pD().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(Mj).optional().describe(`Display modes the app supports.`)}),Kj=X({method:Z(`ui/notifications/initialized`),params:X({}).optional()});X({csp:Ij.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:Lj.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:q().optional().describe(`Dedicated origin for view sandbox.
150
151
 
151
152
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
152
153
 
@@ -154,16 +155,16 @@ Useful when views need stable, dedicated origins for OAuth callbacks, CORS polic
154
155
  - Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
155
156
  - URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
156
157
 
157
- If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:iE().optional().describe(`Visual boundary preference - true if view prefers a visible border.
158
+ If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:pD().optional().describe(`Visual boundary preference - true if view prefers a visible border.
158
159
 
159
160
  Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
160
161
 
161
162
  - \`true\`: request visible border + background
162
163
  - \`false\`: request no visible border + background
163
- - omitted: host decides border`)});var RA=Y({method:X(`ui/request-display-mode`),params:Y({mode:CA.describe(`The display mode being requested.`)})});Y({mode:CA.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var zA=uE([X(`model`),X(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Y({resourceUri:K().optional(),visibility:J(zA).optional().describe(`Who can access this tool. Default: ["model", "app"]
164
+ - omitted: host decides border`)});var qj=X({method:Z(`ui/request-display-mode`),params:X({mode:Mj.describe(`The display mode being requested.`)})});X({mode:Mj.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var Jj=yD([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:q().optional(),visibility:Y(Jj).optional().describe(`Who can access this tool. Default: ["model", "app"]
164
165
  - "model": Tool visible to and callable by the agent
165
- - "app": Tool callable by the app from this server only`),csp:cE().optional(),permissions:cE().optional()}),Y({mimeTypes:J(K()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var BA=Y({method:X(`ui/download-file`),params:Y({contents:J(uE([mk,hk])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),VA=Y({method:X(`ui/message`),params:Y({role:X(`user`).describe(`Message role, currently only "user" is supported.`),content:J(gk).describe(`Message content blocks (text, image, etc.).`)})});Y({method:X(`ui/notifications/sandbox-resource-ready`),params:Y({html:K().describe(`HTML content to load into the inner iframe.`),sandbox:K().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:DA.optional().describe(`CSP configuration from resource metadata.`),permissions:OA.optional().describe(`Sandbox permissions from resource metadata.`)})}),Y({method:X(`ui/notifications/tool-result`),params:Tk.describe(`Standard MCP tool execution result.`)});var HA=Y({toolInfo:Y({id:GD.optional().describe(`JSON-RPC id of the tools/call request.`),tool:Sk.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:SA.optional().describe(`Current color theme preference.`),styles:jA.optional().describe(`Style configuration for theming the app.`),displayMode:CA.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:J(CA).optional().describe(`Display modes the host supports.`),containerDimensions:uE([Y({height:q().describe(`Fixed container height in pixels.`)}),Y({maxHeight:uE([q(),aE()]).optional().describe(`Maximum container height in pixels.`)})]).and(uE([Y({width:q().describe(`Fixed container width in pixels.`)}),Y({maxWidth:uE([q(),aE()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
166
- container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:K().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:K().optional().describe(`User's timezone in IANA format.`),userAgent:K().optional().describe(`Host application identifier.`),platform:uE([X(`web`),X(`desktop`),X(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Y({touch:iE().optional().describe(`Whether the device supports touch input.`),hover:iE().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Y({top:q().describe(`Top safe area inset in pixels.`),right:q().describe(`Right safe area inset in pixels.`),bottom:q().describe(`Bottom safe area inset in pixels.`),left:q().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();Y({method:X(`ui/notifications/host-context-changed`),params:HA.describe(`Partial context update containing only changed fields.`)});var UA=Y({method:X(`ui/update-model-context`),params:Y({content:J(gk).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:pE(K(),sE().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),WA=Y({method:X(`ui/initialize`),params:Y({appInfo:oO.describe(`App identification (name and version).`),appCapabilities:IA.describe(`Features and capabilities this app provides.`),protocolVersion:K().describe(`Protocol version this app supports.`)})});Y({protocolVersion:K().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:oO.describe(`Host application identification and version.`),hostCapabilities:FA.describe(`Features and capabilities provided by the host.`),hostContext:HA.describe(`Rich context about the host environment.`)}).passthrough();var GA=[xA],KA=class extends bA{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,t)=>{this._baseReplaceRequestHandler(e,(e,n)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${e.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),t(e,n)))};eventSchemas={sizechange:kA,sandboxready:EA,initialized:LA,requestteardown:PA,loggingmessage:Nk};constructor(e,t,n,r){super(r),this._client=e,this._hostInfo=t,this._capabilities=n,this.addEventListener(`initialized`,()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler(WA,e=>this._oninitialize(e)),this.setRequestHandler(gO,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(RA,e=>({mode:this._hostContext.displayMode??`inline`}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(`sizechange`)}set onsizechange(e){this.setEventHandler(`sizechange`,e)}get onsandboxready(){return this.getEventHandler(`sandboxready`)}set onsandboxready(e){this.setEventHandler(`sandboxready`,e)}get oninitialized(){return this.getEventHandler(`initialized`)}set oninitialized(e){this.setEventHandler(`initialized`,e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced(`onmessage`,this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(VA,async(e,t)=>{if(!this._onmessage)throw Error(`No onmessage handler set`);return this._onmessage(e.params,t)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced(`onopenlink`,this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(TA,async(e,t)=>{if(!this._onopenlink)throw Error(`No onopenlink handler set`);return this._onopenlink(e.params,t)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced(`ondownloadfile`,this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(BA,async(e,t)=>{if(!this._ondownloadfile)throw Error(`No ondownloadfile handler set`);return this._ondownloadfile(e.params,t)})}get onrequestteardown(){return this.getEventHandler(`requestteardown`)}set onrequestteardown(e){this.setEventHandler(`requestteardown`,e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced(`onrequestdisplaymode`,this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(RA,async(e,t)=>{if(!this._onrequestdisplaymode)throw Error(`No onrequestdisplaymode handler set`);return this._onrequestdisplaymode(e.params,t)})}get onloggingmessage(){return this.getEventHandler(`loggingmessage`)}set onloggingmessage(e){this.setEventHandler(`loggingmessage`,e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced(`onupdatemodelcontext`,this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(UA,async(e,t)=>{if(!this._onupdatemodelcontext)throw Error(`No onupdatemodelcontext handler set`);return this._onupdatemodelcontext(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Dk,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(Vk,async(t,n)=>e(t.params,n))}sendToolListChanged(e={}){return this.notification({method:`notifications/tools/list_changed`,params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced(`onlistresources`,this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(UO,async(e,t)=>{if(!this._onlistresources)throw Error(`No onlistresources handler set`);return this._onlistresources(e.params,t)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced(`onlistresourcetemplates`,this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(GO,async(e,t)=>{if(!this._onlistresourcetemplates)throw Error(`No onlistresourcetemplates handler set`);return this._onlistresourcetemplates(e.params,t)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced(`onreadresource`,this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(YO,async(e,t)=>{if(!this._onreadresource)throw Error(`No onreadresource handler set`);return this._onreadresource(e.params,t)})}sendResourceListChanged(e={}){return this.notification({method:`notifications/resources/list_changed`,params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced(`onlistprompts`,this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(ok,async(e,t)=>{if(!this._onlistprompts)throw Error(`No onlistprompts handler set`);return this._onlistprompts(e.params,t)})}sendPromptListChanged(e={}){return this.notification({method:`notifications/prompts/list_changed`,params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}getCapabilities(){return this._capabilities}async _oninitialize(e){let t=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn(`[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.`),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:GA.includes(t)?t:xA,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},n=!1;for(let r of Object.keys(e)){let i=this._hostContext[r],a=e[r];qA(i,a)||(t[r]=a,n=!0)}n&&(this._hostContext=e,this.sendHostContextChange(t))}sendHostContextChange(e){return this.notification({method:`ui/notifications/host-context-changed`,params:e})}sendToolInput(e){return this.notification({method:`ui/notifications/tool-input`,params:e})}sendToolInputPartial(e){return this.notification({method:`ui/notifications/tool-input-partial`,params:e})}sendToolResult(e){return this.notification({method:`ui/notifications/tool-result`,params:e})}sendToolCancelled(e){return this.notification({method:`ui/notifications/tool-cancelled`,params:e})}sendSandboxResourceReady(e){return this.notification({method:`ui/notifications/sandbox-resource-ready`,params:e})}teardownResource(e,t){return this.request({method:`ui/resource-teardown`,params:e},MA,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},Tk,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},wk,t)}async connect(e){if(this.transport)throw Error(`AppBridge is already connected. Call close() before connecting again.`);if(this._initializedReceived=!1,this._client){let e=this._client.getServerCapabilities();if(!e)throw Error(`Client server capabilities not available`);e.tools&&(this.oncalltool=async(e,t)=>this._client.request({method:`tools/call`,params:e},Tk,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(Ok,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},WO,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},KO,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},XO,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(ZO,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},sk,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(yk,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function qA(e,t){return JSON.stringify(e)===JSON.stringify(t)}function JA(){let e=N(ym);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}var YA={committedClass:null,pendingClass:null,pendingSinceMs:null,lastResolution:null},XA={composition:{stackedMaxAspect:1},classes:{widthCompactMaxPx:767,widthMediumMaxPx:1023,heightShortMaxPx:479},hysteresis:{windowMs:250,decisiveJumpPxDelta:200},rail:{widthPx:448,insetPx:16,gutterPx:24},sidecar:{minViewportWidthPx:900,maxVideoShiftPx:360,maxVideoShiftFraction:.3},card:{maxHeightPx:720,reportedHeightFloorPx:48,coldDefaultHeightPx:320,minDisplayScale:.85,layoutDefaultMinHeightPx:240,stackBandMaxFraction:.6,stackMaxWidthPx:600,componentOverrides:{}},content:{stackedAspect:16/9},pip:{gapPaddingPx:24,minWidthPx:128,maxAreaRatio:.35},motion:{layoutTransitionMs:560},insets:{callControlsBottomPx:72,participantsPadPx:16,cardsPadPx:16,surfacePadPx:16,compactCardsPadPx:8,compactSurfacePadPx:8},eviction:{policy:`evict-oldest`,maxVisibleCards:2,compactTakeoverMaxCards:1},degradationLadder:[`evict-cards`,`drop-self-view`,`collapse-replica`]};function ZA(e,t){let n=Math.round(e.widthPx),r=Math.round(e.heightPx);return{width:n<=t.classes.widthCompactMaxPx?`compact`:n<=t.classes.widthMediumMaxPx?`medium`:`expanded`,height:r<=t.classes.heightShortMaxPx?`short`:`regular`,composition:n<=r*t.composition.stackedMaxAspect?`stacked`:`side-by-side`}}var QA={idle:{id:`idle`,regions:[]},"conversation-full":{id:`conversation-full`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.72},width:{fraction:.24},height:{fraction:.24},accepts:[`selfView`],zBase:100}]},"canvas-rail":{id:`canvas-rail`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{px:0},y:{px:0},width:{fraction:.62},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.38},y:{fraction:.72},width:{fraction:.2},height:{fraction:.24},accepts:[`selfView`],zBase:100}]},"canvas-stack":{id:`canvas-stack`,soloVariant:`canvas-solo`,regions:[{name:`canvasBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:0},{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.38},width:{fraction:.24},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"canvas-kiosk-overlay":{id:`canvas-kiosk-overlay`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`cardSheet`,x:{fraction:0},y:{fraction:.6},width:{fraction:1},height:{fraction:.4},accepts:[`card`],zBase:100,sheetAnchor:`bottom`},{name:`pip`,x:{fraction:.72},y:{fraction:.72},width:{fraction:.24},height:{fraction:.24},accepts:[`selfView`],zBase:110}]},"canvas-sheet":{id:`canvas-sheet`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.55},accepts:[`replica`],zBase:0},{name:`canvasSheet`,x:{fraction:0},y:{fraction:.55},width:{fraction:1},height:{fraction:.45},accepts:[`card`],zBase:10},{name:`pip`,x:{fraction:.66},y:{fraction:.33},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-columns":{id:`content-columns`,soloVariant:`content-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.25},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:.25},y:{fraction:0},width:{fraction:.75},height:{fraction:1},accepts:[`content`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.76},width:{fraction:.2},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"content-stack":{id:`content-stack`,soloVariant:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`content`],zBase:0},{name:`replicaBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.74},width:{fraction:.24},height:{fraction:.22},accepts:[`selfView`],zBase:100}]},"content-stack-compact":{id:`content-stack-compact`,soloVariant:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.58},accepts:[`content`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.58},width:{fraction:1},height:{fraction:.42},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.78},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-sheet-compact":{id:`content-sheet-compact`,soloVariant:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.58},accepts:[`content`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.58},width:{fraction:1},height:{fraction:.42},accepts:[`replica`],zBase:0},{name:`cardSheet`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`card`],zBase:100},{name:`pip`,x:{fraction:.66},y:{fraction:.78},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:110}]},"content-rail":{id:`content-rail`,soloVariant:`content-rail-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.22},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:.22},y:{fraction:0},width:{fraction:.48},height:{fraction:1},accepts:[`content`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-stack-canvas":{id:`content-stack-canvas`,soloVariant:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.5},accepts:[`content`],zBase:0},{name:`replicaBand`,x:{fraction:0},y:{fraction:.5},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`canvasBand`,x:{fraction:0},y:{fraction:.72},width:{fraction:1},height:{fraction:.28},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.52},width:{fraction:.24},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-columns":{id:`canvas-takeover-columns`,soloVariant:`canvas-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.24},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`canvasStage`,x:{fraction:.24},y:{fraction:0},width:{fraction:.76},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-strip":{id:`canvas-takeover-strip`,soloVariant:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:.22},width:{fraction:1},height:{fraction:.78},accepts:[`card`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.04},width:{fraction:.3},height:{fraction:.16},accepts:[`selfView`],zBase:100}]},"canvas-solo":{id:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`card`],zBase:0}]},"content-solo":{id:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`content`],zBase:0}]},"content-rail-solo":{id:`content-rail-solo`,regions:[{name:`contentStage`,x:{px:0},y:{px:0},width:{fraction:1},height:{fraction:1},accepts:[`content`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0}]},"content-sheet-solo":{id:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`content`],zBase:0},{name:`canvasBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:10}]}},$A={idle:{compact:{short:`idle`,regular:`idle`},medium:{short:`idle`,regular:`idle`},expanded:{short:`idle`,regular:`idle`}},conversation:{compact:{short:`conversation-full`,regular:`conversation-full`},medium:{short:`conversation-full`,regular:`conversation-full`},expanded:{short:`conversation-full`,regular:`conversation-full`}},"conversation-canvas":{compact:{short:`canvas-sheet`,regular:`canvas-sheet`},medium:{short:`canvas-rail`,regular:`canvas-stack`},expanded:{short:`canvas-rail`,regular:`canvas-rail`}},"content-focus":{compact:{short:`content-stack-compact`,regular:`content-stack-compact`},medium:{short:`content-columns`,regular:`content-stack`},expanded:{short:`content-columns`,regular:`content-columns`}},"content-plus-canvas":{compact:{short:`content-sheet-compact`,regular:`content-sheet-compact`},medium:{short:`content-rail`,regular:`content-stack-canvas`},expanded:{short:`content-rail`,regular:`content-rail`}},"canvas-dominant":{compact:{short:`canvas-takeover-strip`,regular:`canvas-takeover-strip`},medium:{short:`canvas-takeover-columns`,regular:`canvas-takeover-columns`},expanded:{short:`canvas-takeover-columns`,regular:`canvas-takeover-columns`}}},ej={idle:{compact:{stacked:`idle`,"side-by-side":`idle`},medium:{stacked:`idle`,"side-by-side":`idle`},expanded:{stacked:`idle`,"side-by-side":`idle`}},conversation:{compact:{stacked:`conversation-full`,"side-by-side":`conversation-full`},medium:{stacked:`conversation-full`,"side-by-side":`conversation-full`},expanded:{stacked:`conversation-full`,"side-by-side":`conversation-full`}},"conversation-canvas":{compact:{stacked:`canvas-sheet`,"side-by-side":`canvas-sheet`},medium:{stacked:`canvas-stack`,"side-by-side":`canvas-rail`},expanded:{stacked:`canvas-stack`,"side-by-side":`canvas-rail`}},"content-focus":{compact:{stacked:`content-stack-compact`,"side-by-side":`content-stack-compact`},medium:{stacked:`content-stack`,"side-by-side":`content-columns`},expanded:{stacked:`content-stack`,"side-by-side":`content-columns`}},"content-plus-canvas":{compact:{stacked:`content-sheet-compact`,"side-by-side":`content-sheet-compact`},medium:{stacked:`content-stack-canvas`,"side-by-side":`content-rail`},expanded:{stacked:`content-stack-canvas`,"side-by-side":`content-rail`}},"canvas-dominant":{compact:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-strip`},medium:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns`},expanded:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns`}}};function tj(e,t,n=QA,r=$A,i=!0,a=!1){let o=a&&r===$A&&e===`conversation-canvas`&&t.composition===`stacked`&&t.width!==`compact`?`canvas-kiosk-overlay`:t.composition!==void 0&&r===$A?ej[e][t.width][t.composition]:r[e][t.width][t.height],s=n[o];if(!s)throw Error(`Template matrix references missing template id: ${o}`);if(!i&&s.soloVariant!==void 0){let e=n[s.soloVariant];if(!e)throw Error(`soloVariant references missing template id: ${s.soloVariant}`);return e}return s}function nj(e,t,n){let r=[],{prefs:i}=e,a=e.userShare?`userShare`:e.presentation?`presentation`:null,o=e.cards.length>0,s=t.width===`compact`;return i.pipCorner!==void 0&&s&&r.push(`pipCorner`),a===null?(i.expandCanvas&&!o&&r.push(`expandCanvas`),o&&(i.expandCanvas||s)?{state:`canvas-dominant`,suppressedPrefs:r,contentKind:null}:o?{state:`conversation-canvas`,suppressedPrefs:r,contentKind:null}:e.replica||e.selfView?{state:`conversation`,suppressedPrefs:r,contentKind:null}:{state:`idle`,suppressedPrefs:r,contentKind:null}):(i.expandCanvas&&r.push(`expandCanvas`),{state:o?`content-plus-canvas`:`content-focus`,suppressedPrefs:r,contentKind:a})}var rj={alert:{minWidthPx:220,sizeClass:()=>`S`,estimateHeightPx:e=>e.charCount===void 0?120:Math.min(400,Math.round(90+e.charCount*.26))},input:{minWidthPx:220,sizeClass:()=>`S`,estimateHeightPx:()=>182},question:{minWidthPx:240,sizeClass:e=>{let t=e.optionCount??4;return t<=2?`S`:t>=10?`L`:`M`},estimateHeightPx:e=>{let t=e.optionCount??4;return 72+t*48+(t-1)*8+64}},text:{minWidthPx:220,sizeClass:e=>(e.charCount??400)>1500?`L`:`M`,estimateHeightPx:e=>{let t=e.charCount??400,n=Math.max(1,e.widthPx/8);return Math.max(100,Math.round(t/n*22+40))}},chart:{minWidthPx:260,sizeClass:()=>`M`,estimateHeightPx:e=>Math.round(e.widthPx*(260/480))+90},calendar:{minWidthPx:320,sizeClass:e=>e.slotCount===void 0?`M`:`L`,estimateHeightPx:e=>e.slotCount===void 0?470:64+e.slotCount*48},image:{minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>Math.round((Math.min(e.widthPx,520)-36)*(9/16))+95+((e.imageCount??1)>1?44:0)},scheduling_embed:{minWidthPx:320,hardMinHeightPx:640,sizeClass:()=>`L`,estimateHeightPx:()=>640}},ij={minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>e.coldDefaultHeightPx??320},aj=`canvas.`;function oj(e){return e.startsWith(aj)?e.slice(7):e}function sj(e,t){let n=oj(e),r=rj[n]??ij,i=t?.[n]??t?.[e];return i===void 0?r:{...r,minWidthPx:i.minWidthPx??r.minWidthPx,...i.hardMinHeightPx===void 0?r.hardMinHeightPx===void 0?{}:{hardMinHeightPx:r.hardMinHeightPx}:{hardMinHeightPx:i.hardMinHeightPx}}}Object.keys(rj);function cj(e,t,n){let r=sj(e,n),i=(t.naturalHeightPx!==void 0&&Number.isFinite(t.naturalHeightPx)?t.naturalHeightPx:void 0)??r.estimateHeightPx(t),a=r.hardMinHeightPx===void 0?i:Math.max(r.hardMinHeightPx,i);return{sizeClass:r.sizeClass(t),minWidthPx:r.minWidthPx,naturalHeightPx:Math.round(a),hardMinHeightPx:r.hardMinHeightPx}}function lj(e,t){let n=oj(e);return rj[n]===void 0?(t?.[n]??t?.[e])?.hardMinHeightPx:sj(e,t).hardMinHeightPx}function uj(e,t){return sj(e,t).minWidthPx}function dj(e,t){let n=Number.isFinite(e)?e:t.card.coldDefaultHeightPx;return Math.min(t.card.maxHeightPx,Math.max(t.card.reportedHeightFloorPx,Math.round(n)))}function fj(e,t,n){if(t>=e)return{kind:`natural`};if(t<=0||e<=0)return{kind:`scroll`};let r=t/e;return r>=n.card.minDisplayScale?{kind:`scaled`,factor:r}:{kind:`scroll`}}function pj(e,t){return e.width>0&&e.height>0&&t.width>0&&t.height>0&&e.x<t.x+t.width&&t.x<e.x+e.width&&e.y<t.y+t.height&&t.y<e.y+e.height}function mj(e,t){return t.x>=e.x&&t.y>=e.y&&t.x+t.width<=e.x+e.width&&t.y+t.height<=e.y+e.height}function hj(e,t,n){let r=[],i=e.find(e=>e.kind===`replica`),a=e=>e.kind===`selfView`&&e.layer===`overlay`&&i!==void 0&&mj(i.rect,e.rect),o=e=>e.kind===`card`&&e.layer===`overlay`&&e.sheet===!0;for(let a of e){let e=a.rect;if(Number.isInteger(e.x)&&Number.isInteger(e.y)&&Number.isInteger(e.width)&&Number.isInteger(e.height)||r.push({kind:`bounds`,tileId:a.id,message:`${a.id} has non-integer coordinates`}),(e.x<0||e.y<0||e.width<0||e.height<0||e.x+e.width>t.width||e.y+e.height>t.height)&&r.push({kind:`bounds`,tileId:a.id,message:`${a.id} rect exceeds the container`}),a.layer===`overlay`&&a.kind!==`selfView`&&!o(a)&&r.push({kind:`overlay-legality`,tileId:a.id,message:`only selfView or a sheet card may ride the overlay layer, got ${a.kind}`}),a.kind===`selfView`&&a.layer===`overlay`&&i!==void 0&&!mj(i.rect,a.rect)&&r.push({kind:`overlay-legality`,tileId:a.id,message:`selfView escapes the replica rect`}),(a.kind===`content`||a.kind===`replica`)&&(e.width<48||e.height<48)&&r.push({kind:`degenerate-surface`,tileId:a.id,message:`${a.kind} tile ${a.id} is ${e.width}x${e.height}px, below the 48px visible floor`}),a.kind===`card`){a.fit.kind===`scaled`&&(a.fit.factor<n.card.minDisplayScale||a.fit.factor>1)&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} scaled to ${a.fit.factor}, outside [${n.card.minDisplayScale}, 1]`}),e.height<n.card.reportedHeightFloorPx&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.height}px is below the ${n.card.reportedHeightFloorPx}px report floor`});let t=a.component===void 0?void 0:lj(a.component,n.card.componentOverrides);t!==void 0&&e.height<t&&a.fit.kind!==`scroll`&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.height}px is below its ${t}px hard min without scroll`});let i=a.component===void 0?void 0:uj(a.component,n.card.componentOverrides);i!==void 0&&e.width<i&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.width}px is below its ${i}px min width`})}}for(let t of e)if(t.kind===`content`||t.kind===`card`)for(let n of e)n.id!==t.id&&pj(t.rect,n.rect)&&(!a(n)||o(t))&&(!o(n)||o(t))&&(o(t)&&n.layer===`grid`||r.push({kind:`never-covered`,tileId:t.id,otherTileId:n.id,message:`${n.id} covers ${t.kind} tile ${t.id}`}));return r}var gj=(e,t,n)=>Math.min(n,Math.max(t,e));function _j(e,t){let n=t===`compact`;return{surfacePad:Math.round(n?e.insets.compactSurfacePadPx:e.insets.surfacePadPx),cardsPad:Math.round(n?e.insets.compactCardsPadPx:e.insets.cardsPadPx)}}function vj(e,t,n){return e===`canvas-dominant`&&t.width===`compact`?n.eviction.compactTakeoverMaxCards:n.eviction.maxVisibleCards}function yj(e,t,n){let r=[...e].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),i=Math.floor(t);return r.length<=i?r:n===`evict-newest`?r.slice(0,i):r.slice(r.length-i)}function bj(e,t,n,r,i,a){let o=i??_j(n,r).cardsPad,s=Math.round(a??n.rail.widthPx),c=Math.max(1,Math.min(t-2*o,s-2*o));return{innerW:c,entries:e.map(e=>{let t=cj(e.component,{...e.contentOpts,naturalHeightPx:e.naturalHeightPx,widthPx:c,coldDefaultHeightPx:n.card.coldDefaultHeightPx},n.card.componentOverrides);return{card:e,constraints:t,clampedHeightPx:dj(t.naturalHeightPx,n)}})}}function xj(e,t){return`fraction`in e?e.fraction*t:e.px>=0?e.px:t+e.px}function Sj(e,t,n,r){return e.name!==`rail`||`fraction`in t?t:r===`width`?{px:n.rail.widthPx}:{px:t.px<0?-n.rail.widthPx:t.px}}function Cj(e,t,n,r,i,a){let o=n===`x`?t.width:t.height,s=[...e].sort((e,t)=>xj(n===`x`?e.x:e.y,o)-xj(n===`x`?t.x:t.y,o)),c=s.map(e=>n===`x`?Sj(e,e.width,r,`width`):e.height),l=0,u=0;for(let e of c)`px`in e?l+=e.px:u+=e.fraction;let d=Math.max(0,o-l),f=c.map(e=>`px`in e?e.px:u>0?e.fraction/u*d:0);if(n===`y`&&i!==void 0){let e=s.findIndex((e,t)=>e.accepts.includes(`card`)&&`fraction`in(c[t]??e.height));if(e!==-1){let t=f[e]??0,n=i.shrinkToContent?Math.min(i.neededPx,Math.max(t,i.capPx)):gj(i.neededPx,t,Math.max(t,i.capPx)),r=0,a=0;c.forEach((t,n)=>{n!==e&&(`px`in t?r+=t.px:a+=f[n]??0)});let s=Math.max(0,o-r-n);f=f.map((t,r)=>{if(r===e)return n;let i=c[r];return i!==void 0&&`px`in i?t:a>0?t/a*s:0})}}if(n===`y`&&a!==void 0){let e=s.findIndex((e,t)=>e.accepts.includes(`content`)&&`fraction`in(c[t]??e.height)),t=s.findIndex((e,t)=>e.accepts.includes(`replica`)&&`fraction`in(c[t]??e.height));if(e!==-1&&t!==-1){let n=(f[e]??0)-a.maxPx;n>0&&(f[e]=a.maxPx,f[t]=(f[t]??0)+n)}}let p=s.map(e=>e.accepts.includes(`content`)||e.accepts.includes(`replica`)?48:0),m=p.reduce((e,t)=>e+t,0),h=m>o?o/m:1,g=f.map((e,t)=>Math.max(e,(p[t]??0)*h));if(g.reduce((e,t)=>e+t,0)>o){let e=g.map((e,t)=>e-(p[t]??0)*h),t=e.reduce((e,t)=>e+t,0),n=Math.max(0,o-m*h),r=t>0?n/t:0;f=g.map((t,n)=>(p[n]??0)*h+(e[n]??0)*r)}else f=g;let _=[0],v=0;for(let e of f)v+=e,_.push(gj(Math.round(v),0,o));return s.map((e,r)=>{let i=_[r]??0,a=_[r+1]??i;return{region:e,rect:n===`x`?{x:i,y:0,width:a-i,height:t.height}:{x:0,y:i,width:t.width,height:a-i}}})}function wj(e,t,n){let r=t.width,i=t.height,a=Sj(e,e.width,n,`width`),o=Sj(e,e.x,n,`x`),s=gj(Math.round(xj(o,r)),0,r),c=gj(Math.round(xj(e.y,i)),0,i);return{x:s,y:c,width:gj(Math.round(`fraction`in a?a.fraction*r:a.px),0,r-s),height:gj(Math.round(`fraction`in e.height?e.height.fraction*i:e.height.px),0,i-c)}}function Tj(e,t,n,r,i){let a=e.regions.filter(e=>e.zBase<100),o=e=>`fraction`in e&&e.fraction===1;return a.length>1&&a.every(e=>o(e.height))?Cj(a,t,`x`,n):a.length>1&&a.every(e=>o(e.width))?Cj(a,t,`y`,n,r,i):a.map(e=>({region:e,rect:wj(e,t,n)}))}function Ej(e,t,n,r,i,a,o,s,c,l,u){if(n!==null)return;let d=e.regions.filter(e=>e.zBase<100);if(!(d.length>1&&d.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let f=d.find(e=>e.accepts.includes(`card`)&&`fraction`in e.height);if(f===void 0||r.cards.length===0)return;let{innerW:p,entries:m}=bj(yj(r.cards,u,c.eviction.policy),i.width,c,l,void 0,c.card.stackMaxWidthPx),h=m.reduce((e,t)=>t.constraints.minWidthPx>p?e:Math.max(e,t.clampedHeightPx),0),{cardsPad:g}=_j(c,l),_=xj(f.y,i.height),v=d.every(e=>xj(e.y,i.height)<=_)?Math.max(0,o-s):0,y=h>0;return{neededPx:h+2*g+v,capPx:Math.round(c.card.stackBandMaxFraction*a.height),...y&&{shrinkToContent:y}}}function Dj(e,t,n,r){if(t===null)return;let i=e.regions.filter(e=>e.zBase<100);if(!(i.length>1&&i.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let a=i.some(e=>e.accepts.includes(`content`)&&`fraction`in e.height),o=i.some(e=>e.accepts.includes(`replica`)&&`fraction`in e.height);if(!a||!o)return;let s=r.content.stackedAspect;if(!(!Number.isFinite(s)||s<=0))return{maxPx:Math.round(n.width/s)}}var Oj=`bottom-left`;function kj(e,t,n,r,i){let a=t.endsWith(`right`)?e.x+e.width-n-r:e.x+n,o=t.startsWith(`bottom`)?e.y+e.height-n-i:e.y+n;return{x:Math.round(a),y:Math.round(o),width:r,height:i}}function Aj(e,t,n,r){let i=Math.max(n.pip.minWidthPx,Math.round(e.width*.25)),a=r?e.height-t:Math.round((e.height-t)*16/9),o=Math.min(i,e.width-t,a),s=r?o:Math.round(o*9/16);return o<n.pip.minWidthPx||o<=0||s<=0?null:{w:o,h:s}}function jj(e,t,n){return t===null||!pj(e,t)?e:{...e,y:Math.round(t.y)-n-e.height}}function Mj(e){if(typeof e!=`object`||!e)return!1;let t=e;return[`x`,`y`,`width`,`height`].every(e=>typeof t[e]==`number`&&Number.isFinite(t[e]))}function Nj(e,t,n){let r=e;for(let e of t.filter(Mj).sort((e,t)=>t.y-e.y))r=jj(r,e,n);return r}function Pj(e,t,n){if(t<=0)return e;let r=Math.min(t,e.length);return n===`evict-newest`?e.slice(0,e.length-r):e.slice(r)}function Fj(e,t,n,r,i,a){let o=n.callControls===!0?Math.round(a.insets.callControlsBottomPx):0,s=i.height-o,c=n.selfView&&n.prefs.hideSelfView!==!0,l=n.replica||c,u=e.regions.some(e=>e.zBase<100&&e.accepts.includes(`card`)),d=+!!l+(t.contentKind===null?0:1)+(n.cards.length>0&&u?1:0)>=2?_j(a,r.width).surfacePad:0,f={width:Math.max(0,i.width-2*d),height:Math.max(0,i.height-2*d)},p=n.callControlsRect??(o>0?{x:0,y:s,width:i.width,height:o}:null);return{regions:Tj(e,f,a,Ej(e,t.state,t.contentKind,n,f,i,o,d,a,r.width,vj(t.state,r,a)),Dj(e,t.contentKind,f,a)).map(e=>({...e,rect:{...e.rect,x:e.rect.x+d,y:e.rect.y+d}})).map(e=>p===null||!e.region.accepts.includes(`card`)||!(e.rect.x<p.x+p.width&&e.rect.x+e.rect.width>p.x)?e:{...e,rect:{...e.rect,height:Math.max(0,Math.min(e.rect.height,s-e.rect.y))}}),surfacePad:d,controlsInset:o,bandTopY:s}}function Ij(e,t,n,r,i,a){let o=n.selfView&&n.prefs.hideSelfView!==!0,{regions:s,surfacePad:c,controlsInset:l,bandTopY:u}=Fj(t,e,n,r,i,a),d=s.find(e=>e.region.accepts.includes(`replica`)),f=s.find(e=>e.region.accepts.includes(`content`)),p=s.find(e=>e.region.accepts.includes(`card`)),m=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`selfView`)),h=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`card`)),g=Math.round(a.rail.gutterPx),_=Math.round(a.pip.gapPaddingPx),v=[...n.cards].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),y=vj(e.state,r,a),b=p?yj(n.cards,y,a.eviction.policy):h===void 0?[]:yj(n.cards,1,a.eviction.policy),x=s=>{let y={evictedCardIds:[],selfViewDropped:!1,replicaCollapsed:!1},x=[],S=null,C=!1,w=d!==void 0&&d.region.accepts.includes(`selfView`);if(d&&w&&(n.replica||o)){let e=d.rect,t=o&&!s.selfViewDropped;o&&s.selfViewDropped&&(y.selfViewDropped=!0);let r=+!!n.replica+ +!!t,i=Math.round(a.insets.participantsPadPx),c=Math.max(1,e.width-2*i),l=Math.round(c*9/16),u=e=>r*e+(r-1)*i;u(l)>e.height&&(l=Math.max(1,Math.floor((e.height-(r-1)*i)/r)),c=Math.min(Math.max(1,e.width-2*i),Math.round(l*16/9))),l=Math.max(l,Math.min(48,e.height)),c=Math.max(c,Math.min(48,e.width));let f=e.x+Math.round((e.width-c)/2),p=e.y+Math.round((e.height-u(l))/2);if(n.replica){let e={x:f,y:p,width:c,height:l};if(s.replicaCollapsed){let t=Math.min(l,Math.max(64,Math.round(l*.25)));e={...e,height:t},y.replicaCollapsed=!0}S={id:`replica`,kind:`replica`,rect:e,layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name},x.push(S),p+=l+i}t&&(x.push({id:`selfView`,kind:`selfView`,rect:{x:f,y:p,width:c,height:l},layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name}),C=!0)}else if(d&&(n.replica||o)){let e=!n.replica,t=d.rect;if(!e&&s.replicaCollapsed){let e=Math.min(t.height,Math.max(64,Math.round(t.height*.25)));t={...t,height:e},y.replicaCollapsed=!0}let r={id:e?`selfView`:`replica`,kind:e?`selfView`:`replica`,rect:t,layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name};x.push(r),e?C=!0:S=r}e.contentKind!==null&&f&&x.push({id:`content`,kind:`content`,rect:f.rect,layer:`grid`,order:f.region.zBase,fit:{kind:`natural`},region:f.region.name});let T=Pj(b,s.extraEvictions,a.eviction.policy),E=new Set(T.map(e=>e.id));if(y.evictedCardIds=v.filter(e=>!E.has(e.id)).map(e=>e.id),p&&T.length>0){let e=p.rect,n=t.regions.filter(e=>e.zBase<100),i=n.length>1&&n.every(e=>`fraction`in e.width&&e.width.fraction===1),{innerW:o,entries:s}=bj(T,e.width,a,r.width,void 0,i?a.card.stackMaxWidthPx:void 0),c=e.x+Math.round((e.width-o)/2),l=e.height-g*(s.length-1),u=s.reduce((e,t)=>e+t.clampedHeightPx,0),d;if(u<=l)d=s.map(e=>e.clampedHeightPx);else{let e=l>0?l/u:0;d=s.map(t=>Math.max(a.card.reportedHeightFloorPx,Math.floor(t.clampedHeightPx*e)));let t=d.reduce((e,t)=>e+t,0)-Math.max(0,l);for(;t>0;){let e=-1;for(let t=0;t<d.length;t++){let n=d[t]??0;n>a.card.reportedHeightFloorPx&&(e===-1||n>(d[e]??0))&&(e=t)}if(e===-1)break;d[e]=(d[e]??0)-1,--t}}let f=d.reduce((e,t)=>e+t,0)+g*(s.length-1),m=e.y+Math.max(0,Math.round((e.height-f)/2));s.forEach((t,n)=>{let r=Math.min(m,e.y+e.height),i=Math.max(0,Math.min(d[n]??0,e.y+e.height-r)),s=fj(t.clampedHeightPx,i,a),l=t.constraints.hardMinHeightPx;l!==void 0&&i<l&&s.kind!==`scroll`&&(s={kind:`scroll`}),x.push({id:t.card.id,kind:`card`,component:t.card.component,cardSizeClass:t.constraints.sizeClass,rect:{x:c,y:r,width:o,height:i},layer:`grid`,order:p.region.zBase+n,fit:s,region:p.region.name}),m=r+i+g})}let ee=null;if(p===void 0&&h!==void 0&&T.length>0){let e={width:Math.max(0,i.width-2*c),height:Math.max(0,i.height-2*c)},t=wj(h,e,a),o=h.sheetAnchor===`bottom`,s=_j(a,r.width).cardsPad,l=o?Math.min(u,n.callControlsRect?.y??u)-s:u,d={x:t.x+c,y:t.y+c,width:t.width,height:Math.max(0,Math.min(t.height,l-(t.y+c)))},{innerW:f,entries:p}=bj(T,d.width,a,r.width,o?s:0,a.card.stackMaxWidthPx),m=p[0];if(m!==void 0){let e=d.x+Math.round((d.width-f)/2),t=Math.max(0,Math.min(m.clampedHeightPx,d.height)),n=fj(m.clampedHeightPx,t,a);o&&m.constraints.naturalHeightPx>t&&(n={kind:`scroll`});let r=m.constraints.hardMinHeightPx;r!==void 0&&t<r&&n.kind!==`scroll`&&(n={kind:`scroll`}),ee={id:m.card.id,kind:`card`,component:m.card.component,cardSizeClass:m.constraints.sizeClass,rect:{x:e,y:o?d.y+d.height-t:d.y,width:f,height:t},layer:`overlay`,order:h.zBase,fit:n,region:h.name,sheet:!0,...o&&{sheetAnchor:`bottom`}},x.push(ee)}}if(!C){if(o&&s.selfViewDropped)y.selfViewDropped=!0;else if(o){let t=e.suppressedPrefs.includes(`pipCorner`)?Oj:n.prefs.pipCorner??`bottom-left`,o=n.callControlsVisible===!1?null:n.callControlsRect??(l>0?{x:0,y:u,width:i.width,height:l}:null),s=[...o===null?[]:[o],...ee===null?[]:[ee.rect],...n.chromeObstacles??[]];if(S){let e=S.rect,n=Aj(e,_,a,r.width===`compact`),i=n===null?null:kj(e,t,_,n.w,n.h),o=i===null?null:Nj(i,s,_),c=n!==null&&o!==null&&o.y>=e.y&&n.w+_<=e.width&&n.h+_<=e.height,l=n!==null&&e.width>0&&e.height>0?n.w*n.h/(e.width*e.height):1/0;o!==null&&c&&l<=a.pip.maxAreaRatio?x.push({id:`selfView`,kind:`selfView`,rect:o,layer:`overlay`,order:m?.zBase??100,fit:{kind:`natural`},region:m?.name??`pip`}):y.selfViewDropped=!0}else{let e=a.pip.minWidthPx,n=r.width===`compact`?e:Math.round(e*9/16),o={x:0,y:0,width:i.width,height:i.height},c=Nj(kj(o,t,_,e,n),s,_),l=c.y>=0&&e+_<=o.width&&n+_<=o.height,u=x.some(e=>(e.kind===`content`||e.kind===`card`)&&pj(e.rect,c));l&&!u?x.push({id:`selfView`,kind:`selfView`,rect:c,layer:`overlay`,order:m?.zBase??100,fit:{kind:`natural`},region:m?.name??`pip`}):y.selfViewDropped=!0}}}return{tiles:x,degradations:y}},S={extraEvictions:0,selfViewDropped:!1,replicaCollapsed:!1},C=x(S),w=hj(C.tiles,i,a);for(let e of a.degradationLadder){if(w.length===0)break;if(e===`evict-cards`)for(;w.length>0&&S.extraEvictions<b.length;)S={...S,extraEvictions:S.extraEvictions+1},C=x(S),w=hj(C.tiles,i,a);else e===`drop-self-view`?C.tiles.some(e=>e.kind===`selfView`)&&(S={...S,selfViewDropped:!0},C=x(S),w=hj(C.tiles,i,a)):e===`collapse-replica`&&!S.replicaCollapsed&&C.tiles.some(e=>e.kind===`replica`)&&(S={...S,replicaCollapsed:!0},C=x(S),w=hj(C.tiles,i,a))}return C}function Lj(e){if(e!==void 0&&e.length!==0)return{...QA,...Object.fromEntries(e.map(e=>[e.id,e]))}}function Rj(e,t,n,r){let i=e.callControlsRect,a=i===void 0?e:{...e,callControlsRect:{x:Math.round(i.x),y:Math.round(i.y),width:Math.max(0,Math.round(i.width)),height:Math.max(0,Math.round(i.height))}},o={width:Math.max(0,Math.round(a.container.widthPx)),height:Math.max(0,Math.round(a.container.heightPx))},s=nj(a,t,n),c=a.replica||a.selfView&&a.prefs.hideSelfView!==!0,l=tj(s.state,t,Lj(r?.templates),void 0,c,a.kioskMode===!0),{tiles:u,degradations:d}=Ij(s,l,a,t,o,n);return{state:s.state,sizeClass:t,containerPx:o,templateId:l.id,tiles:u,degradations:d,suppressedPrefs:[...s.suppressedPrefs]}}var zj={compact:0,medium:1,expanded:2};function Bj(e,t){return e.width===t.width&&e.height===t.height&&e.composition===t.composition}function Vj(e,t,n,r,i){let a=e.committedClass;if(a===null||a.composition===void 0)return{committedClass:t,pendingClass:null,pendingSinceMs:null};if(Bj(t,a))return{committedClass:a,pendingClass:null,pendingSinceMs:null};let o=Math.abs(zj[t.width]-zj[a.width]),s=e.lastResolution?.containerPx;return o>1||s===void 0||Math.max(Math.abs(Math.round(n.widthPx)-s.width),Math.abs(Math.round(n.heightPx)-s.height))>=i.hysteresis.decisiveJumpPxDelta?{committedClass:t,pendingClass:null,pendingSinceMs:null}:e.pendingClass!==null&&e.pendingSinceMs!==null&&Bj(e.pendingClass,t)?r-e.pendingSinceMs>=i.hysteresis.windowMs?{committedClass:t,pendingClass:null,pendingSinceMs:null}:{committedClass:a,pendingClass:e.pendingClass,pendingSinceMs:e.pendingSinceMs}:{committedClass:a,pendingClass:t,pendingSinceMs:r}}var Hj=(e,t)=>e<t?-1:+(e>t);function Uj(e,t){let n=new Map((e?.tiles??[]).map(e=>[e.id,e])),r=new Map(t.tiles.map(e=>[e.id,e])),i=[];for(let e of[...n.keys()].sort(Hj))r.has(e)||i.push({type:`exit`,tileId:e});let a=[],o=[],s=[];for(let e of[...r.keys()].sort(Hj)){let t=n.get(e);if(t===void 0){a.push({type:`enter`,tileId:e});continue}let i=r.get(e);if(t.layer!==i.layer){o.push(i.layer===`overlay`?{type:`promote`,tileId:e,toLayer:i.layer}:{type:`demote`,tileId:e,toLayer:i.layer});continue}let c=t.rect.x!==i.rect.x||t.rect.y!==i.rect.y,l=t.rect.width!==i.rect.width||t.rect.height!==i.rect.height;c?s.push({type:`move`,tileId:e,from:t.rect,to:i.rect}):l&&s.push({type:`resize`,tileId:e,from:t.rect,to:i.rect})}return[...i,...a,...o,...s]}function Wj(e,t,n,r,i){let a=Vj(e,ZA(t.container,r),t.container,n,r),o=Rj(t,a.committedClass,r,i);return{resolution:o,transitions:Uj(e.lastResolution,o),nextState:{committedClass:a.committedClass,pendingClass:a.pendingClass,pendingSinceMs:a.pendingSinceMs,lastResolution:o}}}var Gj=`0.1.13`,Kj=YA,qj=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_enabled`)===`1`}catch{return!1}})(),Jj=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_debug`)===`1`}catch{return!1}})();function Yj(e,t){return qj||e===!0||t===!0}function Xj(e=globalThis.location?.search??``){return new URLSearchParams(e).get(`kiosk`)===`1`}function Zj({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,reportedHeights:s}){return{kioskMode:e,container:{widthPx:n.width,heightPx:Math.round(Math.min(n.height,n.visualViewportHeight??n.height))},replica:r.hasPersonaVideo,selfView:r.hasSelfView,presentation:r.isPersonaPresenting?{}:null,userShare:r.isScreenSharing?{}:null,cards:t.map((e,t)=>({id:e.id,component:e.canvas_config.component,dispatchSeq:t+1,...s[e.id]===void 0?{}:{naturalHeightPx:s[e.id]}})),prefs:{},callControls:i>0,callControlsVisible:a??!0,...o===void 0?{}:{callControlsRect:o}}}var Qj=16,$j=200,eM=Bt(null);function tM(e){eM.peek()===null&&(console.error(`Magic Grid engine error; rendering the legacy layout.`,e),eM.value=(e instanceof Error?`${e.name}: ${e.message}`:String(e)).slice(0,$j))}function nM(){eM.peek()!==null&&(eM.value=null)}function rM({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,enabled:s}){let c=A(Kj),l=A(null),[u,d]=O({}),[f,p]=O(null),m=M((e,t)=>{s&&d(n=>n[e]===t?n:{...n,[e]:t})},[s]);k(()=>{d(e=>{let n=new Set(t.map(e=>e.id)),r={};for(let[t,i]of Object.entries(e))n.has(t)&&(r[t]=i);return Object.keys(r).length===Object.keys(e).length?e:r})},[t]);let h=j(()=>Zj({kioskMode:e,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,reportedHeights:u}),[e,t,n,r,i,a,o,u]);return k(()=>{if(!s||eM.peek()!==null)return;l.current===null&&(l.current=Date.now());let e=null,t=()=>{if(e=null,eM.peek()!==null)return;let n=Date.now()-(l.current??0),r;try{r=Wj(c.current,h,n,XA)}catch(e){tM(e);return}if(c.current=r.nextState,p(r),r.nextState.pendingClass!==null){let i=r.nextState.pendingSinceMs===null?0:Math.max(0,n-r.nextState.pendingSinceMs);e=setTimeout(t,Math.max(Qj,XA.hysteresis.windowMs-i+Qj))}};return t(),()=>{e!==null&&clearTimeout(e)}},[s,h]),{resolution:s?f?.resolution??null:null,inputs:s?h:null,transitions:s?f?.transitions??[]:[],reportedHeights:u,recordNaturalHeight:m}}function iM(e){return e.kind===`card`&&e.sheet===!0&&e.sheetAnchor===`bottom`}function aM(e,t,n){return n?e===null?`no-presence`:t.hasPersonaVideo?e.degradations.evictedCardIds.length>0?`card-dropped`:e.tiles.some(e=>e.kind===`card`&&e.fit.kind===`scroll`&&!iM(e))?`card-overflow`:null:`no-persona-video`:`flag-off`}function oM(e,t){if(t!==null||e===null)return null;let n=e.tiles.find(e=>e.kind===`card`&&e.sheet===!0&&!iM(e));return n===void 0?null:n.rect.y+n.rect.height}var sM={driving:!1,containerPx:null,replica:null,selfView:null,content:null,replicaCollapsed:!1};function cM(e,t,n){if(e===null)return sM;let r=t===null;if(!r&&!(t===`no-persona-video`&&n))return sM;let i=t=>e.tiles.find(e=>e.kind===t)?.rect??null;return{driving:r,containerPx:e.containerPx,replica:r?i(`replica`):null,selfView:i(`selfView`),content:r?i(`content`):null,replicaCollapsed:r?e.degradations.replicaCollapsed:!1}}function lM(e){return e.selfView===null?e.driving?`hidden`:`legacy`:`engine`}function uM(e,t){return e.containerPx===null||t.containerPx===null?!1:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height}function dM(e){let t=`composition`in e?e.composition:void 0;return t===`stacked`||t===`side-by-side`?t:void 0}var fM=`conversation.grid_status`,pM=6e4;function mM(e,t,n){return n?e&&t?`url+config+start`:e?`url+start`:t?`config+start`:`start`:e&&t?`both`:e?`url`:`config`}function hM(e,t){return{message_type:`conversation`,event_type:fM,conversation_id:e,properties:t}}function gM(e){let t=dM(e.sizeClass);return{template_id:e.templateId,size_class:`${e.sizeClass.width}/${e.sizeClass.height}`,...t===void 0?{}:{composition:t},container:{w:e.containerPx.width,h:e.containerPx.height},cards:e.tiles.filter(e=>e.kind===`card`).length}}function _M(e){let{send:t,enabledVia:n,engineVersion:r=Gj,now:i=Date.now,transitionDebounceMs:a=500,summaryIntervalMs:o=pM}=e,s=i(),c=!1,l=!1,u,d=null,f=null,p=!1,m=null,h=0,g=0,_={},v=null,y=e=>{try{t(e)}catch{}},b=(e,t)=>({v:1,kind:e,engine_version:r,enabled_via:n,bail:t,...v}),x=e=>{f=null;let t=u;if(t!==void 0&&e===t)return;let n=i();t===null&&m!==null&&(h+=n-m,m=null),e===null?m=n:_[e]=(_[e]??0)+1,t!==void 0&&(g+=1),e===null&&!p?(p=!0,y({...b(`first_drive`,null),...t===void 0?{}:{prev_bail:t}})):t!==void 0&&y({...b(`transition`,e),prev_bail:t}),u=e},S=e=>{let t=i(),n=h+(m===null?0:t-m);y({...b(`summary`,u??d??null),driving_ms:Math.round(n),total_ms:Math.round(t-s),bail_counts:{..._},transitions:g,...e?{final:!0}:{}})},C=setInterval(()=>S(!1),o);return{update(e,t){if(c)return;t!==null&&(v=gM(t));let n=f===null?u:d;(n===void 0||e!==n)&&(d=e,f!==null&&clearTimeout(f),f=setTimeout(()=>x(e),a))},error(e){c||l||(l=!0,y({...b(`error`,`engine-error`),error:e}))},dispose(){c||(c=!0,clearInterval(C),f!==null&&(clearTimeout(f),x(d)),S(!0))}}}function vM({enabled:e,enabledVia:t,bail:n,resolution:r,engineError:i}){let a=Hd(),o=Ud(),s=N(Ep),c=A({daily:a,meetingState:o,conversation:s});c.current={daily:a,meetingState:o,conversation:s};let l=A(null);k(()=>{if(!e)return;let n=_M({enabledVia:t,send:e=>{try{let t=c.current;if(!t.daily||t.meetingState!==`joined-meeting`)return;let n=t.conversation?.session.peek()?.conversationId;if(!n)return;t.daily.sendAppMessage(hM(n,e),`*`)}catch{}}});return l.current=n,()=>{l.current=null,n.dispose()}},[e,t]),k(()=>{l.current?.update(n,r)},[n,r]),k(()=>{i!==null&&l.current?.error(i)},[i])}var yM=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},bM=(e,t)=>({classGroupId:e,validator:t}),xM=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),SM=`-`,CM=[],wM=`arbitrary..`,TM=e=>{let t=OM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return DM(e);let n=e.split(SM);return EM(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?yM(i,t):t:i||CM}return n[e]||CM}}},EM=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=EM(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(SM):e.slice(t).join(SM),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},DM=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?wM+r:void 0})(),OM=e=>{let{theme:t,classGroups:n}=e;return kM(n,t)},kM=(e,t)=>{let n=xM();for(let r in e){let i=e[r];AM(i,n,r,t)}return n},AM=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];jM(i,t,n,r)}},jM=(e,t,n,r)=>{if(typeof e==`string`){MM(e,t,n);return}if(typeof e==`function`){NM(e,t,n,r);return}PM(e,t,n,r)},MM=(e,t,n)=>{let r=e===``?t:FM(t,e);r.classGroupId=n},NM=(e,t,n,r)=>{if(IM(e)){AM(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bM(n,e))},PM=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];AM(o,FM(t,a),n,r)}},FM=(e,t)=>{let n=e,r=t.split(SM),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=xM(),n.nextPart.set(t,i)),n=i}return n},IM=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,LM=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},RM=`!`,zM=`:`,BM=[],VM=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),HM=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===zM){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(RM)?(c=s.slice(0,-1),l=!0):s.startsWith(RM)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return VM(t,l,c,u)};if(t){let e=t+zM,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):VM(BM,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},UM=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},WM=e=>({cache:LM(e.cacheSize),parseClassName:HM(e),sortModifiers:UM(e),postfixLookupClassGroupIds:GM(e),...TM(e)}),GM=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},KM=/\s+/,qM=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(KM),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+RM:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},JM=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=YM(n))&&(i&&(i+=` `),i+=r);return i},YM=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=YM(e[r]))&&(n&&(n+=` `),n+=t);return n},XM=(e,...t)=>{let n,r,i,a,o=o=>(n=WM(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=qM(e,n);return i(e,a),a};return a=o,(...e)=>a(JM(...e))},ZM=[],QM=e=>{let t=t=>t[e]||ZM;return t.isThemeGetter=!0,t},$M=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,tN=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,nN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rN=/\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$/,iN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sN=e=>tN.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),cN=e=>!!e&&Number.isInteger(Number(e)),lN=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),uN=e=>nN.test(e),dN=()=>!0,fN=e=>rN.test(e)&&!iN.test(e),pN=()=>!1,mN=e=>aN.test(e),hN=e=>oN.test(e),gN=e=>!Q(e)&&!$(e),_N=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),vN=e=>NN(e,LN,pN),Q=e=>$M.test(e),yN=e=>NN(e,RN,fN),bN=e=>NN(e,zN,Z),xN=e=>NN(e,VN,dN),SN=e=>NN(e,BN,pN),CN=e=>NN(e,FN,pN),wN=e=>NN(e,IN,hN),TN=e=>NN(e,HN,mN),$=e=>eN.test(e),EN=e=>PN(e,RN),DN=e=>PN(e,BN),ON=e=>PN(e,FN),kN=e=>PN(e,LN),AN=e=>PN(e,IN),jN=e=>PN(e,HN,!0),MN=e=>PN(e,VN,!0),NN=(e,t,n)=>{let r=$M.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},PN=(e,t,n=!1)=>{let r=eN.exec(e);return r?r[1]?t(r[1]):n:!1},FN=e=>e===`position`||e===`percentage`,IN=e=>e===`image`||e===`url`,LN=e=>e===`length`||e===`size`||e===`bg-size`,RN=e=>e===`length`,zN=e=>e===`number`,BN=e=>e===`family-name`,VN=e=>e===`number`||e===`weight`,HN=e=>e===`shadow`,UN=XM(()=>{let e=QM(`color`),t=QM(`font`),n=QM(`text`),r=QM(`font-weight`),i=QM(`tracking`),a=QM(`leading`),o=QM(`breakpoint`),s=QM(`container`),c=QM(`spacing`),l=QM(`radius`),u=QM(`shadow`),d=QM(`inset-shadow`),f=QM(`text-shadow`),p=QM(`drop-shadow`),m=QM(`blur`),h=QM(`perspective`),g=QM(`aspect`),_=QM(`ease`),v=QM(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[sN,`full`,`auto`,...w()],E=()=>[cN,`none`,`subgrid`,$,Q],ee=()=>[`auto`,{span:[`full`,cN,$,Q]},cN,$,Q],te=()=>[cN,`auto`,$,Q],ne=()=>[`auto`,`min`,`max`,`fr`,$,Q],re=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ie=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ae=()=>[`auto`,...w()],oe=()=>[sN,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],se=()=>[sN,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ce=()=>[sN,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],D=()=>[e,$,Q],le=()=>[...b(),ON,CN,{position:[$,Q]}],ue=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],de=()=>[`auto`,`cover`,`contain`,kN,vN,{size:[$,Q]}],fe=()=>[lN,EN,yN],pe=()=>[``,`none`,`full`,l,$,Q],me=()=>[``,Z,EN,yN],he=()=>[`solid`,`dashed`,`dotted`,`double`],ge=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],_e=()=>[Z,lN,ON,CN],ve=()=>[``,`none`,m,$,Q],ye=()=>[`none`,Z,$,Q],be=()=>[`none`,Z,$,Q],xe=()=>[Z,$,Q],Se=()=>[sN,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[uN],breakpoint:[uN],color:[dN],container:[uN],"drop-shadow":[uN],ease:[`in`,`out`,`in-out`],font:[gN],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[uN],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[uN],shadow:[uN],spacing:[`px`,Z],text:[uN],"text-shadow":[uN],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,sN,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[_N],columns:[{columns:[Z,Q,$,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:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[cN,`auto`,$,Q]}],basis:[{basis:[sN,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,sN,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[cN,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...re(),`normal`]}],"justify-items":[{"justify-items":[...ie(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ie()]}],"align-content":[{content:[`normal`,...re()]}],"align-items":[{items:[...ie(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ie(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...ie(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ie()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ae()}],mx:[{mx:ae()}],my:[{my:ae()}],ms:[{ms:ae()}],me:[{me:ae()}],mbs:[{mbs:ae()}],mbe:[{mbe:ae()}],mt:[{mt:ae()}],mr:[{mr:ae()}],mb:[{mb:ae()}],ml:[{ml:ae()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:oe()}],"inline-size":[{inline:[`auto`,...se()]}],"min-inline-size":[{"min-inline":[`auto`,...se()]}],"max-inline-size":[{"max-inline":[`none`,...se()]}],"block-size":[{block:[`auto`,...ce()]}],"min-block-size":[{"min-block":[`auto`,...ce()]}],"max-block-size":[{"max-block":[`none`,...ce()]}],w:[{w:[s,`screen`,...oe()]}],"min-w":[{"min-w":[s,`screen`,`none`,...oe()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...oe()]}],h:[{h:[`screen`,`lh`,...oe()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...oe()]}],"max-h":[{"max-h":[`screen`,`lh`,...oe()]}],"font-size":[{text:[`base`,n,EN,yN]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,MN,xN]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,lN,Q]}],"font-family":[{font:[DN,SN,t]}],"font-features":[{"font-features":[Q]}],"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:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,bN]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...he(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,yN]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[cN,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],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`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:le()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:de()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},cN,$,Q],radial:[``,$,Q],conic:[cN,$,Q]},AN,wN]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:fe()}],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":me()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...he(),`hidden`,`none`]}],"divide-style":[{divide:[...he(),`hidden`,`none`]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...he(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,EN,yN]}],"outline-color":[{outline:D()}],shadow:[{shadow:[``,`none`,u,jN,TN]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":[`none`,d,jN,TN]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:me()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[Z,yN]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":[`none`,f,jN,TN]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...ge(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ge()}],"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":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":_e()}],"mask-image-linear-to-pos":[{"mask-linear-to":_e()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":_e()}],"mask-image-t-to-pos":[{"mask-t-to":_e()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":_e()}],"mask-image-r-to-pos":[{"mask-r-to":_e()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":_e()}],"mask-image-b-to-pos":[{"mask-b-to":_e()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":_e()}],"mask-image-l-to-pos":[{"mask-l-to":_e()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":_e()}],"mask-image-x-to-pos":[{"mask-x-to":_e()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":_e()}],"mask-image-y-to-pos":[{"mask-y-to":_e()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":_e()}],"mask-image-radial-to-pos":[{"mask-radial-to":_e()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":_e()}],"mask-image-conic-to-pos":[{"mask-conic-to":_e()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:ve()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,jN,TN]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"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:be()}],"scale-x":[{"scale-x":be()}],"scale-y":[{"scale-y":be()}],"scale-z":[{"scale-z":be()}],"scale-3d":[`scale-3d`],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":[`translate-none`],zoom:[{zoom:[cN,$,Q]}],accent:[{accent:D()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:D()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":D()}],"scrollbar-track-color":[{"scrollbar-track":D()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,$,Q]}],fill:[{fill:[`none`,...D()]}],"stroke-w":[{stroke:[Z,EN,yN,bN]}],stroke:[{stroke:[`none`,...D()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function WN({resolution:e,inputs:t,config:n,bailReason:r}){if(e===null||t===null)return null;let i=QA[e.templateId];if(i===void 0)return null;let a=r!==null,o=a?`border-warning/70 bg-warning/5`:`border-info/80 bg-info/5`,s=a?`bg-warning/85 text-warning-content`:`bg-info/85 text-info-content`,c=a?`border-warning`:`border-success`,l=a?`bg-warning/85 text-warning-content`:`bg-success/85 text-success-content`,u=t.userShare?`userShare`:t.presentation?`presentation`:null,{regions:d}=Fj(i,{state:e.state,contentKind:u},t,e.sizeClass,e.containerPx,n);return P(`div`,{class:`pointer-events-none absolute inset-0 z-40`,"aria-hidden":`true`,children:[a&&P(`span`,{class:`absolute top-1 left-1/2 -translate-x-1/2 rounded bg-warning/90 px-2 py-0.5 font-mono text-[10px] text-warning-content`,children:[`engine plan only · legacy: `,r]}),d.map(e=>P(`div`,{class:UN(`absolute rounded-box border border-dashed`,o),style:{left:`${e.rect.x}px`,top:`${e.rect.y}px`,width:`${e.rect.width}px`,height:`${e.rect.height}px`},children:P(`span`,{class:UN(`absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight`,s),children:[P(`span`,{children:e.region.name}),P(`span`,{class:`opacity-75`,children:e.region.accepts.join(` · `)})]})},e.region.name)),e.tiles.map(e=>P(`div`,{class:UN(`absolute border`,c),style:{left:`${e.rect.x}px`,top:`${e.rect.y}px`,width:`${e.rect.width}px`,height:`${e.rect.height}px`},children:P(`span`,{class:UN(`absolute right-1 bottom-1 rounded px-1.5 py-0.5 font-mono text-[10px]`,l),children:[e.kind,` `,e.rect.width,`×`,e.rect.height]})},`tile-${e.id}`))]})}function GN(e){return{version:1,buildSha:Gj,engineVersion:Gj,config:XA,session:{containerPx:{width:Math.round(e.container.widthPx),height:Math.round(e.container.heightPx)},slots:{...e.kioskMode===!0?{kioskMode:!0}:{},replica:e.replica,selfView:e.selfView,presentation:e.presentation!==null,userShare:e.userShare!==null,callControls:e.callControls,callControlsVisible:e.callControlsVisible??!0,...e.callControlsRect===void 0?{}:{callControlsRect:e.callControlsRect}},prefs:e.prefs,cards:e.cards}}}function KN({resolution:e,inputs:t,shadowing:n,bailReason:r,engineError:i=null}){let[a,o]=O(!1),s=A(null);if(k(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),e===null||t===null)return i===null?null:P(`div`,{class:`pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg`,children:[P(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[P(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),P(`span`,{class:`text-warning`,children:`observing`})]}),P(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[P(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),P(`dd`,{class:`text-warning`,children:r}),P(`dt`,{class:`text-error opacity-80`,children:`error`}),P(`dd`,{class:`text-error break-all`,children:i})]})]});let c=()=>{let e=JSON.stringify(GN(t),null,2);s.current!==null&&clearTimeout(s.current),navigator.clipboard?.writeText(e).then(()=>{o(!0),s.current=setTimeout(()=>o(!1),1500)},()=>o(!1))},l=e.degradations.evictedCardIds,u=dM(e.sizeClass);return P(`div`,{class:`pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg`,children:[P(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[P(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),P(`span`,{class:n?`text-warning`:`text-success`,children:n?`observing`:`driving`})]}),P(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[P(`dt`,{class:`opacity-60`,children:`state`}),P(`dd`,{children:e.state}),P(`dt`,{class:`opacity-60`,children:`template`}),P(`dd`,{children:e.templateId}),P(`dt`,{class:`opacity-60`,children:`class`}),P(`dd`,{children:[e.sizeClass.width,` / `,e.sizeClass.height]}),u!==void 0&&P(E,{children:[P(`dt`,{class:`opacity-60`,children:`composition`}),P(`dd`,{children:u})]}),P(`dt`,{class:`opacity-60`,children:`container`}),P(`dd`,{children:[e.containerPx.width,`×`,e.containerPx.height]}),t.callControlsRect!==void 0&&P(E,{children:[P(`dt`,{class:`opacity-60`,children:`controls`}),P(`dd`,{children:[`x `,t.callControlsRect.x,`–`,t.callControlsRect.x+t.callControlsRect.width,t.callControlsVisible===!1?` · hidden`:` · shown`]})]}),P(`dt`,{class:`opacity-60`,children:`tiles`}),P(`dd`,{children:e.tiles.map(e=>`${e.kind}:${e.rect.width}×${e.rect.height}`).join(` `)||`none`}),l.length>0&&P(E,{children:[P(`dt`,{class:`text-error opacity-80`,children:`dropped`}),P(`dd`,{class:`text-error`,children:l.join(`, `)})]}),r!==null&&P(E,{children:[P(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),P(`dd`,{class:`text-warning`,children:r})]}),i!==null&&P(E,{children:[P(`dt`,{class:`text-error opacity-80`,children:`error`}),P(`dd`,{class:`text-error break-all`,children:i})]})]}),P(`button`,{type:`button`,class:`btn btn-xs mt-2 w-full`,onClick:c,children:a?`copied`:`copy envelope for playground`})]})}var qN={effect:sM,animate:!1},JN=Bt(qN),YN={presence:{phase:`connecting`},localId:null,isScreenSharing:!1,isPersonaPresenting:!1,hasPersonaVideo:!1,hasSelfView:!1};function XN(e,t){return e===null||t===null?e===t:e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ZN(e,t){let n=e.containerPx===null||t.containerPx===null?e.containerPx===t.containerPx:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height;return e.driving===t.driving&&e.replicaCollapsed===t.replicaCollapsed&&n&&XN(e.replica,t.replica)&&XN(e.selfView,t.selfView)&&XN(e.content,t.content)}var QN=new Map,$N=new Set;function eP({instances:e,viewport:t,callControlsBandPx:n,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}){let c=Yj(o,s)&&r!==void 0,l=r??YN,u=globalThis.location?.search??``,d=rM({kioskMode:j(()=>Xj(u),[u]),instances:e,viewport:t,presence:l,callControlsBandPx:n,callControlsVisible:i,callControlsRect:a,enabled:c}),f=c?eM.value:null,p=f===null?aM(d.resolution,l,c):`engine-error`;vM({enabled:c,enabledVia:mM(qj,o===!0,s===!0),bail:p,resolution:d.resolution,engineError:f});let m=A(!1);l.presence.phase===`ready`?l.hasPersonaVideo&&(m.current=!0):m.current=!1;let h=!m.current,g;try{g=cM(d.resolution,p,h)}catch(e){tM(e),g=sM}let _=A(sM),v=uM(_.current,g);k(()=>{_.current=g,ZN(JN.peek().effect,g)||(JN.value={effect:g,animate:v})}),k(()=>()=>{nM(),JN.peek()!==qN&&(JN.value=qN)},[]);let y=d.resolution,b=j(()=>{if(p!==null||y===null)return QN;try{let e=new Map;for(let t of y.tiles)t.kind===`card`&&e.set(t.id,t.rect);return e}catch(e){return tM(e),QN}},[p,y]),x=j(()=>p!==null||y===null?$N:new Set(y.tiles.filter(iM).map(e=>e.id)),[p,y]),S=Jj?P(`div`,{class:`contents`,"data-grid-debug":!0,children:[P(WN,{resolution:d.resolution,inputs:d.inputs,config:XA,bailReason:p}),P(`div`,{class:`pointer-events-none absolute bottom-4 left-4 z-50`,children:P(KN,{resolution:d.resolution,inputs:d.inputs,shadowing:p!==null,bailReason:p,engineError:f})})]}):null;return{cardRects:b,kioskCardIds:x,sheetBottomPx:oM(y,p),animate:v,recordNaturalHeight:d.recordNaturalHeight,debug:S}}var tP=[`left`,`top`,`width`,`height`].map(e=>`${e} ${Hy}`).join(`, `);function nP(e,t){return{left:`${e.x}px`,top:`${e.y}px`,width:`${e.width}px`,height:`${e.height}px`,transition:t&&!Qy()?tP:`none`}}function rP({state:e}){return e.enabled?P(`details`,{class:`pointer-events-auto w-full max-w-md rounded-lg border border-base-300 bg-base-100/95 p-2 text-xs shadow-lg backdrop-blur`,children:[P(`summary`,{class:`cursor-pointer font-medium`,children:`Magic Canvas debug`}),P(`dl`,{class:`mt-2 grid gap-2`,children:[P(iP,{label:`iframe`,value:e.iframeLifecycleState}),P(iP,{label:`post`,value:e.lastInteractionPostResult}),P(iP,{label:`context`,value:e.lastModelContextUpdate}),P(iP,{label:`error`,value:e.lastError}),P(aP,{label:`tool_call`,value:e.lastToolCall}),P(aP,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function iP({label:e,value:t}){return t?P(`div`,{children:[P(`dt`,{class:`font-semibold`,children:e}),P(`dd`,{class:`break-words text-base-content/70`,children:t})]}):null}function aP({label:e,value:t}){return t===void 0?null:P(`div`,{children:[P(`dt`,{class:`font-semibold`,children:e}),P(`dd`,{children:P(`pre`,{class:`max-h-40 overflow-auto rounded bg-base-200 p-2 text-[10px] leading-relaxed`,children:JSON.stringify(t,null,2)})})]})}var oP=1e3,sP=5e3,cP=1200,lP=[2e3,6e3];async function uP(e,t,n){let r=new AbortController,i=globalThis.setTimeout(()=>r.abort(),sP);try{await Sn(e,t,n,{signal:r.signal})}finally{globalThis.clearTimeout(i)}}function dP(e){return e instanceof vn&&e.status>=400&&e.status<500&&e.status!==408&&e.status!==429}function fP(e,t){console.error(`Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.`,e),t({lastInteractionPostResult:`error`,lastError:zP(e).message})}function pP(e){return e.content.some(e=>e.type===`text`&&typeof e.text==`string`&&e.text.trim()!==``)}function mP(e,t,n,r){(async()=>{let i;for(let a of lP){await new Promise(e=>setTimeout(e,a));try{await uP(e,t,n),r({lastInteractionPostResult:`recovered`,lastError:void 0});return}catch(e){if(i=e,dP(e))break}}fP(i,r)})()}var hP=2e3;function gP(e){return e.correct_answer===void 0?cP:hP}var _P=48,vP=`allow-scripts`,yP={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`,"canvas.text":`allow-scripts allow-popups allow-popups-to-escape-sandbox`};function bP(e,t){if(!t.contentWindow||e.source!==t.contentWindow)return!1;let n=e.data;return!!n&&typeof n==`object`&&n?.jsonrpc===`2.0`}var xP=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{bP(e,this.#e)&&this.onmessage?.(e.data)};return this.#t=e,globalThis.addEventListener(`message`,e),Promise.resolve()}send(e){return this.#e.contentWindow?.postMessage(e,`*`),Promise.resolve()}close(){return this.#t&&globalThis.removeEventListener(`message`,this.#t),this.#t=void 0,this.onclose?.(),Promise.resolve()}};function SP(e){for(let t of Mv)if(e.some(e=>FP(e)===t))return t;return null}function CP({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=IP(),callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}={}){let{client:c}=Xp(),{dataTheme:l,cssVars:u}=JA(),d=Hd(),f=Ud(),[p,m]=O([]),[h,g]=jP(),[_,v]=O(()=>({enabled:n,iframeLifecycleState:`idle`})),y=eP({instances:p,viewport:g,callControlsBandPx:72,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}),b=M(e=>{v(t=>({...t,...e}))},[]),x=M((e,t=`*`)=>{if(f!==`joined-meeting`){b({lastError:`Dropped Magic Canvas app message because the Daily meeting is not joined.`});return}d?.sendAppMessage(e,t)},[d,f,b]),S=j(()=>({theme:l.value===`dark`?`dark`:`light`,cssVars:u.value}),[l.value,u.value]);k(()=>{v(e=>e.enabled===n?e:{...e,enabled:n})},[n]),qd({onAppMessage:M(e=>{if(f!==`joined-meeting`){b({lastToolCall:e.data,iframeLifecycleState:`idle`,lastError:`Dropped Magic Canvas tool call because the Daily meeting is not joined.`});return}try{let t=Oy(e.data);if(!t)return;m(e=>Kv(e,t)),b({lastToolCall:e.data,parsedCanvasConfig:t.kind===`show`?t.instance.canvas_config:void 0,iframeLifecycleState:t.kind===`clear`?`closed`:`received`,lastError:void 0})}catch(e){b({iframeLifecycleState:`error`,lastError:zP(e).message})}},[f,b])});let C=p.map(e=>{let t=$v(e,g),n=t.display_mode===`fullscreen`?null:y.cardRects.get(e.id)??null;return{instance:e,layout:n===null?t:{...t,viable_slot:`safe-area-right`},gridRect:n}}),w=ey(C.map(({layout:e})=>e),g),T=[...C].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;k(()=>{e?.(w)},[e,w.active,w.side,w.video_shift_x,w.backdrop.type,w.safe_area?.x,w.safe_area?.y,w.safe_area?.width,w.safe_area?.height]);let E=SP(C.map(({layout:e})=>e));k(()=>{t?.(E)},[t,E]);let ee=p.length>0||_.enabled;return P(`div`,{ref:h,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,children:[ee&&T&&P(`div`,{class:`absolute inset-0 bg-black/45`}),ee&&!T&&y.sheetBottomPx!==null&&P(`div`,{"data-grid-sheet-scrim":!0,class:`absolute inset-x-0 top-0`,style:{height:Math.min(y.sheetBottomPx+64,g.height),backgroundImage:`linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))`}}),ee&&C.map(({instance:e,layout:t,gridRect:n})=>P(wP,{slot:FP(t),safeAreaTop:w.safe_area?.y,frameWidth:g.width,...n?{gridRect:n,gridAnimate:y.animate}:{},children:r=>P(TP,{availableHeight:r,client:c,gridDriven:n!==null,gridKioskCard:n!==null&&y.kioskCardIds.has(e.id),hostTheme:S,instance:e,layout:t,dimmed:!!(T&&T!==e.tool_call_id),onDebug:b,onNaturalHeightChange:y.recordNaturalHeight,onComplete:()=>{m(t=>t.filter(t=>t.id!==e.id))},onDisplayModeChange:t=>{m(n=>n.map(n=>n.tool_call_id===e.tool_call_id?{...n,layout:{...n.layout,display_mode:t}}:n))},sendAppMessage:x})},e.id)),ee&&P(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:P(rP,{state:_})}),y.debug]})}function wP({slot:e,safeAreaTop:t,frameWidth:n,gridRect:r,gridAnimate:i=!1,children:a}){let[o,s]=MP(),c=a(r?r.height:e===`full`?void 0:s);if(r)return P(`div`,{ref:o,class:`pointer-events-auto absolute`,style:nP(r,i),"data-canvas-slot":e,"data-grid-driven":`true`,children:P(`div`,{class:`flex h-full w-full flex-col gap-2`,children:c})});if(e===`safe-area-left`||e===`safe-area-right`){let r=t==null?`1rem`:`${t*100}%`,i=n!=null&&n>0?Math.max(0,n-32):void 0;return P(`div`,{ref:o,class:PP(e),style:{top:r,bottom:`72px`,maxWidth:i},"data-canvas-slot":e,children:P(`div`,{class:`my-auto flex w-full flex-col gap-2`,children:c})})}return P(`div`,{ref:o,class:PP(e),"data-canvas-slot":e,children:P(`div`,{class:`contents`,children:c})})}function TP({availableHeight:e,client:t,gridDriven:n=!1,gridKioskCard:r=!1,hostTheme:i,instance:a,layout:o,dimmed:s,onDebug:c,onComplete:l,onDisplayModeChange:u,onNaturalHeightChange:d,sendAppMessage:f}){let p=A(null),m=A(null),h=A(e),g=A(r),_=A(320),v=A(i),y=A(a),b=A(o),x=A(-1),S=A(l),C=A(u),w=A(d),T=A(f),[E,ee]=O(720);k(()=>{y.current=a},[a]),k(()=>{_.current=E,m.current?.setHostContext(kP(y.current,v.current,b.current,h.current,E,g.current))},[E]),k(()=>{h.current=e,g.current=r;let t=OP(i,p.current);v.current=t,m.current?.setHostContext(kP(y.current,t,b.current,e,_.current,r))},[e,i,r]),k(()=>{b.current=o,m.current?.setHostContext(kP(y.current,v.current,o,e,_.current,g.current))},[e,o]),k(()=>{S.current=l,C.current=u,w.current=d,T.current=f},[l,u,d,f]),k(()=>{let e=p.current;if(!e)return;let n=!1,r=null,i=null,o=null,s=null,l=new URL(a.canvas_config.sandbox_url,globalThis.location.href).href,u=e=>{n||c({iframeLifecycleState:`error`,lastError:zP(e).message})},d=()=>{if(n||!i)return;let e=y.current,t=Zv(e,i);i=null,T.current({message_type:`conversation`,event_type:`conversation.append_llm_context`,conversation_id:e.conversation_id,properties:{context:t}}),c({lastModelContextUpdate:e.canvas_config.component,lastError:void 0})},f=()=>{if(r)return;if(e.src!==l){e.src;return}if(n||!e.contentWindow)return;let f=new KA(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:kP(a,OP(v.current,e),b.current,h.current,_.current,g.current)});r=f,m.current=f,f.oninitialized=()=>{n||(c({iframeLifecycleState:`ready`}),x.current=y.current.revision,f.sendToolInput({arguments:y.current.arguments}).catch(u))},f.onsizechange=({height:e})=>{if(!n&&typeof e==`number`&&Number.isFinite(e)){let t=Math.min(Math.max(e,_P),720);ee(t),w.current(y.current.id,t)}},f.onmessage=async e=>{let r=qv(e);if(!r){if(pP(e)){let e=`Magic Canvas message included text without interaction metadata; no interaction row was recorded.`;return c({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`missing_interaction_metadata`,message:e}}return{}}let i=y.current,a=(()=>{try{let e=Jv(i,r);return{interaction:e,request:ky(e)}}catch(e){return{error:e}}})();if(`error`in a){let e=zP(a.error).message;return c({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`interaction_normalization_failed`,message:e}}let{interaction:o,request:l}=a,u=``;try{u=Xv(e,o)}catch(e){c({lastError:zP(e).message}),o.type===`submit`&&console.warn(`Magic Canvas dropped the response text of a submitted card.`,e)}let d=!0;try{await uP(t,o.conversation_id,l.body)}catch(e){d=!1,dP(e)?fP(e,c):(console.warn(`Magic Canvas interaction POST failed; continuing without it and retrying in the background.`,e),c({lastInteractionPostResult:`failed_open`,lastError:zP(e).message}),mP(t,o.conversation_id,l.body,c))}if(n)return{};if(u)try{T.current({message_type:`conversation`,event_type:`conversation.respond`,conversation_id:i.conversation_id,properties:{text:u}})}catch(e){console.error(`Magic Canvas respond send failed.`,e),c({lastError:zP(e).message})}return d&&c({lastInteractionPostResult:`success`,lastError:void 0}),Yv(o)&&(o.type===`submit`?(s&&clearTimeout(s),s=setTimeout(()=>{s=null,n||S.current()},gP(i.arguments))):S.current()),{}},f.onupdatemodelcontext=async e=>(i=e,o||=setTimeout(()=>{o=null,d()},oP),{}),f.onrequestdisplaymode=async({mode:e})=>{let t=e===`fullscreen`?`fullscreen`:`inline`;return C.current(t),b.current={...b.current,display_mode:t,viable_slot:t===`fullscreen`?`full`:b.current.viable_slot},f.setHostContext(kP(y.current,v.current,b.current,h.current,_.current,g.current)),{mode:t}},f.connect(new xP(e)).then(()=>void 0).catch(u)};c({iframeLifecycleState:`mounting`,lastInteractionPostResult:void 0}),a.canvas_config.sandbox_url,e.src=a.canvas_config.sandbox_url;let E=()=>{f()};return e.addEventListener(`load`,E),f(),()=>{o&&=(clearTimeout(o),null),s&&=(clearTimeout(s),null),d(),n=!0,e.removeEventListener(`load`,E),m.current=null,c({iframeLifecycleState:`closed`}),r&&Av(r)}},[t,a.id,a.canvas_config.sandbox_url,c]),k(()=>{a.revision!==0&&(a.revision<=x.current||(x.current=a.revision,m.current?.sendToolInput({arguments:a.arguments}).catch(e=>{c({iframeLifecycleState:`error`,lastError:zP(e).message})})))},[a.arguments,a.revision,c]);let te=o.viable_slot===`full`||o.display_mode===`fullscreen`,ne=te?null:AP(E,e,r),re=ne?.placeholderStyle,ie=ne?.cardStyle,ae=te?{height:`100%`}:ne?.iframeStyle??{height:`${E}px`},oe=[`pointer-events-auto w-full overflow-hidden rounded-box border-[length:var(--border)] border-base-300 bg-base-100 transition-[opacity,transform]`,r?``:`shadow-xl`,te?`fixed inset-4 z-10 max-w-none`:n?`max-w-none`:`max-w-md`,s?`scale-[0.98] opacity-40`:``].filter(Boolean).join(` `),se=yP[a.canvas_config.component]??vP,ce=P(`div`,{class:oe,style:ie,"data-canvas-card":o.viable_slot,children:P(`iframe`,{ref:p,title:`${a.canvas_config.component} ${a.canvas_config.component_version}`,class:te?`block h-full w-full border-0 bg-transparent`:`block border-0 bg-transparent`,sandbox:se,style:ae})});return te?ce:P(`div`,{class:`block w-full`,style:re,children:ce})}var EP=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`];function DP(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of EP){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function OP(e,t){let n=DP(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function kP(e,t,n,r,i,a=!1){let o=Ay(t,n),s=n.viable_slot===`full`||n.display_mode===`fullscreen`,c=s?void 0:LP(r),l=s?1:AP(i??0,r,a)?.displayScale??1;return{...e.canvas_config.host_context,...o,containerDimensions:{...RP(o.containerDimensions)?o.containerDimensions:{},...c===void 0?{}:{maxHeight:c},displayScale:l}}}function AP(e,t,n=!1){if(t===void 0||!Number.isFinite(t)||t<=0)return null;let r=Math.min(e,720);if(n)return{displayScale:1,placeholderStyle:{height:`${t}px`},cardStyle:{height:`100%`},iframeStyle:{width:`100%`,height:`100%`}};if(r<=t)return{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${r}px`}};let i=t/r;return{displayScale:i,placeholderStyle:{height:`${r*i}px`,maxHeight:`${t}px`,overflow:`hidden`},cardStyle:{height:`${r}px`,transform:`scale(${i})`,transformOrigin:`top center`},iframeStyle:{width:`100%`,height:`${r}px`}}}function jP(){let e=A(null),[t,n]=O(()=>NP(null));return k(()=>{let t=()=>n(t=>{let n=NP(e.current);return t.width===n.width&&t.height===n.height&&t.visualViewportHeight===n.visualViewportHeight?t:n});t(),globalThis.addEventListener(`resize`,t),globalThis.visualViewport?.addEventListener(`resize`,t);let r;return typeof ResizeObserver<`u`&&e.current&&(r=new ResizeObserver(t),r.observe(e.current)),()=>{globalThis.removeEventListener(`resize`,t),globalThis.visualViewport?.removeEventListener(`resize`,t),r?.disconnect()}},[]),[e,t]}function MP(){let e=A(null),[t,n]=O();return k(()=>{let t=e.current;if(!t)return;let r=e=>{let r=e??t.getBoundingClientRect().height;!Number.isFinite(r)||r<=0||n(Math.floor(r))},i=()=>r();if(i(),typeof ResizeObserver>`u`)return globalThis.addEventListener(`resize`,i),()=>globalThis.removeEventListener(`resize`,i);let a=new ResizeObserver(e=>{r(e[0]?.contentRect.height)});return a.observe(t),()=>a.disconnect()},[]),[e,t]}function NP(e){let t=globalThis.visualViewport?.height,n=e?.getBoundingClientRect();if(n&&n.width>0&&n.height>0){let e=t===void 0?void 0:Math.max(0,(globalThis.innerHeight||0)-t);return{width:n.width,height:n.height,visualViewportHeight:e===void 0?void 0:Math.max(0,n.height-e)}}return{width:globalThis.innerWidth||1024,height:globalThis.innerHeight||768,visualViewportHeight:t}}function PP(e){let t=`absolute flex gap-2`;switch(e){case`safe-area-left`:return`${t} left-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;case`safe-area-right`:return`${t} right-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;case`safe-area-bottom`:return`${t} right-4 bottom-24 left-4 flex-col items-center justify-end @max-mobile:right-3 @max-mobile:bottom-20 @max-mobile:left-3`;case`full`:return`${t} inset-4 flex-col items-stretch justify-stretch`}}function FP(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function IP(){return!1}function LP(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function RP(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function zP(e){return e instanceof Error?e:Error(String(e))}var BP=class extends ee{state={errored:!1};componentDidCatch(e){this.props.onError(e),this.setState({errored:!0})}render(){return this.state.errored?null:this.props.children}},VP=1e4;function HP(e,t=VP){let[n,r]=O(!1),i=A(!1);return k(()=>{if(!e){r(!1);return}if(i.current)return;i.current=!0,r(!0);let n=setTimeout(()=>r(!1),t);return()=>clearTimeout(n)},[e,t]),n}function UP(e){let t=Wd(),n=Xd(t??``),r=!Qd(t??``).isOff,i=lv(e),a=i.phase===`ready`?i.replicaId:``,o=Qd(a),s=!r&&(o.state===`playable`||o.state===`loading`),c=i.phase===`ready`&&!e&&!i.videoState.isOff,l=!e&&t!==null&&!n.isOff,u=i.phase!==`ready`||i.videoState.isOff;return j(()=>({presence:i,localId:t,isScreenSharing:r,isPersonaPresenting:s,hasPersonaVideo:c,hasSelfView:l}),[i.phase,a,u,t,r,s,c,l])}function WP(e,t,n){let[r,i]=O(!0);return k(()=>{if(!t)return;let n=e.current;if(!n||typeof matchMedia!=`function`)return;let r=matchMedia(`(hover: hover) and (pointer: fine)`),a=()=>{try{return n.matches(`:has(:focus-visible)`)}catch{return!1}},o=n.matches(`:hover`),s=()=>{i(!r.matches||o||a())},c=()=>{o=!0,s()},l=()=>{o=!1,s()};return n.addEventListener(`pointerenter`,c),n.addEventListener(`pointerleave`,l),n.addEventListener(`focusin`,s),n.addEventListener(`focusout`,s),r.addEventListener(`change`,s),s(),()=>{n.removeEventListener(`pointerenter`,c),n.removeEventListener(`pointerleave`,l),n.removeEventListener(`focusin`,s),n.removeEventListener(`focusout`,s),r.removeEventListener(`change`,s)}},[t,e,n]),r}function GP(e,t,n,r,i){let[a,o]=O(void 0);return k(()=>{if(!r)return;let i=e.current,a=t.current;if(!i||!a||typeof ResizeObserver>`u`)return;let s=()=>{let e=i.getBoundingClientRect(),t=1/0,r=-1/0;for(let e of a.children){let n=e.getBoundingClientRect();n.width!==0&&(t=Math.min(t,n.left),r=Math.max(r,n.right))}if(e.width===0||!Number.isFinite(t)||r<=t)return;let s={x:Math.round(t-e.left),y:Math.round(e.height-n),width:Math.round(r-t),height:n};o(e=>e!==void 0&&e.x===s.x&&e.y===s.y&&e.width===s.width&&e.height===s.height?e:s)},c=new ResizeObserver(s);c.observe(i),c.observe(a);for(let e of a.children)c.observe(e);return s(),()=>c.disconnect()},[r,e,t,n,i]),a}var KP=1e4;function qP({onTimeout:e,timeoutMs:t=KP,active:n=!0}){let r=cv().length>0,[i,a]=O(!1),o=A(e);return k(()=>{o.current=e},[e]),k(()=>{if(!n||r){a(!1);return}let e=setTimeout(()=>{a(!0),o.current()},t);return()=>clearTimeout(e)},[n,r,t]),{hasJoined:r,timedOut:i}}function JP(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function YP({onShutdown:e}){let t=A(e);k(()=>{t.current=e},[e]),qd({onAppMessage:M(e=>{JP(e?.data)&&t.current()},[])})}var XP=hn(`PiP`),ZP=360,QP=280;function $P(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window}function eF(e){let{enabled:t,active:n}=e,[r,i]=O(null),a=$P(),o=N(ym),s=M(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=M(async()=>{if(a&&t&&n&&(!r||r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:ZP,height:QP}),t=Le.replace(/:host(?=[\s,{])/g,`:host, :root`),n=e.document.createElement(`style`);n.textContent=t,e.document.head.appendChild(n),e.document.body.style.margin=`0`,e.document.body.style.width=`100%`,e.document.body.style.height=`100vh`,e.document.body.style.overflow=`hidden`,e.addEventListener(`pagehide`,()=>{i(t=>t===e?null:t)},{once:!0}),i(e)}catch(e){XP.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return k(()=>{if(!t||!a||!n)return;let e=()=>{document.visibilityState===`hidden`?c():document.visibilityState===`visible`&&s()};document.addEventListener(`visibilitychange`,e);let r=[],i=null,o=`none`,l=!1;if(typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;i=e.metadata,o=e.playbackState;try{e.metadata=new MediaMetadata({title:`Tavus conversation`}),e.playbackState=`playing`,l=!0}catch(e){XP.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),r.push(t)}catch(e){XP.info(`mediaSession.${t} not supported`,e)}};t(`enterpictureinpicture`,()=>{c()}),t(`play`,()=>{}),t(`pause`,()=>{})}return()=>{if(document.removeEventListener(`visibilitychange`,e),typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;for(let t of r)try{e.setActionHandler(t,null)}catch{}if(l)try{e.metadata=i,e.playbackState=o}catch{}}}},[t,a,n,c,s]),k(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),k(()=>()=>{r&&!r.closed&&r.close()},[r]),k(()=>{if(!r||r.closed||!o)return;let e=()=>{r.document.body.setAttribute(`data-theme`,o.dataTheme.value);let e=o.cssVars.value;for(let[t,n]of Object.entries(e))r.document.body.style.setProperty(t,n)};e();let t=o.dataTheme.subscribe(()=>e()),n=o.cssVars.subscribe(()=>e());return()=>{t(),n()}},[r,o]),{pipWindow:r,isSupported:a,requestPipWindow:c,closePipWindow:s}}var tF=Bt(null),nF={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},rF=U(({id:e,showAudioWave:t=!0})=>{let n=Xd(e).isOff;return P(`div`,{class:`relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n?`hidden`:``}`,children:[P(jf,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover ${n?`hidden`:``}`}),t&&P(`div`,{class:`absolute bottom-2 right-2`,children:P(tv,{id:e})})]})}),iF=U(()=>{let e=Wd(),{isScreenSharing:t}=m_(),n=cv()[0];return P(E,{children:[t&&n&&P(rF,{id:n}),e&&P(rF,{id:e,showAudioWave:!1})]})}),aF=U(()=>P(`div`,{class:`absolute bottom-4 @max-mobile:bottom-20 left-4 flex flex-col items-end gap-2 z-20`,children:P(iF,{})})),oF=U(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,effect:i,animate:a})=>P(E,{children:[P(`div`,{class:`absolute inset-0 bg-base-200`}),i.content&&P(`div`,{class:`absolute overflow-hidden rounded-box bg-black`,style:nP(i.content,a),children:P(jf,{sessionId:n?t??``:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 h-full w-full object-contain`})}),i.replica&&P(`div`,{class:UN(`absolute overflow-hidden`,i.replicaCollapsed&&`rounded-box`),style:nP(i.replica,a),children:P(pv,{personaSessionId:e,localSessionId:t,isScreenSharing:!1,avatarOff:r})})]})),sF=U(()=>{let{effect:e,animate:t}=JN.value,n=Wd();return n===null||e.selfView===null?null:P(`div`,{class:`absolute z-20 overflow-hidden rounded-box bg-black/30`,style:nP(e.selfView,t),children:P(jf,{automirror:!0,sessionId:n,type:`video`,fit:`cover`,className:`h-full w-full object-cover`})})}),cF=U(({canvasRenderedSlot:e})=>{let t=lM(JN.value.effect);return t===`hidden`?null:t===`engine`?P(BP,{onError:tM,children:P(sF,{})}):e===`safe-area-bottom`?null:P(aF,{})}),lF=U(()=>{let e=cv()[0];return e?P(Mf,{sessionId:e}):null}),uF=U(e=>P(E,{children:[P(lF,{}),P(dF,{...e})]})),dF=U(({isAudioOnly:e,presence:t,canvasLayoutEffect:n,canvasRenderedSlot:r})=>{let{presence:i,localId:a,isScreenSharing:o,isPersonaPresenting:s}=t,c=JN.value,l=n.active&&!o&&(!e||s);return i.phase===`left`?P($_,{}):i.phase===`connecting`?P(Q_,{}):e&&!s?P(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:P(av,{sessionId:i.replicaId})}):c.effect.driving?P(BP,{onError:tM,children:P(oF,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,effect:c.effect,animate:c.animate})}):s?P(cb,{personaSessionId:i.replicaId,isAudioOnly:e,avatarOff:i.videoState.isOff,canvasLayoutEffect:n,smartSidecarActive:l}):P(fF,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,smartSidecarActive:l,canvasLayoutEffect:n,canvasRenderedSlot:r})}),fF=U(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,smartSidecarActive:i,canvasLayoutEffect:a,canvasRenderedSlot:o})=>P(ob,{canvasLayoutEffect:a,smartSidecarActive:i,isScreenSharing:n,captureSnapshot:gF,personaMode:`auto`,renderedSlot:o,fill:i=>P(pv,{personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})})),pF=U(({items:e})=>{let[t,n]=O(!1),r=A(null);return k(()=>{if(!t)return;let e=e=>{r.current&&!e.composedPath().includes(r.current)&&n(!1)},i=e=>{e.key===`Escape`&&n(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,i)}},[t]),P(`div`,{ref:r,class:`relative`,children:[P(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-pressed":t,"aria-expanded":t,"aria-haspopup":`true`,"aria-label":t?`Close more controls`:`More controls`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:P(bg,{name:`more`})}),t&&P(`div`,{role:`menu`,class:`absolute bottom-full mb-1 left-1/2 -translate-x-1/2 flex flex-row items-center gap-1 p-1 rounded-box bg-base-100 border border-base-300 shadow-lg z-30 whitespace-nowrap`,children:e})]})}),mF=U(({items:e})=>e.length<=1?P(E,{children:e}):P(pF,{items:e})),hF=U(({onLeave:e})=>{let t=Ud(),{config:n}=Xp(),{session:r,end:i}=z_(),a=Wd(),o=A(null),s=N(ch)?.frameRef??o,[c,l]=O(!1),u=Wg()===`full-screen`,[d,f]=O(!1),[p,m]=O(nF),[h,g]=O(null),_=n.value.customization.conversation,v=HP(_.show_fullscreen_hint&&h!==null&&!c&&!u),y=A(null),b=A(null),x=r.value?.conversationUrl,S=r.value?.magicGrid===!0,C=Yj(_.magic_grid,S),w=WP(y,C,x),T=GP(y,b,72,C,x),E=_.modality===`audio`,ee=UP(E),te=_.modality===`chat`,ne=_.modality===`video`,re=_.enable_chat,ie=_.enable_closed_captions,ae=_.enable_picture_in_picture,{pipWindow:oe}=eF({enabled:ae&&!te,active:t===`joined-meeting`});k(()=>()=>{i()},[i]);let{camera:se,requestCamera:ce}=um(),{isCamMuted:D}=f_(),le=se.isGranted&&!D;k(()=>{ne&&t===`joined-meeting`&&(tF.value=le)},[ne,t,le]);let ue=A(ne&&!a&&tF.value===!0);k(()=>{t===`joined-meeting`&&ue.current&&(ue.current=!1,ce())},[t,ce]),k(()=>{(t===`left-meeting`||t===`error`)&&e()},[t,e]),k(()=>{let e=()=>{let e=s.current,t=e?.getRootNode(),n=t instanceof Document||t instanceof ShadowRoot?t:null;l(!!e&&n?.fullscreenElement===e)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let de=M(()=>{let e=s.current;if(!e)return;let t=e.getRootNode();(t instanceof Document||t instanceof ShadowRoot?t:null)?.fullscreenElement===e?document.exitFullscreen?.():e.requestFullscreen?.()},[]);M(()=>{f(e=>!e)},[]);let fe=M(()=>{i()},[i]);if(qP({active:!te&&t===`joined-meeting`,onTimeout:fe}),YP({onShutdown:fe}),!x)return null;if(te)return P(K_,{defaultOpen:!0,children:P(`div`,{class:`cvi-call-surface absolute inset-0`,children:P(X_,{docked:!0,headerAction:P(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle text-base-content/60 hover:text-error`,onClick:fe,"aria-label":`Leave conversation`,children:P(bg,{name:`leave`,size:20,"aria-label":`Leave conversation`})})})})});let pe=[P(R_,{compact:!0},`screen-share`)];re&&pe.push(P(J_,{compact:!0},`chat`));let me=t===`left-meeting`;return P(V_,{children:P(K_,{children:P(x_,{children:[P(`div`,{class:`cvi-call-surface absolute inset-0${E?``:` cvi-video-surface`}`,ref:y,children:[P(`div`,{class:`relative w-full h-full z-[5]`,children:[P(uF,{isAudioOnly:E,presence:ee,canvasLayoutEffect:p,canvasRenderedSlot:h}),!E&&P(cF,{canvasRenderedSlot:h}),P(CP,{debugEnabled:d,callPresence:ee,callControlsVisible:w,callControlsRect:T,gridConfigEnabled:_.magic_grid,gridStartEnabled:S,onLayoutEffectChange:m,onRenderedSlotChange:g}),!u&&P(`div`,{class:`cvi-autohide absolute top-4 right-4 z-20`,"data-hidden":me,"data-pinned":v,children:P(ev,{active:c,onToggle:de,nudge:v,compact:!0})})]}),P(X_,{}),P(W_,{}),P(`div`,{class:`cvi-autohide cvi-autohide-slide pointer-events-none absolute bottom-6 left-0 right-0 z-20`,"data-hidden":me,"aria-hidden":me,children:P(`div`,{class:`cvi-control-rail flex justify-center items-center gap-2 @max-mobile:gap-1`,"data-hidden":me,ref:b,children:[P(N_,{level:!0}),!E&&P(F_,{}),ie&&P(U_,{}),P(mF,{items:pe}),P(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:fe,"aria-label":`Leave call`,children:P(bg,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),oe&&vf(P(dv,{onLeave:fe}),oe.document.body)]})})})});function gF(e){if(!e||e.readyState<2||!e.videoWidth||!e.videoHeight)return null;let t=document.createElement(`canvas`),n=Math.round(640*(e.videoHeight/e.videoWidth));t.width=640,t.height=n;let r=t.getContext(`2d`);if(!r)return null;r.drawImage(e,0,0,640,n);try{return t.toDataURL(`image/jpeg`,.82)}catch{return null}}function _F(e,t,n){switch(t){case`granted`:return n?e?.cameraOptional??`Camera is optional — turn it on anytime.`:e?.ready??`You're all set — join whenever you're ready.`;case`blocked`:return e?.denied??`Microphone is blocked. Click the mic to see how to allow it.`;case`in-use`:return`Your microphone is in use by another app. Close it and try again.`;case`not-found`:return`No microphone found. Connect one to continue.`;case`unsupported`:return`This browser can't access your microphone.`;case`prompt`:return e?.prompt??`Allow microphone access to join.`;default:return e?.loading??`Getting your microphone ready...`}}var vF=U(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=Hd(),{config:a}=Xp(),{cameraOnStart:o}=N(bt),{localSessionId:s,isCamMuted:c}=f_(),{mic:l,camera:u,requestMic:d,requestCamera:f}=um(),p=a.value.customization.conversation.modality===`video`,m=Tg(a.value),h=wg(a.value);k(()=>{d()},[]);let g=l.isGranted,_=A(!1);k(()=>{p&&o!==`off`&&g&&!_.current&&(u.isGranted||u.isBlocked||(_.current=!0,f()))},[p,o,g,u.isGranted,u.isBlocked,f]);let v=p&&g&&!u.isGranted,y=_F(e,l.status,v);return P(x_,{children:P(`div`,{class:`absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,children:[u.isGranted&&!c?P(`div`,{class:`absolute inset-0 flex items-center justify-center bg-black overflow-hidden`,children:P(jf,{type:`video`,sessionId:s??``,mirror:!0,fit:`cover`,className:`w-full h-full object-cover!`})}):P(`div`,{class:`absolute inset-0 overflow-hidden bg-base-300`,children:[P(Ag,{variant:m.background,replica:h}),P(`div`,{class:`${t_} backdrop-blur-xs`})]}),P(`div`,{class:`absolute bottom-6 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[90%]`,children:[y&&P(Kg,{message:y,class:`relative`}),P(`div`,{class:`flex flex-wrap items-center justify-center gap-1.5 @max-mobile:gap-1`,children:[P(`div`,{class:`flex items-center justify-center gap-1.5 shrink-0 @max-mobile:gap-1`,children:[P(N_,{level:!0}),p&&P(F_,{})]}),P(Pg,{class:`btn-accent `,loading:t,disabled:!g,onClick:n,children:e?.join??`Join`}),P(`button`,{type:`button`,class:`btn btn-control ${l.isBlocked?`btn-error`:`btn-neutral`}`,onClick:()=>{i&&i.leave(),r?.()},"aria-label":e?.cancel??`Cancel`,title:e?.cancel??`Cancel`,children:P(bg,{name:`cancel`})})]})]})]})})}),yF=`Password required`,bF=`Enter the password to start this conversation.`,xF=`Password`,SF=`Continue`;function CF({onSubmit:e,text:t,isSubmitting:n=!1,errorMessage:r}){let[i,a]=O(``),o=et();return P(`div`,{class:`absolute inset-0 z-30 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`${o}-title`,children:P(`form`,{onSubmit:t=>{t.preventDefault();let r=i.trim();r&&!n&&e(r)},class:`card bg-base-100 shadow-xl w-full max-w-sm`,children:P(`div`,{class:`card-body gap-3`,children:[P(`h3`,{id:`${o}-title`,class:`card-title text-base-content`,children:t?.title??yF}),P(`p`,{class:`text-sm text-base-content/70`,children:t?.description??bF}),P(`input`,{id:o,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:t?.placeholder??xF,value:i,disabled:n,onInput:e=>a(e.target.value),autoFocus:!0}),r&&P(`p`,{class:`text-error text-xs`,role:`alert`,children:r}),P(Pg,{class:`btn-primary`,type:`submit`,disabled:!i.trim(),loading:n,children:t?.submit??SF})]})})})}function wF({text:e,onStart:t,isStarting:n,permissionRequest:r}){let{config:i,deploymentId:a}=Xp(),o=Wg()===`full-screen`,s=N(Ep),c=Tg(i.value),l=c.btn_title??e?.fallback_button??`Start the conversation`,u=i.value.customization.terms_content?.trim()??``,d=i.value.customization.terms_enabled===!0,f=u.length>0,p=f&&d,m=j(()=>p&&tp(a,u),[p,a,u]),h=p&&!m,g=i.value.has_password===!0,_=s?.password.value??null,v=g&&!_,y=et(),[b,x]=O(m),S=n||p&&!b||v;return P(r_,{title:c.title,description:c.description,overlay:v&&s?P(CF,{onSubmit:s.setPassword}):null,children:[P(`div`,{class:`relative`,children:[r&&P(Kg,{message:Gg(r),class:`absolute bottom-full mb-3 z-20 ${o?`left-1/2 -translate-x-1/2`:`right-0`}`}),P(o_,{onClick:()=>{p&&b&&!m&&ip(a,u),t()},disabled:S,loading:n,children:l})]}),f&&P(`div`,{class:`max-w-xs text-center`,children:h?P(`label`,{for:y,class:`flex items-center gap-2 text-xs text-left cursor-pointer`,children:[P(`input`,{id:y,type:`checkbox`,class:`checkbox checkbox-secondary checkbox-xs mt-0.5 shrink-0`,checked:b,onChange:e=>x(e.target.checked)}),P(`span`,{class:`leading-snug`,children:u})]}):P(`p`,{class:`text-xs leading-snug text-white/70`,children:u})})]})}function TF(...e){for(let t of e){let e=t?.trim();if(e)return e}}function EF(){let{config:e}=Xp(),{haircheck:t}=e.value.customization;return j(()=>({prompt:TF(t.permission_request_description,t.permission_request_title),ready:TF(t.permission_granted_description,t.permission_granted_title),denied:TF(t.permission_denied_description,t.permission_denied_title),join:TF(t.join_button),cancel:TF(t.cancel_btn)}),[t])}function DF({flow:e,welcomeText:t,onUnavailableCancel:n}){let r=EF();switch(e.state){case`idle`:return P(wF,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting,permissionRequest:e.permissionRequest});case`haircheck`:return P(vF,{text:r,onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return P(hF,{onLeave:()=>e.leave()});case`ended`:return P(d_,{isStarting:e.isStarting,permissionRequest:e.permissionRequest,onRestart:()=>{e.start()}});case`unavailable`:return P(Bg,{cause:e.unavailableCause??`busy`,canRetry:e.canRetry,isStarting:e.isStarting,onRetry:()=>{e.start()},onCancel:n});default:{let t=e.state;throw Error(`Unreachable flow state: ${String(t)}`)}}}function OF(){let{config:e,configError:t}=Xp(),n=Ug(),r=Vg(),i=j(()=>({fallback_button:n.start_button}),[n.start_button]),a=e.value.is_available,o=e.value.unavailable_reason;return P(lh,{children:t.value?P(Bg,{cause:`error`,canRetry:!1,onRetry:()=>{}}):a===!1?P(Bg,{cause:o??`daily_limit`,canRetry:!1,onRetry:()=>{}}):P(DF,{flow:r,welcomeText:i})})}var kF=`:host {
166
+ - "app": Tool callable by the app from this server only`),csp:_D().optional(),permissions:_D().optional()}),X({mimeTypes:Y(q()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});var Yj=X({method:Z(`ui/download-file`),params:X({contents:Y(yD([CA,wA])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Xj=X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(TA).describe(`Message content blocks (text, image, etc.).`)})});X({method:Z(`ui/notifications/sandbox-resource-ready`),params:X({html:q().describe(`HTML content to load into the inner iframe.`),sandbox:q().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:Ij.optional().describe(`CSP configuration from resource metadata.`),permissions:Lj.optional().describe(`Sandbox permissions from resource metadata.`)})}),X({method:Z(`ui/notifications/tool-result`),params:PA.describe(`Standard MCP tool execution result.`)});var Zj=X({toolInfo:X({id:ek.optional().describe(`JSON-RPC id of the tools/call request.`),tool:jA.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:jj.optional().describe(`Current color theme preference.`),styles:Bj.optional().describe(`Style configuration for theming the app.`),displayMode:Mj.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(Mj).optional().describe(`Display modes the host supports.`),containerDimensions:yD([X({height:J().describe(`Fixed container height in pixels.`)}),X({maxHeight:yD([J(),mD()]).optional().describe(`Maximum container height in pixels.`)})]).and(yD([X({width:J().describe(`Fixed container width in pixels.`)}),X({maxWidth:yD([J(),mD()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
167
+ container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:q().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:q().optional().describe(`User's timezone in IANA format.`),userAgent:q().optional().describe(`Host application identifier.`),platform:yD([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:pD().optional().describe(`Whether the device supports touch input.`),hover:pD().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:J().describe(`Top safe area inset in pixels.`),right:J().describe(`Right safe area inset in pixels.`),bottom:J().describe(`Bottom safe area inset in pixels.`),left:J().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough();X({method:Z(`ui/notifications/host-context-changed`),params:Zj.describe(`Partial context update containing only changed fields.`)});var Qj=X({method:Z(`ui/update-model-context`),params:X({content:Y(TA).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:SD(q(),gD().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),$j=X({method:Z(`ui/initialize`),params:X({appInfo:hk.describe(`App identification (name and version).`),appCapabilities:Gj.describe(`Features and capabilities this app provides.`),protocolVersion:q().describe(`Protocol version this app supports.`)})});X({protocolVersion:q().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:hk.describe(`Host application identification and version.`),hostCapabilities:Wj.describe(`Features and capabilities provided by the host.`),hostContext:Zj.describe(`Rich context about the host environment.`)}).passthrough();var eM=[Aj],tM=class extends kj{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(e,t)=>{this._baseReplaceRequestHandler(e,(e,n)=>(this._initializedReceived||console.warn(`[ext-apps] AppBridge received '${e.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`),t(e,n)))};eventSchemas={sizechange:Rj,sandboxready:Fj,initialized:Kj,requestteardown:Uj,loggingmessage:HA};constructor(e,t,n,r){super(r),this._client=e,this._hostInfo=t,this._capabilities=n,this.addEventListener(`initialized`,()=>{this._initializedReceived=!0}),this._hostContext=r?.hostContext||{},this.setRequestHandler($j,e=>this._oninitialize(e)),this.setRequestHandler(Tk,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(qj,e=>({mode:this._hostContext.displayMode??`inline`}))}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(`sizechange`)}set onsizechange(e){this.setEventHandler(`sizechange`,e)}get onsandboxready(){return this.getEventHandler(`sandboxready`)}set onsandboxready(e){this.setEventHandler(`sandboxready`,e)}get oninitialized(){return this.getEventHandler(`initialized`)}set oninitialized(e){this.setEventHandler(`initialized`,e)}_onmessage;get onmessage(){return this._onmessage}set onmessage(e){this.warnIfRequestHandlerReplaced(`onmessage`,this._onmessage,e),this._onmessage=e,this.replaceRequestHandler(Xj,async(e,t)=>{if(!this._onmessage)throw Error(`No onmessage handler set`);return this._onmessage(e.params,t)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(e){this.warnIfRequestHandlerReplaced(`onopenlink`,this._onopenlink,e),this._onopenlink=e,this.replaceRequestHandler(Pj,async(e,t)=>{if(!this._onopenlink)throw Error(`No onopenlink handler set`);return this._onopenlink(e.params,t)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(e){this.warnIfRequestHandlerReplaced(`ondownloadfile`,this._ondownloadfile,e),this._ondownloadfile=e,this.replaceRequestHandler(Yj,async(e,t)=>{if(!this._ondownloadfile)throw Error(`No ondownloadfile handler set`);return this._ondownloadfile(e.params,t)})}get onrequestteardown(){return this.getEventHandler(`requestteardown`)}set onrequestteardown(e){this.setEventHandler(`requestteardown`,e)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(e){this.warnIfRequestHandlerReplaced(`onrequestdisplaymode`,this._onrequestdisplaymode,e),this._onrequestdisplaymode=e,this.replaceRequestHandler(qj,async(e,t)=>{if(!this._onrequestdisplaymode)throw Error(`No onrequestdisplaymode handler set`);return this._onrequestdisplaymode(e.params,t)})}get onloggingmessage(){return this.getEventHandler(`loggingmessage`)}set onloggingmessage(e){this.setEventHandler(`loggingmessage`,e)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(e){this.warnIfRequestHandlerReplaced(`onupdatemodelcontext`,this._onupdatemodelcontext,e),this._onupdatemodelcontext=e,this.replaceRequestHandler(Qj,async(e,t)=>{if(!this._onupdatemodelcontext)throw Error(`No onupdatemodelcontext handler set`);return this._onupdatemodelcontext(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(IA,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(XA,async(t,n)=>e(t.params,n))}sendToolListChanged(e={}){return this.notification({method:`notifications/tools/list_changed`,params:e})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(e){this.warnIfRequestHandlerReplaced(`onlistresources`,this._onlistresources,e),this._onlistresources=e,this.replaceRequestHandler(Qk,async(e,t)=>{if(!this._onlistresources)throw Error(`No onlistresources handler set`);return this._onlistresources(e.params,t)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(e){this.warnIfRequestHandlerReplaced(`onlistresourcetemplates`,this._onlistresourcetemplates,e),this._onlistresourcetemplates=e,this.replaceRequestHandler(eA,async(e,t)=>{if(!this._onlistresourcetemplates)throw Error(`No onlistresourcetemplates handler set`);return this._onlistresourcetemplates(e.params,t)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(e){this.warnIfRequestHandlerReplaced(`onreadresource`,this._onreadresource,e),this._onreadresource=e,this.replaceRequestHandler(iA,async(e,t)=>{if(!this._onreadresource)throw Error(`No onreadresource handler set`);return this._onreadresource(e.params,t)})}sendResourceListChanged(e={}){return this.notification({method:`notifications/resources/list_changed`,params:e})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(e){this.warnIfRequestHandlerReplaced(`onlistprompts`,this._onlistprompts,e),this._onlistprompts=e,this.replaceRequestHandler(hA,async(e,t)=>{if(!this._onlistprompts)throw Error(`No onlistprompts handler set`);return this._onlistprompts(e.params,t)})}sendPromptListChanged(e={}){return this.notification({method:`notifications/prompts/list_changed`,params:e})}assertCapabilityForMethod(e){}assertRequestHandlerCapability(e){}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}getCapabilities(){return this._capabilities}async _oninitialize(e){let t=e.params.protocolVersion;return this._appInfo!==void 0&&console.warn(`[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.`),this._appCapabilities=e.params.appCapabilities,this._appInfo=e.params.appInfo,{protocolVersion:eM.includes(t)?t:Aj,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(e){let t={},n=!1;for(let r of Object.keys(e)){let i=this._hostContext[r],a=e[r];nM(i,a)||(t[r]=a,n=!0)}n&&(this._hostContext=e,this.sendHostContextChange(t))}sendHostContextChange(e){return this.notification({method:`ui/notifications/host-context-changed`,params:e})}sendToolInput(e){return this.notification({method:`ui/notifications/tool-input`,params:e})}sendToolInputPartial(e){return this.notification({method:`ui/notifications/tool-input-partial`,params:e})}sendToolResult(e){return this.notification({method:`ui/notifications/tool-result`,params:e})}sendToolCancelled(e){return this.notification({method:`ui/notifications/tool-cancelled`,params:e})}sendSandboxResourceReady(e){return this.notification({method:`ui/notifications/sandbox-resource-ready`,params:e})}teardownResource(e,t){return this.request({method:`ui/resource-teardown`,params:e},Vj,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},PA,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},NA,t)}async connect(e){if(this.transport)throw Error(`AppBridge is already connected. Call close() before connecting again.`);if(this._initializedReceived=!1,this._client){let e=this._client.getServerCapabilities();if(!e)throw Error(`Client server capabilities not available`);e.tools&&(this.oncalltool=async(e,t)=>this._client.request({method:`tools/call`,params:e},PA,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(LA,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},$k,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},tA,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},aA,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(oA,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},gA,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(OA,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function nM(e,t){return JSON.stringify(e)===JSON.stringify(t)}function rM(){let e=F(Sh);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}var iM={committedClass:null,pendingClass:null,pendingSinceMs:null,lastResolution:null},aM={composition:{stackedMaxAspect:1},classes:{widthCompactMaxPx:767,widthMediumMaxPx:1023,heightShortMaxPx:479},hysteresis:{windowMs:250,decisiveJumpPxDelta:200},rail:{widthPx:448,insetPx:16,gutterPx:24},sidecar:{minViewportWidthPx:900,maxVideoShiftPx:360,maxVideoShiftFraction:.3},card:{maxHeightPx:720,reportedHeightFloorPx:48,coldDefaultHeightPx:320,minDisplayScale:.85,layoutDefaultMinHeightPx:240,stackBandMaxFraction:.6,stackMaxWidthPx:600,componentOverrides:{}},content:{stackedAspect:16/9},pip:{gapPaddingPx:24,minWidthPx:128,maxAreaRatio:.35},motion:{layoutTransitionMs:560},insets:{callControlsBottomPx:72,participantsPadPx:16,cardsPadPx:16,surfacePadPx:16,compactCardsPadPx:8,compactSurfacePadPx:8},eviction:{policy:`evict-oldest`,maxVisibleCards:2,compactTakeoverMaxCards:1},degradationLadder:[`evict-cards`,`drop-self-view`,`collapse-replica`]};function oM(e,t){let n=Math.round(e.widthPx),r=Math.round(e.heightPx);return{width:n<=t.classes.widthCompactMaxPx?`compact`:n<=t.classes.widthMediumMaxPx?`medium`:`expanded`,height:r<=t.classes.heightShortMaxPx?`short`:`regular`,composition:n<=r*t.composition.stackedMaxAspect?`stacked`:`side-by-side`}}var sM={idle:{id:`idle`,regions:[]},"conversation-full":{id:`conversation-full`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.72},width:{fraction:.24},height:{fraction:.24},accepts:[`selfView`],zBase:100}]},"canvas-rail":{id:`canvas-rail`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{px:0},y:{px:0},width:{fraction:.62},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.38},y:{fraction:.72},width:{fraction:.2},height:{fraction:.24},accepts:[`selfView`],zBase:100}]},"canvas-stack":{id:`canvas-stack`,soloVariant:`canvas-solo`,regions:[{name:`canvasBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:0},{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.38},width:{fraction:.24},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"canvas-kiosk-overlay":{id:`canvas-kiosk-overlay`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`replica`],zBase:0},{name:`cardSheet`,x:{fraction:0},y:{fraction:.6},width:{fraction:1},height:{fraction:.4},accepts:[`card`],zBase:100,sheetAnchor:`bottom`},{name:`pip`,x:{fraction:.72},y:{fraction:.72},width:{fraction:.24},height:{fraction:.24},accepts:[`selfView`],zBase:110}]},"canvas-sheet":{id:`canvas-sheet`,soloVariant:`canvas-solo`,regions:[{name:`stage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.55},accepts:[`replica`],zBase:0},{name:`canvasSheet`,x:{fraction:0},y:{fraction:.55},width:{fraction:1},height:{fraction:.45},accepts:[`card`],zBase:10},{name:`pip`,x:{fraction:.66},y:{fraction:.33},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-columns":{id:`content-columns`,soloVariant:`content-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.25},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:.25},y:{fraction:0},width:{fraction:.75},height:{fraction:1},accepts:[`content`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.76},width:{fraction:.2},height:{fraction:.2},accepts:[`selfView`],zBase:100}]},"content-stack":{id:`content-stack`,soloVariant:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`content`],zBase:0},{name:`replicaBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.74},width:{fraction:.24},height:{fraction:.22},accepts:[`selfView`],zBase:100}]},"content-stack-compact":{id:`content-stack-compact`,soloVariant:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.58},accepts:[`content`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.58},width:{fraction:1},height:{fraction:.42},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.78},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-sheet-compact":{id:`content-sheet-compact`,soloVariant:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.58},accepts:[`content`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:.58},width:{fraction:1},height:{fraction:.42},accepts:[`replica`],zBase:0},{name:`cardSheet`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`card`],zBase:100},{name:`pip`,x:{fraction:.66},y:{fraction:.78},width:{fraction:.3},height:{fraction:.18},accepts:[`selfView`],zBase:110}]},"content-rail":{id:`content-rail`,soloVariant:`content-rail-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.22},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`contentStage`,x:{fraction:.22},y:{fraction:0},width:{fraction:.48},height:{fraction:1},accepts:[`content`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"content-stack-canvas":{id:`content-stack-canvas`,soloVariant:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.5},accepts:[`content`],zBase:0},{name:`replicaBand`,x:{fraction:0},y:{fraction:.5},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`canvasBand`,x:{fraction:0},y:{fraction:.72},width:{fraction:1},height:{fraction:.28},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.72},y:{fraction:.52},width:{fraction:.24},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-columns":{id:`canvas-takeover-columns`,soloVariant:`canvas-solo`,regions:[{name:`replicaColumn`,x:{fraction:0},y:{fraction:0},width:{fraction:.24},height:{fraction:1},accepts:[`replica`,`selfView`],zBase:0},{name:`canvasStage`,x:{fraction:.24},y:{fraction:0},width:{fraction:.76},height:{fraction:1},accepts:[`card`],zBase:0},{name:`pip`,x:{fraction:.02},y:{fraction:.78},width:{fraction:.18},height:{fraction:.18},accepts:[`selfView`],zBase:100}]},"canvas-takeover-strip":{id:`canvas-takeover-strip`,soloVariant:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:.22},width:{fraction:1},height:{fraction:.78},accepts:[`card`],zBase:0},{name:`replicaStrip`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.22},accepts:[`replica`],zBase:0},{name:`pip`,x:{fraction:.66},y:{fraction:.04},width:{fraction:.3},height:{fraction:.16},accepts:[`selfView`],zBase:100}]},"canvas-solo":{id:`canvas-solo`,regions:[{name:`canvasStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`card`],zBase:0}]},"content-solo":{id:`content-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:1},accepts:[`content`],zBase:0}]},"content-rail-solo":{id:`content-rail-solo`,regions:[{name:`contentStage`,x:{px:0},y:{px:0},width:{fraction:1},height:{fraction:1},accepts:[`content`],zBase:0},{name:`rail`,x:{px:-448},y:{px:0},width:{px:448},height:{fraction:1},accepts:[`card`],zBase:0}]},"content-sheet-solo":{id:`content-sheet-solo`,regions:[{name:`contentStage`,x:{fraction:0},y:{fraction:0},width:{fraction:1},height:{fraction:.62},accepts:[`content`],zBase:0},{name:`canvasBand`,x:{fraction:0},y:{fraction:.62},width:{fraction:1},height:{fraction:.38},accepts:[`card`],zBase:10}]}},cM={idle:{compact:{short:`idle`,regular:`idle`},medium:{short:`idle`,regular:`idle`},expanded:{short:`idle`,regular:`idle`}},conversation:{compact:{short:`conversation-full`,regular:`conversation-full`},medium:{short:`conversation-full`,regular:`conversation-full`},expanded:{short:`conversation-full`,regular:`conversation-full`}},"conversation-canvas":{compact:{short:`canvas-sheet`,regular:`canvas-sheet`},medium:{short:`canvas-rail`,regular:`canvas-stack`},expanded:{short:`canvas-rail`,regular:`canvas-rail`}},"content-focus":{compact:{short:`content-stack-compact`,regular:`content-stack-compact`},medium:{short:`content-columns`,regular:`content-stack`},expanded:{short:`content-columns`,regular:`content-columns`}},"content-plus-canvas":{compact:{short:`content-sheet-compact`,regular:`content-sheet-compact`},medium:{short:`content-rail`,regular:`content-stack-canvas`},expanded:{short:`content-rail`,regular:`content-rail`}},"canvas-dominant":{compact:{short:`canvas-takeover-strip`,regular:`canvas-takeover-strip`},medium:{short:`canvas-takeover-columns`,regular:`canvas-takeover-columns`},expanded:{short:`canvas-takeover-columns`,regular:`canvas-takeover-columns`}}},lM={idle:{compact:{stacked:`idle`,"side-by-side":`idle`},medium:{stacked:`idle`,"side-by-side":`idle`},expanded:{stacked:`idle`,"side-by-side":`idle`}},conversation:{compact:{stacked:`conversation-full`,"side-by-side":`conversation-full`},medium:{stacked:`conversation-full`,"side-by-side":`conversation-full`},expanded:{stacked:`conversation-full`,"side-by-side":`conversation-full`}},"conversation-canvas":{compact:{stacked:`canvas-sheet`,"side-by-side":`canvas-sheet`},medium:{stacked:`canvas-stack`,"side-by-side":`canvas-rail`},expanded:{stacked:`canvas-stack`,"side-by-side":`canvas-rail`}},"content-focus":{compact:{stacked:`content-stack-compact`,"side-by-side":`content-stack-compact`},medium:{stacked:`content-stack`,"side-by-side":`content-columns`},expanded:{stacked:`content-stack`,"side-by-side":`content-columns`}},"content-plus-canvas":{compact:{stacked:`content-sheet-compact`,"side-by-side":`content-sheet-compact`},medium:{stacked:`content-stack-canvas`,"side-by-side":`content-rail`},expanded:{stacked:`content-stack-canvas`,"side-by-side":`content-rail`}},"canvas-dominant":{compact:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-strip`},medium:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns`},expanded:{stacked:`canvas-takeover-strip`,"side-by-side":`canvas-takeover-columns`}}};function uM(e,t,n=sM,r=cM,i=!0,a=!1){let o=a&&r===cM&&e===`conversation-canvas`&&t.composition===`stacked`&&t.width!==`compact`?`canvas-kiosk-overlay`:t.composition!==void 0&&r===cM?lM[e][t.width][t.composition]:r[e][t.width][t.height],s=n[o];if(!s)throw Error(`Template matrix references missing template id: ${o}`);if(!i&&s.soloVariant!==void 0){let e=n[s.soloVariant];if(!e)throw Error(`soloVariant references missing template id: ${s.soloVariant}`);return e}return s}function dM(e,t,n){let r=[],{prefs:i}=e,a=e.userShare?`userShare`:e.presentation?`presentation`:null,o=e.cards.length>0,s=t.width===`compact`;return i.pipCorner!==void 0&&s&&r.push(`pipCorner`),a===null?(i.expandCanvas&&!o&&r.push(`expandCanvas`),o&&(i.expandCanvas||s)?{state:`canvas-dominant`,suppressedPrefs:r,contentKind:null}:o?{state:`conversation-canvas`,suppressedPrefs:r,contentKind:null}:e.replica||e.selfView?{state:`conversation`,suppressedPrefs:r,contentKind:null}:{state:`idle`,suppressedPrefs:r,contentKind:null}):(i.expandCanvas&&r.push(`expandCanvas`),{state:o?`content-plus-canvas`:`content-focus`,suppressedPrefs:r,contentKind:a})}var fM={alert:{minWidthPx:220,sizeClass:()=>`S`,estimateHeightPx:e=>e.charCount===void 0?120:Math.min(400,Math.round(90+e.charCount*.26))},input:{minWidthPx:220,sizeClass:()=>`S`,estimateHeightPx:()=>182},question:{minWidthPx:240,sizeClass:e=>{let t=e.optionCount??4;return t<=2?`S`:t>=10?`L`:`M`},estimateHeightPx:e=>{let t=e.optionCount??4;return 72+t*48+(t-1)*8+64}},text:{minWidthPx:220,sizeClass:e=>(e.charCount??400)>1500?`L`:`M`,estimateHeightPx:e=>{let t=e.charCount??400,n=Math.max(1,e.widthPx/8);return Math.max(100,Math.round(t/n*22+40))}},chart:{minWidthPx:260,sizeClass:()=>`M`,estimateHeightPx:e=>Math.round(e.widthPx*(260/480))+90},calendar:{minWidthPx:320,sizeClass:e=>e.slotCount===void 0?`M`:`L`,estimateHeightPx:e=>e.slotCount===void 0?470:64+e.slotCount*48},image:{minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>Math.round((Math.min(e.widthPx,520)-36)*(9/16))+95+((e.imageCount??1)>1?44:0)},scheduling_embed:{minWidthPx:320,hardMinHeightPx:640,sizeClass:()=>`L`,estimateHeightPx:()=>640}},pM={minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>e.coldDefaultHeightPx??320},mM=`canvas.`;function hM(e){return e.startsWith(mM)?e.slice(7):e}function gM(e,t){let n=hM(e),r=fM[n]??pM,i=t?.[n]??t?.[e];return i===void 0?r:{...r,minWidthPx:i.minWidthPx??r.minWidthPx,...i.hardMinHeightPx===void 0?r.hardMinHeightPx===void 0?{}:{hardMinHeightPx:r.hardMinHeightPx}:{hardMinHeightPx:i.hardMinHeightPx}}}Object.keys(fM);function _M(e,t,n){let r=gM(e,n),i=(t.naturalHeightPx!==void 0&&Number.isFinite(t.naturalHeightPx)?t.naturalHeightPx:void 0)??r.estimateHeightPx(t),a=r.hardMinHeightPx===void 0?i:Math.max(r.hardMinHeightPx,i);return{sizeClass:r.sizeClass(t),minWidthPx:r.minWidthPx,naturalHeightPx:Math.round(a),hardMinHeightPx:r.hardMinHeightPx}}function vM(e,t){let n=hM(e);return fM[n]===void 0?(t?.[n]??t?.[e])?.hardMinHeightPx:gM(e,t).hardMinHeightPx}function yM(e,t){return gM(e,t).minWidthPx}function bM(e,t){let n=Number.isFinite(e)?e:t.card.coldDefaultHeightPx;return Math.min(t.card.maxHeightPx,Math.max(t.card.reportedHeightFloorPx,Math.round(n)))}function xM(e,t,n){if(t>=e)return{kind:`natural`};if(t<=0||e<=0)return{kind:`scroll`};let r=t/e;return r>=n.card.minDisplayScale?{kind:`scaled`,factor:r}:{kind:`scroll`}}function SM(e,t){return e.width>0&&e.height>0&&t.width>0&&t.height>0&&e.x<t.x+t.width&&t.x<e.x+e.width&&e.y<t.y+t.height&&t.y<e.y+e.height}function CM(e,t){return t.x>=e.x&&t.y>=e.y&&t.x+t.width<=e.x+e.width&&t.y+t.height<=e.y+e.height}function wM(e,t,n){let r=[],i=e.find(e=>e.kind===`replica`),a=e=>e.kind===`selfView`&&e.layer===`overlay`&&i!==void 0&&CM(i.rect,e.rect),o=e=>e.kind===`card`&&e.layer===`overlay`&&e.sheet===!0;for(let a of e){let e=a.rect;if(Number.isInteger(e.x)&&Number.isInteger(e.y)&&Number.isInteger(e.width)&&Number.isInteger(e.height)||r.push({kind:`bounds`,tileId:a.id,message:`${a.id} has non-integer coordinates`}),(e.x<0||e.y<0||e.width<0||e.height<0||e.x+e.width>t.width||e.y+e.height>t.height)&&r.push({kind:`bounds`,tileId:a.id,message:`${a.id} rect exceeds the container`}),a.layer===`overlay`&&a.kind!==`selfView`&&!o(a)&&r.push({kind:`overlay-legality`,tileId:a.id,message:`only selfView or a sheet card may ride the overlay layer, got ${a.kind}`}),a.kind===`selfView`&&a.layer===`overlay`&&i!==void 0&&!CM(i.rect,a.rect)&&r.push({kind:`overlay-legality`,tileId:a.id,message:`selfView escapes the replica rect`}),(a.kind===`content`||a.kind===`replica`)&&(e.width<48||e.height<48)&&r.push({kind:`degenerate-surface`,tileId:a.id,message:`${a.kind} tile ${a.id} is ${e.width}x${e.height}px, below the 48px visible floor`}),a.kind===`card`){a.fit.kind===`scaled`&&(a.fit.factor<n.card.minDisplayScale||a.fit.factor>1)&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} scaled to ${a.fit.factor}, outside [${n.card.minDisplayScale}, 1]`}),e.height<n.card.reportedHeightFloorPx&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.height}px is below the ${n.card.reportedHeightFloorPx}px report floor`});let t=a.component===void 0?void 0:vM(a.component,n.card.componentOverrides);t!==void 0&&e.height<t&&a.fit.kind!==`scroll`&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.height}px is below its ${t}px hard min without scroll`});let i=a.component===void 0?void 0:yM(a.component,n.card.componentOverrides);i!==void 0&&e.width<i&&r.push({kind:`min-content`,tileId:a.id,message:`card ${a.id} box ${e.width}px is below its ${i}px min width`})}}for(let t of e)if(t.kind===`content`||t.kind===`card`)for(let n of e)n.id!==t.id&&SM(t.rect,n.rect)&&(!a(n)||o(t))&&(!o(n)||o(t))&&(o(t)&&n.layer===`grid`||r.push({kind:`never-covered`,tileId:t.id,otherTileId:n.id,message:`${n.id} covers ${t.kind} tile ${t.id}`}));return r}var TM=(e,t,n)=>Math.min(n,Math.max(t,e));function EM(e,t){let n=t===`compact`;return{surfacePad:Math.round(n?e.insets.compactSurfacePadPx:e.insets.surfacePadPx),cardsPad:Math.round(n?e.insets.compactCardsPadPx:e.insets.cardsPadPx)}}function DM(e,t,n){return e===`canvas-dominant`&&t.width===`compact`?n.eviction.compactTakeoverMaxCards:n.eviction.maxVisibleCards}function OM(e,t,n){let r=[...e].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),i=Math.floor(t);return r.length<=i?r:n===`evict-newest`?r.slice(0,i):r.slice(r.length-i)}function kM(e,t,n,r,i,a){let o=i??EM(n,r).cardsPad,s=Math.round(a??n.rail.widthPx),c=Math.max(1,Math.min(t-2*o,s-2*o));return{innerW:c,entries:e.map(e=>{let t=_M(e.component,{...e.contentOpts,naturalHeightPx:e.naturalHeightPx,widthPx:c,coldDefaultHeightPx:n.card.coldDefaultHeightPx},n.card.componentOverrides);return{card:e,constraints:t,clampedHeightPx:bM(t.naturalHeightPx,n)}})}}function AM(e,t){return`fraction`in e?e.fraction*t:e.px>=0?e.px:t+e.px}function jM(e,t,n,r){return e.name!==`rail`||`fraction`in t?t:r===`width`?{px:n.rail.widthPx}:{px:t.px<0?-n.rail.widthPx:t.px}}function MM(e,t,n,r,i,a){let o=n===`x`?t.width:t.height,s=[...e].sort((e,t)=>AM(n===`x`?e.x:e.y,o)-AM(n===`x`?t.x:t.y,o)),c=s.map(e=>n===`x`?jM(e,e.width,r,`width`):e.height),l=0,u=0;for(let e of c)`px`in e?l+=e.px:u+=e.fraction;let d=Math.max(0,o-l),f=c.map(e=>`px`in e?e.px:u>0?e.fraction/u*d:0);if(n===`y`&&i!==void 0){let e=s.findIndex((e,t)=>e.accepts.includes(`card`)&&`fraction`in(c[t]??e.height));if(e!==-1){let t=f[e]??0,n=i.shrinkToContent?Math.min(i.neededPx,Math.max(t,i.capPx)):TM(i.neededPx,t,Math.max(t,i.capPx)),r=0,a=0;c.forEach((t,n)=>{n!==e&&(`px`in t?r+=t.px:a+=f[n]??0)});let s=Math.max(0,o-r-n);f=f.map((t,r)=>{if(r===e)return n;let i=c[r];return i!==void 0&&`px`in i?t:a>0?t/a*s:0})}}if(n===`y`&&a!==void 0){let e=s.findIndex((e,t)=>e.accepts.includes(`content`)&&`fraction`in(c[t]??e.height)),t=s.findIndex((e,t)=>e.accepts.includes(`replica`)&&`fraction`in(c[t]??e.height));if(e!==-1&&t!==-1){let n=(f[e]??0)-a.maxPx;n>0&&(f[e]=a.maxPx,f[t]=(f[t]??0)+n)}}let p=s.map(e=>e.accepts.includes(`content`)||e.accepts.includes(`replica`)?48:0),m=p.reduce((e,t)=>e+t,0),h=m>o?o/m:1,g=f.map((e,t)=>Math.max(e,(p[t]??0)*h));if(g.reduce((e,t)=>e+t,0)>o){let e=g.map((e,t)=>e-(p[t]??0)*h),t=e.reduce((e,t)=>e+t,0),n=Math.max(0,o-m*h),r=t>0?n/t:0;f=g.map((t,n)=>(p[n]??0)*h+(e[n]??0)*r)}else f=g;let _=[0],v=0;for(let e of f)v+=e,_.push(TM(Math.round(v),0,o));return s.map((e,r)=>{let i=_[r]??0,a=_[r+1]??i;return{region:e,rect:n===`x`?{x:i,y:0,width:a-i,height:t.height}:{x:0,y:i,width:t.width,height:a-i}}})}function NM(e,t,n){let r=t.width,i=t.height,a=jM(e,e.width,n,`width`),o=jM(e,e.x,n,`x`),s=TM(Math.round(AM(o,r)),0,r),c=TM(Math.round(AM(e.y,i)),0,i);return{x:s,y:c,width:TM(Math.round(`fraction`in a?a.fraction*r:a.px),0,r-s),height:TM(Math.round(`fraction`in e.height?e.height.fraction*i:e.height.px),0,i-c)}}function PM(e,t,n,r,i){let a=e.regions.filter(e=>e.zBase<100),o=e=>`fraction`in e&&e.fraction===1;return a.length>1&&a.every(e=>o(e.height))?MM(a,t,`x`,n):a.length>1&&a.every(e=>o(e.width))?MM(a,t,`y`,n,r,i):a.map(e=>({region:e,rect:NM(e,t,n)}))}function FM(e,t,n,r,i,a,o,s,c,l,u){if(n!==null)return;let d=e.regions.filter(e=>e.zBase<100);if(!(d.length>1&&d.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let f=d.find(e=>e.accepts.includes(`card`)&&`fraction`in e.height);if(f===void 0||r.cards.length===0)return;let{innerW:p,entries:m}=kM(OM(r.cards,u,c.eviction.policy),i.width,c,l,void 0,c.card.stackMaxWidthPx),h=m.reduce((e,t)=>t.constraints.minWidthPx>p?e:Math.max(e,t.clampedHeightPx),0),{cardsPad:g}=EM(c,l),_=AM(f.y,i.height),v=d.every(e=>AM(e.y,i.height)<=_)?Math.max(0,o-s):0,y=h>0;return{neededPx:h+2*g+v,capPx:Math.round(c.card.stackBandMaxFraction*a.height),...y&&{shrinkToContent:y}}}function IM(e,t,n,r){if(t===null)return;let i=e.regions.filter(e=>e.zBase<100);if(!(i.length>1&&i.every(e=>`fraction`in e.width&&e.width.fraction===1)))return;let a=i.some(e=>e.accepts.includes(`content`)&&`fraction`in e.height),o=i.some(e=>e.accepts.includes(`replica`)&&`fraction`in e.height);if(!a||!o)return;let s=r.content.stackedAspect;if(!(!Number.isFinite(s)||s<=0))return{maxPx:Math.round(n.width/s)}}var LM=`bottom-left`;function RM(e,t,n,r,i){let a=t.endsWith(`right`)?e.x+e.width-n-r:e.x+n,o=t.startsWith(`bottom`)?e.y+e.height-n-i:e.y+n;return{x:Math.round(a),y:Math.round(o),width:r,height:i}}function zM(e,t,n,r){let i=Math.max(n.pip.minWidthPx,Math.round(e.width*.25)),a=r?e.height-t:Math.round((e.height-t)*16/9),o=Math.min(i,e.width-t,a),s=r?o:Math.round(o*9/16);return o<n.pip.minWidthPx||o<=0||s<=0?null:{w:o,h:s}}function BM(e,t,n){return t===null||!SM(e,t)?e:{...e,y:Math.round(t.y)-n-e.height}}function VM(e){if(typeof e!=`object`||!e)return!1;let t=e;return[`x`,`y`,`width`,`height`].every(e=>typeof t[e]==`number`&&Number.isFinite(t[e]))}function HM(e,t,n){let r=e;for(let e of t.filter(VM).sort((e,t)=>t.y-e.y))r=BM(r,e,n);return r}function UM(e,t,n){if(t<=0)return e;let r=Math.min(t,e.length);return n===`evict-newest`?e.slice(0,e.length-r):e.slice(r)}function WM(e,t,n,r,i,a){let o=n.callControls===!0?Math.round(a.insets.callControlsBottomPx):0,s=i.height-o,c=n.selfView&&n.prefs.hideSelfView!==!0,l=n.replica||c,u=e.regions.some(e=>e.zBase<100&&e.accepts.includes(`card`)),d=+!!l+(t.contentKind===null?0:1)+(n.cards.length>0&&u?1:0)>=2?EM(a,r.width).surfacePad:0,f={width:Math.max(0,i.width-2*d),height:Math.max(0,i.height-2*d)},p=n.callControlsRect??(o>0?{x:0,y:s,width:i.width,height:o}:null);return{regions:PM(e,f,a,FM(e,t.state,t.contentKind,n,f,i,o,d,a,r.width,DM(t.state,r,a)),IM(e,t.contentKind,f,a)).map(e=>({...e,rect:{...e.rect,x:e.rect.x+d,y:e.rect.y+d}})).map(e=>p===null||!e.region.accepts.includes(`card`)||!(e.rect.x<p.x+p.width&&e.rect.x+e.rect.width>p.x)?e:{...e,rect:{...e.rect,height:Math.max(0,Math.min(e.rect.height,s-e.rect.y))}}),surfacePad:d,controlsInset:o,bandTopY:s}}function GM(e,t,n,r,i,a){let o=n.selfView&&n.prefs.hideSelfView!==!0,{regions:s,surfacePad:c,controlsInset:l,bandTopY:u}=WM(t,e,n,r,i,a),d=s.find(e=>e.region.accepts.includes(`replica`)),f=s.find(e=>e.region.accepts.includes(`content`)),p=s.find(e=>e.region.accepts.includes(`card`)),m=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`selfView`)),h=t.regions.find(e=>e.zBase>=100&&e.accepts.includes(`card`)),g=Math.round(a.rail.gutterPx),_=Math.round(a.pip.gapPaddingPx),v=[...n.cards].sort((e,t)=>e.dispatchSeq-t.dispatchSeq),y=DM(e.state,r,a),b=p?OM(n.cards,y,a.eviction.policy):h===void 0?[]:OM(n.cards,1,a.eviction.policy),x=s=>{let y={evictedCardIds:[],selfViewDropped:!1,replicaCollapsed:!1},x=[],S=null,C=!1,w=d!==void 0&&d.region.accepts.includes(`selfView`);if(d&&w&&(n.replica||o)){let e=d.rect,t=o&&!s.selfViewDropped;o&&s.selfViewDropped&&(y.selfViewDropped=!0);let r=+!!n.replica+ +!!t,i=Math.round(a.insets.participantsPadPx),c=Math.max(1,e.width-2*i),l=Math.round(c*9/16),u=e=>r*e+(r-1)*i;u(l)>e.height&&(l=Math.max(1,Math.floor((e.height-(r-1)*i)/r)),c=Math.min(Math.max(1,e.width-2*i),Math.round(l*16/9))),l=Math.max(l,Math.min(48,e.height)),c=Math.max(c,Math.min(48,e.width));let f=e.x+Math.round((e.width-c)/2),p=e.y+Math.round((e.height-u(l))/2);if(n.replica){let e={x:f,y:p,width:c,height:l};if(s.replicaCollapsed){let t=Math.min(l,Math.max(64,Math.round(l*.25)));e={...e,height:t},y.replicaCollapsed=!0}S={id:`replica`,kind:`replica`,rect:e,layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name},x.push(S),p+=l+i}t&&(x.push({id:`selfView`,kind:`selfView`,rect:{x:f,y:p,width:c,height:l},layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name}),C=!0)}else if(d&&(n.replica||o)){let e=!n.replica,t=d.rect;if(!e&&s.replicaCollapsed){let e=Math.min(t.height,Math.max(64,Math.round(t.height*.25)));t={...t,height:e},y.replicaCollapsed=!0}let r={id:e?`selfView`:`replica`,kind:e?`selfView`:`replica`,rect:t,layer:`grid`,order:d.region.zBase,fit:{kind:`natural`},region:d.region.name};x.push(r),e?C=!0:S=r}e.contentKind!==null&&f&&x.push({id:`content`,kind:`content`,rect:f.rect,layer:`grid`,order:f.region.zBase,fit:{kind:`natural`},region:f.region.name});let T=UM(b,s.extraEvictions,a.eviction.policy),E=new Set(T.map(e=>e.id));if(y.evictedCardIds=v.filter(e=>!E.has(e.id)).map(e=>e.id),p&&T.length>0){let e=p.rect,n=t.regions.filter(e=>e.zBase<100),i=n.length>1&&n.every(e=>`fraction`in e.width&&e.width.fraction===1),{innerW:o,entries:s}=kM(T,e.width,a,r.width,void 0,i?a.card.stackMaxWidthPx:void 0),c=e.x+Math.round((e.width-o)/2),l=e.height-g*(s.length-1),u=s.reduce((e,t)=>e+t.clampedHeightPx,0),d;if(u<=l)d=s.map(e=>e.clampedHeightPx);else{let e=l>0?l/u:0;d=s.map(t=>Math.max(a.card.reportedHeightFloorPx,Math.floor(t.clampedHeightPx*e)));let t=d.reduce((e,t)=>e+t,0)-Math.max(0,l);for(;t>0;){let e=-1;for(let t=0;t<d.length;t++){let n=d[t]??0;n>a.card.reportedHeightFloorPx&&(e===-1||n>(d[e]??0))&&(e=t)}if(e===-1)break;d[e]=(d[e]??0)-1,--t}}let f=d.reduce((e,t)=>e+t,0)+g*(s.length-1),m=e.y+Math.max(0,Math.round((e.height-f)/2));s.forEach((t,n)=>{let r=Math.min(m,e.y+e.height),i=Math.max(0,Math.min(d[n]??0,e.y+e.height-r)),s=xM(t.clampedHeightPx,i,a),l=t.constraints.hardMinHeightPx;l!==void 0&&i<l&&s.kind!==`scroll`&&(s={kind:`scroll`}),x.push({id:t.card.id,kind:`card`,component:t.card.component,cardSizeClass:t.constraints.sizeClass,rect:{x:c,y:r,width:o,height:i},layer:`grid`,order:p.region.zBase+n,fit:s,region:p.region.name}),m=r+i+g})}let D=null;if(p===void 0&&h!==void 0&&T.length>0){let e={width:Math.max(0,i.width-2*c),height:Math.max(0,i.height-2*c)},t=NM(h,e,a),o=h.sheetAnchor===`bottom`,s=EM(a,r.width).cardsPad,l=o?Math.min(u,n.callControlsRect?.y??u)-s:u,d={x:t.x+c,y:t.y+c,width:t.width,height:Math.max(0,Math.min(t.height,l-(t.y+c)))},{innerW:f,entries:p}=kM(T,d.width,a,r.width,o?s:0,a.card.stackMaxWidthPx),m=p[0];if(m!==void 0){let e=d.x+Math.round((d.width-f)/2),t=Math.max(0,Math.min(m.clampedHeightPx,d.height)),n=xM(m.clampedHeightPx,t,a);o&&m.constraints.naturalHeightPx>t&&(n={kind:`scroll`});let r=m.constraints.hardMinHeightPx;r!==void 0&&t<r&&n.kind!==`scroll`&&(n={kind:`scroll`}),D={id:m.card.id,kind:`card`,component:m.card.component,cardSizeClass:m.constraints.sizeClass,rect:{x:e,y:o?d.y+d.height-t:d.y,width:f,height:t},layer:`overlay`,order:h.zBase,fit:n,region:h.name,sheet:!0,...o&&{sheetAnchor:`bottom`}},x.push(D)}}if(!C){if(o&&s.selfViewDropped)y.selfViewDropped=!0;else if(o){let t=e.suppressedPrefs.includes(`pipCorner`)?LM:n.prefs.pipCorner??`bottom-left`,o=n.callControlsVisible===!1?null:n.callControlsRect??(l>0?{x:0,y:u,width:i.width,height:l}:null),s=[...o===null?[]:[o],...D===null?[]:[D.rect],...n.chromeObstacles??[]];if(S){let e=S.rect,n=zM(e,_,a,r.width===`compact`),i=n===null?null:RM(e,t,_,n.w,n.h),o=i===null?null:HM(i,s,_),c=n!==null&&o!==null&&o.y>=e.y&&n.w+_<=e.width&&n.h+_<=e.height,l=n!==null&&e.width>0&&e.height>0?n.w*n.h/(e.width*e.height):1/0;o!==null&&c&&l<=a.pip.maxAreaRatio?x.push({id:`selfView`,kind:`selfView`,rect:o,layer:`overlay`,order:m?.zBase??100,fit:{kind:`natural`},region:m?.name??`pip`}):y.selfViewDropped=!0}else{let e=a.pip.minWidthPx,n=r.width===`compact`?e:Math.round(e*9/16),o={x:0,y:0,width:i.width,height:i.height},c=HM(RM(o,t,_,e,n),s,_),l=c.y>=0&&e+_<=o.width&&n+_<=o.height,u=x.some(e=>(e.kind===`content`||e.kind===`card`)&&SM(e.rect,c));l&&!u?x.push({id:`selfView`,kind:`selfView`,rect:c,layer:`overlay`,order:m?.zBase??100,fit:{kind:`natural`},region:m?.name??`pip`}):y.selfViewDropped=!0}}}return{tiles:x,degradations:y}},S={extraEvictions:0,selfViewDropped:!1,replicaCollapsed:!1},C=x(S),w=wM(C.tiles,i,a);for(let e of a.degradationLadder){if(w.length===0)break;if(e===`evict-cards`)for(;w.length>0&&S.extraEvictions<b.length;)S={...S,extraEvictions:S.extraEvictions+1},C=x(S),w=wM(C.tiles,i,a);else e===`drop-self-view`?C.tiles.some(e=>e.kind===`selfView`)&&(S={...S,selfViewDropped:!0},C=x(S),w=wM(C.tiles,i,a)):e===`collapse-replica`&&!S.replicaCollapsed&&C.tiles.some(e=>e.kind===`replica`)&&(S={...S,replicaCollapsed:!0},C=x(S),w=wM(C.tiles,i,a))}return C}function KM(e){if(e!==void 0&&e.length!==0)return{...sM,...Object.fromEntries(e.map(e=>[e.id,e]))}}function qM(e,t,n,r){let i=e.callControlsRect,a=i===void 0?e:{...e,callControlsRect:{x:Math.round(i.x),y:Math.round(i.y),width:Math.max(0,Math.round(i.width)),height:Math.max(0,Math.round(i.height))}},o={width:Math.max(0,Math.round(a.container.widthPx)),height:Math.max(0,Math.round(a.container.heightPx))},s=dM(a,t,n),c=a.replica||a.selfView&&a.prefs.hideSelfView!==!0,l=uM(s.state,t,KM(r?.templates),void 0,c,a.kioskMode===!0),{tiles:u,degradations:d}=GM(s,l,a,t,o,n);return{state:s.state,sizeClass:t,containerPx:o,templateId:l.id,tiles:u,degradations:d,suppressedPrefs:[...s.suppressedPrefs]}}var JM={compact:0,medium:1,expanded:2};function YM(e,t){return e.width===t.width&&e.height===t.height&&e.composition===t.composition}function XM(e,t,n,r,i){let a=e.committedClass;if(a===null||a.composition===void 0)return{committedClass:t,pendingClass:null,pendingSinceMs:null};if(YM(t,a))return{committedClass:a,pendingClass:null,pendingSinceMs:null};let o=Math.abs(JM[t.width]-JM[a.width]),s=e.lastResolution?.containerPx;return o>1||s===void 0||Math.max(Math.abs(Math.round(n.widthPx)-s.width),Math.abs(Math.round(n.heightPx)-s.height))>=i.hysteresis.decisiveJumpPxDelta?{committedClass:t,pendingClass:null,pendingSinceMs:null}:e.pendingClass!==null&&e.pendingSinceMs!==null&&YM(e.pendingClass,t)?r-e.pendingSinceMs>=i.hysteresis.windowMs?{committedClass:t,pendingClass:null,pendingSinceMs:null}:{committedClass:a,pendingClass:e.pendingClass,pendingSinceMs:e.pendingSinceMs}:{committedClass:a,pendingClass:t,pendingSinceMs:r}}var ZM=(e,t)=>e<t?-1:+(e>t);function QM(e,t){let n=new Map((e?.tiles??[]).map(e=>[e.id,e])),r=new Map(t.tiles.map(e=>[e.id,e])),i=[];for(let e of[...n.keys()].sort(ZM))r.has(e)||i.push({type:`exit`,tileId:e});let a=[],o=[],s=[];for(let e of[...r.keys()].sort(ZM)){let t=n.get(e);if(t===void 0){a.push({type:`enter`,tileId:e});continue}let i=r.get(e);if(t.layer!==i.layer){o.push(i.layer===`overlay`?{type:`promote`,tileId:e,toLayer:i.layer}:{type:`demote`,tileId:e,toLayer:i.layer});continue}let c=t.rect.x!==i.rect.x||t.rect.y!==i.rect.y,l=t.rect.width!==i.rect.width||t.rect.height!==i.rect.height;c?s.push({type:`move`,tileId:e,from:t.rect,to:i.rect}):l&&s.push({type:`resize`,tileId:e,from:t.rect,to:i.rect})}return[...i,...a,...o,...s]}function $M(e,t,n,r,i){let a=XM(e,oM(t.container,r),t.container,n,r),o=qM(t,a.committedClass,r,i);return{resolution:o,transitions:QM(e.lastResolution,o),nextState:{committedClass:a.committedClass,pendingClass:a.pendingClass,pendingSinceMs:a.pendingSinceMs,lastResolution:o}}}var eN=`0.1.13`,tN=iM,nN=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_enabled`)===`1`}catch{return!1}})(),rN=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_debug`)===`1`}catch{return!1}})();function iN(e,t){return nN||e===!0||t===!0}function aN(e=globalThis.location?.search??``){return new URLSearchParams(e).get(`kiosk`)===`1`}function oN({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,reportedHeights:s}){return{kioskMode:e,container:{widthPx:n.width,heightPx:Math.round(Math.min(n.height,n.visualViewportHeight??n.height))},replica:r.hasPersonaVideo,selfView:r.hasSelfView,presentation:r.isPersonaPresenting?{}:null,userShare:r.isScreenSharing?{}:null,cards:t.map((e,t)=>({id:e.id,component:e.canvas_config.component,dispatchSeq:t+1,...s[e.id]===void 0?{}:{naturalHeightPx:s[e.id]}})),prefs:{},callControls:i>0,callControlsVisible:a??!0,...o===void 0?{}:{callControlsRect:o}}}var sN=16,cN=200,lN=zt(null);function uN(e){lN.peek()===null&&(console.error(`Magic Grid engine error; rendering the legacy layout.`,e),lN.value=(e instanceof Error?`${e.name}: ${e.message}`:String(e)).slice(0,cN))}function dN(){lN.peek()!==null&&(lN.value=null)}function fN({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,enabled:s}){let c=M(tN),l=M(null),[u,d]=A({}),[f,p]=A(null),m=P((e,t)=>{s&&d(n=>n[e]===t?n:{...n,[e]:t})},[s]);j(()=>{d(e=>{let n=new Set(t.map(e=>e.id)),r={};for(let[t,i]of Object.entries(e))n.has(t)&&(r[t]=i);return Object.keys(r).length===Object.keys(e).length?e:r})},[t]);let h=N(()=>oN({kioskMode:e,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,reportedHeights:u}),[e,t,n,r,i,a,o,u]);return j(()=>{if(!s||lN.peek()!==null)return;l.current===null&&(l.current=Date.now());let e=null,t=()=>{if(e=null,lN.peek()!==null)return;let n=Date.now()-(l.current??0),r;try{r=$M(c.current,h,n,aM)}catch(e){uN(e);return}if(c.current=r.nextState,p(r),r.nextState.pendingClass!==null){let i=r.nextState.pendingSinceMs===null?0:Math.max(0,n-r.nextState.pendingSinceMs);e=setTimeout(t,Math.max(sN,aM.hysteresis.windowMs-i+sN))}};return t(),()=>{e!==null&&clearTimeout(e)}},[s,h]),{resolution:s?f?.resolution??null:null,inputs:s?h:null,transitions:s?f?.transitions??[]:[],reportedHeights:u,recordNaturalHeight:m}}function pN(e){return e.kind===`card`&&e.sheet===!0&&e.sheetAnchor===`bottom`}function mN(e,t,n){return n?e===null?`no-presence`:t.hasPersonaVideo?e.degradations.evictedCardIds.length>0?`card-dropped`:e.tiles.some(e=>e.kind===`card`&&e.fit.kind===`scroll`&&!pN(e))?`card-overflow`:null:`no-persona-video`:`flag-off`}function hN(e,t){if(t!==null||e===null)return null;let n=e.tiles.find(e=>e.kind===`card`&&e.sheet===!0&&!pN(e));return n===void 0?null:n.rect.y+n.rect.height}var gN={driving:!1,containerPx:null,replica:null,selfView:null,content:null,replicaCollapsed:!1};function _N(e,t,n){if(e===null)return gN;let r=t===null;if(!r&&!(t===`no-persona-video`&&n))return gN;let i=t=>e.tiles.find(e=>e.kind===t)?.rect??null;return{driving:r,containerPx:e.containerPx,replica:r?i(`replica`):null,selfView:i(`selfView`),content:r?i(`content`):null,replicaCollapsed:r?e.degradations.replicaCollapsed:!1}}function vN(e){return e.selfView===null?e.driving?`hidden`:`legacy`:`engine`}function yN(e,t){return e.containerPx===null||t.containerPx===null?!1:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height}function bN(e){let t=`composition`in e?e.composition:void 0;return t===`stacked`||t===`side-by-side`?t:void 0}var xN=`conversation.grid_status`,SN=6e4;function CN(e,t,n){return n?e&&t?`url+config+start`:e?`url+start`:t?`config+start`:`start`:e&&t?`both`:e?`url`:`config`}function wN(e,t){return{message_type:`conversation`,event_type:xN,conversation_id:e,properties:t}}function TN(e){let t=bN(e.sizeClass);return{template_id:e.templateId,size_class:`${e.sizeClass.width}/${e.sizeClass.height}`,...t===void 0?{}:{composition:t},container:{w:e.containerPx.width,h:e.containerPx.height},cards:e.tiles.filter(e=>e.kind===`card`).length}}function EN(e){let{send:t,enabledVia:n,engineVersion:r=eN,now:i=Date.now,transitionDebounceMs:a=500,summaryIntervalMs:o=SN}=e,s=i(),c=!1,l=!1,u,d=null,f=null,p=!1,m=null,h=0,g=0,_={},v=null,y=e=>{try{t(e)}catch{}},b=(e,t)=>({v:1,kind:e,engine_version:r,enabled_via:n,bail:t,...v}),x=e=>{f=null;let t=u;if(t!==void 0&&e===t)return;let n=i();t===null&&m!==null&&(h+=n-m,m=null),e===null?m=n:_[e]=(_[e]??0)+1,t!==void 0&&(g+=1),e===null&&!p?(p=!0,y({...b(`first_drive`,null),...t===void 0?{}:{prev_bail:t}})):t!==void 0&&y({...b(`transition`,e),prev_bail:t}),u=e},S=e=>{let t=i(),n=h+(m===null?0:t-m);y({...b(`summary`,u??d??null),driving_ms:Math.round(n),total_ms:Math.round(t-s),bail_counts:{..._},transitions:g,...e?{final:!0}:{}})},C=setInterval(()=>S(!1),o);return{update(e,t){if(c)return;t!==null&&(v=TN(t));let n=f===null?u:d;(n===void 0||e!==n)&&(d=e,f!==null&&clearTimeout(f),f=setTimeout(()=>x(e),a))},error(e){c||l||(l=!0,y({...b(`error`,`engine-error`),error:e}))},dispose(){c||(c=!0,clearInterval(C),f!==null&&(clearTimeout(f),x(d)),S(!0))}}}function DN({enabled:e,enabledVia:t,bail:n,resolution:r,engineError:i}){let a=Rf(),o=zf(),s=F(km),c=M({daily:a,meetingState:o,conversation:s});c.current={daily:a,meetingState:o,conversation:s};let l=M(null);j(()=>{if(!e)return;let n=EN({enabledVia:t,send:e=>{try{let t=c.current;if(!t.daily||t.meetingState!==`joined-meeting`)return;let n=t.conversation?.session.peek()?.conversationId;if(!n)return;t.daily.sendAppMessage(wN(n,e),`*`)}catch{}}});return l.current=n,()=>{l.current=null,n.dispose()}},[e,t]),j(()=>{l.current?.update(n,r)},[n,r]),j(()=>{i!==null&&l.current?.error(i)},[i])}var ON=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},kN=(e,t)=>({classGroupId:e,validator:t}),AN=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),jN=`-`,MN=[],NN=`arbitrary..`,PN=e=>{let t=LN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return IN(e);let n=e.split(jN);return FN(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?ON(i,t):t:i||MN}return n[e]||MN}}},FN=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=FN(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(jN):e.slice(t).join(jN),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},IN=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?NN+r:void 0})(),LN=e=>{let{theme:t,classGroups:n}=e;return RN(n,t)},RN=(e,t)=>{let n=AN();for(let r in e){let i=e[r];zN(i,n,r,t)}return n},zN=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];BN(i,t,n,r)}},BN=(e,t,n,r)=>{if(typeof e==`string`){VN(e,t,n);return}if(typeof e==`function`){HN(e,t,n,r);return}UN(e,t,n,r)},VN=(e,t,n)=>{let r=e===``?t:WN(t,e);r.classGroupId=n},HN=(e,t,n,r)=>{if(GN(e)){zN(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(kN(n,e))},UN=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];zN(o,WN(t,a),n,r)}},WN=(e,t)=>{let n=e,r=t.split(jN),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=AN(),n.nextPart.set(t,i)),n=i}return n},GN=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,KN=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},qN=`!`,JN=`:`,YN=[],XN=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ZN=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===JN){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(qN)?(c=s.slice(0,-1),l=!0):s.startsWith(qN)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return XN(t,l,c,u)};if(t){let e=t+JN,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):XN(YN,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},QN=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},$N=e=>({cache:KN(e.cacheSize),parseClassName:ZN(e),sortModifiers:QN(e),postfixLookupClassGroupIds:eP(e),...PN(e)}),eP=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},tP=/\s+/,nP=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(tP),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+qN:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},rP=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=iP(n))&&(i&&(i+=` `),i+=r);return i},iP=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=iP(e[r]))&&(n&&(n+=` `),n+=t);return n},aP=(e,...t)=>{let n,r,i,a,o=o=>(n=$N(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=nP(e,n);return i(e,a),a};return a=o,(...e)=>a(rP(...e))},oP=[],sP=e=>{let t=t=>t[e]||oP;return t.isThemeGetter=!0,t},cP=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lP=/^\((?:(\w[\w-]*):)?(.+)\)$/i,uP=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,dP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fP=/\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$/,pP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gP=e=>uP.test(e),_P=e=>!!e&&!Number.isNaN(Number(e)),vP=e=>!!e&&Number.isInteger(Number(e)),yP=e=>e.endsWith(`%`)&&_P(e.slice(0,-1)),bP=e=>dP.test(e),xP=()=>!0,SP=e=>fP.test(e)&&!pP.test(e),CP=()=>!1,wP=e=>mP.test(e),TP=e=>hP.test(e),EP=e=>!Q(e)&&!$(e),DP=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),OP=e=>UP(e,qP,CP),Q=e=>cP.test(e),kP=e=>UP(e,JP,SP),AP=e=>UP(e,YP,_P),jP=e=>UP(e,ZP,xP),MP=e=>UP(e,XP,CP),NP=e=>UP(e,GP,CP),PP=e=>UP(e,KP,TP),FP=e=>UP(e,QP,wP),$=e=>lP.test(e),IP=e=>WP(e,JP),LP=e=>WP(e,XP),RP=e=>WP(e,GP),zP=e=>WP(e,qP),BP=e=>WP(e,KP),VP=e=>WP(e,QP,!0),HP=e=>WP(e,ZP,!0),UP=(e,t,n)=>{let r=cP.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},WP=(e,t,n=!1)=>{let r=lP.exec(e);return r?r[1]?t(r[1]):n:!1},GP=e=>e===`position`||e===`percentage`,KP=e=>e===`image`||e===`url`,qP=e=>e===`length`||e===`size`||e===`bg-size`,JP=e=>e===`length`,YP=e=>e===`number`,XP=e=>e===`family-name`,ZP=e=>e===`number`||e===`weight`,QP=e=>e===`shadow`,$P=aP(()=>{let e=sP(`color`),t=sP(`font`),n=sP(`text`),r=sP(`font-weight`),i=sP(`tracking`),a=sP(`leading`),o=sP(`breakpoint`),s=sP(`container`),c=sP(`spacing`),l=sP(`radius`),u=sP(`shadow`),d=sP(`inset-shadow`),f=sP(`text-shadow`),p=sP(`drop-shadow`),m=sP(`blur`),h=sP(`perspective`),g=sP(`aspect`),_=sP(`ease`),v=sP(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[gP,`full`,`auto`,...w()],E=()=>[vP,`none`,`subgrid`,$,Q],D=()=>[`auto`,{span:[`full`,vP,$,Q]},vP,$,Q],ee=()=>[vP,`auto`,$,Q],te=()=>[`auto`,`min`,`max`,`fr`,$,Q],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...w()],ae=()=>[gP,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],oe=()=>[gP,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],O=()=>[gP,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],k=()=>[e,$,Q],se=()=>[...b(),RP,NP,{position:[$,Q]}],ce=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],le=()=>[`auto`,`cover`,`contain`,zP,OP,{size:[$,Q]}],ue=()=>[yP,IP,kP],de=()=>[``,`none`,`full`,l,$,Q],fe=()=>[``,_P,IP,kP],pe=()=>[`solid`,`dashed`,`dotted`,`double`],me=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],he=()=>[_P,yP,RP,NP],ge=()=>[``,`none`,m,$,Q],_e=()=>[`none`,_P,$,Q],ve=()=>[`none`,_P,$,Q],ye=()=>[_P,$,Q],be=()=>[gP,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[bP],breakpoint:[bP],color:[xP],container:[bP],"drop-shadow":[bP],ease:[`in`,`out`,`in-out`],font:[EP],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[bP],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[bP],shadow:[bP],spacing:[`px`,_P],text:[bP],"text-shadow":[bP],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,gP,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[DP],columns:[{columns:[_P,Q,$,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:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[vP,`auto`,$,Q]}],basis:[{basis:[gP,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[_P,gP,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,_P,$,Q]}],shrink:[{shrink:[``,_P,$,Q]}],order:[{order:[vP,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ae()}],"inline-size":[{inline:[`auto`,...oe()]}],"min-inline-size":[{"min-inline":[`auto`,...oe()]}],"max-inline-size":[{"max-inline":[`none`,...oe()]}],"block-size":[{block:[`auto`,...O()]}],"min-block-size":[{"min-block":[`auto`,...O()]}],"max-block-size":[{"max-block":[`none`,...O()]}],w:[{w:[s,`screen`,...ae()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ae()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ae()]}],h:[{h:[`screen`,`lh`,...ae()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ae()]}],"max-h":[{"max-h":[`screen`,`lh`,...ae()]}],"font-size":[{text:[`base`,n,IP,kP]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,HP,jP]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,yP,Q]}],"font-family":[{font:[LP,MP,t]}],"font-features":[{"font-features":[Q]}],"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:[i,$,Q]}],"line-clamp":[{"line-clamp":[_P,`none`,$,AP]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...pe(),`wavy`]}],"text-decoration-thickness":[{decoration:[_P,`from-font`,`auto`,$,kP]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[_P,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[vP,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],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`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:le()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},vP,$,Q],radial:[``,$,Q],conic:[vP,$,Q]},BP,PP]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ue()}],"gradient-via-pos":[{via:ue()}],"gradient-to-pos":[{to:ue()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...pe(),`hidden`,`none`]}],"divide-style":[{divide:[...pe(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...pe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[_P,$,Q]}],"outline-w":[{outline:[``,_P,IP,kP]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`none`,u,VP,FP]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,VP,FP]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:fe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[_P,kP]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,VP,FP]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[_P,$,Q]}],"mix-blend":[{"mix-blend":[...me(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":me()}],"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":[_P]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[_P]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:ge()}],brightness:[{brightness:[_P,$,Q]}],contrast:[{contrast:[_P,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,VP,FP]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,_P,$,Q]}],"hue-rotate":[{"hue-rotate":[_P,$,Q]}],invert:[{invert:[``,_P,$,Q]}],saturate:[{saturate:[_P,$,Q]}],sepia:[{sepia:[``,_P,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[_P,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[_P,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,_P,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_P,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,_P,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[_P,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[_P,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,_P,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[_P,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[_P,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:_e()}],"rotate-x":[{"rotate-x":_e()}],"rotate-y":[{"rotate-y":_e()}],"rotate-z":[{"rotate-z":_e()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":[`scale-3d`],skew:[{skew:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":[`translate-none`],zoom:[{zoom:[vP,$,Q]}],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"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`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,$,Q]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[_P,IP,kP,AP]}],stroke:[{stroke:[`none`,...k()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`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`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`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-bs`,`border-w-be`,`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-bs`,`border-color-be`,`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-mbs`,`scroll-mbe`,`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-pbs`,`scroll-pbe`,`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`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function eF({resolution:e,inputs:t,config:n,bailReason:r}){if(e===null||t===null)return null;let i=sM[e.templateId];if(i===void 0)return null;let a=r!==null,o=a?`border-warning/70 bg-warning/5`:`border-info/80 bg-info/5`,s=a?`bg-warning/85 text-warning-content`:`bg-info/85 text-info-content`,c=a?`border-warning`:`border-success`,l=a?`bg-warning/85 text-warning-content`:`bg-success/85 text-success-content`,u=t.userShare?`userShare`:t.presentation?`presentation`:null,{regions:d}=WM(i,{state:e.state,contentKind:u},t,e.sizeClass,e.containerPx,n);return I(`div`,{class:`pointer-events-none absolute inset-0 z-40`,"aria-hidden":`true`,children:[a&&I(`span`,{class:`absolute top-1 left-1/2 -translate-x-1/2 rounded bg-warning/90 px-2 py-0.5 font-mono text-[10px] text-warning-content`,children:[`engine plan only · legacy: `,r]}),d.map(e=>I(`div`,{class:$P(`absolute rounded-box border border-dashed`,o),style:{left:`${e.rect.x}px`,top:`${e.rect.y}px`,width:`${e.rect.width}px`,height:`${e.rect.height}px`},children:I(`span`,{class:$P(`absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight`,s),children:[I(`span`,{children:e.region.name}),I(`span`,{class:`opacity-75`,children:e.region.accepts.join(` · `)})]})},e.region.name)),e.tiles.map(e=>I(`div`,{class:$P(`absolute border`,c),style:{left:`${e.rect.x}px`,top:`${e.rect.y}px`,width:`${e.rect.width}px`,height:`${e.rect.height}px`},children:I(`span`,{class:$P(`absolute right-1 bottom-1 rounded px-1.5 py-0.5 font-mono text-[10px]`,l),children:[e.kind,` `,e.rect.width,`×`,e.rect.height]})},`tile-${e.id}`))]})}function tF(e){return{version:1,buildSha:eN,engineVersion:eN,config:aM,session:{containerPx:{width:Math.round(e.container.widthPx),height:Math.round(e.container.heightPx)},slots:{...e.kioskMode===!0?{kioskMode:!0}:{},replica:e.replica,selfView:e.selfView,presentation:e.presentation!==null,userShare:e.userShare!==null,callControls:e.callControls,callControlsVisible:e.callControlsVisible??!0,...e.callControlsRect===void 0?{}:{callControlsRect:e.callControlsRect}},prefs:e.prefs,cards:e.cards}}}function nF({resolution:e,inputs:t,shadowing:n,bailReason:r,engineError:i=null}){let[a,o]=A(!1),s=M(null);if(j(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),e===null||t===null)return i===null?null:I(`div`,{class:`pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg`,children:[I(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[I(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),I(`span`,{class:`text-warning`,children:`observing`})]}),I(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[I(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),I(`dd`,{class:`text-warning`,children:r}),I(`dt`,{class:`text-error opacity-80`,children:`error`}),I(`dd`,{class:`text-error break-all`,children:i})]})]});let c=()=>{let e=JSON.stringify(tF(t),null,2);s.current!==null&&clearTimeout(s.current),navigator.clipboard?.writeText(e).then(()=>{o(!0),s.current=setTimeout(()=>o(!1),1500)},()=>o(!1))},l=e.degradations.evictedCardIds,u=bN(e.sizeClass);return I(`div`,{class:`pointer-events-auto max-w-[22rem] rounded-box bg-base-100/95 p-3 font-mono text-[10px] leading-relaxed shadow-lg`,children:[I(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[I(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),I(`span`,{class:n?`text-warning`:`text-success`,children:n?`observing`:`driving`})]}),I(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[I(`dt`,{class:`opacity-60`,children:`state`}),I(`dd`,{children:e.state}),I(`dt`,{class:`opacity-60`,children:`template`}),I(`dd`,{children:e.templateId}),I(`dt`,{class:`opacity-60`,children:`class`}),I(`dd`,{children:[e.sizeClass.width,` / `,e.sizeClass.height]}),u!==void 0&&I(D,{children:[I(`dt`,{class:`opacity-60`,children:`composition`}),I(`dd`,{children:u})]}),I(`dt`,{class:`opacity-60`,children:`container`}),I(`dd`,{children:[e.containerPx.width,`×`,e.containerPx.height]}),t.callControlsRect!==void 0&&I(D,{children:[I(`dt`,{class:`opacity-60`,children:`controls`}),I(`dd`,{children:[`x `,t.callControlsRect.x,`–`,t.callControlsRect.x+t.callControlsRect.width,t.callControlsVisible===!1?` · hidden`:` · shown`]})]}),I(`dt`,{class:`opacity-60`,children:`tiles`}),I(`dd`,{children:e.tiles.map(e=>`${e.kind}:${e.rect.width}×${e.rect.height}`).join(` `)||`none`}),l.length>0&&I(D,{children:[I(`dt`,{class:`text-error opacity-80`,children:`dropped`}),I(`dd`,{class:`text-error`,children:l.join(`, `)})]}),r!==null&&I(D,{children:[I(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),I(`dd`,{class:`text-warning`,children:r})]}),i!==null&&I(D,{children:[I(`dt`,{class:`text-error opacity-80`,children:`error`}),I(`dd`,{class:`text-error break-all`,children:i})]})]}),I(`button`,{type:`button`,class:`btn btn-xs mt-2 w-full`,onClick:c,children:a?`copied`:`copy envelope for playground`})]})}var rF={effect:gN,animate:!1},iF=zt(rF),aF={presence:{phase:`connecting`},localId:null,isScreenSharing:!1,isPersonaPresenting:!1,hasPersonaVideo:!1,hasSelfView:!1};function oF(e,t){return e===null||t===null?e===t:e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sF(e,t){let n=e.containerPx===null||t.containerPx===null?e.containerPx===t.containerPx:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height;return e.driving===t.driving&&e.replicaCollapsed===t.replicaCollapsed&&n&&oF(e.replica,t.replica)&&oF(e.selfView,t.selfView)&&oF(e.content,t.content)}var cF=new Map,lF=new Set;function uF({instances:e,viewport:t,callControlsBandPx:n,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}){let c=iN(o,s)&&r!==void 0,l=r??aF,u=globalThis.location?.search??``,d=fN({kioskMode:N(()=>aN(u),[u]),instances:e,viewport:t,presence:l,callControlsBandPx:n,callControlsVisible:i,callControlsRect:a,enabled:c}),f=c?lN.value:null,p=f===null?mN(d.resolution,l,c):`engine-error`;DN({enabled:c,enabledVia:CN(nN,o===!0,s===!0),bail:p,resolution:d.resolution,engineError:f});let m=M(!1);l.presence.phase===`ready`?l.hasPersonaVideo&&(m.current=!0):m.current=!1;let h=!m.current,g;try{g=_N(d.resolution,p,h)}catch(e){uN(e),g=gN}let _=M(gN),v=yN(_.current,g);j(()=>{_.current=g,sF(iF.peek().effect,g)||(iF.value={effect:g,animate:v})}),j(()=>()=>{dN(),iF.peek()!==rF&&(iF.value=rF)},[]);let y=d.resolution,b=N(()=>{if(p!==null||y===null)return cF;try{let e=new Map;for(let t of y.tiles)t.kind===`card`&&e.set(t.id,t.rect);return e}catch(e){return uN(e),cF}},[p,y]),x=N(()=>p!==null||y===null?lF:new Set(y.tiles.filter(pN).map(e=>e.id)),[p,y]),S=rN?I(`div`,{class:`contents`,"data-grid-debug":!0,children:[I(eF,{resolution:d.resolution,inputs:d.inputs,config:aM,bailReason:p}),I(`div`,{class:`pointer-events-none absolute bottom-4 left-4 z-50`,children:I(nF,{resolution:d.resolution,inputs:d.inputs,shadowing:p!==null,bailReason:p,engineError:f})})]}):null;return{cardRects:b,kioskCardIds:x,sheetBottomPx:hN(y,p),animate:v,recordNaturalHeight:d.recordNaturalHeight,debug:S}}var dF=[`left`,`top`,`width`,`height`].map(e=>`${e} ${Zb}`).join(`, `);function fF(e,t){return{left:`${e.x}px`,top:`${e.y}px`,width:`${e.width}px`,height:`${e.height}px`,transition:t&&!sx()?dF:`none`}}function pF({state:e}){return e.enabled?I(`details`,{class:`pointer-events-auto w-full max-w-md rounded-lg border border-base-300 bg-base-100/95 p-2 text-xs shadow-lg backdrop-blur`,children:[I(`summary`,{class:`cursor-pointer font-medium`,children:`Magic Canvas debug`}),I(`dl`,{class:`mt-2 grid gap-2`,children:[I(mF,{label:`iframe`,value:e.iframeLifecycleState}),I(mF,{label:`post`,value:e.lastInteractionPostResult}),I(mF,{label:`context`,value:e.lastModelContextUpdate}),I(mF,{label:`error`,value:e.lastError}),I(hF,{label:`tool_call`,value:e.lastToolCall}),I(hF,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function mF({label:e,value:t}){return t?I(`div`,{children:[I(`dt`,{class:`font-semibold`,children:e}),I(`dd`,{class:`break-words text-base-content/70`,children:t})]}):null}function hF({label:e,value:t}){return t===void 0?null:I(`div`,{children:[I(`dt`,{class:`font-semibold`,children:e}),I(`dd`,{children:I(`pre`,{class:`max-h-40 overflow-auto rounded bg-base-200 p-2 text-[10px] leading-relaxed`,children:JSON.stringify(t,null,2)})})]})}var gF=1e3,_F=5e3,vF=1200,yF=[2e3,6e3];async function bF(e,t,n){let r=new AbortController,i=globalThis.setTimeout(()=>r.abort(),_F);try{await En(e,t,n,{signal:r.signal})}finally{globalThis.clearTimeout(i)}}function xF(e){return e instanceof bn&&e.status>=400&&e.status<500&&e.status!==408&&e.status!==429}function SF(e,t){console.error(`Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.`,e),t({lastInteractionPostResult:`error`,lastError:YF(e).message},{error:e,operation:`canvas.bridge`})}function CF(e){return e.content.some(e=>e.type===`text`&&typeof e.text==`string`&&e.text.trim()!==``)}function wF(e,t,n,r){(async()=>{let i;for(let a of yF){await new Promise(e=>setTimeout(e,a));try{await bF(e,t,n),r({lastInteractionPostResult:`recovered`,lastError:void 0});return}catch(e){if(i=e,xF(e))break}}SF(i,r)})()}var TF=2e3;function EF(e){return e.correct_answer===void 0?vF:TF}var DF=48,OF=`allow-scripts`,kF={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`,"canvas.text":`allow-scripts allow-popups allow-popups-to-escape-sandbox`};function AF(e,t){if(!t.contentWindow||e.source!==t.contentWindow)return!1;let n=e.data;return!!n&&typeof n==`object`&&n?.jsonrpc===`2.0`}var jF=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{AF(e,this.#e)&&this.onmessage?.(e.data)};return this.#t=e,globalThis.addEventListener(`message`,e),Promise.resolve()}send(e){return this.#e.contentWindow?.postMessage(e,`*`),Promise.resolve()}close(){return this.#t&&globalThis.removeEventListener(`message`,this.#t),this.#t=void 0,this.onclose?.(),Promise.resolve()}};function MF(e){for(let t of Vy)if(e.some(e=>GF(e)===t))return t;return null}function NF({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=KF(),callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}={}){let{client:c,telemetry:l}=$m(),{dataTheme:u,cssVars:d}=rM(),f=Rf(),p=zf(),[m,h]=A([]),[g,_]=VF(),[v,y]=A(()=>({enabled:n,iframeLifecycleState:`idle`})),b=uF({instances:m,viewport:_,callControlsBandPx:72,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}),x=P((e,t)=>{if(e.lastError){let n={stage:`magic_canvas`,outcome:e.lastInteractionPostResult===`retrying`?`retry`:`failed`,operation:t?.operation??(e.lastInteractionPostResult?`canvas.bridge`:`canvas.load`),component:`magic_canvas`,code:`canvas_error`,handled:!0};t?xr(l,t.error,n):l?.record(n)}e.lastInteractionPostResult===`recovered`&&l?.record({stage:`magic_canvas`,outcome:`recovered`,operation:`canvas.bridge`,component:`magic_canvas`}),y(t=>({...t,...e}))},[l]),S=P((e,t=`*`)=>{if(p!==`joined-meeting`){x({lastError:`Dropped Magic Canvas app message because the Daily meeting is not joined.`});return}f?.sendAppMessage(e,t)},[f,p,x]),C=N(()=>({theme:u.value===`dark`?`dark`:`light`,cssVars:d.value}),[u.value,d.value]);j(()=>{y(e=>e.enabled===n?e:{...e,enabled:n})},[n]),Uf({onAppMessage:P(e=>{if(p!==`joined-meeting`){x({lastToolCall:e.data,iframeLifecycleState:`idle`,lastError:`Dropped Magic Canvas tool call because the Daily meeting is not joined.`});return}try{let t=Lb(e.data);if(!t)return;h(e=>tb(e,t)),x({lastToolCall:e.data,parsedCanvasConfig:t.kind===`show`?t.instance.canvas_config:void 0,iframeLifecycleState:t.kind===`clear`?`closed`:`received`,lastError:void 0})}catch(e){x({iframeLifecycleState:`error`,lastError:YF(e).message},{error:e,operation:`canvas.validate`})}},[p,x])});let w=m.map(e=>{let t=cb(e,_),n=t.display_mode===`fullscreen`?null:b.cardRects.get(e.id)??null;return{instance:e,layout:n===null?t:{...t,viable_slot:`safe-area-right`},gridRect:n}}),T=lb(w.map(({layout:e})=>e),_),E=[...w].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;j(()=>{e?.(T)},[e,T.active,T.side,T.video_shift_x,T.backdrop.type,T.safe_area?.x,T.safe_area?.y,T.safe_area?.width,T.safe_area?.height]);let D=MF(w.map(({layout:e})=>e));j(()=>{t?.(D)},[t,D]);let ee=m.length>0||v.enabled;return I(`div`,{ref:g,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,children:[ee&&E&&I(`div`,{class:`absolute inset-0 bg-black/45`}),ee&&!E&&b.sheetBottomPx!==null&&I(`div`,{"data-grid-sheet-scrim":!0,class:`absolute inset-x-0 top-0`,style:{height:Math.min(b.sheetBottomPx+64,_.height),backgroundImage:`linear-gradient(to bottom, rgb(0 0 0 / 0.45) calc(100% - 64px), rgb(0 0 0 / 0))`}}),ee&&w.map(({instance:e,layout:t,gridRect:n})=>I(PF,{slot:GF(t),safeAreaTop:T.safe_area?.y,frameWidth:_.width,...n?{gridRect:n,gridAnimate:b.animate}:{},children:r=>I(FF,{availableHeight:r,client:c,gridDriven:n!==null,gridKioskCard:n!==null&&b.kioskCardIds.has(e.id),hostTheme:C,instance:e,layout:t,dimmed:!!(E&&E!==e.tool_call_id),onDebug:x,onNaturalHeightChange:b.recordNaturalHeight,onComplete:()=>{h(t=>t.filter(t=>t.id!==e.id))},onDisplayModeChange:t=>{h(n=>n.map(n=>n.tool_call_id===e.tool_call_id?{...n,layout:{...n.layout,display_mode:t}}:n))},sendAppMessage:S})},e.id)),ee&&I(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:I(pF,{state:v})}),b.debug]})}function PF({slot:e,safeAreaTop:t,frameWidth:n,gridRect:r,gridAnimate:i=!1,children:a}){let[o,s]=HF(),c=a(r?r.height:e===`full`?void 0:s);if(r)return I(`div`,{ref:o,class:`pointer-events-auto absolute`,style:fF(r,i),"data-canvas-slot":e,"data-grid-driven":`true`,children:I(`div`,{class:`flex h-full w-full flex-col gap-2`,children:c})});if(e===`safe-area-left`||e===`safe-area-right`){let r=t==null?`1rem`:`${t*100}%`,i=n!=null&&n>0?Math.max(0,n-32):void 0;return I(`div`,{ref:o,class:WF(e),style:{top:r,bottom:`72px`,maxWidth:i},"data-canvas-slot":e,children:I(`div`,{class:`my-auto flex w-full flex-col gap-2`,children:c})})}return I(`div`,{ref:o,class:WF(e),"data-canvas-slot":e,children:I(`div`,{class:`contents`,children:c})})}function FF({availableHeight:e,client:t,gridDriven:n=!1,gridKioskCard:r=!1,hostTheme:i,instance:a,layout:o,dimmed:s,onDebug:c,onComplete:l,onDisplayModeChange:u,onNaturalHeightChange:d,sendAppMessage:f}){let p=M(null),m=M(null),h=M(e),g=M(r),_=M(320),v=M(i),y=M(a),b=M(o),x=M(-1),S=M(l),C=M(u),w=M(d),T=M(f),[E,D]=A(720);j(()=>{y.current=a},[a]),j(()=>{_.current=E,m.current?.setHostContext(zF(y.current,v.current,b.current,h.current,E,g.current))},[E]),j(()=>{h.current=e,g.current=r;let t=RF(i,p.current);v.current=t,m.current?.setHostContext(zF(y.current,t,b.current,e,_.current,r))},[e,i,r]),j(()=>{b.current=o,m.current?.setHostContext(zF(y.current,v.current,o,e,_.current,g.current))},[e,o]),j(()=>{S.current=l,C.current=u,w.current=d,T.current=f},[l,u,d,f]),j(()=>{let e=p.current;if(!e)return;let n=!1,r=null,i=null,o=null,s=null,l=new URL(a.canvas_config.sandbox_url,globalThis.location.href).href,u=e=>{n||c({iframeLifecycleState:`error`,lastError:YF(e).message},{error:e,operation:`canvas.bridge`})},d=()=>{if(n||!i)return;let e=y.current,t=ob(e,i);i=null,T.current({message_type:`conversation`,event_type:`conversation.append_llm_context`,conversation_id:e.conversation_id,properties:{context:t}}),c({lastModelContextUpdate:e.canvas_config.component,lastError:void 0})},f=()=>{if(r)return;if(e.src!==l){e.src;return}if(n||!e.contentWindow)return;let f=new tM(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:zF(a,RF(v.current,e),b.current,h.current,_.current,g.current)});r=f,m.current=f,f.oninitialized=()=>{n||(c({iframeLifecycleState:`ready`}),x.current=y.current.revision,f.sendToolInput({arguments:y.current.arguments}).catch(u))},f.onsizechange=({height:e})=>{if(!n&&typeof e==`number`&&Number.isFinite(e)){let t=Math.min(Math.max(e,DF),720);D(t),w.current(y.current.id,t)}},f.onmessage=async e=>{let r=nb(e);if(!r){if(CF(e)){let e=`Magic Canvas message included text without interaction metadata; no interaction row was recorded.`;return c({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`missing_interaction_metadata`,message:e}}return{}}let i=y.current,a=(()=>{try{let e=rb(i,r);return{interaction:e,request:Rb(e)}}catch(e){return{error:e}}})();if(`error`in a){let e=YF(a.error).message;return c({lastInteractionPostResult:`error`,lastError:e},{error:a.error,operation:`canvas.validate`}),{isError:!0,code:`interaction_normalization_failed`,message:e}}let{interaction:o,request:l}=a,u=``;try{u=ab(e,o)}catch(e){c({lastError:YF(e).message}),o.type===`submit`&&console.warn(`Magic Canvas dropped the response text of a submitted card.`,e)}let d=!0;try{await bF(t,o.conversation_id,l.body)}catch(e){d=!1,xF(e)?SF(e,c):(console.warn(`Magic Canvas interaction POST failed; continuing without it and retrying in the background.`,e),c({lastInteractionPostResult:`failed_open`,lastError:YF(e).message},{error:e,operation:`canvas.bridge`}),wF(t,o.conversation_id,l.body,c))}if(n)return{};if(u)try{T.current({message_type:`conversation`,event_type:`conversation.respond`,conversation_id:i.conversation_id,properties:{text:u}})}catch(e){console.error(`Magic Canvas respond send failed.`,e),c({lastError:YF(e).message},{error:e,operation:`canvas.bridge`})}return d&&c({lastInteractionPostResult:`success`,lastError:void 0}),ib(o)&&(o.type===`submit`?(s&&clearTimeout(s),s=setTimeout(()=>{s=null,n||S.current()},EF(i.arguments))):S.current()),{}},f.onupdatemodelcontext=async e=>(i=e,o||=setTimeout(()=>{o=null,d()},gF),{}),f.onrequestdisplaymode=async({mode:e})=>{let t=e===`fullscreen`?`fullscreen`:`inline`;return C.current(t),b.current={...b.current,display_mode:t,viable_slot:t===`fullscreen`?`full`:b.current.viable_slot},f.setHostContext(zF(y.current,v.current,b.current,h.current,_.current,g.current)),{mode:t}},f.connect(new jF(e)).then(()=>void 0).catch(u)};c({iframeLifecycleState:`mounting`,lastInteractionPostResult:void 0}),a.canvas_config.sandbox_url,e.src=a.canvas_config.sandbox_url;let E=()=>{f()};return e.addEventListener(`load`,E),f(),()=>{o&&=(clearTimeout(o),null),s&&=(clearTimeout(s),null),d(),n=!0,e.removeEventListener(`load`,E),m.current=null,c({iframeLifecycleState:`closed`}),r&&zy(r)}},[t,a.id,a.canvas_config.sandbox_url,c]),j(()=>{a.revision!==0&&(a.revision<=x.current||(x.current=a.revision,m.current?.sendToolInput({arguments:a.arguments}).catch(e=>{c({iframeLifecycleState:`error`,lastError:YF(e).message},{error:e,operation:`canvas.bridge`})})))},[a.arguments,a.revision,c]);let ee=o.viable_slot===`full`||o.display_mode===`fullscreen`,te=ee?null:BF(E,e,r),ne=te?.placeholderStyle,re=te?.cardStyle,ie=ee?{height:`100%`}:te?.iframeStyle??{height:`${E}px`},ae=[`pointer-events-auto w-full overflow-hidden rounded-box border-[length:var(--border)] border-base-300 bg-base-100 transition-[opacity,transform]`,r?``:`shadow-xl`,ee?`fixed inset-4 z-10 max-w-none`:n?`max-w-none`:`max-w-md`,s?`scale-[0.98] opacity-40`:``].filter(Boolean).join(` `),oe=kF[a.canvas_config.component]??OF,O=I(`div`,{class:ae,style:re,"data-canvas-card":o.viable_slot,children:I(`iframe`,{ref:p,title:`${a.canvas_config.component} ${a.canvas_config.component_version}`,class:ee?`block h-full w-full border-0 bg-transparent`:`block border-0 bg-transparent`,sandbox:oe,style:ie})});return ee?O:I(`div`,{class:`block w-full`,style:ne,children:O})}var IF=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`];function LF(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of IF){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function RF(e,t){let n=LF(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function zF(e,t,n,r,i,a=!1){let o=zb(t,n),s=n.viable_slot===`full`||n.display_mode===`fullscreen`,c=s?void 0:qF(r),l=s?1:BF(i??0,r,a)?.displayScale??1;return{...e.canvas_config.host_context,...o,containerDimensions:{...JF(o.containerDimensions)?o.containerDimensions:{},...c===void 0?{}:{maxHeight:c},displayScale:l}}}function BF(e,t,n=!1){if(t===void 0||!Number.isFinite(t)||t<=0)return null;let r=Math.min(e,720);if(n)return{displayScale:1,placeholderStyle:{height:`${t}px`},cardStyle:{height:`100%`},iframeStyle:{width:`100%`,height:`100%`}};if(r<=t)return{displayScale:1,placeholderStyle:{maxHeight:`${t}px`},cardStyle:void 0,iframeStyle:{width:`100%`,height:`${r}px`}};let i=t/r;return{displayScale:i,placeholderStyle:{height:`${r*i}px`,maxHeight:`${t}px`,overflow:`hidden`},cardStyle:{height:`${r}px`,transform:`scale(${i})`,transformOrigin:`top center`},iframeStyle:{width:`100%`,height:`${r}px`}}}function VF(){let e=M(null),[t,n]=A(()=>UF(null));return j(()=>{let t=()=>n(t=>{let n=UF(e.current);return t.width===n.width&&t.height===n.height&&t.visualViewportHeight===n.visualViewportHeight?t:n});t(),globalThis.addEventListener(`resize`,t),globalThis.visualViewport?.addEventListener(`resize`,t);let r;return typeof ResizeObserver<`u`&&e.current&&(r=new ResizeObserver(t),r.observe(e.current)),()=>{globalThis.removeEventListener(`resize`,t),globalThis.visualViewport?.removeEventListener(`resize`,t),r?.disconnect()}},[]),[e,t]}function HF(){let e=M(null),[t,n]=A();return j(()=>{let t=e.current;if(!t)return;let r=e=>{let r=e??t.getBoundingClientRect().height;!Number.isFinite(r)||r<=0||n(Math.floor(r))},i=()=>r();if(i(),typeof ResizeObserver>`u`)return globalThis.addEventListener(`resize`,i),()=>globalThis.removeEventListener(`resize`,i);let a=new ResizeObserver(e=>{r(e[0]?.contentRect.height)});return a.observe(t),()=>a.disconnect()},[]),[e,t]}function UF(e){let t=globalThis.visualViewport?.height,n=e?.getBoundingClientRect();if(n&&n.width>0&&n.height>0){let e=t===void 0?void 0:Math.max(0,(globalThis.innerHeight||0)-t);return{width:n.width,height:n.height,visualViewportHeight:e===void 0?void 0:Math.max(0,n.height-e)}}return{width:globalThis.innerWidth||1024,height:globalThis.innerHeight||768,visualViewportHeight:t}}function WF(e){let t=`absolute flex gap-2`;switch(e){case`safe-area-left`:return`${t} left-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;case`safe-area-right`:return`${t} right-4 w-[28rem] flex-col overflow-y-auto [scrollbar-gutter:stable]`;case`safe-area-bottom`:return`${t} right-4 bottom-24 left-4 flex-col items-center justify-end @max-mobile:right-3 @max-mobile:bottom-20 @max-mobile:left-3`;case`full`:return`${t} inset-4 flex-col items-stretch justify-stretch`}}function GF(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function KF(){return!1}function qF(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function JF(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function YF(e){return e instanceof Error?e:Error(String(e))}var XF=class extends ee{state={errored:!1};componentDidCatch(e){this.props.onError(e),this.setState({errored:!0})}render(){return this.state.errored?null:this.props.children}},ZF=1e4;function QF(e,t=ZF){let[n,r]=A(!1),i=M(!1);return j(()=>{if(!e){r(!1);return}if(i.current)return;i.current=!0,r(!0);let n=setTimeout(()=>r(!1),t);return()=>clearTimeout(n)},[e,t]),n}function $F(e){let t=Bf(),n=Kf(t??``),r=!Jf(t??``).isOff,i=vy(e),a=i.phase===`ready`?i.replicaId:``,o=Jf(a),s=!r&&(o.state===`playable`||o.state===`loading`),c=i.phase===`ready`&&!e&&!i.videoState.isOff,l=!e&&t!==null&&!n.isOff,u=i.phase!==`ready`||i.videoState.isOff;return N(()=>({presence:i,localId:t,isScreenSharing:r,isPersonaPresenting:s,hasPersonaVideo:c,hasSelfView:l}),[i.phase,a,u,t,r,s,c,l])}function eI(e,t,n){let[r,i]=A(!0);return j(()=>{if(!t)return;let n=e.current;if(!n||typeof matchMedia!=`function`)return;let r=matchMedia(`(hover: hover) and (pointer: fine)`),a=()=>{try{return n.matches(`:has(:focus-visible)`)}catch{return!1}},o=n.matches(`:hover`),s=()=>{i(!r.matches||o||a())},c=()=>{o=!0,s()},l=()=>{o=!1,s()};return n.addEventListener(`pointerenter`,c),n.addEventListener(`pointerleave`,l),n.addEventListener(`focusin`,s),n.addEventListener(`focusout`,s),r.addEventListener(`change`,s),s(),()=>{n.removeEventListener(`pointerenter`,c),n.removeEventListener(`pointerleave`,l),n.removeEventListener(`focusin`,s),n.removeEventListener(`focusout`,s),r.removeEventListener(`change`,s)}},[t,e,n]),r}function tI(e,t,n,r,i){let[a,o]=A(void 0);return j(()=>{if(!r)return;let i=e.current,a=t.current;if(!i||!a||typeof ResizeObserver>`u`)return;let s=()=>{let e=i.getBoundingClientRect(),t=1/0,r=-1/0;for(let e of a.children){let n=e.getBoundingClientRect();n.width!==0&&(t=Math.min(t,n.left),r=Math.max(r,n.right))}if(e.width===0||!Number.isFinite(t)||r<=t)return;let s={x:Math.round(t-e.left),y:Math.round(e.height-n),width:Math.round(r-t),height:n};o(e=>e!==void 0&&e.x===s.x&&e.y===s.y&&e.width===s.width&&e.height===s.height?e:s)},c=new ResizeObserver(s);c.observe(i),c.observe(a);for(let e of a.children)c.observe(e);return s(),()=>c.disconnect()},[r,e,t,n,i]),a}var nI=1e4;function rI({onTimeout:e,timeoutMs:t=nI,active:n=!0}){let r=_y().length>0,[i,a]=A(!1),o=M(e);return j(()=>{o.current=e},[e]),j(()=>{if(!n||r){a(!1);return}let e=setTimeout(()=>{a(!0),o.current()},t);return()=>clearTimeout(e)},[n,r,t]),{hasJoined:r,timedOut:i}}function iI(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function aI({onShutdown:e}){let t=M(e);j(()=>{t.current=e},[e]),Uf({onAppMessage:P(e=>{iI(e?.data)&&t.current()},[])})}var oI=mn(`PiP`),sI=360,cI=280;function lI(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window}function uI(e){let{enabled:t,active:n}=e,[r,i]=A(null),a=lI(),o=F(Sh),s=P(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=P(async()=>{if(a&&t&&n&&(!r||r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:sI,height:cI}),t=Ie.replace(/:host(?=[\s,{])/g,`:host, :root`),n=e.document.createElement(`style`);n.textContent=t,e.document.head.appendChild(n),e.document.body.style.margin=`0`,e.document.body.style.width=`100%`,e.document.body.style.height=`100vh`,e.document.body.style.overflow=`hidden`,e.addEventListener(`pagehide`,()=>{i(t=>t===e?null:t)},{once:!0}),i(e)}catch(e){oI.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return j(()=>{if(!t||!a||!n)return;let e=()=>{document.visibilityState===`hidden`?c():document.visibilityState===`visible`&&s()};document.addEventListener(`visibilitychange`,e);let r=[],i=null,o=`none`,l=!1;if(typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;i=e.metadata,o=e.playbackState;try{e.metadata=new MediaMetadata({title:`Tavus conversation`}),e.playbackState=`playing`,l=!0}catch(e){oI.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),r.push(t)}catch(e){oI.info(`mediaSession.${t} not supported`,e)}};t(`enterpictureinpicture`,()=>{c()}),t(`play`,()=>{}),t(`pause`,()=>{})}return()=>{if(document.removeEventListener(`visibilitychange`,e),typeof navigator<`u`&&`mediaSession`in navigator){let e=navigator.mediaSession;for(let t of r)try{e.setActionHandler(t,null)}catch{}if(l)try{e.metadata=i,e.playbackState=o}catch{}}}},[t,a,n,c,s]),j(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),j(()=>()=>{r&&!r.closed&&r.close()},[r]),j(()=>{if(!r||r.closed||!o)return;let e=()=>{r.document.body.setAttribute(`data-theme`,o.dataTheme.value);let e=o.cssVars.value;for(let[t,n]of Object.entries(e))r.document.body.style.setProperty(t,n)};e();let t=o.dataTheme.subscribe(()=>e()),n=o.cssVars.subscribe(()=>e());return()=>{t(),n()}},[r,o]),{pipWindow:r,isSupported:a,requestPipWindow:c,closePipWindow:s}}var dI=zt(null),fI={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},pI=ep(({id:e,showAudioWave:t=!0})=>{let n=Kf(e).isOff;return I(`div`,{class:`relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n?`hidden`:``}`,children:[I(yv,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover ${n?`hidden`:``}`}),t&&I(`div`,{class:`absolute bottom-2 right-2`,children:I(uy,{id:e})})]})}),mI=ep(()=>{let e=Bf(),{isScreenSharing:t}=Cv(),n=_y()[0];return I(D,{children:[t&&n&&I(pI,{id:n}),e&&I(pI,{id:e,showAudioWave:!1})]})}),hI=ep(()=>I(`div`,{class:`absolute bottom-4 @max-mobile:bottom-20 left-4 flex flex-col items-end gap-2 z-20`,children:I(mI,{})})),gI=ep(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,effect:i,animate:a})=>I(D,{children:[I(`div`,{class:`absolute inset-0 bg-base-200`}),i.content&&I(`div`,{class:`absolute overflow-hidden rounded-box bg-black`,style:fF(i.content,a),children:I(yv,{sessionId:n?t??``:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 h-full w-full object-contain`})}),i.replica&&I(`div`,{class:$P(`absolute overflow-hidden`,i.replicaCollapsed&&`rounded-box`),style:fF(i.replica,a),children:I(Sy,{personaSessionId:e,localSessionId:t,isScreenSharing:!1,avatarOff:r})})]})),_I=ep(()=>{let{effect:e,animate:t}=iF.value,n=Bf();return n===null||e.selfView===null?null:I(`div`,{class:`absolute z-20 overflow-hidden rounded-box bg-black/30`,style:fF(e.selfView,t),children:I(yv,{automirror:!0,sessionId:n,type:`video`,fit:`cover`,className:`h-full w-full object-cover`})})}),vI=ep(({canvasRenderedSlot:e})=>{let t=vN(iF.value.effect);return t===`hidden`?null:t===`engine`?I(XF,{onError:uN,children:I(_I,{})}):e===`safe-area-bottom`?null:I(hI,{})}),yI=ep(()=>{let e=_y()[0];return e?I(bv,{sessionId:e}):null}),bI=ep(e=>I(D,{children:[I(yI,{}),I(xI,{...e})]})),xI=ep(({isAudioOnly:e,presence:t,canvasLayoutEffect:n,canvasRenderedSlot:r})=>{let{presence:i,localId:a,isScreenSharing:o,isPersonaPresenting:s}=t,c=iF.value,l=n.active&&!o&&(!e||s);return i.phase===`left`?I(cy,{}):i.phase===`connecting`?I(sy,{}):e&&!s?I(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:I(my,{sessionId:i.replicaId})}):c.effect.driving?I(XF,{onError:uN,children:I(gI,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,effect:c.effect,animate:c.animate})}):s?I(_x,{personaSessionId:i.replicaId,isAudioOnly:e,avatarOff:i.videoState.isOff,canvasLayoutEffect:n,smartSidecarActive:l}):I(SI,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,smartSidecarActive:l,canvasLayoutEffect:n,canvasRenderedSlot:r})}),SI=ep(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,smartSidecarActive:i,canvasLayoutEffect:a,canvasRenderedSlot:o})=>I(hx,{canvasLayoutEffect:a,smartSidecarActive:i,isScreenSharing:n,captureSnapshot:EI,personaMode:`auto`,renderedSlot:o,fill:i=>I(Sy,{personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})})),CI=ep(({items:e})=>{let[t,n]=A(!1),r=M(null);return j(()=>{if(!t)return;let e=e=>{r.current&&!e.composedPath().includes(r.current)&&n(!1)},i=e=>{e.key===`Escape`&&n(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,i)}},[t]),I(`div`,{ref:r,class:`relative`,children:[I(`button`,{type:`button`,onClick:()=>n(e=>!e),"aria-pressed":t,"aria-expanded":t,"aria-haspopup":`true`,"aria-label":t?`Close more controls`:`More controls`,class:`btn btn-control ${t?`btn-primary`:`btn-neutral`}`,children:I(E_,{name:`more`})}),t&&I(`div`,{role:`menu`,class:`absolute bottom-full mb-1 left-1/2 -translate-x-1/2 flex flex-row items-center gap-1 p-1 rounded-box bg-base-100 border border-base-300 shadow-lg z-30 whitespace-nowrap`,children:e})]})}),wI=ep(({items:e})=>e.length<=1?I(D,{children:e}):I(CI,{items:e})),TI=ep(({onLeave:e})=>{let t=zf(),{config:n}=$m(),{session:r,end:i}=Jv(),a=Bf(),o=M(null),s=F(mg)?.frameRef??o,[c,l]=A(!1),u=X_()===`full-screen`,[d,f]=A(!1),[p,m]=A(fI),[h,g]=A(null),_=n.value.customization.conversation,v=QF(_.show_fullscreen_hint&&h!==null&&!c&&!u),y=M(null),b=M(null),x=r.value?.conversationUrl,S=r.value?.magicGrid===!0,C=iN(_.magic_grid,S),w=eI(y,C,x),T=tI(y,b,72,C,x),E=_.modality===`audio`,D=$F(E),ee=_.modality===`chat`,te=_.modality===`video`,ne=_.enable_chat,re=_.enable_closed_captions,ie=_.enable_picture_in_picture,{pipWindow:ae}=uI({enabled:ie&&!ee,active:t===`joined-meeting`});j(()=>()=>{i()},[i]);let{camera:oe,requestCamera:O}=ph(),{isCamMuted:k}=xv(),se=oe.isGranted&&!k;j(()=>{te&&t===`joined-meeting`&&(dI.value=se)},[te,t,se]);let ce=M(te&&!a&&dI.value===!0);j(()=>{t===`joined-meeting`&&ce.current&&(ce.current=!1,O())},[t,O]),j(()=>{(t===`left-meeting`||t===`error`)&&e()},[t,e]),j(()=>{let e=()=>{let e=s.current,t=e?.getRootNode(),n=t instanceof Document||t instanceof ShadowRoot?t:null;l(!!e&&n?.fullscreenElement===e)};return document.addEventListener(`fullscreenchange`,e),()=>document.removeEventListener(`fullscreenchange`,e)},[]);let le=P(()=>{let e=s.current;if(!e)return;let t=e.getRootNode();(t instanceof Document||t instanceof ShadowRoot?t:null)?.fullscreenElement===e?document.exitFullscreen?.():e.requestFullscreen?.()},[]);P(()=>{f(e=>!e)},[]);let ue=P(()=>{i()},[i]);if(rI({active:!ee&&t===`joined-meeting`,onTimeout:ue}),aI({onShutdown:ue}),!x)return null;if(ee)return I(ty,{defaultOpen:!0,children:I(`div`,{class:`cvi-call-surface absolute inset-0`,children:I(ay,{docked:!0,headerAction:I(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle text-base-content/60 hover:text-error`,onClick:ue,"aria-label":`Leave conversation`,children:I(E_,{name:`leave`,size:20,"aria-label":`Leave conversation`})})})})});let de=[I(qv,{compact:!0},`screen-share`)];ne&&de.push(I(ry,{compact:!0},`chat`));let fe=t===`left-meeting`;return I(Xv,{children:I(ty,{children:I(Av,{children:[I(`div`,{class:`cvi-call-surface absolute inset-0${E?``:` cvi-video-surface`}`,ref:y,children:[I(`div`,{class:`relative w-full h-full z-[5]`,children:[I(bI,{isAudioOnly:E,presence:D,canvasLayoutEffect:p,canvasRenderedSlot:h}),!E&&I(vI,{canvasRenderedSlot:h}),I(NF,{debugEnabled:d,callPresence:D,callControlsVisible:w,callControlsRect:T,gridConfigEnabled:_.magic_grid,gridStartEnabled:S,onLayoutEffectChange:m,onRenderedSlotChange:g}),!u&&I(`div`,{class:`cvi-autohide absolute top-4 right-4 z-20`,"data-hidden":fe,"data-pinned":v,children:I(ly,{active:c,onToggle:le,nudge:v,compact:!0})})]}),I(ay,{}),I($v,{}),I(`div`,{class:`cvi-autohide cvi-autohide-slide pointer-events-none absolute bottom-6 left-0 right-0 z-20`,"data-hidden":fe,"aria-hidden":fe,children:I(`div`,{class:`cvi-control-rail flex justify-center items-center gap-2 @max-mobile:gap-1`,"data-hidden":fe,ref:b,children:[I(Hv,{level:!0}),!E&&I(Wv,{}),re&&I(Qv,{}),I(wI,{items:de}),I(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:ue,"aria-label":`Leave call`,children:I(E_,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),ae&&mp(I(by,{onLeave:ue}),ae.document.body)]})})})});function EI(e){if(!e||e.readyState<2||!e.videoWidth||!e.videoHeight)return null;let t=document.createElement(`canvas`),n=Math.round(640*(e.videoHeight/e.videoWidth));t.width=640,t.height=n;let r=t.getContext(`2d`);if(!r)return null;r.drawImage(e,0,0,640,n);try{return t.toDataURL(`image/jpeg`,.82)}catch{return null}}function DI(e,t,n){switch(t){case`granted`:return n?e?.cameraOptional??`Camera is optional — turn it on anytime.`:e?.ready??`You're all set — join whenever you're ready.`;case`blocked`:return e?.denied??`Microphone is blocked. Click the mic to see how to allow it.`;case`in-use`:return`Your microphone is in use by another app. Close it and try again.`;case`not-found`:return`No microphone found. Connect one to continue.`;case`unsupported`:return`This browser can't access your microphone.`;case`prompt`:return e?.prompt??`Allow microphone access to join.`;default:return e?.loading??`Getting your microphone ready...`}}var OI=ep(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=Rf(),{config:a}=$m(),{cameraOnStart:o}=F(yt),{localSessionId:s,isCamMuted:c}=xv(),{mic:l,camera:u,requestMic:d,requestCamera:f}=ph(),p=a.value.customization.conversation.modality===`video`,m=j_(a.value),h=A_(a.value);j(()=>{d()},[]);let g=l.isGranted,_=M(!1);j(()=>{p&&o!==`off`&&g&&!_.current&&(u.isGranted||u.isBlocked||(_.current=!0,f()))},[p,o,g,u.isGranted,u.isBlocked,f]);let v=p&&g&&!u.isGranted,y=DI(e,l.status,v);return I(Av,{children:I(`div`,{class:`absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,children:[u.isGranted&&!c?I(`div`,{class:`absolute inset-0 flex items-center justify-center bg-black overflow-hidden`,children:I(yv,{type:`video`,sessionId:s??``,mirror:!0,fit:`cover`,className:`w-full h-full object-cover!`})}):I(`div`,{class:`absolute inset-0 overflow-hidden bg-base-300`,children:[I(I_,{variant:m.background,replica:h}),I(`div`,{class:`${sv} backdrop-blur-xs`})]}),I(`div`,{class:`absolute bottom-6 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[90%]`,children:[y&&I(Q_,{message:y,class:`relative`}),I(`div`,{class:`flex flex-wrap items-center justify-center gap-1.5 @max-mobile:gap-1`,children:[I(`div`,{class:`flex items-center justify-center gap-1.5 shrink-0 @max-mobile:gap-1`,children:[I(Hv,{level:!0}),p&&I(Wv,{})]}),I(B_,{class:`btn-accent `,loading:t,disabled:!g,onClick:n,children:e?.join??`Join`}),I(`button`,{type:`button`,class:`btn btn-control ${l.isBlocked?`btn-error`:`btn-neutral`}`,onClick:()=>{i&&i.leave(),r?.()},"aria-label":e?.cancel??`Cancel`,title:e?.cancel??`Cancel`,children:I(E_,{name:`cancel`})})]})]})]})})}),kI=`Password required`,AI=`Enter the password to start this conversation.`,jI=`Password`,MI=`Continue`;function NI({onSubmit:e,text:t,isSubmitting:n=!1,errorMessage:r}){let[i,a]=A(``),o=$e();return I(`div`,{class:`absolute inset-0 z-30 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`${o}-title`,children:I(`form`,{onSubmit:t=>{t.preventDefault();let r=i.trim();r&&!n&&e(r)},class:`card bg-base-100 shadow-xl w-full max-w-sm`,children:I(`div`,{class:`card-body gap-3`,children:[I(`h3`,{id:`${o}-title`,class:`card-title text-base-content`,children:t?.title??kI}),I(`p`,{class:`text-sm text-base-content/70`,children:t?.description??AI}),I(`input`,{id:o,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:t?.placeholder??jI,value:i,disabled:n,onInput:e=>a(e.target.value),autoFocus:!0}),r&&I(`p`,{class:`text-error text-xs`,role:`alert`,children:r}),I(B_,{class:`btn-primary`,type:`submit`,disabled:!i.trim(),loading:n,children:t?.submit??MI})]})})})}function PI({text:e,onStart:t,isStarting:n,permissionRequest:r}){let{config:i,deploymentId:a}=$m(),o=X_()===`full-screen`,s=F(km),c=j_(i.value),l=c.btn_title??e?.fallback_button??`Start the conversation`,u=i.value.customization.terms_content?.trim()??``,d=i.value.customization.terms_enabled===!0,f=u.length>0,p=f&&d,m=N(()=>p&&im(a,u),[p,a,u]),h=p&&!m,g=i.value.has_password===!0,_=s?.password.value??null,v=g&&!_,y=$e(),[b,x]=A(m),S=n||p&&!b||v;return I(lv,{title:c.title,description:c.description,overlay:v&&s?I(NI,{onSubmit:s.setPassword}):null,children:[I(`div`,{class:`relative`,children:[r&&I(Q_,{message:Z_(r),class:`absolute bottom-full mb-3 z-20 ${o?`left-1/2 -translate-x-1/2`:`right-0`}`}),I(fv,{onClick:()=>{p&&b&&!m&&sm(a,u),t()},disabled:S,loading:n,children:l})]}),f&&I(`div`,{class:`max-w-xs text-center`,children:h?I(`label`,{for:y,class:`flex items-center gap-2 text-xs text-left cursor-pointer`,children:[I(`input`,{id:y,type:`checkbox`,class:`checkbox checkbox-secondary checkbox-xs mt-0.5 shrink-0`,checked:b,onChange:e=>x(e.target.checked)}),I(`span`,{class:`leading-snug`,children:u})]}):I(`p`,{class:`text-xs leading-snug text-white/70`,children:u})})]})}function FI(...e){for(let t of e){let e=t?.trim();if(e)return e}}function II(){let{config:e}=$m(),{haircheck:t}=e.value.customization;return N(()=>({prompt:FI(t.permission_request_description,t.permission_request_title),ready:FI(t.permission_granted_description,t.permission_granted_title),denied:FI(t.permission_denied_description,t.permission_denied_title),join:FI(t.join_button),cancel:FI(t.cancel_btn)}),[t])}function LI({flow:e,welcomeText:t,onUnavailableCancel:n}){let r=II();switch(e.state){case`idle`:return I(PI,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting,permissionRequest:e.permissionRequest});case`haircheck`:return I(OI,{text:r,onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return I(TI,{onLeave:()=>e.leave()});case`ended`:return I(_v,{isStarting:e.isStarting,permissionRequest:e.permissionRequest,onRestart:()=>{e.start()}});case`unavailable`:return I(K_,{cause:e.unavailableCause??`busy`,canRetry:e.canRetry,isStarting:e.isStarting,onRetry:()=>{e.start()},onCancel:n});default:{let t=e.state;throw Error(`Unreachable flow state: ${String(t)}`)}}}function RI(){let{config:e,configError:t}=$m(),n=Y_(),r=q_(),i=N(()=>({fallback_button:n.start_button}),[n.start_button]),a=e.value.is_available,o=e.value.unavailable_reason;return I(hg,{children:t.value?I(K_,{cause:`error`,canRetry:!1,onRetry:()=>{}}):a===!1?I(K_,{cause:o??`daily_limit`,canRetry:!1,onRetry:()=>{}}):I(LI,{flow:r,welcomeText:i})})}var zI=`:host {
167
168
  display: block;
168
169
  /* Containing block for the captcha overlay, which is owned by a provider
169
170
  above the shells and so has no positioned ancestor of its own. */
@@ -174,4 +175,4 @@ container holding the app. Specify either width or maxWidth, and either height o
174
175
  overflow: hidden;
175
176
  background: transparent;
176
177
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
177
- }`;function AF(e){return P(E,{children:[P(`style`,{dangerouslySetInnerHTML:{__html:Le}}),P(`style`,{dangerouslySetInnerHTML:{__html:kF}}),P(St,{layout:e.layout,"camera-on-start":e[`camera-on-start`],"deployment-id":e[`deployment-id`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"memory-stores":e[`memory-stores`],"base-url":e[`base-url`],"expand-options":e[`expand-options`],token:e.token,children:P(Pn,{fallback:P(sh,{}),children:P(In,{children:P(Dp,{children:P(Yp,{children:P(pm,{children:P(vm,{children:P(bm,{children:P(Qm,{children:P(OF,{})})})})})})})})})})]})}var jF;function MF(){jF||=ke(AF,`tavus-embed`,[`layout`,`camera-on-start`,`deployment-id`,`override-config`,`conversational-context`,`custom-greeting`,`memory-stores`,`base-url`,`expand-options`,`token`],{shadow:!0,mode:`open`})}hn(`Widget`);var NF=[`tavus:chat-message`,`tavus:conversation-ended`,`tavus:conversation-started`,`tavus:error`,`tavus:message`,`tavus:mode-change`,`tavus:protocol-message`,`tavus:ready`,`tavus:state-change`,`tavus:tool-call`],PF=class{element=null;tagName;constructor(e=`tavus-embed`){this.tagName=e,this.element=document.querySelector(this.tagName)}getElement(){if(this.element||=document.querySelector(this.tagName),!this.element)throw Error(`Element <${this.tagName}> not found in the DOM`);return this.element}open(){this.getElement().open?.()}close(){this.getElement().close?.()}startConversation(){this.getElement().startConversation?.()}endConversation(){this.getElement().endConversation?.()}sendMessage(e){let t=this.getElement();if(typeof e==`string`){let n={event_type:`conversation.respond`,properties:{text:e}};t.tavus?.sendMessage?.(n)}else t.tavus?.sendMessage?.(e)}updateConfig(e){this.getElement().updateConfig?.(e)}destroy(){this.getElement().destroy?.(),this.element=null}on(e,t){this.getElement().addEventListener(e,t)}off(e,t){this.getElement().removeEventListener(e,t)}};return typeof window<`u`&&MF(),e.TAVUS_EVENT_NAMES=NF,e.TavusIntegration=PF,e})({});
178
+ }`;function BI(e){return I(D,{children:[I(`style`,{dangerouslySetInnerHTML:{__html:Ie}}),I(`style`,{dangerouslySetInnerHTML:{__html:zI}}),I(xt,{surface:`embed`,layout:e.layout,"camera-on-start":e[`camera-on-start`],"deployment-id":e[`deployment-id`],"override-config":e[`override-config`],"conversational-context":e[`conversational-context`],"custom-greeting":e[`custom-greeting`],"memory-stores":e[`memory-stores`],"base-url":e[`base-url`],"expand-options":e[`expand-options`],token:e.token,children:I(kr,{fallback:I(pg,{}),children:I(jr,{children:I(Am,{children:I(Qm,{children:I(gh,{children:I(xh,{children:I(Ch,{children:I(ig,{children:I(RI,{})})})})})})})})})})]})}var VI;function HI(){VI||=Oe(BI,`tavus-embed`,[`layout`,`camera-on-start`,`deployment-id`,`override-config`,`conversational-context`,`custom-greeting`,`memory-stores`,`base-url`,`expand-options`,`token`],{shadow:!0,mode:`open`})}mn(`Widget`);var UI=[`tavus:chat-message`,`tavus:conversation-ended`,`tavus:conversation-started`,`tavus:error`,`tavus:message`,`tavus:mode-change`,`tavus:protocol-message`,`tavus:ready`,`tavus:state-change`,`tavus:tool-call`],WI=class{element=null;tagName;constructor(e=`tavus-embed`){this.tagName=e,this.element=document.querySelector(this.tagName)}getElement(){if(this.element||=document.querySelector(this.tagName),!this.element)throw Error(`Element <${this.tagName}> not found in the DOM`);return this.element}open(){this.getElement().open?.()}close(){this.getElement().close?.()}startConversation(){this.getElement().startConversation?.()}endConversation(){this.getElement().endConversation?.()}sendMessage(e){let t=this.getElement();if(typeof e==`string`){let n={event_type:`conversation.respond`,properties:{text:e}};t.tavus?.sendMessage?.(n)}else t.tavus?.sendMessage?.(e)}updateConfig(e){this.getElement().updateConfig?.(e)}destroy(){this.getElement().destroy?.(),this.element=null}on(e,t){this.getElement().addEventListener(e,t)}off(e,t){this.getElement().removeEventListener(e,t)}};return typeof window<`u`&&HI(),e.TAVUS_EVENT_NAMES=UI,e.TavusIntegration=WI,e})({});