@tavus/widget 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.txt +27 -0
- package/dist/index.iife.js +31 -61
- package/dist/index.mjs +9354 -14328
- package/package.json +5 -4
package/dist/index.iife.js
CHANGED
|
@@ -1,39 +1,11 @@
|
|
|
1
|
-
var TavusWidget=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,a=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(var c=r(a),l=0,u=c.length,d;l<u;l++)d=c[l],!i.call(e,d)&&d!==o&&t(e,d,{get:(e=>a[e]).bind(null,d),enumerable:!(s=n(a,d))||s.enumerable});return e},l=e=>i.call(e,`module.exports`)?e[`module.exports`]:c(t({},`__esModule`,{value:!0}),e),u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,ee={},E=[],D=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,te=Array.isArray;function ne(e,t){for(var n in t)e[n]=t[n];return e}function re(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function O(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?u.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return ie(e,o,r,i,null)}function ie(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++f,__i:-1,__u:0};return i==null&&d.vnode!=null&&d.vnode(a),a}function ae(){return{current:null}}function k(e){return e.children}function A(e,t){this.props=e,this.context=t}function oe(e,t){if(t==null)return e.__?oe(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`?oe(e):null}function se(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=ne({},t);a.__v=t.__v+1,d.vnode&&d.vnode(a),ye(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??oe(t),!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,xe(r,a,i),t.__e=t.__=null,a.__e!=n&&ce(a)}}function ce(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}),ce(e)}function le(e){(!e.__d&&(e.__d=!0)&&m.push(e)&&!ue.__r++||h!=d.debounceRendering)&&((h=d.debounceRendering)||g)(ue)}function ue(){try{for(var e,t=1;m.length;)m.length>t&&m.sort(_),e=m.shift(),t=m.length,se(e)}finally{m.length=ue.__r=0}}function de(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_=r&&r.__k||E,v=t.length;for(c=fe(n,t,_,c,v),d=0;d<v;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&_[p.__i]||ee,p.__i=d,g=ye(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&we(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),4&p.__u?(c=pe(p,c,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 fe(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]=ie(null,o,null,null,null):te(o)?o=e.__k[a]=ie(k,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=ie(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=he(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=oe(s)),Te(s,s));return r}function pe(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=pe(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=oe(e)),t=n.insertBefore(e.__e,t||null));do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function me(e,t){return t||=[],e==null||typeof e==`boolean`||(te(e)?e.some(function(e){me(e,t)}):t.push(e)),t}function he(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;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 ge(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||D.test(t)?n:n+`px`}function _e(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||ge(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||ge(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(x,`$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[b]=r[b]:(n[b]=S,e.addEventListener(t,a?w:C,a)):e.removeEventListener(t,a?w:C,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 ve(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[y]==null)t[y]=S++;else if(t[y]<n[b])return;return n(d.event?d.event(t):t)}}}function ye(e,t,n,r,i,a,o,s,c,l){var u,f,p,m,h,g,_,v,y,b,x,S,C,w,T,ee,D=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=d.__b)&&u(t);n:if(typeof D==`function`){f=o.length;try{if(y=t.props,b=D.prototype&&D.prototype.render,x=(u=D.contextType)&&r[u.__c],S=u?x?x.props.value:u.__:r,n.__c?v=(p=t.__c=n.__c).__=p.__E:(b?t.__c=p=new D(y,S):(t.__c=p=new A(y,S),p.constructor=D,p.render=Ee),x&&x.sub(p),p.state||={},p.__n=r,m=p.__d=!0,p.__h=[],p._sb=[]),b&&p.__s==null&&(p.__s=p.state),b&&D.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=ne({},p.__s)),ne(p.__s,D.getDerivedStateFromProps(y,p.__s))),h=p.props,g=p.state,p.__v=t,m)b&&D.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),b&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(b&&D.getDerivedStateFromProps==null&&y!==h&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(y,S),t.__v==n.__v||!p.__e&&p.shouldComponentUpdate!=null&&!1===p.shouldComponentUpdate(y,p.__s,S)){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)}),E.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&o.push(p),s=oe(n);break n}p.componentWillUpdate!=null&&p.componentWillUpdate(y,p.__s,S),b&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(h,g,_)})}if(p.context=S,p.props=y,p.__P=e,p.__e=!1,C=d.__r,w=0,b)p.state=p.__s,p.__d=!1,C&&C(t),u=p.render(p.props,p.state,p.context),E.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,C&&C(t),u=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++w<25);p.state=p.__s,p.getChildContext!=null&&(r=ne(ne({},r),p.getChildContext())),b&&!m&&p.getSnapshotBeforeUpdate!=null&&(_=p.getSnapshotBeforeUpdate(h,g)),T=u!=null&&u.type===k&&u.key==null?Se(u.props.children):u,s=de(e,te(T)?T:[T],t,n,r,i,a,o,s,c,l),p.base=t.__e,t.__u&=-161,p.__h.length&&o.push(p),v&&(p.__E=p.__=null)}catch(e){if(o.length=f,t.__v=null,c||a!=null){if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a!=null&&(a[a.indexOf(s)]=null),t.__e=s}else if(a!=null)for(ee=a.length;ee--;)re(a[ee])}else t.__e=n.__e;t.__k??=n.__k||[],e.then||be(t),d.__e(e,t,n)}}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=Ce(n.__e,t,n,r,i,a,o,c,l);return(u=d.diffed)&&u(t),128&t.__u?void 0:s}function be(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(be))}function xe(e,t,n){for(var r=0;r<n.length;r++)we(n[r],n[++r],n[++r]);d.__c&&d.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){d.__e(e,t.__v)}})}function Se(e){return typeof e!=`object`||!e||e.__b>0?e:te(e)?e.map(Se):e.constructor===void 0?ne({},e):null}function Ce(e,t,n,r,i,a,o,s,c){var l,f,p,m,h,g,_,v=n.props||ee,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(l=0;l<a.length;l++)if((h=a[l])&&`setAttribute`in h==!!b&&(b?h.localName==b:h.nodeType==3)){e=h,a[l]=null;break}}if(e==null){if(b==null)return document.createTextNode(y);e=document.createElementNS(i,b,y.is&&y),s&&=(d.__m&&d.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a=b==`textarea`&&y.defaultValue!=null?null:a&&u.call(e.childNodes),!s&&a!=null)for(v={},l=0;l<e.attributes.length;l++)v[(h=e.attributes[l]).name]=h.value;for(l in v)h=v[l],l==`dangerouslySetInnerHTML`?p=h:l==`children`||l in y||l==`value`&&`defaultValue`in y||l==`checked`&&`defaultChecked`in y||_e(e,l,null,h,i);for(l in y)h=y[l],l==`children`?m=h:l==`dangerouslySetInnerHTML`?f=h:l==`value`?g=h:l==`checked`?_=h:s&&typeof h!=`function`||v[l]===h||_e(e,l,h,v[l],i);if(f)s||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=``),de(t.type==`template`?e.content:e,te(m)?m:[m],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&oe(n,0),s,c),a!=null)for(l=a.length;l--;)re(a[l]);s&&b!=`textarea`||(l=`value`,b==`progress`&&g==null?e.removeAttribute(`value`):g!=null&&(g!==e[l]||b==`progress`&&!g||b==`option`&&g!=v[l])&&_e(e,l,g,v[l],i),l=`checked`,_!=null&&_!=e[l]&&_e(e,l,_,v[l],i))}return e}function we(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){d.__e(e,n)}}function Te(e,t,n){var r,i;if(d.unmount&&d.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||we(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){d.__e(e,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Te(r[i],t,n||typeof e.type!=`function`);n||re(e.__e),e.__c=e.__=e.__e=void 0}function Ee(e,t,n){return this.constructor(e,n)}function De(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),d.__&&d.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],o=[],ye(t,e=(!r&&n||t).__k=O(k,null,[e]),i||ee,ee,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?u.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),xe(a,e,o),e.props.children=null}function Oe(e,t){De(e,t,Oe)}function ke(e,t,n){var r,i,a,o,s=ne({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a==`key`?r=t[a]:a==`ref`?i=t[a]:s[a]=t[a]===void 0&&o!=null?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?u.call(arguments,2):n),ie(e.type,s,r||e.key,i||e.ref,null)}function Ae(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,le(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++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}u=E.slice,d={__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}},f=0,p=function(e){return e!=null&&e.constructor===void 0},A.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ne({},this.state);typeof e==`function`&&(e=e(ne({},n),this.props)),e&&ne(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),le(this))},A.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),le(this))},A.prototype.render=k,m=[],g=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_=function(e,t){return e.__v.__b-t.__v.__b},ue.__r=0,v=Math.random().toString(8),y=`__d`+v,b=`__a`+v,x=/(PointerCapture)$|Capture$/i,S=0,C=ve(!1),w=ve(!0),T=0;function je(){return je=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},je.apply(this,arguments)}function Me(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 Ne=[`context`,`children`],Pe=[`useFragment`];function Fe(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(){Le.call(this,r)},i.prototype.attributeChangedCallback=ze,i.prototype.disconnectedCallback=Be,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 Ie(e){this.getChildContext=function(){return e.context};var t=e.children;return ke(t,Me(e,Ne))}function Le(e){var t=new CustomEvent(`_preact`,{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=O(Ie,je({},this._props,{context:t.detail.context}),He(this,this._vdomComponent,e)),(this.hasAttribute(`hydrate`)?Oe:De)(this._vdom,this._root)}function Re(e){return e.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():``})}function ze(e,t,n){if(this._vdom){var r={};r[e]=n??=void 0,r[Re(e)]=n,this._vdom=ke(this._vdom,r),De(this._vdom,this._root)}}function Be(){De(this._vdom=null,this._root)}function Ve(e,t){var n=this,r=e.useFragment,i=Me(e,Pe);return O(r?k:`slot`,je({},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 He(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[Re(o[a].name)]=o[a].value);for(a=s.length;a--;){var c=He(s[a],null,n),l=s[a].slot;l?i[l]=O(Ve,{name:l},c):r[a]=c}var u=!(!n||!n.shadow),d=t?O(Ve,{useFragment:!u},r):r;return!u&&t&&(e.innerHTML=``),O(t||e.nodeName.toLowerCase(),i,d)}var Ue=`/*! 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}@property --radialprogress{syntax:"<percentage>";inherits:true;initial-value:0%}@property --aura-angle{syntax:"<angle>";inherits:false;initial-value:0deg}:host{scrollbar-color:currentColor #0000}@supports (color:color-mix(in lab, red, red)){:host{scrollbar-color:color-mix(in oklch, currentColor 35%, #0000) #0000}}: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");--page-scroll-lock:initial;--page-overflow:var(--page-scroll-lock) hidden}:host:not(span){overflow:var(--page-overflow)}: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,[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)}: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}.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;padding-block:.25rem;padding-inline:.5rem;font-size:.875rem;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);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,: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{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)):after{transition:opacity .2s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.4,0,.2,1)}}.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;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,.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).menu-focus,.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).menu-focus,.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).menu-focus,.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:focus-within .menu-dropdown-toggle:after{translate:0 1px;rotate:45deg}.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>*{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>:hover{opacity:.8}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{pointer-events:none;color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{color:color-mix(in oklab, var(--color-base-content) 10%, transparent)}}:is(.dock>[aria-disabled=true],.dock>[disabled]),:is(.dock>[aria-disabled=true],.dock>[disabled]):hover{opacity:1}.dock>* .dock-label{font-size:.6875rem}.dock>:after{content:"";background-color:#0000;border-top:3px solid #0000;border-radius:3.40282e38px;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,bottom) var(--anchor-h,span-right);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],.dropdown .dropdown-content{z-index:999}@media (prefers-reduced-motion:no-preference){.dropdown[popover],.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[popover],.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}:is(.dropdown:not(.dropdown-close).dropdown-open,.dropdown:not(.dropdown-close):not(.dropdown-hover):focus,.dropdown:not(.dropdown-close):focus-within) .dropdown-content,.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)}.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{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{transition:grid-template-rows .2s}}.collapse>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:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close)){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input:is([type=checkbox],[type=radio]):checked){grid-template-rows:max-content 1fr}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse: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:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>.collapse-content,.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){visibility:visible}}.collapse:focus-visible{outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse: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:has(summary:focus-visible){outline-color:var(--color-base-content);outline-offset:2px;outline-width:2px;outline-style:solid}.collapse:not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-close)>.collapse-title{cursor:pointer}:is(.collapse[tabindex]:focus:not(.collapse-close,.collapse[open]),.collapse[tabindex]:focus-within:not(.collapse-close,.collapse[open]))>.collapse-title{cursor:unset}.collapse:is([open],[tabindex]:focus:not(.collapse-close),[tabindex]:focus-within:not(.collapse-close))>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input:is([type=checkbox],[type=radio]):checked~.collapse-content){padding-bottom:1rem}.collapse:is(details){width:100%}.collapse:is(details)::details-content{--overflow-delay:0s;height:0;overflow:clip}.collapse:is(details):where([open])::details-content{overflow:revert-layer;height:auto}@media (prefers-reduced-motion:no-preference){.collapse: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:is(details):where([open])::details-content{--overflow-delay:.2s}}.collapse:is(details)>summary{outline:none;display:block;position:relative}.collapse: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}.validator:user-valid{--input-color:var(--color-success)}.validator:user-valid:focus{--input-color:var(--color-success)}.validator:user-valid:checked{--input-color:var(--color-success)}.validator:user-valid[aria-checked=true]{--input-color:var(--color-success)}.validator:user-valid:focus-within{--input-color:var(--color-success)}.validator:has(:user-valid){--input-color:var(--color-success)}.validator:has(:user-valid):focus{--input-color:var(--color-success)}.validator:has(:user-valid):checked{--input-color:var(--color-success)}.validator:has(:user-valid)[aria-checked=true]{--input-color:var(--color-success)}.validator:has(:user-valid):focus-within{--input-color:var(--color-success)}.validator:user-invalid{--input-color:var(--color-error)}.validator:user-invalid:focus{--input-color:var(--color-error)}.validator:user-invalid:checked{--input-color:var(--color-error)}.validator:user-invalid[aria-checked=true]{--input-color:var(--color-error)}.validator:user-invalid:focus-within{--input-color:var(--color-error)}.validator:user-invalid~.validator-hint{visibility:visible;color:var(--color-error)}.validator:has(:user-invalid){--input-color:var(--color-error)}.validator:has(:user-invalid):focus{--input-color:var(--color-error)}.validator:has(:user-invalid):checked{--input-color:var(--color-error)}.validator:has(:user-invalid)[aria-checked=true]{--input-color:var(--color-error)}.validator:has(:user-invalid):focus-within{--input-color:var(--color-error)}.validator:has(:user-invalid)~.validator-hint{visibility:visible;color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))),:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):checked,:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))[aria-checked=true],:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false]))):focus-within{--input-color:var(--color-error)}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{visibility:visible;color:var(--color-error)}.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}: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,.toggle[aria-checked=true]{background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}.toggle:has(>input:checked){background-color:var(--color-base-100);--input-color:var(--color-base-content);grid-template-columns:1fr 1fr 0fr}:is(.toggle:checked,.toggle[aria-checked=true],.toggle:has(>input:checked)):before{background-color:currentColor}@starting-style{:is(.toggle:checked,.toggle[aria-checked=true],.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));--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));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,.input input{display:inline-flex;position:relative}:is(input.input,.input input)[type=url],:is(input.input,.input input)[type=email]{text-align:left}:is(input.input,.input input)::-webkit-datetime-edit{min-height:100%;text-align:inherit;align-items:center;display:grid}:is(input.input,.input input)::-webkit-date-and-time-value{min-height:100%;text-align:inherit;align-items:center;display:grid}:is(input.input,.input input)::-webkit-inner-spin-button{margin-block:calc(.25rem * var(--spin-my))}:is(input.input,.input input)::-webkit-calendar-picker-indicator{cursor:pointer;width:1em;height:1em;position:absolute}:is(input.input,.input input)::-webkit-color-swatch-wrapper{padding-block:.25rem}.input:focus,.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,.input:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.input:focus,.input:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.input:focus,.input:focus-within{--font-size:1rem}}}.input:is(:disabled,[disabled]),fieldset:disabled .input{cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}.input:has(>input[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200)}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input):is(input),:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input) :is(input){color:var(--color-base-content)}@supports (color:color-mix(in lab, red, red)){:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input):is(input),:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input) :is(input){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.input:is(:disabled,[disabled]),fieldset:disabled .input{box-shadow:none}.input:has(>input[disabled]){box-shadow:none}:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),fieldset:disabled .input)::placeholder,:is(.input:has(>input[disabled]),.input:is(:disabled,[disabled]),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::-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-track{background-color:var(--range-bg);border-radius:var(--radius-selector);width:100%;height:calc(var(--range-thumb-size) * .5)}.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}.avatar{vertical-align:middle;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,.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))}:is(.checkbox:checked,.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){:is(.checkbox:checked,.checkbox[aria-checked=true]):before{--tw-content:"✔︎";clip-path:none;background-color:#0000;rotate:0deg}}@media print{:is(.checkbox:checked,.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}.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));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,.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,.textarea:focus-within{box-shadow:0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000)}}.textarea:focus,.textarea:focus-within{outline:2px solid var(--input-color);outline-offset:2px;isolation:isolate}@media (pointer:coarse){@supports (-webkit-touch-callout:none){.textarea:focus,.textarea:focus-within{--font-size:1rem}}}.textarea:is(:disabled,[disabled]){cursor:not-allowed;border-color:var(--color-base-200);background-color:var(--color-base-200);color:var(--color-base-content)}.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:is(:disabled,[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}.textarea:has(>textarea[disabled]){color:color-mix(in oklab, var(--color-base-content) 40%, transparent)}}.textarea:is(:disabled,[disabled]){box-shadow:none}.textarea:has(>textarea[disabled]){box-shadow:none}:is(.textarea:has(>textarea[disabled]),.textarea:is(:disabled,[disabled]))::placeholder,:is(.textarea:has(>textarea[disabled]),.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}.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}.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}.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}.footer.footer-center{text-align:center;grid-auto-flow:column dense;place-items:center}.footer.footer-center>:not(script,style,template){place-items:center}.card-body{padding:var(--card-p,1.5rem);font-size:var(--card-fs,.875rem);flex-direction:column;flex:auto;gap:.5rem;display:flex}.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}.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}}@layer daisyui.l1.l2{.modal.modal-open,.modal[open],.modal:target,.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: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: }:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal) .modal-box{opacity:1;translate:0;scale:1}:host:has(:is(.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal)){--page-scroll-lock: }@starting-style{.modal.modal-open,.modal[open],.modal:target,.modal-toggle:checked+.modal{opacity:0}.modal:popover-open{opacity:0}}.tooltip>.tooltip-content,.tooltip[data-tip]:before{transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-off) 50%}.tooltip:after{transform:translateX(var(--tt-trans,-50%)) translateY(var(--tt-pos,.25rem));inset:auto auto var(--tt-tail) 50%}@media (prefers-reduced-motion:no-preference){.collapse[open].collapse-arrow>.collapse-title:after,.collapse.collapse-open.collapse-arrow>.collapse-title:after{transform:translateY(-50%)rotate(225deg)}}.collapse.collapse-open.collapse-plus>.collapse-title:after{--tw-content:"−";content:var(--tw-content)}:is(.collapse[tabindex].collapse-arrow:focus:not(.collapse-close),.collapse.collapse-arrow[tabindex]:focus-within:not(.collapse-close))>.collapse-title:after,.collapse.collapse-arrow:not(.collapse-close)>input:is([type=checkbox],[type=radio]):checked~.collapse-title:after{transform:translateY(-50%)rotate(225deg)}.collapse[open].collapse-plus>.collapse-title:after,.collapse[tabindex].collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse.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}.input{--in-size-mul:10;--font-size-min:.875rem;--spin-my:-3}.floating-label:has(.input){--top-mul:5;--font-size:.875rem}.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}.textarea{--font-size-min:.875rem}.floating-label:has(.textarea){--top-mul:5;--font-size:.875rem}: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}.btn-circle{width:var(--size);height:var(--size);border-radius:3.40282e38px;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{.btn:where(:checked:not(.filter [type=radio].btn)){--btn-color:var(--color-primary);--btn-fg:var(--color-primary-content)}@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}.filter:not(:has(:checked:not(.filter-reset))) :is(.filter-reset,[type=reset]):not(:focus-visible){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}.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)){.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}.validator:user-invalid~.validator-hint{display:revert-layer}.validator:has(:user-invalid)~.validator-hint{display:revert-layer}:is(.validator[aria-invalid]:not([aria-invalid=false]),.validator:has([aria-invalid]:not([aria-invalid=false])))~.validator-hint{display:revert-layer}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}@layer daisyui.l1.l2.l3.l4{.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}.card-body p{flex-grow:1}}.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-v:0;--join-h:1;align-items:stretch;display:inline-flex}@scope(.join){:scope>:where(:focus,:has(:focus)){z-index:1}@media (hover:hover){:scope>:where(.btn:hover,:has(.btn:hover)){isolation:isolate}}: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)}}.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:3.40282e38px}.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 dropdown{0%{opacity:0}}@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 radio{0%{padding:5px}50%{padding:3px}}@keyframes toast{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}@keyframes progress{50%{background-position-x:-115%}}@keyframes rating{0%,40%{filter:brightness(1.05)contrast(1.05);scale:1.1}}@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 menu{0%{opacity:0}}@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}}`,We,Ge,Ke,qe,Je=0,Ye=[],Xe=d,Ze=Xe.__b,Qe=Xe.__r,$e=Xe.diffed,et=Xe.__c,tt=Xe.unmount,nt=Xe.__;function rt(e,t){Xe.__h&&Xe.__h(Ge,e,Je||t),Je=0;var n=Ge.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function j(e){return Je=1,it(gt,e)}function it(e,t,n){var r=rt(We++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):gt(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=Ge,!Ge.__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};Ge.__f=!0;var a=Ge.shouldComponentUpdate,o=Ge.componentWillUpdate;Ge.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)},Ge.shouldComponentUpdate=i}return r.__N||r.__}function M(e,t){var n=rt(We++,3);!Xe.__s&&ht(n.__H,t)&&(n.__=e,n.u=t,Ge.__H.__h.push(n))}function at(e,t){var n=rt(We++,4);!Xe.__s&&ht(n.__H,t)&&(n.__=e,n.u=t,Ge.__h.push(n))}function N(e){return Je=5,P(function(){return{current:e}},[])}function ot(e,t,n){Je=6,at(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function P(e,t){var n=rt(We++,7);return ht(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function F(e,t){return Je=8,P(function(){return e},t)}function st(e){var t=Ge.context[e.__c],n=rt(We++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(Ge)),t.props.value):e.__}function ct(e,t){Xe.useDebugValue&&Xe.useDebugValue(t?t(e):e)}function lt(){var e=rt(We++,11);if(!e.__){for(var t=Ge.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+n[1]++}return e.__}function ut(){for(var e;e=Ye.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(pt),t.__h.some(mt),t.__h=[]}catch(n){t.__h=[],Xe.__e(n,e.__v)}}}Xe.__b=function(e){Ge=null,Ze&&Ze(e)},Xe.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),nt&&nt(e,t)},Xe.__r=function(e){Qe&&Qe(e),We=0;var t=(Ge=e.__c).__H;t&&(Ke===Ge?(t.__h=[],Ge.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(pt),t.__h.some(mt),t.__h=[],We=0)),Ke=Ge},Xe.diffed=function(e){$e&&$e(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ye.push(t)!==1&&qe===Xe.requestAnimationFrame||((qe=Xe.requestAnimationFrame)||ft)(ut)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),Ke=Ge=null},Xe.__c=function(e,t){t.some(function(e){try{e.__h.some(pt),e.__h=e.__h.filter(function(e){return!e.__||mt(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Xe.__e(n,e.__v)}}),et&&et(e,t)},Xe.unmount=function(e){tt&&tt(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{pt(e)}catch(e){t=e}}),n.__H=void 0,t&&Xe.__e(t,n.__v))};var dt=typeof requestAnimationFrame==`function`;function ft(e){var t,n=function(){clearTimeout(r),dt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);dt&&(t=requestAnimationFrame(n))}function pt(e){var t=Ge,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),Ge=t}function mt(e){var t=Ge;e.__c=e.__(),Ge=t}function ht(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function gt(e,t){return typeof t==`function`?t(e):t}var _t=20;_t*2,_t*2;function vt(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}var yt=0;Array.isArray;function I(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--yt,__i:-1,__u:0,__source:i,__self:a};if(typeof e==`function`&&(o=e.defaultProps))for(s in o)c[s]===void 0&&(c[s]=o[s]);return d.vnode&&d.vnode(l),l}var bt=Ae(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:vt(e[`expand-options`]),mode:n?`preview`:`production`}}function St(e){let t=P(()=>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 I(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){d[e]=t.bind(null,d[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=P(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||``}),a=Gt(function(){return!Array.isArray(i.value)&&!p(i.value)}),o=Xt(function(){if(this.N=pn,a.value){var t=i.value;e.__v&&e.__v.__e&&e.__v.__e.nodeType===3&&(e.__v.__e.data=t)}}),s=t.__$u.d;return t.__$u.d=function(){o(),s.call(this)},[a,i]},[]),a=i[0],o=i[1];return a.value?o.peek():o.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!==k){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)}),A.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 P(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&&(d.requestAnimationFrame||cn)(un)}function fn(){Dt(function(){for(var e;e=tn.shift();)Zt.call(e)})}function pn(){tn.push(this)===1&&(d.requestAnimationFrame||ln)(fn)}function mn(e,t){var n=N(e);n.current=e,M(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&&(Cn(a)&&Cn(i)?n[r]=wn(a,i):n[r]=i)}return n}var Tn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw Error(`CodeGen: name must be a valid identifier`);this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var r=class extends t{constructor(e){super(),this._items=typeof e==`string`?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===``||e===`""`}get str(){return this._str??=this._items.reduce((e,t)=>`${e}${t}`,``)}get names(){return this._names??=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}};e._Code=r,e.nil=new r(``);function i(e,...t){let n=[e[0]],i=0;for(;i<t.length;)s(n,t[i]),n.push(e[++i]);return new r(n)}e._=i;var a=new r(`+`);function o(e,...t){let n=[p(e[0])],i=0;for(;i<t.length;)n.push(a),s(n,t[i]),n.push(a,p(e[++i]));return c(n),new r(n)}e.str=o;function s(e,t){t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push(d(t))}e.addCodeArg=s;function c(e){let t=1;for(;t<e.length-1;){if(e[t]===a){let n=l(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]=`+`}t++}}function l(e,t){if(t===`""`)return e;if(e===`""`)return t;if(typeof e==`string`)return t instanceof n||e[e.length-1]!==`"`?void 0:typeof t==`string`?t[0]===`"`?e.slice(0,-1)+t.slice(1):void 0:`${e.slice(0,-1)}${t}"`;if(typeof t==`string`&&t[0]===`"`&&!(e instanceof n))return`"${e}${t.slice(1)}`}function u(e,t){return t.emptyStr()?e:e.emptyStr()?t:o`${e}${t}`}e.strConcat=u;function d(e){return typeof e==`number`||typeof e==`boolean`||e===null?e:p(Array.isArray(e)?e.join(`,`):e)}function f(e){return new r(p(e))}e.stringify=f;function p(e){return JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`)}e.safeStringify=p;function m(t){return typeof t==`string`&&e.IDENTIFIER.test(t)?new r(`.${t}`):i`[${t}]`}e.getProperty=m;function h(t){if(typeof t==`string`&&e.IDENTIFIER.test(t))return new r(`${t}`);throw Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}e.getEsmExportName=h;function g(e){return new r(e.toString())}e.regexpCode=g})),En=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;var t=Tn(),n=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},r;(function(e){e[e.Started=0]=`Started`,e[e.Completed=1]=`Completed`})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name(`const`),let:new t.Name(`let`),var:new t.Name(`var`)};var i=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){if((this._parent?._prefixes)?.has(e)||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};e.Scope=i;var a=class extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,t._)`.${new t.Name(n)}[${r}]`}};e.ValueScopeName=a;var o=(0,t._)`\n`;e.ValueScope=class extends i{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?o:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){if(t.ref===void 0)throw Error(`CodeGen: ref must be passed in value`);let n=this.toName(e),{prefix:r}=n,i=t.key??t.ref,a=this._values[r];if(a){let e=a.get(i);if(e)return e}else a=this._values[r]=new Map;a.set(i,n);let o=this._scope[r]||(this._scope[r]=[]),s=o.length;return o[s]=t.ref,n.setValue(t,{property:r,itemIndex:s}),n}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,n=>{if(n.scopePath===void 0)throw Error(`CodeGen: name "${n}" has no value`);return(0,t._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,e=>{if(e.value===void 0)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,n)}_reduceValues(i,a,o={},s){let c=t.nil;for(let l in i){let u=i[l];if(!u)continue;let d=o[l]=o[l]||new Map;u.forEach(i=>{if(d.has(i))return;d.set(i,r.Started);let o=a(i);if(o){let n=this.opts.es5?e.varKinds.var:e.varKinds.const;c=(0,t._)`${c}${n} ${i} = ${o};${this.opts._n}`}else if(o=s?.(i))c=(0,t._)`${c}${o}${this.opts._n}`;else throw new n(i);d.set(i,r.Completed)})}return c}}})),Dn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;var t=Tn(),n=En(),r=Tn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var i=En();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.varKinds}}),e.operators={GT:new t._Code(`>`),GTE:new t._Code(`>=`),LT:new t._Code(`<`),LTE:new t._Code(`<=`),EQ:new t._Code(`===`),NEQ:new t._Code(`!==`),NOT:new t._Code(`!`),OR:new t._Code(`||`),AND:new t._Code(`&&`),ADD:new t._Code(`+`)};var a=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},o=class extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let r=e?n.varKinds.var:this.varKind,i=this.rhs===void 0?``:` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&=te(this.rhs,e,t),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=te(this.rhs,e,n),this}get names(){return D(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},l=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},u=class extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:``};`+e}},d=class extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},f=class extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=te(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},p=class extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),``)}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,r=n.length;for(;r--;){let i=n[r];i.optimizeNames(e,t)||(ne(e,i.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>E(e,t.names),{})}},m=class extends p{render(e){return`{`+e._n+super.render(e)+`}`+e._n}},h=class extends p{},g=class extends m{};g.kind=`else`;var _=class e extends m{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+=`else `+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let e=n.optimizeNodes();n=this.else=Array.isArray(e)?new g(e):e}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(re(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(e,t){if(this.else=this.else?.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=te(this.condition,e,t),this}get names(){let e=super.names;return D(e,this.condition),this.else&&E(e,this.else.names),e}};_.kind=`if`;var v=class extends m{};v.kind=`for`;var y=class extends v{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=te(this.iteration,e,t),this}get names(){return E(super.names,this.iteration.names)}},b=class extends v{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){return D(D(super.names,this.from),this.to)}},x=class extends v{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=te(this.iterable,e,t),this}get names(){return E(super.names,this.iterable.names)}},S=class extends m{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?`async `:``}function ${this.name}(${this.args})`+super.render(e)}};S.kind=`func`;var C=class extends p{render(e){return`return `+super.render(e)}};C.kind=`return`;var w=class extends m{render(e){let t=`try`+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)==null||e.optimizeNodes(),(t=this.finally)==null||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),(n=this.catch)==null||n.optimizeNames(e,t),(r=this.finally)==null||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&E(e,this.catch.names),this.finally&&E(e,this.finally.names),e}},T=class extends m{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};T.kind=`catch`;var ee=class extends m{render(e){return`finally`+super.render(e)}};ee.kind=`finally`,e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
3
|
-
`:``},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new h]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){let i=this._scope.toName(t);return n!==void 0&&r&&(this._constants[i.str]=n),this._leafNode(new o(e,i,n)),i}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new c(t,e.operators.ADD,n))}code(e){return typeof e==`function`?e():e!==t.nil&&this._leafNode(new f(e)),this}object(...e){let n=[`{`];for(let[r,i]of e)n.length>1&&n.push(`,`),n.push(r),(r!==i||this.opts.es5)&&(n.push(`:`),(0,t.addCodeArg)(n,i));return n.push(`}`),new t._Code(n)}if(e,t,n){if(this._blockNode(new _(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw Error(`CodeGen: "else" body without "then" body`);return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(_,g)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.let){let o=this._scope.toName(e);return this._for(new b(a,o,t,r),()=>i(o))}forOf(e,r,i,a=n.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let e=r instanceof t.Name?r:this.var(`_arr`,r);return this.forRange(`_i`,0,(0,t._)`${e}.length`,n=>{this.var(o,(0,t._)`${e}[${n}]`),i(o)})}return this._for(new x(`of`,a,o,r),()=>i(o))}forIn(e,r,i,a=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,t._)`Object.keys(${r})`,i);let o=this._scope.toName(e);return this._for(new x(`in`,a,o,r),()=>i(o))}endFor(){return this._endBlockNode(v)}label(e){return this._leafNode(new l(e))}break(e){return this._leafNode(new u(e))}return(e){let t=new C;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error(`CodeGen: "return" should have one node`);return this._endBlockNode(C)}try(e,t,n){if(!t&&!n)throw Error(`CodeGen: "try" without "catch" and "finally"`);let r=new w;if(this._blockNode(r),this.code(e),t){let e=this.name(`e`);this._currNode=r.catch=new T(e),t(e)}return n&&(this._currNode=r.finally=new ee,this.code(n)),this._endBlockNode(T,ee)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error(`CodeGen: not in self-balancing block`);let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,i){return this._blockNode(new S(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(e=1){for(;e-->0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof _))throw Error(`CodeGen: "else" without "if"`);return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};function E(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function D(e,n){return n instanceof t._CodeOrName?E(e,n.names):e}function te(e,n,r){if(e instanceof t.Name)return i(e);if(!a(e))return e;return new t._Code(e._items.reduce((e,n)=>(n instanceof t.Name&&(n=i(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e),[]));function i(e){let t=r[e.str];return t===void 0||n[e.str]!==1?e:(delete n[e.str],t)}function a(e){return e instanceof t._Code&&e._items.some(e=>e instanceof t.Name&&n[e.str]===1&&r[e.str]!==void 0)}}function ne(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function re(e){return typeof e==`boolean`||typeof e==`number`||e===null?!e:(0,t._)`!${oe(e)}`}e.not=re;var O=A(e.operators.AND);function ie(...e){return e.reduce(O)}e.and=ie;var ae=A(e.operators.OR);function k(...e){return e.reduce(ae)}e.or=k;function A(e){return(n,r)=>n===t.nil?r:r===t.nil?n:(0,t._)`${oe(n)} ${e} ${oe(r)}`}function oe(e){return e instanceof t.Name?e:(0,t._)`(${e})`}})),On=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;var t=Dn(),n=Tn();function r(e){let t={};for(let n of e)t[n]=!0;return t}e.toHash=r;function i(e,t){return typeof t==`boolean`?t:Object.keys(t).length===0?!0:(a(e,t),!o(t,e.self.RULES.all))}e.alwaysValidSchema=i;function a(e,t=e.schema){let{opts:n,self:r}=e;if(!n.strictSchema||typeof t==`boolean`)return;let i=r.RULES.keywords;for(let n in t)i[n]||x(e,`unknown keyword: "${n}"`)}e.checkUnknownRules=a;function o(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(t[n])return!0;return!1}e.schemaHasRules=o;function s(e,t){if(typeof e==`boolean`)return!e;for(let n in e)if(n!==`$ref`&&t.all[n])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:e,schemaPath:n},r,i,a){if(!a){if(typeof r==`number`||typeof r==`boolean`)return r;if(typeof r==`string`)return(0,t._)`${r}`}return(0,t._)`${e}${n}${(0,t.getProperty)(i)}`}e.schemaRefOrVal=c;function l(e){return f(decodeURIComponent(e))}e.unescapeFragment=l;function u(e){return encodeURIComponent(d(e))}e.escapeFragment=u;function d(e){return typeof e==`number`?`${e}`:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.escapeJsonPointer=d;function f(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}e.unescapeJsonPointer=f;function p(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}e.eachItem=p;function m({mergeNames:e,mergeToName:n,mergeValues:r,resultToName:i}){return(a,o,s,c)=>{let l=s===void 0?o:s instanceof t.Name?(o instanceof t.Name?e(a,o,s):n(a,o,s),s):o instanceof t.Name?(n(a,s,o),o):r(o,s);return c===t.Name&&!(l instanceof t.Name)?i(a,l):l}}e.mergeEvaluated={props:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>{e.if((0,t._)`${n} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,t._)`${r} || {}`).code((0,t._)`Object.assign(${r}, ${n})`))}),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>{n===!0?e.assign(r,!0):(e.assign(r,(0,t._)`${r} || {}`),g(e,r,n))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h}),items:m({mergeNames:(e,n,r)=>e.if((0,t._)`${r} !== true && ${n} !== undefined`,()=>e.assign(r,(0,t._)`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`)),mergeToName:(e,n,r)=>e.if((0,t._)`${r} !== true`,()=>e.assign(r,n===!0?!0:(0,t._)`${r} > ${n} ? ${r} : ${n}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var(`items`,t)})};function h(e,n){if(n===!0)return e.var(`props`,!0);let r=e.var(`props`,(0,t._)`{}`);return n!==void 0&&g(e,r,n),r}e.evaluatedPropsToName=h;function g(e,n,r){Object.keys(r).forEach(r=>e.assign((0,t._)`${n}${(0,t.getProperty)(r)}`,!0))}e.setEvaluated=g;var _={};function v(e,t){return e.scopeValue(`func`,{ref:t,code:_[t.code]||(_[t.code]=new n._Code(t.code))})}e.useFunc=v;var y;(function(e){e[e.Num=0]=`Num`,e[e.Str=1]=`Str`})(y||(e.Type=y={}));function b(e,n,r){if(e instanceof t.Name){let i=n===y.Num;return r?i?(0,t._)`"[" + ${e} + "]"`:(0,t._)`"['" + ${e} + "']"`:i?(0,t._)`"/" + ${e}`:(0,t._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,t.getProperty)(e).toString():`/`+d(e)}e.getErrorPath=b;function x(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw Error(t);e.self.logger.warn(t)}}e.checkStrictMode=x})),kn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn();e.default={data:new t.Name(`data`),valCxt:new t.Name(`valCxt`),instancePath:new t.Name(`instancePath`),parentData:new t.Name(`parentData`),parentDataProperty:new t.Name(`parentDataProperty`),rootData:new t.Name(`rootData`),dynamicAnchors:new t.Name(`dynamicAnchors`),vErrors:new t.Name(`vErrors`),errors:new t.Name(`errors`),this:new t.Name(`this`),self:new t.Name(`self`),scope:new t.Name(`scope`),json:new t.Name(`json`),jsonPos:new t.Name(`jsonPos`),jsonLen:new t.Name(`jsonLen`),jsonPart:new t.Name(`jsonPart`)}})),An=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;var t=Dn(),n=On(),r=kn();e.keywordError={message:({keyword:e})=>(0,t.str)`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,t.str)`"${e}" keyword must be ${n} ($data)`:(0,t.str)`"${e}" keyword is invalid ($data)`};function i(n,r=e.keywordError,i,a){let{it:o}=n,{gen:s,compositeRule:u,allErrors:f}=o,p=d(n,r,i);a??(u||f)?c(s,p):l(o,(0,t._)`[${p}]`)}e.reportError=i;function a(t,n=e.keywordError,i){let{it:a}=t,{gen:o,compositeRule:s,allErrors:u}=a;c(o,d(t,n,i)),s||u||l(a,r.default.vErrors)}e.reportExtraError=a;function o(e,n){e.assign(r.default.errors,n),e.if((0,t._)`${r.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,t._)`${r.default.vErrors}.length`,n),()=>e.assign(r.default.vErrors,null)))}e.resetErrorsCount=o;function s({gen:e,keyword:n,schemaValue:i,data:a,errsCount:o,it:s}){if(o===void 0)throw Error(`ajv implementation error`);let c=e.name(`err`);e.forRange(`i`,o,r.default.errors,o=>{e.const(c,(0,t._)`${r.default.vErrors}[${o}]`),e.if((0,t._)`${c}.instancePath === undefined`,()=>e.assign((0,t._)`${c}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath))),e.assign((0,t._)`${c}.schemaPath`,(0,t.str)`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign((0,t._)`${c}.schema`,i),e.assign((0,t._)`${c}.data`,a))})}e.extendErrors=s;function c(e,n){let i=e.const(`err`,n);e.if((0,t._)`${r.default.vErrors} === null`,()=>e.assign(r.default.vErrors,(0,t._)`[${i}]`),(0,t._)`${r.default.vErrors}.push(${i})`),e.code((0,t._)`${r.default.errors}++`)}function l(e,n){let{gen:r,validateName:i,schemaEnv:a}=e;a.$async?r.throw((0,t._)`new ${e.ValidationError}(${n})`):(r.assign((0,t._)`${i}.errors`,n),r.return(!1))}var u={keyword:new t.Name(`keyword`),schemaPath:new t.Name(`schemaPath`),params:new t.Name(`params`),propertyName:new t.Name(`propertyName`),message:new t.Name(`message`),schema:new t.Name(`schema`),parentSchema:new t.Name(`parentSchema`)};function d(e,n,r){let{createErrors:i}=e.it;return i===!1?(0,t._)`{}`:f(e,n,r)}function f(e,t,n={}){let{gen:r,it:i}=e,a=[p(i,n),m(e,n)];return h(e,t,a),r.object(...a)}function p({errorPath:e},{instancePath:i}){let a=i?(0,t.str)`${e}${(0,n.getErrorPath)(i,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function m({keyword:e,it:{errSchemaPath:r}},{schemaPath:i,parentSchema:a}){let o=a?r:(0,t.str)`${r}/${e}`;return i&&(o=(0,t.str)`${o}${(0,n.getErrorPath)(i,n.Type.Str)}`),[u.schemaPath,o]}function h(e,{params:n,message:i},a){let{keyword:o,data:s,schemaValue:c,it:l}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:m}=l;a.push([u.keyword,o],[u.params,typeof n==`function`?n(e):n||(0,t._)`{}`]),d.messages&&a.push([u.message,typeof i==`function`?i(e):i]),d.verbose&&a.push([u.schema,c],[u.parentSchema,(0,t._)`${p}${m}`],[r.default.data,s]),f&&a.push([u.propertyName,f])}})),jn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;var t=An(),n=Dn(),r=kn(),i={message:`boolean schema is false`};function a(e){let{gen:t,schema:i,validateName:a}=e;i===!1?s(e,!1):typeof i==`object`&&i.$async===!0?t.return(r.default.data):(t.assign((0,n._)`${a}.errors`,null),t.return(!0))}e.topBoolOrEmptySchema=a;function o(e,t){let{gen:n,schema:r}=e;r===!1?(n.var(t,!1),s(e)):n.var(t,!0)}e.boolOrEmptySchema=o;function s(e,n){let{gen:r,data:a}=e,o={gen:r,keyword:`false schema`,data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,t.reportError)(o,i,void 0,n)}})),Mn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getRules=e.isJSONType=void 0;var t=new Set([`string`,`number`,`integer`,`boolean`,`null`,`object`,`array`]);function n(e){return typeof e==`string`&&t.has(e)}e.isJSONType=n;function r(){let e={number:{type:`number`,rules:[]},string:{type:`string`,rules:[]},array:{type:`array`,rules:[]},object:{type:`object`,rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=r})),Nn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:e,self:t},r){let i=t.RULES.types[r];return i&&i!==!0&&n(e,i)}e.schemaHasRulesForType=t;function n(e,t){return t.rules.some(t=>r(e,t))}e.shouldUseGroup=n;function r(e,t){return e[t.keyword]!==void 0||t.definition.implements?.some(t=>e[t]!==void 0)}e.shouldUseRule=r})),Pn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;var t=Mn(),n=Nn(),r=An(),i=Dn(),a=On(),o;(function(e){e[e.Correct=0]=`Correct`,e[e.Wrong=1]=`Wrong`})(o||(e.DataType=o={}));function s(e){let t=c(e.type);if(t.includes(`null`)){if(e.nullable===!1)throw Error(`type: null contradicts nullable: false`)}else{if(!t.length&&e.nullable!==void 0)throw Error(`"nullable" cannot be used without "type"`);e.nullable===!0&&t.push(`null`)}return t}e.getSchemaTypes=s;function c(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(t.isJSONType))return n;throw Error(`type must be JSONType or JSONType[]: `+n.join(`,`))}e.getJSONTypes=c;function l(e,t){let{gen:r,data:i,opts:a}=e,s=d(t,a.coerceTypes),c=t.length>0&&!(s.length===0&&t.length===1&&(0,n.schemaHasRulesForType)(e,t[0]));if(c){let n=h(t,i,a.strictNumbers,o.Wrong);r.if(n,()=>{s.length?f(e,t,s):_(e)})}return c}e.coerceAndCheckDataType=l;var u=new Set([`string`,`number`,`integer`,`boolean`,`null`]);function d(e,t){return t?e.filter(e=>u.has(e)||t===`array`&&e===`array`):[]}function f(e,t,n){let{gen:r,data:a,opts:o}=e,s=r.let(`dataType`,(0,i._)`typeof ${a}`),c=r.let(`coerced`,(0,i._)`undefined`);o.coerceTypes===`array`&&r.if((0,i._)`${s} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>r.assign(a,(0,i._)`${a}[0]`).assign(s,(0,i._)`typeof ${a}`).if(h(t,a,o.strictNumbers),()=>r.assign(c,a))),r.if((0,i._)`${c} !== undefined`);for(let e of n)(u.has(e)||e===`array`&&o.coerceTypes===`array`)&&l(e);r.else(),_(e),r.endIf(),r.if((0,i._)`${c} !== undefined`,()=>{r.assign(a,c),p(e,c)});function l(e){switch(e){case`string`:r.elseIf((0,i._)`${s} == "number" || ${s} == "boolean"`).assign(c,(0,i._)`"" + ${a}`).elseIf((0,i._)`${a} === null`).assign(c,(0,i._)`""`);return;case`number`:r.elseIf((0,i._)`${s} == "boolean" || ${a} === null
|
|
4
|
-
|| (${s} == "string" && ${a} && ${a} == +${a})`).assign(c,(0,i._)`+${a}`);return;case`integer`:r.elseIf((0,i._)`${s} === "boolean" || ${a} === null
|
|
5
|
-
|| (${s} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,(0,i._)`+${a}`);return;case`boolean`:r.elseIf((0,i._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf((0,i._)`${a} === "true" || ${a} === 1`).assign(c,!0);return;case`null`:r.elseIf((0,i._)`${a} === "" || ${a} === 0 || ${a} === false`),r.assign(c,null);return;case`array`:r.elseIf((0,i._)`${s} === "string" || ${s} === "number"
|
|
6
|
-
|| ${s} === "boolean" || ${a} === null`).assign(c,(0,i._)`[${a}]`)}}}function p({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,i._)`${t} !== undefined`,()=>e.assign((0,i._)`${t}[${n}]`,r))}function m(e,t,n,r=o.Correct){let a=r===o.Correct?i.operators.EQ:i.operators.NEQ,s;switch(e){case`null`:return(0,i._)`${t} ${a} null`;case`array`:s=(0,i._)`Array.isArray(${t})`;break;case`object`:s=(0,i._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case`integer`:s=c((0,i._)`!(${t} % 1) && !isNaN(${t})`);break;case`number`:s=c();break;default:return(0,i._)`typeof ${t} ${a} ${e}`}return r===o.Correct?s:(0,i.not)(s);function c(e=i.nil){return(0,i.and)((0,i._)`typeof ${t} == "number"`,e,n?(0,i._)`isFinite(${t})`:i.nil)}}e.checkDataType=m;function h(e,t,n,r){if(e.length===1)return m(e[0],t,n,r);let o,s=(0,a.toHash)(e);if(s.array&&s.object){let e=(0,i._)`typeof ${t} != "object"`;o=s.null?e:(0,i._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else o=i.nil;s.number&&delete s.integer;for(let e in s)o=(0,i.and)(o,m(e,t,n,r));return o}e.checkDataTypes=h;var g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e==`string`?(0,i._)`{type: ${e}}`:(0,i._)`{type: ${t}}`};function _(e){let t=v(e);(0,r.reportError)(t,g)}e.reportTypeError=_;function v(e){let{gen:t,data:n,schema:r}=e,i=(0,a.schemaRefOrVal)(e,r,`type`);return{gen:t,keyword:`type`,data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:e}}})),Fn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;var t=Dn(),n=On();function r(e,t){let{properties:n,items:r}=e.schema;if(t===`object`&&n)for(let t in n)i(e,t,n[t].default);else t===`array`&&Array.isArray(r)&&r.forEach((t,n)=>i(e,n,t.default))}e.assignDefaults=r;function i(e,r,i){let{gen:a,compositeRule:o,data:s,opts:c}=e;if(i===void 0)return;let l=(0,t._)`${s}${(0,t.getProperty)(r)}`;if(o){(0,n.checkStrictMode)(e,`default is ignored for: ${l}`);return}let u=(0,t._)`${l} === undefined`;c.useDefaults===`empty`&&(u=(0,t._)`${u} || ${l} === null || ${l} === ""`),a.if(u,(0,t._)`${l} = ${(0,t.stringify)(i)}`)}})),In=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;var t=Dn(),n=On(),r=kn(),i=On();function a(e,n){let{gen:r,data:i,it:a}=e;r.if(d(r,i,n,a.opts.ownProperties),()=>{e.setParams({missingProperty:(0,t._)`${n}`},!0),e.error()})}e.checkReportMissingProp=a;function o({gen:e,data:n,it:{opts:r}},i,a){return(0,t.or)(...i.map(i=>(0,t.and)(d(e,n,i,r.ownProperties),(0,t._)`${a} = ${i}`)))}e.checkMissingProp=o;function s(e,t){e.setParams({missingProperty:t},!0),e.error()}e.reportMissingProp=s;function c(e){return e.scopeValue(`func`,{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(e,n,r){return(0,t._)`${c(e)}.call(${n}, ${r})`}e.isOwnProperty=l;function u(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} !== undefined`;return i?(0,t._)`${a} && ${l(e,n,r)}`:a}e.propertyInData=u;function d(e,n,r,i){let a=(0,t._)`${n}${(0,t.getProperty)(r)} === undefined`;return i?(0,t.or)(a,(0,t.not)(l(e,n,r))):a}e.noPropertyInData=d;function f(e){return e?Object.keys(e).filter(e=>e!==`__proto__`):[]}e.allSchemaProperties=f;function p(e,t){return f(t).filter(r=>!(0,n.alwaysValidSchema)(e,t[r]))}e.schemaProperties=p;function m({schemaCode:e,data:n,it:{gen:i,topSchemaRef:a,schemaPath:o,errorPath:s},it:c},l,u,d){let f=d?(0,t._)`${e}, ${n}, ${a}${o}`:n,p=[[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,s)],[r.default.parentData,c.parentData],[r.default.parentDataProperty,c.parentDataProperty],[r.default.rootData,r.default.rootData]];c.opts.dynamicRef&&p.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);let m=(0,t._)`${f}, ${i.object(...p)}`;return u===t.nil?(0,t._)`${l}(${m})`:(0,t._)`${l}.call(${u}, ${m})`}e.callValidateCode=m;var h=(0,t._)`new RegExp`;function g({gen:e,it:{opts:n}},r){let a=n.unicodeRegExp?`u`:``,{regExp:o}=n.code,s=o(r,a);return e.scopeValue(`pattern`,{key:s.toString(),ref:s,code:(0,t._)`${o.code===`new RegExp`?h:(0,i.useFunc)(e,o)}(${r}, ${a})`})}e.usePattern=g;function _(e){let{gen:r,data:i,keyword:a,it:o}=e,s=r.name(`valid`);if(o.allErrors){let e=r.let(`valid`,!0);return c(()=>r.assign(e,!1)),e}return r.var(s,!0),c(()=>r.break()),s;function c(o){let c=r.const(`len`,(0,t._)`${i}.length`);r.forRange(`i`,0,c,i=>{e.subschema({keyword:a,dataProp:i,dataPropType:n.Type.Num},s),r.if((0,t.not)(s),o)})}}e.validateArray=_;function v(e){let{gen:r,schema:i,keyword:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(i.some(e=>(0,n.alwaysValidSchema)(o,e))&&!o.opts.unevaluated)return;let s=r.let(`valid`,!1),c=r.name(`_valid`);r.block(()=>i.forEach((n,i)=>{let o=e.subschema({keyword:a,schemaProp:i,compositeRule:!0},c);r.assign(s,(0,t._)`${s} || ${c}`),e.mergeValidEvaluated(o,c)||r.if((0,t.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}e.validateUnion=v})),Ln=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;var t=Dn(),n=kn(),r=In(),i=An();function a(e,n){let{gen:r,keyword:i,schema:a,parentSchema:o,it:s}=e,c=n.macro.call(s.self,a,o,s),l=u(r,i,c);s.opts.validateSchema!==!1&&s.self.validateSchema(c,!0);let d=r.name(`valid`);e.subschema({schema:c,schemaPath:t.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},d),e.pass(d,()=>e.error(!0))}e.macroKeywordCode=a;function o(e,i){let{gen:a,keyword:o,schema:d,parentSchema:f,$data:p,it:m}=e;l(m,i);let h=u(a,o,!p&&i.compile?i.compile.call(m.self,d,f,m):i.validate),g=a.let(`valid`);e.block$data(g,_),e.ok(i.valid??g);function _(){if(i.errors===!1)b(),i.modifying&&s(e),x(()=>e.error());else{let t=i.async?v():y();i.modifying&&s(e),x(()=>c(e,t))}}function v(){let e=a.let(`ruleErrs`,null);return a.try(()=>b((0,t._)`await `),n=>a.assign(g,!1).if((0,t._)`${n} instanceof ${m.ValidationError}`,()=>a.assign(e,(0,t._)`${n}.errors`),()=>a.throw(n))),e}function y(){let e=(0,t._)`${h}.errors`;return a.assign(e,null),b(t.nil),e}function b(o=i.async?(0,t._)`await `:t.nil){let s=m.opts.passContext?n.default.this:n.default.self,c=!(`compile`in i&&!p||i.schema===!1);a.assign(g,(0,t._)`${o}${(0,r.callValidateCode)(e,h,s,c)}`,i.modifying)}function x(e){a.if((0,t.not)(i.valid??g),e)}}e.funcKeywordCode=o;function s(e){let{gen:n,data:r,it:i}=e;n.if(i.parentData,()=>n.assign(r,(0,t._)`${i.parentData}[${i.parentDataProperty}]`))}function c(e,r){let{gen:a}=e;a.if((0,t._)`Array.isArray(${r})`,()=>{a.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${r} : ${n.default.vErrors}.concat(${r})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,i.extendErrors)(e)},()=>e.error())}function l({schemaEnv:e},t){if(t.async&&!e.$async)throw Error(`async keyword in sync schema`)}function u(e,n,r){if(r===void 0)throw Error(`keyword "${n}" failed to compile`);return e.scopeValue(`keyword`,typeof r==`function`?{ref:r}:{ref:r,code:(0,t.stringify)(r)})}function d(e,t,n=!1){return!t.length||t.some(t=>t===`array`?Array.isArray(e):t===`object`?e&&typeof e==`object`&&!Array.isArray(e):typeof e==t||n&&e===void 0)}e.validSchemaType=d;function f({schema:e,opts:t,self:n,errSchemaPath:r},i,a){if(Array.isArray(i.keyword)?!i.keyword.includes(a):i.keyword!==a)throw Error(`ajv implementation error`);let o=i.dependencies;if(o?.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${a}: ${o.join(`,`)}`);if(i.validateSchema&&!i.validateSchema(e[a])){let e=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(i.validateSchema.errors);if(t.validateSchema===`log`)n.logger.error(e);else throw Error(e)}}e.validateKeywordUsage=f})),Rn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;var t=Dn(),n=On();function r(e,{keyword:r,schemaProp:i,schema:a,schemaPath:o,errSchemaPath:s,topSchemaRef:c}){if(r!==void 0&&a!==void 0)throw Error(`both "keyword" and "schema" passed, only one allowed`);if(r!==void 0){let a=e.schema[r];return i===void 0?{schema:a,schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${r}`}:{schema:a[i],schemaPath:(0,t._)`${e.schemaPath}${(0,t.getProperty)(r)}${(0,t.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${r}/${(0,n.escapeFragment)(i)}`}}if(a!==void 0){if(o===void 0||s===void 0||c===void 0)throw Error(`"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"`);return{schema:a,schemaPath:o,topSchemaRef:c,errSchemaPath:s}}throw Error(`either "keyword" or "schema" must be passed`)}e.getSubschema=r;function i(e,r,{dataProp:i,dataPropType:a,data:o,dataTypes:s,propertyName:c}){if(o!==void 0&&i!==void 0)throw Error(`both "data" and "dataProp" passed, only one allowed`);let{gen:l}=r;if(i!==void 0){let{errorPath:o,dataPathArr:s,opts:c}=r;u(l.let(`data`,(0,t._)`${r.data}${(0,t.getProperty)(i)}`,!0)),e.errorPath=(0,t.str)`${o}${(0,n.getErrorPath)(i,a,c.jsPropertySyntax)}`,e.parentDataProperty=(0,t._)`${i}`,e.dataPathArr=[...s,e.parentDataProperty]}o!==void 0&&(u(o instanceof t.Name?o:l.let(`data`,o,!0)),c!==void 0&&(e.propertyName=c)),s&&(e.dataTypes=s);function u(t){e.data=t,e.dataLevel=r.dataLevel+1,e.dataTypes=[],r.definedProperties=new Set,e.parentData=r.data,e.dataNames=[...r.dataNames,t]}}e.extendSubschemaData=i;function a(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:i,allErrors:a}){r!==void 0&&(e.compositeRule=r),i!==void 0&&(e.createErrors=i),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}e.extendSubschemaMode=a})),zn=o(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}})),Bn=o(((e,t)=>{var n=t.exports=function(e,t,n){typeof t==`function`&&(n=t,t={}),n=t.cb||n;var i=typeof n==`function`?n:n.pre||function(){},a=n.post||function(){};r(t,i,a,e,``,e)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function r(e,t,a,o,s,c,l,u,d,f){if(o&&typeof o==`object`&&!Array.isArray(o)){for(var p in t(o,s,c,l,u,d,f),o){var m=o[p];if(Array.isArray(m)){if(p in n.arrayKeywords)for(var h=0;h<m.length;h++)r(e,t,a,m[h],s+`/`+p+`/`+h,c,s,p,o,h)}else if(p in n.propsKeywords){if(m&&typeof m==`object`)for(var g in m)r(e,t,a,m[g],s+`/`+p+`/`+i(g),c,s,p,o,g)}else(p in n.keywords||e.allKeys&&!(p in n.skipKeywords))&&r(e,t,a,m,s+`/`+p,c,s,p,o)}a(o,s,c,l,u,d,f)}}function i(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}})),Vn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;var t=On(),n=zn(),r=Bn(),i=new Set([`type`,`format`,`pattern`,`maxLength`,`minLength`,`maxProperties`,`minProperties`,`maxItems`,`minItems`,`maximum`,`minimum`,`uniqueItems`,`multipleOf`,`required`,`enum`,`const`]);function a(e,t=!0){return typeof e==`boolean`?!0:t===!0?!s(e):t?c(e)<=t:!1}e.inlineRef=a;var o=new Set([`$ref`,`$recursiveRef`,`$recursiveAnchor`,`$dynamicRef`,`$dynamicAnchor`]);function s(e){for(let t in e){if(o.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(s)||typeof n==`object`&&s(n))return!0}return!1}function c(e){let n=0;for(let r in e)if(r===`$ref`||(n++,!i.has(r)&&(typeof e[r]==`object`&&(0,t.eachItem)(e[r],e=>n+=c(e)),n===1/0)))return 1/0;return n}function l(e,t=``,n){return n!==!1&&(t=f(t)),u(e,e.parse(t))}e.getFullPath=l;function u(e,t){return e.serialize(t).split(`#`)[0]+`#`}e._getFullPath=u;var d=/#\/?$/;function f(e){return e?e.replace(d,``):``}e.normalizeId=f;function p(e,t,n){return n=f(n),e.resolve(t,n)}e.resolveUrl=p;var m=/^[a-z_][-a-z0-9._]*$/i;function h(e,t){if(typeof e==`boolean`)return{};let{schemaId:i,uriResolver:a}=this.opts,o=f(e[i]||t),s={"":o},c=l(a,o,!1),u={},d=new Set;return r(e,{allKeys:!0},(e,t,n,r)=>{if(r===void 0)return;let a=c+t,o=s[r];typeof e[i]==`string`&&(o=l.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=o;function l(t){let n=this.opts.uriResolver.resolve;if(t=f(o?n(o,t):t),d.has(t))throw h(t);d.add(t);let r=this.refs[t];return typeof r==`string`&&(r=this.refs[r]),typeof r==`object`?p(e,r.schema,t):t!==f(a)&&(t[0]===`#`?(p(e,u[t],t),u[t]=e):this.refs[t]=a),t}function g(e){if(typeof e==`string`){if(!m.test(e))throw Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}}),u;function p(e,t,r){if(t!==void 0&&!n(e,t))throw h(r)}function h(e){return Error(`reference "${e}" resolves to more than one schema`)}}e.getSchemaRefs=h})),Hn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;var t=jn(),n=Pn(),r=Nn(),i=Pn(),a=Fn(),o=Ln(),s=Rn(),c=Dn(),l=kn(),u=Vn(),d=On(),f=An();function p(e){if(S(e)&&(w(e),x(e))){_(e);return}m(e,()=>(0,t.topBoolOrEmptySchema)(e))}e.validateFunctionCode=p;function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:i},a){i.code.es5?e.func(t,(0,c._)`${l.default.data}, ${l.default.valCxt}`,r.$async,()=>{e.code((0,c._)`"use strict"; ${y(n,i)}`),g(e,i),e.code(a)}):e.func(t,(0,c._)`${l.default.data}, ${h(i)}`,r.$async,()=>e.code(y(n,i)).code(a))}function h(e){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function g(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,(0,c._)`""`),e.var(l.default.parentData,(0,c._)`undefined`),e.var(l.default.parentDataProperty,(0,c._)`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function _(e){let{schema:t,opts:n,gen:r}=e;m(e,()=>{n.$comment&&t.$comment&&ne(e),E(e),r.let(l.default.vErrors,null),r.let(l.default.errors,0),n.unevaluated&&v(e),T(e),re(e)})}function v(e){let{gen:t,validateName:n}=e;e.evaluated=t.const(`evaluated`,(0,c._)`${n}.evaluated`),t.if((0,c._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,c._)`${e.evaluated}.props`,(0,c._)`undefined`)),t.if((0,c._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,c._)`${e.evaluated}.items`,(0,c._)`undefined`))}function y(e,t){let n=typeof e==`object`&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,c._)`/*# sourceURL=${n} */`:c.nil}function b(e,n){if(S(e)&&(w(e),x(e))){C(e,n);return}(0,t.boolOrEmptySchema)(e,n)}function x({schema:e,self:t}){if(typeof e==`boolean`)return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function S(e){return typeof e.schema!=`boolean`}function C(e,t){let{schema:n,gen:r,opts:i}=e;i.$comment&&n.$comment&&ne(e),D(e),te(e);let a=r.const(`_errs`,l.default.errors);T(e,a),r.var(t,(0,c._)`${a} === ${l.default.errors}`)}function w(e){(0,d.checkUnknownRules)(e),ee(e)}function T(e,t){if(e.opts.jtd)return ie(e,[],!1,t);let r=(0,n.getSchemaTypes)(e.schema);ie(e,r,!(0,n.coerceAndCheckDataType)(e,r),t)}function ee(e){let{schema:t,errSchemaPath:n,opts:r,self:i}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function E(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,d.checkStrictMode)(e,`default is ignored in the schema root`)}function D(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,u.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function te(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error(`async schema in sync schema`)}function ne({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:i}){let a=n.$comment;if(i.$comment===!0)e.code((0,c._)`${l.default.self}.logger.log(${a})`);else if(typeof i.$comment==`function`){let n=(0,c.str)`${r}/$comment`,i=e.scopeValue(`root`,{ref:t.root});e.code((0,c._)`${l.default.self}.opts.$comment(${a}, ${n}, ${i}.schema)`)}}function re(e){let{gen:t,schemaEnv:n,validateName:r,ValidationError:i,opts:a}=e;n.$async?t.if((0,c._)`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw((0,c._)`new ${i}(${l.default.vErrors})`)):(t.assign((0,c._)`${r}.errors`,l.default.vErrors),a.unevaluated&&O(e),t.return((0,c._)`${l.default.errors} === 0`))}function O({gen:e,evaluated:t,props:n,items:r}){n instanceof c.Name&&e.assign((0,c._)`${t}.props`,n),r instanceof c.Name&&e.assign((0,c._)`${t}.items`,r)}function ie(e,t,n,a){let{gen:o,schema:s,data:u,allErrors:f,opts:p,self:m}=e,{RULES:h}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(s,h))){o.block(()=>pe(e,`$ref`,h.all.$ref.definition));return}p.jtd||k(e,t),o.block(()=>{for(let e of h.rules)g(e);g(h.post)});function g(d){(0,r.shouldUseGroup)(s,d)&&(d.type?(o.if((0,i.checkDataType)(d.type,u,p.strictNumbers)),ae(e,d),t.length===1&&t[0]===d.type&&n&&(o.else(),(0,i.reportTypeError)(e)),o.endIf()):ae(e,d),f||o.if((0,c._)`${l.default.errors} === ${a||0}`))}}function ae(e,t){let{gen:n,schema:i,opts:{useDefaults:o}}=e;o&&(0,a.assignDefaults)(e,t.type),n.block(()=>{for(let n of t.rules)(0,r.shouldUseRule)(i,n)&&pe(e,n.keyword,n.definition,t.type)})}function k(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(A(e,t),e.opts.allowUnionTypes||oe(e,t),se(e,e.dataTypes))}function A(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{le(e.dataTypes,t)||de(e,`type "${t}" not allowed by context "${e.dataTypes.join(`,`)}"`)}),ue(e,t)}}function oe(e,t){t.length>1&&!(t.length===2&&t.includes(`null`))&&de(e,`use allowUnionTypes to allow union type keyword`)}function se(e,t){let n=e.self.RULES.all;for(let i in n){let a=n[i];if(typeof a==`object`&&(0,r.shouldUseRule)(e.schema,a)){let{type:n}=a.definition;n.length&&!n.some(e=>ce(t,e))&&de(e,`missing type "${n.join(`,`)}" for keyword "${i}"`)}}}function ce(e,t){return e.includes(t)||t===`number`&&e.includes(`integer`)}function le(e,t){return e.includes(t)||t===`integer`&&e.includes(`number`)}function ue(e,t){let n=[];for(let r of e.dataTypes)le(t,r)?n.push(r):t.includes(`integer`)&&r===`number`&&n.push(`integer`);e.dataTypes=n}function de(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}var fe=class{constructor(e,t,n){if((0,o.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const(`vSchema`,ge(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);(`code`in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const(`_errs`,l.default.errors))}result(e,t,n){this.failResult((0,c.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,c.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,c._)`${t} !== undefined && (${(0,c.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw Error(`add "trackErrors" to keyword definition`);(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=c.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=c.nil,t=c.nil){if(!this.$data)return;let{gen:n,schemaCode:r,schemaType:i,def:a}=this;n.if((0,c.or)((0,c._)`${r} === undefined`,t)),e!==c.nil&&n.assign(e,!0),(i.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:r,it:a}=this;return(0,c.or)(o(),s());function o(){if(n.length){if(!(t instanceof c.Name))throw Error(`ajv implementation error`);let e=Array.isArray(n)?n:[n];return(0,c._)`${(0,i.checkDataTypes)(e,t,a.opts.strictNumbers,i.DataType.Wrong)}`}return c.nil}function s(){if(r.validateSchema){let n=e.scopeValue(`validate$data`,{ref:r.validateSchema});return(0,c._)`!${n}(${t})`}return c.nil}}subschema(e,t){let n=(0,s.getSubschema)(this.it,e);(0,s.extendSubschemaData)(n,this.it,e),(0,s.extendSubschemaMode)(n,e);let r={...this.it,...n,items:void 0,props:void 0};return b(r,t),r}mergeEvaluated(e,t){let{it:n,gen:r}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=d.mergeEvaluated.props(r,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=d.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:r}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return r.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}};e.KeywordCxt=fe;function pe(e,t,n,r){let i=new fe(e,n,t);`code`in n?n.code(i,r):i.$data&&n.validate?(0,o.funcKeywordCode)(i,n):`macro`in n?(0,o.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,o.funcKeywordCode)(i,n)}var me=/^\/(?:[^~]|~0|~1)*$/,he=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ge(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let i,a;if(e===``)return l.default.rootData;if(e[0]===`/`){if(!me.test(e))throw Error(`Invalid JSON-pointer: ${e}`);i=e,a=l.default.rootData}else{let o=he.exec(e);if(!o)throw Error(`Invalid JSON-pointer: ${e}`);let s=+o[1];if(i=o[2],i===`#`){if(s>=t)throw Error(u(`property/index`,s));return r[t-s]}if(s>t)throw Error(u(`data`,s));if(a=n[t-s],!i)return a}let o=a,s=i.split(`/`);for(let e of s)e&&(a=(0,c._)`${a}${(0,c.getProperty)((0,d.unescapeJsonPointer)(e))}`,o=(0,c._)`${o} && ${a}`);return o;function u(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}e.getData=ge})),Un=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=class extends Error{constructor(e){super(`validation failed`),this.errors=e,this.ajv=this.validation=!0}}})),Wn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Vn();e.default=class extends Error{constructor(e,n,r,i){super(i||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,t.resolveUrl)(e,n,r),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(e,this.missingRef))}}})),Gn=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;var t=Dn(),n=Un(),r=kn(),i=Vn(),a=On(),o=Hn(),s=class{constructor(e){this.refs={},this.dynamicAnchors={};let t;typeof e.schema==`object`&&(t=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=e.baseId??(0,i.normalizeId)(t?.[e.schemaId||`$id`]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=t?.$async,this.refs={}}};e.SchemaEnv=s;function c(e){let a=d.call(this,e);if(a)return a;let s=(0,i.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:c,lines:l}=this.opts.code,{ownProperties:u}=this.opts,f=new t.CodeGen(this.scope,{es5:c,lines:l,ownProperties:u}),p;e.$async&&(p=f.scopeValue(`Error`,{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let m=f.scopeName(`validate`);e.validateName=m;let h={gen:f,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue(`schema`,this.opts.code.source===!0?{ref:e.schema,code:(0,t.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:s,baseId:e.baseId||s,schemaPath:t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?``:`#`),errorPath:(0,t._)`""`,opts:this.opts,self:this},g;try{this._compilations.add(e),(0,o.validateFunctionCode)(h),f.optimize(this.opts.code.optimize);let n=f.toString();g=`${f.scopeRefs(r.default.scope)}return ${n}`,this.opts.code.process&&(g=this.opts.code.process(g,e));let i=Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(m,{ref:i}),i.errors=null,i.schema=e.schema,i.schemaEnv=e,e.$async&&(i.$async=!0),this.opts.code.source===!0&&(i.source={validateName:m,validateCode:n,scopeValues:f._values}),this.opts.unevaluated){let{props:e,items:n}=h;i.evaluated={props:e instanceof t.Name?void 0:e,items:n instanceof t.Name?void 0:n,dynamicProps:e instanceof t.Name,dynamicItems:n instanceof t.Name},i.source&&(i.source.evaluated=(0,t.stringify)(i.evaluated))}return e.validate=i,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error(`Error compiling schema, function code:`,g),t}finally{this._compilations.delete(e)}}e.compileSchema=c;function l(e,t,n){n=(0,i.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let a=p.call(this,e,n);if(a===void 0){let r=e.localRefs?.[n],{schemaId:i}=this.opts;r&&(a=new s({schema:r,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=u.call(this,a)}e.resolveRef=l;function u(e){return(0,i.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:c.call(this,e)}function d(e){for(let t of this._compilations)if(f(t,e))return t}e.getCompilingSchema=d;function f(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let n;for(;typeof(n=this.refs[t])==`string`;)t=n;return n||this.schemas[t]||m.call(this,e,t)}function m(e,t){let n=this.opts.uriResolver.parse(t),r=(0,i._getFullPath)(this.opts.uriResolver,n),a=(0,i.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===a)return g.call(this,n,e);let o=(0,i.normalizeId)(r),l=this.refs[o]||this.schemas[o];if(typeof l==`string`){let t=m.call(this,e,l);return typeof t?.schema==`object`?g.call(this,n,t):void 0}if(typeof l?.schema==`object`){if(l.validate||c.call(this,l),o===(0,i.normalizeId)(t)){let{schema:t}=l,{schemaId:n}=this.opts,r=t[n];return r&&(a=(0,i.resolveUrl)(this.opts.uriResolver,a,r)),new s({schema:t,schemaId:n,root:e,baseId:a})}return g.call(this,n,l)}}e.resolveSchema=m;var h=new Set([`properties`,`patternProperties`,`enum`,`dependencies`,`definitions`]);function g(e,{baseId:t,schema:n,root:r}){if(e.fragment?.[0]!==`/`)return;for(let r of e.fragment.slice(1).split(`/`)){if(typeof n==`boolean`)return;let e=n[(0,a.unescapeFragment)(r)];if(e===void 0)return;n=e;let o=typeof n==`object`&&n[this.opts.schemaId];!h.has(r)&&o&&(t=(0,i.resolveUrl)(this.opts.uriResolver,t,o))}let o;if(typeof n!=`boolean`&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){let e=(0,i.resolveUrl)(this.opts.uriResolver,t,n.$ref);o=m.call(this,r,e)}let{schemaId:c}=this.opts;if(o||=new s({schema:n,schemaId:c,root:r,baseId:t}),o.schema!==o.root.schema)return o}})),Kn=s({$id:()=>qn,additionalProperties:()=>!1,default:()=>Qn,description:()=>Jn,properties:()=>Zn,required:()=>Xn,type:()=>Yn}),qn,Jn,Yn,Xn,Zn,Qn,$n=a((()=>{qn=`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`,Jn=`Meta-schema for $data reference (JSON AnySchema extension proposal)`,Yn=`object`,Xn=[`$data`],Zn={$data:{type:`string`,anyOf:[{format:`relative-json-pointer`},{format:`json-pointer`}]}},Qn={$id:qn,description:Jn,type:Yn,required:Xn,properties:Zn,additionalProperties:!1}})),er=o(((e,t)=>{var n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),i=RegExp.prototype.test.bind(/^\d*$/u),a=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),o=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),l=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),u=Array(256);{let e=`0123456789ABCDEF`;for(let t=0;t<256;t++)u[t]=`%`+e[t>>4]+e[t&15]}function d(e){return e<2048?u[192|e>>6]+u[128|e&63]:e<65536?u[224|e>>12]+u[128|e>>6&63]+u[128|e&63]:u[240|e>>18]+u[128|e>>12&63]+u[128|e>>6&63]+u[128|e&63]}function f(e){let t=``,n=0,r=0;for(r=0;r<e.length;r++)if(n=e[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r];break}for(r+=1;r<e.length;r++){if(n=e[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return``;t+=e[r]}return t}var p=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),m=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),h=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),g=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function _(e){if(e.length===0)return!1;for(let t=0;t<e.length;t++)if(!h(e[t])){if(e[t]===`%`&&t+2<e.length&&a(e.slice(t+1,t+3))){t+=2;continue}return!1}return!0}function v(e){let t=-1,n=0,r=-1,i=0;for(let a=0;a<e.length;a++)e[a]===`0`?(r===-1&&(r=a),i++,i>n&&(n=i,t=r)):(r=-1,i=0);if(n<2)return e.join(`:`);let a=e.slice(0,t).join(`:`),o=e.slice(t+n).join(`:`);return a+`::`+o}function y(e){let t=e.indexOf(`::`);if(t!==-1&&e.indexOf(`::`,t+1)!==-1)return;let n=t===-1?e.split(`:`):e.slice(0,t).split(`:`),i=t===-1?[]:e.slice(t+2).split(`:`);t!==-1&&(n.length===1&&n[0]===``&&(n.length=0),i.length===1&&i[0]===``&&(i.length=0));let a=n.concat(i),o=0;for(let e=0;e<a.length;e++){let n=a[e];if(n===``)return;if(n.indexOf(`.`)!==-1){if(e!==a.length-1||t!==-1&&i.length===0||!r(n))return;o+=2;continue}if(!p(n))return;a[e]=parseInt(n,16).toString(16),o++}if(t===-1)return o===8?v(a):void 0;if(o>=8)return;let s=a.slice(0,n.length);for(let e=o;e<8;e++)s.push(`0`);for(let e=n.length;e<a.length;e++)s.push(a[e]);return v(s)}function b(e){let t=e[0]===`[`&&e[e.length-1]===`]`;if((e[0]===`[`||e[e.length-1]===`]`)&&!t)return{host:e,isIPV6:!1,error:!0};let n=t?e.slice(1,-1):e;if(t&&m(n))return n=n.toLowerCase(),{host:`[${n}]`,escapedHost:n,isIPV6:!1,isIPVFuture:!0};if(x(n,`:`)<2)return{host:e,isIPV6:!1,error:t};let r=``,i=n.indexOf(`%`);if(i!==-1){let t=n.slice(i,i+3).toLowerCase()===`%25`?3:1;if(r=n.slice(i+t),!_(r))return{host:e,isIPV6:!1,error:!0};n=n.slice(0,i)}let a=y(n);return a===void 0?{host:e,isIPV6:!1,error:!0}:{host:a+(r?`%`+r:``),escapedHost:a+(r?`%25`+r:``),isIPV6:!0}}function x(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}function S(e){let t=e,n=[],r=-1,i=0;for(;i=t.length;){if(i===1){if(t===`.`)break;if(t===`/`){n.push(`/`);break}else{n.push(t);break}}else if(i===2){if(t[0]===`.`){if(t[1]===`.`)break;if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&(t[1]===`.`||t[1]===`/`)){n.push(`/`);break}}else if(i===3&&t===`/..`){n.length!==0&&n.pop(),n.push(`/`);break}if(t[0]===`.`){if(t[1]===`.`){if(t[2]===`/`){t=t.slice(3);continue}}else if(t[1]===`/`){t=t.slice(2);continue}}else if(t[0]===`/`&&t[1]===`.`){if(t[2]===`/`){t=t.slice(2);continue}else if(t[2]===`.`&&t[3]===`/`){t=t.slice(3),n.length!==0&&n.pop();continue}}if((r=t.indexOf(`/`,1))===-1){n.push(t);break}else n.push(t.slice(0,r)),t=t.slice(r)}return n.join(``)}var C={"@":`%40`,"/":`%2F`,"?":`%3F`,"#":`%23`,":":`%3A`},w=/[@/?#:]/g,T=/[@/?#]/g;function ee(e,t){let n=t?T:w;return n.lastIndex=0,e.replace(n,e=>C[e])}function E(e,t=!1){if(e.indexOf(`%`)===-1)return e;let n=``;for(let r=0;r<e.length;r++){if(e[r]===`%`&&r+2<e.length){let i=e.slice(r+1,r+3);if(a(i)){let e=i.toUpperCase(),a=String.fromCharCode(parseInt(e,16));t&&o(a)?n+=a:n+=`%`+e,r+=2;continue}}n+=e[r]}return n}function D(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));i!==`.`&&o(i)?t+=i:t+=`%`+e,n+=2;continue}}if(s(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=ae(i)?r:u[i];else if(i<55296||i>57343)t+=d(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function te(e,t=!1){let n=``,r=t&&e[0]!==`/`;for(let t=0;t<e.length;t++){let i=e[t];if(i===`%`&&t+2<e.length){let r=e.slice(t+1,t+3);if(a(r)){n+=`%`+r.toUpperCase(),t+=2;continue}}if(i===`/`&&(r=!1),s(i)&&(i!==`:`||!r))n+=i;else{let r=e.charCodeAt(t);if(r<128)n+=u[r];else if(r<55296||r>57343)n+=d(r);else if(r<=56319&&t+1<e.length){let i=e.charCodeAt(t+1);i>=56320&&i<=57343?(n+=d(65536+(r-55296<<10)+(i-56320)),t++):n+=d(65533)}else n+=d(65533)}}return n}function ne(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`%`&&r+2<e.length){let t=e.slice(r+1,r+3);if(a(t)){n+=`%`+t.toUpperCase(),r+=2;continue}}if(t(i))n+=i;else{let t=e.charCodeAt(r);if(t<128)n+=u[t];else if(t<55296||t>57343)n+=d(t);else if(t<=56319&&r+1<e.length){let i=e.charCodeAt(r+1);i>=56320&&i<=57343?(n+=d(65536+(t-55296<<10)+(i-56320)),r++):n+=d(65533)}else n+=d(65533)}}return n}function re(e){return ne(e,l)}function O(e){return ne(e,c)}function ie(e){return ne(e,c)}function ae(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===42||e===43||e===45||e===46||e===47||e===64||e===95}function k(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){let e=r.toUpperCase(),i=String.fromCharCode(parseInt(e,16));o(i)?t+=i:t+=`%`+e,n+=2;continue}}if(c(r))t+=r;else{let i=e.charCodeAt(n);if(i<128)t+=ae(i)?r:u[i];else if(i<55296||i>57343)t+=d(i);else if(i<=56319&&n+1<e.length){let r=e.charCodeAt(n+1);r>=56320&&r<=57343?(t+=d(65536+(i-55296<<10)+(r-56320)),n++):t+=d(65533)}else t+=d(65533)}}return t}function A(e){let t=``;for(let n=0;n<e.length;n++){if(e[n]===`%`&&n+2<e.length){let r=e.slice(n+1,n+3);if(a(r)){t+=`%`+r.toUpperCase(),n+=2;continue}}t+=escape(e[n])}return t}function oe(e){let t=[];if(e.userinfo!==void 0&&(t.push(re(e.userinfo)),t.push(`@`)),e.host!==void 0){let n=e.host;if(!r(n)){let e=b(n);e.isIPV6!==!0&&e.isIPVFuture!==!0&&(n=E(n,!0),e=b(n)),n=e.isIPV6===!0||e.isIPVFuture===!0?`[${e.escapedHost}]`:ee(n,!1)}t.push(n)}if(typeof e.port==`number`||typeof e.port==`string`){let n=String(e.port);if(!i(n))throw TypeError(`URI port is malformed.`);t.push(`:`),t.push(n)}return t.length?t.join(``):void 0}t.exports={nonSimpleDomain:g,recomposeAuthority:oe,reescapeHostDelimiters:ee,normalizePercentEncoding:E,normalizePathEncoding:D,serializePathEncoding:te,normalizeQueryFragmentEncoding:k,encodeUserinfo:re,encodeQuery:O,encodeFragment:ie,escapePreservingEscapes:A,removeDotSegments:S,isIPv4:r,isUUID:n,normalizeIPv6:b,stringArrayToHexStripped:f}})),tr=o(((e,t)=>{var{isUUID:n}=er(),r=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,i=[`http`,`https`,`ws`,`wss`,`urn`,`urn:uuid`];function a(e){return i.indexOf(e)!==-1}function o(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]===`w`||e.scheme[0]===`W`)&&(e.scheme[1]===`s`||e.scheme[1]===`S`)&&(e.scheme[2]===`s`||e.scheme[2]===`S`):!1}function s(e){return e.host||(e.error=e.error||`HTTP URIs must have a host.`),e}function c(e){let t=String(e.scheme).toLowerCase()===`https`;return(e.port===(t?443:80)||e.port===``)&&(e.port=void 0),e.path||=`/`,e}function l(e){return e.secure=o(e),e.resourceName=(e.path||`/`)+(e.query?`?`+e.query:``),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||e.port===``)&&(e.port=void 0),typeof e.secure==`boolean`&&(e.scheme=e.secure?`wss`:`ws`,e.secure=void 0),e.resourceName){let t=e.resourceName.indexOf(`?`),n=t===-1?e.resourceName:e.resourceName.slice(0,t);e.path=n&&n!==`/`?n:void 0,e.query=t===-1?void 0:e.resourceName.slice(t+1),e.resourceName=void 0}return e.fragment=void 0,e}function d(e,t){if(!e.path)return e.error=`URN can not be parsed`,e;let n=e.path.match(r);if(n&&n[0]===e.path){let r=t.scheme||e.scheme||`urn`;e.nid=n[1].toLowerCase(),e.nss=n[2];let i=y(`${r}:${t.nid||e.nid}`);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||`URN can not be parsed.`;return e}function f(e,t){if(e.nid===void 0)throw Error(`URN without nid cannot be serialized`);let n=t.scheme||e.scheme||`urn`,r=e.nid.toLowerCase(),i=y(`${n}:${t.nid||r}`);i&&(e=i.serialize(e,t));let a=e,o=e.nss;return a.path=`${r||t.nid}:${o}`,t.skipEscape=!0,a}function p(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!n(r.uuid))&&(r.error=r.error||`UUID is not valid.`),r}function m(e){let t=e;return t.nss=(e.uuid||``).toLowerCase(),t}var h={scheme:`http`,domainHost:!0,parse:s,serialize:c},g={scheme:`https`,domainHost:h.domainHost,parse:s,serialize:c},_={scheme:`ws`,domainHost:!0,parse:l,serialize:u},v={http:h,https:g,ws:_,wss:{scheme:`wss`,domainHost:_.domainHost,parse:_.parse,serialize:_.serialize},urn:{scheme:`urn`,parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:`urn:uuid`,parse:p,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(v,null);function y(e){return e&&(v[e]||v[e.toLowerCase()])||void 0}t.exports={wsIsSecure:o,SCHEMES:v,isValidSchemeName:a,getSchemeHandler:y}})),nr=o(((e,t)=>{var{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:i,normalizePercentEncoding:a,normalizePathEncoding:o,serializePathEncoding:s,normalizeQueryFragmentEncoding:c,encodeQuery:l,encodeFragment:u,reescapeHostDelimiters:d,isIPv4:f,nonSimpleDomain:p}=er(),{SCHEMES:m,getSchemeHandler:h}=tr(),g=/^[A-Za-z][A-Za-z0-9+.-]*$/u,_=`URI scheme is malformed.`;function v(e){let t=unescape(String(e));if(!g.test(t))throw TypeError(_);return t}function y(e,t){return typeof e==`string`?e=ae(e,t):typeof e==`object`&&(e=ie(C(e,t),t)),e}function b(e,t,r){let i=r?Object.assign({scheme:`null`},r):{scheme:`null`},{parsed:a,malformedAuthorityOrPort:o,malformedPercentEncoding:s,malformedSchemeSpecific:c,malformedHost:l,malformedScheme:u}=O(e,i),{parsed:d,malformedAuthorityOrPort:p,malformedPercentEncoding:m,malformedSchemeSpecific:g,malformedHost:_,malformedScheme:v}=O(t,i);if(o||p||s||m||c||g||l||_||u||v)throw Error(a.error||d.error||`URI is malformed.`);let y=x(a,d,i,!0),b=h(r&&r.scheme||y.scheme),S=y.host,w=S!==void 0&&S!==``&&(f(S)||n(S).isIPV6);re(y,r||{},b,w);let T=S&&S.indexOf(`%`)!==-1&&!/\P{ASCII}/u.test(S);if(y.error&&!T)throw Error(y.error);return i.skipEscape=!0,C(y,i)}function x(e,t,n,i){let a={};return i||(e=ie(C(e,n),n),t=ie(C(t,n),n)),n||={},!n.tolerant&&t.scheme?(a.scheme=t.scheme,a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(a.userinfo=t.userinfo,a.host=t.host,a.port=t.port,a.path=r(t.path||``),a.query=t.query):(t.path?(t.path[0]===`/`?a.path=r(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?a.path=`/`+t.path:e.path?a.path=e.path.slice(0,e.path.lastIndexOf(`/`)+1)+t.path:a.path=t.path,a.path=r(a.path)),a.query=t.query):(a.path=e.path,t.query===void 0?a.query=e.query:a.query=t.query),a.userinfo=e.userinfo,a.host=e.host,a.port=e.port),a.scheme=e.scheme),a.fragment=t.fragment,a}function S(e,t,n){let r=A(e,n),i=A(t,n);return r!==void 0&&i!==void 0&&r===i}function C(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:``},o=Object.assign({},t),c=[];n.scheme&&=v(n.scheme);let d=h(o.scheme||n.scheme);d&&d.serialize&&d.serialize(n,o);let f=n.userinfo!==void 0||n.host!==void 0||n.port!==void 0,p=!o.skipEscape&&n.scheme===void 0&&!f;n.path!==void 0&&(o.skipEscape?n.path=a(n.path):n.path=s(n.path,p)),o.reference!==`suffix`&&n.scheme&&(n.scheme=v(n.scheme),c.push(n.scheme,`:`));let m=i(n);if(m!==void 0&&(o.reference!==`suffix`&&c.push(`//`),c.push(m),n.path&&n.path[0]!==`/`&&c.push(`/`)),n.path!==void 0){let e=n.path;!o.absolutePath&&(!d||!d.absolutePath)&&(e=r(e)),p&&(e=s(e,!0)),m===void 0&&e[0]===`/`&&e[1]===`/`&&(e=`/%2F`+e.slice(2)),c.push(e)}return n.query!==void 0&&c.push(`?`,l(n.query)),n.fragment!==void 0&&c.push(`#`,u(n.fragment)),c.join(``)}var w=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,T=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,ee=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function E(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!==`/`)return`URI path must start with "/" when authority is present.`;if(typeof e.port==`number`&&(e.port<0||e.port>65535))return`URI port is malformed.`}function D(e){if(e===void 0)return!1;let t=e.indexOf(`%`);for(;t!==-1;){if(t+2>=e.length||!/^[\da-f]{2}$/iu.test(e.slice(t+1,t+3)))return!0;t=e.indexOf(`%`,t+3)}return!1}function te(e){return e[0]===`[`&&e[e.length-1]===`]`}function ne(e){let t=e[4];return D(e[3])||t!==void 0&&!te(t)&&D(t)||D(e[6])||D(e[7])||D(e[8])}function re(e,t,n,r){if(!t.unicodeSupport&&(!n||!n.unicodeSupport)&&e.host&&!te(e.host)&&(t.domainHost||n&&n.domainHost)&&r===!1&&p(e.host))try{e.host=new URL(`http://`+e.host).hostname}catch(t){return e.error=e.error||`Host's domain name can not be converted to ASCII: `+t,!0}return!1}function O(e,t){let r=Object.assign({},t),i={scheme:void 0,userinfo:void 0,host:``,port:void 0,path:``,query:void 0,fragment:void 0},s=!1,l=!1,u=!1,p=!1,v=!1,y=!1,b=!1;r.reference===`suffix`&&(e=r.scheme?r.scheme+`:`+e:`//`+e);let x=e.match(T);x!==null&&x[1].indexOf(`\\`)!==-1&&(i.error=`URI authority must not contain a literal backslash.`,s=!0);let S=e.match(ee);if(S!==null){let e=S[1],t=e.replace(/[\t\n\r]/g,``);t.length>=2&&(t.slice(0,2)===`//`?e.length!==t.length&&(i.error=i.error||`URI authority introducer must not contain whitespace.`,s=!0):(i.error=i.error||`URI authority must not contain a literal backslash.`,s=!0))}let C=e.match(w);if(C){if(i.scheme=C[1],i.userinfo=C[3],i.host=C[4],i.port=parseInt(C[5],10),i.path=C[6]||``,i.query=C[7],i.fragment=C[8],i.scheme!==void 0){let e=unescape(i.scheme);g.test(e)?i.scheme=e.toLowerCase():(i.error=i.error||_,y=!0)}l=ne(C),l&&(i.error=i.error||`URI contains malformed percent-encoding.`),isNaN(i.port)&&(i.port=C[5]);let t=E(i,C);if(t!==void 0&&(i.error=i.error||t,s=!0),i.host)if(f(i.host)===!1){let e=te(i.host),t=i.host.indexOf(`[`)!==-1||i.host.indexOf(`]`)!==-1,r=n(i.host);b=r.isIPV6||r.isIPVFuture===!0,v=t&&(!e||r.error===!0),i.host=b?r.host:r.host.toLowerCase(),v&&(i.error=i.error||`URI host is malformed.`,s=!0)}else b=!0;i.scheme===void 0&&i.userinfo===void 0&&i.host===void 0&&i.port===void 0&&i.query===void 0&&!i.path?i.reference=`same-document`:i.scheme===void 0?i.reference=`relative`:i.fragment===void 0?i.reference=`absolute`:i.reference=`uri`,r.reference&&r.reference!==`suffix`&&r.reference!==i.reference&&(i.error=i.error||`URI is not a `+r.reference+` reference.`);let x=h(r.scheme||i.scheme);v||(p=re(i,r,x,b)),(!x||x&&!x.skipNormalize)&&(e.indexOf(`%`)!==-1&&i.host!==void 0&&!v&&(i.host=d(b?i.host:a(i.host,!0),b)),i.path&&=o(i.path),i.query&&=c(i.query),i.fragment&&=c(i.fragment)),x&&x.parse&&(x.parse(i,r),x===m.urn&&i.nid===void 0&&(u=!0))}else i.error=i.error||`URI can not be parsed.`;return{parsed:i,malformedAuthorityOrPort:s,malformedPercentEncoding:l,malformedSchemeSpecific:u,malformedHost:p,malformedScheme:y}}function ie(e,t){return O(e,t).parsed}function ae(e,t){return k(e,t).normalized}function k(e,t){let{parsed:n,malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}=O(e,t);return{normalized:r||i||a||o||s?e:C(n,t),malformedAuthorityOrPort:r,malformedPercentEncoding:i,malformedSchemeSpecific:a,malformedHost:o,malformedScheme:s}}function A(e,t){if(typeof e!=`string`&&typeof e!=`object`)return;let n;try{n=typeof e==`string`?e:C(e,t)}catch{return}let{normalized:r,malformedAuthorityOrPort:i,malformedPercentEncoding:a,malformedSchemeSpecific:o,malformedHost:s,malformedScheme:c}=k(n,t);return i||a||o||s||c?void 0:r}var oe={SCHEMES:m,normalize:y,resolve:b,resolveComponent:x,equal:S,serialize:C,parse:ie};t.exports=oe,t.exports.default=oe,t.exports.fastUri=oe})),rr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=nr();t.code=`require("ajv/dist/runtime/uri").default`,e.default=t})),ir=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Hn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Dn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});var r=Un(),i=Wn(),a=Mn(),o=Gn(),s=Dn(),c=Vn(),u=Pn(),d=On(),f=($n(),l(Kn).default),p=rr(),m=(e,t)=>new RegExp(e,t);m.code=`new RegExp`;var h=[`removeAdditional`,`useDefaults`,`coerceTypes`],g=new Set([`validate`,`serialize`,`parse`,`wrapper`,`root`,`schema`,`keyword`,`pattern`,`formats`,`validate$data`,`func`,`obj`,`Error`]),_={errorDataPath:``,format:"`validateFormats: false` can be used instead.",nullable:`"nullable" keyword is supported by default.`,jsonPointers:`Deprecated jsPropertySyntax can be used instead.`,extendRefs:`Deprecated ignoreKeywordsWithRef can be used instead.`,missingRefs:`Pass empty schema with $id that should be ignored to ajv.addSchema.`,processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:`"uniqueItems" keyword is always validated.`,unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:`Map is used as cache, schema object as key.`,serialize:`Map is used as cache, schema object as key.`,ajvErrors:`It is default now.`},v={ignoreKeywordsWithRef:``,jsPropertySyntax:``,unicode:`"minLength"/"maxLength" account for unicode characters by default.`},y=200;function b(e){let t=e.strict,n=e.code?.optimize,r=n===!0||n===void 0?1:n||0,i=e.code?.regExp??m,a=e.uriResolver??p.default;return{strictSchema:e.strictSchema??t??!0,strictNumbers:e.strictNumbers??t??!0,strictTypes:e.strictTypes??t??`log`,strictTuples:e.strictTuples??t??`log`,strictRequired:e.strictRequired??t??!1,code:e.code?{...e.code,optimize:r,regExp:i}:{optimize:r,regExp:i},loopRequired:e.loopRequired??y,loopEnum:e.loopEnum??y,meta:e.meta??!0,messages:e.messages??!0,inlineRefs:e.inlineRefs??!0,schemaId:e.schemaId??`$id`,addUsedSchema:e.addUsedSchema??!0,validateSchema:e.validateSchema??!0,validateFormats:e.validateFormats??!0,unicodeRegExp:e.unicodeRegExp??!0,int32range:e.int32range??!0,uriResolver:a}}var x=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:g,es5:t,lines:n}),this.logger=te(e.logger);let r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),S.call(this,_,e,`NOT SUPPORTED`),S.call(this,v,e,`DEPRECATED`,`warn`),this._metaOpts=E.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&ee.call(this,e.keywords),typeof e.meta==`object`&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword(`$async`)}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,r=f;n===`id`&&(r={...f},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e==`object`?e[t]||e:void 0}validate(e,t){let n;if(typeof e==`string`){if(n=this.getSchema(e),!n)throw Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let r=n(t);return`$async`in n||(this.errors=n.errors),r}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!=`function`)throw Error(`options.loadSchema should be a function`);let{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await a.call(this,e.$schema);let n=this._addSchema(e,t);return n.validate||o.call(this,n)}async function a(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return s.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){let n=await l.call(this,e);this.refs[e]||await a.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function l(e){let t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,n,r);return this}let i;if(typeof e==`object`){let{schemaId:t}=this.opts;if(i=e[t],i!==void 0&&typeof i!=`string`)throw Error(`schema ${t} must be string`)}return t=(0,c.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e==`boolean`)return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!=`string`)throw Error(`$schema must be a string`);if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn(`meta-schema not available`),this.errors=null,!0;let r=this.validate(n,e);if(!r&&t){let e=`schema is invalid: `+this.errorsText();if(this.opts.validateSchema===`log`)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;typeof(t=C.call(this,e))==`string`;)e=t;if(t===void 0){let{schemaId:n}=this.opts,r=new o.SchemaEnv({schema:{},schemaId:n});if(t=o.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case`undefined`:return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case`string`:{let t=C.call(this,e);return typeof t==`object`&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case`object`:{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,c.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw Error(`ajv.removeSchema: invalid parameter`)}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e==`string`)n=e,typeof t==`object`&&(this.logger.warn(`these parameters are deprecated, see docs for addKeyword`),t.keyword=n);else if(typeof e==`object`&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw Error(`addKeywords: keyword must be string or non-empty array`)}else throw Error(`invalid addKeywords parameters`);if(re.call(this,n,t),!t)return(0,d.eachItem)(n,e=>O.call(this,e)),this;ae.call(this,t);let r={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(n,r.type.length===0?e=>O.call(this,e,r):e=>r.type.forEach(t=>O.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t==`object`?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let t=n.rules.findIndex(t=>t.keyword===e);t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return typeof t==`string`&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=`, `,dataVar:n=`data`}={}){return!e||e.length===0?`No errors`:e.map(e=>`${n}${e.instancePath} ${e.message}`).reduce((e,n)=>e+t+n)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let r of t){let t=r.split(`/`).slice(1),i=e;for(let e of t)i=i[e];for(let e in n){let t=n[e];if(typeof t!=`object`)continue;let{$data:r}=t.definition,a=i[e];r&&a&&(i[e]=A(a))}}return e}_removeAllSchemas(e,t){for(let n in e){let r=e[n];(!t||t.test(n))&&(typeof r==`string`?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e==`object`)a=e[s];else if(this.opts.jtd)throw Error(`schema must be object`);else if(typeof e!=`boolean`)throw Error(`schema must be object or boolean`);let l=this._cache.get(e);if(l!==void 0)return l;n=(0,c.normalizeId)(a||n);let u=c.getSchemaRefs.call(this,e,n);return l=new o.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:n,localRefs:u}),this._cache.set(l.schema,l),i&&!n.startsWith(`#`)&&(n&&this._checkUnique(n),this.refs[n]=l),r&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):o.compileSchema.call(this,e),!e.validate)throw Error(`ajv implementation error`);return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,e)}finally{this.opts=t}}};x.ValidationError=r.default,x.MissingRefError=i.default,e.default=x;function S(e,t,n,r=`error`){for(let i in e){let a=i;a in t&&this.logger[r](`${n}: option ${i}. ${e[a]}`)}}function C(e){return e=(0,c.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function T(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function ee(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn(`keywords option as map is deprecated, pass array`);for(let t in e){let n=e[t];n.keyword||=t,this.addKeyword(n)}}function E(){let e={...this.opts};for(let t of h)delete e[t];return e}var D={log(){},warn(){},error(){}};function te(e){if(e===!1)return D;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw Error(`logger must implement log, warn and error methods`)}var ne=/^[a-z_$][a-z0-9_$:-]*$/i;function re(e,t){let{RULES:n}=this;if((0,d.eachItem)(e,e=>{if(n.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!ne.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!(`code`in t||`validate`in t))throw Error(`$data keyword must have "code" or "validate" function`)}function O(e,t,n){var r;let i=t?.post;if(n&&i)throw Error(`keyword with "post" flag cannot have "type"`);let{RULES:a}=this,o=i?a.post:a.rules.find(({type:e})=>e===n);if(o||(o={type:n,rules:[]},a.rules.push(o)),a.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?ie.call(this,o,s,t.before):o.rules.push(s),a.all[e]=s,(r=t.implements)==null||r.forEach(e=>this.addKeyword(e))}function ie(e,t,n){let r=e.rules.findIndex(e=>e.keyword===n);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function ae(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=A(t)),e.validateSchema=this.compile(t,!0))}var k={$ref:`https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#`};function A(e){return{anyOf:[e,k]}}})),ar=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`id`,code(){throw Error(`NOT SUPPORTED: keyword "id", use "$id" for schema ID`)}}})),or=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;var t=Wn(),n=In(),r=Dn(),i=kn(),a=Gn(),o=On(),s={keyword:`$ref`,schemaType:`string`,code(e){let{gen:n,schema:i,it:o}=e,{baseId:s,schemaEnv:u,validateName:d,opts:f,self:p}=o,{root:m}=u;if((i===`#`||i===`#/`)&&s===m.baseId)return g();let h=a.resolveRef.call(p,m,s,i);if(h===void 0)throw new t.default(o.opts.uriResolver,s,i);if(h instanceof a.SchemaEnv)return _(h);return v(h);function g(){if(u===m)return l(e,d,u,u.$async);let t=n.scopeValue(`root`,{ref:m});return l(e,(0,r._)`${t}.validate`,m,m.$async)}function _(t){l(e,c(e,t),t,t.$async)}function v(t){let a=n.scopeValue(`schema`,f.code.source===!0?{ref:t,code:(0,r.stringify)(t)}:{ref:t}),o=n.name(`valid`),s=e.subschema({schema:t,dataTypes:[],schemaPath:r.nil,topSchemaRef:a,errSchemaPath:i},o);e.mergeEvaluated(s),e.ok(o)}}};function c(e,t){let{gen:n}=e;return t.validate?n.scopeValue(`validate`,{ref:t.validate}):(0,r._)`${n.scopeValue(`wrapper`,{ref:t})}.validate`}e.getValidate=c;function l(e,t,a,s){let{gen:c,it:l}=e,{allErrors:u,schemaEnv:d,opts:f}=l,p=f.passContext?i.default.this:r.nil;s?m():h();function m(){if(!d.$async)throw Error(`async schema referenced by sync schema`);let i=c.let(`valid`);c.try(()=>{c.code((0,r._)`await ${(0,n.callValidateCode)(e,t,p)}`),_(t),u||c.assign(i,!0)},e=>{c.if((0,r._)`!(${e} instanceof ${l.ValidationError})`,()=>c.throw(e)),g(e),u||c.assign(i,!1)}),e.ok(i)}function h(){e.result((0,n.callValidateCode)(e,t,p),()=>_(t),()=>g(t))}function g(e){let t=(0,r._)`${e}.errors`;c.assign(i.default.vErrors,(0,r._)`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`),c.assign(i.default.errors,(0,r._)`${i.default.vErrors}.length`)}function _(e){if(!l.opts.unevaluated)return;let t=a?.validate?.evaluated;if(l.props!==!0)if(t&&!t.dynamicProps)t.props!==void 0&&(l.props=o.mergeEvaluated.props(c,t.props,l.props));else{let t=c.var(`props`,(0,r._)`${e}.evaluated.props`);l.props=o.mergeEvaluated.props(c,t,l.props,r.Name)}if(l.items!==!0)if(t&&!t.dynamicItems)t.items!==void 0&&(l.items=o.mergeEvaluated.items(c,t.items,l.items));else{let t=c.var(`items`,(0,r._)`${e}.evaluated.items`);l.items=o.mergeEvaluated.items(c,t,l.items,r.Name)}}}e.callRef=l,e.default=s})),sr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ar(),n=or();e.default=[`$schema`,`$id`,`$defs`,`$vocabulary`,{keyword:`$comment`},`definitions`,t.default,n.default]})),cr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=t.operators,r={maximum:{okStr:`<=`,ok:n.LTE,fail:n.GT},minimum:{okStr:`>=`,ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:`<`,ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:`>`,ok:n.GT,fail:n.LTE}};e.default={keyword:Object.keys(r),type:`number`,schemaType:`number`,$data:!0,error:{message:({keyword:e,schemaCode:n})=>(0,t.str)`must be ${r[e].okStr} ${n}`,params:({keyword:e,schemaCode:n})=>(0,t._)`{comparison: ${r[e].okStr}, limit: ${n}}`},code(e){let{keyword:n,data:i,schemaCode:a}=e;e.fail$data((0,t._)`${i} ${r[n].fail} ${a} || isNaN(${i})`)}}})),lr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn();e.default={keyword:`multipleOf`,type:`number`,schemaType:`number`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,t._)`{multipleOf: ${e}}`},code(e){let{gen:n,data:r,schemaCode:i,it:a}=e,o=a.opts.multipleOfPrecision,s=n.let(`res`),c=o?(0,t._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${o}`:(0,t._)`${s} !== parseInt(${s})`;e.fail$data((0,t._)`(${i} === 0 || (${s} = ${r}/${i}, ${c}))`)}}})),ur=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(e){let t=e.length,n=0,r=0,i;for(;r<t;)n++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<t&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return n}e.default=t,t.code=`require("ajv/dist/runtime/ucs2length").default`})),dr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=On(),r=ur();e.default={keyword:[`maxLength`,`minLength`],type:`string`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxLength`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} characters`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:i,data:a,schemaCode:o,it:s}=e,c=i===`maxLength`?t.operators.GT:t.operators.LT,l=s.opts.unicode===!1?(0,t._)`${a}.length`:(0,t._)`${(0,n.useFunc)(e.gen,r.default)}(${a})`;e.fail$data((0,t._)`${l} ${c} ${o}`)}}})),fr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=In(),n=On(),r=Dn();e.default={keyword:`pattern`,type:`string`,schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,r._)`{pattern: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e,u=l.opts.unicodeRegExp?`u`:``;if(o){let{regExp:t}=l.opts.code,o=t.code===`new RegExp`?(0,r._)`new RegExp`:(0,n.useFunc)(i,t),s=i.let(`valid`);i.try(()=>i.assign(s,(0,r._)`${o}(${c}, ${u}).test(${a})`),()=>i.assign(s,!1)),e.fail$data((0,r._)`!${s}`)}else{let n=(0,t.usePattern)(e,s);e.fail$data((0,r._)`!${n}.test(${a})`)}}}})),pr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn();e.default={keyword:[`maxProperties`,`minProperties`],type:`object`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxProperties`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} properties`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxProperties`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`Object.keys(${r}).length ${a} ${i}`)}}})),mr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=In(),n=Dn(),r=On();e.default={keyword:`required`,type:`object`,schemaType:`array`,$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:i,schema:a,schemaCode:o,data:s,$data:c,it:l}=e,{opts:u}=l;if(!c&&a.length===0)return;let d=a.length>=u.loopRequired;if(l.allErrors?f():p(),u.strictRequired){let t=e.parentSchema.properties,{definedProperties:n}=e.it;for(let e of a)if(t?.[e]===void 0&&!n.has(e)){let t=`required property "${e}" is not defined at "${l.schemaEnv.baseId+l.errSchemaPath}" (strictRequired)`;(0,r.checkStrictMode)(l,t,l.opts.strictRequired)}}function f(){if(d||c)e.block$data(n.nil,m);else for(let n of a)(0,t.checkReportMissingProp)(e,n)}function p(){let n=i.let(`missing`);if(d||c){let t=i.let(`valid`,!0);e.block$data(t,()=>h(n,t)),e.ok(t)}else i.if((0,t.checkMissingProp)(e,a,n)),(0,t.reportMissingProp)(e,n),i.else()}function m(){i.forOf(`prop`,o,n=>{e.setParams({missingProperty:n}),i.if((0,t.noPropertyInData)(i,s,n,u.ownProperties),()=>e.error())})}function h(r,a){e.setParams({missingProperty:r}),i.forOf(r,o,()=>{i.assign(a,(0,t.propertyInData)(i,s,r,u.ownProperties)),i.if((0,n.not)(a),()=>{e.error(),i.break()})},n.nil)}}}})),hr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn();e.default={keyword:[`maxItems`,`minItems`],type:`array`,schemaType:`number`,$data:!0,error:{message({keyword:e,schemaCode:n}){let r=e===`maxItems`?`more`:`fewer`;return(0,t.str)`must NOT have ${r} than ${n} items`},params:({schemaCode:e})=>(0,t._)`{limit: ${e}}`},code(e){let{keyword:n,data:r,schemaCode:i}=e,a=n===`maxItems`?t.operators.GT:t.operators.LT;e.fail$data((0,t._)`${r}.length ${a} ${i}`)}}})),gr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=zn();t.code=`require("ajv/dist/runtime/equal").default`,e.default=t})),_r=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Pn(),n=Dn(),r=On(),i=gr();e.default={keyword:`uniqueItems`,type:`array`,schemaType:`boolean`,$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:a,data:o,$data:s,schema:c,parentSchema:l,schemaCode:u,it:d}=e;if(!s&&!c)return;let f=a.let(`valid`),p=l.items?(0,t.getSchemaTypes)(l.items):[];e.block$data(f,m,(0,n._)`${u} === false`),e.ok(f);function m(){let t=a.let(`i`,(0,n._)`${o}.length`),r=a.let(`j`);e.setParams({i:t,j:r}),a.assign(f,!0),a.if((0,n._)`${t} > 1`,()=>(h()?g:_)(t,r))}function h(){return p.length>0&&!p.some(e=>e===`object`||e===`array`)}function g(r,i){let s=a.name(`item`),c=(0,t.checkDataTypes)(p,s,d.opts.strictNumbers,t.DataType.Wrong),l=a.const(`indices`,(0,n._)`{}`);a.for((0,n._)`;${r}--;`,()=>{a.let(s,(0,n._)`${o}[${r}]`),a.if(c,(0,n._)`continue`),p.length>1&&a.if((0,n._)`typeof ${s} == "string"`,(0,n._)`${s} += "_"`),a.if((0,n._)`typeof ${l}[${s}] == "number"`,()=>{a.assign(i,(0,n._)`${l}[${s}]`),e.error(),a.assign(f,!1).break()}).code((0,n._)`${l}[${s}] = ${r}`)})}function _(t,s){let c=(0,r.useFunc)(a,i.default),l=a.name(`outer`);a.label(l).for((0,n._)`;${t}--;`,()=>a.for((0,n._)`${s} = ${t}; ${s}--;`,()=>a.if((0,n._)`${c}(${o}[${t}], ${o}[${s}])`,()=>{e.error(),a.assign(f,!1).break(l)})))}}}})),vr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=On(),r=gr();e.default={keyword:`const`,$data:!0,error:{message:`must be equal to constant`,params:({schemaCode:e})=>(0,t._)`{allowedValue: ${e}}`},code(e){let{gen:i,data:a,$data:o,schemaCode:s,schema:c}=e;o||c&&typeof c==`object`?e.fail$data((0,t._)`!${(0,n.useFunc)(i,r.default)}(${a}, ${s})`):e.fail((0,t._)`${c} !== ${a}`)}}})),yr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=On(),r=gr();e.default={keyword:`enum`,schemaType:`array`,$data:!0,error:{message:`must be equal to one of the allowed values`,params:({schemaCode:e})=>(0,t._)`{allowedValues: ${e}}`},code(e){let{gen:i,data:a,$data:o,schema:s,schemaCode:c,it:l}=e;if(!o&&s.length===0)throw Error(`enum must have non-empty array`);let u=s.length>=l.opts.loopEnum,d,f=()=>d??=(0,n.useFunc)(i,r.default),p;if(u||o)p=i.let(`valid`),e.block$data(p,m);else{if(!Array.isArray(s))throw Error(`ajv implementation error`);let e=i.const(`vSchema`,c);p=(0,t.or)(...s.map((t,n)=>h(e,n)))}e.pass(p);function m(){i.assign(p,!1),i.forOf(`v`,c,e=>i.if((0,t._)`${f()}(${a}, ${e})`,()=>i.assign(p,!0).break()))}function h(e,n){let r=s[n];return typeof r==`object`&&r?(0,t._)`${f()}(${a}, ${e}[${n}])`:(0,t._)`${a} === ${r}`}}}})),br=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=cr(),n=lr(),r=dr(),i=fr(),a=pr(),o=mr(),s=hr(),c=_r(),l=vr(),u=yr();e.default=[t.default,n.default,r.default,i.default,a.default,o.default,s.default,c.default,{keyword:`type`,schemaType:[`string`,`array`]},{keyword:`nullable`,schemaType:`boolean`},l.default,u.default]})),xr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;var t=Dn(),n=On(),r={keyword:`additionalItems`,type:`array`,schemaType:[`boolean`,`object`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:r}=e,{items:a}=t;if(!Array.isArray(a)){(0,n.checkStrictMode)(r,`"additionalItems" is ignored when "items" is not an array of schemas`);return}i(e,a)}};function i(e,r){let{gen:i,schema:a,data:o,keyword:s,it:c}=e;c.items=!0;let l=i.const(`len`,(0,t._)`${o}.length`);if(a===!1)e.setParams({len:r.length}),e.pass((0,t._)`${l} <= ${r.length}`);else if(typeof a==`object`&&!(0,n.alwaysValidSchema)(c,a)){let n=i.var(`valid`,(0,t._)`${l} <= ${r.length}`);i.if((0,t.not)(n),()=>u(n)),e.ok(n)}function u(a){i.forRange(`i`,r.length,l,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:n.Type.Num},a),c.allErrors||i.if((0,t.not)(a),()=>i.break())})}}e.validateAdditionalItems=i,e.default=r})),Sr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;var t=Dn(),n=On(),r=In(),i={keyword:`items`,type:`array`,schemaType:[`object`,`array`,`boolean`],before:`uniqueItems`,code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return a(e,`additionalItems`,t);i.items=!0,!(0,n.alwaysValidSchema)(i,t)&&e.ok((0,r.validateArray)(e))}};function a(e,r,i=e.schema){let{gen:a,parentSchema:o,data:s,keyword:c,it:l}=e;f(o),l.opts.unevaluated&&i.length&&l.items!==!0&&(l.items=n.mergeEvaluated.items(a,i.length,l.items));let u=a.name(`valid`),d=a.const(`len`,(0,t._)`${s}.length`);i.forEach((r,i)=>{(0,n.alwaysValidSchema)(l,r)||(a.if((0,t._)`${d} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))});function f(e){let{opts:t,errSchemaPath:a}=l,o=i.length,s=o===e.minItems&&(o===e.maxItems||e[r]===!1);if(t.strictTuples&&!s){let e=`"${c}" is ${o}-tuple, but minItems or maxItems/${r} are not specified or different at path "${a}"`;(0,n.checkStrictMode)(l,e,t.strictTuples)}}}e.validateTuple=a,e.default=i})),Cr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Sr();e.default={keyword:`prefixItems`,type:`array`,schemaType:[`array`],before:`uniqueItems`,code:e=>(0,t.validateTuple)(e,`items`)}})),wr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=On(),r=In(),i=xr();e.default={keyword:`items`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,error:{message:({params:{len:e}})=>(0,t.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,t._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:a,it:o}=e,{prefixItems:s}=a;o.items=!0,!(0,n.alwaysValidSchema)(o,t)&&(s?(0,i.validateAdditionalItems)(e,s):e.ok((0,r.validateArray)(e)))}}})),Tr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=On();e.default={keyword:`contains`,type:`array`,schemaType:[`object`,`boolean`],before:`uniqueItems`,trackErrors:!0,error:{message:({params:{min:e,max:n}})=>n===void 0?(0,t.str)`must contain at least ${e} valid item(s)`:(0,t.str)`must contain at least ${e} and no more than ${n} valid item(s)`,params:({params:{min:e,max:n}})=>n===void 0?(0,t._)`{minContains: ${e}}`:(0,t._)`{minContains: ${e}, maxContains: ${n}}`},code(e){let{gen:r,schema:i,parentSchema:a,data:o,it:s}=e,c,l,{minContains:u,maxContains:d}=a;s.opts.next?(c=u===void 0?1:u,l=d):c=1;let f=r.const(`len`,(0,t._)`${o}.length`);if(e.setParams({min:c,max:l}),l===void 0&&c===0){(0,n.checkStrictMode)(s,`"minContains" == 0 without "maxContains": "contains" keyword ignored`);return}if(l!==void 0&&c>l){(0,n.checkStrictMode)(s,`"minContains" > "maxContains" is always invalid`),e.fail();return}if((0,n.alwaysValidSchema)(s,i)){let n=(0,t._)`${f} >= ${c}`;l!==void 0&&(n=(0,t._)`${n} && ${f} <= ${l}`),e.pass(n);return}s.items=!0;let p=r.name(`valid`);l===void 0&&c===1?h(p,()=>r.if(p,()=>r.break())):c===0?(r.let(p,!0),l!==void 0&&r.if((0,t._)`${o}.length > 0`,m)):(r.let(p,!1),m()),e.result(p,()=>e.reset());function m(){let e=r.name(`_valid`),t=r.let(`count`,0);h(e,()=>r.if(e,()=>g(t)))}function h(t,i){r.forRange(`i`,0,f,r=>{e.subschema({keyword:`contains`,dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){r.code((0,t._)`${e}++`),l===void 0?r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0).break()):(r.if((0,t._)`${e} > ${l}`,()=>r.assign(p,!1).break()),c===1?r.assign(p,!0):r.if((0,t._)`${e} >= ${c}`,()=>r.assign(p,!0)))}}}})),Er=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;var t=Dn(),n=On(),r=In();e.error={message:({params:{property:e,depsCount:n,deps:r}})=>{let i=n===1?`property`:`properties`;return(0,t.str)`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:n,deps:r,missingProperty:i}})=>(0,t._)`{property: ${e},
|
|
7
|
-
missingProperty: ${i},
|
|
8
|
-
depsCount: ${n},
|
|
9
|
-
deps: ${r}}`};var i={keyword:`dependencies`,type:`object`,schemaType:`object`,error:e.error,code(e){let[t,n]=a(e);o(e,t),s(e,n)}};function a({schema:e}){let t={},n={};for(let r in e){if(r===`__proto__`)continue;let i=Array.isArray(e[r])?t:n;i[r]=e[r]}return[t,n]}function o(e,n=e.schema){let{gen:i,data:a,it:o}=e;if(Object.keys(n).length===0)return;let s=i.let(`missing`);for(let c in n){let l=n[c];if(l.length===0)continue;let u=(0,r.propertyInData)(i,a,c,o.opts.ownProperties);e.setParams({property:c,depsCount:l.length,deps:l.join(`, `)}),o.allErrors?i.if(u,()=>{for(let t of l)(0,r.checkReportMissingProp)(e,t)}):(i.if((0,t._)`${u} && (${(0,r.checkMissingProp)(e,l,s)})`),(0,r.reportMissingProp)(e,s),i.else())}}e.validatePropertyDeps=o;function s(e,t=e.schema){let{gen:i,data:a,keyword:o,it:s}=e,c=i.name(`valid`);for(let l in t)(0,n.alwaysValidSchema)(s,t[l])||(i.if((0,r.propertyInData)(i,a,l,s.opts.ownProperties),()=>{let t=e.subschema({keyword:o,schemaProp:l},c);e.mergeValidEvaluated(t,c)},()=>i.var(c,!0)),e.ok(c))}e.validateSchemaDeps=s,e.default=i})),Dr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=On();e.default={keyword:`propertyNames`,type:`object`,schemaType:[`object`,`boolean`],error:{message:`property name must be valid`,params:({params:e})=>(0,t._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:r,schema:i,data:a,it:o}=e;if((0,n.alwaysValidSchema)(o,i))return;let s=r.name(`valid`);r.forIn(`key`,a,n=>{e.setParams({propertyName:n}),e.subschema({keyword:`propertyNames`,data:n,dataTypes:[`string`],propertyName:n,compositeRule:!0},s),r.if((0,t.not)(s),()=>{e.error(!0),o.allErrors||r.break()})}),e.ok(s)}}})),Or=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=In(),n=Dn(),r=kn(),i=On();e.default={keyword:`additionalProperties`,type:[`object`],schemaType:[`boolean`,`object`],allowUndefined:!0,trackErrors:!0,error:{message:`must NOT have additional properties`,params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:a,schema:o,parentSchema:s,data:c,errsCount:l,it:u}=e;if(!l)throw Error(`ajv implementation error`);let{allErrors:d,opts:f}=u;if(u.props=!0,f.removeAdditional!==`all`&&(0,i.alwaysValidSchema)(u,o))return;let p=(0,t.allSchemaProperties)(s.properties),m=(0,t.allSchemaProperties)(s.patternProperties);h(),e.ok((0,n._)`${l} === ${r.default.errors}`);function h(){a.forIn(`key`,c,e=>{!p.length&&!m.length?v(e):a.if(g(e),()=>v(e))})}function g(r){let o;if(p.length>8){let e=(0,i.schemaRefOrVal)(u,s.properties,`properties`);o=(0,t.isOwnProperty)(a,e,r)}else o=p.length?(0,n.or)(...p.map(e=>(0,n._)`${r} === ${e}`)):n.nil;return m.length&&(o=(0,n.or)(o,...m.map(i=>(0,n._)`${(0,t.usePattern)(e,i)}.test(${r})`))),(0,n.not)(o)}function _(e){a.code((0,n._)`delete ${c}[${e}]`)}function v(t){if(f.removeAdditional===`all`||f.removeAdditional&&o===!1){_(t);return}if(o===!1){e.setParams({additionalProperty:t}),e.error(),d||a.break();return}if(typeof o==`object`&&!(0,i.alwaysValidSchema)(u,o)){let r=a.name(`valid`);f.removeAdditional===`failing`?(y(t,r,!1),a.if((0,n.not)(r),()=>{e.reset(),_(t)})):(y(t,r),d||a.if((0,n.not)(r),()=>a.break()))}}function y(t,n,r){let a={keyword:`additionalProperties`,dataProp:t,dataPropType:i.Type.Str};r===!1&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,n)}}}})),kr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Hn(),n=In(),r=On(),i=Or();e.default={keyword:`properties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,parentSchema:s,data:c,it:l}=e;l.opts.removeAdditional===`all`&&s.additionalProperties===void 0&&i.default.code(new t.KeywordCxt(l,i.default,`additionalProperties`));let u=(0,n.allSchemaProperties)(o);for(let e of u)l.definedProperties.add(e);l.opts.unevaluated&&u.length&&l.props!==!0&&(l.props=r.mergeEvaluated.props(a,(0,r.toHash)(u),l.props));let d=u.filter(e=>!(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0)return;let f=a.name(`valid`);for(let t of d)p(t)?m(t):(a.if((0,n.propertyInData)(a,c,t,l.opts.ownProperties)),m(t),l.allErrors||a.else().var(f,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(f);function p(e){return l.opts.useDefaults&&!l.compositeRule&&o[e].default!==void 0}function m(t){e.subschema({keyword:`properties`,schemaProp:t,dataProp:t},f)}}}})),Ar=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=In(),n=Dn(),r=On(),i=On();e.default={keyword:`patternProperties`,type:`object`,schemaType:`object`,code(e){let{gen:a,schema:o,data:s,parentSchema:c,it:l}=e,{opts:u}=l,d=(0,t.allSchemaProperties)(o),f=d.filter(e=>(0,r.alwaysValidSchema)(l,o[e]));if(d.length===0||f.length===d.length&&(!l.opts.unevaluated||l.props===!0))return;let p=u.strictSchema&&!u.allowMatchingProperties&&c.properties,m=a.name(`valid`);l.props!==!0&&!(l.props instanceof n.Name)&&(l.props=(0,i.evaluatedPropsToName)(a,l.props));let{props:h}=l;g();function g(){for(let e of d)p&&_(e),l.allErrors?v(e):(a.var(m,!0),v(e),a.if(m))}function _(e){for(let t in p)new RegExp(e).test(t)&&(0,r.checkStrictMode)(l,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function v(r){a.forIn(`key`,s,o=>{a.if((0,n._)`${(0,t.usePattern)(e,r)}.test(${o})`,()=>{let t=f.includes(r);t||e.subschema({keyword:`patternProperties`,schemaProp:r,dataProp:o,dataPropType:i.Type.Str},m),l.opts.unevaluated&&h!==!0?a.assign((0,n._)`${h}[${o}]`,!0):!t&&!l.allErrors&&a.if((0,n.not)(m),()=>a.break())})})}}}})),jr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=On();e.default={keyword:`not`,schemaType:[`object`,`boolean`],trackErrors:!0,code(e){let{gen:n,schema:r,it:i}=e;if((0,t.alwaysValidSchema)(i,r)){e.fail();return}let a=n.name(`valid`);e.subschema({keyword:`not`,compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error())},error:{message:`must NOT be valid`}}})),Mr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default={keyword:`anyOf`,schemaType:`array`,trackErrors:!0,code:In().validateUnion,error:{message:`must match a schema in anyOf`}}})),Nr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=On();e.default={keyword:`oneOf`,schemaType:`array`,trackErrors:!0,error:{message:`must match exactly one schema in oneOf`,params:({params:e})=>(0,t._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:r,schema:i,parentSchema:a,it:o}=e;if(!Array.isArray(i))throw Error(`ajv implementation error`);if(o.opts.discriminator&&a.discriminator)return;let s=i,c=r.let(`valid`,!1),l=r.let(`passing`,null),u=r.name(`_valid`);e.setParams({passing:l}),r.block(d),e.result(c,()=>e.reset(),()=>e.error(!0));function d(){s.forEach((i,a)=>{let s;(0,n.alwaysValidSchema)(o,i)?r.var(u,!0):s=e.subschema({keyword:`oneOf`,schemaProp:a,compositeRule:!0},u),a>0&&r.if((0,t._)`${u} && ${c}`).assign(c,!1).assign(l,(0,t._)`[${l}, ${a}]`).else(),r.if(u,()=>{r.assign(c,!0),r.assign(l,a),s&&e.mergeEvaluated(s,t.Name)})})}}}})),Pr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=On();e.default={keyword:`allOf`,schemaType:`array`,code(e){let{gen:n,schema:r,it:i}=e;if(!Array.isArray(r))throw Error(`ajv implementation error`);let a=n.name(`valid`);r.forEach((n,r)=>{if((0,t.alwaysValidSchema)(i,n))return;let o=e.subschema({keyword:`allOf`,schemaProp:r},a);e.ok(a),e.mergeEvaluated(o)})}}})),Fr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=On(),r={keyword:`if`,schemaType:[`object`,`boolean`],trackErrors:!0,error:{message:({params:e})=>(0,t.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,t._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:r,parentSchema:a,it:o}=e;a.then===void 0&&a.else===void 0&&(0,n.checkStrictMode)(o,`"if" without "then" and "else" is ignored`);let s=i(o,`then`),c=i(o,`else`);if(!s&&!c)return;let l=r.let(`valid`,!0),u=r.name(`_valid`);if(d(),e.reset(),s&&c){let t=r.let(`ifClause`);e.setParams({ifClause:t}),r.if(u,f(`then`,t),f(`else`,t))}else s?r.if(u,f(`then`)):r.if((0,t.not)(u),f(`else`));e.pass(l,()=>e.error(!0));function d(){let t=e.subschema({keyword:`if`,compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}function f(n,i){return()=>{let a=e.subschema({keyword:n},u);r.assign(l,u),e.mergeValidEvaluated(a,l),i?r.assign(i,(0,t._)`${n}`):e.setParams({ifClause:n})}}}};function i(e,t){let r=e.schema[t];return r!==void 0&&!(0,n.alwaysValidSchema)(e,r)}e.default=r})),Ir=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=On();e.default={keyword:[`then`,`else`],schemaType:[`object`,`boolean`],code({keyword:e,parentSchema:n,it:r}){n.if===void 0&&(0,t.checkStrictMode)(r,`"${e}" without "if" is ignored`)}}})),Lr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=xr(),n=Cr(),r=Sr(),i=wr(),a=Tr(),o=Er(),s=Dr(),c=Or(),l=kr(),u=Ar(),d=jr(),f=Mr(),p=Nr(),m=Pr(),h=Fr(),g=Ir();function _(e=!1){let _=[d.default,f.default,p.default,m.default,h.default,g.default,s.default,c.default,o.default,l.default,u.default];return e?_.push(n.default,i.default):_.push(t.default,r.default),_.push(a.default),_}e.default=_})),Rr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn();e.default={keyword:`format`,type:[`number`,`string`],schemaType:`string`,$data:!0,error:{message:({schemaCode:e})=>(0,t.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,t._)`{format: ${e}}`},code(e,n){let{gen:r,data:i,$data:a,schema:o,schemaCode:s,it:c}=e,{opts:l,errSchemaPath:u,schemaEnv:d,self:f}=c;if(!l.validateFormats)return;a?p():m();function p(){let a=r.scopeValue(`formats`,{ref:f.formats,code:l.code.formats}),o=r.const(`fDef`,(0,t._)`${a}[${s}]`),c=r.let(`fType`),u=r.let(`format`);r.if((0,t._)`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(c,(0,t._)`${o}.type || "string"`).assign(u,(0,t._)`${o}.validate`),()=>r.assign(c,(0,t._)`"string"`).assign(u,o)),e.fail$data((0,t.or)(p(),m()));function p(){return l.strictSchema===!1?t.nil:(0,t._)`${s} && !${u}`}function m(){let e=d.$async?(0,t._)`(${o}.async ? await ${u}(${i}) : ${u}(${i}))`:(0,t._)`${u}(${i})`,r=(0,t._)`(typeof ${u} == "function" ? ${e} : ${u}.test(${i}))`;return(0,t._)`${u} && ${u} !== true && ${c} === ${n} && !${r}`}}function m(){let a=f.formats[o];if(!a){m();return}if(a===!0)return;let[s,c,p]=h(a);s===n&&e.pass(g());function m(){if(l.strictSchema===!1){f.logger.warn(e());return}throw Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}function h(e){let n=e instanceof RegExp?(0,t.regexpCode)(e):l.code.formats?(0,t._)`${l.code.formats}${(0,t.getProperty)(o)}`:void 0,i=r.scopeValue(`formats`,{key:o,ref:e,code:n});return typeof e==`object`&&!(e instanceof RegExp)?[e.type||`string`,e.validate,(0,t._)`${i}.validate`]:[`string`,e,i]}function g(){if(typeof a==`object`&&!(a instanceof RegExp)&&a.async){if(!d.$async)throw Error(`async format in sync schema`);return(0,t._)`await ${p}(${i})`}return typeof c==`function`?(0,t._)`${p}(${i})`:(0,t._)`${p}.test(${i})`}}}}})),zr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=[Rr().default]})),Br=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=[`title`,`description`,`default`,`deprecated`,`readOnly`,`writeOnly`,`examples`],e.contentVocabulary=[`contentMediaType`,`contentEncoding`,`contentSchema`]})),Vr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=sr(),n=br(),r=Lr(),i=zr(),a=Br();e.default=[t.default,n.default,(0,r.default)(),i.default,a.metadataVocabulary,a.contentVocabulary]})),Hr=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(e){e.Tag=`tag`,e.Mapping=`mapping`})(t||(e.DiscrError=t={}))})),Ur=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Dn(),n=Hr(),r=Gn(),i=Wn(),a=On();e.default={keyword:`discriminator`,type:`object`,schemaType:`object`,error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:n,tagName:r}})=>(0,t._)`{error: ${e}, tag: ${r}, tagValue: ${n}}`},code(e){let{gen:o,data:s,schema:c,parentSchema:l,it:u}=e,{oneOf:d}=l;if(!u.opts.discriminator)throw Error(`discriminator: requires discriminator option`);let f=c.propertyName;if(typeof f!=`string`)throw Error(`discriminator: requires propertyName`);if(c.mapping)throw Error(`discriminator: mapping is not supported`);if(!d)throw Error(`discriminator: requires oneOf keyword`);let p=o.let(`valid`,!1),m=o.const(`tag`,(0,t._)`${s}${(0,t.getProperty)(f)}`);o.if((0,t._)`typeof ${m} == "string"`,()=>h(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:m,tagName:f})),e.ok(p);function h(){let r=_();o.if(!1);for(let e in r)o.elseIf((0,t._)`${m} === ${e}`),o.assign(p,g(r[e]));o.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:m,tagName:f}),o.endIf()}function g(n){let r=o.name(`valid`),i=e.subschema({keyword:`oneOf`,schemaProp:n},r);return e.mergeEvaluated(i,t.Name),r}function _(){let e={},t=o(l),n=!0;for(let e=0;e<d.length;e++){let c=d[e];if(c?.$ref&&!(0,a.schemaHasRulesButRef)(c,u.self.RULES)){let e=c.$ref;if(c=r.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),c instanceof r.SchemaEnv&&(c=c.schema),c===void 0)throw new i.default(u.opts.uriResolver,u.baseId,e)}let l=c?.properties?.[f];if(typeof l!=`object`)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n&&=t||o(c),s(l,e)}if(!n)throw Error(`discriminator: "${f}" must be required`);return e;function o({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)c(e.const,t);else if(e.enum)for(let n of e.enum)c(n,t);else throw Error(`discriminator: "properties/${f}" must have "const" or "enum"`)}function c(t,n){if(typeof t!=`string`||t in e)throw Error(`discriminator: "${f}" values must be unique strings`);e[t]=n}}}}})),Wr=s({$id:()=>Kr,$schema:()=>Gr,default:()=>Zr,definitions:()=>Jr,properties:()=>Xr,title:()=>qr,type:()=>Yr}),Gr,Kr,qr,Jr,Yr,Xr,Zr,Qr=a((()=>{Gr=`http://json-schema.org/draft-07/schema#`,Kr=`http://json-schema.org/draft-07/schema#`,qr=`Core schema meta-schema`,Jr={schemaArray:{type:`array`,minItems:1,items:{$ref:`#`}},nonNegativeInteger:{type:`integer`,minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:`#/definitions/nonNegativeInteger`},{default:0}]},simpleTypes:{enum:[`array`,`boolean`,`integer`,`null`,`number`,`object`,`string`]},stringArray:{type:`array`,items:{type:`string`},uniqueItems:!0,default:[]}},Yr=[`object`,`boolean`],Xr={$id:{type:`string`,format:`uri-reference`},$schema:{type:`string`,format:`uri`},$ref:{type:`string`,format:`uri-reference`},$comment:{type:`string`},title:{type:`string`},description:{type:`string`},default:!0,readOnly:{type:`boolean`,default:!1},examples:{type:`array`,items:!0},multipleOf:{type:`number`,exclusiveMinimum:0},maximum:{type:`number`},exclusiveMaximum:{type:`number`},minimum:{type:`number`},exclusiveMinimum:{type:`number`},maxLength:{$ref:`#/definitions/nonNegativeInteger`},minLength:{$ref:`#/definitions/nonNegativeIntegerDefault0`},pattern:{type:`string`,format:`regex`},additionalItems:{$ref:`#`},items:{anyOf:[{$ref:`#`},{$ref:`#/definitions/schemaArray`}],default:!0},maxItems:{$ref:`#/definitions/nonNegativeInteger`},minItems:{$ref:`#/definitions/nonNegativeIntegerDefault0`},uniqueItems:{type:`boolean`,default:!1},contains:{$ref:`#`},maxProperties:{$ref:`#/definitions/nonNegativeInteger`},minProperties:{$ref:`#/definitions/nonNegativeIntegerDefault0`},required:{$ref:`#/definitions/stringArray`},additionalProperties:{$ref:`#`},definitions:{type:`object`,additionalProperties:{$ref:`#`},default:{}},properties:{type:`object`,additionalProperties:{$ref:`#`},default:{}},patternProperties:{type:`object`,additionalProperties:{$ref:`#`},propertyNames:{format:`regex`},default:{}},dependencies:{type:`object`,additionalProperties:{anyOf:[{$ref:`#`},{$ref:`#/definitions/stringArray`}]}},propertyNames:{$ref:`#`},const:!0,enum:{type:`array`,items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:`#/definitions/simpleTypes`},{type:`array`,items:{$ref:`#/definitions/simpleTypes`},minItems:1,uniqueItems:!0}]},format:{type:`string`},contentMediaType:{type:`string`},contentEncoding:{type:`string`},if:{$ref:`#`},then:{$ref:`#`},else:{$ref:`#`},allOf:{$ref:`#/definitions/schemaArray`},anyOf:{$ref:`#/definitions/schemaArray`},oneOf:{$ref:`#/definitions/schemaArray`},not:{$ref:`#`}},Zr={$schema:Gr,$id:Kr,title:qr,definitions:Jr,type:Yr,properties:Xr,default:!0}})),$r=o(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;var n=ir(),r=Vr(),i=Ur(),a=(Qr(),l(Wr).default),o=[`/properties`],s=`http://json-schema.org/draft-07/schema`,c=class extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,s,!1),this.refs[`http://json-schema.org/schema`]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=Hn();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=Dn();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=Un();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=Wn();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})}))(),ei=[0,1,2,3,4],ti=[1,2,3],ni={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:ei,default:1},field_radius:{type:`integer`,enum:ei,default:1},selectors_radius:{type:`integer`,enum:ei,default:1},border_width:{type:`integer`,enum:ei,default:0},depth_effect:{type:`boolean`,default:!1},noise_effect:{type:`boolean`,default:!1},fields_size:{type:`integer`,enum:ti,default:2},selectors_size:{type:`integer`,enum:ti,default:2},icon_library:{type:`string`,enum:[`pixelarticons`,`lucide`],default:`pixelarticons`}}},ri={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`}}},ii={type:`object`,properties:{title:{type:`string`},url:{type:`string`}},required:[`title`,`url`]},ai={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:``}}}}},oi={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:``}}},si={type:`object`,default:{},properties:{title:{type:`string`,default:``},description:{type:`string`,default:``},cta:{type:`array`,items:ii,default:[]}}},ci={type:`object`,default:{},properties:{hide_tavus_badge:{type:`boolean`,default:!1},logo:{type:`string`,default:``},text:{type:`string`,default:``}}},li={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:ii,default:[]},background:{type:[`object`,`null`],default:null,properties:{type:{type:`string`,enum:[`default`,`image`],default:`default`},url:{type:[`string`,`null`],default:null}}}}},ui={type:`object`,properties:{title:{type:`string`,default:``},description:{type:`string`,default:``}}},di={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:ri,style:ni,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:li,preview:ai,haircheck:oi,after_call:si,branding:ci,unavailable_screen:{type:`object`,properties:{daily_limit:ui,total_limit:ui,busy:ui,error:ui,captcha_unsupported:ui,cta:{type:`array`,items:ii}}}}},fi=hn(`Config`),pi=new $r.Ajv({useDefaults:!0,removeAdditional:`all`,strict:!1}).compile(di);function mi(e){let t=e.customization??{};return t.widget===null&&delete t.widget,t.landing_page===null&&delete t.landing_page,pi(t)||fi.warn(`Customization validation failed`,pi.errors),{...e,customization:t}}var hi=hn(`Config`);function gi(){return{is_available:!1}}var _i=280,vi=Ae(null);function yi({children:e,fallback:t}){let n=st(bt),r=n.deploymentId??``,i=n.overrideConfig,a=n.baseUrl,o=n.previewToken,s=P(()=>_n({baseUrl:a??`https://tavusapi.com`,token:o}),[a,o]),c=P(()=>Bt(null),[]),l=P(()=>Bt(null),[]),u=P(()=>Bt(!1),[]),d=P(()=>Bt(0),[]),f=N([]),p=F(()=>{let e=f.current;f.current=[];for(let t of e)t()},[]),m=F(()=>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,hi.info(`Deployment initialized`,t.deployment_id),p())}).catch(t=>{e.signal.aborted||(hi.error(`Init failed:`,t),l.value=t,u.value=!i,c.value=i||gi(),p())}),()=>{e.abort()}});let h=P(()=>Bt(null),[]);M(()=>{let e=e=>{if(!e){h.value=null;return}let t=i?wn(e,i):e;h.value=mi(t)};return e(c.peek()),c.subscribe(e)},[h,c,i]);let g=h.value!==null,[_,v]=j(`pending`);if(M(()=>{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`),_i);return()=>clearTimeout(e)},[g]),!t){if(!g)return I(k,{});let t={deploymentId:r,config:h,initError:l,configError:u,retryInit:m,client:s};return I(vi.Provider,{value:t,children:e})}let y=g?{deploymentId:r,config:h,initError:l,configError:u,retryInit:m,client:s}:null;return I(`div`,{class:`relative w-full h-full`,children:[y&&I(vi.Provider,{value:y,children:e}),_!==`done`&&I(`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 bi=Ae(null);function xi({children:e}){let{client:t}=st(vi),n=P(()=>({client:t}),[t]);return I(bi.Provider,{value:n,children:e})}function Si(e){return`init`in e}function Ci(e){return typeof e.write==`function`}function wi(e){return!!e.onMount}function Ti(e){return`v`in e||`e`in e}function Ei(e){if(`e`in e)throw e.e;return e.v}function Di(e){return typeof e?.then==`function`}function Oi(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function ki(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function Ai(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function ji(e){return!!e.INTERNAL_onInit}var Mi=(e,t,n,...r)=>n.read(...r),Ni=(e,t,n,...r)=>n.write(...r),Pi=(e,t,n)=>n.INTERNAL_onInit(t),Fi=(e,t,n,r)=>n.onMount?.call(n,r),Ii=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),ji(n)&&s(e,t,n)}return a},Li=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},Ri=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of Ai(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},zi=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(Ti(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},T=r=>{var i;if(r===n){let n=u(e,t,r);if(!Ti(n))if(Si(r))g(e,t,r,r.init);else throw Error(`no atom init`);return Ei(n)}let o=p(e,t,r);try{return Ei(o)}finally{S.delete(r),y.d.set(r,o.n),Di(y.v)&&ki(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},ee,E,D={get signal(){return ee||=new AbortController,ee.signal},get setSelf(){return!E&&Ci(n)&&(E=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),E}},te=y.n,ne=o.get(n)===te;try{let i=l(e,t,n,T,D);if(g(e,t,n,i),Di(i)){_(e,t,i,()=>ee?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){if(Oi(e))throw e;return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==te&&ne&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},Bi=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of Ai(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},Vi=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>Ei(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!Si(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}else return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},Hi=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},Ui=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),Ci(n)&&wi(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},Wi=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},Gi=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(Di(r))for(let a of o.d.keys())ki(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,Di(c)&&a(e,t,c))},Ki=(e,t,n)=>{let r=e[14];return Ei(r(e,t,n))},qi=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},Ji=(e,t,n,r)=>{let i=e[12],a=e[18],o=e[19],s=a(e,t,n).l;return s.add(r),i(e,t),()=>{s.delete(r),o(e,t,n),i(e,t)}},Yi=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},Xi=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},Zi=new WeakMap;function Qi(e){let t=Zi.get(e),n=t[24];return n?n(t,e):t}function $i(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Mi,Ni,Pi,Fi,Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,void 0,new WeakMap,Yi,Xi,[0]].map((t,n)=>e[n]||t);Zi.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var ea=0;function ta(e,t){let n=`atom${++ea}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=na,r.write=ra),t&&(r.write=t),r}function na(e){return e(this)}function ra(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}var ia;function aa(){return ia?ia():$i()}var oa;function sa(){return oa||=aa(),oa}function ca(e,t){for(var n in t)e[n]=t[n];return e}function la(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 ua(e,t){var n=t(),r=j({t:{__:n,u:t}}),i=r[0].t,a=r[1];return at(function(){i.__=n,i.u=t,da(i)&&a({t:i})},[e,n,t]),M(function(){return da(i)&&a({t:i}),e(function(){da(i)&&a({t:i})})},[e]),n}function da(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}var t,n}function fa(e){e()}function pa(e){return e}function ma(){return[!1,fa]}var ha=at;function ga(e,t){this.props=e,this.context=t}function _a(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:la(this.props,e)}function r(t){return this.shouldComponentUpdate=n,O(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(ga.prototype=new A).isPureReactComponent=!0,ga.prototype.shouldComponentUpdate=function(e,t){return la(this.props,e)||la(this.state,t)};var va=d.__b;d.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),va&&va(e)};var ya=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function ba(e){function t(t){var n=ca({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=ya,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var xa=function(e,t){return e==null?null:me(me(e).map(t))},Sa={map:xa,forEach:xa,count:function(e){return e?me(e).length:0},only:function(e){var t=me(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:me},Ca=d.__e;d.__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)}Ca(e,t,n,r)};var wa=d.unmount;function Ta(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=ca({},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 Ta(e,t,n)})),e}function Ea(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Ea(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 Da(){this.__u=0,this.o=null,this.__b=null}function Oa(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function ka(e){var t,n,r,i=null;function a(a){if(t||(t=e()).then(function(e){e&&(i=e.default||e),r=!0},function(e){n=e,r=!0}),n)throw n;if(!r)throw t;return i?O(i,a):null}return a.displayName=`Lazy`,a.__f=!0,a}function Aa(){this.i=null,this.l=null}d.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),wa&&wa(e)},(Da.prototype=new A).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=Oa(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]=Ea(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)},Da.prototype.componentWillUnmount=function(){this.o=[]},Da.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]=Ta(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&O(k,null,e.fallback);return i&&(i.__u&=-33),[O(k,null,t.__a?null:e.children),i]};var ja=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 Ma(e){return this.getChildContext=function(){return e.context},e.children}function Na(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){De(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)}}}De(O(Ma,{context:t.context},e.__v),t.v)}function Pa(e,t){var n=O(Na,{__v:e,h:t});return n.containerInfo=t,n}(Aa.prototype=new A).__a=function(e){var t=this,n=Oa(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),ja(t,e,r)):i()};n?n(a):a()}},Aa.prototype.render=function(e){this.i=null,this.l=new Map;var t=me(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},Aa.prototype.componentDidUpdate=Aa.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){ja(e,n,t)})};var Fa=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,Ia=/^(?: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]/,La=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ra=/[A-Z0-9]/g,za=typeof document<`u`,Ba=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/:/fil|che|ra/).test(e)};function Va(e,t,n){return t.__k??(t.textContent=``),De(e,t),typeof n==`function`&&n(),e?e.__c:null}function Ha(e,t,n){return Oe(e,t),typeof n==`function`&&n(),e?e.__c:null}A.prototype.isReactComponent=!0,[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(A.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ua=d.event;d.event=function(e){return Ua&&(e=Ua(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Wa,Ga={configurable:!0,get:function(){return this.class}},Ka=d.vnode;d.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||za&&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`||Ba(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:La.test(a)&&(a=s):s=a=`oninput`:i&&Ia.test(a)?a=a.replace(Ra,`-$&`).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=me(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=me(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",Ga)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Fa,Ka&&Ka(e)};var qa=d.__r;d.__r=function(e){qa&&qa(e),Wa=e.__c};var Ja=d.diffed;d.diffed=function(e){Ja&&Ja(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),Wa=null};var Ya={ReactCurrentDispatcher:{current:{readContext:function(e){return Wa.__n[e.__c].props.value},useCallback:F,useContext:st,useDebugValue:ct,useDeferredValue:pa,useEffect:M,useId:lt,useImperativeHandle:ot,useInsertionEffect:ha,useLayoutEffect:at,useMemo:P,useReducer:it,useRef:N,useState:j,useSyncExternalStore:ua,useTransition:ma}}};function Xa(e){return O.bind(null,e)}function Za(e){return!!e&&e.$$typeof===Fa}function Qa(e){return Za(e)&&e.type===k}function $a(e){return!!e&&typeof e.displayName==`string`&&e.displayName.indexOf(`Memo(`)==0}function eo(e){return Za(e)?ke.apply(null,arguments):e}function to(e){return!!e.__k&&(De(null,e),!0)}function no(e){return e&&(e.base||e.nodeType===1&&e)||null}var ro={useState:j,useId:lt,useReducer:it,useEffect:M,useLayoutEffect:at,useInsertionEffect:ha,useTransition:ma,useDeferredValue:pa,useSyncExternalStore:ua,startTransition:fa,useRef:N,useImperativeHandle:ot,useMemo:P,useCallback:F,useContext:st,useDebugValue:ct,version:`18.3.1`,Children:Sa,render:Va,hydrate:Ha,unmountComponentAtNode:to,createPortal:Pa,createElement:O,createContext:Ae,createFactory:Xa,cloneElement:eo,createRef:ae,Fragment:k,isValidElement:Za,isElement:Za,isFragment:Qa,isMemo:$a,findDOMNode:no,Component:A,PureComponent:ga,memo:_a,forwardRef:ba,flushSync:function(e,t){var n,r=d.debounceRendering;d.debounceRendering=function(e){n=e};try{var i=e(t);return n&&n(),i}finally{d.debounceRendering=r}},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:k,Suspense:Da,SuspenseList:Aa,lazy:ka,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ya},io=Ae(void 0);function ao(e){let t=st(io);return e?.store||t||sa()}function oo({children:e,store:t}){let n=N(null);return t?O(io.Provider,{value:t},e):(n.current===null&&(n.current=aa()),O(io.Provider,{value:n.current},e))}var so=e=>typeof e?.then==`function`,co=e=>{e.status||(e.status=`pending`,e.then(t=>{e.status=`fulfilled`,e.value=t},t=>{e.status=`rejected`,e.reason=t}))},lo=ro.use||(e=>{if(e.status===`pending`)throw e;if(e.status===`fulfilled`)return e.value;throw e.status===`rejected`?e.reason:(co(e),e)}),uo=new WeakMap,fo=(e,t,n)=>{let r=Qi(e),i=r[26],a=uo.get(t);return a||(a=new Promise((o,s)=>{let c=t,l=e=>t=>{c===e&&o(t)},u=e=>t=>{c===e&&s(t)},d=()=>{try{let t=n();so(t)?(uo.set(t,a),c=t,t.then(l(t),u(t)),i(r,e,t,d)):o(t)}catch(e){s(e)}};t.then(l(t),u(t)),i(r,e,t,d)}),uo.set(t,a)),a};function po(e,t){let{delay:n,unstable_promiseStatus:r=!ro.use}=t||{},i=ao(t),[[a,o,s],c]=it(t=>{let n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]),l=a;if((o!==i||s!==e)&&(c(),l=i.get(e)),M(()=>{let t=i.sub(e,()=>{if(r)try{let t=i.get(e);so(t)&&co(fo(i,t,()=>i.get(e)))}catch{}if(typeof n==`number`){console.warn(`[DEPRECATED] delay option is deprecated and will be removed in v3.
|
|
10
|
-
|
|
11
|
-
Migration guide:
|
|
12
|
-
|
|
13
|
-
Create a custom hook like the following.
|
|
14
|
-
|
|
15
|
-
function useAtomValueWithDelay<Value>(
|
|
16
|
-
atom: Atom<Value>,
|
|
17
|
-
options: { delay: number },
|
|
18
|
-
): Value {
|
|
19
|
-
const { delay } = options
|
|
20
|
-
const store = useStore(options)
|
|
21
|
-
const [value, setValue] = useState(() => store.get(atom))
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
const unsub = store.sub(atom, () => {
|
|
24
|
-
setTimeout(() => setValue(store.get(atom)), delay)
|
|
25
|
-
})
|
|
26
|
-
return unsub
|
|
27
|
-
}, [store, atom, delay])
|
|
28
|
-
return value
|
|
29
|
-
}
|
|
30
|
-
`),setTimeout(c,n);return}c()});return c(),t},[i,e,n,r]),ct(l),so(l)){let t=fo(i,l,()=>i.get(e));return r&&co(t),lo(t)}return l}function mo(e,t){let n=ao(t);return F((...t)=>n.set(e,...t),[n,e])}function L(e,t){return mo(P(()=>ta(null,(t,n,...r)=>e(t,n,...r)),[e]),t)}function ho(e,t){let n=null,r=new Map,i=new Set;function a(i){let s;if(t===void 0)s=r.get(i);else for(let[e,n]of r)if(t(e,i)){s=n;break}if(s!==void 0)if(n?.(s[1],i))a.remove(i);else return s[0];let c=e(i);return r.set(i,[c,Date.now()]),o(`CREATE`,i,c),c}function o(e,t,n){for(let r of i)r({type:e,param:t,atom:n})}return a.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),a.getParams=()=>r.keys(),a.remove=e=>{if(t===void 0){if(!r.has(e))return;let[t]=r.get(e);r.delete(e),o(`REMOVE`,e,t)}else for(let[n,[i]]of r)if(t(n,e)){r.delete(n),o(`REMOVE`,n,i);break}},a.setShouldRemove=e=>{if(n=e,n)for(let[e,[t,i]]of r)n(i,e)&&(r.delete(e),o(`REMOVE`,e,t))},a}function go(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 _o(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function vo(e){return vo=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},vo(e)}function yo(e){var t=function(e,t){if(vo(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(vo(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return vo(t)==`symbol`?t:t+``}function bo(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,yo(r.key),r)}}function xo(e,t,n){return t&&bo(e.prototype,t),n&&bo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function So(e,t){if(t&&(vo(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 Co(e){return Co=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Co(e)}function wo(e,t){return wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wo(e,t)}function To(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&&wo(e,t)}function Eo(e,t,n){return(t=yo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Do(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 R(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Do(a,r,i,o,s,`next`,e)}function s(e){Do(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Oo(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 ko(e,t){if(e){if(typeof e==`string`)return Oo(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)?Oo(e,t):void 0}}function Ao(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)||ko(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
31
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Mo,No={exports:{}},Po=function(){if(Mo)return No.exports;Mo=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)}No.exports=i,No.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):[]},No.exports}(),Fo=jo(Po),Io=Object.prototype.hasOwnProperty;function Lo(e,t,n){for(n of e.keys())if(Ro(n,t))return n}function Ro(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--&&Ro(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=Lo(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=Lo(t,i))||!Ro(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(Io.call(e,n)&&++r&&!Io.call(t,n)||!(n in t)||!Ro(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var zo={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`},Bo={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`},z={bot:`bot`,desktop:`desktop`,mobile:`mobile`,tablet:`tablet`,tv:`tv`},Vo={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`},Ho={Blink:`Blink`,EdgeHTML:`EdgeHTML`,Gecko:`Gecko`,Presto:`Presto`,Trident:`Trident`,WebKit:`WebKit`},B=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 zo[e]}static getBrowserTypeByAlias(e){return Bo[e]||``}},V=/version\/(\d+(\.?_?\d+)+)/i,Uo=[{test:[/gptbot/i],describe(e){let t={name:`GPTBot`},n=B.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe(e){let t={name:`ChatGPT-User`},n=B.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe(e){let t={name:`OAI-SearchBot`},n=B.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,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=B.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe(e){let t={name:`Omgilibot`},n=B.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe(e){let t={name:`Diffbot`},n=B.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe(e){let t={name:`PerplexityBot`},n=B.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe(e){let t={name:`Perplexity-User`},n=B.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe(e){let t={name:`YouBot`},n=B.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe(e){let t={name:`Meta-WebIndexer`},n=B.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe(e){let t={name:`Meta-ExternalAds`},n=B.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe(e){let t={name:`Meta-ExternalAgent`},n=B.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe(e){let t={name:`Meta-ExternalFetcher`},n=B.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe(e){let t={name:`Googlebot`},n=B.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe(e){let t={name:`Linespider`},n=B.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe(e){let t={name:`AmazonBot`},n=B.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe(e){let t={name:`BingCrawler`},n=B.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe(e){let t={name:`BaiduSpider`},n=B.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe(e){let t={name:`DuckDuckBot`},n=B.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe(e){let t={name:`InternetArchiveCrawler`},n=B.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,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=B.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,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=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:`Opera`},n=B.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:`Samsung Internet for Android`},n=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){let t={name:`Pale Moon`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:`MZ Browser`},n=B.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:`Focus`},n=B.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:`Swing`},n=B.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:`Opera Coast`},n=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:`Yandex Browser`},n=B.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:`UC Browser`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:`Maxthon`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:`Epiphany`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:`Puffin`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:`Sleipnir`},n=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:`WeChat`},n=B.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,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=B.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:`Internet Explorer`},n=B.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:`Microsoft Edge`},n=B.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=B.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:`Vivaldi`},n=B.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:`SeaMonkey`},n=B.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:`Sailfish`},n=B.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=B.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:`PhantomJS`},n=B.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:`SlimerJS`},n=B.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=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:`Tizen`},n=B.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:`QupZilla`},n=B.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe(e){let t={name:`LibreWolf`},n=B.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=B.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=B.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=B.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=B.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=B.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=B.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=B.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=B.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:`Chrome`},n=B.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=B.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=B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:`PlayStation 4`},n=B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:`Safari`},n=B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:B.getFirstMatch(t,e),version:B.getSecondMatch(t,e)}}}],Wo=[{test:[/Roku\/DVP/],describe(e){let t=B.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Vo.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=B.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Vo.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=B.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=B.getWindowsVersionName(t);return{name:Vo.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:Vo.iOS},n=B.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=B.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=B.getMacOSVersionName(t),r={name:Vo.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=B.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:Vo.iOS,version:t}}},{test:[/OpenHarmony/i],describe(e){let t=B.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:Vo.HarmonyOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=B.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=B.getAndroidVersionName(t),r={name:Vo.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=B.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Vo.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=B.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||B.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||B.getFirstMatch(/\bbb(\d+)/i,e);return{name:Vo.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=B.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Vo.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=B.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Vo.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Vo.Linux})},{test:[/CrOS/],describe:()=>({name:Vo.ChromeOS})},{test:[/PlayStation 4/],describe(e){let t=B.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Vo.PlayStation4,version:t}}}],Go=[{test:[/googlebot/i],describe:()=>({type:z.bot,vendor:`Google`})},{test:[/linespider/i],describe:()=>({type:z.bot,vendor:`Line`})},{test:[/amazonbot/i],describe:()=>({type:z.bot,vendor:`Amazon`})},{test:[/gptbot/i],describe:()=>({type:z.bot,vendor:`OpenAI`})},{test:[/chatgpt-user/i],describe:()=>({type:z.bot,vendor:`OpenAI`})},{test:[/oai-searchbot/i],describe:()=>({type:z.bot,vendor:`OpenAI`})},{test:[/baiduspider/i],describe:()=>({type:z.bot,vendor:`Baidu`})},{test:[/bingbot/i],describe:()=>({type:z.bot,vendor:`Bing`})},{test:[/duckduckbot/i],describe:()=>({type:z.bot,vendor:`DuckDuckGo`})},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:()=>({type:z.bot,vendor:`Anthropic`})},{test:[/omgilibot/i,/webzio-extended/i],describe:()=>({type:z.bot,vendor:`Webz.io`})},{test:[/diffbot/i],describe:()=>({type:z.bot,vendor:`Diffbot`})},{test:[/perplexitybot/i],describe:()=>({type:z.bot,vendor:`Perplexity AI`})},{test:[/perplexity-user/i],describe:()=>({type:z.bot,vendor:`Perplexity AI`})},{test:[/youbot/i],describe:()=>({type:z.bot,vendor:`You.com`})},{test:[/ia_archiver/i],describe:()=>({type:z.bot,vendor:`Internet Archive`})},{test:[/meta-webindexer/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/meta-externalads/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/meta-externalagent/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/meta-externalfetcher/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/slackbot/i,/slack-imgProxy/i],describe:()=>({type:z.bot,vendor:`Slack`})},{test:[/yahoo/i],describe:()=>({type:z.bot,vendor:`Yahoo`})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({type:z.bot,vendor:`Yandex`})},{test:[/pingdom/i],describe:()=>({type:z.bot,vendor:`Pingdom`})},{test:[/huawei/i],describe(e){let t=B.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:z.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:z.tablet,vendor:`Nexus`})},{test:[/ipad/i],describe:()=>({type:z.tablet,vendor:`Apple`,model:`iPad`})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:z.tablet,vendor:`Apple`,model:`iPad`})},{test:[/kftt build/i],describe:()=>({type:z.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`})},{test:[/silk/i],describe:()=>({type:z.tablet,vendor:`Amazon`})},{test:[/tablet(?! pc)/i],describe:()=>({type:z.tablet})},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=B.getFirstMatch(/(ipod|iphone)/i,e);return{type:z.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:z.mobile,vendor:`Nexus`})},{test:[/Nokia/i],describe(e){let t=B.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:z.mobile,vendor:`Nokia`};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:()=>({type:z.mobile})},{test:e=>e.getBrowserName(!0)===`blackberry`,describe:()=>({type:z.mobile,vendor:`BlackBerry`})},{test:e=>e.getBrowserName(!0)===`bada`,describe:()=>({type:z.mobile})},{test:e=>e.getBrowserName()===`windows phone`,describe:()=>({type:z.mobile,vendor:`Microsoft`})},{test(e){let t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:()=>({type:z.tablet})},{test:e=>e.getOSName(!0)===`android`,describe:()=>({type:z.mobile})},{test:[/smart-?tv|smarttv/i],describe:()=>({type:z.tv})},{test:[/netcast/i],describe:()=>({type:z.tv})},{test:e=>e.getOSName(!0)===`macos`,describe:()=>({type:z.desktop,vendor:`Apple`})},{test:e=>e.getOSName(!0)===`windows`,describe:()=>({type:z.desktop})},{test:e=>e.getOSName(!0)===`linux`,describe:()=>({type:z.desktop})},{test:e=>e.getOSName(!0)===`playstation 4`,describe:()=>({type:z.tv})},{test:e=>e.getOSName(!0)===`roku`,describe:()=>({type:z.tv})}],Ko=[{test:e=>e.getBrowserName(!0)===`microsoft edge`,describe(e){if(/\sedg\//i.test(e))return{name:Ho.Blink};let t=B.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Ho.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:Ho.Trident},n=B.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){let t={name:Ho.Presto},n=B.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:Ho.Gecko},n=B.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Ho.Blink})},{test:[/(apple)?webkit/i],describe(e){let t={name:Ho.WebKit},n=B.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],qo=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=B.find(Uo,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=B.find(Wo,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=B.find(Go,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=B.find(Ko,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 B.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=B.find(e,e=>this.isOS(e));if(n){let e=this.satisfies(t[n]);if(e!==void 0)return e}let r=B.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=B.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=B.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(B.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))}},Jo=class{static getParser(e,t=!1,n=null){if(typeof e!=`string`)throw Error(`UserAgent should be a string`);return new qo(e,t,n)}static parse(e,t=null){return new qo(e,t).getResult()}static get BROWSER_MAP(){return Bo}static get ENGINE_MAP(){return Ho}static get OS_MAP(){return Vo}static get PLATFORMS_MAP(){return z}};function Yo(e){return function(e){if(Array.isArray(e))return Oo(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||ko(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
32
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Xo(){return Date.now()+Math.random().toString()}function Zo(){throw Error(`Method must be implemented in subclass`)}var Qo=[`daily.co`,`dailywebrtc.com`,`dailywebrtc.net`],$o=null;function es(){return $o}function ts(e){(e===null||Qo.includes(e))&&($o=e)}function ns(e){try{var t=new URL(e).hostname;return Qo.find(function(e){return t===e||t.endsWith(`.${e}`)})||null}catch{return null}}function rs(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)===`/`?``:`/`)+e.substring(8):e}function is(e,t){var n=Qo.find(function(t){return e.includes(t)});return n?e.replace(n,t):e}function as(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$o??Qo[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).`),is(e.callObjectBundleUrlOverride,t)):function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$o??Qo[0];if(t&&t.trim()!==``||(t=$o??Qo[0]),e!=null&&e.bundlePathOverride){var n=is(e.bundlePathOverride,t);return n.endsWith(`/`)?n.slice(0,-1):n}if(e!=null&&e.callObjectBundleUrlOverride){var r=is(e.callObjectBundleUrlOverride,t),i=r.substring(0,r.lastIndexOf(`/`));return i.endsWith(`/`)?i.slice(0,-1):i}var a=rs(`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 os(e){var t=e?.bundlePathOverride||e?.callObjectBundleUrlOverride;return!(!t||Qo.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 ss(e){try{var t=e??window.location.hostname;return Qo.find(function(e){return t===e||t.endsWith(`.${e}`)})??null}catch{return null}}function cs(e,t){var n=ns(e);if(!n||os(t))return[e];var r=$o??ss()??Qo[0];return(r===Qo[0]?Qo:[r].concat(Yo(Qo.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 ls(e){try{new URL(e)}catch{return!1}return!0}var us=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,ds=`8.55.2`,fs=globalThis;function ps(e,t,n){let r=n||fs,i=r.__SENTRY__=r.__SENTRY__||{},a=i[ds]=i[ds]||{};return a[e]||(a[e]=t())}var ms=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,hs=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],gs={};function _s(e){if(!(`console`in fs))return e();let t=fs.console,n={},r=Object.keys(gs);r.forEach(e=>{let r=gs[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}var H=ps(`logger`,function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ms?hs.forEach(n=>{t[n]=(...t)=>{e&&_s(()=>{fs.console[n](`Sentry Logger [${n}]:`,...t)})}}):hs.forEach(e=>{t[e]=()=>{}}),t}),vs=`?`,ys=/\(error: (.*)\)/,bs=/captureMessage|captureException/;function xs(e){return e[e.length-1]||{}}var Ss=`<anonymous>`;function Cs(e){try{return e&&typeof e==`function`&&e.name||Ss}catch{return Ss}}function ws(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 Ts={},Es={};function Ds(e,t){Ts[e]=Ts[e]||[],Ts[e].push(t)}function Os(e,t){if(!Es[e]){Es[e]=!0;try{t()}catch(t){ms&&H.error(`Error while instrumenting ${e}`,t)}}}function ks(e,t){let n=e&&Ts[e];if(n)for(let r of n)try{r(t)}catch(t){ms&&H.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Cs(r)}\nError:`,t)}}var As=null;function js(){As=fs.onerror,fs.onerror=function(e,t,n,r,i){return ks(`error`,{column:r,error:i,line:n,msg:e,url:t}),!!As&&As.apply(this,arguments)},fs.onerror.__SENTRY_INSTRUMENTED__=!0}var Ms=null;function Ns(){Ms=fs.onunhandledrejection,fs.onunhandledrejection=function(e){return ks(`unhandledrejection`,e),!Ms||Ms.apply(this,arguments)},fs.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ps(){return Fs(fs),fs}function Fs(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ds,t[ds]=t[ds]||{}}var Is=Object.prototype.toString;function Ls(e){switch(Is.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return qs(e,Error)}}function Rs(e,t){return Is.call(e)===`[object ${t}]`}function zs(e){return Rs(e,`ErrorEvent`)}function Bs(e){return Rs(e,`DOMError`)}function Vs(e){return Rs(e,`String`)}function Hs(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function Us(e){return e===null||Hs(e)||typeof e!=`object`&&typeof e!=`function`}function Ws(e){return Rs(e,`Object`)}function Gs(e){return typeof Event<`u`&&qs(e,Event)}function Ks(e){return!!(e&&e.then&&typeof e.then==`function`)}function qs(e,t){try{return e instanceof t}catch{return!1}}function Js(e){return!(typeof e!=`object`||!e||!e.__isVue&&!e._isVue)}var Ys=fs;function Xs(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=Zs(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 Zs(e,t){let n=e,r=[];if(!n||!n.tagName)return``;if(Ys.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&&Vs(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 Qs(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function $s(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{Js(r)?n.push(`[VueViewModel]`):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function ec(e,t,n=!1){return!!Vs(e)&&(Rs(t,`RegExp`)?t.test(e):!!Vs(t)&&(n?e===t:e.includes(t)))}function tc(e,t=[],n=!1){return t.some(t=>ec(e,t,n))}function nc(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i==`function`&&ic(i,r);try{e[t]=i}catch{ms&&H.log(`Failed to replace method "${t}" in object`,e)}}function rc(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ms&&H.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ic(e,t){try{e.prototype=t.prototype=t.prototype||{},rc(e,`__sentry_original__`,t)}catch{}}function ac(e){return e.__sentry_original__}function oc(e){if(Ls(e))return{message:e.message,name:e.name,stack:e.stack,...cc(e)};if(Gs(e)){let t={type:e.type,target:sc(e.target),currentTarget:sc(e.currentTarget),...cc(e)};return typeof CustomEvent<`u`&&qs(e,CustomEvent)&&(t.detail=e.detail),t}return e}function sc(e){try{return t=e,typeof Element<`u`&&qs(t,Element)?Xs(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}var t}function cc(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 lc(e){return uc(e,new Map)}function uc(e,t){if(function(e){if(!Ws(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]=uc(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(uc(e,t))}),r}return e}function dc(){return Date.now()/1e3}var fc=function(){let{performance:e}=fs;if(!e||!e.now)return dc;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function pc(){let e=fs,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 mc(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function hc(e){let{message:t,event_id:n}=e;if(t)return t;let r=mc(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function gc(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 _c(e,t){let n=mc(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 vc(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{rc(e,`__sentry_captured__`,!0)}catch{}return!1}var yc;function bc(e){return new Sc(t=>{t(e)})}function xc(e){return new Sc((t,n)=>{n(e)})}(()=>{let{performance:e}=fs;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`}(yc||={});var Sc=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=yc.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(yc.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(yc.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===yc.PENDING&&(Ks(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===yc.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===yc.RESOLVED&&e[1](this._value),this._state===yc.REJECTED&&e[2](this._value),!0)})}}};function Cc(e){let t=fc(),n={sid:pc(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>function(e){return lc({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&&wc(n,e),n}function wc(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||fc(),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:pc()),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 Tc(){return pc()}function Ec(){return pc().substring(16)}function Dc(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]=Dc(r[e],t[e],n-1));return r}var Oc=`_sentrySpan`;function kc(e,t){t?rc(e,Oc,t):delete e[Oc]}function Ac(e){return e[Oc]}var jc=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:Tc(),spanId:Ec()}}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,kc(t,Ac(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&&wc(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 jc?[t.getScopeData(),t.getRequestSession()]:Ws(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,kc(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Tc()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:100;if(n<=0)return this;let r={timestamp:dc(),...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:Ac(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Dc(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Ec(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:pc();if(!this._client)return H.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:pc();if(!this._client)return H.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:pc();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(H.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}},Mc=class{constructor(e,t){let n,r;n=e||new jc,r=t||new jc,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 Ks(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 Nc(){let e=Fs(Ps());return e.stack=e.stack||new Mc(ps(`defaultCurrentScope`,()=>new jc),ps(`defaultIsolationScope`,()=>new jc))}function Pc(e){return Nc().withScope(e)}function Fc(e,t){let n=Nc();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ic(e){return Nc().withScope(()=>e(Nc().getIsolationScope()))}function Lc(e){let t=Fs(e);return t.acs?t.acs:{withIsolationScope:Ic,withScope:Pc,withSetScope:Fc,withSetIsolationScope:(e,t)=>Ic(t),getCurrentScope:()=>Nc().getScope(),getIsolationScope:()=>Nc().getIsolationScope()}}function Rc(){return Lc(Ps()).getCurrentScope()}function zc(){return Lc(Ps()).getIsolationScope()}function Bc(){return Rc().getClient()}function Vc(e){let{traceId:t,spanId:n,parentSpanId:r}=e.getPropagationContext();return lc({trace_id:t,span_id:n,parent_span_id:r})}function Hc(e){let t=e._sentryMetrics;if(!t)return;let n={};for(let[,[e,r]]of t)(n[e]||(n[e]=[])).push(lc(r));return n}var Uc=/^sentry-/;function Wc(e){let t=function(e){if(!(!e||!Vs(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=Gc(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Gc(e)}(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>(t.match(Uc)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function Gc(e){return e.split(`,`).map(e=>e.split(`=`).map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var Kc=!1;function qc(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext();return lc({parent_span_id:r?t:Xc(e).parent_span_id,span_id:r?Ec():t,trace_id:n})}function Jc(e){return typeof e==`number`?Yc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Yc(e.getTime()):fc()}function Yc(e){return e>9999999999?e/1e3:e}function Xc(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 lc({span_id:t,trace_id:n,data:r,description:a,parent_span_id:s,start_timestamp:Jc(i),timestamp:Jc(o)||void 0,status:Zc(c),op:r[`sentry.op`],origin:r[`sentry.origin`],_metrics_summary:Hc(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Zc(e){if(e&&e.code!==0)return e.code===1?`ok`:e.message||`unknown_error`}function Qc(e){return e._sentryRootSpan||e}function $c(){Kc||=(_s(()=>{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 el=`production`;function tl(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=lc({environment:n.environment||el,release:n.release,public_key:r,trace_id:e});return t.emit(`createDsc`,i),i}function nl(e){let t=Bc();if(!t)return{};let n=Qc(e),r=n._frozenDsc;if(r)return r;let i=n.spanContext().traceState,a=i&&i.get(`sentry.dsc`),o=a&&Wc(a);if(o)return o;let s=tl(e.spanContext().traceId,t),c=Xc(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=Bc(),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 rl=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function il(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 al(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function ol(e){let t=typeof e==`string`?function(e){let t=rl.exec(e);if(!t)return void _s(()=>{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 al({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}(e):al(e);if(t&&function(e){if(!ms)return!0;let{port:t,projectId:n,protocol:r}=e;return!([`protocol`,`publicKey`,`host`,`projectId`].find(t=>!e[t]&&(H.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return e===`http`||e===`https`}(r)?t&&isNaN(parseInt(t,10))&&(H.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(H.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(H.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function sl(e,t=100,n=1/0){try{return ll(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function cl(e,t=3,n=102400){let r=sl(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?cl(e,t-1,n):r;var i}function ll(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(Js(t))return`[VueViewModel]`;if(Ws(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: ${Cs(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 ll(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=oc(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]=ll(e,t,c-1,r,i),d++}return o(t),u}function ul(e,t=[]){return[e,t]}function dl(e,t){let[n,r]=e;return[n,[...r,t]]}function fl(e,t){let n=e[1];for(let e of n)if(t(e,e[0].type))return!0;return!1}function pl(e){return fs.__SENTRY__&&fs.__SENTRY__.encodePolyfill?fs.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function ml(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[pl(r),e]:r.push(typeof e==`string`?pl(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(sl(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 hl(e){let t=typeof e.data==`string`?pl(e.data):e.data;return[lc({type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var gl={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 _l(e){return gl[e]}function vl(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function yl(e,t,n,r){let i=vl(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:il(r)},...i&&{trace:lc({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,ul(o,[[{type:a},e]])}function bl(e,t,n,r=0){return new Sc((i,a)=>{let o=e[r];if(t===null||typeof o!=`function`)i(t);else{let s=o({...t},n);us&&o.id&&s===null&&H.log(`Event processor "${o.id}" dropped event`),Ks(s)?s.then(t=>bl(e,t,n,r+1).then(i)).then(null,a):bl(e,s,n,r+1).then(i).then(null,a)}})}var xl,Sl,Cl;function wl(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=lc(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=lc(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=lc(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=lc(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:qc(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:nl(t),...e.sdkProcessingMetadata};let n=Xc(Qc(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 Tl(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;El(e,`extra`,n),El(e,`tags`,r),El(e,`user`,i),El(e,`contexts`,a),e.sdkProcessingMetadata=Dc(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 El(e,t,n){e[t]=Dc(e[t],n,1)}function Dl(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||pc(),timestamp:t.timestamp||dc()},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||el,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&=Qs(e.message,a);let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=Qs(o.value,a));let s=e.request;s&&s.url&&(s.url=Qs(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=fs._sentryDebugIds;if(!t)return{};let n=Object.keys(t);return Cl&&n.length===Sl||(Sl=n.length,Cl=n.reduce((n,r)=>{xl||={};let i=xl[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,xl[r]=[o,s];break}}}return n},{})),Cl}(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 jc;return n.update(t),n}(r,n.captureContext);n.mechanism&&_c(c,n.mechanism);let d=i?i.getEventProcessors():[],f=ps(`globalScope`,()=>new jc).getScopeData();a&&Tl(f,a.getScopeData()),u&&Tl(f,u.getScopeData());let p=[...n.attachments||[],...f.attachments];return p.length&&(n.attachments=p),wl(c,f),bl([...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:sl(e.data,t,n)}}))},...e.user&&{user:sl(e.user,t,n)},...e.contexts&&{contexts:sl(e.contexts,t,n)},...e.extra&&{extra:sl(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=sl(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:sl(e.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=sl(e.contexts.flags,3,n)),r}(e,o,s):e))}function Ol(e){if(e)return function(e){return e instanceof jc||typeof e==`function`}(e)||function(e){return Object.keys(e).some(e=>kl.includes(e))}(e)?{captureContext:e}:e}var kl=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`requestSession`,`propagationContext`];function Al(e,t){return Rc().captureEvent(e,t)}function jl(e){let t=Bc(),n=zc(),r=Rc(),{release:i,environment:a=el}=t&&t.getOptions()||{},{userAgent:o}=fs.navigator||{},s=Cc({release:i,environment:a,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status===`ok`&&wc(c,{status:`exited`}),Ml(),n.setSession(s),r.setSession(s),s}function Ml(){let e=zc(),t=Rc(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),wc(e,n)}(n),Nl(),e.setSession(),t.setSession()}function Nl(){let e=zc(),t=Rc(),n=Bc(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Pl(e=!1){e?Ml():Nl()}function Fl(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 Il=[];function Ll(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function Rl(e,t,n){if(n[t.name])us&&H.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Il.indexOf(t.name)===-1&&typeof t.setupOnce==`function`&&(t.setupOnce(),Il.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)}us&&H.log(`Integration installed: ${t.name}`)}}var zl=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.logLevel=t}},Bl=`Not capturing exception because it's already been captured.`,Vl=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=ol(e.dsn):us&&H.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Fl(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&&_s(()=>{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=pc();if(vc(e))return us&&H.log(Bl),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:pc(),...n},a=Hs(e)?e:String(e),o=Us(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=pc();if(t&&t.originalException&&vc(t.originalException))return us&&H.log(Bl),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),wc(e,{init:!1})):us&&H.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))):bc(!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];Rl(this,e,this._integrations),t||Ll(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=yl(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=dl(n,hl(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=vl(n);return ul({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:il(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}`;us&&H.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=>(us&&H.error(`Error while sending envelope:`,e),e)):(us&&H.error(`Transport disabled`),bc({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&Rl(e,t,n)}),n}(this,e),Ll(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)&&(wc(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Sc(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=Rc(),r=zc()){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),Dl(i,e,t,n,this,r).then(e=>e===null?e:(e.contexts={trace:Vc(n),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let n=t.getPropagationContext();return n.dsc||tl(n.traceId,e)}(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{us&&(e instanceof zl&&e.logLevel===`log`?H.log(e.message):H.warn(e))})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=Ul(e),o=Hl(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;us&&H.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),xc(new zl(`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 zl("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(Ks(e))return e.then(e=>{if(!Ws(e)&&e!==null)throw new zl(n);return e},e=>{throw new zl(`${t} rejected with ${e}`)});if(!Ws(e)&&e!==null)throw new zl(n);return e}(function(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o}=t;if(Hl(n)&&i)return i(n,r);if(Ul(n)){if(n.spans&&o){let t=[];for(let r of n.spans){let n=o(r);n?t.push(n):($c(),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 zl(`${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 zl?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new zl(`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(){us&&H.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0)return void(us&&H.log(`No outcomes to send`));if(!this._dsn)return void(us&&H.log(`No dsn provided, will not send outcomes`));us&&H.log(`Sending outcomes:`,e);let t=(n=e,ul((r=this._options.tunnel&&il(this._dsn))?{dsn:r}:{},[[{type:`client_report`},{timestamp:i||dc(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}};function Hl(e){return e.type===void 0}function Ul(e){return e.type===`transaction`}function Wl(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 xc(new zl(`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 Sc((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{bc(e).then(()=>{--i||(clearTimeout(a),n(!0))},r)})})}}}function Gl(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 Kl(e,t,n=Wl(e.bufferSize||64)){let r={};return{send:function(i){let a=[];if(fl(i,(t,n)=>{let i=_l(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=ql(t,n);e.recordDroppedEvent(`ratelimit_backoff`,i,r)}else a.push(t)}),a.length===0)return bc({});let o=ul(i[0],a),s=t=>{fl(o,(n,r)=>{let i=ql(n,r);e.recordDroppedEvent(t,_l(r),i)})};return n.add(()=>t({body:ml(o)}).then(e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&us&&H.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Gl(r,e),e),e=>{throw s(`network_error`),e})).then(e=>e,e=>{if(e instanceof zl)return us&&H.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),bc({});throw e})},flush:e=>n.drain(e)}}function ql(e,t){if(t===`event`||t===`transaction`)return Array.isArray(e)?e[1]:void 0}var Jl=100;function Yl(e,t){let n=Bc(),r=zc();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Jl}=n.getOptions();if(a<=0)return;let o={timestamp:dc(),...e},s=i?_s(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var Xl,Zl=new WeakMap,Ql=()=>({name:`FunctionToString`,setupOnce(){Xl=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=ac(this),n=Zl.has(Bc())&&t!==void 0?t:this;return Xl.apply(n,e)}}catch{}},setup(e){Zl.set(e,!0)}}),$l=[/^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$/],eu=(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)?(us&&H.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${hc(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=>tc(e,t))}(e,t.ignoreErrors)?(us&&H.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${hc(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)?(us&&H.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${hc(e)}`),!0):function(e,t){if(e.type!==`transaction`||!t||!t.length)return!1;let n=e.transaction;return!!n&&tc(n,t)}(e,t.ignoreTransactions)?(us&&H.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${hc(e)}`),!0):function(e,t){if(!t||!t.length)return!1;let n=tu(e);return!!n&&tc(n,t)}(e,t.denyUrls)?(us&&H.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${hc(e)}.\nUrl: ${tu(e)}`),!0):function(e,t){if(!t||!t.length)return!0;let n=tu(e);return!n||tc(n,t)}(e,t.allowUrls)?!1:(us&&H.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${hc(e)}.\nUrl: ${tu(e)}`),!0)}(t,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:$l],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal===void 0||e.ignoreInternal}}(e,r.getOptions()))?null:t}});function tu(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 us&&H.error(`Cannot extract url for event ${hc(e)}`),null}}function nu(e,t,n=250,r,i,a,o){if(!(a.exception&&a.exception.values&&o&&qs(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=ru(e,t,i,o.originalException,r,a.exception.values,s,0),l=n,c.map(e=>(e.value&&=Qs(e.value,l),e))))}function ru(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(qs(r[i],Error)){iu(o,s);let a=e(t,r[i]),l=c.length;au(a,i,l,s),c=ru(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,a)=>{if(qs(r,Error)){iu(o,s);let l=e(t,r),u=c.length;au(l,`errors[${a}]`,u,s),c=ru(e,t,n,r,i,[l,...c],l,u)}}),c}function iu(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 au(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 ou(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 su(){`console`in fs&&hs.forEach(function(e){e in fs.console&&nc(fs.console,e,function(t){return gs[e]=t,function(...t){ks(`console`,{args:t,level:e});let n=gs[e];n&&n.apply(fs.console,t)}})})}function cu(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var lu=()=>{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||!du(e,t)||!uu(e,t))}(e,t)||function(e,t){let n=fu(t),r=fu(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!du(e,t)||!uu(e,t))}(e,t)):!1}(t,e))return us&&H.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}};function uu(e,t){let n=ws(e),r=ws(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 du(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 fu(e){return e.exception&&e.exception.values&&e.exception.values[0]}function pu(e){return e===void 0?void 0:e>=400&&e<500?`warning`:e>=500?`error`:void 0}var mu=fs;function hu(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function gu(){if(typeof EdgeRuntime==`string`)return!0;if(!function(){if(!(`fetch`in mu))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}())return!1;if(hu(mu.fetch))return!0;let e=!1,t=mu.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=hu(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){ms&&H.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function _u(e,t){let n=`fetch`;Ds(n,e),Os(n,()=>function(e,t=!1){t&&!gu()||nc(fs,`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:yu(t),method:vu(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:yu(t),method:vu(t,`method`)?String(t.method).toUpperCase():`GET`}}(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:1e3*fc(),virtualError:r};return e||ks(`fetch`,{...o}),t.apply(fs,n).then(async t=>(e?e(t):ks(`fetch`,{...o,endTimestamp:1e3*fc(),response:t}),t),e=>{throw ks(`fetch`,{...o,endTimestamp:1e3*fc(),error:e}),Ls(e)&&e.stack===void 0&&(e.stack=r.stack,rc(e,`framesToPop`,1)),e})}})}(void 0,t))}function vu(e,t){return!!e&&typeof e==`object`&&!!e[t]}function yu(e){return typeof e==`string`?e:e?vu(e,`url`)?e.url:e.toString?e.toString():``:``}var bu=fs,xu=fs,Su=0;function Cu(){return Su>0}function wu(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(ac(e))return e}catch{return e}let n=function(...n){try{let r=n.map(e=>wu(e,t));return e.apply(this,r)}catch(e){throw Su++,setTimeout(()=>{Su--}),function(...e){let t=Lc(Ps());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&&(gc(e,void 0,void 0),_c(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),i=e,Rc().captureException(i,Ol(a))}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}ic(n,e),rc(e,`__sentry_wrapped__`,n);try{Object.getOwnPropertyDescriptor(n,`name`).configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}var Tu=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function Eu(e,t){let n=ku(e,t),r={type:Mu(t),value:Nu(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Du(e,t,n,r){let i=Bc(),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__:cl(t,a)};if(o)return{exception:{values:[Eu(e,o)]},extra:s};let c={exception:{values:[{type:Gs(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Iu(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=ku(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Ou(e,t){return{exception:{values:[Eu(e,t)]}}}function ku(e,t){let n=t.stacktrace||t.stack||``,r=function(e){return e&&Au.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 Au=/Minified React error #\d+;/i;function ju(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Mu(e){let t=e&&e.name;return!t&&ju(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function Nu(e){let t=e&&e.message;return t?t.error&&typeof t.error.message==`string`?t.error.message:ju(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:`No error message`}function Pu(e,t,n,r,i){let a;if(zs(t)&&t.error)return Ou(e,t.error);if(Bs(t)||Rs(t,`DOMException`)){let i=t;if(`stack`in t)a=Ou(e,t);else{let t=i.name||(Bs(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Fu(e,o,n,r),gc(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return Ls(t)?Ou(e,t):Ws(t)||Gs(t)?(a=Du(e,t,n,i),_c(a,{synthetic:!0}),a):(a=Fu(e,t,n,r),gc(a,`${t}`,void 0),_c(a,{synthetic:!0}),a)}function Fu(e,t,n,r){let i={};if(r&&n){let r=ku(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),_c(i,{synthetic:!0})}if(Hs(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 Iu(e,{isUnhandledRejection:t}){let n=function(e,t=40){let n=Object.keys(oc(e));n.sort();let r=n[0];if(!r)return`[object has no keys]`;if(r.length>=t)return Qs(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:Qs(r,t)}return``}(e),r=t?`promise rejection`:`exception`;return zs(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Gs(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 Lu=class extends Vl{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:ds})),version:ds},e._metadata=i})(t,`browser`,[`browser`],xu.SENTRY_SDK_SOURCE||`npm`),super(t),t.sendClientReports&&xu.document&&xu.document.addEventListener(`visibilitychange`,()=>{xu.document.visibilityState===`hidden`&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){let i=Pu(e,t,n&&n.syntheticException||void 0,r);return _c(i),i.level=`error`,n&&n.event_id&&(i.event_id=n.event_id),bc(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return function(e,t,n=`info`,r,i){let a=Fu(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),bc(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Tu&&H.warn(`SDK not enabled, will not capture user feedback.`));let t=function(e,{metadata:t,tunnel:n,dsn:r}){return ul({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:il(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)}},Ru=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,zu=fs,Bu,Vu,Hu,Uu;function Wu(){if(!zu.document)return;let e=ks.bind(null,`dom`),t=Gu(e,!0);zu.document.addEventListener(`click`,t,!1),zu.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=zu[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty(`addEventListener`)&&(nc(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=Gu(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),nc(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 Gu(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;rc(n,`_sentryCaptured`,!0),r&&!r._sentryId&&rc(r,`_sentryId`,pc());let i=n.type===`keypress`?`input`:n.type;(function(e){if(e.type!==Vu)return!1;try{if(!e.target||e.target._sentryId!==Hu)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),Vu=n.type,Hu=r?r._sentryId:void 0),clearTimeout(Bu),Bu=zu.setTimeout(()=>{Hu=void 0,Vu=void 0},1e3)}}function Ku(e){let t=`history`;Ds(t,e),Os(t,qu)}function qu(){if(!function(){let e=bu.chrome,t=e&&e.app&&e.app.runtime,n=`history`in bu&&!!bu.history.pushState&&!!bu.history.replaceState;return!t&&n}())return;let e=zu.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=Uu,t=String(n);Uu=t,ks(`history`,{from:e,to:t})}return e.apply(this,t)}}zu.onpopstate=function(...t){let n=zu.location.href,r=Uu;if(Uu=n,ks(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},nc(zu.history,`pushState`,t),nc(zu.history,`replaceState`,t)}var Ju={};function Yu(e){Ju[e]=void 0}var Xu=`__sentry_xhr_v3__`;function Zu(){if(!zu.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=1e3*fc(),a=Vs(n[0])?n[0].toUpperCase():void 0,o=function(e){if(Vs(e))return e;try{return e.toString()}catch{}}(n[1]);if(!a||!o)return e.apply(t,n);t[Xu]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[Xu];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}ks(`xhr`,{endTimestamp:1e3*fc(),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[Xu];return a&&Vs(r)&&Vs(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[Xu];return r?(n[0]!==void 0&&(r.body=n[0]),ks(`xhr`,{startTimestamp:1e3*fc(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Qu(e,t=function(e){let t=Ju[e];if(t)return t;let n=zu[e];if(hu(n))return Ju[e]=n.bind(zu);let r=zu.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){Ru&&H.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Ju[e]=n.bind(zu))}(`fetch`)){let n=0,r=0;return Kl(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 Yu(`fetch`),xc(`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 Yu(`fetch`),n-=a,r--,xc(e)}})}function $u(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?vs:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var ed=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,td=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nd=/\((\S*)(?::(\d+))(?::(\d+))\)/,rd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,id=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ad=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(`
|
|
33
|
-
`);for(let e=n;e<a.length;e++){let n=a[e];if(n.length>1024)continue;let o=ys.test(n)?n.replace(ys,`$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(xs(t).function||``)&&t.pop(),t.reverse(),bs.test(xs(t).function||``)&&(t.pop(),bs.test(xs(t).function||``)&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||xs(t).filename,function:e.function||vs}))}(i.slice(r))}}([30,e=>{let t=ed.exec(e);if(t){let[,e,n,r]=t;return $u(e,vs,+n,+r)}let n=td.exec(e);if(n){if(n[2]&&n[2].indexOf(`eval`)===0){let e=nd.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}let[e,t]=od(n[1]||vs,n[2]);return $u(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{let t=rd.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=id.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]||vs;return[n,e]=od(n,e),$u(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),od=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?vs:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},sd=1024,cd=(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`;Ds(t,e),Os(t,su)}(function(e){return function(t){if(Bc()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:cu(t.level),message:$s(t.args,` `)};if(t.level===`assert`){if(!1!==t.args[0])return;n.message=`Assertion failed: ${$s(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1)}Yl(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(Bc()!==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>sd&&(Tu&&H.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=sd),typeof a==`string`&&(a=[a]);try{let e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=Xs(t,{keyAttrs:a,maxStringLength:o}),i=function(e){if(!Ys.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}),Yl(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),Ds(`dom`,n),Os(`dom`,Wu)),t.xhr&&function(e){Ds(`xhr`,e),Os(`xhr`,Zu)}(function(e){return function(t){if(Bc()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Xu];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};Yl({category:`xhr`,data:l,type:`http`,level:pu(s)},u)}}(e)),t.fetch&&_u(function(e){return function(t){if(Bc()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||t.fetchData.method!==`POST`))if(t.error)Yl({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};Yl({category:`fetch`,data:i,type:`http`,level:pu(i.status_code)},a)}}}(e)),t.history&&Ku(function(e){return function(t){if(Bc()!==e)return;let n=t.from,r=t.to,i=ou(xu.location.href),a=n?ou(n):void 0,o=ou(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),Yl({category:`navigation`,data:{from:n,to:r}})}}(e)),t.sentry&&e.on(`beforeSendEvent`,function(e){return function(t){Bc()===e&&Yl({category:`sentry.`+(t.type===`transaction`?`transaction`:`event`),event_id:t.event_id,level:t.level,message:hc(t)},{event:t})}}(e))}}},ld=`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(`.`),ud=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:`BrowserApiErrors`,setupOnce(){t.setTimeout&&nc(xu,`setTimeout`,dd),t.setInterval&&nc(xu,`setInterval`,dd),t.requestAnimationFrame&&nc(xu,`requestAnimationFrame`,fd),t.XMLHttpRequest&&`XMLHttpRequest`in xu&&nc(XMLHttpRequest.prototype,`send`,pd);let e=t.eventTarget;e&&(Array.isArray(e)?e:ld).forEach(md)}}};function dd(e){return function(...t){let n=t[0];return t[0]=wu(n,{mechanism:{data:{function:Cs(e)},handled:!1,type:`instrument`}}),e.apply(this,t)}}function fd(e){return function(t){return e.apply(this,[wu(t,{mechanism:{data:{function:`requestAnimationFrame`,handler:Cs(e)},handled:!1,type:`instrument`}})])}}function pd(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&nc(n,e,function(t){let n={mechanism:{data:{function:e,handler:Cs(t)},handled:!1,type:`instrument`}},r=ac(t);return r&&(n.mechanism.data.handler=Cs(r)),wu(t,n)})}),e.apply(this,t)}}function md(e){let t=xu[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty(`addEventListener`)&&(nc(n,`addEventListener`,function(t){return function(n,r,i){try{typeof r.handleEvent==`function`&&(r.handleEvent=wu(r.handleEvent,{mechanism:{data:{function:`handleEvent`,handler:Cs(r),target:e},handled:!1,type:`instrument`}}))}catch{}return t.apply(this,[n,wu(r,{mechanism:{data:{function:`addEventListener`,handler:Cs(r),target:e},handled:!1,type:`instrument`}}),i])}}),nc(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 hd=()=>({name:`BrowserSession`,setupOnce(){xu.document===void 0?Tu&&H.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(jl({ignoreDuration:!0}),Pl(),Ku(({from:e,to:t})=>{e!==void 0&&e!==t&&(jl({ignoreDuration:!0}),Pl())}))}}),gd=(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`;Ds(t,e),Os(t,js)})(t=>{let{stackParser:n,attachStacktrace:r}=vd();if(Bc()!==e||Cu())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=Vs(t)&&t.length>0?t:function(){try{return Ys.document.location.href}catch{return``}}();return c.length===0&&c.push({colno:l,filename:d,function:vs,in_app:!0,lineno:u}),e}(Pu(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Al(l,{originalException:c,mechanism:{handled:!1,type:`onerror`}})})}(e),_d(`onerror`)),t.onunhandledrejection&&(function(e){(function(e){let t=`unhandledrejection`;Ds(t,e),Os(t,Ns)})(t=>{let{stackParser:n,attachStacktrace:r}=vd();if(Bc()!==e||Cu())return;let i=function(e){if(Us(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=Us(i)?{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Pu(n,i,void 0,r,!0);a.level=`error`,Al(a,{originalException:i,mechanism:{handled:!1,type:`onunhandledrejection`}})})}(e),_d(`onunhandledrejection`))}}};function _d(e){Tu&&H.log(`Global Handler attached: ${e}`)}function vd(){let e=Bc();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var yd=()=>({name:`HttpContext`,preprocessEvent(e){if(!xu.navigator&&!xu.location&&!xu.document)return;let t=e.request&&e.request.url||xu.location&&xu.location.href,{referrer:n}=xu.document||{},{userAgent:r}=xu.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};e.request={...e.request,...t&&{url:t},headers:i}}}),bd=(e={})=>{let t=e.limit||5,n=e.key||`cause`;return{name:`LinkedErrors`,preprocessEvent(e,r,i){let a=i.getOptions();nu(Eu,a.stackParser,a.maxValueLength,n,t,e,r)}}},xd=`loading`,Sd=`loaded`,Cd=`joining-meeting`,wd=`joined-meeting`,Td=`left-meeting`,Ed=`error`,Dd=`unknown`,Od=`full`,kd=`base`,Ad=`iframe-ready-for-launch-config`,jd=`iframe-launch-config`,Md=`theme-updated`,Nd=`load-attempt-failed`,Pd=`loaded`,Fd=`started-camera`,Id=`camera-error`,Ld=`joining-meeting`,Rd=`joined-meeting`,zd=`left-meeting`,Bd=`participant-joined`,Vd=`participant-updated`,Hd=`participant-left`,Ud=`participant-counts-updated`,Wd=`access-state-updated`,Gd=`meeting-session-summary-updated`,Kd=`meeting-session-state-updated`,qd=`waiting-participant-added`,Jd=`waiting-participant-updated`,Yd=`waiting-participant-removed`,Xd=`transcription-started`,Zd=`transcription-stopped`,Qd=`transcription-error`,$d=`recording-started`,ef=`recording-stopped`,tf=`recording-stats`,nf=`recording-error`,rf=`recording-upload-completed`,af=`recording-data`,of=`app-message`,sf=`transcription-message`,cf=`remote-media-player-started`,lf=`remote-media-player-updated`,uf=`remote-media-player-stopped`,df=`local-screen-share-started`,ff=`local-screen-share-stopped`,pf=`local-screen-share-canceled`,mf=`active-speaker-change`,hf=`active-speaker-mode-change`,gf=`network-quality-change`,_f=`network-connection`,vf=`cpu-load-change`,yf=`face-counts-updated`,bf=`live-streaming-started`,xf=`live-streaming-updated`,Sf=`live-streaming-stopped`,Cf=`live-streaming-error`,wf=`lang-updated`,Tf=`receive-settings-updated`,Ef=`input-settings-updated`,Df=`nonfatal-error`,Of=`error`,kf=4096,Af=102400,jf=`iframe-call-message`,Mf=`local-screen-start`,Nf=`daily-method-update-live-streaming-endpoints`,Pf=`transmit-log`,Ff=`daily-custom-track`,If={NONE:`none`,BGBLUR:`background-blur`,BGIMAGE:`background-image`,FACE_DETECTION:`face-detection`},Lf={NONE:`none`,NOISE_CANCELLATION:`noise-cancellation`},Rf={PLAY:`play`,PAUSE:`pause`},zf=`daily`,Bf=`signalwire`,Vf=[`jpg`,`png`,`jpeg`],Hf=`add-endpoints`,Uf=`remove-endpoints`,Wf=`sip-call-transfer`;function Gf(){return!Kf()&&typeof window<`u`&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:``}function Kf(){return typeof navigator<`u`&&navigator.product&&navigator.product===`ReactNative`}function qf(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Jf(){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}(ap(),op())||Kf())}function Yf(){if(Kf()||!document)return!1;var e=document.createElement(`iframe`);return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var Xf=`none`,Zf=`software`,Qf=`hardware`,$f=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?Zf:Qf:Xf}catch{return Xf}}();function ep(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!Kf()&&$f!==Xf&&(e?function(){return ip()?!1:[`Chrome`,`Firefox`].includes(ap())}():function(){if(ip())return!1;var e=ap();if(e===`Safari`){var t=up();if(t.major<15||t.major===15&&t.minor<4)return!1}return e===`Chrome`?sp().major>=77:e===`Firefox`?dp().major>=97:[`Chrome`,`Firefox`,`Safari`].includes(e)}())}function tp(){if(Kf()||rp()||typeof AudioWorkletNode>`u`)return!1;switch(ap()){case`Chrome`:case`Firefox`:return!0;case`Safari`:var e=op();return e.major>17||e.major===17&&e.minor>=4}return!1}function np(){return qf()&&typeof MediaStreamTrack<`u`&&!function(){var e,t=ap();if(!Gf())return!0;switch(t){case`Chrome`:return(e=sp()).major&&e.major>0&&e.major<75;case`Firefox`:return(e=dp()).major<91;case`Safari`:return(e=up()).major<13||e.major===13&&e.minor<1;default:return!0}}()}function rp(){return Gf().match(/Linux; Android/)}function ip(){var e,t=Gf(),n=t.match(/Mac/)&&(!Kf()&&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)||!!Gf().match(/DailyAnd\//)||void 0}function ap(){if(typeof window<`u`){var e=Gf();return cp()?`Safari`:e.indexOf(`Edge`)>-1?`Edge`:e.match(/Chrome\//)?`Chrome`:e.indexOf(`Safari`)>-1||lp()?`Safari`:e.indexOf(`Firefox`)>-1?`Firefox`:e.indexOf(`MSIE`)>-1||e.indexOf(`.NET`)>-1?`IE`:`Unknown Browser`}}function op(){switch(ap()){case`Chrome`:return sp();case`Safari`:return up();case`Firefox`:return dp();case`Edge`:return function(){var e=0,t=0;if(typeof window<`u`){var n=Gf().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}()}}function sp(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<`u`){var a=Gf(),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 cp(){return!!Gf().match(/\((iPad|iPhone|iPod)/i)&&qf()}function lp(){return Gf().indexOf(`AppleWebKit/605.1.15`)>-1}function up(){var e=0,t=0,n=0;if(typeof window<`u`){var r=Gf().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else(cp()||lp())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function dp(){var e=0,t=0;if(typeof window<`u`){var n=Gf().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var fp=function(){return xo(function e(){_o(this,e)},[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){Zo()}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){Zo()}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){Zo()}},{key:`sendMessageToDailyJs`,value:function(e,t){Zo()}},{key:`removeListener`,value:function(e){Zo()}}])}();function pp(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 mp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pp(Object(n),!0).forEach(function(t){Eo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function hp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hp=function(){return!!e})()}var gp=function(){function e(){var t,n,r,i;return _o(this,e),n=this,r=Co(r=e),(t=So(n,hp()?Reflect.construct(r,i||[],Co(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return To(e,fp),xo(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=mp({},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!==jf||!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=mp({},e);if(i.what=jf,i.from=`module`,i.callClientId=n,t){var a=Xo();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=jf,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=mp({},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 _p(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 vp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vp=function(){return!!e})()}var yp=function(){function e(){var t,n,r,i;return _o(this,e),n=this,r=Co(r=e),t=So(n,vp()?Reflect.construct(r,i||[],Co(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new Po.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new Po.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return To(e,fp),xo(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?_p(Object(n),!0).forEach(function(t){Eo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);if(a.callClientId=n,r){var o=Xo();this._messageCallbacks[o]=r,a.callbackStamp=o}t.emit(`message`,a)}}])}(),bp=`replace`,xp=`shallow-merge`,Sp=[bp,xp],Cp=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?bp:r;_o(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return xo(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===xp}},{key:`_validateMergeStrategy`,value:function(e){if(!Sp.includes(e))throw Error(`Unrecognized mergeStrategy provided. Options are: [${Sp}]`)}},{key:`_validateData`,value:function(e,t){if(!function(e){if(e==null||vo(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===bp){var r=JSON.parse(n);Ro(r,e)||console.warn(`The meeting session data provided will be modified when serialized.`,r,e)}else if(t===xp){for(var i in e)if(Object.hasOwnProperty.call(e,i)&&e[i]!==void 0){var a=JSON.parse(JSON.stringify(e[i]));Ro(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>Af)throw Error(`Meeting session data is too large (${n.length} characters). Maximum size suppported is ${Af}.`)}}])}();function wp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wp=function(){return!!e})()}function Tp(e){var t=typeof Map==`function`?new Map:void 0;return Tp=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(wp())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&wo(i,n.prototype),i}(e,arguments,Co(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),wo(n,e)},Tp(e)}function Ep(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ep=function(){return!!e})()}function Dp(e){var t=window._daily?.pendings;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}}var Op=function(){return xo(function e(t){_o(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 kp(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,ts(ns(e)),r(!1)},function(e,n){n||Dp(t._callClientId),i(e,n)}),this._currentLoad.start()}},{key:`cancel`,value:function(){this._currentLoad&&this._currentLoad.cancel(),Dp(this._callClientId)}},{key:`loaded`,get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),kp=function(){return xo(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;_o(this,e),this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._urls=function(e){if(os(e))return[as(e)];var t=$o??ss()??Qo[0];return(t===Qo[0]?Qo:[t].concat(Yo(Qo.filter(function(e){return e!==t})))).map(function(t){return as(e,t)})}(t),this._networkTimeoutMs=jp,this._passesRemaining=3,this._urlIndex=0,this._currentAttempt=null},[{key:`start`,value:function(){this._currentAttempt||this._startAttempt()}},{key:`_startAttempt`,value:function(){this._currentAttempt=new Mp(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}}])}(),Ap=function(){function e(){return _o(this,e),t=this,r=arguments,n=Co(n=e),So(t,Ep()?Reflect.construct(n,r||[],Co(t).constructor):n.apply(t,r));var t,n,r}return To(e,Tp(Error)),xo(e)}(),jp=2e4,Mp=function(){return xo(function e(t,n,r,i,a){_o(this,e),this._loadAttemptImpl=Kf()||!t.avoidEval?new Np(t,n,r,i,a):new Pp(t,n,r,i,a)},[{key:`start`,value:(e=R(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}(),Np=function(){return xo(function e(t,n,r,i,a){_o(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=R(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=R(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=R(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 Ap;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new Ap;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 Ap||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=R(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}(),Pp=function(){return xo(function e(t,n,r,i,a){_o(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=Xo(),this._networkTimeout=null,this._scriptElement=null},[{key:`start`,value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=this._url;(typeof document>`u`?`undefined`:vo(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)}}])}(),Fp=function(e,t,n){return!0===Rp(e.local,t,n)},Ip=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]},Lp=function(e,t,n,r){var i=zp(e,t,n,r);return i&&i.pendingTrack},Rp=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)},zp=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]},Bp=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function Vp(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?Ip(n,a,c):Lp(n,e.session_id,a,c);u.state===`playable`&&(u.track=d),u.persistentTrack=d}}}function Hp(e,t){try{var n=t.getState();for(var r in e.tracks)if(!Up(r)){var i=e.tracks[r].kind;if(i){var a=e.tracks[r];if(a){var o=e.local?Bp(n,r):Lp(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 Up(e){return[`video`,`audio`,`screenVideo`,`screenAudio`].includes(e)}function Wp(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&&Fp(r,e.session_id,`cam-audio`)){var o=Lp(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&&Fp(r,e.session_id,`cam-video`)){var s=Lp(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&&Fp(r,e.session_id,`screen-audio`)){var c=Lp(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&&Fp(r,e.session_id,`screen-video`)){var l=Lp(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 Gp(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 Kp(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)?Kp(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.
|
|
34
|
-
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 Kp(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 qp=new Map,Jp=null;function Yp(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 Xp(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)?Xp(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.
|
|
35
|
-
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 Xp(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 Zp=new Map,Qp=null;function $p(e){tm()?function(e){qp.has(e)||(qp.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){qp.has(e)&&(qp.get(e).lastDevicesString=JSON.stringify(t),Jp||(Jp=function(){var e=R(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=Gp(qp.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==qp.get(r).lastDevicesString&&(qp.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`,Jp)))}).catch(function(){}))}(e):function(e){Zp.has(e)||(Zp.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){Zp.has(e)&&(Zp.get(e).lastDevicesString=JSON.stringify(t),Qp||=setInterval(R(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=Yp(Zp.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==Zp.get(r).lastDevicesString&&(Zp.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}),3e3))}))}(e)}function em(e){tm()?function(e){qp.has(e)&&(qp.delete(e),qp.size===0&&Jp&&(navigator.mediaDevices.removeEventListener(`devicechange`,Jp),Jp=null))}(e):function(e){Zp.has(e)&&(Zp.delete(e),Zp.size===0&&Qp&&(clearInterval(Qp),Qp=null))}(e)}function tm(){return Kf()||navigator.mediaDevices?.ondevicechange!==void 0}var nm=new Set;function rm(e,t){var n=t.isLocalScreenVideo;return e&&e.readyState===`live`&&!function(e,t){return(!t.isLocalScreenVideo||ap()!==`Chrome`)&&e.muted&&!nm.has(e.id)}(e,{isLocalScreenVideo:n})}function im(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 am(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?im(Object(n),!0).forEach(function(t){Eo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):im(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var om=Object.freeze({VIDEO:`video`,AUDIO:`audio`,SCREEN_VIDEO:`screenVideo`,SCREEN_AUDIO:`screenAudio`,CUSTOM_VIDEO:`customVideo`,CUSTOM_AUDIO:`customAudio`}),sm=Object.freeze({PARTICIPANTS:`participants`,STREAMING:`streaming`,TRANSCRIPTION:`transcription`}),cm=Object.values(om),lm=[`v`,`a`,`sv`,`sa`,`cv`,`ca`];Object.freeze(cm.reduce(function(e,t,n){return e[t]=lm[n],e},{})),Object.freeze(lm.reduce(function(e,t,n){return e[t]=cm[n],e},{}));var um=[om.VIDEO,om.AUDIO,om.SCREEN_VIDEO,om.SCREEN_AUDIO],dm=Object.values(sm),fm=[`p`,`s`,`t`];Object.freeze(dm.reduce(function(e,t,n){return e[t]=fm[n],e},{})),Object.freeze(fm.reduce(function(e,t,n){return e[t]=dm[n],e},{}));var pm=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;_o(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return xo(e,[{key:`clone`,value:function(){var t=new e;if(this.base instanceof mm?t.base=this.base.clone():t.base=this.base,this.byUserId!==void 0)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof mm?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 mm?a.clone():a}return t}},{key:`toJSONObject`,value:function(){var e={};if(typeof this.base==`boolean`?e.base=this.base:this.base instanceof mm&&(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 mm?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 mm?i.toJSONObject():i}return e}},{key:`toMinifiedJSONObject`,value:function(){var e={};if(this.base!==void 0&&(typeof this.base==`boolean`?e.b=this.base:e.b=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 mm&&(this.base=this.base.normalize()),this.byUserId&&=Object.fromEntries(Object.entries(this.byUserId).map(function(e){var t=Ao(e,2),n=t[0],r=t[1];return[n,r instanceof mm?r.normalize():r]})),this.byParticipantId&&=Object.fromEntries(Object.entries(this.byParticipantId).map(function(e){var t=Ao(e,2),n=t[0],r=t[1];return[n,r instanceof mm?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:mm.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:mm.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:mm.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:mm.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:mm.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:mm.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:`validateJSONObject`,value:function(e){if(vo(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=Ao(mm.validateJSONObject(e.base,!0),2),o=a[0],s=a[1];if(!o)return[!1,s]}else{if(vo(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=Ao(mm.validateJSONObject(u),2),f=d[0],p=d[1];if(!f)return[!1,p]}}}return[!0]}}])}(),mm=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;_o(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=a,this.customVideo=o,this.customAudio=s}return xo(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=am({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=am({},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=am({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=am({},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=am({},this.customVideo)),this.customAudio!==void 0&&(e.ca=am({},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:am({},t.customVideo),customAudio:t.customAudio===void 0?void 0:am({},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(vo(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(!cm.includes(a))return[!1,`invalid media type '${a}' in canReceive`];if(um.includes(a)){if(typeof e[a]!=`boolean`)return[!1,`invalid (non-boolean) value for media type '${a}' in canReceive`]}else{if(vo(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!==cm.length?[!1,`canReceive "base" permission must specify all media types: ${cm.join(`, `)} (or be set to a boolean shorthand)`]:[!0]}}])}(),hm=[`result`],gm=[`preserveIframe`];function _m(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 U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?_m(Object(n),!0).forEach(function(t){Eo(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_m(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vm=function(){return!!e})()}function ym(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 bm(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)?bm(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.
|
|
36
|
-
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 bm(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 xm={},Sm=`video`,Cm=`voice`,wm=Kf()?{data:{}}:{data:{},topology:`none`},Tm={present:0,hidden:0},Em={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Dm=Object.keys(Em),Om=[`state`,`volume`,`simulcastEncodings`],km={androidInCallNotification:{title:`string`,subtitle:`string`,iconName:`string`,disableForCustomOverride:`boolean`},disableAutoDeviceManagement:{audio:`boolean`,video:`boolean`}},Am={id:{iconPath:`string`,iconPathDarkMode:`string`,label:`string`,tooltip:`string`,visualState:`'default' | 'sidebar-open' | 'active'`}},jm={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`}},Mm=/^[a-zA-Z0-9_-]+$/;function Nm(e){if(e!=null&&vo(e)===`object`&&!Array.isArray(e)){var t,n={},r=ym(Object.entries(e).slice(0,10));try{for(r.s();!(t=r.n()).done;){var i=Ao(t.value,2),a=i[0],o=i[1];typeof a!=`string`||a.length>64||Mm.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 Pm={customIntegrations:{validate:ah,help:rh()},customTrayButtons:{validate:ih,help:`customTrayButtons should be a dictionary of the type ${JSON.stringify(Am)}`},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 oh(e,km)},help:`reactNativeConfig should look like ${JSON.stringify(km)}, 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 Jm(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:Ff};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:Ff};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 vo(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 Ym(e,{allowAllParticipantsKey:!1})},help:nh({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!!Xm(e)&&(t._inputSettings||={},Zm(e,t.properties?.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:th()},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(vo(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=Ao(r[n],2),a=i[0],o=i[1];if(typeof a!=`string`||a.length>64||!Mm.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},Fm={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)||!Kf()&&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${Kf()?``:` | '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=Ao(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=ym(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=Ao(pm.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=ym(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=R(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 Im=function(){function e(t){var n,r,i,a,o,s,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(_o(this,e),i=this,a=Co(a=e),Eo(r=So(i,vm()?Reflect.construct(a,o||[],Co(i).constructor):a.apply(i,o)),`startListeningForDeviceChanges`,function(){$p(r.handleDeviceChange)}),Eo(r,`stopListeningForDeviceChanges`,function(){em(r.handleDeviceChange)}),Eo(r,`handleDeviceChange`,function(e){e=e.map(function(e){return JSON.parse(JSON.stringify(e))}),r.emitDailyJSEvent({action:`available-devices-updated`,availableDevices:e})}),Eo(r,`handleNativeAppStateChange`,function(){var e=R(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)}}()),Eo(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)))}),Eo(r,`handleNativeSystemScreenCaptureStop`,function(){r.stopScreenShare()}),!np()&&!Kf())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(xm).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=Xo(),xm[(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=Nm(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=U({},c),r.properties.aboutClient!==void 0&&(r.properties.aboutClient=Nm(r.properties.aboutClient)),r._inputSettings||={},r._callObjectLoader=r._callObjectMode?new Op(r.callClientId):null,r._callState=`new`,r._isPreparingToJoin=!1,r._accessState={access:`unknown`},r._meetingSessionSummary={},r._finalSummaryOfPrevSession={},r._meetingSessionState=uh(wm,r._callObjectMode),r._nativeInCallAudioMode=Sm,r._participants={},r._isScreenSharing=!1,r._participantCounts=Tm,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=kf,r._messageChannel=Kf()?new yp:new gp,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`}))})),Kf()){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 To(e,Fo),xo(e,[{key:`destroy`,value:(ce=R(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),Kf()){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 xm[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 ce.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 Km(),this.sendMessageToCallMachine({action:`load-css`,cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:`iframe`,value:function(){return Km(),this._iframe}},{key:`meetingState`,value:function(){return this._callState}},{key:`accessState`,value:function(){return Wm(this._callObjectMode,`accessState()`),this._accessState}},{key:`participants`,value:function(){return this._participants}},{key:`participantCounts`,value:function(){return this._participantCounts}},{key:`waitingParticipants`,value:function(){return Wm(this._callObjectMode,`waitingParticipants()`),this._waitingParticipants}},{key:`validateParticipantProperties`,value:function(e,t){for(var n in t){if(!Fm[n])throw Error(`unrecognized updateParticipant property ${n}`);if(Fm[n].validate&&!Fm[n].validate(t[n],this,this._participants[e]))throw Error(Fm[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:(se=R(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(Wm(this._callObjectMode,`updateWaitingParticipant()`),zm(this._callState,`updateWaitingParticipant()`),typeof t!=`string`||vo(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 se.apply(this,arguments)})},{key:`updateWaitingParticipants`,value:(oe=R(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Wm(this._callObjectMode,`updateWaitingParticipants()`),zm(this._callState,`updateWaitingParticipants()`),vo(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 oe.apply(this,arguments)})},{key:`requestAccess`,value:(A=R(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.access,r=n===void 0?{level:Od}:n,i=t.name,a=i===void 0?``:i;return Wm(this._callObjectMode,`requestAccess()`),zm(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 A.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&&(Kf()?(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:(k=R(function*(e){var t=this,n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,r=n!==void 0&&n;if(Wm(this._callObjectMode,`getReceiveSettings()`),!this._callMachineInitialized)return this._receiveSettings;switch(vo(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 k.apply(this,arguments)})},{key:`updateReceiveSettings`,value:(ae=R(function*(e){var t=this;if(Wm(this._callObjectMode,`updateReceiveSettings()`),!Ym(e,{allowAllParticipantsKey:!0}))throw Error(nh({allowAllParticipantsKey:!0}));return zm(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 ae.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:U({},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=U({},e.audio.processor);delete a._isDefaultWhenNone,n.audio=U(U({},n.audio),{},{processor:a})}}if(e.video){var o;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:U({},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=U({},e.video.processor);delete c._isDefaultWhenNone,n.video=U(U({},n.video),{},{processor:c})}}return n}}},{key:`getInputSettings`,value:function(){var e=this;return Km(),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=U(U({},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=U(U({},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:(ie=R(function*(e){var t=this;return Km(),Xm(e)?e.video||e.audio?(Zm(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(th()),Promise.reject(th()))}),function(e){return ie.apply(this,arguments)})},{key:`setBandwidth`,value:function(e){var t=e.kbs,n=e.trackConstraints;if(Km(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-bandwidth`,kbs:t,trackConstraints:n}),this}},{key:`getDailyLang`,value:function(){var e=this;if(Km(),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 Km(),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:(O=R(function*(){var e=this;return console.warn(`getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately`),zm(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 O.apply(this,arguments)})},{key:`meetingSessionState`,value:function(){return zm(this._callState,`meetingSessionState`),this._meetingSessionState}},{key:`setMeetingSessionData`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`replace`;Wm(this._callObjectMode,`setMeetingSessionData()`),zm(this._callState,`setMeetingSessionData`);try{(function(e,t){new Cp({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:Kf()||!!t&&!!t.thisMeetingOnly},function(e){delete e.action,delete e.callbackStamp,r(e)})})}},{key:`setUserData`,value:(re=R(function*(e){var t=this;try{Jm(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`&&!Kf())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=R(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Wm(this._callObjectMode,`startCamera()`),Vm(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=U(U({},this.properties),t)}return new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`start-camera`,properties:Rm(e.properties,e.callClientId),preloadCache:Rm(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 Km(),zm(this._callState,`startCustomTrack()`),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise(function(n,r){e._sharedTracks.customTrack=t.track,t.track=Ff,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 Km(),zm(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 qm(),Hm(this._callMachineInitialized,`setCamera()`),new Promise(function(n){t.sendMessageToCallMachine({action:`set-camera`,cameraDeviceId:e},function(e){n({device:e.device})})})}},{key:`setAudioDevice`,value:(te=R(function*(e){return qm(),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 Km(),new Promise(function(t){e.sendMessageToCallMachine({action:`cycle-mic`},function(e){t({device:e.device})})})}},{key:`getCameraFacingMode`,value:function(){var e=this;return qm(),new Promise(function(t){e.sendMessageToCallMachine({action:`get-camera-facing-mode`},function(e){t(e.facingMode)})})}},{key:`setInputDevicesAsync`,value:(D=R(function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,a=e.videoSource;if(Km(),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=Ff,o.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,o.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=Ff,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 D.apply(this,arguments)})},{key:`setOutputDeviceAsync`,value:(E=R(function*(e){var t=this,n=e.outputDeviceId;if(Km(),!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 E.apply(this,arguments)})},{key:`getInputDevices`,value:(ee=R(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 ee.apply(this,arguments)})},{key:`nativeInCallAudioMode`,value:function(){return qm(),this._nativeInCallAudioMode}},{key:`setNativeInCallAudioMode`,value:function(e){if(qm(),[Sm,Cm].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement(`audio`)&&Bm(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error(`invalid in-call audio mode specified: `,e)}},{key:`preAuth`,value:(T=R(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Wm(this._callObjectMode,`preAuth()`),Vm(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=U(U({},this.properties),t),new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`daily-method-preauth`,properties:Rm(e.properties,e.callClientId),preloadCache:Rm(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=R(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=U(U({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw Error(`can't load iframe meeting because url property isn't set`);if(this._updateCallState(xd),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(Sd),n&&t.emitDailyJSEvent({action:`loaded`}),e()},function(e,r){t.emitDailyJSEvent({action:Nd}),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:as(t.properties.dailyConfig)}}}),n(e.msg))})});var n=cs(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 TavusWidget=(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),fe(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,me(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)&&!D.__r++||s!=r.debounceRendering)&&((s=r.debounceRendering)||c)(D)}function D(){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=D.__r=0}}function ae(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=oe(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=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=se(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 oe(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=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 se(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=se(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 O(e,t){return t||=[],e==null||typeof e==`boolean`||(x(e)?e.some(function(e){O(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`||b.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(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 de(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 fe(e,t,n,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,b,w,T,ne,re,ie,D,oe,se=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 se==`function`){f=s.length;try{if(b=t.props,w=se.prototype&&se.prototype.render,T=(d=se.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 se(b,ne):(t.__c=p=new ee(b,ne),p.constructor=se,p.render=ye),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&&se.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=S({},p.__s)),S(p.__s,se.getDerivedStateFromProps(b,p.__s))),h=p.props,g=p.state,p.__v=t,m)w&&se.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),w&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(w&&se.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)),D=d!=null&&d.type===E&&d.key==null?he(d.props.children):d,c=ae(e,x(D)?D:[D],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(oe=o.length;oe--;)C(o[oe])}else t.__e=n.__e;t.__k??=n.__k||[],e.then||pe(t),r.__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,i,a,o,s,l,u);return(d=r.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 i=0;i<n.length;i++)_e(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 he(e){return typeof e!=`object`||!e||e.__b>0?e:x(e)?e.map(he):e.constructor===void 0?S({},e):null}function ge(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||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`||y[d]===h||ue(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=``),ae(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])&&ue(e,d,g,y[d],o),d=`checked`,_!=null&&_!=e[d]&&ue(e,d,_,y[d],o))}return e}function _e(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 ve(e,t,n){var i,a;if(r.unmount&&r.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||_e(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]&&ve(i[a],t,n||typeof e.type!=`function`);n||C(e.__e),e.__c=e.__=e.__e=void 0}function ye(e,t,n){return this.constructor(e,n)}function be(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=[],fe(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),me(s,e,c),e.props.children=null}function xe(e,t){be(e,t,xe)}function Se(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 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`+_++,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},D.__r=0,u=Math.random().toString(8),d=`__d`+u,f=`__a`+u,p=/(PointerCapture)$|Capture$/i,m=0,h=de(!1),g=de(!0),_=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=w(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 w(r?E:`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]=w(Pe,{name:l},c):r[a]=c}var u=!(!n||!n.shadow),d=t?w(Pe,{useFragment:!u},r):r;return!u&&t&&(e.innerHTML=``),w(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=r,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 k(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 A(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 j(e){return Ve=5,M(function(){return{current:e}},[])}function M(e,t){var n=Xe(Le++,7);return at(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function N(e,t){return Ve=8,M(function(){return e},t)}function P(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}function st(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}var ct=0;Array.isArray;function F(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:--ct,__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 lt=Ce(null);function ut(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:ft(e[`conversational-context`]),customGreeting:ft(e[`custom-greeting`]),memoryStores:pt(e[`memory-stores`]),overrideConfig:t,expandOptions:st(e[`expand-options`]),mode:n?`preview`:`production`}}function dt(e){let t=M(()=>ut({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 F(lt.Provider,{value:t,children:e.children})}function ft(e){return e?.trim()||void 0}function pt(e){let t=e?.split(`,`).map(e=>e.trim()).filter(Boolean);return t&&t.length?t:void 0}var mt=Symbol.for(`preact-signals`);function ht(){if(xt>1)xt--;else{var e,t=!1;for((function(){var e=Tt;for(Tt=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}})();bt!==void 0;){var n=bt;for(bt=void 0,St++;n!==void 0;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&At(n))try{n.c()}catch(n){t||=(e=n,!0)}n=r}}if(St=0,xt--,t)throw e}}function gt(e){if(xt>0)return e();wt=++Ct,xt++;try{return e()}finally{ht()}}var _t,vt=void 0;function yt(e){var t=vt,n=_t;vt=void 0,_t=void 0;try{return e()}finally{vt=t,_t=n}}var bt=void 0,xt=0,St=0,Ct=0,wt=0,Tt=void 0,Et=0;function Dt(e){if(vt!==void 0){var t=e.n;if(t===void 0||t.t!==vt)return t={i:0,S:e,p:vt.s,n:void 0,t:vt,e:void 0,x:void 0,r:t},vt.s!==void 0&&(vt.s.n=t),vt.s=t,e.n=t,32&vt.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=vt.s,t.n=void 0,vt.s.n=t,vt.s=t),t}}function Ot(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}Ot.prototype.brand=mt,Ot.prototype.h=function(){return!0},Ot.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?yt(function(){var e;(e=t.W)==null||e.call(t)}):n.e=e)},Ot.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&&yt(function(){var e;(e=t.Z)==null||e.call(t)}))}},Ot.prototype.subscribe=function(e){var t=this;return zt(function(){var n=t.value;yt(function(){return e(n)})},{name:`sub`})},Ot.prototype.valueOf=function(){return this.value},Ot.prototype.toString=function(){return this.value+``},Ot.prototype.toJSON=function(){return this.value},Ot.prototype.peek=function(){var e=this;return yt(function(){return e.value})},Object.defineProperty(Ot.prototype,"value",{get:function(){var e=Dt(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(St>100)throw Error(`Cycle detected`);(function(e){xt!==0&&St===0&&e.l!==wt&&(e.l=wt,Tt={S:e,v:e.v,i:e.i,o:Tt})})(this),this.v=e,this.i++,Et++,xt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ht()}}}});function kt(e,t){return new Ot(e,t)}function At(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 jt(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 Mt(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 Nt(e,t){Ot.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Et-1,this.f=4}Nt.prototype=new Ot,Nt.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Et))return!0;if(this.g=Et,this.f|=1,this.i>0&&!At(this))return this.f&=-2,!0;var e=vt;try{jt(this),vt=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 vt=e,Mt(this),this.f&=-2,!0},Nt.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)}Ot.prototype.S.call(this,e)},Nt.prototype.U=function(e){if(this.t!==void 0&&(Ot.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)}},Nt.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(Nt.prototype,"value",{get:function(){if(1&this.f)throw Error(`Cycle detected`);var e=Dt(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Pt(e,t){return new Nt(e,t)}function Ft(e){var t=e.m;if(e.m=void 0,typeof t==`function`){xt++;var n=vt;vt=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,It(e),t}finally{vt=n,ht()}}}function It(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ft(e)}function Lt(e){if(vt!==this)throw Error(`Out-of-order effect`);Mt(this),vt=e,this.f&=-2,8&this.f&&It(this),ht()}function Rt(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=t?.name,_t&&_t.push(this)}Rt.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()}},Rt.prototype.S=function(){if(1&this.f)throw Error(`Cycle detected`);this.f|=1,this.f&=-9,Ft(this),jt(this),xt++;var e=vt;return vt=this,Lt.bind(this,e)},Rt.prototype.N=function(){2&this.f||(this.f|=2,this.u=bt,bt=this)},Rt.prototype.d=function(){this.f|=8,1&this.f||It(this)},Rt.prototype.dispose=function(){this.d()};function zt(e,t){var n=new Rt(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}var Bt,Vt,Ht=typeof window<`u`&&!!window.__PREACT_SIGNALS_DEVTOOLS__,Ut=[],Wt=[];zt(function(){Bt=this.N})();function Gt(e,t){r[e]=t.bind(null,r[e]||function(){})}function Kt(e){if(Vt){var t=Vt;Vt=void 0,t()}Vt=e&&e.S()}function qt(e){var t=this,n=e.data,r=Yt(n);r.name=`ReactiveDom`,r.value=n;var i=M(function(){for(var e=t,n=t.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}var i=Pt(function(){var e=r.value.value;return e===0?0:!0===e?``:e||``}),o=Pt(function(){return!Array.isArray(i.value)&&!a(i.value)}),s=zt(function(){if(this.N=tn,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}qt.displayName=`ReactiveTextNode`,Object.defineProperties(Ot.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:qt},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),Gt(`__b`,function(e,t){if(Kt(),typeof t.type==`string`){var n,r=t.props;for(var i in r)if(i!==`children`){var a=r[i];a instanceof Ot&&(n||(t.__np=n={}),n[i]=a,r[i]=a.peek())}}e(t)}),Gt(`__r`,function(e,t){if(e(t),t.type!==E){Kt();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(e,t){var n;return zt(function(){n=this},{name:t}),n.c=e,n}(function(e){return function(){var t;Ht&&((t=this.y)==null||t.call(this)),e.__$f|=1,e.setState({})}}(r),typeof t.type==`function`?t.type.displayName||t.type.name:``))),Kt(n)}}),Gt(`__e`,function(e,t,n,r){Kt(),e(t,n,r)}),Gt(`diffed`,function(e,t){Kt();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=Jt(n,c,u,i),a[c]=l):l.o(u,i)}}e(t)});function Jt(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,a=kt(n);return{o:function(e,t){a.value=e,r=t},d:zt(function(){this.N=tn;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))})}}Gt(`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)}),Gt(`__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 Yt(e,t){return M(function(){return kt(e,t)},[])}var Xt=typeof requestAnimationFrame>`u`?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},Zt=function(e){queueMicrotask(function(){queueMicrotask(e)})};function Qt(){gt(function(){for(var e;e=Ut.shift();)Bt.call(e)})}function $t(){Ut.push(this)===1&&(r.requestAnimationFrame||Xt)(Qt)}function en(){gt(function(){for(var e;e=Wt.shift();)Bt.call(e)})}function tn(){Wt.push(this)===1&&(r.requestAnimationFrame||Zt)(en)}function nn(e,t){var n=j(e);n.current=e,A(function(){return zt(function(){return this.N=$t,n.current()},t)},[])}function rn(e){let t=`[Tavus:${e}]`;return{info:(...e)=>{},warn:(...e)=>console.warn(t,...e),error:(...e)=>console.error(t,...e)}}var an=rn(`API`);function on(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}`;an.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 an.error(`${e} ${s} → ${c.status}`,t),new sn(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 sn=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 cn(e,t,n){return e.get(`/v2/deployments/${t}/init`,n)}function ln(e,t,n={},r){return e.post(`/v2/deployments/${t}/start`,n,r)}function un(e,t,n,r){return e.post(`/v2/deployments/${t}/conversations/${n}/end`,void 0,r)}function dn(e,t,n,r){let i=`/v2/conversations/${t}/canvas/interactions`;return r?e.post(i,n,r):e.post(i,n)}function fn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function pn(e,t){let n={...e};for(let r of Object.keys(t)){let i=t[r],a=e[r];i!==void 0&&(n[r]=fn(a)&&fn(i)?pn(a,i):i)}return n}var mn=I,hn={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`]}}}}}},gn=Object.prototype.hasOwnProperty;function I(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)gn.call(hn.properties,t)||delete e[t];{let n=e.schema_version;if(typeof n!=`number`||n%1||isNaN(n))return I.errors=[{instancePath:t+`/schema_version`,schemaPath:`#/properties/schema_version/type`,keyword:`type`,params:{type:`integer`},message:`must be integer`}],!1;if(n!==1)return I.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 I.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 I.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 I.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 I.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 I.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 I.errors=[{instancePath:t+`/conversation/modality`,schemaPath:`#/properties/conversation/properties/modality/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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)gn.call(hn.properties.style.properties,e)||delete n[e];{let e=n.mode;if(typeof e!=`string`)return I.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 I.errors=[{instancePath:t+`/style/mode`,schemaPath:`#/properties/style/properties/mode/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/style/style`,schemaPath:`#/properties/style/properties/style/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/style/boxes_radius`,schemaPath:`#/properties/style/properties/boxes_radius/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/style/field_radius`,schemaPath:`#/properties/style/properties/field_radius/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/style/selectors_radius`,schemaPath:`#/properties/style/properties/selectors_radius/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/style/border_width`,schemaPath:`#/properties/style/properties/border_width/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.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 I.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 I.errors=[{instancePath:t+`/style/fields_size`,schemaPath:`#/properties/style/properties/fields_size/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/style/selectors_size`,schemaPath:`#/properties/style/properties/selectors_size/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/style/icon_library`,schemaPath:`#/properties/style/properties/icon_library/enum`,keyword:`enum`,params:{allowedValues:hn.properties.style.properties.icon_library.enum},message:`must be equal to one of the allowed values`}],!1;var s=!0}}}}}}}}}}}}else return I.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 I.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 I.errors=[{instancePath:t+`/widget/variant`,schemaPath:`#/properties/widget/properties/variant/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/widget/position`,schemaPath:`#/properties/widget/properties/position/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/widget/expandable`,schemaPath:`#/properties/widget/properties/expandable/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/widget/avatar/type`,schemaPath:`#/properties/widget/properties/avatar/properties/type/enum`,keyword:`enum`,params:{allowedValues:hn.properties.widget.properties.avatar.properties.type.enum},message:`must be equal to one of the allowed values`}],!1}}else return I.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 I.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 I.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 I.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 I.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 I.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 I.errors=[{instancePath:t+`/landing_page/template`,schemaPath:`#/properties/landing_page/properties/template/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.errors=[{instancePath:t+`/landing_page/access`,schemaPath:`#/properties/landing_page/properties/access/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.errors=[{instancePath:t+`/landing_page/background`,schemaPath:`#/properties/landing_page/properties/background/type`,keyword:`type`,params:{type:hn.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 I.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 I.errors=[{instancePath:t+`/landing_page/background/type`,schemaPath:`#/properties/landing_page/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:hn.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 I.errors=[{instancePath:t+`/landing_page/background/url`,schemaPath:`#/properties/landing_page/properties/background/properties/url/type`,keyword:`type`,params:{type:hn.properties.landing_page.properties.background.properties.url.type},message:`must be string,null`}],!1}}}var l=!0}}}}}}}}else return I.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 I.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 I.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 I.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 I.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/type`,keyword:`type`,params:{type:hn.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 I.errors=[{instancePath:t+`/preview/background/type`,schemaPath:`#/properties/preview/properties/background/properties/type/enum`,keyword:`enum`,params:{allowedValues:hn.properties.preview.properties.background.properties.type.enum},message:`must be equal to one of the allowed values`}],!1;if(typeof e.url!=`string`)return I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.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 I.errors=[{instancePath:t,schemaPath:`#/type`,keyword:`type`,params:{type:`object`},message:`must be object`}],!1;return I.errors=null,!0}var _n=rn(`Config`);function vn(e){let t=e.customization??{};return t.widget===null&&delete t.widget,t.landing_page===null&&delete t.landing_page,mn(t)||_n.warn(`Customization validation failed`,mn.errors),{...e,customization:t}}var yn=rn(`Config`);function bn(){return{is_available:!1}}var xn=280,Sn=Ce(null);function Cn({children:e,fallback:t}){let n=P(lt),r=n.deploymentId??``,i=n.overrideConfig,a=n.baseUrl,o=n.previewToken,s=M(()=>on({baseUrl:a??`https://tavusapi.com`,token:o}),[a,o]),c=M(()=>kt(null),[]),l=M(()=>kt(null),[]),u=M(()=>kt(!1),[]),d=M(()=>kt(0),[]),f=j([]),p=N(()=>{let e=f.current;f.current=[];for(let t of e)t()},[]),m=N(()=>r?new Promise(e=>{f.current.push(e),d.value=d.peek()+1}):Promise.resolve(),[r,d]);nn(()=>{if(d.value,!r){l.value=null,u.value=!1,c.value=i||null;return}let e=new AbortController;return cn(s,r).then(t=>{e.signal.aborted||(l.value=null,u.value=!1,c.value=t,yn.info(`Deployment initialized`,t.deployment_id),p())}).catch(t=>{e.signal.aborted||(yn.error(`Init failed:`,t),l.value=t,u.value=!i,c.value=i||bn(),p())}),()=>{e.abort()}});let h=M(()=>kt(null),[]);Qe(()=>{let e=e=>{if(!e){h.value=null;return}let t=i?pn(e,i):e;h.value=vn(t)};return e(c.peek()),c.subscribe(e)},[h,c,i]);let g=h.value!==null,[_,v]=k(`pending`);if(A(()=>{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`),xn);return()=>clearTimeout(e)},[g]),!t){if(!g)return F(E,{});let t={deploymentId:r,config:h,initError:l,configError:u,retryInit:m,client:s};return F(Sn.Provider,{value:t,children:e})}let y=g?{deploymentId:r,config:h,initError:l,configError:u,retryInit:m,client:s}:null;return F(`div`,{class:`relative w-full h-full`,children:[y&&F(Sn.Provider,{value:y,children:e}),_!==`done`&&F(`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 wn=Ce(null);function Tn({children:e}){let{client:t}=P(Sn),n=M(()=>({client:t}),[t]);return F(wn.Provider,{value:n,children:e})}function En(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 Dn(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function L(e){return L=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},L(e)}function On(e){var t=function(e,t){if(L(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(L(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return L(t)==`symbol`?t:t+``}function kn(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,On(r.key),r)}}function An(e,t,n){return t&&kn(e.prototype,t),n&&kn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jn(e,t){if(t&&(L(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 Mn(e){return Mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mn(e)}function Nn(e,t){return Nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nn(e,t)}function Pn(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&&Nn(e,t)}function Fn(e,t,n){return(t=On(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function In(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 R(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){In(a,r,i,o,s,`next`,e)}function s(e){In(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Ln(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 Rn(e,t){if(e){if(typeof e==`string`)return Ln(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)?Ln(e,t):void 0}}function zn(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)||Rn(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 Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Vn,Hn={exports:{}},Un=function(){if(Vn)return Hn.exports;Vn=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)}Hn.exports=i,Hn.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):[]},Hn.exports}(),Wn=Bn(Un),Gn=Object.prototype.hasOwnProperty;function Kn(e,t,n){for(n of e.keys())if(qn(n,t))return n}function qn(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--&&qn(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=Kn(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=Kn(t,i))||!qn(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(Gn.call(e,n)&&++r&&!Gn.call(t,n)||!(n in t)||!qn(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}var Jn={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`},Yn={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`},z={bot:`bot`,desktop:`desktop`,mobile:`mobile`,tablet:`tablet`,tv:`tv`},Xn={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`},Zn={Blink:`Blink`,EdgeHTML:`EdgeHTML`,Gecko:`Gecko`,Presto:`Presto`,Trident:`Trident`,WebKit:`WebKit`},B=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 Jn[e]}static getBrowserTypeByAlias(e){return Yn[e]||``}},V=/version\/(\d+(\.?_?\d+)+)/i,Qn=[{test:[/gptbot/i],describe(e){let t={name:`GPTBot`},n=B.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/chatgpt-user/i],describe(e){let t={name:`ChatGPT-User`},n=B.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/oai-searchbot/i],describe(e){let t={name:`OAI-SearchBot`},n=B.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,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=B.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/omgilibot/i,/webzio-extended/i],describe(e){let t={name:`Omgilibot`},n=B.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/diffbot/i],describe(e){let t={name:`Diffbot`},n=B.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/perplexitybot/i],describe(e){let t={name:`PerplexityBot`},n=B.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/perplexity-user/i],describe(e){let t={name:`Perplexity-User`},n=B.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/youbot/i],describe(e){let t={name:`YouBot`},n=B.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/meta-webindexer/i],describe(e){let t={name:`Meta-WebIndexer`},n=B.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/meta-externalads/i],describe(e){let t={name:`Meta-ExternalAds`},n=B.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/meta-externalagent/i],describe(e){let t={name:`Meta-ExternalAgent`},n=B.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/meta-externalfetcher/i],describe(e){let t={name:`Meta-ExternalFetcher`},n=B.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/googlebot/i],describe(e){let t={name:`Googlebot`},n=B.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/linespider/i],describe(e){let t={name:`Linespider`},n=B.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/amazonbot/i],describe(e){let t={name:`AmazonBot`},n=B.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/bingbot/i],describe(e){let t={name:`BingCrawler`},n=B.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/baiduspider/i],describe(e){let t={name:`BaiduSpider`},n=B.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/duckduckbot/i],describe(e){let t={name:`DuckDuckBot`},n=B.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/ia_archiver/i],describe(e){let t={name:`InternetArchiveCrawler`},n=B.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,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=B.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||B.getFirstMatch(V,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=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:`Opera`},n=B.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:`Samsung Internet for Android`},n=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){let t={name:`Pale Moon`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:`MZ Browser`},n=B.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:`Focus`},n=B.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:`Swing`},n=B.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:`Opera Coast`},n=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:`Yandex Browser`},n=B.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:`UC Browser`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:`Maxthon`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:`Epiphany`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:`Puffin`},n=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:`Sleipnir`},n=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:`WeChat`},n=B.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,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=B.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:`Internet Explorer`},n=B.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:`Microsoft Edge`},n=B.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=B.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:`Vivaldi`},n=B.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:`SeaMonkey`},n=B.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:`Sailfish`},n=B.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=B.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:`PhantomJS`},n=B.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:`SlimerJS`},n=B.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=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(V,e)||B.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=B.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:`Tizen`},n=B.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:`QupZilla`},n=B.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/librewolf/i],describe(e){let t={name:`LibreWolf`},n=B.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=B.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=B.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=B.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),r=B.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=B.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=B.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=B.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=B.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:`Chrome`},n=B.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=B.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=B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:`PlayStation 4`},n=B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:`Safari`},n=B.getFirstMatch(V,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=e.search(`\\(`)===-1?/^(.*)\/(.*) /:/^(.*)\/(.*)[ \t]\((.*)/;return{name:B.getFirstMatch(t,e),version:B.getSecondMatch(t,e)}}}],$n=[{test:[/Roku\/DVP/],describe(e){let t=B.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Xn.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=B.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Xn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=B.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=B.getWindowsVersionName(t);return{name:Xn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:Xn.iOS},n=B.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=B.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,`.`),n=B.getMacOSVersionName(t),r={name:Xn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=B.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,`.`);return{name:Xn.iOS,version:t}}},{test:[/OpenHarmony/i],describe(e){let t=B.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:Xn.HarmonyOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=B.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=B.getAndroidVersionName(t),r={name:Xn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=B.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Xn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=B.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||B.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||B.getFirstMatch(/\bbb(\d+)/i,e);return{name:Xn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=B.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Xn.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=B.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Xn.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Xn.Linux})},{test:[/CrOS/],describe:()=>({name:Xn.ChromeOS})},{test:[/PlayStation 4/],describe(e){let t=B.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Xn.PlayStation4,version:t}}}],er=[{test:[/googlebot/i],describe:()=>({type:z.bot,vendor:`Google`})},{test:[/linespider/i],describe:()=>({type:z.bot,vendor:`Line`})},{test:[/amazonbot/i],describe:()=>({type:z.bot,vendor:`Amazon`})},{test:[/gptbot/i],describe:()=>({type:z.bot,vendor:`OpenAI`})},{test:[/chatgpt-user/i],describe:()=>({type:z.bot,vendor:`OpenAI`})},{test:[/oai-searchbot/i],describe:()=>({type:z.bot,vendor:`OpenAI`})},{test:[/baiduspider/i],describe:()=>({type:z.bot,vendor:`Baidu`})},{test:[/bingbot/i],describe:()=>({type:z.bot,vendor:`Bing`})},{test:[/duckduckbot/i],describe:()=>({type:z.bot,vendor:`DuckDuckGo`})},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:()=>({type:z.bot,vendor:`Anthropic`})},{test:[/omgilibot/i,/webzio-extended/i],describe:()=>({type:z.bot,vendor:`Webz.io`})},{test:[/diffbot/i],describe:()=>({type:z.bot,vendor:`Diffbot`})},{test:[/perplexitybot/i],describe:()=>({type:z.bot,vendor:`Perplexity AI`})},{test:[/perplexity-user/i],describe:()=>({type:z.bot,vendor:`Perplexity AI`})},{test:[/youbot/i],describe:()=>({type:z.bot,vendor:`You.com`})},{test:[/ia_archiver/i],describe:()=>({type:z.bot,vendor:`Internet Archive`})},{test:[/meta-webindexer/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/meta-externalads/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/meta-externalagent/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/meta-externalfetcher/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:()=>({type:z.bot,vendor:`Meta`})},{test:[/slackbot/i,/slack-imgProxy/i],describe:()=>({type:z.bot,vendor:`Slack`})},{test:[/yahoo/i],describe:()=>({type:z.bot,vendor:`Yahoo`})},{test:[/yandexbot/i,/yandexmobilebot/i],describe:()=>({type:z.bot,vendor:`Yandex`})},{test:[/pingdom/i],describe:()=>({type:z.bot,vendor:`Pingdom`})},{test:[/huawei/i],describe(e){let t=B.getFirstMatch(/(can-l01)/i,e)&&`Nova`,n={type:z.mobile,vendor:`Huawei`};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:z.tablet,vendor:`Nexus`})},{test:[/ipad/i],describe:()=>({type:z.tablet,vendor:`Apple`,model:`iPad`})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:z.tablet,vendor:`Apple`,model:`iPad`})},{test:[/kftt build/i],describe:()=>({type:z.tablet,vendor:`Amazon`,model:`Kindle Fire HD 7`})},{test:[/silk/i],describe:()=>({type:z.tablet,vendor:`Amazon`})},{test:[/tablet(?! pc)/i],describe:()=>({type:z.tablet})},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=B.getFirstMatch(/(ipod|iphone)/i,e);return{type:z.mobile,vendor:`Apple`,model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:z.mobile,vendor:`Nexus`})},{test:[/Nokia/i],describe(e){let t=B.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:z.mobile,vendor:`Nokia`};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:()=>({type:z.mobile})},{test:e=>e.getBrowserName(!0)===`blackberry`,describe:()=>({type:z.mobile,vendor:`BlackBerry`})},{test:e=>e.getBrowserName(!0)===`bada`,describe:()=>({type:z.mobile})},{test:e=>e.getBrowserName()===`windows phone`,describe:()=>({type:z.mobile,vendor:`Microsoft`})},{test(e){let t=Number(String(e.getOSVersion()).split(`.`)[0]);return e.getOSName(!0)===`android`&&t>=3},describe:()=>({type:z.tablet})},{test:e=>e.getOSName(!0)===`android`,describe:()=>({type:z.mobile})},{test:[/smart-?tv|smarttv/i],describe:()=>({type:z.tv})},{test:[/netcast/i],describe:()=>({type:z.tv})},{test:e=>e.getOSName(!0)===`macos`,describe:()=>({type:z.desktop,vendor:`Apple`})},{test:e=>e.getOSName(!0)===`windows`,describe:()=>({type:z.desktop})},{test:e=>e.getOSName(!0)===`linux`,describe:()=>({type:z.desktop})},{test:e=>e.getOSName(!0)===`playstation 4`,describe:()=>({type:z.tv})},{test:e=>e.getOSName(!0)===`roku`,describe:()=>({type:z.tv})}],tr=[{test:e=>e.getBrowserName(!0)===`microsoft edge`,describe(e){if(/\sedg\//i.test(e))return{name:Zn.Blink};let t=B.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Zn.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:Zn.Trident},n=B.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){let t={name:Zn.Presto},n=B.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:Zn.Gecko},n=B.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Zn.Blink})},{test:[/(apple)?webkit/i],describe(e){let t={name:Zn.WebKit},n=B.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],nr=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=B.find(Qn,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=B.find($n,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=B.find(er,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=B.find(tr,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 B.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=B.find(e,e=>this.isOS(e));if(n){let e=this.satisfies(t[n]);if(e!==void 0)return e}let r=B.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=B.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=B.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(B.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))}},rr=class{static getParser(e,t=!1,n=null){if(typeof e!=`string`)throw Error(`UserAgent should be a string`);return new nr(e,t,n)}static parse(e,t=null){return new nr(e,t).getResult()}static get BROWSER_MAP(){return Yn}static get ENGINE_MAP(){return Zn}static get OS_MAP(){return Xn}static get PLATFORMS_MAP(){return z}};function ir(e){return function(e){if(Array.isArray(e))return Ln(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||Rn(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 ar(){return Date.now()+Math.random().toString()}function or(){throw Error(`Method must be implemented in subclass`)}var sr=[`daily.co`,`dailywebrtc.com`,`dailywebrtc.net`],cr=null;function lr(){return cr}function ur(e){(e===null||sr.includes(e))&&(cr=e)}function dr(e){try{var t=new URL(e).hostname;return sr.find(function(e){return t===e||t.endsWith(`.${e}`)})||null}catch{return null}}function fr(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)===`/`?``:`/`)+e.substring(8):e}function pr(e,t){var n=sr.find(function(t){return e.includes(t)});return n?e.replace(n,t):e}function mr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cr??sr[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).`),pr(e.callObjectBundleUrlOverride,t)):function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cr??sr[0];if(t&&t.trim()!==``||(t=cr??sr[0]),e!=null&&e.bundlePathOverride){var n=pr(e.bundlePathOverride,t);return n.endsWith(`/`)?n.slice(0,-1):n}if(e!=null&&e.callObjectBundleUrlOverride){var r=pr(e.callObjectBundleUrlOverride,t),i=r.substring(0,r.lastIndexOf(`/`));return i.endsWith(`/`)?i.slice(0,-1):i}var a=fr(`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 hr(e){var t=e?.bundlePathOverride||e?.callObjectBundleUrlOverride;return!(!t||sr.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 gr(e){try{var t=e??window.location.hostname;return sr.find(function(e){return t===e||t.endsWith(`.${e}`)})??null}catch{return null}}function _r(e,t){var n=dr(e);if(!n||hr(t))return[e];var r=cr??gr()??sr[0];return(r===sr[0]?sr:[r].concat(ir(sr.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 vr(e){try{new URL(e)}catch{return!1}return!0}var yr=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,br=`8.55.2`,xr=globalThis;function Sr(e,t,n){let r=n||xr,i=r.__SENTRY__=r.__SENTRY__||{},a=i[br]=i[br]||{};return a[e]||(a[e]=t())}var Cr=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,wr=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],Tr={};function Er(e){if(!(`console`in xr))return e();let t=xr.console,n={},r=Object.keys(Tr);r.forEach(e=>{let r=Tr[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}var H=Sr(`logger`,function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Cr?wr.forEach(n=>{t[n]=(...t)=>{e&&Er(()=>{xr.console[n](`Sentry Logger [${n}]:`,...t)})}}):wr.forEach(e=>{t[e]=()=>{}}),t}),Dr=`?`,Or=/\(error: (.*)\)/,kr=/captureMessage|captureException/;function Ar(e){return e[e.length-1]||{}}var jr=`<anonymous>`;function Mr(e){try{return e&&typeof e==`function`&&e.name||jr}catch{return jr}}function Nr(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 Pr={},Fr={};function Ir(e,t){Pr[e]=Pr[e]||[],Pr[e].push(t)}function Lr(e,t){if(!Fr[e]){Fr[e]=!0;try{t()}catch(t){Cr&&H.error(`Error while instrumenting ${e}`,t)}}}function Rr(e,t){let n=e&&Pr[e];if(n)for(let r of n)try{r(t)}catch(t){Cr&&H.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Mr(r)}\nError:`,t)}}var zr=null;function Br(){zr=xr.onerror,xr.onerror=function(e,t,n,r,i){return Rr(`error`,{column:r,error:i,line:n,msg:e,url:t}),!!zr&&zr.apply(this,arguments)},xr.onerror.__SENTRY_INSTRUMENTED__=!0}var Vr=null;function Hr(){Vr=xr.onunhandledrejection,xr.onunhandledrejection=function(e){return Rr(`unhandledrejection`,e),!Vr||Vr.apply(this,arguments)},xr.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ur(){return Wr(xr),xr}function Wr(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||br,t[br]=t[br]||{}}var Gr=Object.prototype.toString;function Kr(e){switch(Gr.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return ni(e,Error)}}function qr(e,t){return Gr.call(e)===`[object ${t}]`}function Jr(e){return qr(e,`ErrorEvent`)}function Yr(e){return qr(e,`DOMError`)}function Xr(e){return qr(e,`String`)}function Zr(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function Qr(e){return e===null||Zr(e)||typeof e!=`object`&&typeof e!=`function`}function $r(e){return qr(e,`Object`)}function ei(e){return typeof Event<`u`&&ni(e,Event)}function ti(e){return!!(e&&e.then&&typeof e.then==`function`)}function ni(e,t){try{return e instanceof t}catch{return!1}}function ri(e){return!(typeof e!=`object`||!e||!e.__isVue&&!e._isVue)}var ii=xr;function ai(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=oi(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 oi(e,t){let n=e,r=[];if(!n||!n.tagName)return``;if(ii.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&&Xr(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 si(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ci(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{ri(r)?n.push(`[VueViewModel]`):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function li(e,t,n=!1){return!!Xr(e)&&(qr(t,`RegExp`)?t.test(e):!!Xr(t)&&(n?e===t:e.includes(t)))}function ui(e,t=[],n=!1){return t.some(t=>li(e,t,n))}function di(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);typeof i==`function`&&pi(i,r);try{e[t]=i}catch{Cr&&H.log(`Failed to replace method "${t}" in object`,e)}}function fi(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Cr&&H.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function pi(e,t){try{e.prototype=t.prototype=t.prototype||{},fi(e,`__sentry_original__`,t)}catch{}}function mi(e){return e.__sentry_original__}function hi(e){if(Kr(e))return{message:e.message,name:e.name,stack:e.stack,..._i(e)};if(ei(e)){let t={type:e.type,target:gi(e.target),currentTarget:gi(e.currentTarget),..._i(e)};return typeof CustomEvent<`u`&&ni(e,CustomEvent)&&(t.detail=e.detail),t}return e}function gi(e){try{return t=e,typeof Element<`u`&&ni(t,Element)?ai(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}var t}function _i(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 vi(e){return yi(e,new Map)}function yi(e,t){if(function(e){if(!$r(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]=yi(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(yi(e,t))}),r}return e}function bi(){return Date.now()/1e3}var xi=function(){let{performance:e}=xr;if(!e||!e.now)return bi;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3}();function Si(){let e=xr,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 Ci(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function wi(e){let{message:t,event_id:n}=e;if(t)return t;let r=Ci(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function Ti(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 Ei(e,t){let n=Ci(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 Di(e){if(function(e){try{return e.__sentry_captured__}catch{}}(e))return!0;try{fi(e,`__sentry_captured__`,!0)}catch{}return!1}var Oi;function ki(e){return new ji(t=>{t(e)})}function Ai(e){return new ji((t,n)=>{n(e)})}(()=>{let{performance:e}=xr;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`}(Oi||={});var ji=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=Oi.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(Oi.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(Oi.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===Oi.PENDING&&(ti(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Oi.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===Oi.RESOLVED&&e[1](this._value),this._state===Oi.REJECTED&&e[2](this._value),!0)})}}};function Mi(e){let t=xi(),n={sid:Si(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>function(e){return vi({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&&Ni(n,e),n}function Ni(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||xi(),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:Si()),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 Pi(){return Si()}function Fi(){return Si().substring(16)}function Ii(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]=Ii(r[e],t[e],n-1));return r}var Li=`_sentrySpan`;function Ri(e,t){t?fi(e,Li,t):delete e[Li]}function zi(e){return e[Li]}var Bi=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:Pi(),spanId:Fi()}}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,Ri(t,zi(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&&Ni(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 Bi?[t.getScopeData(),t.getRequestSession()]:$r(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,Ri(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Pi()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:100;if(n<=0)return this;let r={timestamp:bi(),...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:zi(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Ii(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:Fi(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:Si();if(!this._client)return H.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:Si();if(!this._client)return H.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:Si();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(H.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}},Vi=class{constructor(e,t){let n,r;n=e||new Bi,r=t||new Bi,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 ti(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 Hi(){let e=Wr(Ur());return e.stack=e.stack||new Vi(Sr(`defaultCurrentScope`,()=>new Bi),Sr(`defaultIsolationScope`,()=>new Bi))}function Ui(e){return Hi().withScope(e)}function Wi(e,t){let n=Hi();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Gi(e){return Hi().withScope(()=>e(Hi().getIsolationScope()))}function Ki(e){let t=Wr(e);return t.acs?t.acs:{withIsolationScope:Gi,withScope:Ui,withSetScope:Wi,withSetIsolationScope:(e,t)=>Gi(t),getCurrentScope:()=>Hi().getScope(),getIsolationScope:()=>Hi().getIsolationScope()}}function qi(){return Ki(Ur()).getCurrentScope()}function Ji(){return Ki(Ur()).getIsolationScope()}function Yi(){return qi().getClient()}function Xi(e){let{traceId:t,spanId:n,parentSpanId:r}=e.getPropagationContext();return vi({trace_id:t,span_id:n,parent_span_id:r})}function Zi(e){let t=e._sentryMetrics;if(!t)return;let n={};for(let[,[e,r]]of t)(n[e]||(n[e]=[])).push(vi(r));return n}var Qi=/^sentry-/;function $i(e){let t=function(e){if(e&&(Xr(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=ea(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):ea(e)}(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>(t.match(Qi)&&(e[t.slice(7)]=n),e),{});return Object.keys(n).length>0?n:void 0}function ea(e){return e.split(`,`).map(e=>e.split(`=`).map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var ta=!1;function na(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext();return vi({parent_span_id:r?t:aa(e).parent_span_id,span_id:r?Fi():t,trace_id:n})}function ra(e){return typeof e==`number`?ia(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ia(e.getTime()):xi()}function ia(e){return e>9999999999?e/1e3:e}function aa(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 vi({span_id:t,trace_id:n,data:r,description:a,parent_span_id:s,start_timestamp:ra(i),timestamp:ra(o)||void 0,status:oa(c),op:r[`sentry.op`],origin:r[`sentry.origin`],_metrics_summary:Zi(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function oa(e){if(e&&e.code!==0)return e.code===1?`ok`:e.message||`unknown_error`}function sa(e){return e._sentryRootSpan||e}function ca(){ta||=(Er(()=>{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 la=`production`;function ua(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=vi({environment:n.environment||la,release:n.release,public_key:r,trace_id:e});return t.emit(`createDsc`,i),i}function da(e){let t=Yi();if(!t)return{};let n=sa(e),r=n._frozenDsc;if(r)return r;let i=n.spanContext().traceState,a=i&&i.get(`sentry.dsc`),o=a&&$i(a);if(o)return o;let s=ua(e.spanContext().traceId,t),c=aa(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=Yi(),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 fa=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function pa(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 ma(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function ha(e){let t=typeof e==`string`?function(e){let t=fa.exec(e);if(!t)return void Er(()=>{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 ma({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}(e):ma(e);if(t&&function(e){if(!Cr)return!0;let{port:t,projectId:n,protocol:r}=e;return!([`protocol`,`publicKey`,`host`,`projectId`].find(t=>!e[t]&&(H.error(`Invalid Sentry Dsn: ${t} missing`),!0))||(n.match(/^\d+$/)?function(e){return e===`http`||e===`https`}(r)?t&&isNaN(parseInt(t,10))&&(H.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(H.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(H.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function ga(e,t=100,n=1/0){try{return va(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function _a(e,t=3,n=102400){let r=ga(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?_a(e,t-1,n):r;var i}function va(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(ri(t))return`[VueViewModel]`;if($r(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: ${Mr(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 va(``,l.toJSON(),c-1,r,i)}catch{}let u=Array.isArray(t)?[]:{},d=0,f=hi(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]=va(e,t,c-1,r,i),d++}return o(t),u}function ya(e,t=[]){return[e,t]}function ba(e,t){let[n,r]=e;return[n,[...r,t]]}function xa(e,t){let n=e[1];for(let e of n)if(t(e,e[0].type))return!0;return!1}function Sa(e){return xr.__SENTRY__&&xr.__SENTRY__.encodePolyfill?xr.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Ca(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Sa(r),e]:r.push(typeof e==`string`?Sa(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(ga(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 wa(e){let t=typeof e.data==`string`?Sa(e.data):e.data;return[vi({type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}var Ta={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 Ea(e){return Ta[e]}function Da(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Oa(e,t,n,r){let i=Da(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:pa(r)},...i&&{trace:vi({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,ya(o,[[{type:a},e]])}function ka(e,t,n,r=0){return new ji((i,a)=>{let o=e[r];if(t===null||typeof o!=`function`)i(t);else{let s=o({...t},n);yr&&o.id&&s===null&&H.log(`Event processor "${o.id}" dropped event`),ti(s)?s.then(t=>ka(e,t,n,r+1).then(i)).then(null,a):ka(e,s,n,r+1).then(i).then(null,a)}})}var Aa,ja,Ma;function Na(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=vi(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=vi(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=vi(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=vi(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:na(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:da(t),...e.sdkProcessingMetadata};let n=aa(sa(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 Pa(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;Fa(e,`extra`,n),Fa(e,`tags`,r),Fa(e,`user`,i),Fa(e,`contexts`,a),e.sdkProcessingMetadata=Ii(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 Fa(e,t,n){e[t]=Ii(e[t],n,1)}function Ia(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Si(),timestamp:t.timestamp||bi()},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||la,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i),e.message&&=si(e.message,a);let o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=si(o.value,a));let s=e.request;s&&s.url&&(s.url=si(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=xr._sentryDebugIds;if(!t)return{};let n=Object.keys(t);return Ma&&n.length===ja||(ja=n.length,Ma=n.reduce((n,r)=>{Aa||={};let i=Aa[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,Aa[r]=[o,s];break}}}return n},{})),Ma}(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 Bi;return n.update(t),n}(r,n.captureContext);n.mechanism&&Ei(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Sr(`globalScope`,()=>new Bi).getScopeData();a&&Pa(f,a.getScopeData()),u&&Pa(f,u.getScopeData());let p=[...n.attachments||[],...f.attachments];return p.length&&(n.attachments=p),Na(c,f),ka([...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:ga(e.data,t,n)}}))},...e.user&&{user:ga(e.user,t,n)},...e.contexts&&{contexts:ga(e.contexts,t,n)},...e.extra&&{extra:ga(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=ga(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:ga(e.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=ga(e.contexts.flags,3,n)),r}(e,o,s):e))}function La(e){if(e)return function(e){return e instanceof Bi||typeof e==`function`}(e)||function(e){return Object.keys(e).some(e=>Ra.includes(e))}(e)?{captureContext:e}:e}var Ra=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`requestSession`,`propagationContext`];function za(e,t){return qi().captureEvent(e,t)}function Ba(e){let t=Yi(),n=Ji(),r=qi(),{release:i,environment:a=la}=t&&t.getOptions()||{},{userAgent:o}=xr.navigator||{},s=Mi({release:i,environment:a,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status===`ok`&&Ni(c,{status:`exited`}),Va(),n.setSession(s),r.setSession(s),s}function Va(){let e=Ji(),t=qi(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),Ni(e,n)}(n),Ha(),e.setSession(),t.setSession()}function Ha(){let e=Ji(),t=qi(),n=Yi(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Ua(e=!1){e?Va():Ha()}function Wa(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 Ga=[];function Ka(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function qa(e,t,n){if(n[t.name])yr&&H.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Ga.indexOf(t.name)===-1&&typeof t.setupOnce==`function`&&(t.setupOnce(),Ga.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)}yr&&H.log(`Integration installed: ${t.name}`)}}var Ja=class extends Error{constructor(e,t=`warn`){super(e),this.message=e,this.logLevel=t}},Ya=`Not capturing exception because it's already been captured.`,Xa=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=ha(e.dsn):yr&&H.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Wa(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&&Er(()=>{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=Si();if(Di(e))return yr&&H.log(Ya),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:Si(),...n},a=Zr(e)?e:String(e),o=Qr(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=Si();if(t&&t.originalException&&Di(t.originalException))return yr&&H.log(Ya),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),Ni(e,{init:!1})):yr&&H.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))):ki(!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];qa(this,e,this._integrations),t||Ka(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Oa(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=ba(n,wa(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=Da(n);return ya({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:pa(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}`;yr&&H.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=>(yr&&H.error(`Error while sending envelope:`,e),e)):(yr&&H.error(`Transport disabled`),ki({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&qa(e,t,n)}),n}(this,e),Ka(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)&&(Ni(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new ji(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=qi(),r=Ji()){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),Ia(i,e,t,n,this,r).then(e=>e===null?e:(e.contexts={trace:Xi(n),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let n=t.getPropagationContext();return n.dsc||ua(n.traceId,e)}(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{yr&&(e instanceof Ja&&e.logLevel===`log`?H.log(e.message):H.warn(e))})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,a=Qa(e),o=Za(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;yr&&H.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),Ai(new Ja(`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 Ja("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(ti(e))return e.then(e=>{if(!$r(e)&&e!==null)throw new Ja(n);return e},e=>{throw new Ja(`${t} rejected with ${e}`)});if(!$r(e)&&e!==null)throw new Ja(n);return e}(function(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:o}=t;if(Za(n)&&i)return i(n,r);if(Qa(n)){if(n.spans&&o){let t=[];for(let r of n.spans){let n=o(r);n?t.push(n):(ca(),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 Ja(`${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 Ja?e:(this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Ja(`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(){yr&&H.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0)return void(yr&&H.log(`No outcomes to send`));if(!this._dsn)return void(yr&&H.log(`No dsn provided, will not send outcomes`));yr&&H.log(`Sending outcomes:`,e);let t=(n=e,ya((r=this._options.tunnel&&pa(this._dsn))?{dsn:r}:{},[[{type:`client_report`},{timestamp:i||bi(),discarded_events:n}]]));var n,r,i;this.sendEnvelope(t)}};function Za(e){return e.type===void 0}function Qa(e){return e.type===`transaction`}function $a(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 Ai(new Ja(`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 ji((n,r)=>{let i=t.length;if(!i)return n(!0);let a=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{ki(e).then(()=>{--i||(clearTimeout(a),n(!0))},r)})})}}}function eo(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 to(e,t,n=$a(e.bufferSize||64)){let r={};return{send:function(i){let a=[];if(xa(i,(t,n)=>{let i=Ea(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=no(t,n);e.recordDroppedEvent(`ratelimit_backoff`,i,r)}else a.push(t)}),a.length===0)return ki({});let o=ya(i[0],a),s=t=>{xa(o,(n,r)=>{let i=no(n,r);e.recordDroppedEvent(t,Ea(r),i)})};return n.add(()=>t({body:Ca(o)}).then(e=>(e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&yr&&H.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=eo(r,e),e),e=>{throw s(`network_error`),e})).then(e=>e,e=>{if(e instanceof Ja)return yr&&H.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),ki({});throw e})},flush:e=>n.drain(e)}}function no(e,t){if(t===`event`||t===`transaction`)return Array.isArray(e)?e[1]:void 0}var ro=100;function io(e,t){let n=Yi(),r=Ji();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=ro}=n.getOptions();if(a<=0)return;let o={timestamp:bi(),...e},s=i?Er(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var ao,oo=new WeakMap,so=()=>({name:`FunctionToString`,setupOnce(){ao=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=mi(this),n=oo.has(Yi())&&t!==void 0?t:this;return ao.apply(n,e)}}catch{}},setup(e){oo.set(e,!0)}}),co=[/^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$/],lo=(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)?(yr&&H.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${wi(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=>ui(e,t))}(e,t.ignoreErrors)?(yr&&H.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${wi(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)?(yr&&H.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${wi(e)}`),!0):function(e,t){if(e.type!==`transaction`||!t||!t.length)return!1;let n=e.transaction;return!!n&&ui(n,t)}(e,t.ignoreTransactions)?(yr&&H.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${wi(e)}`),!0):function(e,t){if(!t||!t.length)return!1;let n=uo(e);return!!n&&ui(n,t)}(e,t.denyUrls)?(yr&&H.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${wi(e)}.\nUrl: ${uo(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;let n=uo(e);return!n||ui(n,t)}(e,t.allowUrls)&&(yr&&H.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${wi(e)}.\nUrl: ${uo(e)}`),!0)}(t,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:co],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal===void 0||e.ignoreInternal}}(e,r.getOptions()))?null:t}});function uo(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 yr&&H.error(`Cannot extract url for event ${wi(e)}`),null}}function fo(e,t,n=250,r,i,a,o){if(!(a.exception&&a.exception.values&&o&&ni(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=po(e,t,i,o.originalException,r,a.exception.values,s,0),l=n,c.map(e=>(e.value&&=si(e.value,l),e))))}function po(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(ni(r[i],Error)){mo(o,s);let a=e(t,r[i]),l=c.length;ho(a,i,l,s),c=po(e,t,n,r[i],i,[a,...c],a,l)}return Array.isArray(r.errors)&&r.errors.forEach((r,a)=>{if(ni(r,Error)){mo(o,s);let l=e(t,r),u=c.length;ho(l,`errors[${a}]`,u,s),c=po(e,t,n,r,i,[l,...c],l,u)}}),c}function mo(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 ho(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 go(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 _o(){`console`in xr&&wr.forEach(function(e){e in xr.console&&di(xr.console,e,function(t){return Tr[e]=t,function(...t){Rr(`console`,{args:t,level:e});let n=Tr[e];n&&n.apply(xr.console,t)}})})}function vo(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var yo=()=>{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||!xo(e,t)||!bo(e,t))}(e,t)||function(e,t){let n=So(t),r=So(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!xo(e,t)||!bo(e,t))}(e,t)):!1}(t,e))return yr&&H.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}};function bo(e,t){let n=Nr(e),r=Nr(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 xo(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 So(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Co(e){return e===void 0?void 0:e>=400&&e<500?`warning`:e>=500?`error`:void 0}var wo=xr;function To(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Eo(){if(typeof EdgeRuntime==`string`)return!0;if(!function(){if(!(`fetch`in wo))return!1;try{return new Headers,new Request(`http://www.example.com`),new Response,!0}catch{return!1}}())return!1;if(To(wo.fetch))return!0;let e=!1,t=wo.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=To(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){Cr&&H.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Do(e,t){let n=`fetch`;Ir(n,e),Lr(n,()=>function(e,t=!1){(!t||Eo())&&di(xr,`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:ko(t),method:Oo(n,`method`)?String(n.method).toUpperCase():`GET`}}let t=e[0];return{url:ko(t),method:Oo(t,`method`)?String(t.method).toUpperCase():`GET`}}(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:1e3*xi(),virtualError:r};return e||Rr(`fetch`,{...o}),t.apply(xr,n).then(async t=>(e?e(t):Rr(`fetch`,{...o,endTimestamp:1e3*xi(),response:t}),t),e=>{throw Rr(`fetch`,{...o,endTimestamp:1e3*xi(),error:e}),Kr(e)&&e.stack===void 0&&(e.stack=r.stack,fi(e,`framesToPop`,1)),e})}})}(void 0,t))}function Oo(e,t){return!!e&&typeof e==`object`&&!!e[t]}function ko(e){return typeof e==`string`?e:e?Oo(e,`url`)?e.url:e.toString?e.toString():``:``}var Ao=xr,jo=xr,Mo=0;function No(){return Mo>0}function Po(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(mi(e))return e}catch{return e}let n=function(...n){try{let r=n.map(e=>Po(e,t));return e.apply(this,r)}catch(e){throw Mo++,setTimeout(()=>{Mo--}),function(...e){let t=Ki(Ur());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&&(Ti(e,void 0,void 0),Ei(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),i=e,qi().captureException(i,La(a))}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}pi(n,e),fi(e,`__sentry_wrapped__`,n);try{Object.getOwnPropertyDescriptor(n,`name`).configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}var Fo=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function Io(e,t){let n=zo(e,t),r={type:Ho(t),value:Uo(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Lo(e,t,n,r){let i=Yi(),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__:_a(t,a)};if(o)return{exception:{values:[Io(e,o)]},extra:s};let c={exception:{values:[{type:ei(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Ko(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=zo(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Ro(e,t){return{exception:{values:[Io(e,t)]}}}function zo(e,t){let n=t.stacktrace||t.stack||``,r=function(e){return e&&Bo.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 Bo=/Minified React error #\d+;/i;function Vo(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Ho(e){let t=e&&e.name;return!t&&Vo(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function Uo(e){let t=e&&e.message;return t?t.error&&typeof t.error.message==`string`?t.error.message:Vo(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:`No error message`}function Wo(e,t,n,r,i){let a;if(Jr(t)&&t.error)return Ro(e,t.error);if(Yr(t)||qr(t,`DOMException`)){let i=t;if(`stack`in t)a=Ro(e,t);else{let t=i.name||(Yr(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Go(e,o,n,r),Ti(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return Kr(t)?Ro(e,t):$r(t)||ei(t)?(a=Lo(e,t,n,i),Ei(a,{synthetic:!0}),a):(a=Go(e,t,n,r),Ti(a,`${t}`,void 0),Ei(a,{synthetic:!0}),a)}function Go(e,t,n,r){let i={};if(r&&n){let r=zo(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),Ei(i,{synthetic:!0})}if(Zr(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 Ko(e,{isUnhandledRejection:t}){let n=function(e,t=40){let n=Object.keys(hi(e));n.sort();let r=n[0];if(!r)return`[object has no keys]`;if(r.length>=t)return si(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:si(r,t)}return``}(e),r=t?`promise rejection`:`exception`;return Jr(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ei(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 qo=class extends Xa{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:br})),version:br},e._metadata=i})(t,`browser`,[`browser`],jo.SENTRY_SDK_SOURCE||`npm`),super(t),t.sendClientReports&&jo.document&&jo.document.addEventListener(`visibilitychange`,()=>{jo.document.visibilityState===`hidden`&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){let i=Wo(e,t,n&&n.syntheticException||void 0,r);return Ei(i),i.level=`error`,n&&n.event_id&&(i.event_id=n.event_id),ki(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return function(e,t,n=`info`,r,i){let a=Go(e,t,r&&r.syntheticException||void 0,i);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),ki(a)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Fo&&H.warn(`SDK not enabled, will not capture user feedback.`));let t=function(e,{metadata:t,tunnel:n,dsn:r}){return ya({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:pa(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)}},Jo=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Yo=xr,Xo,Zo,Qo,$o;function es(){if(!Yo.document)return;let e=Rr.bind(null,`dom`),t=ts(e,!0);Yo.document.addEventListener(`click`,t,!1),Yo.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=Yo[t],r=n&&n.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty(`addEventListener`)&&(di(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=ts(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),di(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 ts(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;fi(n,`_sentryCaptured`,!0),r&&!r._sentryId&&fi(r,`_sentryId`,Si());let i=n.type===`keypress`?`input`:n.type;(function(e){if(e.type!==Zo)return!1;try{if(!e.target||e.target._sentryId!==Qo)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),Zo=n.type,Qo=r?r._sentryId:void 0),clearTimeout(Xo),Xo=Yo.setTimeout(()=>{Qo=void 0,Zo=void 0},1e3)}}function ns(e){let t=`history`;Ir(t,e),Lr(t,rs)}function rs(){if(!function(){let e=Ao.chrome,t=e&&e.app&&e.app.runtime,n=`history`in Ao&&!!Ao.history.pushState&&!!Ao.history.replaceState;return!t&&n}())return;let e=Yo.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=$o,t=String(n);$o=t,Rr(`history`,{from:e,to:t})}return e.apply(this,t)}}Yo.onpopstate=function(...t){let n=Yo.location.href,r=$o;if($o=n,Rr(`history`,{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},di(Yo.history,`pushState`,t),di(Yo.history,`replaceState`,t)}var is={};function as(e){is[e]=void 0}var os=`__sentry_xhr_v3__`;function ss(){if(!Yo.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=1e3*xi(),a=Xr(n[0])?n[0].toUpperCase():void 0,o=function(e){if(Xr(e))return e;try{return e.toString()}catch{}}(n[1]);if(!a||!o)return e.apply(t,n);t[os]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[os];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}Rr(`xhr`,{endTimestamp:1e3*xi(),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[os];return a&&Xr(r)&&Xr(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[os];return r?(n[0]!==void 0&&(r.body=n[0]),Rr(`xhr`,{startTimestamp:1e3*xi(),xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function cs(e,t=function(e){let t=is[e];if(t)return t;let n=Yo[e];if(To(n))return is[e]=n.bind(Yo);let r=Yo.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){Jo&&H.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(is[e]=n.bind(Yo))}(`fetch`)){let n=0,r=0;return to(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 as(`fetch`),Ai(`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 as(`fetch`),n-=a,r--,Ai(e)}})}function ls(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?Dr:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var us=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ds=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,fs=/\((\S*)(?::(\d+))(?::(\d+))\)/,ps=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ms=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hs=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=Or.test(n)?n.replace(Or,`$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(Ar(t).function||``)&&t.pop(),t.reverse(),kr.test(Ar(t).function||``)&&(t.pop(),kr.test(Ar(t).function||``)&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||Ar(t).filename,function:e.function||Dr}))}(i.slice(r))}}([30,e=>{let t=us.exec(e);if(t){let[,e,n,r]=t;return ls(e,Dr,+n,+r)}let n=ds.exec(e);if(n){if(n[2]&&n[2].indexOf(`eval`)===0){let e=fs.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}let[e,t]=gs(n[1]||Dr,n[2]);return ls(t,e,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{let t=ps.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=ms.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]||Dr;return[n,e]=gs(n,e),ls(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),gs=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?Dr:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},_s=1024,vs=(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`;Ir(t,e),Lr(t,_o)}(function(e){return function(t){if(Yi()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:vo(t.level),message:ci(t.args,` `)};if(t.level===`assert`){if(!1!==t.args[0])return;n.message=`Assertion failed: ${ci(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1)}io(n,{input:t.args,level:t.level})}}(e)),t.dom&&(n=function(e,t){return function(n){if(Yi()!==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>_s&&(Fo&&H.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${o} was configured. Sentry will use 1024 instead.`),o=_s),typeof a==`string`&&(a=[a]);try{let e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=ai(t,{keyAttrs:a,maxStringLength:o}),i=function(e){if(!ii.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}),io(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom),Ir(`dom`,n),Lr(`dom`,es)),t.xhr&&function(e){Ir(`xhr`,e),Lr(`xhr`,ss)}(function(e){return function(t){if(Yi()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[os];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};io({category:`xhr`,data:l,type:`http`,level:Co(s)},u)}}(e)),t.fetch&&Do(function(e){return function(t){if(Yi()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||t.fetchData.method!==`POST`)){if(t.error)io({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};io({category:`fetch`,data:i,type:`http`,level:Co(i.status_code)},a)}}}}(e)),t.history&&ns(function(e){return function(t){if(Yi()!==e)return;let n=t.from,r=t.to,i=go(jo.location.href),a=n?go(n):void 0,o=go(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),io({category:`navigation`,data:{from:n,to:r}})}}(e)),t.sentry&&e.on(`beforeSendEvent`,function(e){return function(t){Yi()===e&&io({category:`sentry.`+(t.type===`transaction`?`transaction`:`event`),event_id:t.event_id,level:t.level,message:wi(t)},{event:t})}}(e))}}},ys=`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(`.`),bs=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:`BrowserApiErrors`,setupOnce(){t.setTimeout&&di(jo,`setTimeout`,xs),t.setInterval&&di(jo,`setInterval`,xs),t.requestAnimationFrame&&di(jo,`requestAnimationFrame`,Ss),t.XMLHttpRequest&&`XMLHttpRequest`in jo&&di(XMLHttpRequest.prototype,`send`,Cs);let e=t.eventTarget;e&&(Array.isArray(e)?e:ys).forEach(ws)}}};function xs(e){return function(...t){let n=t[0];return t[0]=Po(n,{mechanism:{data:{function:Mr(e)},handled:!1,type:`instrument`}}),e.apply(this,t)}}function Ss(e){return function(t){return e.apply(this,[Po(t,{mechanism:{data:{function:`requestAnimationFrame`,handler:Mr(e)},handled:!1,type:`instrument`}})])}}function Cs(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&di(n,e,function(t){let n={mechanism:{data:{function:e,handler:Mr(t)},handled:!1,type:`instrument`}},r=mi(t);return r&&(n.mechanism.data.handler=Mr(r)),Po(t,n)})}),e.apply(this,t)}}function ws(e){let t=jo[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty(`addEventListener`)&&(di(n,`addEventListener`,function(t){return function(n,r,i){try{typeof r.handleEvent==`function`&&(r.handleEvent=Po(r.handleEvent,{mechanism:{data:{function:`handleEvent`,handler:Mr(r),target:e},handled:!1,type:`instrument`}}))}catch{}return t.apply(this,[n,Po(r,{mechanism:{data:{function:`addEventListener`,handler:Mr(r),target:e},handled:!1,type:`instrument`}}),i])}}),di(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 Ts=()=>({name:`BrowserSession`,setupOnce(){jo.document===void 0?Fo&&H.warn("Using the `browserSessionIntegration` in non-browser environments is not supported."):(Ba({ignoreDuration:!0}),Ua(),ns(({from:e,to:t})=>{e!==void 0&&e!==t&&(Ba({ignoreDuration:!0}),Ua())}))}}),Es=(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`;Ir(t,e),Lr(t,Br)})(t=>{let{stackParser:n,attachStacktrace:r}=Os();if(Yi()!==e||No())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=Xr(t)&&t.length>0?t:function(){try{return ii.document.location.href}catch{return``}}();return c.length===0&&c.push({colno:l,filename:d,function:Dr,in_app:!0,lineno:u}),e}(Wo(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,za(l,{originalException:c,mechanism:{handled:!1,type:`onerror`}})})}(e),Ds(`onerror`)),t.onunhandledrejection&&(function(e){(function(e){let t=`unhandledrejection`;Ir(t,e),Lr(t,Hr)})(t=>{let{stackParser:n,attachStacktrace:r}=Os();if(Yi()!==e||No())return;let i=function(e){if(Qr(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=Qr(i)?{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Wo(n,i,void 0,r,!0);a.level=`error`,za(a,{originalException:i,mechanism:{handled:!1,type:`onunhandledrejection`}})})}(e),Ds(`onunhandledrejection`))}}};function Ds(e){Fo&&H.log(`Global Handler attached: ${e}`)}function Os(){let e=Yi();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var ks=()=>({name:`HttpContext`,preprocessEvent(e){if(!jo.navigator&&!jo.location&&!jo.document)return;let t=e.request&&e.request.url||jo.location&&jo.location.href,{referrer:n}=jo.document||{},{userAgent:r}=jo.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}};e.request={...e.request,...t&&{url:t},headers:i}}}),As=(e={})=>{let t=e.limit||5,n=e.key||`cause`;return{name:`LinkedErrors`,preprocessEvent(e,r,i){let a=i.getOptions();fo(Io,a.stackParser,a.maxValueLength,n,t,e,r)}}},js=`loading`,Ms=`loaded`,Ns=`joining-meeting`,Ps=`joined-meeting`,Fs=`left-meeting`,Is=`error`,Ls=`unknown`,Rs=`full`,zs=`base`,Bs=`iframe-ready-for-launch-config`,Vs=`iframe-launch-config`,Hs=`theme-updated`,Us=`load-attempt-failed`,Ws=`loaded`,Gs=`started-camera`,Ks=`camera-error`,qs=`joining-meeting`,Js=`joined-meeting`,Ys=`left-meeting`,Xs=`participant-joined`,Zs=`participant-updated`,Qs=`participant-left`,$s=`participant-counts-updated`,ec=`access-state-updated`,tc=`meeting-session-summary-updated`,nc=`meeting-session-state-updated`,rc=`waiting-participant-added`,ic=`waiting-participant-updated`,ac=`waiting-participant-removed`,oc=`transcription-started`,sc=`transcription-stopped`,cc=`transcription-error`,lc=`recording-started`,uc=`recording-stopped`,dc=`recording-stats`,fc=`recording-error`,pc=`recording-upload-completed`,mc=`recording-data`,hc=`app-message`,gc=`transcription-message`,_c=`remote-media-player-started`,vc=`remote-media-player-updated`,yc=`remote-media-player-stopped`,bc=`local-screen-share-started`,xc=`local-screen-share-stopped`,Sc=`local-screen-share-canceled`,Cc=`active-speaker-change`,wc=`active-speaker-mode-change`,Tc=`network-quality-change`,Ec=`network-connection`,Dc=`cpu-load-change`,Oc=`face-counts-updated`,kc=`live-streaming-started`,Ac=`live-streaming-updated`,jc=`live-streaming-stopped`,Mc=`live-streaming-error`,Nc=`lang-updated`,Pc=`receive-settings-updated`,Fc=`input-settings-updated`,Ic=`nonfatal-error`,Lc=`error`,Rc=4096,zc=102400,Bc=`iframe-call-message`,Vc=`local-screen-start`,Hc=`daily-method-update-live-streaming-endpoints`,Uc=`transmit-log`,Wc=`daily-custom-track`,Gc={NONE:`none`,BGBLUR:`background-blur`,BGIMAGE:`background-image`,FACE_DETECTION:`face-detection`},Kc={NONE:`none`,NOISE_CANCELLATION:`noise-cancellation`},qc={PLAY:`play`,PAUSE:`pause`},Jc=`daily`,Yc=`signalwire`,Xc=[`jpg`,`png`,`jpeg`],Zc=`add-endpoints`,Qc=`remove-endpoints`,$c=`sip-call-transfer`;function el(){return!tl()&&typeof window<`u`&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:``}function tl(){return typeof navigator<`u`&&navigator.product&&navigator.product===`ReactNative`}function nl(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function rl(){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}(ml(),hl())||tl())}function il(){if(tl()||!document)return!1;var e=document.createElement(`iframe`);return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var al=`none`,ol=`software`,sl=`hardware`,cl=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?ol:sl:al}catch{return al}}();function ll(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!tl()&&cl!==al&&(e?function(){return!pl()&&[`Chrome`,`Firefox`].includes(ml())}():function(){if(pl())return!1;var e=ml();if(e===`Safari`){var t=yl();if(t.major<15||t.major===15&&t.minor<4)return!1}return e===`Chrome`?gl().major>=77:e===`Firefox`?bl().major>=97:[`Chrome`,`Firefox`,`Safari`].includes(e)}())}function ul(){if(tl()||fl()||typeof AudioWorkletNode>`u`)return!1;switch(ml()){case`Chrome`:case`Firefox`:return!0;case`Safari`:var e=hl();return e.major>17||e.major===17&&e.minor>=4}return!1}function dl(){return nl()&&typeof MediaStreamTrack<`u`&&!function(){var e,t=ml();if(!el())return!0;switch(t){case`Chrome`:return(e=gl()).major&&e.major>0&&e.major<75;case`Firefox`:return(e=bl()).major<91;case`Safari`:return(e=yl()).major<13||e.major===13&&e.minor<1;default:return!0}}()}function fl(){return el().match(/Linux; Android/)}function pl(){var e,t=el(),n=t.match(/Mac/)&&(!tl()&&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)||!!el().match(/DailyAnd\//)||void 0}function ml(){if(typeof window<`u`){var e=el();return _l()?`Safari`:e.indexOf(`Edge`)>-1?`Edge`:e.match(/Chrome\//)?`Chrome`:e.indexOf(`Safari`)>-1||vl()?`Safari`:e.indexOf(`Firefox`)>-1?`Firefox`:e.indexOf(`MSIE`)>-1||e.indexOf(`.NET`)>-1?`IE`:`Unknown Browser`}}function hl(){switch(ml()){case`Chrome`:return gl();case`Safari`:return yl();case`Firefox`:return bl();case`Edge`:return function(){var e=0,t=0;if(typeof window<`u`){var n=el().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}()}}function gl(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<`u`){var a=el(),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 _l(){return!!el().match(/\((iPad|iPhone|iPod)/i)&&nl()}function vl(){return el().indexOf(`AppleWebKit/605.1.15`)>-1}function yl(){var e=0,t=0,n=0;if(typeof window<`u`){var r=el().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else(_l()||vl())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function bl(){var e=0,t=0;if(typeof window<`u`){var n=el().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var xl=function(){return An(function e(){Dn(this,e)},[{key:`addListenerForMessagesFromCallMachine`,value:function(e,t,n){or()}},{key:`addListenerForMessagesFromDailyJs`,value:function(e,t,n){or()}},{key:`sendMessageToCallMachine`,value:function(e,t,n,r){or()}},{key:`sendMessageToDailyJs`,value:function(e,t){or()}},{key:`removeListener`,value:function(e){or()}}])}();function Sl(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 Cl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Sl(Object(n),!0).forEach(function(t){Fn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wl=function(){return!!e})()}var Tl=function(){function e(){var t,n,r,i;return Dn(this,e),n=this,r=Mn(r=e),(t=jn(n,wl()?Reflect.construct(r,i||[],Mn(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return Pn(e,xl),An(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=Cl({},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!==Bc||!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=Cl({},e);if(i.what=Bc,i.from=`module`,i.callClientId=n,t){var a=ar();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=Bc,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=Cl({},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 El(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 Dl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dl=function(){return!!e})()}var Ol=function(){function e(){var t,n,r,i;return Dn(this,e),n=this,r=Mn(r=e),t=jn(n,Dl()?Reflect.construct(r,i||[],Mn(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new Un.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new Un.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return Pn(e,xl),An(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?El(Object(n),!0).forEach(function(t){Fn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):El(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);if(a.callClientId=n,r){var o=ar();this._messageCallbacks[o]=r,a.callbackStamp=o}t.emit(`message`,a)}}])}(),kl=`replace`,Al=`shallow-merge`,jl=[kl,Al],Ml=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?kl:r;Dn(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return An(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===Al}},{key:`_validateMergeStrategy`,value:function(e){if(!jl.includes(e))throw Error(`Unrecognized mergeStrategy provided. Options are: [${jl}]`)}},{key:`_validateData`,value:function(e,t){if(!function(e){if(e==null||L(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===kl){var r=JSON.parse(n);qn(r,e)||console.warn(`The meeting session data provided will be modified when serialized.`,r,e)}else if(t===Al){for(var i in e)if(Object.hasOwnProperty.call(e,i)&&e[i]!==void 0){var a=JSON.parse(JSON.stringify(e[i]));qn(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>zc)throw Error(`Meeting session data is too large (${n.length} characters). Maximum size suppported is ${zc}.`)}}])}();function Nl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nl=function(){return!!e})()}function Pl(e){var t=typeof Map==`function`?new Map:void 0;return Pl=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(Nl())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Nn(i,n.prototype),i}(e,arguments,Mn(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Nn(n,e)},Pl(e)}function Fl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fl=function(){return!!e})()}function Il(e){var t=window._daily?.pendings;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}}var Ll=function(){return An(function e(t){Dn(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 Rl(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,ur(dr(e)),r(!1)},function(e,n){n||Il(t._callClientId),i(e,n)}),this._currentLoad.start()}},{key:`cancel`,value:function(){this._currentLoad&&this._currentLoad.cancel(),Il(this._callClientId)}},{key:`loaded`,get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])}(),Rl=function(){return An(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;Dn(this,e),this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._urls=function(e){if(hr(e))return[mr(e)];var t=cr??gr()??sr[0];return(t===sr[0]?sr:[t].concat(ir(sr.filter(function(e){return e!==t})))).map(function(t){return mr(e,t)})}(t),this._networkTimeoutMs=Bl,this._passesRemaining=3,this._urlIndex=0,this._currentAttempt=null},[{key:`start`,value:function(){this._currentAttempt||this._startAttempt()}},{key:`_startAttempt`,value:function(){this._currentAttempt=new Vl(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}}])}(),zl=function(){function e(){return Dn(this,e),t=this,r=arguments,n=Mn(n=e),jn(t,Fl()?Reflect.construct(n,r||[],Mn(t).constructor):n.apply(t,r));var t,n,r}return Pn(e,Pl(Error)),An(e)}(),Bl=2e4,Vl=function(){return An(function e(t,n,r,i,a){Dn(this,e),this._loadAttemptImpl=tl()||!t.avoidEval?new Hl(t,n,r,i,a):new Ul(t,n,r,i,a)},[{key:`start`,value:(e=R(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}(),Hl=function(){return An(function e(t,n,r,i,a){Dn(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=R(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=R(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=R(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 zl;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new zl;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 zl||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=R(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}(),Ul=function(){return An(function e(t,n,r,i,a){Dn(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=ar(),this._networkTimeout=null,this._scriptElement=null},[{key:`start`,value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=this._url;(typeof document>`u`?`undefined`:L(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)}}])}(),Wl=function(e,t,n){return!0===ql(e.local,t,n)},Gl=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]},Kl=function(e,t,n,r){var i=Jl(e,t,n,r);return i&&i.pendingTrack},ql=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)},Jl=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]},Yl=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function Xl(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?Gl(n,a,c):Kl(n,e.session_id,a,c);u.state===`playable`&&(u.track=d),u.persistentTrack=d}}}function Zl(e,t){try{var n=t.getState();for(var r in e.tracks)if(!Ql(r)){var i=e.tracks[r].kind;if(i){var a=e.tracks[r];if(a){var o=e.local?Yl(n,r):Kl(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 Ql(e){return[`video`,`audio`,`screenVideo`,`screenAudio`].includes(e)}function $l(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&&Wl(r,e.session_id,`cam-audio`)){var o=Kl(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&&Wl(r,e.session_id,`cam-video`)){var s=Kl(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&&Wl(r,e.session_id,`screen-audio`)){var c=Kl(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&&Wl(r,e.session_id,`screen-video`)){var l=Kl(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 eu(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 tu(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)?tu(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 tu(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 nu=new Map,ru=null;function iu(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 au(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)?au(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 au(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 ou=new Map,su=null;function cu(e){uu()?function(e){nu.has(e)||(nu.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){nu.has(e)&&(nu.get(e).lastDevicesString=JSON.stringify(t),ru||(ru=function(){var e=R(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=eu(nu.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==nu.get(r).lastDevicesString&&(nu.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`,ru)))}).catch(function(){}))}(e):function(e){ou.has(e)||(ou.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){ou.has(e)&&(ou.get(e).lastDevicesString=JSON.stringify(t),su||=setInterval(R(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=iu(ou.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ou.get(r).lastDevicesString&&(ou.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}),3e3))}))}(e)}function lu(e){uu()?function(e){nu.has(e)&&(nu.delete(e),nu.size===0&&ru&&(navigator.mediaDevices.removeEventListener(`devicechange`,ru),ru=null))}(e):function(e){ou.has(e)&&(ou.delete(e),ou.size===0&&su&&(clearInterval(su),su=null))}(e)}function uu(){return tl()||navigator.mediaDevices?.ondevicechange!==void 0}var du=new Set;function fu(e,t){var n=t.isLocalScreenVideo;return e&&e.readyState===`live`&&!function(e,t){return(!t.isLocalScreenVideo||ml()!==`Chrome`)&&e.muted&&!du.has(e.id)}(e,{isLocalScreenVideo:n})}function pu(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 mu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?pu(Object(n),!0).forEach(function(t){Fn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var hu=Object.freeze({VIDEO:`video`,AUDIO:`audio`,SCREEN_VIDEO:`screenVideo`,SCREEN_AUDIO:`screenAudio`,CUSTOM_VIDEO:`customVideo`,CUSTOM_AUDIO:`customAudio`}),gu=Object.freeze({PARTICIPANTS:`participants`,STREAMING:`streaming`,TRANSCRIPTION:`transcription`}),_u=Object.values(hu),vu=[`v`,`a`,`sv`,`sa`,`cv`,`ca`];Object.freeze(_u.reduce(function(e,t,n){return e[t]=vu[n],e},{})),Object.freeze(vu.reduce(function(e,t,n){return e[t]=_u[n],e},{}));var yu=[hu.VIDEO,hu.AUDIO,hu.SCREEN_VIDEO,hu.SCREEN_AUDIO],bu=Object.values(gu),xu=[`p`,`s`,`t`];Object.freeze(bu.reduce(function(e,t,n){return e[t]=xu[n],e},{})),Object.freeze(xu.reduce(function(e,t,n){return e[t]=bu[n],e},{}));var Su=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;Dn(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return An(e,[{key:`clone`,value:function(){var t=new e;if(t.base=this.base instanceof Cu?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 Cu?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 Cu?a.clone():a}return t}},{key:`toJSONObject`,value:function(){var e={};if(typeof this.base==`boolean`?e.base=this.base:this.base instanceof Cu&&(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 Cu?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 Cu?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 Cu&&(this.base=this.base.normalize()),this.byUserId&&=Object.fromEntries(Object.entries(this.byUserId).map(function(e){var t=zn(e,2),n=t[0],r=t[1];return[n,r instanceof Cu?r.normalize():r]})),this.byParticipantId&&=Object.fromEntries(Object.entries(this.byParticipantId).map(function(e){var t=zn(e,2),n=t[0],r=t[1];return[n,r instanceof Cu?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:Cu.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:Cu.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:Cu.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:Cu.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:Cu.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:Cu.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:`validateJSONObject`,value:function(e){if(L(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=zn(Cu.validateJSONObject(e.base,!0),2),o=a[0],s=a[1];if(!o)return[!1,s]}else{if(L(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=zn(Cu.validateJSONObject(u),2),f=d[0],p=d[1];if(!f)return[!1,p]}}}return[!0]}}])}(),Cu=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;Dn(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=a,this.customVideo=o,this.customAudio=s}return An(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=mu({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=mu({},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=mu({},this.customVideo)),this.customAudio!==void 0&&(e.customAudio=mu({},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=mu({},this.customVideo)),this.customAudio!==void 0&&(e.ca=mu({},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:mu({},t.customVideo),customAudio:t.customAudio===void 0?void 0:mu({},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(L(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(!_u.includes(a))return[!1,`invalid media type '${a}' in canReceive`];if(yu.includes(a)){if(typeof e[a]!=`boolean`)return[!1,`invalid (non-boolean) value for media type '${a}' in canReceive`]}else{if(L(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!==_u.length?[!1,`canReceive "base" permission must specify all media types: ${_u.join(`, `)} (or be set to a boolean shorthand)`]:[!0]}}])}(),wu=[`result`],Tu=[`preserveIframe`];function Eu(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 U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Eu(Object(n),!0).forEach(function(t){Fn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Du(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Du=function(){return!!e})()}function Ou(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 ku(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)?ku(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 ku(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 Au={},ju=`video`,Mu=`voice`,Nu=tl()?{data:{}}:{data:{},topology:`none`},Pu={present:0,hidden:0},Fu={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Iu=Object.keys(Fu),Lu=[`state`,`volume`,`simulcastEncodings`],Ru={androidInCallNotification:{title:`string`,subtitle:`string`,iconName:`string`,disableForCustomOverride:`boolean`},disableAutoDeviceManagement:{audio:`boolean`,video:`boolean`}},zu={id:{iconPath:`string`,iconPathDarkMode:`string`,label:`string`,tooltip:`string`,visualState:`'default' | 'sidebar-open' | 'active'`}},Bu={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`}},Vu=/^[a-zA-Z0-9_-]+$/;function Hu(e){if(e!=null&&L(e)===`object`&&!Array.isArray(e)){var t,n={},r=Ou(Object.entries(e).slice(0,10));try{for(r.s();!(t=r.n()).done;){var i=zn(t.value,2),a=i[0],o=i[1];typeof a!=`string`||a.length>64||Vu.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 Uu={customIntegrations:{validate:md,help:fd()},customTrayButtons:{validate:pd,help:`customTrayButtons should be a dictionary of the type ${JSON.stringify(zu)}`},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 hd(e,Ru)},help:`reactNativeConfig should look like ${JSON.stringify(Ru)}, 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 rd(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:Wc};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:Wc};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 L(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 id(e,{allowAllParticipantsKey:!1})},help:dd({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!!ad(e)&&(t._inputSettings||={},od(e,t.properties?.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:ud()},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(L(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=zn(r[n],2),a=i[0],o=i[1];if(typeof a!=`string`||a.length>64||!Vu.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},Wu={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)||!tl()&&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${tl()?``:` | '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=zn(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=Ou(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=zn(Su.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=Ou(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=R(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 Gu=function(){function e(t){var n,r,i,a,o,s,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Dn(this,e),i=this,a=Mn(a=e),Fn(r=jn(i,Du()?Reflect.construct(a,o||[],Mn(i).constructor):a.apply(i,o)),`startListeningForDeviceChanges`,function(){cu(r.handleDeviceChange)}),Fn(r,`stopListeningForDeviceChanges`,function(){lu(r.handleDeviceChange)}),Fn(r,`handleDeviceChange`,function(e){e=e.map(function(e){return JSON.parse(JSON.stringify(e))}),r.emitDailyJSEvent({action:`available-devices-updated`,availableDevices:e})}),Fn(r,`handleNativeAppStateChange`,function(){var e=R(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)}}()),Fn(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)))}),Fn(r,`handleNativeSystemScreenCaptureStop`,function(){r.stopScreenShare()}),!dl()&&!tl())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(Au).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=ar(),Au[(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=Hu(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=U({},c),r.properties.aboutClient!==void 0&&(r.properties.aboutClient=Hu(r.properties.aboutClient)),r._inputSettings||(r._inputSettings={}),r._callObjectLoader=r._callObjectMode?new Ll(r.callClientId):null,r._callState=`new`,r._isPreparingToJoin=!1,r._accessState={access:`unknown`},r._meetingSessionSummary={},r._finalSummaryOfPrevSession={},r._meetingSessionState=yd(Nu,r._callObjectMode),r._nativeInCallAudioMode=ju,r._participants={},r._isScreenSharing=!1,r._participantCounts=Pu,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=Rc,r._messageChannel=tl()?new Ol:new Tl,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`}))})),tl()){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 Pn(e,Wn),An(e,[{key:`destroy`,value:(ue=R(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),tl()){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 Au[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 ue.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 td(),this.sendMessageToCallMachine({action:`load-css`,cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:`iframe`,value:function(){return td(),this._iframe}},{key:`meetingState`,value:function(){return this._callState}},{key:`accessState`,value:function(){return $u(this._callObjectMode,`accessState()`),this._accessState}},{key:`participants`,value:function(){return this._participants}},{key:`participantCounts`,value:function(){return this._participantCounts}},{key:`waitingParticipants`,value:function(){return $u(this._callObjectMode,`waitingParticipants()`),this._waitingParticipants}},{key:`validateParticipantProperties`,value:function(e,t){for(var n in t){if(!Wu[n])throw Error(`unrecognized updateParticipant property ${n}`);if(Wu[n].validate&&!Wu[n].validate(t[n],this,this._participants[e]))throw Error(Wu[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:(le=R(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($u(this._callObjectMode,`updateWaitingParticipant()`),Ju(this._callState,`updateWaitingParticipant()`),typeof t!=`string`||L(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 le.apply(this,arguments)})},{key:`updateWaitingParticipants`,value:(ce=R(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if($u(this._callObjectMode,`updateWaitingParticipants()`),Ju(this._callState,`updateWaitingParticipants()`),L(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 ce.apply(this,arguments)})},{key:`requestAccess`,value:(O=R(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.access,r=n===void 0?{level:Rs}:n,i=t.name,a=i===void 0?``:i;return $u(this._callObjectMode,`requestAccess()`),Ju(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 O.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&&(tl()?(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:(se=R(function*(e){var t=this,n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,r=n!==void 0&&n;if($u(this._callObjectMode,`getReceiveSettings()`),!this._callMachineInitialized)return this._receiveSettings;switch(L(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 se.apply(this,arguments)})},{key:`updateReceiveSettings`,value:(oe=R(function*(e){var t=this;if($u(this._callObjectMode,`updateReceiveSettings()`),!id(e,{allowAllParticipantsKey:!0}))throw Error(dd({allowAllParticipantsKey:!0}));return Ju(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:U({},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=U({},e.audio.processor);delete a._isDefaultWhenNone,n.audio=U(U({},n.audio),{},{processor:a})}}if(e.video){var o;e.video.settings&&(!Object.keys(e.video.settings).length&&t||(n.video={settings:U({},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=U({},e.video.processor);delete c._isDefaultWhenNone,n.video=U(U({},n.video),{},{processor:c})}}return n}}},{key:`getInputSettings`,value:function(){var e=this;return td(),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=U(U({},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=U(U({},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=R(function*(e){var t=this;return td(),ad(e)?e.video||e.audio?(od(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(ud()),Promise.reject(ud()))}),function(e){return ae.apply(this,arguments)})},{key:`setBandwidth`,value:function(e){var t=e.kbs,n=e.trackConstraints;if(td(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:`set-bandwidth`,kbs:t,trackConstraints:n}),this}},{key:`getDailyLang`,value:function(){var e=this;if(td(),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 td(),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:(D=R(function*(){var e=this;return console.warn(`getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately`),Ju(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 D.apply(this,arguments)})},{key:`meetingSessionState`,value:function(){return Ju(this._callState,`meetingSessionState`),this._meetingSessionState}},{key:`setMeetingSessionData`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`replace`;$u(this._callObjectMode,`setMeetingSessionData()`),Ju(this._callState,`setMeetingSessionData`);try{(function(e,t){new Ml({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:tl()||!!t&&!!t.thisMeetingOnly},function(e){delete e.action,delete e.callbackStamp,r(e)})})}},{key:`setUserData`,value:(ie=R(function*(e){var t=this;try{rd(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`&&!tl())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=R(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if($u(this._callObjectMode,`startCamera()`),Xu(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=U(U({},this.properties),t)}return new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`start-camera`,properties:qu(e.properties,e.callClientId),preloadCache:qu(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 td(),Ju(this._callState,`startCustomTrack()`),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise(function(n,r){e._sharedTracks.customTrack=t.track,t.track=Wc,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 td(),Ju(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 nd(),Zu(this._callMachineInitialized,`setCamera()`),new Promise(function(n){t.sendMessageToCallMachine({action:`set-camera`,cameraDeviceId:e},function(e){n({device:e.device})})})}},{key:`setAudioDevice`,value:(ne=R(function*(e){return nd(),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 td(),new Promise(function(t){e.sendMessageToCallMachine({action:`cycle-mic`},function(e){t({device:e.device})})})}},{key:`getCameraFacingMode`,value:function(){var e=this;return nd(),new Promise(function(t){e.sendMessageToCallMachine({action:`get-camera-facing-mode`},function(e){t(e.facingMode)})})}},{key:`setInputDevicesAsync`,value:(te=R(function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,a=e.videoSource;if(td(),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=Wc,o.audio={settings:{customTrack:n}}):(delete this._sharedTracks.audioTrack,o.audio={settings:{deviceId:n}})),r&&(r instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=r,r=Wc,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=R(function*(e){var t=this,n=e.outputDeviceId;if(td(),!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=R(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 nd(),this._nativeInCallAudioMode}},{key:`setNativeInCallAudioMode`,value:function(e){if(nd(),[ju,Mu].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement(`audio`)&&Yu(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error(`invalid in-call audio mode specified: `,e)}},{key:`preAuth`,value:(T=R(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if($u(this._callObjectMode,`preAuth()`),Xu(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=U(U({},this.properties),t),new Promise(function(t,n){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:`daily-method-preauth`,properties:qu(e.properties,e.callClientId),preloadCache:qu(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=R(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=U(U({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw Error(`can't load iframe meeting because url property isn't set`);if(this._updateCallState(js),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(Ms),n&&t.emitDailyJSEvent({action:`loaded`}),e()},function(e,r){t.emitDailyJSEvent({action:Us}),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:mr(t.properties.dailyConfig)}}}),n(e.msg))})});var n=_r(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>
|
|
37
9
|
<html>
|
|
38
10
|
<head>
|
|
39
11
|
<meta charset="utf-8">
|
|
@@ -65,12 +37,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
65
37
|
<body>
|
|
66
38
|
<div class="card"><h1>Failed to load</h1><p>${s}</p></div>
|
|
67
39
|
</body>
|
|
68
|
-
</html>`),t._handleFatalError({action:
|
|
40
|
+
</html>`),t._handleFatalError({action:Lc,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=fr(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):(ur(dr(c)),t._updateCallState(Ms),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e())}};a()})}}),function(e){return w.apply(this,arguments)})},{key:`join`,value:(C=R(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=U(U({},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(Ns,!1),this.emitDailyJSEvent({action:qs}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:`join-meeting`,properties:qu(this.properties,this.callClientId),preloadCache:qu(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(Fs),void n(a);if(e._updateCallState(`joined-meeting`),i)for(var o in i){if(e._callObjectMode){var s=e._callMachine().store;Xl(i[o],s),Zl(i[o],s),$l(i[o],e._participants[o],s)}e._participants[o]=U({},i[o]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}r&&e.loadCss(e.properties),t(i)}else n(a)}}))}),function(){return C.apply(this,arguments)})},{key:`leave`,value:(S=R(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(Fs),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:Fs}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:`leave-meeting`}))})}),function(){return S.apply(this,arguments)})},{key:`startScreenShare`,value:(x=R(function*(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Zu(this._callMachineInitialized,`startScreenShare()`),t.screenVideoSendSettings&&this._validateVideoSendSettings(`screenVideo`,t.screenVideoSendSettings),t.mediaStream&&=(this._sharedTracks.screenMediaStream=t.mediaStream,Wc),typeof DailyNativeUtils<`u`&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:Ic,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:Vc,captureOptions:t})}),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:Vc,captureOptions:t})}),function(){return x.apply(this,arguments)})},{key:`stopScreenShare`,value:function(){Zu(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(U({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(U({action:`local-recording-stop`},e))}},{key:`startLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(U({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:Hc,endpointsOp:Zc,endpoints:t,instanceId:n})}},{key:`removeLiveStreamingEndpoints`,value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:Hc,endpointsOp:Qc,endpoints:t,instanceId:n})}},{key:`stopLiveStreaming`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(U({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.`),fl()&&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(!vd(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(Iu.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(!vd(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(Iu));if(n&&!i.hasOwnProperty(`maxBitrate`))throw Error(`maxBitrate is not specified`)}}}},{key:`startRemoteMediaPlayer`,value:(b=R(function*(e){var t=this,n=e.url,r=e.settings,i=r===void 0?{state:qc.PLAY}:r;try{(function(e){if(typeof e!=`string`)throw Error(`url parameter must be "string" type`)})(n),_d(i),function(e){for(var t in e)if(!Lu.includes(t))throw Error(`Invalid key ${t}, valid keys are: ${Lu}`);e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,Fu,!0)}(i)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`startRemoteMediaPlayer arguments must be of the form:
|
|
69
41
|
{ url: "playback url",
|
|
70
42
|
settings?:
|
|
71
|
-
{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=R(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=R(function*(e){var t=this,n=e.session_id,r=e.settings;try{
|
|
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=R(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=R(function*(e){var t=this,n=e.session_id,r=e.settings;try{_d(r)}catch(e){throw console.error(`invalid argument Error: ${e}`),console.error(`updateRemoteMediaPlayer arguments must be of the form:
|
|
72
44
|
session_id: "participant session",
|
|
73
|
-
{ 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){zm(this._callState,`startTranscription()`),this.sendMessageToCallMachine(U({action:`daily-method-start-transcription`},e))}},{key:`updateTranscription`,value:function(e){if(zm(this._callState,`updateTranscription()`),!e)throw Error(`updateTranscription Error: options is mandatory`);if(vo(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(U({action:`daily-method-update-transcription`},e))}},{key:`stopTranscription`,value:function(e){if(zm(this._callState,`stopTranscription()`),e&&vo(e)!==`object`)throw Error(`stopTranscription Error: options must be object type`);if(e&&!e.instanceId)throw Error(`"instanceId" not provided`);this.sendMessageToCallMachine(U({action:`daily-method-stop-transcription`},e))}},{key:`startDialOut`,value:(_=R(function*(e){var t=this;zm(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(vo(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(Lm(e),e.permissions&&e.permissions.canReceive){var i=Ao(pm.validateJSONObject(e.permissions.canReceive),2),a=i[0],o=i[1];if(!a)throw Error(o)}if(e.provider){if(e.provider!==zf&&e.provider!==Bf)throw Error(`Error: provider can be set only to '${zf}' or '${Bf}', got: ${e.provider}`);if(e.phoneNumber)throw Error(`Error starting dial out: provider valid only for sipUri, not phoneNumber`);e.provider===zf&&console.warn(`(pre-beta) provider=${zf} is currently in pre-beta, things might break!`)}else e.provider=Bf;return new Promise(function(n,r){t.sendMessageToCallMachine(U({action:`dialout-start`},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return _.apply(this,arguments)})},{key:`startDialIn`,value:(g=R(function*(e){var t=this;if(zm(this._callState,`startDialIn()`),!e||vo(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&&(vo(e.codecs)!==`object`||e.codecs===null))throw Error(`Error starting dial in: codecs must be an object`);if(e.permissions!==void 0&&(vo(e.permissions)!==`object`||e.permissions===null))throw Error(`Error starting dial in: permissions must be an object`);if(e.provider){if(e.provider!==zf&&e.provider!==Bf)throw Error(`Error starting dial in: provider must be '${zf}' or '${Bf}'`)}else e=U(U({},e),{},{provider:Bf});return new Promise(function(n,r){t.sendMessageToCallMachine(U({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 zm(this._callState,`stopDialOut()`),new Promise(function(n,r){t.sendMessageToCallMachine(U({action:`dialout-stop`},e),function(e){e.error?r(e.error):n(e)})})}},{key:`sipCallTransfer`,value:(h=R(function*(e){var t=this;if(zm(this._callState,`sipCallTransfer()`),!e)throw Error(`sipCallTransfer() requires a sessionId and toEndPoint`);return e.useSipRefer=!1,sh(e,`sipCallTransfer`),Lm(e),new Promise(function(n,r){t.sendMessageToCallMachine(U({action:Wf},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return h.apply(this,arguments)})},{key:`sipRefer`,value:(m=R(function*(e){var t=this;if(zm(this._callState,`sipRefer()`),!e)throw Error(`sessionId and toEndPoint are mandatory parameter`);return e.useSipRefer=!0,sh(e,`sipRefer`),new Promise(function(n,r){t.sendMessageToCallMachine(U({action:Wf},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return m.apply(this,arguments)})},{key:`sendDTMF`,value:(p=R(function*(e){var t=this;return zm(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(U({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(U(U({},e._network),{},{stats:n.stats}))})}):Promise.resolve(U({stats:{latest:{}}},this._network))}},{key:`testWebsocketConnectivity`,value:(f=R(function*(){var e=this;if(Um(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?!!rm(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=R(function*(){var e=this;Km(),Wm(this._callObjectMode,`testCallQuality()`),Hm(this._callMachineInitialized,`testCallQuality()`,null,!0),Vm(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=go(i,hm);if(a===`failed`){var s,c=U({},o);(s=o.error)!=null&&s.details?(o.error.details=JSON.parse(o.error.details),c.error=U(U({},c.error),{},{details:U({},c.error.details)}),c.error.details.duringTest=`testCallQuality`):(c.error=c.error?U({},c.error):{},c.error.details={duringTest:`testCallQuality`}),e._maybeSendToSentry(c)}n(!1),t(U({result:a},o))})})}),function(){return d.apply(this,arguments)})},{key:`stopTestCallQuality`,value:function(){this.sendMessageToCallMachine({action:`stop-test-call-quality`})}},{key:`testConnectionQuality`,value:(u=R(function*(e){var t;Kf()?(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=R(function*(e){var t=this;if(Um(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(){Kf()?(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=R(function*(e){var t=this;if(Um(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(Dm))}},{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(vo(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=Ao(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 Km(),this._activeSpeaker}},{key:`setActiveSpeakerMode`,value:function(e){return Km(),this.sendMessageToCallMachine({action:`set-active-speaker-mode`,enabled:e}),this}},{key:`activeSpeakerMode`,value:function(){return Km(),this._activeSpeakerMode}},{key:`subscribeToTracksAutomatically`,value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:`setSubscribeToTracksAutomatically`,value:function(e){return zm(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=R(function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return ap()===`Firefox`&&op().major>115&&op().major<123&&(t=t.filter(function(e){return e.kind!==`audiooutput`})),{devices:t.map(function(e){var t=JSON.parse(JSON.stringify(e));if(!Kf()&&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(zm(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 Km(),zm(this._callState,`addFakeParticipant()`),this.sendMessageToCallMachine(U({action:`add-fake-participant`},e)),this}},{key:`setShowNamesMode`,value:function(e){return Gm(this._callObjectMode,`setShowNamesMode()`),Km(),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 Gm(this._callObjectMode,`setShowLocalVideo()`),Km(),zm(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 Gm(this._callObjectMode,`showLocalVideo()`),Km(),this._showLocalVideo}},{key:`setShowParticipantsBar`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Gm(this._callObjectMode,`setShowParticipantsBar()`),Km(),zm(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 Gm(this._callObjectMode,`showParticipantsBar()`),Km(),this._showParticipantsBar}},{key:`customIntegrations`,value:function(){return Km(),Gm(this._callObjectMode,`customIntegrations()`),this._customIntegrations}},{key:`setCustomIntegrations`,value:function(e){return Km(),Gm(this._callObjectMode,`setCustomIntegrations()`),zm(this._callState,`setCustomIntegrations()`),ah(e)?(this.sendMessageToCallMachine({action:`set-custom-integrations`,integrations:e}),this._customIntegrations=e,this):this}},{key:`startCustomIntegrations`,value:function(e){var t=this;if(Km(),Gm(this._callObjectMode,`startCustomIntegrations()`),zm(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(Km(),Gm(this._callObjectMode,`stopCustomIntegrations()`),zm(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 Gm(this._callObjectMode,`customTrayButtons()`),Km(),this._customTrayButtons}},{key:`updateCustomTrayButtons`,value:function(e){return Gm(this._callObjectMode,`updateCustomTrayButtons()`),Km(),zm(this._callState,`updateCustomTrayButtons()`),ih(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(Am)}`),this)}},{key:`theme`,value:function(){return Gm(this._callObjectMode,`theme()`),this.properties.theme}},{key:`setTheme`,value:function(e){var t=this;return Gm(this._callObjectMode,`setTheme()`),new Promise(function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=U({},e),t.sendMessageToCallMachine({action:`set-theme`,theme:t.properties.theme});try{t.emitDailyJSEvent({action:Md,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=R(function*(){if(Km(),this._iframe&&!document.fullscreenElement&&Yf())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(){Km(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:`getSidebarView`,value:(a=R(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=R(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=R(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=R(function*(e){var t=this;return Km(),zm(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=R(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(Km(),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 Fo.prototype.on.call(this,e,t)}},{key:`once`,value:function(e,t){return Fo.prototype.once.call(this,e,t)}},{key:`off`,value:function(e,t){return Fo.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;Kf()||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=U(U({},i.audio.settings),e.dailyConfig.userMediaAudioConstraints),e.inputSettings=i,delete e.dailyConfig.userMediaAudioConstraints}if(e!=null&&(n=e.dailyConfig)!=null&&n.userMediaVideoConstraints){var a;Kf()||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=U(U({},o.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=o,delete e.dailyConfig.userMediaVideoConstraints}for(var s in e)if(Pm[s]){if(Pm[s].validate&&!Pm[s].validate(e[s],this))throw Error(`property '${s}': ${Pm[s].help}`)}else console.warn(`Ignoring unrecognized property '${s}'`),delete e[s]}},{key:`assembleMeetingUrl`,value:function(){var e,t=U(U({},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(Pm).filter(function(e){return Pm[e].queryString&&t[e]!==void 0}).map(function(e){return`${Pm[e].queryString}=${t[e]}`}).join(`&`)}},{key:`needsLoad`,value:function(){return[`new`,xd,Td,Ed].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 Ad:this.sendMessageToCallMachine(U({action:jd},this.properties));break;case`call-machine-initialized`:this._callMachineInitialized=!0;var t=es(),n={action:Pf,level:`log`,code:1011,stats:{event:`bundle load`,time:this._bundleLoadTime===`no-op`?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime===`no-op`,url:as(this.properties.dailyConfig),resolvedBaseDomain:t,failedOver:t!=null&&t!==`daily.co`}};this.sendMessageToCallMachine(n),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case Pd:this._loadedCallback&&=(this._loadedCallback(),null),this.emitDailyJSEvent(e);break;case Rd:var r=U({},e);delete r.internal,this._maxAppMessageSize=e.internal?._maxAppMessageSize||kf,this._joinedCallback&&=(this._joinedCallback(e.participants),null),this.emitDailyJSEvent(r);break;case Bd:case Vd: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;Vp(e.participant,a),Hp(e.participant,a),Wp(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]=U({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case Hd: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 Ud:Ro(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case Wd:var s={access:e.access};e.awaitingAccess&&(s.awaitingAccess=e.awaitingAccess),Ro(this._accessState,s)||(this._accessState=s,this.emitDailyJSEvent(e));break;case Gd:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var c=U(U({},e),{},{action:`meeting-session-updated`});this.emitDailyJSEvent(c)}break;case Of:this._handleFatalError(e);break;case zd: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 gf:var l=e.state,u=e.threshold,d=e.quality,f=l.state,p=l.reasons;f===this._network.networkState&&Ro(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 vf:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case yf:e&&e.faceCounts!==void 0&&this.emitDailyJSEvent(e);break;case mf: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 hf:var g=e.enabled;this._activeSpeakerMode!==g&&(this._activeSpeakerMode=g,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case qd:case Jd:case Yd:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case Tf:Ro(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case Ef:this._maybeUpdateInputSettings(e.inputSettings);break;case`send-settings-updated`:Ro(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 cf:var _=e.session_id;this._rmpPlayerState[_]=e.playerState,this.emitDailyJSEvent(e);break;case uf:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case lf: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 Kd:var b=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=uh(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||b)&&this.emitDailyJSEvent(e);break;case df:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case ff:case pf:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case $d:case ef:case tf:case nf:case rf:case Xd:case Zd:case Qd:case Fd:case Id:case of:case sf:case`test-completed`:case _f:case af:case bf:case xf:case Sf:case Cf:case Df:case wf: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!!Ro(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 Kf()?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===wd;this.updateShowAndroidOngoingMeetingNotification(i);var a=Bm(n,r),o=Bm(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(Ed),this.resetMeetingDependentVars(),this._loadedCallback&&=(this._loadedCallback(e.errorMsg),null),e.preserveIframe;var n=go(e,gm);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=Tm,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Dd},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=uh(wm,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=kf,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:`updateKeepDeviceAwake`,value:function(e){Kf()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:`updateDeviceAudioMode`,value:function(e){if(Kf()&&!this.disableReactNativeAutoDeviceManagement(`audio`)){var t=e?this._nativeInCallAudioMode:`idle`;this.nativeUtils().setAudioMode(t)}}},{key:`updateShowAndroidOngoingMeetingNotification`,value:function(e){if(Kf()&&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){Kf()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:`toggleParticipantAudioBasedOnNativeAudioFocus`,value:function(){var e;if(Kf()){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(xm)[0];if(this.needsLoad())if(e&&!e.needsLoad()){var t={action:Pf,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:Pf,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(xm);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:Pf,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 Lu({dsn:`https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844`,transport:Qu,stackParser:ad,integrations:function(e){let t=[eu(),Ql(),ud(),cd(),gd(),bd(),lu(),yd()];return!1!==e.autoSessionTracking&&t.push(hd()),t}({}).filter(function(e){return![`BrowserApiErrors`,`Breadcrumbs`,`GlobalHandlers`].includes(e.name)}),environment:s}),m=new jc;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=U({},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?Kf()?`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(!Ro(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();Ro(t,n)||this.emitDailyJSEvent({action:`input-settings-updated`,inputSettings:n})}}}],[{key:`supportedBrowser`,value:function(){if(Kf())return{supported:!0,mobile:!0,name:`React Native`,version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=Jo.getParser(Gf());return{supported:!!np(),mobile:e.getPlatformType()===`mobile`,name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!Yf(),supportsScreenShare:!!Jf(),supportsSfu:!!np(),supportsVideoProcessing:ep(),supportsAudioProcessing:tp()}}},{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(Km(),!t||!t.contentWindow||typeof t.src!=`string`)throw Error(`DailyIframe::Wrap needs an iframe-like first argument`);return n.layout||(n.customLayout?n.layout=`custom-v1`:n.layout=`browser`),new e(t,n)}},{key:`createFrame`,value:function(t,n){var r,i;Km(),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`);window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?o.allow=`microphone, camera`:o.allow=`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]:{};Km();var n=document.createElement(`iframe`);return n.allow=`microphone; camera; autoplay`,n.style.cssText=`
|
|
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){Ju(this._callState,`startTranscription()`),this.sendMessageToCallMachine(U({action:`daily-method-start-transcription`},e))}},{key:`updateTranscription`,value:function(e){if(Ju(this._callState,`updateTranscription()`),!e)throw Error(`updateTranscription Error: options is mandatory`);if(L(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(U({action:`daily-method-update-transcription`},e))}},{key:`stopTranscription`,value:function(e){if(Ju(this._callState,`stopTranscription()`),e&&L(e)!==`object`)throw Error(`stopTranscription Error: options must be object type`);if(e&&!e.instanceId)throw Error(`"instanceId" not provided`);this.sendMessageToCallMachine(U({action:`daily-method-stop-transcription`},e))}},{key:`startDialOut`,value:(_=R(function*(e){var t=this;Ju(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(L(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(Ku(e),e.permissions&&e.permissions.canReceive){var i=zn(Su.validateJSONObject(e.permissions.canReceive),2),a=i[0],o=i[1];if(!a)throw Error(o)}if(e.provider){if(e.provider!==Jc&&e.provider!==Yc)throw Error(`Error: provider can be set only to '${Jc}' or '${Yc}', got: ${e.provider}`);if(e.phoneNumber)throw Error(`Error starting dial out: provider valid only for sipUri, not phoneNumber`);e.provider===Jc&&console.warn(`(pre-beta) provider=${Jc} is currently in pre-beta, things might break!`)}else e.provider=Yc;return new Promise(function(n,r){t.sendMessageToCallMachine(U({action:`dialout-start`},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return _.apply(this,arguments)})},{key:`startDialIn`,value:(g=R(function*(e){var t=this;if(Ju(this._callState,`startDialIn()`),!e||L(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&&(L(e.codecs)!==`object`||e.codecs===null))throw Error(`Error starting dial in: codecs must be an object`);if(e.permissions!==void 0&&(L(e.permissions)!==`object`||e.permissions===null))throw Error(`Error starting dial in: permissions must be an object`);if(e.provider){if(e.provider!==Jc&&e.provider!==Yc)throw Error(`Error starting dial in: provider must be '${Jc}' or '${Yc}'`)}else e=U(U({},e),{},{provider:Yc});return new Promise(function(n,r){t.sendMessageToCallMachine(U({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 Ju(this._callState,`stopDialOut()`),new Promise(function(n,r){t.sendMessageToCallMachine(U({action:`dialout-stop`},e),function(e){e.error?r(e.error):n(e)})})}},{key:`sipCallTransfer`,value:(h=R(function*(e){var t=this;if(Ju(this._callState,`sipCallTransfer()`),!e)throw Error(`sipCallTransfer() requires a sessionId and toEndPoint`);return e.useSipRefer=!1,gd(e,`sipCallTransfer`),Ku(e),new Promise(function(n,r){t.sendMessageToCallMachine(U({action:$c},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return h.apply(this,arguments)})},{key:`sipRefer`,value:(m=R(function*(e){var t=this;if(Ju(this._callState,`sipRefer()`),!e)throw Error(`sessionId and toEndPoint are mandatory parameter`);return e.useSipRefer=!0,gd(e,`sipRefer`),new Promise(function(n,r){t.sendMessageToCallMachine(U({action:$c},e),function(e){e.error?r(e.error):n(e)})})}),function(e){return m.apply(this,arguments)})},{key:`sendDTMF`,value:(p=R(function*(e){var t=this;return Ju(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(U({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(U(U({},e._network),{},{stats:n.stats}))})}):Promise.resolve(U({stats:{latest:{}}},this._network))}},{key:`testWebsocketConnectivity`,value:(f=R(function*(){var e=this;if(Qu(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?!!fu(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=R(function*(){var e=this;td(),$u(this._callObjectMode,`testCallQuality()`),Zu(this._callMachineInitialized,`testCallQuality()`,null,!0),Xu(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=En(i,wu);if(a===`failed`){var s,c=U({},o);(s=o.error)!=null&&s.details?(o.error.details=JSON.parse(o.error.details),c.error=U(U({},c.error),{},{details:U({},c.error.details)}),c.error.details.duringTest=`testCallQuality`):(c.error=c.error?U({},c.error):{},c.error.details={duringTest:`testCallQuality`}),e._maybeSendToSentry(c)}n(!1),t(U({result:a},o))})})}),function(){return d.apply(this,arguments)})},{key:`stopTestCallQuality`,value:function(){this.sendMessageToCallMachine({action:`stop-test-call-quality`})}},{key:`testConnectionQuality`,value:(u=R(function*(e){var t;tl()?(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=R(function*(e){var t=this;if(Qu(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(){tl()?(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=R(function*(e){var t=this;if(Qu(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(Iu))}},{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(L(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=zn(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 td(),this._activeSpeaker}},{key:`setActiveSpeakerMode`,value:function(e){return td(),this.sendMessageToCallMachine({action:`set-active-speaker-mode`,enabled:e}),this}},{key:`activeSpeakerMode`,value:function(){return td(),this._activeSpeakerMode}},{key:`subscribeToTracksAutomatically`,value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:`setSubscribeToTracksAutomatically`,value:function(e){return Ju(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=R(function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return ml()===`Firefox`&&hl().major>115&&hl().major<123&&(t=t.filter(function(e){return e.kind!==`audiooutput`})),{devices:t.map(function(e){var t=JSON.parse(JSON.stringify(e));if(!tl()&&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(Ju(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 td(),Ju(this._callState,`addFakeParticipant()`),this.sendMessageToCallMachine(U({action:`add-fake-participant`},e)),this}},{key:`setShowNamesMode`,value:function(e){return ed(this._callObjectMode,`setShowNamesMode()`),td(),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 ed(this._callObjectMode,`setShowLocalVideo()`),td(),Ju(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 ed(this._callObjectMode,`showLocalVideo()`),td(),this._showLocalVideo}},{key:`setShowParticipantsBar`,value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return ed(this._callObjectMode,`setShowParticipantsBar()`),td(),Ju(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 ed(this._callObjectMode,`showParticipantsBar()`),td(),this._showParticipantsBar}},{key:`customIntegrations`,value:function(){return td(),ed(this._callObjectMode,`customIntegrations()`),this._customIntegrations}},{key:`setCustomIntegrations`,value:function(e){return td(),ed(this._callObjectMode,`setCustomIntegrations()`),Ju(this._callState,`setCustomIntegrations()`),md(e)?(this.sendMessageToCallMachine({action:`set-custom-integrations`,integrations:e}),this._customIntegrations=e,this):this}},{key:`startCustomIntegrations`,value:function(e){var t=this;if(td(),ed(this._callObjectMode,`startCustomIntegrations()`),Ju(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(td(),ed(this._callObjectMode,`stopCustomIntegrations()`),Ju(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 ed(this._callObjectMode,`customTrayButtons()`),td(),this._customTrayButtons}},{key:`updateCustomTrayButtons`,value:function(e){return ed(this._callObjectMode,`updateCustomTrayButtons()`),td(),Ju(this._callState,`updateCustomTrayButtons()`),pd(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(zu)}`),this)}},{key:`theme`,value:function(){return ed(this._callObjectMode,`theme()`),this.properties.theme}},{key:`setTheme`,value:function(e){var t=this;return ed(this._callObjectMode,`setTheme()`),new Promise(function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=U({},e),t.sendMessageToCallMachine({action:`set-theme`,theme:t.properties.theme});try{t.emitDailyJSEvent({action:Hs,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=R(function*(){if(td(),this._iframe&&!document.fullscreenElement&&il())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(){td(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:`getSidebarView`,value:(a=R(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=R(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=R(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=R(function*(e){var t=this;return td(),Ju(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=R(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(td(),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 Wn.prototype.on.call(this,e,t)}},{key:`once`,value:function(e,t){return Wn.prototype.once.call(this,e,t)}},{key:`off`,value:function(e,t){return Wn.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;tl()||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=U(U({},i.audio.settings),e.dailyConfig.userMediaAudioConstraints),e.inputSettings=i,delete e.dailyConfig.userMediaAudioConstraints}if(e!=null&&(n=e.dailyConfig)!=null&&n.userMediaVideoConstraints){var a;tl()||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=U(U({},o.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=o,delete e.dailyConfig.userMediaVideoConstraints}for(var s in e)if(Uu[s]){if(Uu[s].validate&&!Uu[s].validate(e[s],this))throw Error(`property '${s}': ${Uu[s].help}`)}else console.warn(`Ignoring unrecognized property '${s}'`),delete e[s]}},{key:`assembleMeetingUrl`,value:function(){var e,t=U(U({},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(Uu).filter(function(e){return Uu[e].queryString&&t[e]!==void 0}).map(function(e){return`${Uu[e].queryString}=${t[e]}`}).join(`&`)}},{key:`needsLoad`,value:function(){return[`new`,js,Fs,Is].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 Bs:this.sendMessageToCallMachine(U({action:Vs},this.properties));break;case`call-machine-initialized`:this._callMachineInitialized=!0;var t=lr(),n={action:Uc,level:`log`,code:1011,stats:{event:`bundle load`,time:this._bundleLoadTime===`no-op`?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime===`no-op`,url:mr(this.properties.dailyConfig),resolvedBaseDomain:t,failedOver:t!=null&&t!==`daily.co`}};this.sendMessageToCallMachine(n),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case Ws:this._loadedCallback&&=(this._loadedCallback(),null),this.emitDailyJSEvent(e);break;case Js:var r=U({},e);delete r.internal,this._maxAppMessageSize=e.internal?._maxAppMessageSize||Rc,this._joinedCallback&&=(this._joinedCallback(e.participants),null),this.emitDailyJSEvent(r);break;case Xs:case Zs: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;Xl(e.participant,a),Zl(e.participant,a),$l(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]=U({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case Qs: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 $s:qn(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case ec:var s={access:e.access};e.awaitingAccess&&(s.awaitingAccess=e.awaitingAccess),qn(this._accessState,s)||(this._accessState=s,this.emitDailyJSEvent(e));break;case tc:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var c=U(U({},e),{},{action:`meeting-session-updated`});this.emitDailyJSEvent(c)}break;case Lc:this._handleFatalError(e);break;case Ys: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 Tc:var l=e.state,u=e.threshold,d=e.quality,f=l.state,p=l.reasons;f===this._network.networkState&&qn(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 Dc:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case Oc:e&&e.faceCounts!==void 0&&this.emitDailyJSEvent(e);break;case Cc: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 wc:var g=e.enabled;this._activeSpeakerMode!==g&&(this._activeSpeakerMode=g,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case rc:case ic:case ac:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case Pc:qn(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case Fc:this._maybeUpdateInputSettings(e.inputSettings);break;case`send-settings-updated`:qn(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 _c:var _=e.session_id;this._rmpPlayerState[_]=e.playerState,this.emitDailyJSEvent(e);break;case yc:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case vc: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 nc:var b=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=yd(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||b)&&this.emitDailyJSEvent(e);break;case bc:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case xc:case Sc:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case lc:case uc:case dc:case fc:case pc:case oc:case sc:case cc:case Gs:case Ks:case hc:case gc:case`test-completed`:case Ec:case mc:case kc:case Ac:case jc:case Mc:case Ic:case Nc: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!!qn(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 tl()?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===Ps;this.updateShowAndroidOngoingMeetingNotification(i);var a=Yu(n,r),o=Yu(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(Is),this.resetMeetingDependentVars(),this._loadedCallback&&=(this._loadedCallback(e.errorMsg),null),e.preserveIframe;var n=En(e,Tu);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=Pu,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Ls},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=yd(Nu,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=Rc,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:`updateKeepDeviceAwake`,value:function(e){tl()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:`updateDeviceAudioMode`,value:function(e){if(tl()&&!this.disableReactNativeAutoDeviceManagement(`audio`)){var t=e?this._nativeInCallAudioMode:`idle`;this.nativeUtils().setAudioMode(t)}}},{key:`updateShowAndroidOngoingMeetingNotification`,value:function(e){if(tl()&&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){tl()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:`toggleParticipantAudioBasedOnNativeAudioFocus`,value:function(){var e;if(tl()){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(Au)[0];if(this.needsLoad()){if(e&&!e.needsLoad()){var t={action:Uc,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:Uc,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(Au);e<t.length;e++){var n=t[e];n._callMachineInitialized?(n.sendMessageToCallMachine({action:Uc,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 qo({dsn:`https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844`,transport:cs,stackParser:hs,integrations:function(e){let t=[lo(),so(),bs(),vs(),Es(),As(),yo(),ks()];return!1!==e.autoSessionTracking&&t.push(Ts()),t}({}).filter(function(e){return![`BrowserApiErrors`,`Breadcrumbs`,`GlobalHandlers`].includes(e.name)}),environment:s}),m=new Bi;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=U({},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?tl()?`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(!qn(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var n=this._getInputSettings();qn(t,n)||this.emitDailyJSEvent({action:`input-settings-updated`,inputSettings:n})}}}],[{key:`supportedBrowser`,value:function(){if(tl())return{supported:!0,mobile:!0,name:`React Native`,version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=rr.getParser(el());return{supported:!!dl(),mobile:e.getPlatformType()===`mobile`,name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!il(),supportsScreenShare:!!rl(),supportsSfu:!!dl(),supportsVideoProcessing:ll(),supportsAudioProcessing:ul()}}},{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(td(),!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;td(),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]:{};td();var n=document.createElement(`iframe`);return n.allow=`microphone; camera; autoplay`,n.style.cssText=`
|
|
74
46
|
position: fixed;
|
|
75
47
|
top: 0;
|
|
76
48
|
left: 0;
|
|
@@ -78,15 +50,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
78
50
|
height: 100%;
|
|
79
51
|
border: 0;
|
|
80
52
|
pointer-events: none;
|
|
81
|
-
`,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?xm[e]:Object.values(xm)[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,ee,E,D,te,ne,re,O,ie,ae,k,A,oe,se,ce}();function Lm(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 Rm(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]=Ff;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 zm(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 Bm(e,t){return[`joining-meeting`,`joined-meeting`].includes(e)||t}function Vm(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(Bm(e,t)){var i=`${n} not supported after joining a meeting.`;throw r&&(i+=` ${r}`),console.error(i),Error(i)}}function Hm(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 Um(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 Wm(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 Gm(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 Km(){if(Kf())throw Error(`This daily-js method is not currently supported in React Native`)}function qm(){if(!Kf())throw Error(`This daily-js method is only supported in React Native`)}function Jm(e){if(e===void 0)return!0;var t;if(typeof e==`string`)t=e;else try{t=JSON.stringify(e),Ro(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 Ym(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=Ao(s[o],2),l=c[0],u=c[1];if(!r(l)||!a(u))return!1}return!0}function Xm(e){if(vo(e)!==`object`)return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=Ao(n[t],2),i=r[0],a=r[1];switch(i){case`video`:if(vo(a)!==`object`)return!1;for(var o=0,s=Object.entries(a);o<s.length;o++){var c=Ao(s[o],2),l=c[0],u=c[1];switch(l){case`processor`:if(!$m(u))return!1;break;case`settings`:if(!eh(u))return!1;break;default:return!1}}break;case`audio`:if(vo(a)!==`object`)return!1;for(var d=0,f=Object.entries(a);d<f.length;d++){var p=Ao(f[d],2),m=p[0],h=p[1];switch(m){case`processor`:if(!Qm(h))return!1;break;case`settings`:if(!eh(h))return!1;break;default:return!1}}break;default:return!1}}return!0}function Zm(e,t,n){var r,i=[];e.video&&e.video.processor&&(ep((r=t?.useLegacyVideoProcessor)!=null&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push(`video`))),e.audio&&e.audio.processor&&(tp()||(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:Ff}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:Ff}):delete n.videoTrack)}function Qm(e){if(Kf())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`];return!!e&&vo(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(Lf).includes(e)?!0:(console.error(`inputSettings audio processor type invalid`),!1):!1}(e.type))}function $m(e){if(Kf())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`,`config`];return!e||vo(e)!==`object`||!function(e){return typeof e==`string`?Object.values(If).includes(e)?!0:(console.error(`inputSettings video processor type invalid`),!1):!1}(e.type)||e.config&&(vo(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 If.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 If.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(ls(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 Vf.includes(r)}catch(e){return console.error(`failed to deduce blob content type`,e),!1}var i=n.split(`.`).at(-1).toLowerCase().trim();return Vf.includes(i)}(e.source)||(console.error(`invalid image type; supported types: [${Vf.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 eh(e){return vo(e)===`object`&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function th(){return`inputSettings must be of the form: { video?: { processor?: { type: [ ${Object.values(If).join(` | `)} ], config?: {} } }, audio?: { processor: {type: [ ${Object.values(Lf).join(` | `)} ] } } }`}function nh(e){return`receiveSettings must be of the form { [<remote participant id> | ${kd}${e.allowAllParticipantsKey?` | "*"`:``}]: { [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}`}function rh(){return`customIntegrations should be an object of type ${JSON.stringify(jm)}.`}function ih(e){if(e&&vo(e)!==`object`||Array.isArray(e))return console.error(`customTrayButtons should be an Object of the type ${JSON.stringify(Am)}.`),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=Ao(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var o=Ao(a[i],2),s=o[0],c=o[1],l=Am.id[s];if(!l)return console.error(`customTrayButton does not support key ${s}`),!1;switch(s){case`iconPath`:case`iconPathDarkMode`:if(!ls(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(vo(c)!==l)return console.error(`customTrayButton ${s} should be a ${l}.`),!1}}return!0}function ah(e){if(!e||e&&vo(e)!==`object`||Array.isArray(e))return console.error(rh()),!1;for(var t=function(e){return`${e} should be ${jm.id[e]}`},n=function(e,t){return console.error(`customIntegration ${e}: ${t}`)},r=0,i=Object.entries(e);r<i.length;r++){var a=Ao(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=Ao(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(!ls(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(!ls(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(!jm.id[l])return console.error(`customIntegration does not support key ${l}`),!1}}}return!0}function oh(e,t){if(t===void 0)return!1;switch(vo(t)){case`string`:return vo(e)===t;case`object`:if(vo(e)!==`object`)return!1;for(var n in e)if(!oh(e[n],t[n]))return!1;return!0;default:return!1}}function sh(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 ch(e){if(vo(e)!==`object`)throw Error(`RemoteMediaPlayerSettings: must be "object" type`);if(e.state&&!Object.values(Rf).includes(e.state))throw Error(`Invalid value for RemoteMediaPlayerSettings.state, valid values are: `+JSON.stringify(Rf));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 lh(e,t,n){return!(typeof e!=`number`||e<t||e>n)}function uh(e,t){return e&&!t&&delete e.data,e}function dh(e){"@babel/helpers - typeof";return dh=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},dh(e)}var W=function(){return W=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},W.apply(this,arguments)};function fh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ph(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function mh(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function hh(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function gh(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function _h(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var vh=Ae(null),yh=function(){var e=st(vh);return ct(e),e},bh=Ae({on:function(){},off:function(){}}),xh=-1,Sh=function(){return xh--},Ch=1,wh=function(){return Ch++},G=function(e,t,n){n===void 0&&(n=!1);var r=st(bh),i=r.off,a=r.on,o=gh(j(!1),2),s=o[0],c=o[1],l=N(0),u=P(function(){return n?Sh():wh()},[n]);M(function(){if(!(!e||s)){if(l.current>1e5){console.error(`useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.
|
|
82
|
-
Memoize using useCallback to avoid re-render loop or reduce the amount of state transitions the callback depends on.
|
|
83
|
-
Passed callback for '${e}' event is NOT registered.`,t),c(!0);return}l.current++;var n=setTimeout(function(){l.current=0},50);return a(e,t,u),function(){clearTimeout(n),i(e,u)}}},[t,e,u,s,i,a]),ct({event:e,eventId:u,isBlocked:s,callback:t})};function Th(e,t){var n,r;if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!Th(e[i],t[i]))return!1;return!0}if(MediaStream&&e instanceof MediaStream&&t instanceof MediaStream)return e.id===t.id&&e.active===t.active&&e.getTracks().length===t.getTracks().length&&e.getTracks().every(function(e,n){return Th(e,t.getTracks()[n])});if(MediaStreamTrack&&e instanceof MediaStreamTrack&&t instanceof MediaStreamTrack)return e.id===t.id&&e.kind===t.kind&&e.readyState===t.readyState;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.flags===t.flags;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;var a=Array.from(e).sort(),o=Array.from(t).sort();return a.every(function(e,t){return Th(e,o[t])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=hh(e.entries()),c=s.next();!c.done;c=s.next()){var l=gh(c.value,2),u=l[0],d=l[1];if(!t.has(u)||!Th(d,t.get(u)))return!1}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(dh(e)!==`object`||e===null||dh(t)!==`object`||t===null)return!1;var f=Object.keys(e),p=Object.keys(t);if(f.length!==p.length)return!1;for(var i=0;i<f.length;i++){var u=f[i];if(!Object.prototype.hasOwnProperty.call(t,u)||!Th(e[u],t[u]))return!1}return!0}function Eh(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++){var r=e[n],i=t[n],a=r!==null&&dh(r)===`object`,o=i!==null&&dh(i)===`object`;if(a||o){if(!Th(r,i))return!1}else if(r!==i)return!1}return!0}function Dh(e){return`daily-react-`+e}function Oh(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=ta(function(t){var i=e.get(r)(t),a=n.get(r);return a!=null&&e.equals(i,a)?a:(n.set(r,i),i)});t.set(r,i)}return t.get(r)}}var kh=`::`,Ah=`;`,jh=function(e,t){return e+kh+t},Mh=function(e,t){return e+kh+t.join(Ah)},Nh=function(e,t){return Fh(jh(e,t))},Ph=ho(function(e){var t=ta([]);return t.debugLabel=Dh(`participant-property-paths-${e}`),t}),Fh=ho(function(e){var t=ta(null);return t.debugLabel=Dh(`participant-property-${e}`),t}),Ih=Oh({equals:Eh,get:function(e){return function(t){var n=gh(e.split(kh),2),r=n[0];return n[1].split(Ah).map(function(e){return t(Nh(r,e))})}}}),Lh=function(e,t){var n,r=po(Array.isArray(t)?Ih(Mh(e,t)):Fh(jh(e,t)));return ct(Array.isArray(t)?t.reduce(function(e,t,n){return e[t]=r[n],e},{}):(n={},n[t]=r,n)),r},Rh=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function zh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Bh,Vh;function Hh(){if(Vh)return Bh;Vh=1;var e=`Expected a function`,t=NaN,n=`[object Symbol]`,r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,c=dh(Rh)==`object`&&Rh&&Rh.Object===Object&&Rh,l=(typeof self>`u`?`undefined`:dh(self))==`object`&&self&&self.Object===Object&&self,u=c||l||Function(`return this`)(),d=Object.prototype.toString,f=Math.max,p=Math.min,m=function(){return u.Date.now()};function h(t,n,r){var i,a,o,s,c,l,u=0,d=!1,h=!1,g=!0;if(typeof t!=`function`)throw TypeError(e);n=b(n)||0,_(r)&&(d=!!r.leading,h=`maxWait`in r,o=h?f(b(r.maxWait)||0,n):o,g=`trailing`in r?!!r.trailing:g);function v(e){var n=i,r=a;return i=a=void 0,u=e,s=t.apply(r,n),s}function y(e){return u=e,c=setTimeout(C,n),d?v(e):s}function x(e){var t=e-l,r=e-u,i=n-t;return h?p(i,o-r):i}function S(e){var t=e-l,r=e-u;return l===void 0||t>=n||t<0||h&&r>=o}function C(){var e=m();if(S(e))return w(e);c=setTimeout(C,x(e))}function w(e){return c=void 0,g&&i?v(e):(i=a=void 0,s)}function T(){c!==void 0&&clearTimeout(c),u=0,i=l=a=c=void 0}function ee(){return c===void 0?s:w(m())}function E(){var e=m(),t=S(e);if(i=arguments,a=this,l=e,t){if(c===void 0)return y(l);if(h)return c=setTimeout(C,n),v(l)}return c===void 0&&(c=setTimeout(C,n)),s}return E.cancel=T,E.flush=ee,E}function g(t,n,r){var i=!0,a=!0;if(typeof t!=`function`)throw TypeError(e);return _(r)&&(i=`leading`in r?!!r.leading:i,a=`trailing`in r?!!r.trailing:a),h(t,n,{leading:i,maxWait:n,trailing:a})}function _(e){var t=dh(e);return!!e&&(t==`object`||t==`function`)}function v(e){return!!e&&dh(e)==`object`}function y(e){return dh(e)==`symbol`||v(e)&&d.call(e)==n}function b(e){if(typeof e==`number`)return e;if(y(e))return t;if(_(e)){var n=typeof e.valueOf==`function`?e.valueOf():e;e=_(n)?n+``:n}if(typeof e!=`string`)return e===0?e:+e;e=e.replace(r,``);var c=a.test(e);return c||o.test(e)?s(e.slice(2),c?2:8):i.test(e)?t:+e}return Bh=g,Bh}var Uh=zh(Hh()),Wh=function(e,t,n,r){n===void 0&&(n=500),r===void 0&&(r=!1);var i=st(bh),a=i.off,o=i.on,s=P(function(){var t;return Array.isArray(e)?e.reduce(function(e,t){return e[t]=r?Sh():wh(),e},{}):(t={},t[e]=r?Sh():wh(),t)},[e,r]),c=N([]);G(`call-instance-destroyed`,F(function(){c.current.length=0},[]));var l=P(function(){return Uh(function(){c.current.length!==0&&(t(c.current),c.current.length=0)},n,{trailing:!0})},[t,n]);M(function(){if(e){var t=function(e){c.current.push(e),l()};return Array.isArray(e)?e.forEach(function(e){return o(e,t,s[e])}):o(e,t,s[e]),function(){Array.isArray(e)?e.forEach(function(e){return a(e,s[e])}):a(e,s[e])}}},[l,e,s,a,o]),ct({event:e,eventId:s})},Gh=function(e,t,n){if(t===void 0&&(t=``),n===void 0&&(n=new Set),dh(e)!==`object`||e===null||n.has(e))return[t];n.add(e);var r=[];for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=t?`${t}.${i}`:i;r.push.apply(r,_h([a],gh(Gh(e[i],a,n)),!1))}return n.delete(e),r},Kh=function(e){return Gh(e)},qh=function(e,t){return String(t).split(`.`).filter(function(e){return e.length}).reduce(function(e,t){return e&&e[t]},e)},Jh=function(e,t){return t.map(function(t){return qh(e,t)})},Yh=ta(null);Yh.debugLabel=Dh(`active-id`);var Xh=ta(``);Xh.debugLabel=Dh(`local-id`);var Zh=ta(null);Zh.debugLabel=Dh(`local-join-date`);var Qh=ta([]);Qh.debugLabel=Dh(`participant-ids`);var $h=ho(function(e){var t=ta(null);return t.debugLabel=Dh(`participant-${e}`),t}),eg=ta([]);eg.debugLabel=Dh(`waiting-participants`);var tg=ho(function(e){var t=ta({awaitingAccess:{level:`full`},id:e,name:``});return t.debugLabel=Dh(`waiting-participant-${e}`),t}),ng=function(e){var t=e.children,n=yh(),r=gh(j(!1),2),i=r[0],a=r[1],o=L(F(function(e,t,n){t(Xh,n.local.session_id);var r=Object.values(n);t(Qh,r.map(function(e){return e.session_id})),r.forEach(function(e){t($h(e.session_id),e);var n=Kh(e);t(Ph(e.session_id),n),n.forEach(function(n){var r=gh(Jh(e,[n]),1)[0];t(Nh(e.session_id,n),r)})}),a(!0)},[]));M(function(){if(!(!n||i)){var e=setInterval(function(){var t=n.participants();`local`in t&&(o(t),clearInterval(e))},100);return function(){clearInterval(e)}}},[n,i,o]);var s=F(function(){if(n){var e=n?.participants();e.local&&o(e)}},[n,o]);G(`started-camera`,s,!0),G(`access-state-updated`,s,!0),G(`joining-meeting`,L(F(function(e,t){t(Zh,new Date),s()},[s])),!0),G(`joined-meeting`,F(function(e){o(e.participants)},[o]),!0);var c=L(F(function(e,t){t(Xh,``),t(Yh,null),e(Qh).forEach(function(e){return $h.remove(e)}),t(Qh,[])},[]));return G(`call-instance-destroyed`,c,!0),G(`left-meeting`,c,!0),Wh([`active-speaker-change`,`participant-joined`,`participant-updated`,`participant-left`],L(F(function(e,t,n){n.length&&n.forEach(function(n){switch(n.action){case`active-speaker-change`:t(Yh,n.activeSpeaker.peerId),t($h(n.activeSpeaker.peerId),function(e){return e?W(W({},e),{last_active:new Date}):null});break;case`participant-joined`:t(Qh,function(e){return e.includes(n.participant.session_id)?e:_h(_h([],gh(e),!1),[n.participant.session_id],!1)}),t($h(n.participant.session_id),n.participant);var r=Kh(n.participant);t(Ph(n.participant.session_id),r),r.forEach(function(e){var r=gh(Jh(n.participant,[e]),1)[0];t(Nh(n.participant.session_id,e),r)});break;case`participant-updated`:t($h(n.participant.session_id),n.participant),n.participant.local&&t(Xh,n.participant.session_id);var r=Kh(n.participant),i=e(Ph(n.participant.session_id));(r.length!==i.length||r.some(function(e){return!i.includes(e)}))&&t(Ph(n.participant.session_id),r);var a=new Set(i),o=Jh(n.participant,r);r.forEach(function(e,r){var i=o[r];a.delete(e),t(Nh(n.participant.session_id,e),function(e){return Th(e,i)?e:i})}),a.forEach(function(e){t(Nh(n.participant.session_id,e),null)});break;case`participant-left`:t(Qh,function(e){return e.includes(n.participant.session_id)?e.filter(function(e){return e!==n.participant.session_id}):e}),$h.remove(n.participant.session_id),e(Ph(n.participant.session_id)).forEach(function(e){Fh.remove(jh(n.participant.session_id,e))}),Ph.remove(n.participant.session_id);break}})},[])),100,!0),Wh([`waiting-participant-added`,`waiting-participant-updated`,`waiting-participant-removed`],L(F(function(e,t,n){n.forEach(function(e){switch(e.action){case`waiting-participant-added`:t(eg,function(t){return t.includes(e.participant.id)?t:_h(_h([],gh(t),!1),[e.participant.id],!1)}),t(tg(e.participant.id),e.participant);break;case`waiting-participant-updated`:t(tg(e.participant.id),e.participant);break;case`waiting-participant-removed`:t(eg,function(t){return t.filter(function(t){return t!==e.participant.id})}),tg.remove(e.participant.id);break}})},[])),100,!0),ro.createElement(ro.Fragment,null,t)},rg=function(){var e=po(Xh);return ct(e),e},ig=function(){return!0},ag=function(e){var t=e===void 0?{}:e,n=t.filter,r=n===void 0?ig:n,i=t.ignoreLocal,a=i===void 0?!1:i,o=rg(),s=po(Yh),c=a&&s===o,l=!r?.(s),u=gh(j(!c&&!l?s:null),2),d=u[0],f=u[1];return M(function(){c||l||f(s)},[l,c,s]),ct(d),d},og=function(e){return[`blocked`,`off`].includes(e)},sg=`;`,cg=function(e,t){return`${e}${sg}${t}`},lg=Oh({equals:Th,get:function(e){return function(t){var n=gh(e.split(sg),2),r=n[0],i=n[1];return t(Qh).filter(function(e){switch(r){case`local`:case`owner`:case`record`:return t(Nh(e,r));case`remote`:return!t(Nh(e,`local`));case`screen`:var n=t(Nh(e,`tracks.screenAudio.state`)),i=t(Nh(e,`tracks.screenVideo.state`));return!og(n)||!og(i);default:return!0}}).sort(function(e,n){switch(i){case`joined_at`:case`session_id`:case`user_id`:case`user_name`:var r=t(Nh(e,i)),a=t(Nh(n,i));if(r!==void 0||a!==void 0){if(r===void 0)return-1;if(a===void 0||r>a)return 1;if(r<a)return-1}return 0;default:return 0}})}}}),ug=function(e){var t=e===void 0?{}:e,n=t.filter,r=t.onActiveSpeakerChange,i=t.onParticipantJoined,a=t.onParticipantLeft,o=t.onParticipantUpdated,s=t.sort,c=po(lg(cg(typeof n==`string`?n:null,typeof s==`string`?s:null))),l=typeof n==`function`||typeof s==`function`,u=F(function(e){return typeof n!=`function`&&typeof s!=`function`?[]:c.map(function(t){return e($h(t))}).filter(function(e){return!!e}).filter(typeof n==`function`?n:function(){return!0}).sort(typeof s==`function`?s:function(){return 0}).map(function(e){return e.session_id}).filter(Boolean)},[n,c,s]),d=gh(j([]),2),f=d[0],p=d[1],m=L(F(function(e){if(l){var t=u(e);Th(t,f)||p(t)}},[f,u,l]));M(function(){m()},[m]),Wh([`participant-joined`,`participant-updated`,`active-speaker-change`,`participant-left`],F(function(e){e.length&&(e.forEach(function(e){switch(e.action){case`participant-joined`:i?.(e);break;case`participant-updated`:o?.(e);break;case`active-speaker-change`:r?.(e);break;case`participant-left`:a?.(e);break}}),m())},[m,r,i,a,o]));var h=typeof n==`function`||typeof s==`function`?f:c;return ct(h),h},dg=Oh({equals:Eh,get:function(){return function(e){return e(lg(cg(`screen`,null))).map(function(t){return{local:e(Nh(t,`local`)),screenAudio:e(Nh(t,`tracks.screenAudio`)),screenVideo:e(Nh(t,`tracks.screenVideo`)),screenId:`${t}-screen`,session_id:t}})}}}),fg=function(e){var t=e===void 0?{}:e,n=t.onError,r=t.onLocalScreenShareStarted,i=t.onLocalScreenShareStopped,a=yh(),o=F(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.startScreenShare.apply(a,_h([],gh(e),!1))},[a]),s=F(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a?.stopScreenShare.apply(a,_h([],gh(e),!1))},[a]);G(`local-screen-share-started`,F(function(){return r?.()},[r])),G(`local-screen-share-stopped`,F(function(){return i?.()},[i])),G(`nonfatal-error`,F(function(e){e.type===`screen-share-error`&&n?.(e)},[n]));var c=po(dg(void 0)),l={isSharingScreen:c.some(function(e){return e.local}),screens:c,startScreenShare:o,stopScreenShare:s};return ct(l),l},pg=function(e,t){t===void 0&&(t=`video`);var n=Lh(e,`tracks.${t}`),r=n?W(W({},n),{isOff:og(n.state)}):{isOff:!0,persistentTrack:void 0,state:`off`,subscribed:!1};return ct(r),r};function mg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return F(function(t){for(var n=0;n<e.length;n++){var r=e[n];typeof r==`function`?r(t):r&&dh(r)===`object`&&(r.current=t)}},e)}var hg=_a(ba(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,a=i===void 0?`audio`:i,o=fh(e,[`onPlayFailed`,`sessionId`,`type`]),s=N(null),c=pg(r,a),l=mg(s,t),u=c?.subscribed;return M(function(){var e=s.current;if(!(!e||!c?.persistentTrack)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${a} for ${r}`),n?.({sessionId:r,target:e,type:a,message:`MediaStream API not available`,name:`MediaStream API not available`});return}var t=function(){e.play().catch(function(t){n?.({sessionId:r,target:e,type:a,message:t.message,name:t.name})})};return e.addEventListener(`loadedmetadata`,t),e.srcObject=new MediaStream([c.persistentTrack]),e.load(),function(){e.removeEventListener(`loadedmetadata`,t)}}},[c?.persistentTrack,n,r,a]),G(`participant-left`,F(function(e){var t=s.current;e.participant.session_id!==r||!t||(t.srcObject=null)},[r])),G(`left-meeting`,F(function(){var e=s.current;e&&(e.pause(),e.srcObject=null)},[])),ro.createElement(`audio`,W({autoPlay:!0,ref:l},o,{"data-session-id":r,"data-audio-type":a,"data-subscribed":u}))}));hg.displayName=`DailyAudioTrack`;var gg=_a(ba(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,a=i===void 0?5:i,o=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=yh(),u=gh(j(Array(a).fill(``)),2),d=u[0],f=u[1],p=fg().screens,m=rg(),h=ag({ignoreLocal:!0}),g=N(null);ot(t,function(){return{getActiveSpeakerAudio:function(){return g.current?.querySelector(`audio[data-session-id="${h}"][data-audio-type="audio"]`)??null},getAllAudio:function(){return Array.from(g.current?.querySelectorAll(`audio`)??[])},getAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="audio"]`)??null},getRmpAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="rmpAudio"]`)??[])},getScreenAudio:function(){return Array.from(g.current?.querySelectorAll(`audio[data-audio-type="screenAudio"]`)??[])},getRmpAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="rmpAudio"]`)??null},getScreenAudioBySessionId:function(e){return g.current?.querySelector(`audio[data-session-id="${e}"][data-audio-type="screenAudio"]`)??null}}},[h]);var _=L(F(function(e,t,n){return ph(void 0,void 0,void 0,function(){var t,i;return mh(this,function(a){if(t=Object.values(l?.participants()??{}).filter(function(e){return!e.local&&!!e.tracks.audio.subscribed}),i=function(e){return t.some(function(t){return t.session_id===e})},!i(n))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(n,{setSubscribedTracks:{audio:!0}});else return[2];return f(function(r){if(r.includes(n))return r;var a=function(e){return!e||!i(e)};if(r.some(a)){var o=r.findIndex(a);return r[o]=n,_h([],gh(r),!1)}var s=r.findIndex(function(e){return t.some(function(t){return t.session_id===e&&og(t.tracks.audio.state)})});if(s>=0)return r[s]=n,_h([],gh(r),!1);var c=t.filter(function(e){return r.includes(e.session_id)&&e.session_id!==h}).sort(function(t,n){var r=e(Nh(t.session_id,`last_active`))??new Date(`1970-01-01`),i=e(Nh(n.session_id,`last_active`))??new Date(`1970-01-01`);return r>i?1:r<i?-1:0});if(!c.length){var l=r.findIndex(function(e){return e!==h});return r[l]=n,_h([],gh(r),!1)}var u=r.indexOf(c[0]?.session_id);return r[u]=n,_h([],gh(r),!1)}),[2]})})},[h,r,l])),v=F(function(e){f(function(t){if(!t.includes(e))return t;var n=_h([],gh(t),!1),r=n.indexOf(e);return n[r]=``,n})},[]);Wh([`active-speaker-change`,`track-started`,`participant-left`],F(function(e){e.forEach(function(e){switch(e.action){case`active-speaker-change`:if(e.activeSpeaker.peerId===m)return;_(e.activeSpeaker.peerId);break;case`track-started`:e.track.kind===`audio`&&e.participant&&!e.participant.local&&_(e.participant.session_id);break;case`participant-left`:v(e.participant.session_id);break}})},[_,m,v]),200);var y=ug({filter:F(function(e){return!!e?.tracks?.rmpAudio},[])});return ro.createElement(`div`,{ref:g},d.map(function(e,t){return ro.createElement(hg,{key:`speaker-slot-${t}`,onPlayFailed:o,sessionId:e,type:`audio`})}),p.filter(function(e){return c?!0:!e.local}).map(function(e){return ro.createElement(hg,{key:e.screenId,onPlayFailed:o,sessionId:e.session_id,type:`screenAudio`})}),y.map(function(e){return ro.createElement(hg,{key:`${e}-rmp`,onPlayFailed:o,sessionId:e,type:`rmpAudio`})}))}));gg.displayName=`DailyAudio`;var _g=ba(function(e,t){var n=e.automirror,r=e.fit,i=r===void 0?`contain`:r,a=e.mirror,o=e.onResize,s=e.playableStyle,c=s===void 0?{}:s,l=e.sessionId,u=e.style,d=u===void 0?{}:u,f=e.type,p=f===void 0?`video`:f,m=fh(e,[`automirror`,`fit`,`mirror`,`onResize`,`playableStyle`,`sessionId`,`style`,`type`]),h=rg()===l,g=p===`screenVideo`,_=h&&p===`video`,v=N(null),y=mg(v,t),b=N(!1),x=pg(l,p),S=x.persistentTrack,C=_||g||!x.isOff,w=Lh(l,`tracks.${p}`)?.subscribed,T=P(function(){if(typeof a==`boolean`)return a;if(!n)return!1;if(!S)return _;var e=S.getSettings();return`facingMode`in e?_&&e.facingMode===`user`:_},[n,_,a,S]);return M(function(){b.current=T},[T]),M(function(){var e=v.current;if(e){var t=function(){var t=e.play();t!==void 0&&t.then(function(){e.controls=!1}).catch(function(t){e.controls=!0,console.warn(`Failed to play video`,t)})},n=function(){e.paused&&t()},r=function(){e.style.transform=`scale(1)`},i=function(){e.style.transform=b.current?`scale(-1, 1)`:``,setTimeout(function(){e.paused&&t()},100)},a=function(){document.visibilityState!==`hidden`&&e.paused&&t()};return e.addEventListener(`canplay`,n),e.addEventListener(`enterpictureinpicture`,r),e.addEventListener(`leavepictureinpicture`,i),document.addEventListener(`visibilitychange`,a),function(){e.removeEventListener(`canplay`,n),e.removeEventListener(`enterpictureinpicture`,r),e.removeEventListener(`leavepictureinpicture`,i),document.removeEventListener(`visibilitychange`,a)}}},[]),M(function(){var e=v.current;if(!(!e||!S)){if(!MediaStream){console.warn(`MediaStream API not available. Can't setup ${p} for ${l}`);return}return e.srcObject=new MediaStream([S]),e.load(),function(){e.srcObject=null,e.load()}}},[l,p,S,S?.id]),M(function(){var e=v.current;if(!o||!e)return;var t;function n(){t&&cancelAnimationFrame(t),t=requestAnimationFrame(function(){var e=v.current;if(!(!e||document.hidden)){var t=e.videoWidth,n=e.videoHeight;t&&n&&o?.({aspectRatio:t/n,height:n,width:t})}})}return n(),e.addEventListener(`loadedmetadata`,n),e.addEventListener(`resize`,n),function(){t&&cancelAnimationFrame(t),e.removeEventListener(`loadedmetadata`,n),e.removeEventListener(`resize`,n)}},[o]),ro.createElement(`video`,W({autoPlay:!0,muted:!0,playsInline:!0,ref:y,"data-local":h,"data-mirrored":T||void 0,"data-playable":C||void 0,"data-session-id":l,"data-subscribed":w,"data-video-type":p,style:W(W({objectFit:i,transform:T?`scale(-1, 1)`:``},d),C?c:{})},m))});_g.displayName=`DailyVideo`;var vg=Ae({refreshDevices:function(){return Promise.resolve()}}),yg=ta(`idle`);yg.debugLabel=Dh(`camera-state`);var bg=ta(`idle`);bg.debugLabel=Dh(`microphone-state`);var xg=ta([]);xg.debugLabel=Dh(`camera-devices`);var Sg=ta([]);Sg.debugLabel=Dh(`microphone-devices`);var Cg=ta([]);Cg.debugLabel=Dh(`speaker-devices`);var wg=ta(null);wg.debugLabel=Dh(`last-camera-error`);var Tg=function(e){var t=e.children,n=yh(),r=L(F(function(e,t){return ph(void 0,void 0,void 0,function(){var e,r,i,a,o,s,c,l,u,d;return mh(this,function(f){switch(f.label){case 0:if((navigator==null?void 0:navigator.mediaDevices)?.getUserMedia===void 0||(navigator==null?void 0:navigator.mediaDevices)?.enumerateDevices===void 0)return t(yg,`not-supported`),t(bg,`not-supported`),[2];if(!n)return[2];f.label=1;case 1:return f.trys.push([1,4,,5]),[4,n.enumerateDevices()];case 2:return e=f.sent().devices,r=e.filter(function(e){return e.kind===`videoinput`&&e.deviceId!==``}),i=e.filter(function(e){return e.kind===`audioinput`&&e.deviceId!==``}),a=e.filter(function(e){return e.kind===`audiooutput`&&e.deviceId!==``}),[4,n.getInputDevices()];case 3:return o=f.sent(),s=o.camera,c=o.mic,l=o.speaker,u=function(e,t,n){var r=n.find(function(e){return e.device.deviceId===t.deviceId}),i=`deviceId`in e&&t.deviceId===e.deviceId,a=!(`deviceId`in e)&&r?.selected;return{device:t,selected:i||!!a,state:r?.state??`granted`}},d=function(e,t){return e.device.deviceId==="default"?-1:t.device.deviceId==="default"?1:e.device.label<t.device.label?-1:+(e.device.label>t.device.label)},t(xg,function(e){return r.filter(Boolean).map(function(t){return u(s,t,e)}).sort(d)}),t(Sg,function(e){return i.filter(Boolean).map(function(t){return u(c,t,e)}).sort(d)}),t(Cg,function(e){return a.filter(Boolean).map(function(t){return u(l,t,e)}).sort(d)}),[3,5];case 4:return f.sent(),t(yg,`not-supported`),t(bg,`not-supported`),[3,5];case 5:return[2]}})})},[n])),i=L(F(function(e,t){return ph(void 0,void 0,void 0,function(){var i,a,o,s,c,l,u,d,f,p,m,h;return mh(this,function(g){switch(g.label){case 0:if(!n||(i=e(yg),a=e(bg),o=n.participants(),!o.local))return[2];if(s=o.local.tracks,c=`prompt`,l=`prompt`,!navigator.permissions)return[3,5];g.label=1;case 1:return g.trys.push([1,4,,5]),[4,navigator.permissions.query({name:`camera`})];case 2:return u=g.sent(),c=u.state,[4,navigator.permissions.query({name:`microphone`})];case 3:return d=g.sent(),l=d.state,[3,5];case 4:return g.sent(),[3,5];case 5:return f=c===`prompt`&&[`idle`,`pending`].includes(i)&&s.video.state===`interrupted`&&!s.video.persistentTrack,p=[`idle`,`pending`].includes(i)&&!s.video.persistentTrack&&!!s.video.off?.byUser,m=l===`prompt`&&[`idle`,`pending`].includes(a)&&s.audio.state===`interrupted`&&!s.audio.persistentTrack,h=[`idle`,`pending`].includes(a)&&!s.audio.persistentTrack&&!!s.audio.off?.byUser,s.audio?.blocked?.byDeviceInUse?(t(bg,`in-use`),t(Sg,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`in-use`}):e})})):s.audio?.blocked?.byDeviceMissing?t(bg,`not-found`):s.audio?.blocked?.byPermissions||l===`denied`?t(bg,`blocked`):m?t(bg,`pending`):h?t(bg,`idle`):(t(bg,`granted`),t(Sg,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`granted`}):e})})),s.video?.blocked?.byDeviceInUse?(t(yg,`in-use`),t(xg,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`in-use`}):e})})):s.video?.blocked?.byDeviceMissing?t(yg,`not-found`):s.video?.blocked?.byPermissions||c===`denied`?t(yg,`blocked`):f?t(yg,`pending`):p?t(yg,`idle`):(t(yg,`granted`),t(xg,function(e){return e.map(function(e){return e.selected?W(W({},e),{state:`granted`}):e})})),r(),[2]}})})},[n,r]));return G(`participant-updated`,F(function(e){e.participant.local&&i()},[i])),G(`available-devices-updated`,r),G(`selected-devices-updated`,r),G(`camera-error`,L(F(function(e,t,n){switch(t(wg,n.error),n.error?.type){case`cam-in-use`:t(yg,`in-use`);break;case`mic-in-use`:t(bg,`in-use`);break;case`cam-mic-in-use`:t(yg,`in-use`),t(bg,`in-use`);break;case`not-found`:n.error?.missingMedia.includes(`video`)&&t(yg,`not-found`),n.error?.missingMedia.includes(`audio`)&&t(bg,`not-found`);break;case`permissions`:n.error?.blockedMedia.includes(`video`)&&t(yg,`blocked`),n.error?.blockedMedia.includes(`audio`)&&t(bg,`blocked`);break;case`constraints`:n.error?.reason===`invalid`?(t(yg,`constraints-invalid`),t(bg,`constraints-invalid`)):n.error?.reason===`none-specified`&&(t(yg,`constraints-none-specified`),t(bg,`constraints-none-specified`));break;case`undefined-mediadevices`:t(yg,`undefined-mediadevices`),t(bg,`undefined-mediadevices`);break;default:t(yg,`unknown`),t(bg,`unknown`);break}},[]))),G(`started-camera`,L(F(function(e,t){t(yg,`granted`),t(bg,`granted`),i()},[i]))),ro.createElement(vg.Provider,{value:{refreshDevices:r}},t)},Eg={isReady:!1,sessions:{}},Dg=ta(Eg);Dg.debugLabel=Dh(`dial-in`);var Og=function(e){var t=e.children;G(`dialin-ready`,L(F(function(e,t,n){t(Dg,function(e){return W(W({},e),{isReady:!0,sipEndpoint:n.sipEndpoint,provider:n.provider})})},[]))),G(`dialin-connected`,L(F(function(e,t,n){t(Dg,function(e){var t;return W(W({},e),{sessions:W(W({},e.sessions),(t={},t[n.sessionId]=W(W({},e.sessions[n.sessionId]),{sessionId:n.sessionId,status:`connected`,provider:n.provider??e.sessions[n.sessionId]?.provider,sipCallId:n.sipCallId??e.sessions[n.sessionId]?.sipCallId}),t))})})},[]))),G(`dialin-stopped`,L(F(function(e,t,n){t(Dg,function(e){var t;return e.sessions[n.sessionId]?W(W({},e),{sessions:W(W({},e.sessions),(t={},t[n.sessionId]=W(W({},e.sessions[n.sessionId]),{status:`stopped`}),t))}):e})},[]))),G(`dialin-error`,L(F(function(e,t,n){t(Dg,function(e){var t;return W(W({},e),{sessions:W(W({},e.sessions),(t={},t[n.sessionId]=W(W({},e.sessions[n.sessionId]),{sessionId:n.sessionId,status:`error`,provider:n.provider??e.sessions[n.sessionId]?.provider,sipCallId:n.sipCallId??e.sessions[n.sessionId]?.sipCallId,errorMsg:n.errorMsg}),t))})})},[]))),G(`dialin-warning`,L(F(function(e,t,n){t(Dg,function(e){var t;return W(W({},e),{sessions:W(W({},e.sessions),(t={},t[n.sessionId]=W(W({},e.sessions[n.sessionId]),{sessionId:n.sessionId,status:`warning`,provider:n.provider??e.sessions[n.sessionId]?.provider,sipCallId:n.sipCallId??e.sessions[n.sessionId]?.sipCallId,errorMsg:n.errorMsg}),t))})})},[])));var n=L(F(function(e,t){t(Dg,Eg)},[]));return G(`left-meeting`,n),G(`call-instance-destroyed`,n),ro.createElement(ro.Fragment,null,t)},kg=ta({});kg.debugLabel=Dh(`dial-out-sessions`);var Ag=function(e){var t=e.children;G(`dialout-connected`,L(F(function(e,t,n){t(kg,function(e){var t;return W(W({},e),(t={},t[n.sessionId]=W(W({},e[n.sessionId]),{sessionId:n.sessionId,status:`connected`,provider:n.provider,sipCallId:n.sipCallId}),t))})},[]))),G(`dialout-answered`,L(F(function(e,t,n){t(kg,function(e){var t;return W(W({},e),(t={},t[n.sessionId]=W(W({},e[n.sessionId]),{sessionId:n.sessionId,status:`answered`,provider:n.provider,sipCallId:n.sipCallId}),t))})},[]))),G(`dialout-stopped`,L(F(function(e,t,n){t(kg,function(e){var t;return e[n.sessionId]?W(W({},e),(t={},t[n.sessionId]=W(W({},e[n.sessionId]),{status:`stopped`}),t)):e})},[]))),G(`dialout-error`,L(F(function(e,t,n){var r=n.sessionId;r&&t(kg,function(e){var t;return W(W({},e),(t={},t[r]=W(W({},e[r]),{sessionId:r,status:`error`,provider:n.provider??e[r]?.provider,sipCallId:n.sipCallId??e[r]?.sipCallId,errorMsg:n.errorMsg}),t))})},[]))),G(`dialout-warning`,L(F(function(e,t,n){var r=n.sessionId;r&&t(kg,function(e){var t;return W(W({},e),(t={},t[r]=W(W({},e[r]),{sessionId:r,status:`warning`,provider:n.provider??e[r]?.provider,sipCallId:n.sipCallId??e[r]?.sipCallId,errorMsg:n.errorMsg}),t))})},[])));var n=L(F(function(e,t){t(kg,{})},[]));return G(`left-meeting`,n),G(`call-instance-destroyed`,n),ro.createElement(ro.Fragment,null,t)};function jg(e){return e.instanceId??`__default__`}var Mg=ta({});Mg.debugLabel=Dh(`live-streaming-instances`);var Ng=ta(function(e){var t=e(Mg),n=Object.values(t),r=n.filter(function(e){return e.isLiveStreaming}),i=r[0]??n[n.length-1];return{errorMsg:n.find(function(e){return e.errorMsg})?.errorMsg,isLiveStreaming:r.length>0,layout:i?.layout}});Ng.debugLabel=Dh(`live-streaming`);var Pg=function(e){var t=e.children;return G(`live-streaming-started`,L(F(function(e,t,n){var r=jg(n);t(Mg,function(e){var t;return W(W({},e),(t={},t[r]={instanceId:r,isLiveStreaming:!0,layout:n?.layout},t))})},[]))),G(`live-streaming-stopped`,L(F(function(e,t,n){var r=jg(n);t(Mg,function(e){var t;return e[r]?W(W({},e),(t={},t[r]=W(W({},e[r]),{isLiveStreaming:!1,layout:void 0}),t)):e})},[]))),G(`live-streaming-error`,L(F(function(e,t,n){var r=jg(n);t(Mg,function(e){var t;return W(W({},e),(t={},t[r]=W(W({},e[r]??{instanceId:r,isLiveStreaming:!1}),{errorMsg:n.errorMsg}),t))})},[]))),G(`left-meeting`,L(F(function(e,t){t(Mg,{})},[]))),ro.createElement(ro.Fragment,null,t)},Fg=ta(`new`);Fg.debugLabel=Dh(`meeting-state`);var Ig=ta(null);Ig.debugLabel=Dh(`meeting-error`);var Lg=ta(null);Lg.debugLabel=Dh(`non-fatal-error`);var Rg=ta({data:void 0,topology:`none`});Rg.debugLabel=Dh(`meeting-session-data`);var zg=ta(null);zg.debugLabel=Dh(`meeting-session-summary`);var Bg=function(e){var t=e.children,n=yh(),r=L(F(function(e,t){if(n){var r=n.meetingState();return t(Fg,r),r}},[n]));return G(`loading`,r),G(`loaded`,r),G(`joining-meeting`,r),G(`joined-meeting`,r),G(`left-meeting`,r),G(`error`,L(F(function(e,t,n){t(Ig,n),r()},[r]))),G(`nonfatal-error`,L(F(function(e,t,n){t(Lg,n)},[]))),G(`joined-meeting`,L(F(function(e,t){n&&t(Rg,n.meetingSessionState())},[n]))),G(`meeting-session-state-updated`,L(F(function(e,t,n){t(Rg,n.meetingSessionState)},[]))),G(`joined-meeting`,L(F(function(e,t){n&&t(zg,n.meetingSessionSummary())},[n]))),G(`meeting-session-summary-updated`,L(F(function(e,t,n){t(zg,n.meetingSession)},[]))),G(`left-meeting`,L(F(function(e,t){t(Rg,{data:void 0,topology:`none`}),t(zg,null)},[]))),G(`call-instance-destroyed`,L(F(function(e,t){t(Fg,`new`),t(Ig,null),t(Lg,null),t(Rg,{data:void 0,topology:`none`}),t(zg,null)},[]))),ro.createElement(ro.Fragment,null,t)},Vg=ta(`none`);Vg.debugLabel=Dh(`topology`);var Hg=ta(`unknown`),Ug=ta([]),Wg=ta(`interrupted`),Gg=ta(100);Gg.debugLabel=Dh(`network-quality`);var Kg=ta(`good`);Kg.debugLabel=Dh(`network-threshold`);var qg=function(e){var t=e.children,n=yh(),r=po(Vg),i=L(F(function(e,t){return ph(void 0,void 0,void 0,function(){var e;return mh(this,function(r){switch(r.label){case 0:return n?[4,n.getNetworkTopology()]:[2];case 1:return e=r.sent(),!e||e?.topology===`none`||t(Vg,e.topology),[2]}})})},[n]));return G(`joined-meeting`,i),G(`network-connection`,L(F(function(e,t,n){switch(t(Wg,n.event),n.event){case`connected`:n.type===`peer-to-peer`&&t(Vg,`peer`),n.type===`sfu`&&t(Vg,`sfu`);break}},[]))),G(`network-quality-change`,L(F(function(e,t,n){t(Hg,function(e){return e===n.networkState?e:n.networkState}),t(Ug,function(e){var t=n.networkStateReasons??[];return Eh(e,t)?e:t}),t(Gg,function(e){return e===n.quality?e:n.quality}),t(Kg,function(e){return e===n.threshold?e:n.threshold})},[]))),G(`left-meeting`,L(F(function(e,t){t(Vg,`none`),t(Hg,`unknown`),t(Ug,[]),t(Wg,`interrupted`),t(Gg,100),t(Kg,`good`)},[]))),M(function(){!n||r!==`none`||i()},[n,i,r]),ro.createElement(ro.Fragment,null,t)};function Jg(e){return e.instanceId?e.instanceId:e.type===`local`||e.local?`__local__`:`__default__`}var Yg=ta({});Yg.debugLabel=Dh(`recording-instances`);var Xg=ta(function(e){var t=e(Yg),n=Object.values(t),r=n.filter(function(e){return e.isRecording}),i=r[0]??n[n.length-1];return{error:n.some(function(e){return e.error}),isLocalParticipantRecorded:n.some(function(e){return e.isLocalParticipantRecorded}),isRecording:r.length>0,layout:i?.layout,local:i?.local,recordingId:i?.recordingId,recordingStartedDate:i?.recordingStartedDate,startedBy:i?.startedBy,type:i?.type}});Xg.debugLabel=Dh(`recording-state`);var Zg=function(e){var t=e.children,n=rg(),r=ug({filter:`record`}),i=L(F(function(e,t,n,r){var i=e(Yg).__local__,a=W(W({},i),{instanceId:`__local__`,isLocalParticipantRecorded:n,isRecording:n,local:n?r:i?.local,type:n?`local`:i?.type});i&&Th(i,a)||!n&&!i||(n?t(Yg,function(e){return W(W({},e),{__local__:a})}):i&&t(Yg,function(e){return W(W({},e),{__local__:W(W({},i),{isLocalParticipantRecorded:!1,isRecording:!1})})}))},[]));return M(function(){i(r.length>0,r.includes(n||`local`))},[n,i,r]),G(`recording-started`,L(F(function(e,t,r){var i=Jg(r),a=!0;switch(r.type){case`cloud-audio-only`:case`cloud-beta`:case`cloud`:n&&r.layout?.preset===`single-participant`&&r.layout.session_id!==n&&(a=!1);break}t(Yg,function(e){var t;return W(W({},e),(t={},t[i]={error:!1,instanceId:i,isLocalParticipantRecorded:a,isRecording:!0,layout:r?.layout,local:r?.local,recordingId:r?.recordingId,recordingStartedDate:new Date,startedBy:r?.startedBy,type:r?.type},t))})},[n]))),G(`recording-stopped`,L(F(function(e,t,n){var r=Jg(n);t(Yg,function(e){var t;return e[r]?W(W({},e),(t={},t[r]=W(W({},e[r]),{isLocalParticipantRecorded:!1,isRecording:!1}),t)):e})},[]))),G(`recording-error`,L(F(function(e,t,n){var r=Jg(n);t(Yg,function(e){var t,i=e[r];return W(W({},e),(t={},t[r]=W(W({},i??{instanceId:r}),{error:!0,errorMsg:n.errorMsg,isLocalParticipantRecorded:!1,isRecording:!1}),t))})},[]))),G(`left-meeting`,L(F(function(e,t){t(Yg,{})},[]))),ro.createElement(ro.Fragment,null,t)},Qg=function(){var e=po(Fg);return ct(e),e},$g=ta(null);$g.debugLabel=Dh(`room-state`);var e_=function(e){var t=e.children,n=yh(),r=Qg();return G(`access-state-updated`,L(F(function(e,t){return ph(void 0,void 0,void 0,function(){var e;return mh(this,function(i){switch(i.label){case 0:return!n||r===`left-meeting`?[2]:[4,n.room()];case 1:return e=i.sent(),e&&`id`in e&&t($g,e),[2,e]}})})},[n,r]))),G(`left-meeting`,L(F(function(e,t){return function(){t($g,null)}},[]))),ro.createElement(ro.Fragment,null,t)},t_=ta({isTranscribing:!1,model:`general`,language:`en`,transcriptions:[]});t_.debugLabel=Dh(`transcription-state`);var n_=function(e){var t=e.children;return G(`transcription-started`,L(F(function(e,t,n){t(t_,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:n.endpointing,extra:n.extra,includeRawResponse:n.includeRawResponse,instanceId:n.instanceId,language:n.language,model:n.model,profanity_filter:n.profanity_filter,punctuate:n.punctuate,redact:n.redact,startedBy:n.startedBy,tier:n.tier})},[]))),G(`transcription-stopped`,L(F(function(e,t,n){t(t_,function(e){return W(W({},e),{updatedBy:n.updatedBy,isTranscribing:!1})})},[]))),G(`transcription-error`,L(F(function(e,t){t(t_,function(e){return W(W({},e),{error:!0,isTranscribing:!1})})},[]))),G(`left-meeting`,L(F(function(e,t){t(t_,function(e){return W(W({},e),{isTranscribing:!1})})},[]))),G(`app-message`,L(F(function(e,t,n){n?.fromId===`transcription`&&t(t_,function(e){return W(W({},e),{isTranscribing:!0,transcriptions:_h(_h([],gh(e.transcriptions),!1),[n.data],!1)})})},[]))),ro.createElement(ro.Fragment,null,t)},r_=`0.26.0`,i_={strictMode:!0},a_=function(){return!0},o_={options:i_,shouldCreateInstance:a_},s_=function(e,t){var n=t===void 0?o_:t,r=n.parentElRef,i=n.options,a=i===void 0?i_:i,o=n.shouldCreateInstance,s=o===void 0?a_:o,c=gh(j(null),2),l=c[0],u=c[1],d=N();return M(function(){if(e===`callFrame`&&r?.current===null||!s())return;function t(e){return ph(this,void 0,void 0,function(){return mh(this,function(t){switch(t.label){case 0:return[4,e.destroy()];case 1:return t.sent(),[2]}})})}var n=function(){setTimeout(function(){return u(null)},0)},i=Im.getCallInstance();if(!l&&i&&!i.isDestroyed()){i.once(`call-instance-destroyed`,n),u(i);return}if(l){Th(d.current,a)||t(l);return}if(!i||i.isDestroyed())try{var o=W(W({},a),{aboutClient:W(W({},a.aboutClient??{}),{"daily-react":r_})});switch(e){case`callFrame`:i=r?.current?Im.createFrame(r.current,o):Im.createFrame(o);break;case`callObject`:i=Im.createCallObject(o);break}d.current=a,u(i),i.once(`call-instance-destroyed`,n)}catch(e){if(console.error(`Error creating call instance:`,e),a.strictMode)throw e}},[l,a,r,s,e]),l},c_=function(e){return s_(`callObject`,e)},l_=function(e){var t=e.children,n=e.jotaiStore,r=fh(e,[`children`,`jotaiStore`]),i=N({}),a=F(function(e){var t,n;if(`action`in e){var r=e.action,a=Array.from(i.current?.[r]??[]),o=a.filter(function(e){return gh(e,1)[0]<0}),s=a.filter(function(e){return gh(e,1)[0]>0}),c=_h(_h([],gh(o),!1),gh(s),!1);try{for(var l=hh(c),u=l.next();!u.done;u=l.next()){var d=gh(u.value,2)[1];d(e)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}}},[]),o=F(function(e){e&&Object.keys(i.current).forEach(function(t){e.off(t,a),e.isDestroyed()||e.on(t,a)})},[a]),s=`callObject`in r?r.callObject:null,c=c_({options:P(function(){return`callObject`in r?{}:r},[r]),shouldCreateInstance:F(function(){return!(`callObject`in r)},[r])}),l=s??c;M(function(){l&&o(l)},[l,o]);var u=F(function(e,t,n){var r;i.current[e]||(i.current[e]=new Map,l&&(l.off(e,a),l.isDestroyed()||l.on(e,a))),i.current[e]?.has(n)||(r=i.current[e])==null||r.set(n,t)},[l,a]),d=F(function(e,t){var n;(n=i.current[e])==null||n.delete(t),i.current[e]?.size===0&&(l?.off(e,a),delete i.current[e])},[l,a]);return ro.createElement(oo,{store:n},ro.createElement(vh.Provider,{value:l},ro.createElement(bh.Provider,{value:{on:u,off:d}},ro.createElement(e_,null,ro.createElement(Bg,null,ro.createElement(qg,null,ro.createElement(ng,null,ro.createElement(Zg,null,ro.createElement(Pg,null,ro.createElement(n_,null,ro.createElement(Ag,null,ro.createElement(Og,null,ro.createElement(Tg,null,t)))))))))))))},u_=function(e){var t=(e===void 0?{}:e).onAppMessage,n=yh(),r=F(function(e,t){t===void 0&&(t=`*`),n&&n.sendAppMessage(e,t)},[n]);return G(`app-message`,F(function(e){t?.(e,r)},[t,r])),r},d_=function(e,t,n,r){var i=yh(),a=e===rg();G(`local-audio-level`,F(function(e){a&&t(e.audioLevel)},[t,a])),G(`remote-participants-audio-level`,F(function(n){a||t(n.participantsAudioLevel[e])},[t,e,a])),M(function(){if(!(!i||i.isDestroyed()||!a)&&!i.isLocalAudioLevelObserverRunning())try{i.startLocalAudioLevelObserver(r)}catch{n?.(`Local audio level observer not supported in this browser`)}},[i,n,r,a]),M(function(){!i||i.isDestroyed()||a||i.isRemoteParticipantsAudioLevelObserverRunning()||i.startRemoteParticipantsAudioLevelObserver(r)},[i,r,a])},f_=function(e){return pg(e,`audio`)},p_,m_;function h_(){return m_?p_:(m_=1,p_=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n},p_)}h_();var g_=ta({state:`low`,reason:`none`});g_.debugLabel=Dh(`cpu-load`);var __=function(){var e=yh(),t=po(yg),n=po(bg),r=po(xg),i=po(Sg),a=po(Cg),o=po(wg),s=st(vg).refreshDevices,c=F(function(t){return ph(void 0,void 0,void 0,function(){return mh(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:null,videoDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),l=F(function(t){return ph(void 0,void 0,void 0,function(){return mh(this,function(n){switch(n.label){case 0:return[4,e?.setInputDevicesAsync({audioDeviceId:t,videoDeviceId:null})];case 1:return n.sent(),[2]}})})},[e]),u=F(function(t){return ph(void 0,void 0,void 0,function(){return mh(this,function(n){switch(n.label){case 0:return[4,e?.setOutputDeviceAsync({outputDeviceId:t})];case 1:return n.sent(),[2]}})})},[e]),d=[`blocked`,`in-use`,`not-found`,`constraints-invalid`,`constraints-none-specified`,`undefined-mediadevices`,`unknown`],f={cameraError:o,cameras:r,camState:t,currentCam:r.find(function(e){return e.selected}),currentMic:i.find(function(e){return e.selected}),currentSpeaker:a.find(function(e){return e.selected}),hasCamError:d.includes(t),hasMicError:d.includes(n),microphones:i,micState:n,refreshDevices:s,setCamera:c,setMicrophone:l,setSpeaker:u,speakers:a};return ct(f),f},v_=ta(null);v_.debugLabel=Dh(`input-settings`);var y_=ta({hidden:0,present:0});y_.debugLabel=Dh(`participant-counts`);var b_=ho(function(e){var t=ta({},function(t,n,r){n(b_(e),r)});return t.debugLabel=Dh(`participant-receive-settings-${e}`),t}),x_=function(e){return pg(e,`screenVideo`)},S_=ta(null);S_.debugLabel=Dh(`send-settings`);var C_=function(e){return pg(e,`video`)},w_=class extends Error{constructor(){super(`Microphone blocked by the browser at join`),this.name=`MicrophoneBlockedError`}};function T_(e){return e instanceof w_}var E_=new Set([`network`,`server`,`unavailable`,`busy`,`rate_limited`]);function D_(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 O_(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 k_(e){if(e instanceof vn){let t=D_(e.status);return{kind:t,status:e.status,raw:e.body,retryable:E_.has(t),retryAfterSec:O_(e.headers)}}return e instanceof TypeError?{kind:`network`,raw:String(e),retryable:!0}:{kind:`unknown`,raw:String(e),retryable:!1}}var A_=new Set([`Captcha token required`,`Captcha verification failed`]);function j_(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 M_(e){return j_(e)===`Captcha token required`}function N_(e){let t=j_(e);return t!==null&&A_.has(t)}var P_=`Origin not allowed`;function F_(e){return j_(e)===P_}function I_(e){return e===`limit_exceeded`?`daily_limit`:e===`forbidden`||e===`concurrency`?null:`busy`}function L_({children:e}){return I(l_,{children:e})}var R_=Ae(null),z_=`tavus:memory-user-id:`,B_=new Map;function V_(e){return`${z_}${e}`}function H_(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function U_(e){if(!e)return``;let t=V_(e);try{let e=window.localStorage.getItem(t);if(e)return e;let n=H_();return window.localStorage.setItem(t,n),n}catch{}let n=B_.get(t);if(n)return n;let r=H_();return B_.set(t,r),r}var W_=`tavus:terms-accepted:`;function G_(e){let t=5381;for(let n=0;n<e.length;n++)t=(t*33^e.charCodeAt(n))>>>0;return t.toString(36)}function K_(e,t){return`${W_}${e}:${G_(t)}`}function q_(e,t){if(!e||!t)return!1;try{return globalThis.localStorage?.getItem(K_(e,t))===`1`}catch{return!1}}function J_(e,t){if(!(!e||!t))try{globalThis.localStorage?.setItem(K_(e,t),`1`)}catch{}}var Y_=null;function X_(e,t){!e||!t||(Y_={deploymentId:e,content:t})}function Z_(){Y_&&=(J_(Y_.deploymentId,Y_.content),null)}function Q_(e){return e===`user`?`user`:e===`pal`?`replica`:null}function $_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ev(e){if(!$_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!$_(e.properties))return null;if(e.event_type===`conversation.utterance`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=Q_(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=Q_(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 tv(e,t){return{message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e,properties:{text:t}}}function nv(e,t){return typeof e[t]==`number`?{[t]:e[t]}:{}}function rv(e){let t=Q_(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance`,event_type:`conversation.utterance`,properties:{role:t,speech:e.speech,...nv(e,`seq`),...nv(e,`turn_idx`)}}}function iv(e){let t=Q_(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}:{},...nv(e,`seq`)}}}function av(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,...nv(e,`seq`),...nv(e,`turn_idx`)}}}function ov(e){if(typeof e==`string`)return e;try{let t=JSON.stringify(e??{});return typeof t==`string`?t:null}catch{return null}}function sv(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=ov(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 cv(e){return{kind:`perception_analysis`,event_type:`conversation.perception_analysis`,properties:e}}function lv(e,t){return{kind:`speaking`,event_type:t,properties:{...nv(e,`seq`),...nv(e,`turn_idx`)}}}var uv={"conversation.utterance":rv,"conversation.utterance.streaming":iv,"conversation.tool_call":av,"conversation.perception_tool_call":sv,"conversation.perception_analysis":cv,"conversation.replica_started_speaking":lv,"conversation.replica_stopped_speaking":lv,"conversation.user_started_speaking":lv,"conversation.user_stopped_speaking":lv};function dv(e){if(!$_(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!$_(e.properties))return null;let t=uv[e.event_type];return t?t(e.properties,e.event_type):{kind:`unknown`,event_type:e.event_type,properties:e.properties}}function fv(e,t){return{message_type:`conversation`,event_type:t.event_type,conversation_id:e,properties:t.properties??{}}}function pv(e,t){let n=ev(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 mv(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?!1:(t.splice(r,1),!0)}}}var hv=hn(`Conversation`),gv=1500;function _v(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 vv=Ae(null);function yv({children:e}){return I(L_,{children:I(kv,{children:e})})}function bv(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 xv(e,t){for(let n of t)n.onToolCall?.({...e.properties})}function Sv(e,t){for(let n of t)n.onPerception?.(e)}function Cv(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 wv(e,t){for(let n of t)n.onMessage?.(e)}function Tv(e,t,n){switch(e.kind){case`utterance`:case`utterance.streaming`:bv(e,t,n);return;case`tool_call`:xv(e,t);return;case`perception_tool_call`:case`perception_analysis`:Sv(e,t);return;case`speaking`:Cv(e,t);return;case`unknown`:wv(e,t);return}}function Ev(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 Dv(e){let t=e.participants().local?.tracks.audio;return t?.state===`blocked`&&t.blocked?.byPermissions===!0}function Ov(e,t){return t?e instanceof vn&&e.status===401:!1}function kv({children:e}){let{deploymentId:t,client:n,config:r}=st(vi),{memoryStores:i,conversationalContext:a,customGreeting:o}=st(bt),s=yh(),c=Qg(),l=st(R_),u=P(()=>Bt(`idle`),[]),d=P(()=>Bt(null),[]),f=P(()=>Bt([]),[]),p=P(()=>Bt(``),[]),m=P(()=>Bt(null),[]),h=P(()=>Bt(null),[]),g=P(()=>Bt(null),[]),_=P(()=>Bt(null),[]),v=N(null),y=N(null),b=P(()=>mv(),[]),x=P(()=>new Set,[]),S=P(()=>Bt(`idle`),[]),C=l?.flowSignal??S,w=F(e=>{g.value=e},[g]),T=F(e=>{_.value=e},[_]),[,ee]=j(c);M(()=>{ee(c),c===`joined-meeting`?(u.value=`connected`,hv.info(`Connected to meeting`)):c===`left-meeting`?(u.value=`ended`,Z_(),hv.info(`Left meeting`)):c===`error`&&(h.value=`Meeting error`,u.value=`error`)},[c,u,h]),mn(()=>{let e=u.value;if(e===`connected`)for(let e of x)e.onConnect?.();else if(e===`ended`||e===`disconnecting`)for(let e of x)e.onDisconnect?.();else if(e===`error`){let e=h.peek()??`Unknown error`;for(let t of x)t.onError?.({code:`CONVERSATION_ERROR`,message:e})}}),mn(()=>{let e=C.value;for(let t of x)t.onModeChange?.(e)}),u_({onAppMessage:F(e=>{pv(e?.data,{appendChatMessage(e,t){e===`user`&&b.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},gv))}});let t=dv(e?.data);t&&Tv(t,x,b)},[f,p,m,b,x])}),M(()=>()=>{v.current!==null&&(clearTimeout(v.current),v.current=null)},[]);let E=F(()=>{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]),D=F(()=>{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,hv.error(`End conversation API failed`,e)}):Promise.resolve(),o;try{o=s?.leave()}catch(e){i=!0,hv.error(`Daily leave failed`,e)}let c=Promise.resolve(o).catch(e=>{i=!0,hv.error(`Daily leave failed`,e)}),l=Promise.all([a,c]).then(()=>{u.value=`ended`,i&&y.current?.promise===l&&(y.current=null)});return y.current={conversationId:e,promise:l},l},[n,t,s,d,u]),te=F(async(e,c)=>{let l=null;try{E(),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?[U_(t)]:[]);e.length&&(f={...f,memory_stores:e})}f=Ev(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 b=r.value.customization.conversation.modality===`chat`;if(await _v(Promise.resolve(s?.join({url:y.conversation_url,...b?{startAudioOff:!0,startVideoOff:!0}:{}})),c?.signal),!b&&s&&Dv(s))throw new w_}catch(e){throw await D(),l&&(d.value=null),Ov(e,r.value.has_password===!0)&&(g.value=null),hv.error(`Start failed`,e),h.value=String(e),u.value=`error`,e}},[n,t,s,u,h,d,g,_,r,i,a,o,E,D]),ne=F(e=>{if(!s)return;let t=d.peek();if(!t){hv.warn(`sendChat called before session was established; dropping message`);return}b.markSent(e),s.sendAppMessage(tv(t.conversationId,e),`*`),f.value=[...f.peek(),{id:crypto.randomUUID(),sender:`user`,text:e,timestamp:Date.now()}]},[s,f,d,b]),re=F(e=>{if(!s){hv.warn(`sendMessage called before Daily was ready; dropping message`);return}let t=d.peek();if(!t){hv.warn(`sendMessage called before session was established; dropping message`);return}e.event_type===`conversation.respond`&&b.markSent(e.properties.text),s.sendAppMessage(fv(t.conversationId,e),`*`)},[s,d,b]),O=F(e=>{x.add(e)},[x]),ie=F(e=>{x.delete(e)},[x]),ae=P(()=>({state:u,session:d,chatMessages:f,captionText:p,captionRole:m,error:h,password:g,setPassword:w,captchaToken:_,setCaptchaToken:T,mode:C,start:te,end:D,sendChat:ne,sendMessage:re,conversation:{start:te,end:D,sendMessage:re},__registerSubscriber:O,__unregisterSubscriber:ie,__beginAttempt:E}),[u,d,f,p,m,h,g,w,_,T,C,te,D,ne,re,O,ie,E]);return I(vv.Provider,{value:ae,children:e})}var Av=hn(`CaptchaChallenge`),jv=new Set([`110600`,`110620`,`200500`]);function Mv(e){return e.startsWith(`3`)||e.startsWith(`6`)}var Nv=new Set([`110500`,`110510`]);function Pv(e){return e.startsWith(`3`)||e.startsWith(`6`)||jv.has(e)}function Fv(e){return typeof e==`object`&&!!e&&e.source===`tavus-captcha`&&typeof e.type==`string`}function Iv(e,t,n,r,i){return`${e.replace(/\/+$/,``)}${t.startsWith(`/`)?t:`/${t}`}?deployment_uuid=${encodeURIComponent(n)}&action=${encodeURIComponent(r)}&parent_origin=${encodeURIComponent(i)}`}function Lv({captcha:e,deploymentId:t,onToken:n,onFallback:r,onInteractive:i,presented:a=!0}){let o=(st(bt).baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),s=new URL(o).origin,[c,l]=j(0),[u,d]=j(!1),[f,p]=j(!1),m=N(0),h=N(0),g=Iv(o,e.challenge_path,t,e.action,window.location.origin),_=F(()=>{p(!1),i?.(!1),m.current=0,h.current=0,l(e=>e+1)},[i]);if(M(()=>{function e(e){if(u||e.origin!==s)return;let a=e.data;if(Fv(a)&&a.deployment_uuid===t){if(a.type===`interactive`){p(!0),i?.(!0);return}if(a.type===`token`&&a.token){Av.info(`Captcha token received`),p(!1),i?.(!1),n(a.token);return}if(a.type===`expired`){Av.info(`Captcha token expired, reloading iframe`),_();return}if(a.type===`error`){let e=String(a.code??``);if(Av.warn(`Captcha error received`,e),Pv(e)){if(m.current+=1,Mv(e)&&(h.current+=1),m.current<2){p(!1),i?.(!1);return}Av.warn(`Captcha error keeps recurring, falling back to no-token mode`),d(!0),r(h.current>=2?`unsupported`:`exhausted`);return}Av.warn(`Captcha error is not retryable, falling back to no-token mode`),d(!0),r(Nv.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 I(`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:I(`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 Rv=hn(`Captcha`),zv=15e3,Bv=Ae(null);function Vv({children:e}){let{config:t,deploymentId:n}=st(vi),r=st(vv),i=sn(!0),a=sn(null),o=sn(!1),s=sn(0),c=sn(!1),l=sn(!1),u=N([]),d=t.value.captcha??null,f=r?.state.value??`idle`,p=f===`connecting`||f===`connected`,m=d!==null&&!c.value&&!p&&o.value,h=F(e=>{let t=u.current;u.current=[];for(let n of t)n(e)},[]),g=F(()=>{o.value=!1,l.value=!1},[o,l]),_=F((e,t)=>{Rv.warn(e),c.value=!0,g(),h({kind:`unavailable`,reason:t})},[c,h,g]),v=F(e=>{r?.setCaptchaToken(e)},[r]),y=r?.captchaToken;M(()=>{if(y)return y.subscribe(e=>{e!==null&&g()})},[y,g]);let b=F(e=>{_(`Captcha challenge unavailable; not attempting /start without a token`,e)},[_]),x=F(e=>{l.value=e},[l]),S=F(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`),zv))}),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=P(()=>({ensureToken:S,hostVisible:i,promptSlot:a}),[S,i,a]),w=a.value,T=m&&d?I(Lv,{captcha:d,deploymentId:n,presented:i.value,onToken:v,onFallback:b,onInteractive:x},s.value):null;return I(Bv.Provider,{value:C,children:[e,w&&T?Pa(T,w):T]})}function Hv(){let e=st(vi);if(!e)throw Error(`useConfig must be used within ConfigProvider`);return e}var Uv=`tavus_pudl_`,Wv=3600*48,Gv=new Map;function Kv(){let e=new Date;return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function qv(e){return`${Uv}${e}`}function Jv(e){try{let t=`${qv(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!==Kv())return 0;let a=Number.parseInt(i,10);return Number.isFinite(a)&&a>0?a:0}catch{return 0}}function Yv(e,t){try{let n=encodeURIComponent(`${Kv()}.${t}`);document.cookie=`${qv(e)}=${n}; max-age=${Wv}; path=/; SameSite=Lax`}catch{return}}function Xv(e){let t=Gv.get(e);return t||(t=Bt(e?Jv(e):0),Gv.set(e,t)),t}function Zv(e){if(!e)return;Yv(e,Jv(e)+1);let t=Jv(e),n=Gv.get(e);n?n.value=t:Gv.set(e,Bt(t))}function Qv(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 $v(e,t,n,r){return e===`granted`&&r?`granted`:Qv(e)||(t===`denied`?`blocked`:t===`prompt`?e===`granted`&&n?`granted`:`prompt`:t===`granted`?n?`checking`:`prompt`:e===`granted`?`granted`:n?`checking`:`prompt`)}function ey(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 ty(e){let[t,n]=j(null);return M(()=>{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 ny(){let e=yh(),t=Qg(),n=rg(),{micState:r,camState:i,currentMic:a,currentCam:o}=__(),s=ty(`microphone`),c=ty(`camera`),l=t===`joined-meeting`||!!n,[u,d]=j(!1),[f,p]=j(!1),m=F(()=>{e&&(d(!0),l?e.setLocalAudio(!0):Promise.resolve(e.startCamera({videoSource:!1})).catch(()=>{}))},[e,l]),h=F(async()=>{if(e){p(!0);try{await e.setInputDevicesAsync({videoSource:!0})}catch{}e.setLocalVideo(!0)}},[e]);return{mic:P(()=>ey($v(r,s,u,!!a),s),[r,s,u,a]),camera:P(()=>ey($v(i,c,f,!!o),c),[i,c,f,o]),requestMic:m,requestCamera:h}}var ry=hn(`Flow`),iy=[`idle`,`unavailable`,`ended`];function ay({children:e}){let{config:t,retryInit:n}=Hv(),{cameraOnStart:r}=st(bt),{start:i,end:a,session:o,state:s,__beginAttempt:c}=st(vv),l=t.value.deployment_id??``,u=Xv(l),d=F(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;return n==null||e.channel!==`widget`&&e.channel!==`embed`?null:n},[t]),f=st(Bv),[p,m]=j(`idle`),[h,g]=j(!1),[_,v]=j(null),[y,b]=j(null),[x,S]=j(!1),{mic:C,camera:w,requestMic:T,requestCamera:ee}=ny(),E=P(()=>Bt(`idle`),[]);M(()=>{E.value=p},[p,E]),mn(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;n!=null&&(e.channel!==`widget`&&e.channel!==`embed`||E.value===`idle`&&u.value>=n&&(b(`daily_limit`),S(!1),m(`unavailable`)))});let D=t.value.customization.show_haircheck,te=t.value.customization.conversation.modality,ne=D&&te!==`chat`,re=!D&&te!==`chat`,O=N(!1),ie=N(!1),ae=N(async()=>{}),k=N(!1),A=N(null),oe=N(null),se=F(()=>{let e=A.current;A.current=null,e?.resolve()},[]),ce=F(async(e=new AbortController)=>{oe.current=e;let{signal:r}=e;g(!0);try{let e=await f?.ensureToken(r)??{kind:`not-required`};if(r.aborted)return;if(e.kind===`unavailable`){b(e.reason===`unsupported`?`captcha_unsupported`:`error`),S(e.reason===`timeout`||e.reason===`exhausted`),m(`unavailable`);return}if(await i(void 0,{signal:r}),r.aborted)return;O.current=!1,ie.current=!1,d()!=null&&Zv(l),m(`call`)}catch(i){if(r.aborted)return;let a=k_(i);if(T_(i)){se(),v({kind:`microphone`,status:`blocked`}),m(`idle`);return}if(M_(i)&&(t.peek().captcha??null)===null&&!ie.current)return ie.current=!0,ry.info(`/start demands a captcha the loaded config lacks; refreshing config`),await n(),r.aborted?void 0:await ae.current(e);if(N_(i)&&!O.current){O.current=!0,g(!1),m(`idle`);return}if(O.current=!1,F_(i)){ry.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`),b(`error`),S(!1),m(`unavailable`);return}if(a.status===401&&t.value.has_password===!0){m(`idle`);return}let o=I_(a.kind)??`busy`;b(o),S(a.retryable),m(`unavailable`)}finally{oe.current===e&&(oe.current=null),g(!1)}},[i,t,d,l,f,n,se]);ae.current=ce;let le=F(async()=>{let e=A.current;if(e){v(null);try{await ce(e.controller)}finally{A.current===e&&(A.current=null),e.resolve()}}},[ce]),ue=F(()=>{let e=A.current;if(!(!e||e.proceeding)){if(e.proceeding=!0,te===`video`&&r===`on`&&!w.isGranted&&!w.isBlocked){v({kind:`camera`,status:w.status}),ee().finally(()=>{le()});return}le()}},[te,r,w,ee,le]);M(()=>{if(!(!A.current||_?.kind!==`microphone`)){if(_.status!==C.status&&v({kind:`microphone`,status:C.status}),C.isGranted){ue();return}if(C.isBlocked){let e=A.current;A.current=null,g(!1),e.resolve()}}},[_,C,ue]);let de=F(()=>{if(A.current)return A.current.promise;let e,t=new Promise(t=>{e=t});return A.current={promise:t,resolve:e,proceeding:!1,controller:new AbortController},g(!0),C.isGranted?ue():C.isBlocked?(v({kind:`microphone`,status:C.status}),A.current=null,g(!1),e()):(v({kind:`microphone`,status:C.status}),T()),t},[C,T,ue]),fe=F(async()=>{if(!iy.includes(p))return;let e=d();if(e!=null&&u.value>=e){b(`daily_limit`),S(!1),m(`unavailable`);return}if(c(),ne&&!k.current){m(`haircheck`);return}return re?de():ce()},[p,ne,re,de,ce,d,u,c]),pe=F(async()=>{p===`haircheck`&&(k.current=!0,await ce())},[p,ce]),me=F(()=>{let e=A.current,t=e?.controller??oe.current;e&&(A.current=null,e.resolve(),v(null)),t?.abort(),t&&g(!1),p===`haircheck`&&m(`idle`)},[p]),he=F(()=>{p===`call`&&m(`ended`)},[p]);M(()=>{let e=()=>{let e=A.current!==null||oe.current!==null,t=p===`haircheck`||p===`call`,n=o.peek()!==null,r=n&&s.peek()!==`ended`;!e&&!t&&!n||(me(),(p===`call`||r)&&m(`ended`),a())};return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[p,o,s,me,a]);let ge=F(()=>{b(null),S(!1),m(`idle`)},[]),_e=P(()=>({flowSignal:E,setFlowState:m,isStarting:h,permissionRequest:_,unavailableCause:y,canRetry:x,start:fe,join:pe,cancel:me,leave:he,restart:ge}),[E,h,_,y,x,fe,pe,me,he,ge]);return I(R_.Provider,{value:_e,children:e})}var oy=hn(`HostBridge`),sy=Ae(null);function cy(e){if(!e)return null;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}function ly({children:e}){let t=st(vv),n=st(vi),r=st(R_),i=st(bt),a=sn(null),o=i?.overrideConfig,s=F(e=>{a.value=cy(e)},[a]),c=F((e,t)=>{let n=a.peek();n&&n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})),oy.info(`Event:`,e,t)},[a]);M(()=>{let e=a.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){oy.error(`startConversation failed`,e)}},endConversation:async()=>{try{let e=r?.flowSignal.peek();e===`call`?r?.leave():e===`haircheck`?r?.cancel():t.session.peek()&&await t.end()}catch(e){oy.error(`endConversation failed`,e)}},sendMessage:e=>{t.sendMessage(typeof e==`string`?{event_type:`conversation.respond`,properties:{text:e}}:e)},updateConfig:t=>{let n=wn(o??{},t);e.setAttribute(`override-config`,JSON.stringify(n))},destroy:()=>{t.session.peek()&&t.end(),e.remove()}};return Object.assign(e,n),()=>{for(let t of Object.keys(n))delete e[t]}},[a.value,t,r,o]);let l=N(!1);M(()=>{l.current||!a.value||!n||(l.current=!0,c(`tavus:ready`,{deploymentId:n.deploymentId}))},[a.value,n,c]);let u=N(null);M(()=>t.state.subscribe(e=>{if(e!==u.current)switch(u.current=e,e){case`connected`:c(`tavus:conversation-started`,{conversationId:t.session.peek()?.conversationId??``}),c(`tavus:state-change`,{state:e});break;case`ended`:c(`tavus:conversation-ended`,{conversationId:t.session.peek()?.conversationId??``}),c(`tavus:state-change`,{state:e});break;case`error`:c(`tavus:error`,{code:`CONVERSATION_ERROR`,message:t.error.peek()??`Unknown error`}),c(`tavus:state-change`,{state:e});break;default:c(`tavus:state-change`,{state:e})}}),[t,c]),mn(()=>{if(!r)return;let e=r.flowSignal.value;c(`tavus:mode-change`,{mode:e})}),M(()=>{let e={onUtterance(e){c(`tavus:protocol-message`,{kind:`utterance`,event_type:`conversation.utterance`,properties:e})},onToolCall(e){c(`tavus:tool-call`,e),c(`tavus:protocol-message`,{kind:`tool_call`,event_type:`conversation.tool_call`,properties:e})},onPerception(e){c(`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}};c(`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){c(`tavus:protocol-message`,e)}};return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[t,c]);let d=P(()=>({shadowHost:a,dispatchEvent:c}),[a,c]);return I(sy.Provider,{value:d,children:[I(`div`,{ref:s,style:`display:contents`}),e]})}var uy=Ae(null);function dy({children:e}){let{config:t}=st(vi),n=P(()=>Gt(()=>{let e=t.value.customization.style;return e.mode===`dark`||e.mode===`system`&&(globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1)}),[t]),r=P(()=>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=P(()=>Gt(()=>hy(t.value.customization.style)),[t]),a=P(()=>({dataTheme:r,isDark:n,cssVars:i}),[r,n,i]);return I(uy.Provider,{value:a,children:I(`div`,{"data-theme":r.value,style:gy(i.value),class:`contents`,children:e})})}var fy=[0,.125,.25,.5,.75],py=[0,1,2,3,4],my=[0,.2,.25,.3];function hy(e){return{"--radius-box":`${fy[e.boxes_radius]??.5}rem`,"--radius-field":`${fy[e.field_radius]??.25}rem`,"--radius-selector":`${fy[e.selectors_radius]??.5}rem`,"--border":`${py[e.border_width]??1}px`,"--size-field":`${my[e.fields_size]??.25}rem`,"--size-selector":`${my[e.selectors_size]??.25}rem`,"--depth":e.depth_effect?`1`:`0`,"--noise":e.noise_effect?`1`:`0`}}function gy(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}Ae(null);var _y=`m-0 p-0 border-0 bg-transparent text-inherit max-w-none max-h-none`;`${_y}`,`${_y}`;var vy=41/2,yy=23/2,by=Math.hypot(vy,yy);Array.from({length:1008},(e,t)=>{let n=t%42,r=Math.floor(t/42),i=Math.hypot(n-vy,r-yy)/by*.82,a=.34+(n*13+r*7)%34/100;return{delay:`${i.toFixed(3)}s`,opacity:a.toFixed(2)}});var xy=Ae(null);function Sy({children:e}){let t=N(null);return I(xy.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 Cy=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),wy=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ty=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Ey=e=>{let t=Ty(e);return t.charAt(0).toUpperCase()+t.slice(1)},Dy={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`},Oy=Ae({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,class:``}),ky=()=>st(Oy),Ay=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},jy=({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,children:i,iconNode:a,class:o=``,...s})=>{let{size:c=24,strokeWidth:l=2,absoluteStrokeWidth:u=!1,color:d=`currentColor`,class:f=``}=ky()??{},p=r??u?Number(n??l)*24/Number(t??c):n??l;return O(`svg`,{...Dy,width:t??c??24,height:t??c??24,stroke:e??d,"stroke-width":p,class:Cy(`lucide`,f,o),...!i&&!Ay(s)&&{"aria-hidden":`true`},...s},[...a.map(([e,t])=>O(e,t)),...me(i)])},My=(e,t)=>{let n=({class:n=``,className:r=``,children:i,...a})=>O(jy,{...a,iconNode:t,class:Cy(`lucide-${wy(Ey(e))}`,`lucide-${wy(e)}`,n,r)},i);return n.displayName=Ey(e),n},Ny=My(`camera-off`,[[`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`}]]),Py=My(`camera`,[[`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`}]]),Fy=My(`captions`,[[`rect`,{width:`18`,height:`14`,x:`3`,y:`5`,rx:`2`,ry:`2`,key:`12ruh7`}],[`path`,{d:`M7 15h4M15 15h2M7 11h2M13 11h4`,key:`1ueiar`}]]),Iy=My(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Ly=My(`ellipsis`,[[`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`}]]),Ry=My(`expand`,[[`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`}]]),zy=My(`external-link`,[[`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`}]]),By=My(`maximize-2`,[[`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`}]]),Vy=My(`message-circle`,[[`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`}]]),Hy=My(`mic-off`,[[`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`}]]),Uy=My(`mic`,[[`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`}]]),Wy=My(`minimize-2`,[[`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`}]]),Gy=My(`monitor-up`,[[`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`}]]),Ky=My(`moon`,[[`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`}]]),qy=My(`phone-off`,[[`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`}]]),Jy=My(`picture-in-picture-2`,[[`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`}]]),Yy=My(`send`,[[`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`}]]),Xy=My(`shrink`,[[`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`}]]),Zy=My(`smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),Qy=My(`triangle-alert`,[[`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`}]]),$y=My(`user`,[[`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`}]]),eb=My(`users`,[[`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`}]]),tb=My(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function nb(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 rb={close:nb(tb,`Close`),cancel:nb(tb,`Cancel`),leave:nb(qy,`Leave call`),more:nb(Ly,`More`),error:nb(Qy,`Error`),mic:nb(Uy,`Microphone`),"mic-off":nb(Hy,`Microphone muted`),cam:nb(Py,`Camera`),"cam-off":nb(Ny,`Camera off`),"screen-share":nb(Gy,`Screen share`),pip:nb(Jy,`Picture in picture`),user:nb($y,`User`),"face-smile":nb(Zy,`Camera off`),captions:nb(Fy,`Closed captions`),chat:nb(Vy,`Chat`),fullscreen:nb(By,`Enter fullscreen`),"fullscreen-exit":nb(Wy,`Exit fullscreen`),expand:nb(Ry,`Expand`),collapse:nb(Xy,`Collapse`),send:nb(Yy,`Send`),"external-link":nb(zy,`External link`),clock:nb(Iy,`Clock`),moon:nb(Ky,`Unavailable`),users:nb(eb,`Busy`)},ib=`<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>`,ab=`<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>`,ob=`<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>`,sb=`<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>`,cb=`<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>`,lb=`<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>`,ub=`<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>`,db=`<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>`,fb=`<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>`,pb=`<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>`,mb=`<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>`,hb=`<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>`,gb=`<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>`,_b=`<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>`,vb=`<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>`,yb=`<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>`,bb=`<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>`,xb=`<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>`,Sb=`<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>`,Cb=`<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>`,wb=`<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>`,Tb=`<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>`,Eb=`<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>
|
|
84
|
-
`;function Db(e){return e.replace(/\s(width|height)="\d+"/g,``)}function Ob(e,t){let n=Db(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 kb={pixelarticons:{close:Ob(cb,`Close`),cancel:Ob(lb,`Cancel`),leave:Ob(mb,`Leave call`),more:Ob(vb,`More`),error:Ob(db,`Error`),mic:Ob(hb,`Microphone`),"mic-off":Ob(gb,`Microphone muted`),cam:Ob(Eb,`Camera`),"cam-off":Ob(ib,`Camera off`),"screen-share":Ob(bb,`Screen share`),pip:Ob(yb,`Picture in picture`),user:Ob(Sb,`User`),"face-smile":Ob(wb,`Camera off`),captions:Ob(ab,`Closed captions`),chat:Ob(ob,`Chat`),fullscreen:Ob(pb,`Enter fullscreen`),"fullscreen-exit":Ob(ub,`Exit fullscreen`),expand:Ob(fb,`Expand`),collapse:Ob(ub,`Collapse`),send:Ob(xb,`Send`),"external-link":Ob(Tb,`External link`),clock:Ob(sb,`Clock`),moon:Ob(_b,`Unavailable`),users:Ob(Cb,`Busy`)},lucide:rb};function Ab({name:e,...t}){let{config:n}=Hv(),r=(kb[n.value.customization.style.icon_library]??kb.pixelarticons)[e];return I(r,{...t})}var jb=`Ready when you are`,Mb=`Start the conversation`;function Nb(e){return typeof e==`string`&&e.length>0?e:``}function Pb(e){let t=Nb(e.replica_thumbnail_image_url)||null,n=Nb(e.replica_thumbnail_video_url)||null;return!t&&!n?null:{imageUrl:t,videoUrl:n}}function Fb(e){let{preview:t}=e.customization,{background:n}=t,r=Pb(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=Nb(n.url);return{title:t.title||jb,description:t.description||``,btn_title:t.btn_title||Mb,background:{type:i,url:a}}}var Ib={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`},Lb=`#t=0.1`;function Rb(e){return e.includes(`#`)?e:`${e}${Lb}`}function zb({replica:e,fallback:t=null}){let[n,r]=j(()=>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)?I(`img`,{class:a,src:o,loading:`lazy`,alt:``,onError:()=>i(o)}):s&&!n.has(s)?I(`video`,{class:a,src:Rb(s),muted:!0,playsinline:!0,preload:`metadata`,controls:!1,onError:()=>i(s)}):I(k,{children:t})}function Bb({variant:e,replica:t}){let[n,r]=j(!1);return M(()=>{r(!1)},[e.url]),e.type===`replica`&&t?I(zb,{replica:t,fallback:I(`div`,{class:`absolute inset-0`,style:Ib})}):e.type===`custom-image`&&e.url&&!n?I(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:e.url,loading:`lazy`,alt:``,onError:()=>r(!0)}):I(`div`,{class:`absolute inset-0`,style:Ib})}function Vb({className:e=``}){let{config:t}=Hv(),n=Fb(t.value),r=Pb(t.value);return I(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:I(Bb,{variant:n.background,replica:r})})}var Hb=`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 Ub({title:e,description:t,media:n,children:r,overlay:i}){return I(`div`,{class:Hb,children:[n===void 0?I(Vb,{}):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 Wb({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 Gb={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 Kb(e,t){let n=t?.[e];return{title:n?.title||Gb[e].title,description:n?.description||Gb[e].description}}var qb={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`,captcha_unsupported:`error`},Jb={daily_limit:`never`,total_limit:`never`,busy:`always`,error:`when-retryable`,captcha_unsupported:`never`};function Yb({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(Ab,{name:qb[e],size:`2rem`})})}function Xb({cause:e,canRetry:t,onRetry:n,onCancel:r,isStarting:i=!1}){let{config:a}=Hv(),o=a.value.customization?.unavailable_screen,s=Kb(e,o),c=o?.cta??[],l=Jb[e],u=l===`always`||l===`when-retryable`&&t,d=u||c.length>0||!!r;return I(Ub,{media:I(Yb,{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(Wb,{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 Zb(){let e=st(R_);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}}function Qb(){return st(bt)?.layout??`inline`}function $b({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 ex({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 tx=`text-preview-title @max-mobile:text-preview-title-narrow`,nx=`text-preview-title-full-screen`,rx=`text-sm @max-mobile:text-xs`,ix=`text-preview-description-full-screen`;function ax({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?nx:tx} font-medium leading-tight`,children:e}),t&&I(`p`,{class:`${n?ix:rx} text-white/80 leading-snug`,children:t})]})}var ox=`absolute inset-0 overflow-hidden bg-base-100 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,sx=`absolute inset-x-0 top-0 h-2/5 bg-linear-to-b from-black/60 to-transparent`,cx=`absolute inset-x-0 bottom-0 h-2/5 bg-linear-to-t from-black/70 to-transparent`,lx=`absolute inset-0 bg-black/45`,ux=`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 dx({title:e,description:t,children:n,align:r=`low`,overlay:i,class:a,role:o,"aria-live":s}){let{config:c}=Hv(),l=Fb(c.value),u=Pb(c.value),d=Qb()===`full-screen`;return I(`div`,{class:a?`${ox} ${a}`:ox,role:o,"aria-live":s,children:[I(Bb,{variant:l.background,replica:u}),r===`center`?I(k,{children:[I(`div`,{class:lx}),I(`div`,{class:`${ux} flex flex-col items-center justify-center gap-3`,children:n})]}):I(k,{children:[(e||t)&&(d?I(`div`,{class:sx}):I(k,{children:[I(`div`,{class:`${sx} hidden @max-mobile:block`}),I(`div`,{class:cx})]})),d?I(`div`,{class:ux,children:[I(ax,{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:`${ux} 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(ax,{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 fx={video:`cam`,audio:`mic`,chat:`chat`},px={"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 mx({children:e,loading:t=!1,...n}){let{config:r}=Hv(),i=Qb(),a=fx[r.value.customization.conversation.modality],o=a!==void 0&&i===`full-screen`;return I(Wb,{class:`btn-preview-action rounded-box ${px[i]}`,loading:t,...n,children:o?I(`span`,{class:`flex items-center justify-center gap-2`,children:[I(Ab,{name:a,"aria-hidden":!0}),e]}):e})}var hx=`Thanks for joining`,gx=`You can start a new conversation whenever you're ready.`,_x=`Start a new conversation`;function vx(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function yx({text:e,onRestart:t,isStarting:n=!1,permissionRequest:r=null}){let{config:i}=Hv(),a=Qb()===`full-screen`,o=i.value.customization.after_call,s=o.cta.filter(e=>vx(e.url)),c=o.title||e?.title||hx,l=o.description||e?.description||gx,u=e?.restart||_x;return I(dx,{title:c,description:l,children:[I(`div`,{class:`relative`,children:[r&&I(ex,{message:$b(r),class:`absolute bottom-full mb-3 z-20 ${a?`left-1/2 -translate-x-1/2`:`right-0`}`}),I(mx,{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 bx(){let e=yh(),t=rg(),{isOff:n}=C_(t),{camState:r}=__();return{isCamReady:P(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:F(()=>{e?.setLocalVideo(n)},[e,n])}}function xx(){let e=yh(),t=rg(),{isOff:n}=f_(t),{micState:r}=__();return{isMicReady:P(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:F(()=>{e?.setLocalAudio(n)},[e,n])}}function Sx(){let e=yh(),t=rg(),{isOff:n}=x_(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:F(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}var Cx={microphone:`microphone`,camera:`camera`};function wx({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 Tx(){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(wx,{})}),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 Ex=_a(({device:e,onClose:t})=>{let n=Cx[e];return M(()=>{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(Ab,{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(Tx,{})}),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(wx,{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`})]})]})]})})}),Dx=Ae({open:()=>{},close:()=>{}});function Ox(){return st(Dx)}function kx({children:e}){let[t,n]=j(null),r=F(e=>n(e),[]),i=F(()=>n(null),[]),a=P(()=>({open:r,close:i}),[r,i]);return I(Dx.Provider,{value:a,children:[e,t&&I(Ex,{device:t,onClose:i})]})}var Ax=_a(()=>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:`!`})),jx=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,Mx=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,Nx=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,Px=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,Fx=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function Ix(){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 Lx(){let e=rg(),t=N(null),n=N(void 0);return d_(e??``,F(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 Rx({value:e,devices:t,disabled:n,onChange:r,label:i}){return I(k,{children:[I(`select`,{class:Mx,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:Nx,children:I(Ix,{})})]})}function zx(e){return I(`div`,{class:jx,children:I(Rx,{...e})})}function Bx({iconName:e,...t}){return I(`div`,{class:jx,children:[I(`span`,{class:Px,"aria-hidden":`true`,children:I(Ab,{name:e})}),I(Rx,{...t})]})}var Vx=_a(({level:e=!1})=>{let{onToggleMicrophone:t,isMicReady:n,isMicMuted:r}=xx(),{microphones:i,currentMic:a,setMicrophone:o}=__();if(!a||(i?.length??0)<=1)return I(Wx,{level:e});let s=e&&n&&!r;return I(`div`,{class:`relative inline-flex items-center`,children:[I(zx,{value:a?.device?.deviceId,devices:i||[],disabled:!n,onChange:e=>o(e),label:`Select microphone`}),I(`button`,{type:`button`,onClick:t,disabled:!n,class:`${Fx} overflow-hidden`,"aria-label":r?`Unmute microphone`:`Mute microphone`,"aria-pressed":r,children:[s&&I(Lx,{}),I(`span`,{class:`relative z-10 inline-flex`,children:I(Ab,{name:r||!n?`mic-off`:`mic`})})]})]})});function Hx(){let{onToggleCamera:e,isCamMuted:t}=bx(),{camera:n,requestCamera:r}=ny(),{open:i}=Ox(),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 Ux=_a(()=>{let{isCamReady:e}=bx(),{currentCam:t,cameras:n,setCamera:r}=__(),i=Hx();return!t||(n?.length??0)<=1?I(Gx,{}):I(`div`,{class:`relative inline-flex items-center`,children:[I(zx,{value:t?.device?.deviceId,devices:n||[],disabled:!e,onChange:e=>r(e),label:`Select camera`}),I(`button`,{type:`button`,onClick:i.onClick,class:Fx,"aria-label":i.label,"aria-pressed":!i.isOn,children:I(Ab,{name:i.isOn?`cam`:`cam-off`})})]})}),Wx=_a(({level:e=!1})=>{let{onToggleMicrophone:t,isMicMuted:n}=xx(),{mic:r,requestMic:i}=ny(),{open:a}=Ox(),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(Lx,{}),I(`span`,{class:`relative z-10 inline-flex`,children:I(Ab,{name:n||!r.isGranted?`mic-off`:`mic`})})]}),r.needsAttention&&I(Ax,{})]})}),Gx=_a(()=>{let{isOn:e,onClick:t,label:n,needsAttention:r}=Hx();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(Ab,{name:e?`cam`:`cam-off`})}),r&&I(Ax,{})]})});_a(({compact:e=!1}={})=>{let{isMicReady:t}=xx(),{microphones:n,currentMic:r,setMicrophone:i}=__();return(n?.length??0)<=1?null:I(Bx,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),_a(({compact:e=!1}={})=>{let{isCamReady:t}=bx(),{currentCam:n,cameras:r,setCamera:i}=__();return(r?.length??0)<=1?null:I(Bx,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var Kx=_a((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=Sx();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(Ab,{name:`screen-share`})})});function qx(e){let t=st(vv);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return M(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var Jx=Ae(null);function Yx({children:e,defaultEnabled:t=!1}){let[n,r]=j(t),i=F(()=>r(e=>!e),[]),a=P(()=>({isEnabled:n,toggle:i}),[n,i]);return I(Jx.Provider,{value:a,children:e})}function Xx(){let e=st(Jx);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var Zx=_a(()=>{let{isEnabled:e,toggle:t}=Xx();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(Ab,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),Qx=_a(()=>{let{isEnabled:e}=Xx(),{captionText:t,captionRole:n}=qx(),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]})})})}),$x=Ae(null);function eS({children:e,defaultOpen:t=!1}){let[n,r]=j(t),i=F(()=>r(e=>!e),[]),a=F(()=>r(!1),[]),o=P(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return I($x.Provider,{value:o,children:e})}function tS(){let e=st($x);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var nS=_a((e={})=>{let{isOpen:t,toggle:n}=tS();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(Ab,{name:`chat`})})}),rS=_a(({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})]})}),iS=_a(({docked:e=!1,headerAction:t}={})=>{let{isOpen:n,close:r}=tS(),{chatMessages:i,sendChat:a,session:o}=qx(),s=o.value?.conversationId??null,c=i.value,[l,u]=j(``),d=N(null);M(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[c.length]);let f=F(()=>{let e=l.trim();!e||!s||(a(e),u(``))},[l,a,s]),p=F(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?!1:!n,inert:e?!1:!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(Ab,{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(rS,{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(Ab,{name:`send`,size:18})})]})]})});function aS({label:e}){return I(dx,{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 oS=_a(()=>I(aS,{label:`Connecting…`})),sS=_a(()=>I(aS,{label:`Leaving…`}));function cS({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(Ab,{name:e?`fullscreen-exit`:`fullscreen`,size:`calc(var(--size-field, 0.25rem) * 3.5)`})})]})}var lS=_a(({id:e})=>{let t=ag()===e,n=N(null),r=N(null),i=N(null),a=N(void 0);d_(e,F(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%`}})]})})}),uS=[0,1,2],dS=.05,fS=450;function pS({sessionId:e,className:t=``}){let{config:n}=Hv(),r=Fb(n.value),i=Pb(n.value),a=N(null),o=N(void 0),s=N(void 0),[c,l]=j(!1),u=N(!1);return d_(e??``,F(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>dS?(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)},fS))}))},[e])),M(()=>()=>{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:[uS.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(Bb,{variant:r.background,replica:i})})]})}function mS({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 hS=e=>!!e.user_id?.includes(`tavus-replica`);function gS(){return ug({filter:hS})}function _S(e){let t=gS()[0],n=C_(t??``),r=Qg(),[i,a]=j(!1);return M(()=>{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 vS=_a(({isAudioOnly:e})=>{let t=_S(e);return t.phase===`left`?I(sS,{}):t.phase===`connecting`?I(oS,{}):e?I(mS,{class:`flex items-center justify-center`,children:[I(pS,{sessionId:t.replicaId}),I(hg,{sessionId:t.replicaId})]}):I(`div`,{class:`relative w-full h-full`,children:[I(_g,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`}),I(hg,{sessionId:t.replicaId})]})}),yS=_a(({onLeave:e})=>{let{config:t}=Hv(),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(vS,{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(Wx,{}),!n&&I(Gx,{}),I(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:I(Ab,{name:`leave`,"aria-label":`Leave Call`})})]})]})})});function bS(e,t){return e<=0||t<=0?!1:e/t<.75}var xS=_a(({personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})=>{let a=N(null),o=i??a,[s,c]=j(0),[l,u]=j(0),d=F(({aspectRatio:e})=>c(e),[]);M(()=>{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&&bS(s,l),h=n||m;return I(k,{children:[m&&I(_g,{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(_g,{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`:``}`})]})}),SS=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),CS=[`.sandbox-tavus.io`],wS=new Set([`tavusapi.com`]);function TS(e){let t;try{t=new URL(e)}catch{return!1}return OS(t)?!0:t.protocol===`https:`?SS.has(t.hostname)?!0:CS.some(e=>t.hostname.endsWith(e)):!1}function ES(e){return TS(e)}function DS(e){let t;try{t=new URL(e)}catch{return!1}return kS(t)?!0:t.protocol===`https:`&&wS.has(t.hostname)}function OS(e){return kS(e)}function kS(e){return!AS()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function AS(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}async function jS(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close?.()}catch{}}var MS=`tavus.canvas.interaction`,NS=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],PS=`safe-area-right`,FS={x:275/1280,y:111/720,width:730/1280,height:609/720},IS={type:`snapshot_mirror`};function LS(e){return aC(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&aC(e.properties):!1}function RS(e){if(!aC(e))return null;let t=yC(e,`component`),n=yC(e,`component_version`),r=yC(e,`sandbox_url`),i=SC(e,`mcp_server_url`,ES),a=SC(e,`api_base_url`,DS),o=SC(e,`interaction_url`,DS),s=lC(e.layout),c=e.version;return c!==1||!t||!n||!r||!TS(r)||i===null||a===null||o===null||s===null?null:{version:c,component:t,component_version:n,resource_uri:yC(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:yC(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,layout:s,host_context:aC(e.host_context)?e.host_context:void 0}}function zS(e){if(e===void 0)return{ok:!0,value:{}};if(aC(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 aC(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:oC(e)}}}function BS(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=zS(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(!aC(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 VS=[`safe-area-left`,`safe-area-right`];function HS(e){let t=VS.includes(e.preferred_slot)?e.preferred_slot:PS;return t===e.preferred_slot&&e.display_mode===`inline`?e:{...e,preferred_slot:t,display_mode:`inline`}}function US(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function WS(e,t){return[t]}function GS(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 WS(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=tC(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:HS({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&&US(o.layout)===US(i.layout)?a:WS(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 KS(e){if(!aC(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!aC(t))continue;let e=(aC(t._meta)?t._meta:null)?.[MS];if(aC(e))return CC(e)}return null}function qS(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.`);return{interaction_id:t.interaction_id??iC(e.tool_call_id,n),conversation_id:e.conversation_id,tool_call_id:e.tool_call_id,component:t.component??e.canvas_config.component,component_version:t.component_version??e.canvas_config.component_version,type:n,value:r,metadata:aC(t.metadata)?t.metadata:{}}}function JS(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 YS(e){return!aC(e)||!Array.isArray(e.content)?``:e.content.map(e=>aC(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
|
|
85
|
-
`).trim()}function XS(e,t){let n=aC(t.structuredContent)?t.structuredContent:void 0,r=sC(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: ${cC(n)}`),r&&r!==a&&o.push(r),o.join(`
|
|
86
|
-
`)}function ZS({conversationId:e,toolCallId:t,args:n,canvasConfig:r}){let i=tC(n);return{id:t,conversation_id:e,tool_call_id:t,arguments:i.componentArguments,canvas_config:r,layout:HS({preferred_slot:i.preferredSlot??r.layout?.preferred_slot??nC(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??FS,backdrop:i.backdrop??r.layout?.backdrop??IS}),revision:0}}function QS(e,t){let n=e.layout.display_mode;return{...e.layout,display_mode:n,viable_slot:n===`fullscreen`?`full`:eC(e.layout.preferred_slot,t)}}function $S(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:IS};let a=[...n].reverse()[0];if(!a||t.width<900)return{active:!1,video_shift_x:0,backdrop:IS};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`?xC(16+o+24-c,0,u):-xC(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 eC(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 tC(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:uC(e.layout)??uC(e.preferred_slot)??uC(e.preferredSlot),displayMode:dC(e),avoidSafeArea:fC(e),safeArea:pC(e),backdrop:mC(e)}}function nC(e){switch(e){case`canvas.alert`:return`safe-area-bottom`;case`canvas.chart`:case`canvas.image`:case`canvas.video`:return`full`;default:return PS}}function rC(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 iC(e,t){return`ci_${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}_${t}_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,10)}`}function aC(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function oC(e){return e instanceof Error?e:Error(String(e))}function sC(e){return Array.isArray(e)?e.map(e=>aC(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
|
|
87
|
-
`).trim():``}function cC(e){let t=JSON.stringify(e);return t?t.length<=2e3?t:`${t.slice(0,2e3)}...`:`{}`}function lC(e){if(e===void 0)return;if(!aC(e))return null;let t=uC(e),n=hC(e.safe_area??e.safeArea),r=gC(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},..._C(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function uC(e){if(typeof e==`string`&&vC(e))return e;if(!aC(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&vC(t)?t:void 0}function dC(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 fC(e){let t=aC(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 pC(e){let t=aC(e.layout)?e.layout:void 0;return hC(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function mC(e){let t=aC(e.layout)?e.layout:void 0;return gC(e.backdrop??t?.backdrop)??void 0}function hC(e){if(e===void 0)return;if(!aC(e))return null;let t=bC(e,`x`),n=bC(e,`y`),r=bC(e,`width`),i=bC(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:xC(t,0,1),y:xC(n,0,1),width:xC(r,0,1),height:xC(i,0,1)}}function gC(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!aC(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function _C(e,t){return typeof e==`boolean`?{[t]:e}:{}}function vC(e){return NS.includes(e)}function yC(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function bC(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function xC(e,t,n){return Math.min(Math.max(e,t),n)}function SC(e,t,n){let r=yC(e,t);if(r)return n(r)?r:null}function CC(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&&!aC(e.metadata)?null:e}var wC=`tavus-deployment magic-canvas/0.0.0`;function TC(e){if(!LS(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=RS(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=zS(e.properties.arguments);if(!r.ok)throw r.error;return ZS({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function EC(e){if(!LS(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=TC(e);return t?{kind:`show`,instance:t}:null}return BS(e)}function DC(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 OC(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:rC(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:wC,styles:{variables:kC(e.cssVars)}}}function kC(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`,...AC(e)}}function AC(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={},s=(e,t)=>{t&&(o[e]=t)},c=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return s(`--color-background-primary`,n),s(`--color-background-secondary`,r),s(`--color-border-secondary`,i),s(`--color-border-primary`,c(t,28,n)),s(`--color-text-primary`,t),s(`--color-text-secondary`,c(t,62,n)),s(`--color-text-danger`,a),s(`--color-border-danger`,a),o}var jC=24,MC=96;function NC(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 PC(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function FC(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 IC(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??FS,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 LC(e,t,n){let[r,i]=j(()=>e?NC(PC(n?.current)):null);return at(()=>{if(!e){i(null);return}let t=PC(n?.current),r=()=>i(NC(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 RC(e,t,n){let[r,i]=j(()=>t?FC(e.current):null);return at(()=>{if(!t){i(null);return}let n=()=>i(FC(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 zC(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`&&IC(e,r,i,a)),side:o}}function BC(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>=MC&&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-jC*2),g=Math.max(MC,Math.min(h,c-jC*2));return{centerX:(u+d)/2-r,centerY:(f+p)/2-a,diameter:g}}var VC=`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 HC(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function UC(e,t,n){let[r,i]=j(()=>e&&t?BC(t,PC(n?.current),FC(n?.current)):null);return at(()=>{if(!e||!t){i(null);return}let r=PC(n?.current),a=()=>i(BC(t,r,FC(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 WC(e,t){let[n,r]=j(null);return at(()=>{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 GC=1;function KC(e,t,n){return Math.min(Math.max(e,t),n)}function qC(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??FS,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:KC(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:KC(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var JC=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function YC(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=qC(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 XC(e,t,n){let r=N(null),i=N(e),a=N(n),o=N(0),s=N(0);i.current=e,a.current=n,M(()=>{let e=i.current;if(!e)return;if(!r.current||ZC()){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 JC){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?JC.map(t=>Math.round(e[t]*100)).join():``,t]),M(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function ZC(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function QC({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 $C(e,t){let n=t>=0?`left`:`right`,r=N({side:n,shift:t});M(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:HC(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function ew(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function tw({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 nw({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(tw,{snapshotUrl:e,transformOrigin:r})})}function rw({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 iw({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% - ${GC}px)`}:{right:`calc(100% - ${GC}px)`},children:I(tw,{snapshotUrl:t,transformOrigin:`center`})})]})})}function aw({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=VC,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=N(null),[f,p]=j(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=N(null),_=ew(e,h,c),{usePip:v,side:y}=zC(e,s,c,LC(s!==`shift`,_,g),h,RC(g,s!==`shift`,_)),b=UC(s!==`shift`,y,g),x=$C(m,h);M(()=>{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]),M(()=>{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=WC(g,C),T=f!==null&&!C,ee=C&&y!=null,E=N(null),D=N(null),[te,ne]=j(!0),re=N(!0),O=F((e,t)=>{let n=E.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=D.current;r&&(r.style.transform=`translate3d(${e.shift}px, 0, 0)`),re.current!==t&&(re.current=t,ne(t))},[]);return XC(C?YC(b,S,w,h,e):null,o,O),I(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[T&&f!==null&&I(nw,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),ee&&I(rw,{ambient:l,usePip:v,transition:a}),I(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:I(iw,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:E,videoWrapRef:D,fill:r,videoRef:d})}),C&&b&&I(QC,{geom:b,visible:S&&te}),u]})}var ow=480,sw=_a(({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?`${ow}px`:`0px`,right:o<0?`${ow}px`:`0px`,transition:`left ${VC}, right ${VC}`},children:[I(_g,{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(pS,{sessionId:e})}):I(_g,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover`})})]})})});function K(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 cw(e){return e&&Object.assign(fw,e),fw}var lw,uw,dw,fw,pw=a((()=>{uw=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},dw=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(lw=globalThis).__zod_globalConfig??(lw.__zod_globalConfig={}),fw=globalThis.__zod_globalConfig}));function mw(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 hw(e,t=`|`){return e.map(e=>jw(e)).join(t)}function gw(e,t){return typeof t==`bigint`?t.toString():t}function _w(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function vw(e){return e==null}function yw(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function bw(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 xw(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Jw)return r===void 0&&(r=Jw,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Sw(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Cw(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ww(e){return JSON.stringify(e)}function Tw(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function Ew(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Dw(e){if(Ew(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Ew(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ow(e){return Dw(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function kw(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Aw(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function q(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 jw(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Mw(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function Nw(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 Aw(e,Cw(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 Sw(this,`shape`,e),e},checks:[]}))}function Pw(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 Aw(e,Cw(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 Sw(this,`shape`,r),r},checks:[]}))}function Fw(e,t){if(!Dw(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 Aw(e,Cw(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Sw(this,`shape`,n),n}}))}function Iw(e,t){if(!Dw(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Aw(e,Cw(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Sw(this,`shape`,n),n}}))}function Lw(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Aw(e,Cw(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Sw(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Rw(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 Aw(t,Cw(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 Sw(this,`shape`,i),i},checks:[]}))}function zw(e,t,n){return Aw(t,Cw(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 Sw(this,`shape`,i),i}}))}function Bw(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 Vw(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 Hw(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Uw(e){return typeof e==`string`?e:e?.message}function Ww(e,t,n){let r=e.message?e.message:Uw(e.inst?._zod.def?.error?.(e))??Uw(t?.error?.(e))??Uw(n.customError?.(e))??Uw(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 Gw(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Kw(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function qw(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var Jw,Yw,Xw,Zw,Qw,$w=a((()=>{pw(),Jw=Symbol(`evaluating`),Yw=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},Xw=_w(()=>{if(fw.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Zw=new Set([`string`,`number`,`symbol`]),Qw={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function eT(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 tT(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 nT,rT,iT,aT=a((()=>{pw(),$w(),nT=(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,gw,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},rT=K(`$ZodError`,nT),iT=K(`$ZodError`,nT,{Parent:Error})})),oT,sT,cT,lT,uT,dT,fT,pT,mT,hT,gT,_T,vT,yT,bT=a((()=>{pw(),aT(),$w(),oT=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 uw;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>Ww(e,a,cw())));throw Yw(t,i?.callee),t}return o.value},sT=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=>Ww(e,a,cw())));throw Yw(t,i?.callee),t}return o.value},cT=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 uw;return a.issues.length?{success:!1,error:new(e??rT)(a.issues.map(e=>Ww(e,i,cw())))}:{success:!0,data:a.value}},lT=cT(iT),uT=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=>Ww(e,i,cw())))}:{success:!0,data:a.value}},dT=uT(iT),fT=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return oT(e)(t,n,i)},pT=e=>(t,n,r)=>oT(e)(t,n,r),mT=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return sT(e)(t,n,i)},hT=e=>async(t,n,r)=>sT(e)(t,n,r),gT=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return cT(e)(t,n,i)},_T=e=>(t,n,r)=>cT(e)(t,n,r),vT=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return uT(e)(t,n,i)},yT=e=>async(t,n,r)=>uT(e)(t,n,r)}));function xT(){return new RegExp(FT,`u`)}function ST(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 CT(e){return RegExp(`^${ST(e)}$`)}function wT(e){let t=ST({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(`^${WT}T(?:${r})$`)}var TT,ET,DT,OT,kT,AT,jT,MT,NT,PT,FT,IT,LT,RT,zT,BT,VT,HT,UT,WT,GT,KT,qT,JT,YT,XT,ZT,QT,$T,eE=a((()=>{TT=/^[cC][0-9a-z]{6,}$/,ET=/^[0-9a-z]+$/,DT=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,OT=/^[0-9a-vA-V]{20}$/,kT=/^[A-Za-z0-9]{27}$/,AT=/^[a-zA-Z0-9_-]{21}$/,jT=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,MT=/^([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})$/,NT=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)$/,PT=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,FT=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,IT=/^(?:(?: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])$/,LT=/^(([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}|:))$/,RT=/^((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])$/,zT=/^(([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])$/,BT=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,VT=/^[A-Za-z0-9_-]*$/,HT=/^https?$/,UT=/^\+[1-9]\d{6,14}$/,WT=`(?:(?:\\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])))`,GT=RegExp(`^${WT}$`),KT=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},qT=/^-?\d+$/,JT=/^-?\d+(?:\.\d+)?$/,YT=/^(?:true|false)$/i,XT=/^null$/i,ZT=/^undefined$/i,QT=/^[^A-Z]*$/,$T=/^[^a-z]*$/})),tE,nE,rE,iE,aE,oE,sE,cE,lE,uE,dE,fE,pE,mE,hE,gE,_E,vE=a((()=>{pw(),eE(),$w(),tE=K(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),nE={number:`number`,bigint:`bigint`,object:`date`},rE=K(`$ZodCheckLessThan`,(e,t)=>{tE.init(e,t);let n=nE[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})}}),iE=K(`$ZodCheckGreaterThan`,(e,t)=>{tE.init(e,t);let n=nE[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})}}),aE=K(`$ZodCheckMultipleOf`,(e,t)=>{tE.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):bw(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})}}),oE=K(`$ZodCheckNumberFormat`,(e,t)=>{tE.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Qw[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=qT)}),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})}}),sE=K(`$ZodCheckMaxLength`,(e,t)=>{var n;tE.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!vw(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=Gw(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),cE=K(`$ZodCheckMinLength`,(e,t)=>{var n;tE.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!vw(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=Gw(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),lE=K(`$ZodCheckLengthEquals`,(e,t)=>{var n;tE.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!vw(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=Gw(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})}}),uE=K(`$ZodCheckStringFormat`,(e,t)=>{var n,r;tE.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=()=>{})}),dE=K(`$ZodCheckRegex`,(e,t)=>{uE.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})}}),fE=K(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=QT,uE.init(e,t)}),pE=K(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=$T,uE.init(e,t)}),mE=K(`$ZodCheckIncludes`,(e,t)=>{tE.init(e,t);let n=kw(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})}}),hE=K(`$ZodCheckStartsWith`,(e,t)=>{tE.init(e,t);let n=RegExp(`^${kw(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})}}),gE=K(`$ZodCheckEndsWith`,(e,t)=>{tE.init(e,t);let n=RegExp(`.*${kw(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})}}),_E=K(`$ZodCheckOverwrite`,(e,t)=>{tE.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),yE,bE=a((()=>{yE=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(`
|
|
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?Au[e]:Object.values(Au)[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,D,ae,oe,se,O,ce,le,ue}();function Ku(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 qu(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]=Wc;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 Ju(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 Yu(e,t){return[`joining-meeting`,`joined-meeting`].includes(e)||t}function Xu(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(Yu(e,t)){var i=`${n} not supported after joining a meeting.`;throw r&&(i+=` ${r}`),console.error(i),Error(i)}}function Zu(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 Qu(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 $u(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 ed(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 td(){if(tl())throw Error(`This daily-js method is not currently supported in React Native`)}function nd(){if(!tl())throw Error(`This daily-js method is only supported in React Native`)}function rd(e){if(e===void 0)return!0;var t;if(typeof e==`string`)t=e;else try{t=JSON.stringify(e),qn(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 id(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=zn(s[o],2),l=c[0],u=c[1];if(!r(l)||!a(u))return!1}return!0}function ad(e){if(L(e)!==`object`)return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=zn(n[t],2),i=r[0],a=r[1];switch(i){case`video`:if(L(a)!==`object`)return!1;for(var o=0,s=Object.entries(a);o<s.length;o++){var c=zn(s[o],2),l=c[0],u=c[1];switch(l){case`processor`:if(!cd(u))return!1;break;case`settings`:if(!ld(u))return!1;break;default:return!1}}break;case`audio`:if(L(a)!==`object`)return!1;for(var d=0,f=Object.entries(a);d<f.length;d++){var p=zn(f[d],2),m=p[0],h=p[1];switch(m){case`processor`:if(!sd(h))return!1;break;case`settings`:if(!ld(h))return!1;break;default:return!1}}break;default:return!1}}return!0}function od(e,t,n){var r,i=[];e.video&&e.video.processor&&(ll((r=t?.useLegacyVideoProcessor)!=null&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push(`video`))),e.audio&&e.audio.processor&&(ul()||(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:Wc}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:Wc}):delete n.videoTrack)}function sd(e){if(tl())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`];return!!e&&L(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(Kc).includes(e)?!0:(console.error(`inputSettings audio processor type invalid`),!1):!1}(e.type))}function cd(e){if(tl())return console.warn(`Video processing is not yet supported in React Native`),!1;var t=[`type`,`config`];return!e||L(e)!==`object`||!function(e){return typeof e==`string`?Object.values(Gc).includes(e)?!0:(console.error(`inputSettings video processor type invalid`),!1):!1}(e.type)||e.config&&(L(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 Gc.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 Gc.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(vr(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 Xc.includes(r)}catch(e){return console.error(`failed to deduce blob content type`,e),!1}var i=n.split(`.`).at(-1).toLowerCase().trim();return Xc.includes(i)}(e.source)||(console.error(`invalid image type; supported types: [${Xc.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 ld(e){return L(e)===`object`&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function ud(){return`inputSettings must be of the form: { video?: { processor?: { type: [ ${Object.values(Gc).join(` | `)} ], config?: {} } }, audio?: { processor: {type: [ ${Object.values(Kc).join(` | `)} ] } } }`}function dd(e){return`receiveSettings must be of the form { [<remote participant id> | ${zs}${e.allowAllParticipantsKey?` | "*"`:``}]: { [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}`}function fd(){return`customIntegrations should be an object of type ${JSON.stringify(Bu)}.`}function pd(e){if(e&&L(e)!==`object`||Array.isArray(e))return console.error(`customTrayButtons should be an Object of the type ${JSON.stringify(zu)}.`),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=zn(n[t],1)[0],i=0,a=Object.entries(e[r]);i<a.length;i++){var o=zn(a[i],2),s=o[0],c=o[1],l=zu.id[s];if(!l)return console.error(`customTrayButton does not support key ${s}`),!1;switch(s){case`iconPath`:case`iconPathDarkMode`:if(!vr(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(L(c)!==l)return console.error(`customTrayButton ${s} should be a ${l}.`),!1}}return!0}function md(e){if(!e||e&&L(e)!==`object`||Array.isArray(e))return console.error(fd()),!1;for(var t=function(e){return`${e} should be ${Bu.id[e]}`},n=function(e,t){return console.error(`customIntegration ${e}: ${t}`)},r=0,i=Object.entries(e);r<i.length;r++){var a=zn(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=zn(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(!vr(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(!vr(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(!Bu.id[l])return console.error(`customIntegration does not support key ${l}`),!1}}}return!0}function hd(e,t){if(t===void 0)return!1;switch(L(t)){case`string`:return L(e)===t;case`object`:if(L(e)!==`object`)return!1;for(var n in e)if(!hd(e[n],t[n]))return!1;return!0;default:return!1}}function gd(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 _d(e){if(L(e)!==`object`)throw Error(`RemoteMediaPlayerSettings: must be "object" type`);if(e.state&&!Object.values(qc).includes(e.state))throw Error(`Invalid value for RemoteMediaPlayerSettings.state, valid values are: `+JSON.stringify(qc));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 vd(e,t,n){return!(typeof e!=`number`||e<t||e>n)}function yd(e,t){return e&&!t&&delete e.data,e}function bd(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 xd(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 Sd(e,t){let n=kt(`idle`),r=kt(`idle`),i=kt([]),a=kt([]),o=kt([]),s=0,c=0,l=!1;async function u(){let t=++s;if(!navigator.mediaDevices?.getUserMedia||!navigator.mediaDevices?.enumerateDevices){gt(()=>{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;gt(()=>{i.value=xd(n,`videoinput`,r,i.peek()),a.value=xd(n,`audioinput`,c,a.peek()),o.value=xd(n,`audiooutput`,u,o.peek())})}catch(e){if(l||t!==s)return;console.warn(`Unable to enumerate Daily devices`,e),gt(()=>{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||(gt(()=>{n.value=bd(o.tracks.video,n.peek(),s),r.value=bd(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`,()=>{gt(()=>{n.value=`granted`,r.value=`granted`}),f()}),t(`camera-error`,({error:e})=>{++c,gt(()=>{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,gt(()=>{n.value=r.value=`idle`,i.value=[],a.value=[],o.value=[]})},dispose(){l=!0,++s,++c}}}function Cd(e){return{...e,tracks:{...e.tracks,audio:{...e.tracks.audio},video:{...e.tracks.video},screenAudio:{...e.tracks.screenAudio},screenVideo:{...e.tracks.screenVideo}}}}function wd(e){let t=kt(e.meetingState()),n=kt({}),r=kt(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,Cd(e)]))}let c=Pt(()=>Object.values(n.value).find(e=>e.local)?.session_id??null),l=Sd(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]:Cd(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(){gt(()=>{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 Td=`default`in Gu?Gu.default:Gu,Ed=Ce(null);function Dd({children:e,callObject:t}){let[n,r]=k(null);return Qe(()=>{let e=!1,n;function i(){if(e)return;let a=t??Td.getCallInstance(),o=a&&!a.isDestroyed()?a:Td.createCallObject(),s=wd(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]),F(Ed.Provider,{value:n,children:e})}function Od(){return P(Ed)}var kd=new WeakMap;function Ad(e,t,n,r){let i=kd.get(e)??new Map;kd.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 jd(){return Od()?.call??null}function Md(){return Od()?.store.meetingState.value??`new`}function Nd(){return Od()?.store.localSessionId.value??null}function Pd(){return Od()?.store.activeSpeakerId.value??null}function Fd(e,t){let n=jd(),r=j(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 Id({onAppMessage:e}={}){let t=jd();return Fd(`app-message`,t=>e?.(t)),N((e,n=`*`)=>{t?.sendAppMessage(e,n)},[t])}function Ld({filter:e}){let t=Od()?.store;return M(()=>{let n=[];return Pt(()=>{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 Rd(e,t=`video`){let n=Od()?.store,r=M(()=>Pt(()=>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 zd(e){return Rd(e,`video`)}function Bd(e){return Rd(e,`audio`)}function Vd(e){return Rd(e,`screenVideo`)}function Hd(){let e=Od()?.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:N(async t=>{await e?.setCamera(t)},[e]),setMicrophone:N(async t=>{await e?.setMicrophone(t)},[e]),setSpeaker:N(async t=>{await e?.setSpeaker(t)},[e])}}function Ud(e,t,n,r){let i=jd(),a=Nd(),o=!!e&&e===a,s=j(n);s.current=n,Fd(`local-audio-level`,n=>{e&&o&&t(n.audioLevel)}),Fd(`remote-participants-audio-level`,n=>{e&&!o&&t(n.participantsAudioLevel[e]??0)}),Qe(()=>{if(i&&e&&!i.isDestroyed())return Ad(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 Wd(e,t){for(var n in t)e[n]=t[n];return e}function Gd(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 Kd(e,t){this.props=e,this.context=t}function qd(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:Gd(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}(Kd.prototype=new ee).isPureReactComponent=!0,Kd.prototype.shouldComponentUpdate=function(e,t){return Gd(this.props,e)||Gd(this.state,t)};var Jd=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Jd&&Jd(e)};var Yd=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.forward_ref`)||3911;function Xd(e){function t(t){var n=Wd({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Yd,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}var Zd=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)}Zd(e,t,n,r)};var Qd=r.unmount;function $d(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=Wd({},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 $d(e,t,n)})),e}function ef(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return ef(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 tf(){this.__u=0,this.o=null,this.__b=null}function nf(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function rf(){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),Qd&&Qd(e)},(tf.prototype=new ee).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=nf(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]=ef(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)},tf.prototype.componentWillUnmount=function(){this.o=[]},tf.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]=$d(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 af=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 of(e){return this.getChildContext=function(){return e.context},e.children}function sf(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(w(of,{context:t.context},e.__v),t.v)}function cf(e,t){var n=w(sf,{__v:e,h:t});return n.containerInfo=t,n}(rf.prototype=new ee).__a=function(e){var t=this,n=nf(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),af(t,e,r)):i()};n?n(a):a()}},rf.prototype.render=function(e){this.i=null,this.l=new Map;var t=O(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},rf.prototype.componentDidUpdate=rf.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){af(e,n,t)})};var lf=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,uf=/^(?: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]/,df=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ff=/[A-Z0-9]/g,pf=typeof document<`u`,mf=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 hf=r.event;r.event=function(e){return hf&&(e=hf(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var gf={configurable:!0,get:function(){return this.class}},_f=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||pf&&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`||mf(t.type)?s===`onfocus`?a=`onfocusin`:s===`onblur`?a=`onfocusout`:df.test(a)&&(a=s):s=a=`oninput`:i&&uf.test(a)?a=a.replace(ff,`-$&`).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=O(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),r.defaultValue!=null&&(r.value=O(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",gf)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=lf,_f&&_f(e)};var vf=r.__r;r.__r=function(e){vf&&vf(e),e.__c};var yf=r.diffed;r.diffed=function(e){yf&&yf(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 bf(e,t){return M(()=>n=>{for(let r of[e,t])typeof r==`function`?r(n):r&&(r.current=n)},[e,t])}var xf=qd(Xd(function({automirror:e,fit:t=`contain`,mirror:n,onResize:r,playableStyle:i={},sessionId:a,style:o={},type:s=`video`,...c},l){let u=Nd()===a,d=s===`screenVideo`,f=u&&s===`video`,p=j(null),m=bf(p,l),h=j(!1),g=Rd(a,s),_=g.persistentTrack,v=f||d||!g.isOff,y=g.subscribed,b=M(()=>{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 A(()=>{h.current=b},[b]),A(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)}},[]),A(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]),A(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]),F(`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})}));xf.displayName=`DailyVideo`;var Sf=qd(Xd(({onPlayFailed:e,sessionId:t,type:n=`audio`,...r},i)=>{let a=j(null),o=Rd(t,n),s=bf(a,i),c=o.subscribed,l=j(e);return l.current=e,A(()=>{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]),Fd(`participant-left`,N(e=>{let n=a.current;e.participant.session_id===t&&n&&(n.pause(),n.srcObject=null)},[t])),Fd(`left-meeting`,N(()=>{let e=a.current;e&&(e.pause(),e.srcObject=null)},[])),F(`audio`,{autoPlay:!0,ref:s,...r,"data-session-id":t,"data-audio-type":n,"data-subscribed":c})}));Sf.displayName=`DailyAudioTrack`;var Cf=class extends Error{constructor(){super(`Microphone blocked by the browser at join`),this.name=`MicrophoneBlockedError`}};function wf(e){return e instanceof Cf}var Tf=new Set([`network`,`server`,`unavailable`,`busy`,`rate_limited`]);function Ef(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 Df(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 Of(e){if(e instanceof sn){let t=Ef(e.status);return{kind:t,status:e.status,raw:e.body,retryable:Tf.has(t),retryAfterSec:Df(e.headers)}}return e instanceof TypeError?{kind:`network`,raw:String(e),retryable:!0}:{kind:`unknown`,raw:String(e),retryable:!1}}var kf=new Set([`Captcha token required`,`Captcha verification failed`]);function Af(e){if(!(e instanceof sn)||e.status!==403)return null;try{let t=JSON.parse(e.body.trim()).error;return typeof t==`string`?t:null}catch{return null}}function jf(e){return Af(e)===`Captcha token required`}function Mf(e){let t=Af(e);return t!==null&&kf.has(t)}var Nf=`Origin not allowed`;function Pf(e){return Af(e)===Nf}function Ff(e){return e===`limit_exceeded`?`daily_limit`:e===`forbidden`||e===`concurrency`?null:`busy`}var If=Ce(null),Lf=`tavus:memory-user-id:`,Rf=new Map;function zf(e){return`${Lf}${e}`}function Bf(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function Vf(e){if(!e)return``;let t=zf(e);try{let e=window.localStorage.getItem(t);if(e)return e;let n=Bf();return window.localStorage.setItem(t,n),n}catch{}let n=Rf.get(t);if(n)return n;let r=Bf();return Rf.set(t,r),r}var Hf=`tavus:terms-accepted:`;function Uf(e){let t=5381;for(let n=0;n<e.length;n++)t=(t*33^e.charCodeAt(n))>>>0;return t.toString(36)}function Wf(e,t){return`${Hf}${e}:${Uf(t)}`}function Gf(e,t){if(!e||!t)return!1;try{return globalThis.localStorage?.getItem(Wf(e,t))===`1`}catch{return!1}}function Kf(e,t){if(e&&t)try{globalThis.localStorage?.setItem(Wf(e,t),`1`)}catch{}}var qf=null;function Jf(e,t){e&&t&&(qf={deploymentId:e,content:t})}function Yf(){qf&&=(Kf(qf.deploymentId,qf.content),null)}function Xf(e){return e===`user`?`user`:e===`pal`?`replica`:null}function Zf(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Qf(e){if(!Zf(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!Zf(e.properties))return null;if(e.event_type===`conversation.utterance`){let t=e.properties;if(typeof t.speech!=`string`)return null;let n=Xf(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=Xf(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 $f(e,t){return{message_type:`conversation`,event_type:`conversation.respond`,conversation_id:e,properties:{text:t}}}function ep(e,t){return typeof e[t]==`number`?{[t]:e[t]}:{}}function tp(e){let t=Xf(e.role);return!t||typeof e.speech!=`string`?null:{kind:`utterance`,event_type:`conversation.utterance`,properties:{role:t,speech:e.speech,...ep(e,`seq`),...ep(e,`turn_idx`)}}}function np(e){let t=Xf(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}:{},...ep(e,`seq`)}}}function rp(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,...ep(e,`seq`),...ep(e,`turn_idx`)}}}function ip(e){if(typeof e==`string`)return e;try{let t=JSON.stringify(e??{});return typeof t==`string`?t:null}catch{return null}}function ap(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=ip(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 op(e){return{kind:`perception_analysis`,event_type:`conversation.perception_analysis`,properties:e}}function sp(e,t){return{kind:`speaking`,event_type:t,properties:{...ep(e,`seq`),...ep(e,`turn_idx`)}}}var cp={"conversation.utterance":tp,"conversation.utterance.streaming":np,"conversation.tool_call":rp,"conversation.perception_tool_call":ap,"conversation.perception_analysis":op,"conversation.replica_started_speaking":sp,"conversation.replica_stopped_speaking":sp,"conversation.user_started_speaking":sp,"conversation.user_stopped_speaking":sp};function lp(e){if(!Zf(e)||e.message_type!==`conversation`||typeof e.event_type!=`string`||!Zf(e.properties))return null;let t=cp[e.event_type];return t?t(e.properties,e.event_type):{kind:`unknown`,event_type:e.event_type,properties:e.properties}}function up(e,t){return{message_type:`conversation`,event_type:t.event_type,conversation_id:e,properties:t.properties??{}}}function dp(e,t){let n=Qf(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 fp(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 pp=rn(`Conversation`),mp=1500;function hp(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 gp=Ce(null);function _p({children:e}){return F(Dd,{children:F(Dp,{children:e})})}function vp(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 yp(e,t){for(let n of t)n.onToolCall?.({...e.properties})}function bp(e,t){for(let n of t)n.onPerception?.(e)}function xp(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 Sp(e,t){for(let n of t)n.onMessage?.(e)}function Cp(e,t,n){switch(e.kind){case`utterance`:case`utterance.streaming`:vp(e,t,n);return;case`tool_call`:yp(e,t);return;case`perception_tool_call`:case`perception_analysis`:bp(e,t);return;case`speaking`:xp(e,t);return;case`unknown`:Sp(e,t);return}}function wp(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 Tp(e){let t=e.participants().local?.tracks.audio;return t?.state===`blocked`&&t.blocked?.byPermissions===!0}function Ep(e,t){return t?e instanceof sn&&e.status===401:!1}function Dp({children:e}){let{deploymentId:t,client:n,config:r}=P(Sn),{memoryStores:i,conversationalContext:a,customGreeting:o}=P(lt),s=jd(),c=Md(),l=P(If),u=M(()=>kt(`idle`),[]),d=M(()=>kt(null),[]),f=M(()=>kt([]),[]),p=M(()=>kt(``),[]),m=M(()=>kt(null),[]),h=M(()=>kt(null),[]),g=M(()=>kt(null),[]),_=M(()=>kt(null),[]),v=j(null),y=j(null),b=M(()=>fp(),[]),x=M(()=>new Set,[]),S=M(()=>kt(`idle`),[]),C=l?.flowSignal??S,w=N(e=>{g.value=e},[g]),T=N(e=>{_.value=e},[_]),[,E]=k(c);A(()=>{E(c),c===`joined-meeting`?(u.value=`connected`,pp.info(`Connected to meeting`)):c===`left-meeting`?(u.value=`ended`,Yf(),pp.info(`Left meeting`)):c===`error`&&(h.value=`Meeting error`,u.value=`error`)},[c,u,h]),nn(()=>{let e=u.value;if(e===`connected`)for(let e of x)e.onConnect?.();else if(e===`ended`||e===`disconnecting`)for(let e of x)e.onDisconnect?.();else if(e===`error`){let e=h.peek()??`Unknown error`;for(let t of x)t.onError?.({code:`CONVERSATION_ERROR`,message:e})}}),nn(()=>{let e=C.value;for(let t of x)t.onModeChange?.(e)}),Id({onAppMessage:N(e=>{dp(e?.data,{appendChatMessage(e,t){e===`user`&&b.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},mp))}});let t=lp(e?.data);t&&Cp(t,x,b)},[f,p,m,b,x])}),A(()=>()=>{v.current!==null&&(clearTimeout(v.current),v.current=null)},[]);let ee=N(()=>{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]),te=N(()=>{let e=d.peek()?.conversationId??null,r=y.current;if(r?.conversationId===e)return r.promise;u.value=`disconnecting`;let i=!1,a=e?un(n,t,e,{keepalive:!0}).catch(e=>{i=!0,pp.error(`End conversation API failed`,e)}):Promise.resolve(),o;try{o=s?.leave()}catch(e){i=!0,pp.error(`Daily leave failed`,e)}let c=Promise.resolve(o).catch(e=>{i=!0,pp.error(`Daily leave failed`,e)}),l=Promise.all([a,c]).then(()=>{u.value=`ended`,i&&y.current?.promise===l&&(y.current=null)});return y.current={conversationId:e,promise:l},l},[n,t,s,d,u]),ne=N(async(e,c)=>{let l=null;try{ee(),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?[Vf(t)]:[]);e.length&&(f={...f,memory_stores:e})}f=wp(f,a,o);let v=_.peek();_.value=null,v&&f?.captcha_token==null&&(f={...f,captcha_token:v});let y=await ln(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 b=r.value.customization.conversation.modality===`chat`;if(await hp(Promise.resolve(s?.join({url:y.conversation_url,...b?{startAudioOff:!0,startVideoOff:!0}:{}})),c?.signal),!b&&s&&Tp(s))throw new Cf}catch(e){throw await te(),l&&(d.value=null),Ep(e,r.value.has_password===!0)&&(g.value=null),pp.error(`Start failed`,e),h.value=String(e),u.value=`error`,e}},[n,t,s,u,h,d,g,_,r,i,a,o,ee,te]),re=N(e=>{if(!s)return;let t=d.peek();if(!t){pp.warn(`sendChat called before session was established; dropping message`);return}b.markSent(e),s.sendAppMessage($f(t.conversationId,e),`*`),f.value=[...f.peek(),{id:crypto.randomUUID(),sender:`user`,text:e,timestamp:Date.now()}]},[s,f,d,b]),ie=N(e=>{if(!s){pp.warn(`sendMessage called before Daily was ready; dropping message`);return}let t=d.peek();if(!t){pp.warn(`sendMessage called before session was established; dropping message`);return}e.event_type===`conversation.respond`&&b.markSent(e.properties.text),s.sendAppMessage(up(t.conversationId,e),`*`)},[s,d,b]),D=N(e=>{x.add(e)},[x]),ae=N(e=>{x.delete(e)},[x]),oe=M(()=>({state:u,session:d,chatMessages:f,captionText:p,captionRole:m,error:h,password:g,setPassword:w,captchaToken:_,setCaptchaToken:T,mode:C,start:ne,end:te,sendChat:re,sendMessage:ie,conversation:{start:ne,end:te,sendMessage:ie},__registerSubscriber:D,__unregisterSubscriber:ae,__beginAttempt:ee}),[u,d,f,p,m,h,g,w,_,T,C,ne,te,re,ie,D,ae,ee]);return F(gp.Provider,{value:oe,children:e})}var Op=rn(`CaptchaChallenge`),kp=new Set([`110600`,`110620`,`200500`]);function Ap(e){return e.startsWith(`3`)||e.startsWith(`6`)}var jp=new Set([`110500`,`110510`]);function Mp(e){return e.startsWith(`3`)||e.startsWith(`6`)||kp.has(e)}function Np(e){return typeof e==`object`&&!!e&&e.source===`tavus-captcha`&&typeof e.type==`string`}function Pp(e,t,n,r,i){return`${e.replace(/\/+$/,``)}${t.startsWith(`/`)?t:`/${t}`}?deployment_uuid=${encodeURIComponent(n)}&action=${encodeURIComponent(r)}&parent_origin=${encodeURIComponent(i)}`}function Fp({captcha:e,deploymentId:t,onToken:n,onFallback:r,onInteractive:i,presented:a=!0}){let o=(P(lt).baseUrl??`https://tavusapi.com`).replace(/\/+$/,``),s=new URL(o).origin,[c,l]=k(0),[u,d]=k(!1),[f,p]=k(!1),m=j(0),h=j(0),g=Pp(o,e.challenge_path,t,e.action,window.location.origin),_=N(()=>{p(!1),i?.(!1),m.current=0,h.current=0,l(e=>e+1)},[i]);if(A(()=>{function e(e){if(u||e.origin!==s)return;let a=e.data;if(Np(a)&&a.deployment_uuid===t){if(a.type===`interactive`){p(!0),i?.(!0);return}if(a.type===`token`&&a.token){Op.info(`Captcha token received`),p(!1),i?.(!1),n(a.token);return}if(a.type===`expired`){Op.info(`Captcha token expired, reloading iframe`),_();return}if(a.type===`error`){let e=String(a.code??``);if(Op.warn(`Captcha error received`,e),Mp(e)){if(m.current+=1,Ap(e)&&(h.current+=1),m.current<2){p(!1),i?.(!1);return}Op.warn(`Captcha error keeps recurring, falling back to no-token mode`),d(!0),r(h.current>=2?`unsupported`:`exhausted`);return}Op.warn(`Captcha error is not retryable, falling back to no-token mode`),d(!0),r(jp.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 F(`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:F(`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 Ip=rn(`Captcha`),Lp=15e3,Rp=Ce(null);function zp({children:e}){let{config:t,deploymentId:n}=P(Sn),r=P(gp),i=Yt(!0),a=Yt(null),o=Yt(!1),s=Yt(0),c=Yt(!1),l=Yt(!1),u=j([]),d=t.value.captcha??null,f=r?.state.value??`idle`,p=f===`connecting`||f===`connected`,m=d!==null&&!c.value&&!p&&o.value,h=N(e=>{let t=u.current;u.current=[];for(let n of t)n(e)},[]),g=N(()=>{o.value=!1,l.value=!1},[o,l]),_=N((e,t)=>{Ip.warn(e),c.value=!0,g(),h({kind:`unavailable`,reason:t})},[c,h,g]),v=N(e=>{r?.setCaptchaToken(e)},[r]),y=r?.captchaToken;A(()=>{if(y)return y.subscribe(e=>{e!==null&&g()})},[y,g]);let b=N(e=>{_(`Captcha challenge unavailable; not attempting /start without a token`,e)},[_]),x=N(e=>{l.value=e},[l]),S=N(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`),Lp))}),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=M(()=>({ensureToken:S,hostVisible:i,promptSlot:a}),[S,i,a]),w=a.value,T=m&&d?F(Fp,{captcha:d,deploymentId:n,presented:i.value,onToken:v,onFallback:b,onInteractive:x},s.value):null;return F(Rp.Provider,{value:C,children:[e,w&&T?cf(T,w):T]})}function Bp(){let e=P(Sn);if(!e)throw Error(`useConfig must be used within ConfigProvider`);return e}var Vp=`tavus_pudl_`,Hp=172800,Up=new Map;function Wp(){let e=new Date;return`${e.getUTCFullYear()}${String(e.getUTCMonth()+1).padStart(2,`0`)}${String(e.getUTCDate()).padStart(2,`0`)}`}function Gp(e){return`${Vp}${e}`}function Kp(e){try{let t=`${Gp(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!==Wp())return 0;let a=Number.parseInt(i,10);return Number.isFinite(a)&&a>0?a:0}catch{return 0}}function qp(e,t){try{let n=encodeURIComponent(`${Wp()}.${t}`);document.cookie=`${Gp(e)}=${n}; max-age=${Hp}; path=/; SameSite=Lax`}catch{return}}function Jp(e){let t=Up.get(e);return t||(t=kt(e?Kp(e):0),Up.set(e,t)),t}function Yp(e){if(!e)return;qp(e,Kp(e)+1);let t=Kp(e),n=Up.get(e);n?n.value=t:Up.set(e,kt(t))}function Xp(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 Zp(e,t,n,r){return e===`granted`&&r?`granted`:Xp(e)||(t===`denied`?`blocked`:t===`prompt`?e===`granted`&&n?`granted`:`prompt`:t===`granted`?n?`checking`:`prompt`:e===`granted`?`granted`:n?`checking`:`prompt`)}function Qp(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 $p(e){let[t,n]=k(null);return A(()=>{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 em(){let e=jd(),t=Md(),n=Nd(),{micState:r,camState:i,currentMic:a,currentCam:o}=Hd(),s=$p(`microphone`),c=$p(`camera`),l=t===`joined-meeting`||!!n,[u,d]=k(!1),[f,p]=k(!1),[m,h]=k(!1),g=N(e=>{l?e.setLocalAudio(!0):Promise.resolve(e.startCamera({videoSource:!1})).catch(()=>{})},[l]),_=N(()=>{if(d(!0),!e){h(!0);return}g(e)},[e,g]);A(()=>{m&&e&&(h(!1),g(e))},[m,e,g]);let v=N(async()=>{if(e){p(!0);try{await e.setInputDevicesAsync({videoSource:!0})}catch{}e.setLocalVideo(!0)}},[e]);return{mic:M(()=>Qp(Zp(r,s,u,!!a),s),[r,s,u,a]),camera:M(()=>Qp(Zp(i,c,f,!!o),c),[i,c,f,o]),requestMic:_,requestCamera:v}}var tm=rn(`Flow`),nm=[`idle`,`unavailable`,`ended`];function rm({children:e}){let{config:t,retryInit:n}=Bp(),{cameraOnStart:r}=P(lt),{start:i,end:a,session:o,state:s,__beginAttempt:c}=P(gp),l=t.value.deployment_id??``,u=Jp(l),d=N(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;return n==null||e.channel!==`widget`&&e.channel!==`embed`?null:n},[t]),f=P(Rp),[p,m]=k(`idle`),[h,g]=k(!1),[_,v]=k(null),[y,b]=k(null),[x,S]=k(!1),{mic:C,camera:w,requestMic:T,requestCamera:E}=em(),ee=M(()=>kt(`idle`),[]);A(()=>{ee.value=p},[p,ee]),nn(()=>{let e=t.value,n=e.limits?.daily_call_limit_per_user;n!=null&&(e.channel===`widget`||e.channel===`embed`)&&ee.value===`idle`&&u.value>=n&&(b(`daily_limit`),S(!1),m(`unavailable`))});let te=j(!1),ne=j(!1),re=j(async()=>{}),ie=j(!1),D=j(null),ae=j(null),oe=N(()=>{let e=D.current;D.current=null,e?.resolve()},[]),se=N(async(e=new AbortController)=>{ae.current=e;let{signal:r}=e;g(!0);try{let e=await f?.ensureToken(r)??{kind:`not-required`};if(r.aborted)return;if(e.kind===`unavailable`){b(e.reason===`unsupported`?`captcha_unsupported`:`error`),S(e.reason===`timeout`||e.reason===`exhausted`),m(`unavailable`);return}if(await i(void 0,{signal:r}),r.aborted)return;te.current=!1,ne.current=!1,d()!=null&&Yp(l),m(`call`)}catch(i){if(r.aborted)return;let a=Of(i);if(wf(i)){oe(),v({kind:`microphone`,status:`blocked`}),m(`idle`);return}if(jf(i)&&(t.peek().captcha??null)===null&&!ne.current)return ne.current=!0,tm.info(`/start demands a captcha the loaded config lacks; refreshing config`),await n(),r.aborted?void 0:await re.current(e);if(Mf(i)&&!te.current){te.current=!0,g(!1),m(`idle`);return}if(te.current=!1,Pf(i)){tm.error(`/start rejected: origin ${window.location.origin} is not on this deployment's allowed-origins list. Add it in the Tavus portal.`),b(`error`),S(!1),m(`unavailable`);return}if(a.status===401&&t.value.has_password===!0){m(`idle`);return}let o=Ff(a.kind)??`busy`;b(o),S(a.retryable),m(`unavailable`)}finally{ae.current===e&&(ae.current=null),g(!1)}},[i,t,d,l,f,n,oe]);re.current=se;let O=N(async()=>{let e=D.current;if(e){v(null);try{await se(e.controller)}finally{D.current===e&&(D.current=null),e.resolve()}}},[se]),ce=N(()=>{let e=D.current;if(e&&!e.proceeding){if(e.proceeding=!0,t.peek().customization.conversation.modality===`video`&&r===`on`&&!w.isGranted&&!w.isBlocked){v({kind:`camera`,status:w.status}),E().finally(()=>{O()});return}O()}},[t,r,w,E,O]);A(()=>{if(D.current&&_?.kind===`microphone`){if(_.status!==C.status&&v({kind:`microphone`,status:C.status}),C.isGranted){ce();return}if(C.isBlocked){let e=D.current;D.current=null,g(!1),e.resolve()}}},[_,C,ce]);let le=N(()=>{if(D.current)return D.current.promise;let e,t=new Promise(t=>{e=t});return D.current={promise:t,resolve:e,proceeding:!1,controller:new AbortController},g(!0),C.isGranted?ce():C.isBlocked?(v({kind:`microphone`,status:C.status}),D.current=null,g(!1),e()):(v({kind:`microphone`,status:C.status}),T()),t},[C,T,ce]),ue=N(async()=>{if(!nm.includes(p))return;let e=t.peek().customization,n=e.show_haircheck,r=e.conversation.modality,i=n&&r!==`chat`,a=!n&&r!==`chat`,o=d();if(o!=null&&u.value>=o){b(`daily_limit`),S(!1),m(`unavailable`);return}if(c(),i&&!ie.current){m(`haircheck`);return}return a?le():se()},[p,t,le,se,d,u,c]),de=N(async()=>{p===`haircheck`&&(ie.current=!0,await se())},[p,se]),fe=N(()=>{let e=D.current,t=e?.controller??ae.current;e&&(D.current=null,e.resolve(),v(null)),t?.abort(),t&&g(!1),p===`haircheck`&&m(`idle`)},[p]),pe=N(()=>{p===`call`&&m(`ended`)},[p]);A(()=>{let e=()=>{let e=D.current!==null||ae.current!==null,t=p===`haircheck`||p===`call`,n=o.peek()!==null,r=n&&s.peek()!==`ended`;(e||t||n)&&(fe(),(p===`call`||r)&&m(`ended`),a())};return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[p,o,s,fe,a]);let me=N(()=>{b(null),S(!1),m(`idle`)},[]),he=M(()=>({flowSignal:ee,setFlowState:m,isStarting:h,permissionRequest:_,unavailableCause:y,canRetry:x,start:ue,join:de,cancel:fe,leave:pe,restart:me}),[ee,h,_,y,x,ue,de,fe,pe,me]);return F(If.Provider,{value:he,children:e})}var im=Ce(null),am=rn(`HostBridge`),om=Ce(null);function sm(e){if(!e)return null;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host instanceof HTMLElement?t.host:e.parentElement}function cm({children:e}){let t=P(gp),n=P(Sn),r=P(If),i=P(im),a=P(lt),o=Yt(null),s=a?.overrideConfig,c=N(e=>{o.value=sm(e)},[o]),l=N((e,t)=>{let n=o.peek();n&&n.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0})),am.info(`Event:`,e,t)},[o]);A(()=>{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){am.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){am.error(`endConversation failed`,e)}},sendMessage:e=>{t.sendMessage(typeof e==`string`?{event_type:`conversation.respond`,properties:{text:e}}:e)},updateConfig:t=>{let n=pn(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=j(!1);A(()=>{u.current||o.value&&n&&(u.current=!0,l(`tavus:ready`,{deploymentId:n.deploymentId}))},[o.value,n,l]);let d=j(null);A(()=>t.state.subscribe(e=>{if(e!==d.current)switch(d.current=e,e){case`connected`:l(`tavus:conversation-started`,{conversationId:t.session.peek()?.conversationId??``}),l(`tavus:state-change`,{state:e});break;case`ended`:l(`tavus:conversation-ended`,{conversationId:t.session.peek()?.conversationId??``}),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]),nn(()=>{if(!r)return;let e=r.flowSignal.value;l(`tavus:mode-change`,{mode:e})}),A(()=>{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 f=M(()=>({shadowHost:o,dispatchEvent:l}),[o,l]);return F(om.Provider,{value:f,children:[F(`div`,{ref:c,style:`display:contents`}),e]})}var lm=Ce(null);function um({children:e}){let{config:t}=P(Sn),n=M(()=>Pt(()=>{let e=t.value.customization.style;return e.mode===`dark`||e.mode===`system`&&(globalThis.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1)}),[t]),r=M(()=>Pt(()=>{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=M(()=>Pt(()=>mm(t.value.customization.style)),[t]),a=M(()=>({dataTheme:r,isDark:n,cssVars:i}),[r,n,i]);return F(lm.Provider,{value:a,children:F(`div`,{"data-theme":r.value,style:hm(i.value),class:`contents`,children:e})})}var dm=[0,.125,.25,.5,.75],fm=[0,1,2,3,4],pm=[0,.2,.25,.3];function mm(e){return{"--radius-box":`${dm[e.boxes_radius]??.5}rem`,"--radius-field":`${dm[e.field_radius]??.25}rem`,"--radius-selector":`${dm[e.selectors_radius]??.5}rem`,"--border":`${fm[e.border_width]??1}px`,"--size-field":`${pm[e.fields_size]??.25}rem`,"--size-selector":`${pm[e.selectors_size]??.25}rem`,"--depth":e.depth_effect?`1`:`0`,"--noise":e.noise_effect?`1`:`0`}}function hm(e){return Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `)}Ce(null);var gm=`m-0 p-0 border-0 bg-transparent text-inherit max-w-none max-h-none`;`${gm}`,`${gm}`;var _m=41/2,vm=23/2,ym=Math.hypot(_m,vm);Array.from({length:1008},(e,t)=>{let n=t%42,r=Math.floor(t/42),i=Math.hypot(n-_m,r-vm)/ym*.82,a=.34+(n*13+r*7)%34/100;return{delay:`${i.toFixed(3)}s`,opacity:a.toFixed(2)}});var bm=Ce(null);function xm({children:e}){let t=j(null);return F(bm.Provider,{value:{frameRef:t},children:F(`div`,{class:`@container/conversation w-full h-full`,children:F(`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 Sm=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Cm=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function wm(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Cm(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Tm=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},Em=e=>{let t=Tm(e);return t.charAt(0).toUpperCase()+t.slice(1)},Dm={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 Om(e){return e!=null}function km(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Dm.width,a=e.size??e.height??Dm.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?Sm(...c):Sm(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Dm[`stroke-width`])*Number(e.size??e.width??Dm.width)/Number(t.size??t.width??Dm.width):t.strokeWidth??Dm[`stroke-width`];return[`svg`,{...Object.entries(Dm).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Om(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Om(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Om(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 Am=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},jm=Ce({size:24,color:`currentColor`,strokeWidth:2,absoluteStrokeWidth:!1,nonScalingStroke:!1,class:``}),Mm=()=>P(jm),Nm=({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:_=``}=Mm()??{},[v,y,b=[]]=km(l,{color:e??g,width:n??t??f,height:r??t??f,strokeWidth:i??p,absoluteStrokeWidth:a??m,nonScalingStroke:o??h,className:Sm(_,u),hasA11yProp:!!s||Am(d),attributes:d});return w(v,{...y},[...b.map(([e,t])=>w(e,t)),...O(s)])};function Pm(e,t,n=[]){let r=typeof e==`string`?wm(e,t,n):e,i=({class:e=``,className:t=``,children:n,...i})=>w(Nm,{...i,icon:r,class:Sm(e,t)},n);return r.name&&(i.displayName=Em(r.name)),i}var Fm=Pm({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`}]]}),Im=Pm({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`}]]}),Lm=Pm({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`]}),Rm=Pm({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]}),zm=Pm({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`]}),Bm=Pm({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`}]]}),Vm=Pm({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`}]]}),Hm=Pm({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`]}),Um=Pm({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`}]]}),Wm=Pm({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`}]]}),Gm=Pm({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`}]]}),Km=Pm({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`}]]}),qm=Pm({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`}]]}),Jm=Pm({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`}]]}),Ym=Pm({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`}]]}),Xm=Pm({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`}]]}),Zm=Pm({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`}]]}),Qm=Pm({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`}]]}),$m=Pm({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`}]]}),eh=Pm({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`]}),th=Pm({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`}]]}),nh=Pm({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`}]]}),rh=Pm({name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]});function ih(e,t){return({size:n=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>F(`span`,{class:r,role:a?void 0:`img`,"aria-hidden":a||void 0,"aria-label":a?void 0:i??t,children:F(e,{size:n})})}var ah={close:ih(rh,`Close`),cancel:ih(rh,`Cancel`),leave:ih(Xm,`Leave call`),more:ih(zm,`More`),error:ih(eh,`Error`),mic:ih(Km,`Microphone`),"mic-off":ih(Gm,`Microphone muted`),cam:ih(Fm,`Camera`),"cam-off":ih(Im,`Camera off`),"screen-share":ih(Jm,`Screen share`),pip:ih(Zm,`Picture in picture`),user:ih(th,`User`),"face-smile":ih(Hm,`Camera off`),captions:ih(Lm,`Closed captions`),chat:ih(Wm,`Chat`),fullscreen:ih(Um,`Enter fullscreen`),"fullscreen-exit":ih(qm,`Exit fullscreen`),expand:ih(Bm,`Expand`),collapse:ih($m,`Collapse`),send:ih(Qm,`Send`),"external-link":ih(Vm,`External link`),clock:ih(Rm,`Clock`),moon:ih(Ym,`Unavailable`),users:ih(nh,`Busy`)},oh=`<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>`,sh=`<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>`,ch=`<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>`,lh=`<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>`,uh=`<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>`,dh=`<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>`,fh=`<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>`,ph=`<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>`,mh=`<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>`,hh=`<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>`,gh=`<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>`,_h=`<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>`,vh=`<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>`,yh=`<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>`,bh=`<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>`,xh=`<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>`,Sh=`<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>`,Ch=`<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>`,wh=`<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>`,Th=`<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>`,Eh=`<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>`,Dh=`<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>`,Oh=`<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 kh(e){return e.replace(/\s(width|height)="\d+"/g,``)}function Ah(e,t){let n=kh(e);return({size:e=`var(--icon-size, 1.5rem)`,class:r,"aria-label":i,"aria-hidden":a})=>F(`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 jh={pixelarticons:{close:Ah(uh,`Close`),cancel:Ah(dh,`Cancel`),leave:Ah(gh,`Leave call`),more:Ah(bh,`More`),error:Ah(ph,`Error`),mic:Ah(_h,`Microphone`),"mic-off":Ah(vh,`Microphone muted`),cam:Ah(Oh,`Camera`),"cam-off":Ah(oh,`Camera off`),"screen-share":Ah(Sh,`Screen share`),pip:Ah(xh,`Picture in picture`),user:Ah(wh,`User`),"face-smile":Ah(Eh,`Camera off`),captions:Ah(sh,`Closed captions`),chat:Ah(ch,`Chat`),fullscreen:Ah(hh,`Enter fullscreen`),"fullscreen-exit":Ah(fh,`Exit fullscreen`),expand:Ah(mh,`Expand`),collapse:Ah(fh,`Collapse`),send:Ah(Ch,`Send`),"external-link":Ah(Dh,`External link`),clock:Ah(lh,`Clock`),moon:Ah(yh,`Unavailable`),users:Ah(Th,`Busy`)},lucide:ah};function Mh({name:e,...t}){let{config:n}=Bp(),r=(jh[n.value.customization.style.icon_library]??jh.pixelarticons)[e];return F(r,{...t})}var Nh=`Ready when you are`,Ph=`Start the conversation`;function Fh(e){return typeof e==`string`&&e.length>0?e:``}function Ih(e){let t=Fh(e.replica_thumbnail_image_url)||null,n=Fh(e.replica_thumbnail_video_url)||null;return!t&&!n?null:{imageUrl:t,videoUrl:n}}function Lh(e){let{preview:t}=e.customization,{background:n}=t,r=Ih(e),i;i=n.type?n.type:r?`replica`:`background-gradient`;let a=Fh(n.url);return{title:t.title||Nh,description:t.description||``,btn_title:t.btn_title||Ph,background:{type:i,url:a}}}var Rh={backgroundImage:`linear-gradient(to bottom right, var(--color-primary), var(--color-base-300))`},zh=`#t=0.1`;function Bh(e){return e.includes(`#`)?e:`${e}${zh}`}function Vh({replica:e,fallback:t=null}){let[n,r]=k(()=>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)?F(`img`,{class:a,src:o,loading:`lazy`,alt:``,onError:()=>i(o)}):s&&!n.has(s)?F(`video`,{class:a,src:Bh(s),muted:!0,playsinline:!0,preload:`metadata`,controls:!1,onError:()=>i(s)}):F(E,{children:t})}function Hh({variant:e,replica:t}){let[n,r]=k(!1);return A(()=>{r(!1)},[e.url]),e.type===`replica`&&t?F(Vh,{replica:t,fallback:F(`div`,{class:`absolute inset-0`,style:Rh})}):e.type===`custom-image`&&e.url&&!n?F(`img`,{class:`absolute inset-0 w-full h-full object-cover`,src:e.url,loading:`lazy`,alt:``,onError:()=>r(!0)}):F(`div`,{class:`absolute inset-0`,style:Rh})}function Uh({className:e=``}){let{config:t}=Bp(),n=Lh(t.value),r=Ih(t.value);return F(`div`,{class:`relative size-16 shrink-0 rounded-box overflow-hidden bg-base-300 ${e}`,children:F(Hh,{variant:n.background,replica:r})})}var Wh=`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 Gh({title:e,description:t,media:n,children:r,overlay:i}){return F(`div`,{class:Wh,children:[n===void 0?F(Uh,{}):n,(e||t)&&F(`div`,{class:`flex flex-col items-center gap-3 max-w-sm`,children:[e&&F(`h2`,{class:`text-lg font-medium leading-snug`,children:e}),t&&F(`p`,{class:`text-base text-base-content/60 tracking-wide leading-snug`,children:t})]}),r&&F(`div`,{class:`flex flex-col items-center gap-3`,children:r}),i]})}function Kh({loading:e=!1,disabled:t,class:n,children:r,...i}){return F(`button`,{type:`button`,class:`btn relative ${n?` ${n}`:``}`,disabled:t||e,"aria-busy":e||void 0,...i,children:[F(`span`,{children:r}),e&&F(`span`,{class:`absolute inset-0 flex items-center justify-center backdrop-blur-xs`,"aria-hidden":`true`,children:F(`span`,{class:`loading loading-spinner loading-sm`})})]})}var qh={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 Jh(e,t){let n=t?.[e];return{title:n?.title||qh[e].title,description:n?.description||qh[e].description}}var Yh={daily_limit:`clock`,total_limit:`moon`,busy:`users`,error:`error`,captcha_unsupported:`error`},Xh={daily_limit:`never`,total_limit:`never`,busy:`always`,error:`when-retryable`,captcha_unsupported:`never`};function Zh({cause:e}){return F(`div`,{class:`flex size-16 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/70`,children:F(Mh,{name:Yh[e],size:`2rem`})})}function Qh({cause:e,canRetry:t,onRetry:n,onCancel:r,isStarting:i=!1}){let{config:a}=Bp(),o=a.value.customization?.unavailable_screen,s=Jh(e,o),c=o?.cta??[],l=Xh[e],u=l===`always`||l===`when-retryable`&&t,d=u||c.length>0||!!r;return F(Gh,{media:F(Zh,{cause:e}),title:s.title,description:s.description,children:d&&F(`div`,{class:`flex flex-wrap items-center justify-center gap-2`,children:[u&&F(Kh,{class:`btn-neutral rounded-box`,disabled:!t,loading:i,onClick:n,children:`Try again`}),c.map(e=>F(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,class:`btn btn-outline rounded-box`,children:e.title},e.url)),r&&F(`button`,{type:`button`,class:`btn btn-ghost`,onClick:r,children:`Close`})]})})}function $h(){let e=P(If);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}}function eg(){return P(lt)?.layout??`inline`}function tg({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 ng({message:e,class:t}){return F(`div`,{class:`w-max max-w-[min(20rem,80vw)] ${t??``}`,children:[F(`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}),F(`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:F(`path`,{d:`M0 0 L8 8 L16 0 Z`,fill:`currentColor`})})]})}var rg=`text-preview-title @max-mobile:text-preview-title-narrow`,ig=`text-preview-title-full-screen`,ag=`text-sm @max-mobile:text-xs`,og=`text-preview-description-full-screen`;function sg({title:e,description:t,fullScreen:n}){return!e&&!t?null:F(`div`,{class:`flex flex-col gap-1 text-left ${n?`max-w-xl`:`max-w-sm`}`,children:[e&&F(`h2`,{class:`${n?ig:rg} font-medium leading-tight`,children:e}),t&&F(`p`,{class:`${n?og:ag} text-white/80 leading-snug`,children:t})]})}var cg=`absolute inset-0 overflow-hidden bg-base-100 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,lg=`absolute inset-x-0 top-0 h-2/5 bg-linear-to-b from-black/60 to-transparent`,ug=`absolute inset-x-0 bottom-0 h-2/5 bg-linear-to-t from-black/70 to-transparent`,dg=`absolute inset-0 bg-black/45`,fg=`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 pg({title:e,description:t,children:n,align:r=`low`,overlay:i,class:a,role:o,"aria-live":s}){let{config:c}=Bp(),l=Lh(c.value),u=Ih(c.value),d=eg()===`full-screen`;return F(`div`,{class:a?`${cg} ${a}`:cg,role:o,"aria-live":s,children:[F(Hh,{variant:l.background,replica:u}),r===`center`?F(E,{children:[F(`div`,{class:dg}),F(`div`,{class:`${fg} flex flex-col items-center justify-center gap-3`,children:n})]}):F(E,{children:[(e||t)&&(d?F(`div`,{class:lg}):F(E,{children:[F(`div`,{class:`${lg} hidden @max-mobile:block`}),F(`div`,{class:ug})]})),d?F(`div`,{class:fg,children:[F(sg,{title:e,description:t,fullScreen:!0}),F(`div`,{class:`absolute inset-x-8 @max-mobile:inset-x-5 bottom-[20%] flex flex-col items-center gap-3`,children:n})]}):F(`div`,{class:`${fg} grid grid-cols-[1fr_auto] grid-rows-[1fr_auto] gap-x-6`,children:[F(`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:F(sg,{title:e,description:t})}),F(`div`,{class:`col-start-2 row-start-2 self-end justify-self-end flex flex-col items-end gap-3`,children:n})]})]}),i]})}var mg={video:`cam`,audio:`mic`,chat:`chat`},hg={"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 gg({children:e,loading:t=!1,...n}){let{config:r}=Bp(),i=eg(),a=mg[r.value.customization.conversation.modality],o=a!==void 0&&i===`full-screen`;return F(Kh,{class:`btn-preview-action rounded-box ${hg[i]}`,loading:t,...n,children:o?F(`span`,{class:`flex items-center justify-center gap-2`,children:[F(Mh,{name:a,"aria-hidden":!0}),e]}):e})}var _g=`Thanks for joining`,vg=`You can start a new conversation whenever you're ready.`,yg=`Start a new conversation`;function bg(e){try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`||t.protocol===`mailto:`}catch{return!1}}function xg({text:e,onRestart:t,isStarting:n=!1,permissionRequest:r=null}){let{config:i}=Bp(),a=eg()===`full-screen`,o=i.value.customization.after_call,s=o.cta.filter(e=>bg(e.url)),c=o.title||e?.title||_g,l=o.description||e?.description||vg,u=e?.restart||yg;return F(pg,{title:c,description:l,children:[F(`div`,{class:`relative`,children:[r&&F(ng,{message:tg(r),class:`absolute bottom-full mb-3 z-20 ${a?`left-1/2 -translate-x-1/2`:`right-0`}`}),F(gg,{onClick:t,loading:n,children:u})]}),s.length>0&&F(`div`,{class:`flex flex-wrap items-center gap-2 ${a?`justify-center`:`justify-end`}`,children:s.map(e=>F(`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 Sg(){let e=jd(),t=Nd(),{isOff:n}=zd(t),{camState:r}=Hd();return{isCamReady:M(()=>r===`granted`,[r]),isCamMuted:n,localSessionId:t,onToggleCamera:N(()=>{e?.setLocalVideo(n)},[e,n])}}function Cg(){let e=jd(),t=Nd(),{isOff:n}=Bd(t),{micState:r}=Hd();return{isMicReady:M(()=>r===`granted`,[r]),isMicMuted:n,localSessionId:t,onToggleMicrophone:N(()=>{e?.setLocalAudio(n)},[e,n])}}function wg(){let e=jd(),t=Nd(),{isOff:n}=Vd(t),r=!n;return{isScreenSharing:r,localSessionId:t,onToggleScreenshare:N(()=>{r?e?.stopScreenShare():e?.startScreenShare({displayMediaOptions:{audio:!1,selfBrowserSurface:`exclude`,surfaceSwitching:`include`,video:{width:1920,height:1080}}})},[e,r])}}var Tg={microphone:`microphone`,camera:`camera`};function Eg({class:e}){return F(`svg`,{class:e,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,children:[F(`circle`,{cx:`7`,cy:`8`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),F(`circle`,{cx:`16`,cy:`16`,r:`2.2`,stroke:`currentColor`,"stroke-width":`1.6`}),F(`path`,{d:`M2 8h2.5M9.5 8H22M2 16h11.5M18.5 16H22`,stroke:`currentColor`,"stroke-width":`1.6`,"stroke-linecap":`round`})]})}function Dg(){return F(`svg`,{viewBox:`0 0 240 180`,class:`w-full h-auto text-base-content/70`,fill:`none`,"aria-hidden":`true`,children:[F(`rect`,{x:`10`,y:`20`,width:`220`,height:`150`,rx:`10`,stroke:`currentColor`,"stroke-width":`2`}),F(`path`,{d:`M10 46h220`,stroke:`currentColor`,"stroke-width":`2`}),F(`circle`,{cx:`26`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),F(`circle`,{cx:`40`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),F(`circle`,{cx:`54`,cy:`33`,r:`3.5`,stroke:`currentColor`,"stroke-width":`1.6`}),F(`path`,{d:`M78 33h14M86 27l-6 6 6 6M104 27v12`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),F(`rect`,{x:`118`,y:`25`,width:`96`,height:`16`,rx:`8`,stroke:`currentColor`,"stroke-width":`1.6`}),F(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,fill:`currentColor`,opacity:`0.18`}),F(`circle`,{class:`text-info`,cx:`128`,cy:`33`,r:`11`,stroke:`currentColor`,"stroke-width":`1.6`}),F(`g`,{class:`text-info`,transform:`translate(120 25) scale(0.66)`,children:F(Eg,{})}),F(`g`,{transform:`translate(34 78)`,children:[F(`rect`,{x:`0`,y:`8`,width:`34`,height:`26`,rx:`5`,stroke:`currentColor`,"stroke-width":`2`}),F(`path`,{d:`M34 16l14-8v26l-14-8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]}),F(`g`,{transform:`translate(40 120)`,children:[F(`rect`,{x:`6`,y:`0`,width:`14`,height:`24`,rx:`7`,stroke:`currentColor`,"stroke-width":`2`}),F(`path`,{d:`M0 20a13 13 0 0 0 26 0M13 33v8`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`})]}),F(`path`,{d:`M150 64l34 14-14 4-2 16-18-34Z`,fill:`currentColor`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linejoin":`round`})]})}var Og=qd(({device:e,onClose:t})=>{let n=Tg[e];return A(()=>{let e=e=>{e.key===`Escape`&&t()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),F(`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:F(`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:[F(`button`,{type:`button`,class:`btn btn-sm btn-circle btn-ghost absolute top-2 right-2 z-10`,onClick:t,"aria-label":`Close`,children:F(Mh,{name:`close`,size:`1.1rem`})}),F(`div`,{class:`grid @3xl:grid-cols-[1fr_1.2fr] gap-4 p-5 @max-md:p-4`,children:[F(`div`,{class:`flex items-center justify-center @max-md:hidden`,children:F(Dg,{})}),F(`div`,{class:`flex flex-col gap-4`,children:[F(`h2`,{id:`tavus-blocked-title`,class:`text-lg font-semibold leading-snug pr-6`,children:[`Access to your `,n,` is blocked`]}),F(`ol`,{class:`flex flex-col gap-3 text-sm`,children:[F(`li`,{class:`flex items-start gap-2`,children:[F(`span`,{class:`font-semibold tabular-nums`,children:`1.`}),F(`span`,{class:`leading-snug`,children:[`Click the `,F(Eg,{class:`inline-block align-text-bottom h-4 w-4 mx-0.5`}),` `,`settings icon in your browser's address bar`]})]}),F(`li`,{class:`flex items-start gap-2`,children:[F(`span`,{class:`font-semibold tabular-nums`,children:`2.`}),F(`span`,{class:`leading-snug`,children:[`Allow `,n,` access, then reload the page`]})]})]}),F(`button`,{type:`button`,class:`btn btn-neutral btn-sm self-start`,onClick:t,children:`Got it`})]})]})]})})}),kg=Ce({open:()=>{},close:()=>{}});function Ag(){return P(kg)}function jg({children:e}){let[t,n]=k(null),r=N(e=>n(e),[]),i=N(()=>n(null),[]),a=M(()=>({open:r,close:i}),[r,i]);return F(kg.Provider,{value:a,children:[e,t&&F(Og,{device:t,onClose:i})]})}var Mg=qd(()=>F(`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:`!`})),Ng=`select-control-pill relative inline-flex items-center bg-neutral text-neutral-content`,Pg=`absolute inset-0 w-full h-full opacity-0 cursor-pointer appearance-none disabled:cursor-not-allowed`,Fg=`absolute right-1.5 top-1/2 -translate-y-1/2 pointer-events-none flex items-center`,Ig=`absolute left-0 top-0 h-full aspect-square flex items-center justify-center pointer-events-none`,Lg=`absolute left-0 top-0 z-10 btn btn-control btn-neutral`;function Rg(){return F(`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:F(`path`,{d:`M4 6L8 10L12 6`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})})}function zg(){let e=Nd(),t=j(null),n=j(void 0);return Ud(e??``,N(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))})},[])),F(`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 Bg({value:e,devices:t,disabled:n,onChange:r,label:i}){return F(E,{children:[F(`select`,{class:Pg,value:e,onChange:e=>r(e.target.value),disabled:n,"aria-label":i,children:t.map(({device:e})=>F(`option`,{value:e.deviceId,children:e.label},e.deviceId))}),F(`span`,{class:Fg,children:F(Rg,{})})]})}function Vg(e){return F(`div`,{class:Ng,children:F(Bg,{...e})})}function Hg({iconName:e,...t}){return F(`div`,{class:Ng,children:[F(`span`,{class:Ig,"aria-hidden":`true`,children:F(Mh,{name:e})}),F(Bg,{...t})]})}var Ug=qd(({level:e=!1})=>{let{onToggleMicrophone:t,isMicReady:n,isMicMuted:r}=Cg(),{microphones:i,currentMic:a,setMicrophone:o}=Hd();if(!a||(i?.length??0)<=1)return F(Kg,{level:e});let s=e&&n&&!r;return F(`div`,{class:`relative inline-flex items-center`,children:[F(Vg,{value:a?.device?.deviceId,devices:i||[],disabled:!n,onChange:e=>o(e),label:`Select microphone`}),F(`button`,{type:`button`,onClick:t,disabled:!n,class:`${Lg} overflow-hidden`,"aria-label":r?`Unmute microphone`:`Mute microphone`,"aria-pressed":r,children:[s&&F(zg,{}),F(`span`,{class:`relative z-10 inline-flex`,children:F(Mh,{name:r||!n?`mic-off`:`mic`})})]})]})});function Wg(){let{onToggleCamera:e,isCamMuted:t}=Sg(),{camera:n,requestCamera:r}=em(),{open:i}=Ag(),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 Gg=qd(()=>{let{isCamReady:e}=Sg(),{currentCam:t,cameras:n,setCamera:r}=Hd(),i=Wg();return!t||(n?.length??0)<=1?F(qg,{}):F(`div`,{class:`relative inline-flex items-center`,children:[F(Vg,{value:t?.device?.deviceId,devices:n||[],disabled:!e,onChange:e=>r(e),label:`Select camera`}),F(`button`,{type:`button`,onClick:i.onClick,class:Lg,"aria-label":i.label,"aria-pressed":!i.isOn,children:F(Mh,{name:i.isOn?`cam`:`cam-off`})})]})}),Kg=qd(({level:e=!1})=>{let{onToggleMicrophone:t,isMicMuted:n}=Cg(),{mic:r,requestMic:i}=em(),{open:a}=Ag(),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 F(`span`,{class:`relative inline-flex`,children:[F(`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&&F(zg,{}),F(`span`,{class:`relative z-10 inline-flex`,children:F(Mh,{name:n||!r.isGranted?`mic-off`:`mic`})})]}),r.needsAttention&&F(Mg,{})]})}),qg=qd(()=>{let{isOn:e,onClick:t,label:n,needsAttention:r}=Wg();return F(`span`,{class:`relative inline-flex`,children:[F(`button`,{type:`button`,onClick:t,class:`btn btn-control btn-neutral`,"aria-label":n,"aria-pressed":!e,children:F(Mh,{name:e?`cam`:`cam-off`})}),r&&F(Mg,{})]})});qd(({compact:e=!1}={})=>{let{isMicReady:t}=Cg(),{microphones:n,currentMic:r,setMicrophone:i}=Hd();return(n?.length??0)<=1?null:F(Hg,{iconName:`mic`,value:r?.device?.deviceId,devices:n,disabled:!t,onChange:e=>i(e),label:`Select microphone`,compact:e})}),qd(({compact:e=!1}={})=>{let{isCamReady:t}=Sg(),{currentCam:n,cameras:r,setCamera:i}=Hd();return(r?.length??0)<=1?null:F(Hg,{iconName:`cam`,value:n?.device?.deviceId,devices:r,disabled:!t,onChange:e=>i(e),label:`Select camera`,compact:e})});var Jg=qd((e={})=>{let{onToggleScreenshare:t,isScreenSharing:n}=wg();return F(`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:F(Mh,{name:`screen-share`})})});function Yg(e){let t=P(gp);if(!t)throw Error(`useConversation must be used within ConversationProvider`);return A(()=>{if(e)return t.__registerSubscriber(e),()=>t.__unregisterSubscriber(e)},[e]),t}var Xg=Ce(null);function Zg({children:e,defaultEnabled:t=!1}){let[n,r]=k(t),i=N(()=>r(e=>!e),[]),a=M(()=>({isEnabled:n,toggle:i}),[n,i]);return F(Xg.Provider,{value:a,children:e})}function Qg(){let e=P(Xg);if(!e)throw Error(`ClosedCaptions components must be used within <ClosedCaptionsProvider>`);return e}var $g=qd(()=>{let{isEnabled:e,toggle:t}=Qg();return F(`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:F(Mh,{name:`captions`,"aria-label":e?`Closed Captions On`:`Closed Captions Off`})})}),e_=qd(()=>{let{isEnabled:e}=Qg(),{captionText:t,captionRole:n}=Yg(),r=t.value,i=n.value;return!e||!r?null:F(`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:F(`div`,{class:`text-sm leading-5 max-h-15 overflow-hidden flex flex-col justify-end text-center`,children:F(`div`,{children:[F(`span`,{class:`text-xs ${i===`replica`?`text-secondary`:`text-primary`} mr-2`,children:i===`replica`?`PAL`:`You`}),r]})})})}),t_=Ce(null);function n_({children:e,defaultOpen:t=!1}){let[n,r]=k(t),i=N(()=>r(e=>!e),[]),a=N(()=>r(!1),[]),o=M(()=>({isOpen:n,toggle:i,close:a}),[n,i,a]);return F(t_.Provider,{value:o,children:e})}function r_(){let e=P(t_);if(!e)throw Error(`Chat components must be used within <ChatProvider>`);return e}var i_=qd((e={})=>{let{isOpen:t,toggle:n}=r_();return F(`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:F(Mh,{name:`chat`})})}),a_=qd(({message:e})=>{let t=e.sender===`user`;return F(`li`,{class:`flex flex-col gap-1 ${t?`items-end`:`items-start`}`,children:[F(`span`,{class:`text-xs ${t?`text-primary`:`text-secondary`}`,children:t?`You`:`PAL`}),F(`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})]})}),o_=qd(({docked:e=!1,headerAction:t}={})=>{let{isOpen:n,close:r}=r_(),{chatMessages:i,sendChat:a,session:o}=Yg(),s=o.value?.conversationId??null,c=i.value,[l,u]=k(``),d=j(null);A(()=>{let e=d.current;e&&(e.scrollTop=e.scrollHeight)},[c.length]);let f=N(()=>{let e=l.trim();e&&s&&(a(e),u(``))},[l,a,s]),p=N(e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),f())},[f]),m=!!l.trim()&&!!s;return F(`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:[F(`header`,{class:`flex items-center justify-between px-4 py-3 border-b border-base-300`,children:[F(`span`,{class:`font-medium text-base-content`,children:`Chat`}),e?t:F(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle`,onClick:r,"aria-label":`Close chat`,children:F(Mh,{name:`close`,size:20})})]}),F(`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?F(`li`,{class:`text-center text-sm opacity-70`,children:s?`Send a message to start the conversation.`:`Connecting…`}):c.map(e=>F(a_,{message:e},e.id))}),F(`form`,{class:`flex items-end gap-2 p-3 border-t border-base-300`,onSubmit:e=>{e.preventDefault(),f()},children:[F(`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`}),F(`button`,{type:`submit`,class:`btn btn-primary btn-sm btn-circle`,disabled:!m,"aria-label":`Send message`,children:F(Mh,{name:`send`,size:18})})]})]})});function s_({label:e}){return F(pg,{align:`center`,role:`status`,"aria-live":`polite`,class:`z-2`,children:F(`div`,{class:`flex items-center gap-2`,children:[F(`span`,{class:`loading loading-spinner loading-sm`}),F(`span`,{class:`text-base font-medium`,children:e})]})})}var c_=qd(()=>F(s_,{label:`Connecting…`})),l_=qd(()=>F(s_,{label:`Leaving…`}));function u_({active:e,onToggle:t,tooltip:n,nudge:r=!1}){return F(`div`,{class:`flex items-center gap-2`,children:[r&&F(`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`}),F(`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:F(Mh,{name:e?`fullscreen-exit`:`fullscreen`,size:`calc(var(--size-field, 0.25rem) * 3.5)`})})]})}var d_=qd(({id:e})=>{let t=Pd()===e,n=j(null),r=j(null),i=j(null),a=j(void 0);Ud(e,N(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 F(`div`,{class:`flex items-center justify-center w-6 h-6`,children:F(`div`,{class:`flex items-center justify-center gap-[2px] w-full h-full`,children:[F(`div`,{ref:n,class:o,style:{height:`20%`}}),F(`div`,{ref:r,class:o,style:{height:`20%`}}),F(`div`,{ref:i,class:o,style:{height:`20%`}})]})})}),f_=[0,1,2],p_=.05,m_=450;function h_({sessionId:e,className:t=``}){let{config:n}=Bp(),r=Lh(n.value),i=Ih(n.value),a=j(null),o=j(void 0),s=j(void 0),[c,l]=k(!1),u=j(!1);return Ud(e??``,N(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>p_?(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)},m_))}))},[e])),A(()=>()=>{o.current&&cancelAnimationFrame(o.current),s.current&&clearTimeout(s.current)},[]),F(`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:[f_.map(e=>F(`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)),F(`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`}}),F(`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:F(Hh,{variant:r.background,replica:i})})]})}function g_({children:e,class:t,className:n,...r}){return F(`div`,{class:`tavus-mesh-bg ${t??n??``}`,...r,children:[F(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-1`}),F(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-2`}),F(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-3`}),F(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-4`}),F(`div`,{class:`tavus-mesh-blob tavus-mesh-blob-5`}),F(`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 __=e=>!!e.user_id?.includes(`tavus-replica`);function v_(){return Ld({filter:__})}function y_(e){let t=v_()[0],n=zd(t??``),r=Md(),[i,a]=k(!1);return A(()=>{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 b_=qd(({isAudioOnly:e})=>{let t=y_(e);return t.phase===`left`?F(l_,{}):t.phase===`connecting`?F(c_,{}):e?F(g_,{class:`flex items-center justify-center`,children:[F(h_,{sessionId:t.replicaId}),F(Sf,{sessionId:t.replicaId})]}):F(`div`,{class:`relative w-full h-full`,children:[F(xf,{automirror:!0,sessionId:t.replicaId,type:`video`,fit:`cover`,className:`absolute inset-0 w-full h-full object-cover ${t.videoState.isOff?`hidden`:``}`}),F(Sf,{sessionId:t.replicaId})]})}),x_=qd(({onLeave:e})=>{let{config:t}=Bp(),n=t.value.customization.conversation.modality===`audio`;return F(`div`,{class:`@container/pip w-full h-full`,children:F(`div`,{class:`relative w-full h-full overflow-hidden bg-linear-to-br from-base-300 to-base-200 text-base-content`,children:[F(`div`,{class:`relative w-full h-full z-5`,children:F(b_,{isAudioOnly:n})}),F(`div`,{class:`absolute bottom-4 w-full inset-x-0 z-20 flex justify-center items-center gap-2 @max-mobile:gap-1`,children:[F(Kg,{}),!n&&F(qg,{}),F(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:e,"aria-label":`Leave call`,children:F(Mh,{name:`leave`,"aria-label":`Leave Call`})})]})]})})});function S_(e,t){return e<=0||t<=0?!1:e/t<.75}var C_=qd(({personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})=>{let a=j(null),o=i??a,[s,c]=k(0),[l,u]=k(0),d=N(({aspectRatio:e})=>c(e),[]);A(()=>{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&&S_(s,l),h=n||m;return F(E,{children:[m&&F(xf,{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`:``}`}),F(xf,{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`:``}`})]})}),w_=new Set([`mcp-ui.tavus.io`,`mcp-ui.tavus-preview.io`]),T_=[`.sandbox-tavus.io`],E_=new Set([`tavusapi.com`]);function D_(e){let t;try{t=new URL(e)}catch{return!1}return j_(t)?!0:t.protocol===`https:`?w_.has(t.hostname)?!0:T_.some(e=>t.hostname.endsWith(e)):!1}function O_(e){return D_(e)}function k_(e){try{return j_(new URL(e))}catch{return!1}}function A_(e){let t;try{t=new URL(e)}catch{return!1}return M_(t)?!0:t.protocol===`https:`&&E_.has(t.hostname)}function j_(e){return M_(e)}function M_(e){return!N_()||e.protocol!==`http:`&&e.protocol!==`https:`?!1:[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e.hostname)}function N_(){try{let e=globalThis.location?.hostname;return typeof e==`string`&&[`localhost`,`127.0.0.1`,`::1`,`[::1]`].includes(e)}catch{return!1}}function P_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var F_=new Set([`canvas.question`,`canvas.input`,`canvas.calendar`,`canvas.scheduling_embed`]);[...new Set([`direct_user`,`autonomous`,`system`])];var I_=new Set([`clear`,`replacement`]);function L_(e,t,n){return t===`submit`&&n===`direct_user`&&F_.has(e)}function R_(e,t,n,r){if(r!==void 0&&(!r||n===void 0||!L_(e,t,n)))throw Error(`Canvas response text is allowed only for a supported direct-user submit.`)}function z_(e,t){if(t===`system`||I_.has(e))throw Error(`Canvas producer interactions cannot mint host-only system actions.`)}async function B_(e){try{await e.teardownResource({},{timeout:1e3})}catch{}try{await e.close?.()}catch{}}var V_=`tavus.canvas.interaction`,H_=[`safe-area-right`,`safe-area-left`,`safe-area-bottom`,`full`],U_=`safe-area-right`,W_={x:275/1280,y:111/720,width:730/1280,height:609/720},G_={type:`snapshot_mirror`};function K_(e){return gv(e)?e.message_type===`conversation`&&e.event_type===`conversation.tool_call`&&typeof e.conversation_id==`string`&&gv(e.properties):!1}function q_(e){if(!gv(e))return null;let t=Av(e,`component`),n=Av(e,`component_version`),r=Av(e,`sandbox_url`),i=Nv(e,`mcp_server_url`,O_),a=Nv(e,`api_base_url`,A_),o=Nv(e,`interaction_url`,A_),s=bv(e.layout),c=Fv(e),l=e.version;return l!==1||!t||!n||!r||!D_(r)||!Y_(r,t,n)||i===null||a===null||o===null||s===null||c===null?null:{version:l,component:t,component_version:n,resource_uri:Av(e,`resource_uri`),sandbox_url:r,mcp_server_url:i,mcp_tool_name:Av(e,`mcp_tool_name`),api_base_url:a,interaction_url:o,...c,layout:s,host_context:gv(e.host_context)?e.host_context:void 0}}var J_=/^\/canvas\/([^/]+)\/([^/]+)(?:\/|$)/;function Y_(e,t,n){let r;try{r=new URL(e)}catch{return!1}let i=J_.exec(r.pathname);return i?t===`canvas.${i[1]}`&&n===i[2]:k_(e)}function X_(e){if(e===void 0)return{ok:!0,value:{}};if(gv(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 gv(t)?{ok:!0,value:t}:{ok:!1,error:Error(`Magic Canvas tool arguments must decode to an object.`)}}catch(e){return{ok:!1,error:_v(e)}}}function Z_(e){let t=e.properties.name;if(t!==`canvas_clear`&&t!==`update_component`)return null;let n=X_(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(!gv(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 Q_=[`safe-area-left`,`safe-area-right`];function $_(e){let t=Q_.includes(e.preferred_slot)?e.preferred_slot:U_;return t===e.preferred_slot&&e.display_mode===`inline`?e:{...e,preferred_slot:t,display_mode:`inline`}}function ev(e){return e.display_mode===`fullscreen`?`full`:e.preferred_slot}function tv(e,t){return[t]}function nv(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 tv(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=fv(t.updates),i,a=e.map(e=>{if(!n(e))return e;let t={...e,arguments:{...e.arguments,...r.componentArguments},layout:$_({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&&ev(o.layout)===ev(i.layout)?a:tv(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 rv(e){if(!gv(e)||!Array.isArray(e.content))return null;for(let t of e.content){if(!gv(t))continue;let e=(gv(t._meta)?t._meta:null)?.[V_];if(gv(e))return Pv(e)}return null}function iv(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 z_(n,t.initiation_source),R_(e.canvas_config.component,n,t.initiation_source,t.response_text),{interaction_id:t.interaction_id??hv(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:gv(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 av(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 ov(e,t){if(!gv(e)||!Array.isArray(e.content))return``;let n=e.content.map(e=>gv(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?(R_(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 sv(e,t){let n=gv(t.structuredContent)?t.structuredContent:void 0,r=vv(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: ${yv(n)}`),r&&r!==a&&o.push(r),o.join(`
|
|
56
|
+
`)}function cv({conversationId:e,toolCallId:t,args:n,canvasConfig:r}){let i=fv(n);return{id:t,conversation_id:e,tool_call_id:t,arguments:i.componentArguments,canvas_config:r,layout:$_({preferred_slot:i.preferredSlot??r.layout?.preferred_slot??pv(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??W_,backdrop:i.backdrop??r.layout?.backdrop??G_}),revision:0}}function lv(e,t){let n=e.layout.display_mode;return{...e.layout,display_mode:n,viable_slot:n===`fullscreen`?`full`:dv(e.layout.preferred_slot,t)}}function uv(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:G_};let a=[...n].reverse()[0];if(!a||t.width<900)return{active:!1,video_shift_x:0,backdrop:G_};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`?Mv(16+o+24-c,0,u):-Mv(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 dv(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 fv(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:xv(e.layout)??xv(e.preferred_slot)??xv(e.preferredSlot),displayMode:Sv(e),avoidSafeArea:Cv(e),safeArea:wv(e),backdrop:Tv(e)}}function pv(e){switch(e){case`canvas.alert`:return`safe-area-bottom`;case`canvas.chart`:case`canvas.image`:case`canvas.video`:return`full`;default:return U_}}function mv(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 hv(e,t){return`ci_${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}_${t}_${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2,10)}`}var gv=P_;function _v(e){return e instanceof Error?e:Error(String(e))}function vv(e){return Array.isArray(e)?e.map(e=>gv(e)&&e.type===`text`&&typeof e.text==`string`?e.text:``).filter(Boolean).join(`
|
|
57
|
+
`).trim():``}function yv(e){let t=JSON.stringify(e);return t?t.length<=2e3?t:`${t.slice(0,2e3)}...`:`{}`}function bv(e){if(e===void 0)return;if(!gv(e))return null;let t=xv(e),n=Ev(e.safe_area??e.safeArea),r=Dv(e.backdrop);return n===null||r===null?null:{...t?{preferred_slot:t}:{},...Ov(e.avoid_safe_area??e.avoidSafeArea,`avoid_safe_area`),...n?{safe_area:n}:{},...r?{backdrop:r}:{}}}function xv(e){if(typeof e==`string`&&kv(e))return e;if(!gv(e))return;let t=e.preferred_slot??e.preferredSlot??e.slot;return typeof t==`string`&&kv(t)?t:void 0}function Sv(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 Cv(e){let t=gv(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 wv(e){let t=gv(e.layout)?e.layout:void 0;return Ev(e.safe_area??e.safeArea??t?.safe_area??t?.safeArea)??void 0}function Tv(e){let t=gv(e.layout)?e.layout:void 0;return Dv(e.backdrop??t?.backdrop)??void 0}function Ev(e){if(e===void 0)return;if(!gv(e))return null;let t=jv(e,`x`),n=jv(e,`y`),r=jv(e,`width`),i=jv(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:Mv(t,0,1),y:Mv(n,0,1),width:Mv(r,0,1),height:Mv(i,0,1)}}function Dv(e){if(e===void 0)return;if(e===`snapshot_mirror`||e===`none`)return{type:e};if(!gv(e))return null;let t=e.type;return t===`snapshot_mirror`||t===`none`?{type:t}:null}function Ov(e,t){return typeof e==`boolean`?{[t]:e}:{}}function kv(e){return H_.includes(e)}function Av(e,t){let n=e[t];return typeof n==`string`&&n.length>0?n:void 0}function jv(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function Mv(e,t,n){return Math.min(Math.max(e,t),n)}function Nv(e,t,n){let r=Av(e,t);if(r)return n(r)?r:null}function Pv(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&&!gv(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 Fv(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=Av(e,`issued_card_capability`);return i?{protocol_mode:`v1`,protocol_version:1,issued_card_capability:i}:null}var Iv=`tavus-deployment magic-canvas/0.0.0`;function Lv(e){if(!K_(e)||e.canvas_config===void 0||e.canvas_config===null)return null;let t=q_(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=X_(e.properties.arguments);if(!r.ok)throw r.error;return cv({conversationId:e.conversation_id,toolCallId:n,args:r.value,canvasConfig:t})}function Rv(e){if(!K_(e))return null;if(e.canvas_config!==void 0&&e.canvas_config!==null){let t=Lv(e);return t?{kind:`show`,instance:t}:null}return Z_(e)}function zv(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 Bv(e,t){return{theme:e.theme,displayMode:t?.display_mode??`inline`,availableDisplayModes:[`inline`,`fullscreen`],...t?{containerDimensions:mv(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:Iv,styles:{variables:Vv(e.cssVars)}}}function Vv(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`,...Hv(e)}}function Hv(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={},s=(e,t)=>{t&&(o[e]=t)},c=(e,t,n)=>e&&n?`color-mix(in oklch, ${e} ${t}%, ${n})`:void 0;return s(`--color-background-primary`,n),s(`--color-background-secondary`,r),s(`--color-border-secondary`,i),s(`--color-border-primary`,c(t,28,n)),s(`--color-text-primary`,t),s(`--color-text-secondary`,c(t,62,n)),s(`--color-text-danger`,a),s(`--color-border-danger`,a),o}var Uv=96;function Wv(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 Gv(e){let t=e?.getRootNode();return t instanceof ShadowRoot?t:document}function Kv(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 qv(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??W_,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 Jv(e,t,n){let[r,i]=k(()=>e?Wv(Gv(n?.current)):null);return Qe(()=>{if(!e){i(null);return}let t=Gv(n?.current),r=()=>i(Wv(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 Yv(e,t,n){let[r,i]=k(()=>t?Kv(e.current):null);return Qe(()=>{if(!t){i(null);return}let n=()=>i(Kv(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 Xv(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`&&qv(e,r,i,a)),side:o}}function Zv(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>=Uv&&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(Uv,Math.min(h,c-48));return{centerX:(u+d)/2-r,centerY:(f+p)/2-a,diameter:g}}var Qv=`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 $v(e,t){let n=Math.abs(t)/2;return e===`left`?`${n}px center`:`calc(100% - ${n}px) center`}function ey(e,t,n){let[r,i]=k(()=>e&&t?Zv(t,Gv(n?.current),Kv(n?.current)):null);return Qe(()=>{if(!e||!t){i(null);return}let r=Gv(n?.current),a=()=>i(Zv(t,r,Kv(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 ty(e,t){let[n,r]=k(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 ny=1;function ry(e,t,n){return Math.min(Math.max(e,t),n)}function iy(e,t,n,r){let i=Math.min(e.diameter/t.height,1),a=r?.safe_area??W_,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:ry(e.centerX-o,e.centerX+c-t.width*i,e.centerX-c),ty:ry(e.centerY-s,e.centerY+c-t.height*i,e.centerY-c)}}var ay=[`cx`,`cy`,`r`,`tx`,`ty`,`s`,`shift`];function oy(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=iy(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 sy(e,t,n){let r=j(null),i=j(e),a=j(n),o=j(0),s=j(0);i.current=e,a.current=n,A(()=>{let e=i.current;if(!e)return;if(!r.current||cy()){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 ay){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?ay.map(t=>Math.round(e[t]*100)).join():``,t]),A(()=>()=>{o.current&&globalThis.cancelAnimationFrame(o.current)},[])}function cy(){return globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function ly({geom:e,visible:t}){return F(`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 uy(e,t){let n=t>=0?`left`:`right`,r=j({side:n,shift:t});A(()=>{e&&(r.current={side:n,shift:t})},[e,n,t]);let i=e?n:r.current.side;return{side:i,transformOrigin:$v(i,e?t:r.current.shift),translateX:e?0:-r.current.shift}}function dy(e,t,n){return`${e.side??``}:${e.active}:${t}:${n??``}`}function fy({snapshotUrl:e,transformOrigin:t}){return F(`div`,{class:`absolute inset-0 bg-cover bg-center`,style:{backgroundImage:`url("${e}")`,transform:`scaleX(-1)`,transformOrigin:t}})}function py({snapshotUrl:e,translateX:t,transition:n,transformOrigin:r}){return F(`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:F(fy,{snapshotUrl:e,transformOrigin:r})})}function my({ambient:e,usePip:t,transition:n}){return e===`none`?null:F(`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 hy({morphCapable:e,snapshotUrl:t,mirrorSide:n,videoShiftX:r,transition:i,sceneRef:a,videoWrapRef:o,fill:s,videoRef:c}){return F(`div`,{ref:a,"data-morph":`scene`,class:`absolute inset-0`,style:e?{transformOrigin:`top left`}:void 0,children:F(`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&&F(`div`,{"aria-hidden":`true`,"data-morph":`window-mirror`,class:`absolute top-0 bottom-0 w-full`,style:n===`right`?{left:`calc(100% - ${ny}px)`}:{right:`calc(100% - ${ny}px)`},children:F(fy,{snapshotUrl:t,transformOrigin:`center`})})]})})}function gy({canvasLayoutEffect:e,smartSidecarActive:t,isScreenSharing:n,fill:r,captureSnapshot:i,transition:a=Qv,transitionMs:o=560,personaMode:s=`shift`,renderedSlot:c=null,ambient:l=`default`,children:u}){let d=j(null),[f,p]=k(null),m=t&&e.backdrop.type===`snapshot_mirror`,h=t?e.video_shift_x:0,g=j(null),_=dy(e,h,c),{usePip:v,side:y}=Xv(e,s,c,Jv(s!==`shift`,_,g),h,Yv(g,s!==`shift`,_)),b=ey(s!==`shift`,y,g),x=uy(m,h);A(()=>{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]),A(()=>{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=ty(g,C),T=f!==null&&!C,E=C&&y!=null,ee=j(null),te=j(null),[ne,re]=k(!0),ie=j(!0),D=N((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 sy(C?oy(b,S,w,h,e):null,o,D),F(`div`,{ref:g,class:`relative w-full h-full overflow-hidden ${n?`flex items-center justify-center`:``}`,children:[T&&f!==null&&F(py,{snapshotUrl:f,translateX:x.translateX,transition:a,transformOrigin:x.transformOrigin}),E&&F(my,{ambient:l,usePip:v,transition:a}),F(`div`,{"data-morph":`fg`,class:`absolute inset-0 z-10`,children:F(hy,{morphCapable:C,snapshotUrl:f,mirrorSide:x.side,videoShiftX:h,transition:a,sceneRef:ee,videoWrapRef:te,fill:r,videoRef:d})}),C&&b&&F(ly,{geom:b,visible:S&&ne}),u]})}var _y=480,vy=qd(({personaSessionId:e,isAudioOnly:t,avatarOff:n,canvasLayoutEffect:r,smartSidecarActive:i})=>{let a=t||n,o=i?r.video_shift_x:0;return F(`div`,{class:`absolute inset-0 overflow-hidden`,children:F(`div`,{class:`absolute top-0 bottom-0`,style:{left:o>0?`${_y}px`:`0px`,right:o<0?`${_y}px`:`0px`,transition:`left ${Qv}, right ${Qv}`},children:[F(xf,{automirror:!0,sessionId:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 w-full h-full object-contain`}),F(`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?F(`div`,{class:`flex w-full h-full items-center justify-center`,children:F(h_,{sessionId:e})}):F(xf,{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 yy(e){return e&&Object.assign(Cy,e),Cy}var by,xy,Sy,Cy,wy=t((()=>{xy=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Sy=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(by=globalThis).__zod_globalConfig??(by.__zod_globalConfig={}),Cy=globalThis.__zod_globalConfig}));function Ty(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 Ey(e,t){return typeof t==`bigint`?t.toString():t}function Dy(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Oy(e){return e==null}function ky(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ay(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 jy(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==nb)return r===void 0&&(r=nb,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function My(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ny(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Py(e){return JSON.stringify(e)}function Fy(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function Iy(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ly(e){if(Iy(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Iy(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Ry(e){return Ly(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function zy(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function By(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 Vy(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function Hy(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 By(e,Ny(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 My(this,`shape`,e),e},checks:[]}))}function Uy(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 By(e,Ny(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 My(this,`shape`,r),r},checks:[]}))}function Wy(e,t){if(!Ly(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 By(e,Ny(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return My(this,`shape`,n),n}}))}function Gy(e,t){if(!Ly(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return By(e,Ny(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return My(this,`shape`,n),n}}))}function Ky(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return By(e,Ny(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return My(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function qy(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 By(t,Ny(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 My(this,`shape`,i),i},checks:[]}))}function Jy(e,t,n){return By(t,Ny(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 My(this,`shape`,i),i}}))}function Yy(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 Xy(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 Zy(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Qy(e){return typeof e==`string`?e:e?.message}function $y(e,t,n){let r=e.message?e.message:Qy(e.inst?._zod.def?.error?.(e))??Qy(t?.error?.(e))??Qy(n.customError?.(e))??Qy(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 eb(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function tb(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var nb,rb,ib,ab,ob,sb=t((()=>{wy(),nb=Symbol(`evaluating`),rb=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},ib=Dy(()=>{if(Cy.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),ab=new Set([`string`,`number`,`symbol`]),ob={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]}}));function cb(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 lb(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 ub,db,fb,pb=t((()=>{wy(),sb(),ub=(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,Ey,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},db=W(`$ZodError`,ub),fb=W(`$ZodError`,ub,{Parent:Error})})),mb,hb,gb,_b,vb,yb,bb,xb,Sb,Cb,wb,Tb,Eb,Db,Ob=t((()=>{wy(),pb(),sb(),mb=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 xy;if(o.issues.length){let t=new((i?.Err)??e)(o.issues.map(e=>$y(e,a,yy())));throw rb(t,i?.callee),t}return o.value},hb=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=>$y(e,a,yy())));throw rb(t,i?.callee),t}return o.value},gb=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 xy;return a.issues.length?{success:!1,error:new(e??db)(a.issues.map(e=>$y(e,i,yy())))}:{success:!0,data:a.value}},_b=gb(fb),vb=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=>$y(e,i,yy())))}:{success:!0,data:a.value}},yb=vb(fb),bb=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return mb(e)(t,n,i)},xb=e=>(t,n,r)=>mb(e)(t,n,r),Sb=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return hb(e)(t,n,i)},Cb=e=>async(t,n,r)=>hb(e)(t,n,r),wb=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gb(e)(t,n,i)},Tb=e=>(t,n,r)=>gb(e)(t,n,r),Eb=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return vb(e)(t,n,i)},Db=e=>async(t,n,r)=>vb(e)(t,n,r)}));function kb(){return new RegExp(Ub,`u`)}function Ab(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 jb(e){return RegExp(`^${Ab(e)}$`)}function Mb(e){let t=Ab({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(`^${Qb}T(?:${r})$`)}var Nb,Pb,Fb,Ib,Lb,Rb,zb,Bb,Vb,Hb,Ub,Wb,Gb,Kb,qb,Jb,Yb,Xb,Zb,Qb,$b,ex,tx,nx,rx,ix,ax,ox,sx,cx=t((()=>{Nb=/^[cC][0-9a-z]{6,}$/,Pb=/^[0-9a-z]+$/,Fb=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ib=/^[0-9a-vA-V]{20}$/,Lb=/^[A-Za-z0-9]{27}$/,Rb=/^[a-zA-Z0-9_-]{21}$/,zb=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Bb=/^([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})$/,Vb=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)$/,Hb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ub=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Wb=/^(?:(?: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])$/,Gb=/^(([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}|:))$/,Kb=/^((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])$/,qb=/^(([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])$/,Jb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Yb=/^[A-Za-z0-9_-]*$/,Xb=/^https?$/,Zb=/^\+[1-9]\d{6,14}$/,Qb=`(?:(?:\\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])))`,$b=RegExp(`^${Qb}$`),ex=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},tx=/^-?\d+$/,nx=/^-?\d+(?:\.\d+)?$/,rx=/^(?:true|false)$/i,ix=/^null$/i,ax=/^undefined$/i,ox=/^[^A-Z]*$/,sx=/^[^a-z]*$/})),lx,ux,dx,fx,px,mx,hx,gx,_x,vx,yx,bx,xx,Sx,Cx,wx,Tx,Ex=t((()=>{wy(),cx(),sb(),lx=W(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ux={number:`number`,bigint:`bigint`,object:`date`},dx=W(`$ZodCheckLessThan`,(e,t)=>{lx.init(e,t);let n=ux[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})}}),fx=W(`$ZodCheckGreaterThan`,(e,t)=>{lx.init(e,t);let n=ux[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})}}),px=W(`$ZodCheckMultipleOf`,(e,t)=>{lx.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):Ay(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})}}),mx=W(`$ZodCheckNumberFormat`,(e,t)=>{lx.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ob[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=tx)}),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})}}),hx=W(`$ZodCheckMaxLength`,(e,t)=>{var n;lx.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Oy(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=eb(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),gx=W(`$ZodCheckMinLength`,(e,t)=>{var n;lx.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Oy(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=eb(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_x=W(`$ZodCheckLengthEquals`,(e,t)=>{var n;lx.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Oy(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=eb(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})}}),vx=W(`$ZodCheckStringFormat`,(e,t)=>{var n,r;lx.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=()=>{})}),yx=W(`$ZodCheckRegex`,(e,t)=>{vx.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})}}),bx=W(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ox,vx.init(e,t)}),xx=W(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=sx,vx.init(e,t)}),Sx=W(`$ZodCheckIncludes`,(e,t)=>{lx.init(e,t);let n=zy(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})}}),Cx=W(`$ZodCheckStartsWith`,(e,t)=>{lx.init(e,t);let n=RegExp(`^${zy(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})}}),wx=W(`$ZodCheckEndsWith`,(e,t)=>{lx.init(e,t);let n=RegExp(`.*${zy(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})}}),Tx=W(`$ZodCheckOverwrite`,(e,t)=>{lx.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),Dx,Ox=t((()=>{Dx=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(`
|
|
88
58
|
`).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(`
|
|
89
|
-
`))}}})),xE,SE=a((()=>{xE={major:4,minor:4,patch:3}}));function CE(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function wE(e){if(!VT.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return CE(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function TE(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 EE(e,t,n){e.issues.length&&t.issues.push(...Hw(n,e.issues)),t.value[n]=e.value}function DE(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Hw(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 OE(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=Mw(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function kE(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=>DE(e,n,i,t,u,d))):DE(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 AE(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=>!Bw(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=>Ww(e,r,cw())))}),t)}function jE(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Dw(e)&&Dw(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=jE(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=jE(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 ME(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}),Bw(e))return e;let o=jE(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function NE(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function PE(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function FE(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 IE(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 LE(e){return e.value=Object.freeze(e.value),e}function RE(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(qw(e))}}var 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,DD,OD,kD,AD,jD,MD,ND,PD,FD,ID,LD,RD,zD=a((()=>{vE(),pw(),bE(),bT(),eE(),$w(),SE(),zE=K(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xE;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=Bw(e),i;for(let a of t){if(a._zod.def.when){if(Vw(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 uw;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Bw(e,t))});else{if(e.issues.length===t)continue;r||=Bw(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Bw(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new uw;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 uw;return o.then(e=>t(e,r,a))}return t(o,r,a)}}xw(e,`~standard`,()=>({validate:t=>{try{let n=lT(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return dT(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),BE=K(`$ZodString`,(e,t)=>{zE.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??KT(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}}),VE=K(`$ZodStringFormat`,(e,t)=>{uE.init(e,t),BE.init(e,t)}),HE=K(`$ZodGUID`,(e,t)=>{t.pattern??=MT,VE.init(e,t)}),UE=K(`$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??=NT(e)}else t.pattern??=NT();VE.init(e,t)}),WE=K(`$ZodEmail`,(e,t)=>{t.pattern??=PT,VE.init(e,t)}),GE=K(`$ZodURL`,(e,t)=>{VE.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===HT.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})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),KE=K(`$ZodEmoji`,(e,t)=>{t.pattern??=xT(),VE.init(e,t)}),qE=K(`$ZodNanoID`,(e,t)=>{t.pattern??=AT,VE.init(e,t)}),JE=K(`$ZodCUID`,(e,t)=>{t.pattern??=TT,VE.init(e,t)}),YE=K(`$ZodCUID2`,(e,t)=>{t.pattern??=ET,VE.init(e,t)}),XE=K(`$ZodULID`,(e,t)=>{t.pattern??=DT,VE.init(e,t)}),ZE=K(`$ZodXID`,(e,t)=>{t.pattern??=OT,VE.init(e,t)}),QE=K(`$ZodKSUID`,(e,t)=>{t.pattern??=kT,VE.init(e,t)}),$E=K(`$ZodISODateTime`,(e,t)=>{t.pattern??=wT(t),VE.init(e,t)}),eD=K(`$ZodISODate`,(e,t)=>{t.pattern??=GT,VE.init(e,t)}),tD=K(`$ZodISOTime`,(e,t)=>{t.pattern??=CT(t),VE.init(e,t)}),nD=K(`$ZodISODuration`,(e,t)=>{t.pattern??=jT,VE.init(e,t)}),rD=K(`$ZodIPv4`,(e,t)=>{t.pattern??=IT,VE.init(e,t),e._zod.bag.format=`ipv4`}),iD=K(`$ZodIPv6`,(e,t)=>{t.pattern??=LT,VE.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})}}}),aD=K(`$ZodCIDRv4`,(e,t)=>{t.pattern??=RT,VE.init(e,t)}),oD=K(`$ZodCIDRv6`,(e,t)=>{t.pattern??=zT,VE.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})}}}),sD=K(`$ZodBase64`,(e,t)=>{t.pattern??=BT,VE.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{CE(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),cD=K(`$ZodBase64URL`,(e,t)=>{t.pattern??=VT,VE.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{wE(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),lD=K(`$ZodE164`,(e,t)=>{t.pattern??=UT,VE.init(e,t)}),uD=K(`$ZodJWT`,(e,t)=>{VE.init(e,t),e._zod.check=n=>{TE(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),dD=K(`$ZodNumber`,(e,t)=>{zE.init(e,t),e._zod.pattern=e._zod.bag.pattern??JT,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}}),fD=K(`$ZodNumberFormat`,(e,t)=>{oE.init(e,t),dD.init(e,t)}),pD=K(`$ZodBoolean`,(e,t)=>{zE.init(e,t),e._zod.pattern=YT,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}}),mD=K(`$ZodUndefined`,(e,t)=>{zE.init(e,t),e._zod.pattern=ZT,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}}),hD=K(`$ZodNull`,(e,t)=>{zE.init(e,t),e._zod.pattern=XT,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}}),gD=K(`$ZodUnknown`,(e,t)=>{zE.init(e,t),e._zod.parse=e=>e}),_D=K(`$ZodNever`,(e,t)=>{zE.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),vD=K(`$ZodArray`,(e,t)=>{zE.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=>EE(t,n,e))):EE(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),yD=K(`$ZodObject`,(e,t)=>{if(zE.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=_w(()=>OE(t));xw(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=Ew,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=>DE(n,t,e,s,r,i))):DE(a,t,e,s,r,i)}return i?kE(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),bD=K(`$ZodObjectJIT`,(e,t)=>{yD.init(e,t);let n=e._zod.parse,r=_w(()=>OE(t)),i=e=>{let t=new yE([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=ww(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=ww(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
59
|
+
`))}}})),kx,Ax=t((()=>{kx={major:4,minor:4,patch:3}}));function jx(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Mx(e){if(!Yb.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return jx(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Nx(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 Px(e,t,n){e.issues.length&&t.issues.push(...Zy(n,e.issues)),t.value[n]=e.value}function Fx(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Zy(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 Ix(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=Vy(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Lx(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=>Fx(e,n,i,t,u,d))):Fx(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 Rx(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=>!Yy(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=>$y(e,r,yy())))}),t)}function zx(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ly(e)&&Ly(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=zx(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=zx(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 Bx(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}),Yy(e))return e;let o=zx(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function Vx(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function Hx(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Ux(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 Wx(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 Gx(e){return e.value=Object.freeze(e.value),e}function Kx(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(tb(e))}}var qx,Jx,Yx,Xx,Zx,Qx,$x,eS,tS,nS,rS,iS,aS,oS,sS,cS,lS,uS,dS,fS,pS,mS,hS,gS,_S,vS,yS,bS,xS,SS,CS,wS,TS,ES,DS,OS,kS,AS,jS,MS,NS,PS,FS,IS,LS,RS,zS,BS,VS,HS,US,WS,GS,KS,qS=t((()=>{Ex(),wy(),Ox(),Ob(),cx(),sb(),Ax(),qx=W(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kx;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=Yy(e),i;for(let a of t){if(a._zod.def.when){if(Xy(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 xy;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=Yy(e,t))});else{if(e.issues.length===t)continue;r||=Yy(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(Yy(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new xy;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 xy;return o.then(e=>t(e,r,a))}return t(o,r,a)}}jy(e,`~standard`,()=>({validate:t=>{try{let n=_b(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return yb(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Jx=W(`$ZodString`,(e,t)=>{qx.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ex(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}}),Yx=W(`$ZodStringFormat`,(e,t)=>{vx.init(e,t),Jx.init(e,t)}),Xx=W(`$ZodGUID`,(e,t)=>{t.pattern??=Bb,Yx.init(e,t)}),Zx=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??=Vb(e)}else t.pattern??=Vb();Yx.init(e,t)}),Qx=W(`$ZodEmail`,(e,t)=>{t.pattern??=Hb,Yx.init(e,t)}),$x=W(`$ZodURL`,(e,t)=>{Yx.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Xb.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})}}}),eS=W(`$ZodEmoji`,(e,t)=>{t.pattern??=kb(),Yx.init(e,t)}),tS=W(`$ZodNanoID`,(e,t)=>{t.pattern??=Rb,Yx.init(e,t)}),nS=W(`$ZodCUID`,(e,t)=>{t.pattern??=Nb,Yx.init(e,t)}),rS=W(`$ZodCUID2`,(e,t)=>{t.pattern??=Pb,Yx.init(e,t)}),iS=W(`$ZodULID`,(e,t)=>{t.pattern??=Fb,Yx.init(e,t)}),aS=W(`$ZodXID`,(e,t)=>{t.pattern??=Ib,Yx.init(e,t)}),oS=W(`$ZodKSUID`,(e,t)=>{t.pattern??=Lb,Yx.init(e,t)}),sS=W(`$ZodISODateTime`,(e,t)=>{t.pattern??=Mb(t),Yx.init(e,t)}),cS=W(`$ZodISODate`,(e,t)=>{t.pattern??=$b,Yx.init(e,t)}),lS=W(`$ZodISOTime`,(e,t)=>{t.pattern??=jb(t),Yx.init(e,t)}),uS=W(`$ZodISODuration`,(e,t)=>{t.pattern??=zb,Yx.init(e,t)}),dS=W(`$ZodIPv4`,(e,t)=>{t.pattern??=Wb,Yx.init(e,t),e._zod.bag.format=`ipv4`}),fS=W(`$ZodIPv6`,(e,t)=>{t.pattern??=Gb,Yx.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})}}}),pS=W(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Kb,Yx.init(e,t)}),mS=W(`$ZodCIDRv6`,(e,t)=>{t.pattern??=qb,Yx.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})}}}),hS=W(`$ZodBase64`,(e,t)=>{t.pattern??=Jb,Yx.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{jx(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),gS=W(`$ZodBase64URL`,(e,t)=>{t.pattern??=Yb,Yx.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Mx(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),_S=W(`$ZodE164`,(e,t)=>{t.pattern??=Zb,Yx.init(e,t)}),vS=W(`$ZodJWT`,(e,t)=>{Yx.init(e,t),e._zod.check=n=>{Nx(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),yS=W(`$ZodNumber`,(e,t)=>{qx.init(e,t),e._zod.pattern=e._zod.bag.pattern??nx,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}}),bS=W(`$ZodNumberFormat`,(e,t)=>{mx.init(e,t),yS.init(e,t)}),xS=W(`$ZodBoolean`,(e,t)=>{qx.init(e,t),e._zod.pattern=rx,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}}),SS=W(`$ZodUndefined`,(e,t)=>{qx.init(e,t),e._zod.pattern=ax,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}}),CS=W(`$ZodNull`,(e,t)=>{qx.init(e,t),e._zod.pattern=ix,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}}),wS=W(`$ZodUnknown`,(e,t)=>{qx.init(e,t),e._zod.parse=e=>e}),TS=W(`$ZodNever`,(e,t)=>{qx.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),ES=W(`$ZodArray`,(e,t)=>{qx.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=>Px(t,n,e))):Px(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),DS=W(`$ZodObject`,(e,t)=>{if(qx.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=Dy(()=>Ix(t));jy(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=Iy,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=>Fx(n,t,e,s,r,i))):Fx(a,t,e,s,r,i)}return i?Lx(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),OS=W(`$ZodObjectJIT`,(e,t)=>{DS.init(e,t);let n=e._zod.parse,r=Dy(()=>Ix(t)),i=e=>{let t=new Dx([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Py(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=Py(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
90
60
|
if (${n}.issues.length) {
|
|
91
61
|
if (${o} in input) {
|
|
92
62
|
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
@@ -145,15 +115,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
145
115
|
}
|
|
146
116
|
}
|
|
147
117
|
|
|
148
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Ew,s=!fw.jitless,c=s&&Xw.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?kE([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),xD=K(`$ZodUnion`,(e,t)=>{zE.init(e,t),xw(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),xw(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),xw(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),xw(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=>yw(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=>AE(t,r,e,i)):AE(o,r,e,i)}}),SD=K(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,xD.init(e,t);let n=e._zod.parse;xw(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=_w(()=>{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(!Ew(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)}}),CD=K(`$ZodIntersection`,(e,t)=>{zE.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])=>ME(e,t,n)):ME(e,i,a)}}),wD=K(`$ZodRecord`,(e,t)=>{zE.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Dw(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=>Ww(e,r,cw())),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(...Hw(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Hw(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`&&JT.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=>Ww(e,r,cw())),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(...Hw(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Hw(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),TD=K(`$ZodEnum`,(e,t)=>{zE.init(e,t);let n=mw(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Zw.has(typeof e)).map(e=>typeof e==`string`?kw(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}}),ED=K(`$ZodLiteral`,(e,t)=>{if(zE.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`?kw(e):e?kw(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}}),DD=K(`$ZodTransform`,(e,t)=>{zE.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new dw(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 uw;return n.value=i,n.fallback=!0,n}}),OD=K(`$ZodOptional`,(e,t)=>{zE.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,xw(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),xw(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${yw(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=>NE(e,r)):NE(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),kD=K(`$ZodExactOptional`,(e,t)=>{OD.init(e,t),xw(e._zod,`values`,()=>t.innerType._zod.values),xw(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),AD=K(`$ZodNullable`,(e,t)=>{zE.init(e,t),xw(e._zod,`optin`,()=>t.innerType._zod.optin),xw(e._zod,`optout`,()=>t.innerType._zod.optout),xw(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${yw(e.source)}|null)$`):void 0}),xw(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)}),jD=K(`$ZodDefault`,(e,t)=>{zE.init(e,t),e._zod.optin=`optional`,xw(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=>PE(e,t)):PE(r,t)}}),MD=K(`$ZodPrefault`,(e,t)=>{zE.init(e,t),e._zod.optin=`optional`,xw(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))}),ND=K(`$ZodNonOptional`,(e,t)=>{zE.init(e,t),xw(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=>FE(t,e)):FE(i,e)}}),PD=K(`$ZodCatch`,(e,t)=>{zE.init(e,t),e._zod.optin=`optional`,xw(e._zod,`optout`,()=>t.innerType._zod.optout),xw(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=>Ww(e,n,cw()))},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=>Ww(e,n,cw()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),FD=K(`$ZodPipe`,(e,t)=>{zE.init(e,t),xw(e._zod,`values`,()=>t.in._zod.values),xw(e._zod,`optin`,()=>t.in._zod.optin),xw(e._zod,`optout`,()=>t.out._zod.optout),xw(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=>IE(e,t.in,n)):IE(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>IE(e,t.out,n)):IE(r,t.out,n)}}),ID=K(`$ZodPreprocess`,(e,t)=>{FD.init(e,t)}),LD=K(`$ZodReadonly`,(e,t)=>{zE.init(e,t),xw(e._zod,`propValues`,()=>t.innerType._zod.propValues),xw(e._zod,`values`,()=>t.innerType._zod.values),xw(e._zod,`optin`,()=>t.innerType?._zod?.optin),xw(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(LE):LE(r)}}),RD=K(`$ZodCustom`,(e,t)=>{tE.init(e,t),zE.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=>RE(t,n,r,e));RE(i,n,r,e)}})}));function BD(){return{localeError:VD()}}var VD,HD=a((()=>{$w(),VD=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=Kw(e.input);return`Invalid input: expected ${t}, received ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${jw(e.values[0])}`:`Invalid option: expected one of ${hw(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${hw(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function UD(){return new GD}var WD,GD,KD,qD=a((()=>{GD=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)}},(WD=globalThis).__zod_globalRegistry??(WD.__zod_globalRegistry=UD()),KD=globalThis.__zod_globalRegistry}));function JD(e,t){return new e({type:`string`,...q(t)})}function YD(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function XD(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function ZD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function QD(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function $D(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function eO(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function tO(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function nO(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function rO(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function iO(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function aO(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function oO(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function sO(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function cO(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function lO(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function uO(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function dO(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function fO(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function pO(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function mO(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function hO(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function gO(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function _O(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function vO(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function yO(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function bO(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function xO(e,t){return new e({type:`number`,checks:[],...q(t)})}function SO(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function CO(e,t){return new e({type:`boolean`,...q(t)})}function wO(e,t){return new e({type:`undefined`,...q(t)})}function TO(e,t){return new e({type:`null`,...q(t)})}function EO(e){return new e({type:`unknown`})}function DO(e,t){return new e({type:`never`,...q(t)})}function OO(e,t){return new rE({check:`less_than`,...q(t),value:e,inclusive:!1})}function kO(e,t){return new rE({check:`less_than`,...q(t),value:e,inclusive:!0})}function AO(e,t){return new iE({check:`greater_than`,...q(t),value:e,inclusive:!1})}function jO(e,t){return new iE({check:`greater_than`,...q(t),value:e,inclusive:!0})}function MO(e,t){return new aE({check:`multiple_of`,...q(t),value:e})}function NO(e,t){return new sE({check:`max_length`,...q(t),maximum:e})}function PO(e,t){return new cE({check:`min_length`,...q(t),minimum:e})}function FO(e,t){return new lE({check:`length_equals`,...q(t),length:e})}function IO(e,t){return new dE({check:`string_format`,format:`regex`,...q(t),pattern:e})}function LO(e){return new fE({check:`string_format`,format:`lowercase`,...q(e)})}function RO(e){return new pE({check:`string_format`,format:`uppercase`,...q(e)})}function zO(e,t){return new mE({check:`string_format`,format:`includes`,...q(t),includes:e})}function BO(e,t){return new hE({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function VO(e,t){return new gE({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function HO(e){return new _E({check:`overwrite`,tx:e})}function UO(e){return HO(t=>t.normalize(e))}function WO(){return HO(e=>e.trim())}function GO(){return HO(e=>e.toLowerCase())}function KO(){return HO(e=>e.toUpperCase())}function qO(){return HO(e=>Tw(e))}function JO(e,t,n){return new e({type:`array`,element:t,...q(n)})}function YO(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function XO(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function ZO(e,t){let n=QO(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(qw(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(qw(r))}},e(t.value,t)),t);return n}function QO(e,t){let n=new tE({check:`custom`,...q(t)});return n._zod.check=e,n}var $O=a((()=>{vE(),$w()}));function ek(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??KD,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 tk(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,tk(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`&&ik(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 nk(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>
|
|
118
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Iy,s=!Cy.jitless,c=s&&ib.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?Lx([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),kS=W(`$ZodUnion`,(e,t)=>{qx.init(e,t),jy(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),jy(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),jy(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),jy(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=>ky(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=>Rx(t,r,e,i)):Rx(o,r,e,i)}}),AS=W(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,kS.init(e,t);let n=e._zod.parse;jy(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=Dy(()=>{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(!Iy(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)}}),jS=W(`$ZodIntersection`,(e,t)=>{qx.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])=>Bx(e,t,n)):Bx(e,i,a)}}),MS=W(`$ZodRecord`,(e,t)=>{qx.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Ly(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=>$y(e,r,yy())),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(...Zy(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Zy(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`&&nx.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=>$y(e,r,yy())),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(...Zy(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Zy(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),NS=W(`$ZodEnum`,(e,t)=>{qx.init(e,t);let n=Ty(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>ab.has(typeof e)).map(e=>typeof e==`string`?zy(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}}),PS=W(`$ZodLiteral`,(e,t)=>{if(qx.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`?zy(e):e?zy(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}}),FS=W(`$ZodTransform`,(e,t)=>{qx.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Sy(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 xy;return n.value=i,n.fallback=!0,n}}),IS=W(`$ZodOptional`,(e,t)=>{qx.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,jy(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),jy(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ky(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=>Vx(e,r)):Vx(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),LS=W(`$ZodExactOptional`,(e,t)=>{IS.init(e,t),jy(e._zod,`values`,()=>t.innerType._zod.values),jy(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),RS=W(`$ZodNullable`,(e,t)=>{qx.init(e,t),jy(e._zod,`optin`,()=>t.innerType._zod.optin),jy(e._zod,`optout`,()=>t.innerType._zod.optout),jy(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${ky(e.source)}|null)$`):void 0}),jy(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)}),zS=W(`$ZodDefault`,(e,t)=>{qx.init(e,t),e._zod.optin=`optional`,jy(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=>Hx(e,t)):Hx(r,t)}}),BS=W(`$ZodPrefault`,(e,t)=>{qx.init(e,t),e._zod.optin=`optional`,jy(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))}),VS=W(`$ZodNonOptional`,(e,t)=>{qx.init(e,t),jy(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=>Ux(t,e)):Ux(i,e)}}),HS=W(`$ZodCatch`,(e,t)=>{qx.init(e,t),e._zod.optin=`optional`,jy(e._zod,`optout`,()=>t.innerType._zod.optout),jy(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=>$y(e,n,yy()))},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=>$y(e,n,yy()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),US=W(`$ZodPipe`,(e,t)=>{qx.init(e,t),jy(e._zod,`values`,()=>t.in._zod.values),jy(e._zod,`optin`,()=>t.in._zod.optin),jy(e._zod,`optout`,()=>t.out._zod.optout),jy(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=>Wx(e,t.in,n)):Wx(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Wx(e,t.out,n)):Wx(r,t.out,n)}}),WS=W(`$ZodPreprocess`,(e,t)=>{US.init(e,t)}),GS=W(`$ZodReadonly`,(e,t)=>{qx.init(e,t),jy(e._zod,`propValues`,()=>t.innerType._zod.propValues),jy(e._zod,`values`,()=>t.innerType._zod.values),jy(e._zod,`optin`,()=>t.innerType?._zod?.optin),jy(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(Gx):Gx(r)}}),KS=W(`$ZodCustom`,(e,t)=>{lx.init(e,t),qx.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=>Kx(t,n,r,e));Kx(i,n,r,e)}})}));function JS(){return new XS}var YS,XS,ZS,QS=t((()=>{XS=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)}},(YS=globalThis).__zod_globalRegistry??(YS.__zod_globalRegistry=JS()),ZS=globalThis.__zod_globalRegistry}));function $S(e,t){return new e({type:`string`,...G(t)})}function eC(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...G(t)})}function tC(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...G(t)})}function nC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...G(t)})}function rC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...G(t)})}function iC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...G(t)})}function aC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...G(t)})}function oC(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...G(t)})}function sC(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...G(t)})}function cC(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...G(t)})}function lC(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...G(t)})}function uC(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...G(t)})}function dC(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...G(t)})}function fC(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...G(t)})}function pC(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...G(t)})}function mC(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...G(t)})}function hC(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...G(t)})}function gC(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...G(t)})}function _C(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...G(t)})}function vC(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...G(t)})}function yC(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...G(t)})}function bC(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...G(t)})}function xC(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...G(t)})}function SC(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...G(t)})}function CC(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...G(t)})}function wC(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...G(t)})}function TC(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...G(t)})}function EC(e,t){return new e({type:`number`,checks:[],...G(t)})}function DC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...G(t)})}function OC(e,t){return new e({type:`boolean`,...G(t)})}function kC(e,t){return new e({type:`undefined`,...G(t)})}function AC(e,t){return new e({type:`null`,...G(t)})}function jC(e){return new e({type:`unknown`})}function MC(e,t){return new e({type:`never`,...G(t)})}function NC(e,t){return new dx({check:`less_than`,...G(t),value:e,inclusive:!1})}function PC(e,t){return new dx({check:`less_than`,...G(t),value:e,inclusive:!0})}function FC(e,t){return new fx({check:`greater_than`,...G(t),value:e,inclusive:!1})}function IC(e,t){return new fx({check:`greater_than`,...G(t),value:e,inclusive:!0})}function LC(e,t){return new px({check:`multiple_of`,...G(t),value:e})}function RC(e,t){return new hx({check:`max_length`,...G(t),maximum:e})}function zC(e,t){return new gx({check:`min_length`,...G(t),minimum:e})}function BC(e,t){return new _x({check:`length_equals`,...G(t),length:e})}function VC(e,t){return new yx({check:`string_format`,format:`regex`,...G(t),pattern:e})}function HC(e){return new bx({check:`string_format`,format:`lowercase`,...G(e)})}function UC(e){return new xx({check:`string_format`,format:`uppercase`,...G(e)})}function WC(e,t){return new Sx({check:`string_format`,format:`includes`,...G(t),includes:e})}function GC(e,t){return new Cx({check:`string_format`,format:`starts_with`,...G(t),prefix:e})}function KC(e,t){return new wx({check:`string_format`,format:`ends_with`,...G(t),suffix:e})}function qC(e){return new Tx({check:`overwrite`,tx:e})}function JC(e){return qC(t=>t.normalize(e))}function YC(){return qC(e=>e.trim())}function XC(){return qC(e=>e.toLowerCase())}function ZC(){return qC(e=>e.toUpperCase())}function QC(){return qC(e=>Fy(e))}function $C(e,t,n){return new e({type:`array`,element:t,...G(n)})}function ew(e,t,n){let r=G(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function tw(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...G(n)})}function nw(e,t){let n=rw(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(tb(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(tb(r))}},e(t.value,t)),t);return n}function rw(e,t){let n=new lx({check:`custom`,...G(t)});return n._zod.check=e,n}var iw=t((()=>{Ex(),sb()}));function aw(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??ZS,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 ow(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,ow(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`&&lw(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 sw(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>
|
|
149
119
|
|
|
150
|
-
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 rk(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:ok(t,`input`,e.processors),output:ok(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ik(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 ik(r.element,n);if(r.type===`set`)return ik(r.valueType,n);if(r.type===`lazy`)return ik(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 ik(r.innerType,n);if(r.type===`intersection`)return ik(r.left,n)||ik(r.right,n);if(r.type===`record`||r.type===`map`)return ik(r.keyType,n)||ik(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ik(r.in,n)||ik(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ik(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ik(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ik(e,n))return!0;return!!(r.rest&&ik(r.rest,n))}return!1}var ak,ok,sk=a((()=>{qD(),ak=(e,t={})=>n=>{let r=ek({...n,processors:t});return tk(e,r),nk(r,e),rk(r,e)},ok=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=ek({...i??{},target:a,io:t,processors:n});return tk(e,o),nk(o,e),rk(o,e)}})),ck,lk,uk,dk,fk,pk,mk,hk,gk,_k,vk,yk,bk,xk,Sk,Ck,wk,Tk,Ek,Dk,Ok,kk,Ak,jk,Mk,Nk=a((()=>{sk(),$w(),ck={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},lk=(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=ck[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}))])}},uk=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`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)},dk=(e,t,n,r)=>{n.type=`boolean`},fk=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},pk=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},mk=(e,t,n,r)=>{n.not={}},hk=(e,t,n,r)=>{},gk=(e,t,n,r)=>{let i=e._zod.def,a=mw(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},_k=(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},vk=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},yk=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},bk=(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=tk(a.element,t,{...r,path:[...r.path,`items`]})},xk=(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]=tk(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=tk(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Sk=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>tk(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ck=(e,t,n,r)=>{let i=e._zod.def,a=tk(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=tk(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]]},wk=(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=tk(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=tk(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=tk(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)}},Tk=(e,t,n,r)=>{let i=e._zod.def,a=tk(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`}]},Ek=(e,t,n,r)=>{let i=e._zod.def;tk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Dk=(e,t,n,r)=>{let i=e._zod.def;tk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Ok=(e,t,n,r)=>{let i=e._zod.def;tk(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)))},kk=(e,t,n,r)=>{let i=e._zod.def;tk(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},Ak=(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;tk(o,t,r);let s=t.seen.get(e);s.ref=o},jk=(e,t,n,r)=>{let i=e._zod.def;tk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Mk=(e,t,n,r)=>{let i=e._zod.def;tk(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),Pk=a((()=>{pw(),bT(),aT(),zD(),vE(),SE(),$w(),eE(),HD(),qD(),bE(),$O(),sk(),Nk(),sk()})),Fk=a((()=>{Pk()}));function Ik(e){return _O(Bk,e)}function Lk(e){return vO(Vk,e)}function Rk(e){return yO(Hk,e)}function zk(e){return bO(Uk,e)}var Bk,Vk,Hk,Uk,Wk=a((()=>{Pk(),Mj(),Bk=K(`ZodISODateTime`,(e,t)=>{$E.init(e,t),zA.init(e,t)}),Vk=K(`ZodISODate`,(e,t)=>{eD.init(e,t),zA.init(e,t)}),Hk=K(`ZodISOTime`,(e,t)=>{tD.init(e,t),zA.init(e,t)}),Uk=K(`ZodISODuration`,(e,t)=>{nD.init(e,t),zA.init(e,t)})})),Gk,Kk,qk=a((()=>{Pk(),$w(),Gk=(e,t)=>{rT.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>tT(e,t)},flatten:{value:t=>eT(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,gw,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,gw,2)}},isEmpty:{get(){return e.issues.length===0}}})},Kk=K(`ZodError`,Gk,{Parent:Error})})),Jk,Yk,Xk,Zk,Qk,$k,eA,tA,nA,rA,iA,aA,oA=a((()=>{Pk(),qk(),Jk=oT(Kk),Yk=sT(Kk),Xk=cT(Kk),Zk=uT(Kk),Qk=fT(Kk),$k=pT(Kk),eA=mT(Kk),tA=hT(Kk),nA=gT(Kk),rA=_T(Kk),iA=vT(Kk),aA=yT(Kk)}));function sA(e,t,n){let r=Object.getPrototypeOf(e),i=FA.get(r);if(i||(i=new Set,FA.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 J(e){return JD(RA,e)}function cA(e){return xO(aj,e)}function lA(e){return SO(oj,e)}function uA(e){return CO(sj,e)}function dA(e){return wO(cj,e)}function fA(e){return TO(lj,e)}function pA(){return EO(uj)}function mA(e){return DO(dj,e)}function Y(e,t){return JO(fj,e,t)}function X(e,t){let n={type:`object`,shape:e??{},...q(t)};return new pj(n)}function hA(e,t){return new pj({type:`object`,shape:e,catchall:pA(),...q(t)})}function gA(e,t){return new mj({type:`union`,options:e,...q(t)})}function _A(e,t,n){return new hj({type:`union`,options:t,discriminator:e,...q(n)})}function vA(e,t){return new gj({type:`intersection`,left:e,right:t})}function yA(e,t,n){return!t||!t._zod?new _j({type:`record`,keyType:J(),valueType:e,...q(t)}):new _j({type:`record`,keyType:e,valueType:t,...q(n)})}function bA(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new vj({type:`enum`,entries:n,...q(t)})}function Z(e,t){return new yj({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function xA(e){return new bj({type:`transform`,transform:e})}function SA(e){return new xj({type:`optional`,innerType:e})}function CA(e){return new Sj({type:`optional`,innerType:e})}function wA(e){return new Cj({type:`nullable`,innerType:e})}function TA(e,t){return new wj({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ow(t)}})}function EA(e,t){return new Tj({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ow(t)}})}function DA(e,t){return new Ej({type:`nonoptional`,innerType:e,...q(t)})}function OA(e,t){return new Dj({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function kA(e,t){return new Oj({type:`pipe`,in:e,out:t})}function AA(e){return new Aj({type:`readonly`,innerType:e})}function jA(e,t){return YO(jj,e??(()=>!0),t)}function MA(e,t={}){return XO(jj,e,t)}function NA(e,t){return ZO(e,t)}function PA(e,t){return new kj({type:`pipe`,in:xA(e),out:t})}var FA,IA,LA,RA,zA,BA,VA,HA,UA,WA,GA,KA,qA,JA,YA,XA,ZA,QA,$A,ej,tj,nj,rj,ij,aj,oj,sj,cj,lj,uj,dj,fj,pj,mj,hj,gj,_j,vj,yj,bj,xj,Sj,Cj,wj,Tj,Ej,Dj,Oj,kj,Aj,jj,Mj=a((()=>{Pk(),Nk(),sk(),Fk(),Wk(),oA(),FA=new WeakMap,IA=K(`ZodType`,(e,t)=>(zE.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:ok(e,`input`),output:ok(e,`output`)}}),e.toJSONSchema=ak(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>Jk(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Xk(e,t,n),e.parseAsync=async(t,n)=>Yk(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Zk(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Qk(e,t,n),e.decode=(t,n)=>$k(e,t,n),e.encodeAsync=async(t,n)=>eA(e,t,n),e.decodeAsync=async(t,n)=>tA(e,t,n),e.safeEncode=(t,n)=>nA(e,t,n),e.safeDecode=(t,n)=>rA(e,t,n),e.safeEncodeAsync=async(t,n)=>iA(e,t,n),e.safeDecodeAsync=async(t,n)=>aA(e,t,n),sA(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Cw(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 Aw(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(MA(e,t))},superRefine(e,t){return this.check(NA(e,t))},overwrite(e){return this.check(HO(e))},optional(){return SA(this)},exactOptional(){return CA(this)},nullable(){return wA(this)},nullish(){return SA(wA(this))},nonoptional(e){return DA(this,e)},array(){return Y(this)},or(e){return gA([this,e])},and(e){return vA(this,e)},transform(e){return kA(this,xA(e))},default(e){return TA(this,e)},prefault(e){return EA(this,e)},catch(e){return OA(this,e)},pipe(e){return kA(this,e)},readonly(){return AA(this)},describe(e){let t=this.clone();return KD.add(t,{description:e}),t},meta(...e){if(e.length===0)return KD.get(this);let t=this.clone();return KD.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 KD.get(e)?.description},configurable:!0}),e)),LA=K(`_ZodString`,(e,t)=>{BE.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lk(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,sA(e,`_ZodString`,{regex(...e){return this.check(IO(...e))},includes(...e){return this.check(zO(...e))},startsWith(...e){return this.check(BO(...e))},endsWith(...e){return this.check(VO(...e))},min(...e){return this.check(PO(...e))},max(...e){return this.check(NO(...e))},length(...e){return this.check(FO(...e))},nonempty(...e){return this.check(PO(1,...e))},lowercase(e){return this.check(LO(e))},uppercase(e){return this.check(RO(e))},trim(){return this.check(WO())},normalize(...e){return this.check(UO(...e))},toLowerCase(){return this.check(GO())},toUpperCase(){return this.check(KO())},slugify(){return this.check(qO())}})}),RA=K(`ZodString`,(e,t)=>{BE.init(e,t),LA.init(e,t),e.email=t=>e.check(YD(BA,t)),e.url=t=>e.check(tO(UA,t)),e.jwt=t=>e.check(gO(ij,t)),e.emoji=t=>e.check(nO(WA,t)),e.guid=t=>e.check(XD(VA,t)),e.uuid=t=>e.check(ZD(HA,t)),e.uuidv4=t=>e.check(QD(HA,t)),e.uuidv6=t=>e.check($D(HA,t)),e.uuidv7=t=>e.check(eO(HA,t)),e.nanoid=t=>e.check(rO(GA,t)),e.guid=t=>e.check(XD(VA,t)),e.cuid=t=>e.check(iO(KA,t)),e.cuid2=t=>e.check(aO(qA,t)),e.ulid=t=>e.check(oO(JA,t)),e.base64=t=>e.check(pO(tj,t)),e.base64url=t=>e.check(mO(nj,t)),e.xid=t=>e.check(sO(YA,t)),e.ksuid=t=>e.check(cO(XA,t)),e.ipv4=t=>e.check(lO(ZA,t)),e.ipv6=t=>e.check(uO(QA,t)),e.cidrv4=t=>e.check(dO($A,t)),e.cidrv6=t=>e.check(fO(ej,t)),e.e164=t=>e.check(hO(rj,t)),e.datetime=t=>e.check(Ik(t)),e.date=t=>e.check(Lk(t)),e.time=t=>e.check(Rk(t)),e.duration=t=>e.check(zk(t))}),zA=K(`ZodStringFormat`,(e,t)=>{VE.init(e,t),LA.init(e,t)}),BA=K(`ZodEmail`,(e,t)=>{WE.init(e,t),zA.init(e,t)}),VA=K(`ZodGUID`,(e,t)=>{HE.init(e,t),zA.init(e,t)}),HA=K(`ZodUUID`,(e,t)=>{UE.init(e,t),zA.init(e,t)}),UA=K(`ZodURL`,(e,t)=>{GE.init(e,t),zA.init(e,t)}),WA=K(`ZodEmoji`,(e,t)=>{KE.init(e,t),zA.init(e,t)}),GA=K(`ZodNanoID`,(e,t)=>{qE.init(e,t),zA.init(e,t)}),KA=K(`ZodCUID`,(e,t)=>{JE.init(e,t),zA.init(e,t)}),qA=K(`ZodCUID2`,(e,t)=>{YE.init(e,t),zA.init(e,t)}),JA=K(`ZodULID`,(e,t)=>{XE.init(e,t),zA.init(e,t)}),YA=K(`ZodXID`,(e,t)=>{ZE.init(e,t),zA.init(e,t)}),XA=K(`ZodKSUID`,(e,t)=>{QE.init(e,t),zA.init(e,t)}),ZA=K(`ZodIPv4`,(e,t)=>{rD.init(e,t),zA.init(e,t)}),QA=K(`ZodIPv6`,(e,t)=>{iD.init(e,t),zA.init(e,t)}),$A=K(`ZodCIDRv4`,(e,t)=>{aD.init(e,t),zA.init(e,t)}),ej=K(`ZodCIDRv6`,(e,t)=>{oD.init(e,t),zA.init(e,t)}),tj=K(`ZodBase64`,(e,t)=>{sD.init(e,t),zA.init(e,t)}),nj=K(`ZodBase64URL`,(e,t)=>{cD.init(e,t),zA.init(e,t)}),rj=K(`ZodE164`,(e,t)=>{lD.init(e,t),zA.init(e,t)}),ij=K(`ZodJWT`,(e,t)=>{uD.init(e,t),zA.init(e,t)}),aj=K(`ZodNumber`,(e,t)=>{dD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uk(e,t,n,r),sA(e,`ZodNumber`,{gt(e,t){return this.check(AO(e,t))},gte(e,t){return this.check(jO(e,t))},min(e,t){return this.check(jO(e,t))},lt(e,t){return this.check(OO(e,t))},lte(e,t){return this.check(kO(e,t))},max(e,t){return this.check(kO(e,t))},int(e){return this.check(lA(e))},safe(e){return this.check(lA(e))},positive(e){return this.check(AO(0,e))},nonnegative(e){return this.check(jO(0,e))},negative(e){return this.check(OO(0,e))},nonpositive(e){return this.check(kO(0,e))},multipleOf(e,t){return this.check(MO(e,t))},step(e,t){return this.check(MO(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}),oj=K(`ZodNumberFormat`,(e,t)=>{fD.init(e,t),aj.init(e,t)}),sj=K(`ZodBoolean`,(e,t)=>{pD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dk(e,t,n,r)}),cj=K(`ZodUndefined`,(e,t)=>{mD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pk(e,t,n,r)}),lj=K(`ZodNull`,(e,t)=>{hD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fk(e,t,n,r)}),uj=K(`ZodUnknown`,(e,t)=>{gD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hk(e,t,n,r)}),dj=K(`ZodNever`,(e,t)=>{_D.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mk(e,t,n,r)}),fj=K(`ZodArray`,(e,t)=>{vD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bk(e,t,n,r),e.element=t.element,sA(e,`ZodArray`,{min(e,t){return this.check(PO(e,t))},nonempty(e){return this.check(PO(1,e))},max(e,t){return this.check(NO(e,t))},length(e,t){return this.check(FO(e,t))},unwrap(){return this.element}})}),pj=K(`ZodObject`,(e,t)=>{bD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xk(e,t,n,r),xw(e,`shape`,()=>t.shape),sA(e,`ZodObject`,{keyof(){return bA(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:pA()})},loose(){return this.clone({...this._zod.def,catchall:pA()})},strict(){return this.clone({...this._zod.def,catchall:mA()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Fw(this,e)},safeExtend(e){return Iw(this,e)},merge(e){return Lw(this,e)},pick(e){return Nw(this,e)},omit(e){return Pw(this,e)},partial(...e){return Rw(xj,this,e[0])},required(...e){return zw(Ej,this,e[0])}})}),mj=K(`ZodUnion`,(e,t)=>{xD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sk(e,t,n,r),e.options=t.options}),hj=K(`ZodDiscriminatedUnion`,(e,t)=>{mj.init(e,t),SD.init(e,t)}),gj=K(`ZodIntersection`,(e,t)=>{CD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ck(e,t,n,r)}),_j=K(`ZodRecord`,(e,t)=>{wD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wk(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),vj=K(`ZodEnum`,(e,t)=>{TD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gk(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 vj({...t,checks:[],...q(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 vj({...t,checks:[],...q(r),entries:i})}}),yj=K(`ZodLiteral`,(e,t)=>{ED.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_k(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]}})}),bj=K(`ZodTransform`,(e,t)=>{DD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yk(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new dw(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(qw(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(qw(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)}}),xj=K(`ZodOptional`,(e,t)=>{OD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Sj=K(`ZodExactOptional`,(e,t)=>{kD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Cj=K(`ZodNullable`,(e,t)=>{AD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),wj=K(`ZodDefault`,(e,t)=>{jD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Tj=K(`ZodPrefault`,(e,t)=>{MD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ok(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Ej=K(`ZodNonOptional`,(e,t)=>{ND.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ek(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Dj=K(`ZodCatch`,(e,t)=>{PD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Oj=K(`ZodPipe`,(e,t)=>{FD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ak(e,t,n,r),e.in=t.in,e.out=t.out}),kj=K(`ZodPreprocess`,(e,t)=>{Oj.init(e,t),ID.init(e,t)}),Aj=K(`ZodReadonly`,(e,t)=>{LD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jk(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),jj=K(`ZodCustom`,(e,t)=>{RD.init(e,t),IA.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vk(e,t,n,r)})})),Nj,Pj=a((()=>{Pk(),Nj||={}})),Fj=a((()=>{Pk(),Mj(),Fk(),qk(),oA(),Pj(),HD(),Nk(),qD(),Fk(),Wk(),Mj(),$w(),cw(BD())})),Ij=a((()=>{Fj(),Fj()})),Lj=a((()=>{Ij()}));Lj();var Rj=`io.modelcontextprotocol/related-task`,zj=jA(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),Bj=gA([J(),cA().int()]),Vj=J();hA({ttl:cA().optional(),pollInterval:cA().optional()});var Hj=X({ttl:cA().optional()}),Uj=X({taskId:J()}),Wj=hA({progressToken:Bj.optional(),[Rj]:Uj.optional()}),Gj=X({_meta:Wj.optional()}),Kj=Gj.extend({task:Hj.optional()}),qj=e=>Kj.safeParse(e).success,Jj=X({method:J(),params:Gj.loose().optional()}),Yj=X({_meta:Wj.optional()}),Xj=X({method:J(),params:Yj.loose().optional()}),Zj=hA({_meta:Wj.optional()}),Qj=gA([J(),cA().int()]),$j=X({jsonrpc:Z(`2.0`),id:Qj,...Jj.shape}).strict(),eM=e=>$j.safeParse(e).success,tM=X({jsonrpc:Z(`2.0`),...Xj.shape}).strict(),nM=e=>tM.safeParse(e).success,rM=X({jsonrpc:Z(`2.0`),id:Qj,result:Zj}).strict(),iM=e=>rM.safeParse(e).success,aM;(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`})(aM||={});var oM=X({jsonrpc:Z(`2.0`),id:Qj.optional(),error:X({code:cA().int(),message:J(),data:pA().optional()})}).strict(),sM=e=>oM.safeParse(e).success;gA([$j,tM,rM,oM]),gA([rM,oM]);var cM=Zj.strict(),lM=Yj.extend({requestId:Qj.optional(),reason:J().optional()}),uM=Xj.extend({method:Z(`notifications/cancelled`),params:lM}),dM=X({icons:Y(X({src:J(),mimeType:J().optional(),sizes:Y(J()).optional(),theme:bA([`light`,`dark`]).optional()})).optional()}),fM=X({name:J(),title:J().optional()}),pM=fM.extend({...fM.shape,...dM.shape,version:J(),websiteUrl:J().optional(),description:J().optional()}),mM=PA(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,vA(X({form:vA(X({applyDefaults:uA().optional()}),yA(J(),pA())).optional(),url:zj.optional()}),yA(J(),pA()).optional())),hM=hA({list:zj.optional(),cancel:zj.optional(),requests:hA({sampling:hA({createMessage:zj.optional()}).optional(),elicitation:hA({create:zj.optional()}).optional()}).optional()}),gM=hA({list:zj.optional(),cancel:zj.optional(),requests:hA({tools:hA({call:zj.optional()}).optional()}).optional()}),_M=X({experimental:yA(J(),zj).optional(),sampling:X({context:zj.optional(),tools:zj.optional()}).optional(),elicitation:mM.optional(),roots:X({listChanged:uA().optional()}).optional(),tasks:hM.optional(),extensions:yA(J(),zj).optional()}),vM=Gj.extend({protocolVersion:J(),capabilities:_M,clientInfo:pM}),yM=Jj.extend({method:Z(`initialize`),params:vM}),bM=X({experimental:yA(J(),zj).optional(),logging:zj.optional(),completions:zj.optional(),prompts:X({listChanged:uA().optional()}).optional(),resources:X({subscribe:uA().optional(),listChanged:uA().optional()}).optional(),tools:X({listChanged:uA().optional()}).optional(),tasks:gM.optional(),extensions:yA(J(),zj).optional()}),xM=Zj.extend({protocolVersion:J(),capabilities:bM,serverInfo:pM,instructions:J().optional()}),SM=Xj.extend({method:Z(`notifications/initialized`),params:Yj.optional()}),CM=Jj.extend({method:Z(`ping`),params:Gj.optional()}),wM=X({progress:cA(),total:SA(cA()),message:SA(J())}),TM=X({...Yj.shape,...wM.shape,progressToken:Bj}),EM=Xj.extend({method:Z(`notifications/progress`),params:TM}),DM=Gj.extend({cursor:Vj.optional()}),OM=Jj.extend({params:DM.optional()}),kM=Zj.extend({nextCursor:Vj.optional()}),AM=bA([`working`,`input_required`,`completed`,`failed`,`cancelled`]),jM=X({taskId:J(),status:AM,ttl:gA([cA(),fA()]),createdAt:J(),lastUpdatedAt:J(),pollInterval:SA(cA()),statusMessage:SA(J())}),MM=Zj.extend({task:jM}),NM=Yj.merge(jM),PM=Xj.extend({method:Z(`notifications/tasks/status`),params:NM}),FM=Jj.extend({method:Z(`tasks/get`),params:Gj.extend({taskId:J()})}),IM=Zj.merge(jM),LM=Jj.extend({method:Z(`tasks/result`),params:Gj.extend({taskId:J()})});Zj.loose();var RM=OM.extend({method:Z(`tasks/list`)}),zM=kM.extend({tasks:Y(jM)}),BM=Jj.extend({method:Z(`tasks/cancel`),params:Gj.extend({taskId:J()})}),VM=Zj.merge(jM),HM=X({uri:J(),mimeType:SA(J()),_meta:yA(J(),pA()).optional()}),UM=HM.extend({text:J()}),WM=J().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),GM=HM.extend({blob:WM}),KM=bA([`user`,`assistant`]),qM=X({audience:Y(KM).optional(),priority:cA().min(0).max(1).optional(),lastModified:Ik({offset:!0}).optional()}),JM=X({...fM.shape,...dM.shape,uri:J(),description:SA(J()),mimeType:SA(J()),size:SA(cA()),annotations:qM.optional(),_meta:SA(hA({}))}),YM=X({...fM.shape,...dM.shape,uriTemplate:J(),description:SA(J()),mimeType:SA(J()),annotations:qM.optional(),_meta:SA(hA({}))}),XM=OM.extend({method:Z(`resources/list`)}),ZM=kM.extend({resources:Y(JM)}),QM=OM.extend({method:Z(`resources/templates/list`)}),$M=kM.extend({resourceTemplates:Y(YM)}),eN=Gj.extend({uri:J()}),tN=eN,nN=Jj.extend({method:Z(`resources/read`),params:tN}),rN=Zj.extend({contents:Y(gA([UM,GM]))}),iN=Xj.extend({method:Z(`notifications/resources/list_changed`),params:Yj.optional()}),aN=eN,oN=Jj.extend({method:Z(`resources/subscribe`),params:aN}),sN=eN,cN=Jj.extend({method:Z(`resources/unsubscribe`),params:sN}),lN=Yj.extend({uri:J()}),uN=Xj.extend({method:Z(`notifications/resources/updated`),params:lN}),dN=X({name:J(),description:SA(J()),required:SA(uA())}),fN=X({...fM.shape,...dM.shape,description:SA(J()),arguments:SA(Y(dN)),_meta:SA(hA({}))}),pN=OM.extend({method:Z(`prompts/list`)}),mN=kM.extend({prompts:Y(fN)}),hN=Gj.extend({name:J(),arguments:yA(J(),J()).optional()}),gN=Jj.extend({method:Z(`prompts/get`),params:hN}),_N=X({type:Z(`text`),text:J(),annotations:qM.optional(),_meta:yA(J(),pA()).optional()}),vN=X({type:Z(`image`),data:WM,mimeType:J(),annotations:qM.optional(),_meta:yA(J(),pA()).optional()}),yN=X({type:Z(`audio`),data:WM,mimeType:J(),annotations:qM.optional(),_meta:yA(J(),pA()).optional()}),bN=X({type:Z(`tool_use`),name:J(),id:J(),input:yA(J(),pA()),_meta:yA(J(),pA()).optional()}),xN=X({type:Z(`resource`),resource:gA([UM,GM]),annotations:qM.optional(),_meta:yA(J(),pA()).optional()}),SN=JM.extend({type:Z(`resource_link`)}),CN=gA([_N,vN,yN,SN,xN]),wN=X({role:KM,content:CN}),TN=Zj.extend({description:J().optional(),messages:Y(wN)}),EN=Xj.extend({method:Z(`notifications/prompts/list_changed`),params:Yj.optional()}),DN=X({title:J().optional(),readOnlyHint:uA().optional(),destructiveHint:uA().optional(),idempotentHint:uA().optional(),openWorldHint:uA().optional()}),ON=X({taskSupport:bA([`required`,`optional`,`forbidden`]).optional()}),kN=X({...fM.shape,...dM.shape,description:J().optional(),inputSchema:X({type:Z(`object`),properties:yA(J(),zj).optional(),required:Y(J()).optional()}).catchall(pA()),outputSchema:X({type:Z(`object`),properties:yA(J(),zj).optional(),required:Y(J()).optional()}).catchall(pA()).optional(),annotations:DN.optional(),execution:ON.optional(),_meta:yA(J(),pA()).optional()}),AN=OM.extend({method:Z(`tools/list`)}),jN=kM.extend({tools:Y(kN)}),MN=Zj.extend({content:Y(CN).default([]),structuredContent:yA(J(),pA()).optional(),isError:uA().optional()});MN.or(Zj.extend({toolResult:pA()}));var NN=Kj.extend({name:J(),arguments:yA(J(),pA()).optional()}),PN=Jj.extend({method:Z(`tools/call`),params:NN}),FN=Xj.extend({method:Z(`notifications/tools/list_changed`),params:Yj.optional()});X({autoRefresh:uA().default(!0),debounceMs:cA().int().nonnegative().default(300)});var IN=bA([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),LN=Gj.extend({level:IN}),RN=Jj.extend({method:Z(`logging/setLevel`),params:LN}),zN=Yj.extend({level:IN,logger:J().optional(),data:pA()}),BN=Xj.extend({method:Z(`notifications/message`),params:zN}),VN=X({hints:Y(X({name:J().optional()})).optional(),costPriority:cA().min(0).max(1).optional(),speedPriority:cA().min(0).max(1).optional(),intelligencePriority:cA().min(0).max(1).optional()}),HN=X({mode:bA([`auto`,`required`,`none`]).optional()}),UN=X({type:Z(`tool_result`),toolUseId:J().describe(`The unique identifier for the corresponding tool call.`),content:Y(CN).default([]),structuredContent:X({}).loose().optional(),isError:uA().optional(),_meta:yA(J(),pA()).optional()}),WN=_A(`type`,[_N,vN,yN]),GN=_A(`type`,[_N,vN,yN,bN,UN]),KN=X({role:KM,content:gA([GN,Y(GN)]),_meta:yA(J(),pA()).optional()}),qN=Kj.extend({messages:Y(KN),modelPreferences:VN.optional(),systemPrompt:J().optional(),includeContext:bA([`none`,`thisServer`,`allServers`]).optional(),temperature:cA().optional(),maxTokens:cA().int(),stopSequences:Y(J()).optional(),metadata:zj.optional(),tools:Y(kN).optional(),toolChoice:HN.optional()}),JN=Jj.extend({method:Z(`sampling/createMessage`),params:qN}),YN=Zj.extend({model:J(),stopReason:SA(bA([`endTurn`,`stopSequence`,`maxTokens`]).or(J())),role:KM,content:WN}),XN=Zj.extend({model:J(),stopReason:SA(bA([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(J())),role:KM,content:gA([GN,Y(GN)])}),ZN=X({type:Z(`boolean`),title:J().optional(),description:J().optional(),default:uA().optional()}),QN=X({type:Z(`string`),title:J().optional(),description:J().optional(),minLength:cA().optional(),maxLength:cA().optional(),format:bA([`email`,`uri`,`date`,`date-time`]).optional(),default:J().optional()}),$N=X({type:bA([`number`,`integer`]),title:J().optional(),description:J().optional(),minimum:cA().optional(),maximum:cA().optional(),default:cA().optional()}),eP=X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),default:J().optional()}),tP=X({type:Z(`string`),title:J().optional(),description:J().optional(),oneOf:Y(X({const:J(),title:J()})),default:J().optional()}),nP=gA([gA([X({type:Z(`string`),title:J().optional(),description:J().optional(),enum:Y(J()),enumNames:Y(J()).optional(),default:J().optional()}),gA([eP,tP]),gA([X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:cA().optional(),maxItems:cA().optional(),items:X({type:Z(`string`),enum:Y(J())}),default:Y(J()).optional()}),X({type:Z(`array`),title:J().optional(),description:J().optional(),minItems:cA().optional(),maxItems:cA().optional(),items:X({anyOf:Y(X({const:J(),title:J()}))}),default:Y(J()).optional()})])]),ZN,QN,$N]),rP=gA([Kj.extend({mode:Z(`form`).optional(),message:J(),requestedSchema:X({type:Z(`object`),properties:yA(J(),nP),required:Y(J()).optional()})}),Kj.extend({mode:Z(`url`),message:J(),elicitationId:J(),url:J().url()})]),iP=Jj.extend({method:Z(`elicitation/create`),params:rP}),aP=Yj.extend({elicitationId:J()}),oP=Xj.extend({method:Z(`notifications/elicitation/complete`),params:aP}),sP=Zj.extend({action:bA([`accept`,`decline`,`cancel`]),content:PA(e=>e===null?void 0:e,yA(J(),gA([J(),cA(),uA(),Y(J())])).optional())}),cP=X({type:Z(`ref/resource`),uri:J()}),lP=X({type:Z(`ref/prompt`),name:J()}),uP=Gj.extend({ref:gA([lP,cP]),argument:X({name:J(),value:J()}),context:X({arguments:yA(J(),J()).optional()}).optional()}),dP=Jj.extend({method:Z(`completion/complete`),params:uP}),fP=Zj.extend({completion:hA({values:Y(J()).max(100),total:SA(cA().int()),hasMore:SA(uA())})}),pP=X({uri:J().startsWith(`file://`),name:J().optional(),_meta:yA(J(),pA()).optional()}),mP=Jj.extend({method:Z(`roots/list`),params:Gj.optional()}),hP=Zj.extend({roots:Y(pP)}),gP=Xj.extend({method:Z(`notifications/roots/list_changed`),params:Yj.optional()});gA([CM,yM,dP,RN,gN,pN,XM,QM,nN,oN,cN,PN,AN,FM,LM,RM,BM]),gA([uM,EM,SM,gP,PM]),gA([cM,YN,XN,sP,hP,IM,zM,MM]),gA([CM,JN,iP,mP,FM,LM,RM,BM]),gA([uM,EM,BN,uN,iN,FN,EN,PM,oP]),gA([cM,xM,fP,TN,mN,ZM,$M,rN,MN,jN,IM,zM,MM]);var _P=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===aM.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new vP(e.elicitations,n)}return new e(t,n,r)}},vP=class extends _P{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(aM.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};$O(),$w(),eE(),pw(),bT(),Nk(),aT(),Pk(),qD();function yP(e){return!!e._zod}function bP(e,t){return yP(e)?lT(e,t):e.safeParse(t)}function xP(e){if(!e)return;let t;if(t=yP(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function SP(e){if(yP(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 CP(e){return e===`completed`||e===`failed`||e===`cancelled`}function wP(e){let t=xP(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=SP(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function TP(e,t){let n=bP(e,t);if(!n.success)throw n.error;return n.data}var EP=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(uM,e=>{this._oncancel(e)}),this.setNotificationHandler(EM,e=>{this._onprogress(e)}),this.setRequestHandler(CM,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(FM,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new _P(aM.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(LM,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 _P(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 _P(aM.InvalidParams,`Task not found: ${r}`);if(!CP(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(CP(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[Rj]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(RM,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 _P(aM.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(BM,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new _P(aM.InvalidParams,`Task not found: ${e.params.taskId}`);if(CP(n.status))throw new _P(aM.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 _P(aM.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof _P?e:new _P(aM.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),_P.fromError(aM.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),iM(e)||sM(e)?this._onresponse(e):eM(e)?this._onrequest(e,t):nM(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=_P.fromError(aM.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?.[Rj]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:aM.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=qj(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 _P(aM.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:aM.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),iM(e)?n(e):n(new _P(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(iM(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),iM(e)?r(e):r(_P.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 _P?e:new _P(aM.InternalError,String(e))}}return}let i;try{let r=await this.request(e,MM,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new _P(aM.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},CP(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new _P(aM.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new _P(aM.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 _P?e:new _P(aM.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||{},[Rj]: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 _P?e:new _P(aM.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=bP(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(_P.fromError(aM.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},IM,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},zM,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},VM,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||{},[Rj]: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||{},[Rj]: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||{},[Rj]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=wP(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=TP(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=wP(e);this._notificationHandlers.set(n,n=>{let r=TP(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`&&eM(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new _P(aM.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 _P(aM.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new _P(aM.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 _P(aM.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=PM.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),CP(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 _P(aM.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(CP(a.status))throw new _P(aM.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=PM.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),CP(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};Lj(),(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 DP=class extends EP{_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)}},OP=`2026-01-26`,kP=gA([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),AP=gA([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),jP=yA(gA([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.
|
|
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 cw(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:dw(t,`input`,e.processors),output:dw(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function lw(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 lw(r.element,n);if(r.type===`set`)return lw(r.valueType,n);if(r.type===`lazy`)return lw(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 lw(r.innerType,n);if(r.type===`intersection`)return lw(r.left,n)||lw(r.right,n);if(r.type===`record`||r.type===`map`)return lw(r.keyType,n)||lw(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:lw(r.in,n)||lw(r.out,n);if(r.type===`object`){for(let e in r.shape)if(lw(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(lw(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(lw(e,n))return!0;return!!(r.rest&&lw(r.rest,n))}return!1}var uw,dw,fw=t((()=>{QS(),uw=(e,t={})=>n=>{let r=aw({...n,processors:t});return ow(e,r),sw(r,e),cw(r,e)},dw=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=aw({...i??{},target:a,io:t,processors:n});return ow(e,o),sw(o,e),cw(o,e)}})),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=t((()=>{fw(),sb(),pw={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},mw=(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=pw[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}))])}},hw=(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)},gw=(e,t,n,r)=>{n.type=`boolean`},_w=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},vw=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},yw=(e,t,n,r)=>{n.not={}},bw=(e,t,n,r)=>{},xw=(e,t,n,r)=>{let i=e._zod.def,a=Ty(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Sw=(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}},Cw=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ww=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Tw=(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=ow(a.element,t,{...r,path:[...r.path,`items`]})},Ew=(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]=ow(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=ow(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Dw=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ow(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ow=(e,t,n,r)=>{let i=e._zod.def,a=ow(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ow(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]]},kw=(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=ow(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=ow(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=ow(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)}},Aw=(e,t,n,r)=>{let i=e._zod.def,a=ow(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`}]},jw=(e,t,n,r)=>{let i=e._zod.def;ow(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Mw=(e,t,n,r)=>{let i=e._zod.def;ow(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Nw=(e,t,n,r)=>{let i=e._zod.def;ow(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)))},Pw=(e,t,n,r)=>{let i=e._zod.def;ow(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},Fw=(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;ow(o,t,r);let s=t.seen.get(e);s.ref=o},Iw=(e,t,n,r)=>{let i=e._zod.def;ow(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Lw=(e,t,n,r)=>{let i=e._zod.def;ow(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType}})),zw=t((()=>{wy(),Ob(),pb(),qS(),Ex(),Ax(),sb(),cx(),QS(),Ox(),iw(),fw(),Rw(),fw()})),Bw=t((()=>{zw()}));function Vw(e){return SC(Gw,e)}function Hw(e){return CC(Kw,e)}function Uw(e){return wC(qw,e)}function Ww(e){return TC(Jw,e)}var Gw,Kw,qw,Jw,Yw=t((()=>{zw(),IE(),Gw=W(`ZodISODateTime`,(e,t)=>{sS.init(e,t),UT.init(e,t)}),Kw=W(`ZodISODate`,(e,t)=>{cS.init(e,t),UT.init(e,t)}),qw=W(`ZodISOTime`,(e,t)=>{lS.init(e,t),UT.init(e,t)}),Jw=W(`ZodISODuration`,(e,t)=>{uS.init(e,t),UT.init(e,t)})})),Xw,Zw,Qw=t((()=>{zw(),sb(),Xw=(e,t)=>{db.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>lb(e,t)},flatten:{value:t=>cb(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Ey,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ey,2)}},isEmpty:{get(){return e.issues.length===0}}})},Zw=W(`ZodError`,Xw,{Parent:Error})})),$w,eT,tT,nT,rT,iT,aT,oT,sT,cT,lT,uT,dT=t((()=>{zw(),Qw(),$w=mb(Zw),eT=hb(Zw),tT=gb(Zw),nT=vb(Zw),rT=bb(Zw),iT=xb(Zw),aT=Sb(Zw),oT=Cb(Zw),sT=wb(Zw),cT=Tb(Zw),lT=Eb(Zw),uT=Db(Zw)}));function fT(e,t,n){let r=Object.getPrototypeOf(e),i=zT.get(r);if(i||(i=new Set,zT.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 $S(HT,e)}function q(e){return EC(lE,e)}function pT(e){return DC(uE,e)}function mT(e){return OC(dE,e)}function hT(e){return kC(fE,e)}function gT(e){return AC(pE,e)}function _T(){return jC(mE)}function vT(e){return MC(hE,e)}function J(e,t){return $C(gE,e,t)}function Y(e,t){let n={type:`object`,shape:e??{},...G(t)};return new _E(n)}function yT(e,t){return new _E({type:`object`,shape:e,catchall:_T(),...G(t)})}function bT(e,t){return new vE({type:`union`,options:e,...G(t)})}function xT(e,t,n){return new yE({type:`union`,options:t,discriminator:e,...G(n)})}function ST(e,t){return new bE({type:`intersection`,left:e,right:t})}function CT(e,t,n){return!t||!t._zod?new xE({type:`record`,keyType:K(),valueType:e,...G(t)}):new xE({type:`record`,keyType:e,valueType:t,...G(n)})}function wT(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new SE({type:`enum`,entries:n,...G(t)})}function X(e,t){return new CE({type:`literal`,values:Array.isArray(e)?e:[e],...G(t)})}function TT(e){return new wE({type:`transform`,transform:e})}function ET(e){return new TE({type:`optional`,innerType:e})}function DT(e){return new EE({type:`optional`,innerType:e})}function OT(e){return new DE({type:`nullable`,innerType:e})}function kT(e,t){return new OE({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ry(t)}})}function AT(e,t){return new kE({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ry(t)}})}function jT(e,t){return new AE({type:`nonoptional`,innerType:e,...G(t)})}function MT(e,t){return new jE({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function NT(e,t){return new ME({type:`pipe`,in:e,out:t})}function PT(e){return new PE({type:`readonly`,innerType:e})}function FT(e,t){return ew(FE,e??(()=>!0),t)}function IT(e,t={}){return tw(FE,e,t)}function LT(e,t){return nw(e,t)}function RT(e,t){return new NE({type:`pipe`,in:TT(e),out:t})}var zT,BT,VT,HT,UT,WT,GT,KT,qT,JT,YT,XT,ZT,QT,$T,eE,tE,nE,rE,iE,aE,oE,sE,cE,lE,uE,dE,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=t((()=>{zw(),Rw(),fw(),Bw(),Yw(),dT(),zT=new WeakMap,BT=W(`ZodType`,(e,t)=>(qx.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:dw(e,`input`),output:dw(e,`output`)}}),e.toJSONSchema=uw(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>$w(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>tT(e,t,n),e.parseAsync=async(t,n)=>eT(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>nT(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>rT(e,t,n),e.decode=(t,n)=>iT(e,t,n),e.encodeAsync=async(t,n)=>aT(e,t,n),e.decodeAsync=async(t,n)=>oT(e,t,n),e.safeEncode=(t,n)=>sT(e,t,n),e.safeDecode=(t,n)=>cT(e,t,n),e.safeEncodeAsync=async(t,n)=>lT(e,t,n),e.safeDecodeAsync=async(t,n)=>uT(e,t,n),fT(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Ny(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 By(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(IT(e,t))},superRefine(e,t){return this.check(LT(e,t))},overwrite(e){return this.check(qC(e))},optional(){return ET(this)},exactOptional(){return DT(this)},nullable(){return OT(this)},nullish(){return ET(OT(this))},nonoptional(e){return jT(this,e)},array(){return J(this)},or(e){return bT([this,e])},and(e){return ST(this,e)},transform(e){return NT(this,TT(e))},default(e){return kT(this,e)},prefault(e){return AT(this,e)},catch(e){return MT(this,e)},pipe(e){return NT(this,e)},readonly(){return PT(this)},describe(e){let t=this.clone();return ZS.add(t,{description:e}),t},meta(...e){if(e.length===0)return ZS.get(this);let t=this.clone();return ZS.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 ZS.get(e)?.description},configurable:!0}),e)),VT=W(`_ZodString`,(e,t)=>{Jx.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mw(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,fT(e,`_ZodString`,{regex(...e){return this.check(VC(...e))},includes(...e){return this.check(WC(...e))},startsWith(...e){return this.check(GC(...e))},endsWith(...e){return this.check(KC(...e))},min(...e){return this.check(zC(...e))},max(...e){return this.check(RC(...e))},length(...e){return this.check(BC(...e))},nonempty(...e){return this.check(zC(1,...e))},lowercase(e){return this.check(HC(e))},uppercase(e){return this.check(UC(e))},trim(){return this.check(YC())},normalize(...e){return this.check(JC(...e))},toLowerCase(){return this.check(XC())},toUpperCase(){return this.check(ZC())},slugify(){return this.check(QC())}})}),HT=W(`ZodString`,(e,t)=>{Jx.init(e,t),VT.init(e,t),e.email=t=>e.check(eC(WT,t)),e.url=t=>e.check(oC(qT,t)),e.jwt=t=>e.check(xC(cE,t)),e.emoji=t=>e.check(sC(JT,t)),e.guid=t=>e.check(tC(GT,t)),e.uuid=t=>e.check(nC(KT,t)),e.uuidv4=t=>e.check(rC(KT,t)),e.uuidv6=t=>e.check(iC(KT,t)),e.uuidv7=t=>e.check(aC(KT,t)),e.nanoid=t=>e.check(cC(YT,t)),e.guid=t=>e.check(tC(GT,t)),e.cuid=t=>e.check(lC(XT,t)),e.cuid2=t=>e.check(uC(ZT,t)),e.ulid=t=>e.check(dC(QT,t)),e.base64=t=>e.check(vC(aE,t)),e.base64url=t=>e.check(yC(oE,t)),e.xid=t=>e.check(fC($T,t)),e.ksuid=t=>e.check(pC(eE,t)),e.ipv4=t=>e.check(mC(tE,t)),e.ipv6=t=>e.check(hC(nE,t)),e.cidrv4=t=>e.check(gC(rE,t)),e.cidrv6=t=>e.check(_C(iE,t)),e.e164=t=>e.check(bC(sE,t)),e.datetime=t=>e.check(Vw(t)),e.date=t=>e.check(Hw(t)),e.time=t=>e.check(Uw(t)),e.duration=t=>e.check(Ww(t))}),UT=W(`ZodStringFormat`,(e,t)=>{Yx.init(e,t),VT.init(e,t)}),WT=W(`ZodEmail`,(e,t)=>{Qx.init(e,t),UT.init(e,t)}),GT=W(`ZodGUID`,(e,t)=>{Xx.init(e,t),UT.init(e,t)}),KT=W(`ZodUUID`,(e,t)=>{Zx.init(e,t),UT.init(e,t)}),qT=W(`ZodURL`,(e,t)=>{$x.init(e,t),UT.init(e,t)}),JT=W(`ZodEmoji`,(e,t)=>{eS.init(e,t),UT.init(e,t)}),YT=W(`ZodNanoID`,(e,t)=>{tS.init(e,t),UT.init(e,t)}),XT=W(`ZodCUID`,(e,t)=>{nS.init(e,t),UT.init(e,t)}),ZT=W(`ZodCUID2`,(e,t)=>{rS.init(e,t),UT.init(e,t)}),QT=W(`ZodULID`,(e,t)=>{iS.init(e,t),UT.init(e,t)}),$T=W(`ZodXID`,(e,t)=>{aS.init(e,t),UT.init(e,t)}),eE=W(`ZodKSUID`,(e,t)=>{oS.init(e,t),UT.init(e,t)}),tE=W(`ZodIPv4`,(e,t)=>{dS.init(e,t),UT.init(e,t)}),nE=W(`ZodIPv6`,(e,t)=>{fS.init(e,t),UT.init(e,t)}),rE=W(`ZodCIDRv4`,(e,t)=>{pS.init(e,t),UT.init(e,t)}),iE=W(`ZodCIDRv6`,(e,t)=>{mS.init(e,t),UT.init(e,t)}),aE=W(`ZodBase64`,(e,t)=>{hS.init(e,t),UT.init(e,t)}),oE=W(`ZodBase64URL`,(e,t)=>{gS.init(e,t),UT.init(e,t)}),sE=W(`ZodE164`,(e,t)=>{_S.init(e,t),UT.init(e,t)}),cE=W(`ZodJWT`,(e,t)=>{vS.init(e,t),UT.init(e,t)}),lE=W(`ZodNumber`,(e,t)=>{yS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hw(e,t,n,r),fT(e,`ZodNumber`,{gt(e,t){return this.check(FC(e,t))},gte(e,t){return this.check(IC(e,t))},min(e,t){return this.check(IC(e,t))},lt(e,t){return this.check(NC(e,t))},lte(e,t){return this.check(PC(e,t))},max(e,t){return this.check(PC(e,t))},int(e){return this.check(pT(e))},safe(e){return this.check(pT(e))},positive(e){return this.check(FC(0,e))},nonnegative(e){return this.check(IC(0,e))},negative(e){return this.check(NC(0,e))},nonpositive(e){return this.check(PC(0,e))},multipleOf(e,t){return this.check(LC(e,t))},step(e,t){return this.check(LC(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}),uE=W(`ZodNumberFormat`,(e,t)=>{bS.init(e,t),lE.init(e,t)}),dE=W(`ZodBoolean`,(e,t)=>{xS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gw(e,t,n,r)}),fE=W(`ZodUndefined`,(e,t)=>{SS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vw(e,t,n,r)}),pE=W(`ZodNull`,(e,t)=>{CS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_w(e,t,n,r)}),mE=W(`ZodUnknown`,(e,t)=>{wS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bw(e,t,n,r)}),hE=W(`ZodNever`,(e,t)=>{TS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yw(e,t,n,r)}),gE=W(`ZodArray`,(e,t)=>{ES.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tw(e,t,n,r),e.element=t.element,fT(e,`ZodArray`,{min(e,t){return this.check(zC(e,t))},nonempty(e){return this.check(zC(1,e))},max(e,t){return this.check(RC(e,t))},length(e,t){return this.check(BC(e,t))},unwrap(){return this.element}})}),_E=W(`ZodObject`,(e,t)=>{OS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ew(e,t,n,r),jy(e,`shape`,()=>t.shape),fT(e,`ZodObject`,{keyof(){return wT(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:_T()})},loose(){return this.clone({...this._zod.def,catchall:_T()})},strict(){return this.clone({...this._zod.def,catchall:vT()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Wy(this,e)},safeExtend(e){return Gy(this,e)},merge(e){return Ky(this,e)},pick(e){return Hy(this,e)},omit(e){return Uy(this,e)},partial(...e){return qy(TE,this,e[0])},required(...e){return Jy(AE,this,e[0])}})}),vE=W(`ZodUnion`,(e,t)=>{kS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dw(e,t,n,r),e.options=t.options}),yE=W(`ZodDiscriminatedUnion`,(e,t)=>{vE.init(e,t),AS.init(e,t)}),bE=W(`ZodIntersection`,(e,t)=>{jS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ow(e,t,n,r)}),xE=W(`ZodRecord`,(e,t)=>{MS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kw(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),SE=W(`ZodEnum`,(e,t)=>{NS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xw(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 SE({...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 SE({...t,checks:[],...G(r),entries:i})}}),CE=W(`ZodLiteral`,(e,t)=>{PS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sw(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]}})}),wE=W(`ZodTransform`,(e,t)=>{FS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ww(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Sy(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(tb(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(tb(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)}}),TE=W(`ZodOptional`,(e,t)=>{IS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),EE=W(`ZodExactOptional`,(e,t)=>{LS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),DE=W(`ZodNullable`,(e,t)=>{RS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Aw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),OE=W(`ZodDefault`,(e,t)=>{zS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),kE=W(`ZodPrefault`,(e,t)=>{BS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),AE=W(`ZodNonOptional`,(e,t)=>{VS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),jE=W(`ZodCatch`,(e,t)=>{HS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),ME=W(`ZodPipe`,(e,t)=>{US.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fw(e,t,n,r),e.in=t.in,e.out=t.out}),NE=W(`ZodPreprocess`,(e,t)=>{ME.init(e,t),WS.init(e,t)}),PE=W(`ZodReadonly`,(e,t)=>{GS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Iw(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),FE=W(`ZodCustom`,(e,t)=>{KS.init(e,t),BT.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cw(e,t,n,r)})})),LE=t((()=>{zw()})),RE=t((()=>{zw(),IE(),Bw(),Qw(),dT(),LE(),Rw(),QS(),Bw(),Yw(),IE(),sb()})),zE=t((()=>{RE(),RE()})),BE=t((()=>{zE()}));BE();var VE=`io.modelcontextprotocol/related-task`,HE=FT(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),UE=bT([K(),q().int()]),WE=K();yT({ttl:q().optional(),pollInterval:q().optional()});var GE=Y({ttl:q().optional()}),KE=Y({taskId:K()}),qE=yT({progressToken:UE.optional(),[VE]:KE.optional()}),JE=Y({_meta:qE.optional()}),YE=JE.extend({task:GE.optional()}),XE=e=>YE.safeParse(e).success,ZE=Y({method:K(),params:JE.loose().optional()}),QE=Y({_meta:qE.optional()}),$E=Y({method:K(),params:QE.loose().optional()}),eD=yT({_meta:qE.optional()}),tD=bT([K(),q().int()]),nD=Y({jsonrpc:X(`2.0`),id:tD,...ZE.shape}).strict(),rD=e=>nD.safeParse(e).success,iD=Y({jsonrpc:X(`2.0`),...$E.shape}).strict(),aD=e=>iD.safeParse(e).success,oD=Y({jsonrpc:X(`2.0`),id:tD,result:eD}).strict(),sD=e=>oD.safeParse(e).success,cD;(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`})(cD||={});var lD=Y({jsonrpc:X(`2.0`),id:tD.optional(),error:Y({code:q().int(),message:K(),data:_T().optional()})}).strict(),uD=e=>lD.safeParse(e).success;bT([nD,iD,oD,lD]),bT([oD,lD]);var dD=eD.strict(),fD=QE.extend({requestId:tD.optional(),reason:K().optional()}),pD=$E.extend({method:X(`notifications/cancelled`),params:fD}),mD=Y({icons:J(Y({src:K(),mimeType:K().optional(),sizes:J(K()).optional(),theme:wT([`light`,`dark`]).optional()})).optional()}),hD=Y({name:K(),title:K().optional()}),gD=hD.extend({...hD.shape,...mD.shape,version:K(),websiteUrl:K().optional(),description:K().optional()}),_D=RT(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ST(Y({form:ST(Y({applyDefaults:mT().optional()}),CT(K(),_T())).optional(),url:HE.optional()}),CT(K(),_T()).optional())),vD=yT({list:HE.optional(),cancel:HE.optional(),requests:yT({sampling:yT({createMessage:HE.optional()}).optional(),elicitation:yT({create:HE.optional()}).optional()}).optional()}),yD=yT({list:HE.optional(),cancel:HE.optional(),requests:yT({tools:yT({call:HE.optional()}).optional()}).optional()}),bD=Y({experimental:CT(K(),HE).optional(),sampling:Y({context:HE.optional(),tools:HE.optional()}).optional(),elicitation:_D.optional(),roots:Y({listChanged:mT().optional()}).optional(),tasks:vD.optional(),extensions:CT(K(),HE).optional()}),xD=JE.extend({protocolVersion:K(),capabilities:bD,clientInfo:gD}),SD=ZE.extend({method:X(`initialize`),params:xD}),CD=Y({experimental:CT(K(),HE).optional(),logging:HE.optional(),completions:HE.optional(),prompts:Y({listChanged:mT().optional()}).optional(),resources:Y({subscribe:mT().optional(),listChanged:mT().optional()}).optional(),tools:Y({listChanged:mT().optional()}).optional(),tasks:yD.optional(),extensions:CT(K(),HE).optional()}),wD=eD.extend({protocolVersion:K(),capabilities:CD,serverInfo:gD,instructions:K().optional()}),TD=$E.extend({method:X(`notifications/initialized`),params:QE.optional()}),ED=ZE.extend({method:X(`ping`),params:JE.optional()}),DD=Y({progress:q(),total:ET(q()),message:ET(K())}),OD=Y({...QE.shape,...DD.shape,progressToken:UE}),kD=$E.extend({method:X(`notifications/progress`),params:OD}),AD=JE.extend({cursor:WE.optional()}),jD=ZE.extend({params:AD.optional()}),MD=eD.extend({nextCursor:WE.optional()}),ND=wT([`working`,`input_required`,`completed`,`failed`,`cancelled`]),PD=Y({taskId:K(),status:ND,ttl:bT([q(),gT()]),createdAt:K(),lastUpdatedAt:K(),pollInterval:ET(q()),statusMessage:ET(K())}),FD=eD.extend({task:PD}),ID=QE.merge(PD),LD=$E.extend({method:X(`notifications/tasks/status`),params:ID}),RD=ZE.extend({method:X(`tasks/get`),params:JE.extend({taskId:K()})}),zD=eD.merge(PD),BD=ZE.extend({method:X(`tasks/result`),params:JE.extend({taskId:K()})});eD.loose();var VD=jD.extend({method:X(`tasks/list`)}),HD=MD.extend({tasks:J(PD)}),UD=ZE.extend({method:X(`tasks/cancel`),params:JE.extend({taskId:K()})}),WD=eD.merge(PD),GD=Y({uri:K(),mimeType:ET(K()),_meta:CT(K(),_T()).optional()}),KD=GD.extend({text:K()}),qD=K().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),JD=GD.extend({blob:qD}),YD=wT([`user`,`assistant`]),XD=Y({audience:J(YD).optional(),priority:q().min(0).max(1).optional(),lastModified:Vw({offset:!0}).optional()}),ZD=Y({...hD.shape,...mD.shape,uri:K(),description:ET(K()),mimeType:ET(K()),size:ET(q()),annotations:XD.optional(),_meta:ET(yT({}))}),QD=Y({...hD.shape,...mD.shape,uriTemplate:K(),description:ET(K()),mimeType:ET(K()),annotations:XD.optional(),_meta:ET(yT({}))}),$D=jD.extend({method:X(`resources/list`)}),eO=MD.extend({resources:J(ZD)}),tO=jD.extend({method:X(`resources/templates/list`)}),nO=MD.extend({resourceTemplates:J(QD)}),rO=JE.extend({uri:K()}),iO=rO,aO=ZE.extend({method:X(`resources/read`),params:iO}),oO=eD.extend({contents:J(bT([KD,JD]))}),sO=$E.extend({method:X(`notifications/resources/list_changed`),params:QE.optional()}),cO=rO,lO=ZE.extend({method:X(`resources/subscribe`),params:cO}),uO=rO,dO=ZE.extend({method:X(`resources/unsubscribe`),params:uO}),fO=QE.extend({uri:K()}),pO=$E.extend({method:X(`notifications/resources/updated`),params:fO}),mO=Y({name:K(),description:ET(K()),required:ET(mT())}),hO=Y({...hD.shape,...mD.shape,description:ET(K()),arguments:ET(J(mO)),_meta:ET(yT({}))}),gO=jD.extend({method:X(`prompts/list`)}),_O=MD.extend({prompts:J(hO)}),vO=JE.extend({name:K(),arguments:CT(K(),K()).optional()}),yO=ZE.extend({method:X(`prompts/get`),params:vO}),bO=Y({type:X(`text`),text:K(),annotations:XD.optional(),_meta:CT(K(),_T()).optional()}),xO=Y({type:X(`image`),data:qD,mimeType:K(),annotations:XD.optional(),_meta:CT(K(),_T()).optional()}),SO=Y({type:X(`audio`),data:qD,mimeType:K(),annotations:XD.optional(),_meta:CT(K(),_T()).optional()}),CO=Y({type:X(`tool_use`),name:K(),id:K(),input:CT(K(),_T()),_meta:CT(K(),_T()).optional()}),wO=Y({type:X(`resource`),resource:bT([KD,JD]),annotations:XD.optional(),_meta:CT(K(),_T()).optional()}),TO=ZD.extend({type:X(`resource_link`)}),EO=bT([bO,xO,SO,TO,wO]),DO=Y({role:YD,content:EO}),OO=eD.extend({description:K().optional(),messages:J(DO)}),kO=$E.extend({method:X(`notifications/prompts/list_changed`),params:QE.optional()}),AO=Y({title:K().optional(),readOnlyHint:mT().optional(),destructiveHint:mT().optional(),idempotentHint:mT().optional(),openWorldHint:mT().optional()}),jO=Y({taskSupport:wT([`required`,`optional`,`forbidden`]).optional()}),MO=Y({...hD.shape,...mD.shape,description:K().optional(),inputSchema:Y({type:X(`object`),properties:CT(K(),HE).optional(),required:J(K()).optional()}).catchall(_T()),outputSchema:Y({type:X(`object`),properties:CT(K(),HE).optional(),required:J(K()).optional()}).catchall(_T()).optional(),annotations:AO.optional(),execution:jO.optional(),_meta:CT(K(),_T()).optional()}),NO=jD.extend({method:X(`tools/list`)}),PO=MD.extend({tools:J(MO)}),FO=eD.extend({content:J(EO).default([]),structuredContent:CT(K(),_T()).optional(),isError:mT().optional()});FO.or(eD.extend({toolResult:_T()}));var IO=YE.extend({name:K(),arguments:CT(K(),_T()).optional()}),LO=ZE.extend({method:X(`tools/call`),params:IO}),RO=$E.extend({method:X(`notifications/tools/list_changed`),params:QE.optional()});Y({autoRefresh:mT().default(!0),debounceMs:q().int().nonnegative().default(300)});var zO=wT([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),BO=JE.extend({level:zO}),VO=ZE.extend({method:X(`logging/setLevel`),params:BO}),HO=QE.extend({level:zO,logger:K().optional(),data:_T()}),UO=$E.extend({method:X(`notifications/message`),params:HO}),WO=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()}),GO=Y({mode:wT([`auto`,`required`,`none`]).optional()}),KO=Y({type:X(`tool_result`),toolUseId:K().describe(`The unique identifier for the corresponding tool call.`),content:J(EO).default([]),structuredContent:Y({}).loose().optional(),isError:mT().optional(),_meta:CT(K(),_T()).optional()}),qO=xT(`type`,[bO,xO,SO]),JO=xT(`type`,[bO,xO,SO,CO,KO]),YO=Y({role:YD,content:bT([JO,J(JO)]),_meta:CT(K(),_T()).optional()}),XO=YE.extend({messages:J(YO),modelPreferences:WO.optional(),systemPrompt:K().optional(),includeContext:wT([`none`,`thisServer`,`allServers`]).optional(),temperature:q().optional(),maxTokens:q().int(),stopSequences:J(K()).optional(),metadata:HE.optional(),tools:J(MO).optional(),toolChoice:GO.optional()}),ZO=ZE.extend({method:X(`sampling/createMessage`),params:XO}),QO=eD.extend({model:K(),stopReason:ET(wT([`endTurn`,`stopSequence`,`maxTokens`]).or(K())),role:YD,content:qO}),$O=eD.extend({model:K(),stopReason:ET(wT([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(K())),role:YD,content:bT([JO,J(JO)])}),ek=Y({type:X(`boolean`),title:K().optional(),description:K().optional(),default:mT().optional()}),tk=Y({type:X(`string`),title:K().optional(),description:K().optional(),minLength:q().optional(),maxLength:q().optional(),format:wT([`email`,`uri`,`date`,`date-time`]).optional(),default:K().optional()}),nk=Y({type:wT([`number`,`integer`]),title:K().optional(),description:K().optional(),minimum:q().optional(),maximum:q().optional(),default:q().optional()}),rk=Y({type:X(`string`),title:K().optional(),description:K().optional(),enum:J(K()),default:K().optional()}),ik=Y({type:X(`string`),title:K().optional(),description:K().optional(),oneOf:J(Y({const:K(),title:K()})),default:K().optional()}),ak=bT([bT([Y({type:X(`string`),title:K().optional(),description:K().optional(),enum:J(K()),enumNames:J(K()).optional(),default:K().optional()}),bT([rk,ik]),bT([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()})])]),ek,tk,nk]),ok=bT([YE.extend({mode:X(`form`).optional(),message:K(),requestedSchema:Y({type:X(`object`),properties:CT(K(),ak),required:J(K()).optional()})}),YE.extend({mode:X(`url`),message:K(),elicitationId:K(),url:K().url()})]),sk=ZE.extend({method:X(`elicitation/create`),params:ok}),ck=QE.extend({elicitationId:K()}),lk=$E.extend({method:X(`notifications/elicitation/complete`),params:ck}),uk=eD.extend({action:wT([`accept`,`decline`,`cancel`]),content:RT(e=>e===null?void 0:e,CT(K(),bT([K(),q(),mT(),J(K())])).optional())}),dk=Y({type:X(`ref/resource`),uri:K()}),fk=Y({type:X(`ref/prompt`),name:K()}),pk=JE.extend({ref:bT([fk,dk]),argument:Y({name:K(),value:K()}),context:Y({arguments:CT(K(),K()).optional()}).optional()}),mk=ZE.extend({method:X(`completion/complete`),params:pk}),hk=eD.extend({completion:yT({values:J(K()).max(100),total:ET(q().int()),hasMore:ET(mT())})}),gk=Y({uri:K().startsWith(`file://`),name:K().optional(),_meta:CT(K(),_T()).optional()}),_k=ZE.extend({method:X(`roots/list`),params:JE.optional()}),vk=eD.extend({roots:J(gk)}),yk=$E.extend({method:X(`notifications/roots/list_changed`),params:QE.optional()});bT([ED,SD,mk,VO,yO,gO,$D,tO,aO,lO,dO,LO,NO,RD,BD,VD,UD]),bT([pD,kD,TD,yk,LD]),bT([dD,QO,$O,uk,vk,zD,HD,FD]),bT([ED,ZO,sk,_k,RD,BD,VD,UD]),bT([pD,kD,UO,pO,sO,RO,kO,LD,lk]),bT([dD,wD,hk,OO,_O,eO,nO,oO,FO,PO,zD,HD,FD]);var bk=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===cD.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new xk(e.elicitations,n)}return new e(t,n,r)}},xk=class extends bk{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(cD.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};Ob();function Sk(e){return!!e._zod}function Ck(e,t){return Sk(e)?_b(e,t):e.safeParse(t)}function wk(e){if(!e)return;let t;if(t=Sk(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Tk(e){if(Sk(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 Ek(e){return e===`completed`||e===`failed`||e===`cancelled`}function Dk(e){let t=wk(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Tk(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function Ok(e,t){let n=Ck(e,t);if(!n.success)throw n.error;return n.data}var kk=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(pD,e=>{this._oncancel(e)}),this.setNotificationHandler(kD,e=>{this._onprogress(e)}),this.setRequestHandler(ED,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(RD,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new bk(cD.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(BD,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 bk(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 bk(cD.InvalidParams,`Task not found: ${r}`);if(!Ek(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(Ek(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[VE]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(VD,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 bk(cD.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(UD,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new bk(cD.InvalidParams,`Task not found: ${e.params.taskId}`);if(Ek(n.status))throw new bk(cD.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 bk(cD.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof bk?e:new bk(cD.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),bk.fromError(cD.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),sD(e)||uD(e)?this._onresponse(e):rD(e)?this._onrequest(e,t):aD(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=bk.fromError(cD.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?.[VE]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:cD.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=XE(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 bk(cD.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:cD.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),sD(e)?n(e):n(new bk(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(sD(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),sD(e)?r(e):r(bk.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 bk?e:new bk(cD.InternalError,String(e))}}return}let i;try{let r=await this.request(e,FD,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new bk(cD.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},Ek(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new bk(cD.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new bk(cD.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 bk?e:new bk(cD.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||{},[VE]: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 bk?e:new bk(cD.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=Ck(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(bk.fromError(cD.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},zD,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},HD,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},WD,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||{},[VE]: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||{},[VE]: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||{},[VE]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=Dk(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=Ok(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=Dk(e);this._notificationHandlers.set(n,n=>{let r=Ok(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`&&rD(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new bk(cD.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 bk(cD.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new bk(cD.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 bk(cD.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=LD.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),Ek(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 bk(cD.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(Ek(a.status))throw new bk(cD.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=LD.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),Ek(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};BE(),(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 Ak=class extends kk{_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)}},jk=`2026-01-26`,Mk=bT([X(`light`),X(`dark`)]).describe(`Color theme preference for the host environment.`),Nk=bT([X(`inline`),X(`fullscreen`),X(`pip`)]).describe(`Display mode for UI presentation.`),Pk=CT(bT([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.
|
|
151
121
|
|
|
152
122
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
153
123
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
154
124
|
|
|
155
125
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
156
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),
|
|
126
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),bT([K(),hT()]).describe(`Style variables for theming MCP apps.
|
|
157
127
|
|
|
158
128
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
159
129
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -165,18 +135,18 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
165
135
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
166
136
|
|
|
167
137
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
168
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),
|
|
138
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Fk=Y({method:X(`ui/open-link`),params:Y({url:K().describe(`URL to open in the host's browser`)})});Y({isError:mT().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),Y({isError:mT().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),Y({isError:mT().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();var Ik=Y({method:X(`ui/notifications/sandbox-proxy-ready`),params:Y({})}),Lk=Y({connectDomains:J(K()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
169
139
|
|
|
170
140
|
- Maps to CSP \`connect-src\` directive
|
|
171
|
-
- Empty or omitted → no network connections (secure default)`),resourceDomains:
|
|
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'`)")}),Rk=Y({camera:Y({}).optional().describe(`Request camera access.
|
|
172
142
|
|
|
173
|
-
Maps to Permission Policy \`camera\` feature.`),microphone:
|
|
143
|
+
Maps to Permission Policy \`camera\` feature.`),microphone:Y({}).optional().describe(`Request microphone access.
|
|
174
144
|
|
|
175
|
-
Maps to Permission Policy \`microphone\` feature.`),geolocation:
|
|
145
|
+
Maps to Permission Policy \`microphone\` feature.`),geolocation:Y({}).optional().describe(`Request geolocation access.
|
|
176
146
|
|
|
177
|
-
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:
|
|
147
|
+
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:Y({}).optional().describe(`Request clipboard write access.
|
|
178
148
|
|
|
179
|
-
Maps to Permission Policy \`clipboard-write\` feature.`)}),
|
|
149
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)}),zk=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:CT(K(),_T().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:CT(K(),_T().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 Bk=Y({fonts:K().optional()}),Vk=Y({variables:Pk.optional().describe(`CSS variables for theming the app.`),css:Bk.optional().describe(`CSS blocks that apps can inject.`)});Y({method:X(`ui/resource-teardown`),params:Y({})});var Hk=CT(K(),_T()),Uk=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.`)}),Wk=Y({method:X(`ui/notifications/request-teardown`),params:Y({}).optional()}),Gk=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:mT().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Y({listChanged:mT().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:Rk.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:Lk.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Uk.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Uk.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.")}),Kk=Y({experimental:Y({}).optional().describe(`Experimental features (structure TBD).`),tools:Y({listChanged:mT().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:J(Nk).optional().describe(`Display modes the app supports.`)}),qk=Y({method:X(`ui/notifications/initialized`),params:Y({}).optional()});Y({csp:Lk.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:Rk.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:K().optional().describe(`Dedicated origin for view sandbox.
|
|
180
150
|
|
|
181
151
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
182
152
|
|
|
@@ -184,19 +154,19 @@ Useful when views need stable, dedicated origins for OAuth callbacks, CORS polic
|
|
|
184
154
|
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
|
|
185
155
|
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
|
|
186
156
|
|
|
187
|
-
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:
|
|
157
|
+
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:mT().optional().describe(`Visual boundary preference - true if view prefers a visible border.
|
|
188
158
|
|
|
189
159
|
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.
|
|
190
160
|
|
|
191
161
|
- \`true\`: request visible border + background
|
|
192
162
|
- \`false\`: request no visible border + background
|
|
193
|
-
- omitted: host decides border`)});var
|
|
163
|
+
- omitted: host decides border`)});var Jk=Y({method:X(`ui/request-display-mode`),params:Y({mode:Nk.describe(`The display mode being requested.`)})});Y({mode:Nk.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough();var Yk=bT([X(`model`),X(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Y({resourceUri:K().optional(),visibility:J(Yk).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
194
164
|
- "model": Tool visible to and callable by the agent
|
|
195
|
-
- "app": Tool callable by the app from this server only`),csp:
|
|
196
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:J().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:J().optional().describe(`User's timezone in IANA format.`),userAgent:J().optional().describe(`Host application identifier.`),platform:gA([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:uA().optional().describe(`Whether the device supports touch input.`),hover:uA().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:cA().describe(`Top safe area inset in pixels.`),right:cA().describe(`Right safe area inset in pixels.`),bottom:cA().describe(`Bottom safe area inset in pixels.`),left:cA().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:YP.describe(`Partial context update containing only changed fields.`)});var XP=X({method:Z(`ui/update-model-context`),params:X({content:Y(CN).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:yA(J(),pA().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),ZP=X({method:Z(`ui/initialize`),params:X({appInfo:pM.describe(`App identification (name and version).`),appCapabilities:UP.describe(`Features and capabilities this app provides.`),protocolVersion:J().describe(`Protocol version this app supports.`)})});X({protocolVersion:J().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:pM.describe(`Host application identification and version.`),hostCapabilities:HP.describe(`Features and capabilities provided by the host.`),hostContext:YP.describe(`Rich context about the host environment.`)}).passthrough();var QP=[OP],$P=class extends DP{_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:IP,sandboxready:NP,initialized:WP,requestteardown:VP,loggingmessage:BN};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(ZP,e=>this._oninitialize(e)),this.setRequestHandler(CM,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(GP,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(JP,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(MP,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(qP,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(GP,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(XP,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(PN,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(JN,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(XM,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(QM,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(nN,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(pN,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:QP.includes(t)?t:OP,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];eF(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},zP,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},MN,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},jN,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},MN,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(FN,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},ZM,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},$M,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},rN,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(iN,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},mN,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(EN,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function eF(e,t){return JSON.stringify(e)===JSON.stringify(t)}function tF(){let e=st(uy);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}var nF={committedClass:null,pendingClass:null,pendingSinceMs:null,lastResolution:null},rF={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 iF(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 aF={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}]}},oF={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`}}},sF={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 cF(e,t,n=aF,r=oF,i=!0,a=!1){let o=a&&r===oF&&e===`conversation-canvas`&&t.composition===`stacked`&&t.width!==`compact`?`canvas-kiosk-overlay`:t.composition!==void 0&&r===oF?sF[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 lF(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 uF={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}},dF={minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>e.coldDefaultHeightPx??320},fF=`canvas.`;function pF(e){return e.startsWith(fF)?e.slice(7):e}function mF(e,t){let n=pF(e),r=uF[n]??dF,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(uF);function hF(e,t,n){let r=mF(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 gF(e,t){let n=pF(e);return uF[n]===void 0?(t?.[n]??t?.[e])?.hardMinHeightPx:mF(e,t).hardMinHeightPx}function _F(e,t){return mF(e,t).minWidthPx}function vF(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 yF(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 bF(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 xF(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 SF(e,t,n){let r=[],i=e.find(e=>e.kind===`replica`),a=e=>e.kind===`selfView`&&e.layer===`overlay`&&i!==void 0&&xF(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&&!xF(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:gF(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:_F(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&&bF(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 CF=(e,t,n)=>Math.min(n,Math.max(t,e));function wF(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 TF(e,t,n){return e===`canvas-dominant`&&t.width===`compact`?n.eviction.compactTakeoverMaxCards:n.eviction.maxVisibleCards}function EF(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 DF(e,t,n,r,i,a){let o=i??wF(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=hF(e.component,{...e.contentOpts,naturalHeightPx:e.naturalHeightPx,widthPx:c,coldDefaultHeightPx:n.card.coldDefaultHeightPx},n.card.componentOverrides);return{card:e,constraints:t,clampedHeightPx:vF(t.naturalHeightPx,n)}})}}function OF(e,t){return`fraction`in e?e.fraction*t:e.px>=0?e.px:t+e.px}function kF(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 AF(e,t,n,r,i,a){let o=n===`x`?t.width:t.height,s=[...e].sort((e,t)=>OF(n===`x`?e.x:e.y,o)-OF(n===`x`?t.x:t.y,o)),c=s.map(e=>n===`x`?kF(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)):CF(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(CF(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 jF(e,t,n){let r=t.width,i=t.height,a=kF(e,e.width,n,`width`),o=kF(e,e.x,n,`x`),s=CF(Math.round(OF(o,r)),0,r),c=CF(Math.round(OF(e.y,i)),0,i);return{x:s,y:c,width:CF(Math.round(`fraction`in a?a.fraction*r:a.px),0,r-s),height:CF(Math.round(`fraction`in e.height?e.height.fraction*i:e.height.px),0,i-c)}}function MF(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))?AF(a,t,`x`,n):a.length>1&&a.every(e=>o(e.width))?AF(a,t,`y`,n,r,i):a.map(e=>({region:e,rect:jF(e,t,n)}))}function NF(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}=DF(EF(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}=wF(c,l),_=OF(f.y,i.height),v=d.every(e=>OF(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 PF(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 FF=`bottom-left`;function IF(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 LF(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 RF(e,t,n){return t===null||!bF(e,t)?e:{...e,y:Math.round(t.y)-n-e.height}}function zF(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 BF(e,t,n){let r=e;for(let e of t.filter(zF).sort((e,t)=>t.y-e.y))r=RF(r,e,n);return r}function VF(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 HF(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?wF(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:MF(e,f,a,NF(e,t.state,t.contentKind,n,f,i,o,d,a,r.width,TF(t.state,r,a)),PF(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 UF(e,t,n,r,i,a){let o=n.selfView&&n.prefs.hideSelfView!==!0,{regions:s,surfacePad:c,controlsInset:l,bandTopY:u}=HF(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=TF(e.state,r,a),b=p?EF(n.cards,y,a.eviction.policy):h===void 0?[]:EF(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=VF(b,s.extraEvictions,a.eviction.policy),ee=new Set(T.map(e=>e.id));if(y.evictedCardIds=v.filter(e=>!ee.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}=DF(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=yF(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 E=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=jF(h,e,a),o=h.sheetAnchor===`bottom`,s=wF(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}=DF(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=yF(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`}),E={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(E)}}if(!C){if(o&&s.selfViewDropped)y.selfViewDropped=!0;else if(o){let t=e.suppressedPrefs.includes(`pipCorner`)?FF: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],...E===null?[]:[E.rect],...n.chromeObstacles??[]];if(S){let e=S.rect,n=LF(e,_,a,r.width===`compact`),i=n===null?null:IF(e,t,_,n.w,n.h),o=i===null?null:BF(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=BF(IF(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`)&&bF(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=SF(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=SF(C.tiles,i,a);else e===`drop-self-view`?C.tiles.some(e=>e.kind===`selfView`)&&(S={...S,selfViewDropped:!0},C=x(S),w=SF(C.tiles,i,a)):e===`collapse-replica`&&!S.replicaCollapsed&&C.tiles.some(e=>e.kind===`replica`)&&(S={...S,replicaCollapsed:!0},C=x(S),w=SF(C.tiles,i,a))}return C}function WF(e){if(!(e===void 0||e.length===0))return{...aF,...Object.fromEntries(e.map(e=>[e.id,e]))}}function GF(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=lF(a,t,n),c=a.replica||a.selfView&&a.prefs.hideSelfView!==!0,l=cF(s.state,t,WF(r?.templates),void 0,c,a.kioskMode===!0),{tiles:u,degradations:d}=UF(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 KF={compact:0,medium:1,expanded:2};function qF(e,t){return e.width===t.width&&e.height===t.height&&e.composition===t.composition}function JF(e,t,n,r,i){let a=e.committedClass;if(a===null||a.composition===void 0)return{committedClass:t,pendingClass:null,pendingSinceMs:null};if(qF(t,a))return{committedClass:a,pendingClass:null,pendingSinceMs:null};let o=Math.abs(KF[t.width]-KF[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&&qF(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 YF=(e,t)=>e<t?-1:+(e>t);function XF(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(YF))r.has(e)||i.push({type:`exit`,tileId:e});let a=[],o=[],s=[];for(let e of[...r.keys()].sort(YF)){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 ZF(e,t,n,r,i){let a=JF(e,iF(t.container,r),t.container,n,r),o=GF(t,a.committedClass,r,i);return{resolution:o,transitions:XF(e.lastResolution,o),nextState:{committedClass:a.committedClass,pendingClass:a.pendingClass,pendingSinceMs:a.pendingSinceMs,lastResolution:o}}}var QF=`0.1.13`,$F=nF,eI=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_enabled`)===`1`}catch{return!1}})(),tI=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_debug`)===`1`}catch{return!1}})();function nI(e,t){return eI||e===!0||t===!0}function rI(e=globalThis.location?.search??``){return new URLSearchParams(e).get(`kiosk`)===`1`}function iI({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 aI=16,oI=200,sI=Bt(null);function cI(e){sI.peek()===null&&(console.error(`Magic Grid engine error; rendering the legacy layout.`,e),sI.value=(e instanceof Error?`${e.name}: ${e.message}`:String(e)).slice(0,oI))}function lI(){sI.peek()!==null&&(sI.value=null)}function uI({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,enabled:s}){let c=N($F),l=N(null),[u,d]=j({}),[f,p]=j(null),m=F((e,t)=>{s&&d(n=>n[e]===t?n:{...n,[e]:t})},[s]);M(()=>{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=P(()=>iI({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 M(()=>{if(!s||sI.peek()!==null)return;l.current===null&&(l.current=Date.now());let e=null,t=()=>{if(e=null,sI.peek()!==null)return;let n=Date.now()-(l.current??0),r;try{r=ZF(c.current,h,n,rF)}catch(e){cI(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(aI,rF.hysteresis.windowMs-i+aI))}};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 dI(e){return e.kind===`card`&&e.sheet===!0&&e.sheetAnchor===`bottom`}function fI(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`&&!dI(e))?`card-overflow`:null:`no-persona-video`:`flag-off`}function pI(e,t){if(t!==null||e===null)return null;let n=e.tiles.find(e=>e.kind===`card`&&e.sheet===!0&&!dI(e));return n===void 0?null:n.rect.y+n.rect.height}var mI={driving:!1,containerPx:null,replica:null,selfView:null,content:null,replicaCollapsed:!1};function hI(e,t,n){if(e===null)return mI;let r=t===null;if(!r&&!(t===`no-persona-video`&&n))return mI;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 gI(e){return e.selfView===null?e.driving?`hidden`:`legacy`:`engine`}function _I(e,t){return e.containerPx===null||t.containerPx===null?!1:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height}function vI(e){let t=`composition`in e?e.composition:void 0;return t===`stacked`||t===`side-by-side`?t:void 0}var yI=`conversation.grid_status`,bI=6e4;function xI(e,t,n){return n?e&&t?`url+config+start`:e?`url+start`:t?`config+start`:`start`:e&&t?`both`:e?`url`:`config`}function SI(e,t){return{message_type:`conversation`,event_type:yI,conversation_id:e,properties:t}}function CI(e){let t=vI(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 wI(e){let{send:t,enabledVia:n,engineVersion:r=QF,now:i=Date.now,transitionDebounceMs:a=500,summaryIntervalMs:o=bI}=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=CI(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 TI({enabled:e,enabledVia:t,bail:n,resolution:r,engineError:i}){let a=yh(),o=Qg(),s=st(vv),c=N({daily:a,meetingState:o,conversation:s});c.current={daily:a,meetingState:o,conversation:s};let l=N(null);M(()=>{if(!e)return;let n=wI({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(SI(n,e),`*`)}catch{}}});return l.current=n,()=>{l.current=null,n.dispose()}},[e,t]),M(()=>{l.current?.update(n,r)},[n,r]),M(()=>{i!==null&&l.current?.error(i)},[i])}var EI=(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},DI=(e,t)=>({classGroupId:e,validator:t}),OI=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),kI=`-`,AI=[],jI=`arbitrary..`,MI=e=>{let t=FI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return PI(e);let n=e.split(kI);return NI(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?EI(i,t):t:i||AI}return n[e]||AI}}},NI=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=NI(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(kI):e.slice(t).join(kI),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},PI=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?jI+r:void 0})(),FI=e=>{let{theme:t,classGroups:n}=e;return II(n,t)},II=(e,t)=>{let n=OI();for(let r in e){let i=e[r];LI(i,n,r,t)}return n},LI=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];RI(i,t,n,r)}},RI=(e,t,n,r)=>{if(typeof e==`string`){zI(e,t,n);return}if(typeof e==`function`){BI(e,t,n,r);return}VI(e,t,n,r)},zI=(e,t,n)=>{let r=e===``?t:HI(t,e);r.classGroupId=n},BI=(e,t,n,r)=>{if(UI(e)){LI(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(DI(n,e))},VI=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];LI(o,HI(t,a),n,r)}},HI=(e,t)=>{let n=e,r=t.split(kI),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=OI(),n.nextPart.set(t,i)),n=i}return n},UI=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,WI=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)}}},GI=`!`,KI=`:`,qI=[],JI=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),YI=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===KI){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(GI)?(c=s.slice(0,-1),l=!0):s.startsWith(GI)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return JI(t,l,c,u)};if(t){let e=t+KI,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):JI(qI,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},XI=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}},ZI=e=>({cache:WI(e.cacheSize),parseClassName:YI(e),sortModifiers:XI(e),postfixLookupClassGroupIds:QI(e),...MI(e)}),QI=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},$I=/\s+/,eL=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split($I),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?_+GI:_,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},tL=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=nL(n))&&(i&&(i+=` `),i+=r);return i},nL=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=nL(e[r]))&&(n&&(n+=` `),n+=t);return n},rL=(e,...t)=>{let n,r,i,a,o=o=>(n=ZI(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=eL(e,n);return i(e,a),a};return a=o,(...e)=>a(tL(...e))},iL=[],aL=e=>{let t=t=>t[e]||iL;return t.isThemeGetter=!0,t},oL=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cL=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uL=/\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$/,dL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mL=e=>cL.test(e),hL=e=>!!e&&!Number.isNaN(Number(e)),gL=e=>!!e&&Number.isInteger(Number(e)),_L=e=>e.endsWith(`%`)&&hL(e.slice(0,-1)),vL=e=>lL.test(e),yL=()=>!0,bL=e=>uL.test(e)&&!dL.test(e),xL=()=>!1,SL=e=>fL.test(e),CL=e=>pL.test(e),wL=e=>!Q(e)&&!$(e),TL=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)),EL=e=>VL(e,GL,xL),Q=e=>oL.test(e),DL=e=>VL(e,KL,bL),OL=e=>VL(e,qL,hL),kL=e=>VL(e,YL,yL),AL=e=>VL(e,JL,xL),jL=e=>VL(e,UL,xL),ML=e=>VL(e,WL,CL),NL=e=>VL(e,XL,SL),$=e=>sL.test(e),PL=e=>HL(e,KL),FL=e=>HL(e,JL),IL=e=>HL(e,UL),LL=e=>HL(e,GL),RL=e=>HL(e,WL),zL=e=>HL(e,XL,!0),BL=e=>HL(e,YL,!0),VL=(e,t,n)=>{let r=oL.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},HL=(e,t,n=!1)=>{let r=sL.exec(e);return r?r[1]?t(r[1]):n:!1},UL=e=>e===`position`||e===`percentage`,WL=e=>e===`image`||e===`url`,GL=e=>e===`length`||e===`size`||e===`bg-size`,KL=e=>e===`length`,qL=e=>e===`number`,JL=e=>e===`family-name`,YL=e=>e===`number`||e===`weight`,XL=e=>e===`shadow`,ZL=rL(()=>{let e=aL(`color`),t=aL(`font`),n=aL(`text`),r=aL(`font-weight`),i=aL(`tracking`),a=aL(`leading`),o=aL(`breakpoint`),s=aL(`container`),c=aL(`spacing`),l=aL(`radius`),u=aL(`shadow`),d=aL(`inset-shadow`),f=aL(`text-shadow`),p=aL(`drop-shadow`),m=aL(`blur`),h=aL(`perspective`),g=aL(`aspect`),_=aL(`ease`),v=aL(`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=()=>[mL,`full`,`auto`,...w()],ee=()=>[gL,`none`,`subgrid`,$,Q],E=()=>[`auto`,{span:[`full`,gL,$,Q]},gL,$,Q],D=()=>[gL,`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`],O=()=>[`auto`,...w()],ie=()=>[mL,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ae=()=>[mL,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],k=()=>[mL,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,$,Q],oe=()=>[...b(),IL,jL,{position:[$,Q]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,LL,EL,{size:[$,Q]}],le=()=>[_L,PL,DL],ue=()=>[``,`none`,`full`,l,$,Q],de=()=>[``,hL,PL,DL],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[hL,_L,IL,jL],he=()=>[``,`none`,m,$,Q],ge=()=>[`none`,hL,$,Q],_e=()=>[`none`,hL,$,Q],ve=()=>[hL,$,Q],ye=()=>[mL,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[vL],breakpoint:[vL],color:[yL],container:[vL],"drop-shadow":[vL],ease:[`in`,`out`,`in-out`],font:[wL],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[vL],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[vL],shadow:[vL],spacing:[`px`,hL],text:[vL],"text-shadow":[vL],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,mL,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[TL],columns:[{columns:[hL,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:[gL,`auto`,$,Q]}],basis:[{basis:[mL,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[hL,mL,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,hL,$,Q]}],shrink:[{shrink:[``,hL,$,Q]}],order:[{order:[gL,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"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:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ie()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...k()]}],"min-block-size":[{"min-block":[`auto`,...k()]}],"max-block-size":[{"max-block":[`none`,...k()]}],w:[{w:[s,`screen`,...ie()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ie()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ie()]}],h:[{h:[`screen`,`lh`,...ie()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ie()]}],"max-h":[{"max-h":[`screen`,`lh`,...ie()]}],"font-size":[{text:[`base`,n,PL,DL]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,BL,kL]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,_L,Q]}],"font-family":[{font:[FL,AL,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":[hL,`none`,$,OL]}],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:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[hL,`from-font`,`auto`,$,DL]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[hL,`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:[gL,$,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:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},gL,$,Q],radial:[``,$,Q],conic:[gL,$,Q]},RL,ML]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[hL,$,Q]}],"outline-w":[{outline:[``,hL,PL,DL]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`none`,u,zL,NL]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,zL,NL]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[hL,DL]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,zL,NL]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[hL,$,Q]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"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":[hL]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[hL]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:he()}],brightness:[{brightness:[hL,$,Q]}],contrast:[{contrast:[hL,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,zL,NL]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,hL,$,Q]}],"hue-rotate":[{"hue-rotate":[hL,$,Q]}],invert:[{invert:[``,hL,$,Q]}],saturate:[{saturate:[hL,$,Q]}],sepia:[{sepia:[``,hL,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[hL,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[hL,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,hL,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[hL,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,hL,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[hL,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[hL,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,hL,$,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:[hL,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[hL,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[gL,$,Q]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,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":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"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`,...A()]}],"stroke-w":[{stroke:[hL,PL,DL,OL]}],stroke:[{stroke:[`none`,...A()]}],"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 QL({resolution:e,inputs:t,config:n,bailReason:r}){if(e===null||t===null)return null;let i=aF[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}=HF(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:ZL(`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:ZL(`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:ZL(`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:ZL(`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 $L(e){return{version:1,buildSha:QF,engineVersion:QF,config:rF,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 eR({resolution:e,inputs:t,shadowing:n,bailReason:r,engineError:i=null}){let[a,o]=j(!1),s=N(null);if(M(()=>()=>{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($L(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=vI(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(k,{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(k,{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(k,{children:[I(`dt`,{class:`text-error opacity-80`,children:`dropped`}),I(`dd`,{class:`text-error`,children:l.join(`, `)})]}),r!==null&&I(k,{children:[I(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),I(`dd`,{class:`text-warning`,children:r})]}),i!==null&&I(k,{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 tR={effect:mI,animate:!1},nR=Bt(tR),rR={presence:{phase:`connecting`},localId:null,isScreenSharing:!1,isPersonaPresenting:!1,hasPersonaVideo:!1,hasSelfView:!1};function iR(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 aR(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&&iR(e.replica,t.replica)&&iR(e.selfView,t.selfView)&&iR(e.content,t.content)}var oR=new Map,sR=new Set;function cR({instances:e,viewport:t,callControlsBandPx:n,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}){let c=nI(o,s)&&r!==void 0,l=r??rR,u=globalThis.location?.search??``,d=uI({kioskMode:P(()=>rI(u),[u]),instances:e,viewport:t,presence:l,callControlsBandPx:n,callControlsVisible:i,callControlsRect:a,enabled:c}),f=c?sI.value:null,p=f===null?fI(d.resolution,l,c):`engine-error`;TI({enabled:c,enabledVia:xI(eI,o===!0,s===!0),bail:p,resolution:d.resolution,engineError:f});let m=N(!1);l.presence.phase===`ready`?l.hasPersonaVideo&&(m.current=!0):m.current=!1;let h=!m.current,g;try{g=hI(d.resolution,p,h)}catch(e){cI(e),g=mI}let _=N(mI),v=_I(_.current,g);M(()=>{_.current=g,aR(nR.peek().effect,g)||(nR.value={effect:g,animate:v})}),M(()=>()=>{lI(),nR.peek()!==tR&&(nR.value=tR)},[]);let y=d.resolution,b=P(()=>{if(p!==null||y===null)return oR;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 cI(e),oR}},[p,y]),x=P(()=>p!==null||y===null?sR:new Set(y.tiles.filter(dI).map(e=>e.id)),[p,y]),S=tI?I(`div`,{class:`contents`,"data-grid-debug":!0,children:[I(QL,{resolution:d.resolution,inputs:d.inputs,config:rF,bailReason:p}),I(`div`,{class:`pointer-events-none absolute bottom-4 left-4 z-50`,children:I(eR,{resolution:d.resolution,inputs:d.inputs,shadowing:p!==null,bailReason:p,engineError:f})})]}):null;return{cardRects:b,kioskCardIds:x,sheetBottomPx:pI(y,p),animate:v,recordNaturalHeight:d.recordNaturalHeight,debug:S}}var lR=[`left`,`top`,`width`,`height`].map(e=>`${e} ${VC}`).join(`, `);function uR(e,t){return{left:`${e.x}px`,top:`${e.y}px`,width:`${e.width}px`,height:`${e.height}px`,transition:t&&!ZC()?lR:`none`}}function dR({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(fR,{label:`iframe`,value:e.iframeLifecycleState}),I(fR,{label:`post`,value:e.lastInteractionPostResult}),I(fR,{label:`context`,value:e.lastModelContextUpdate}),I(fR,{label:`error`,value:e.lastError}),I(pR,{label:`tool_call`,value:e.lastToolCall}),I(pR,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function fR({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 pR({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 mR=1e3,hR=5e3,gR=1200,_R=[2e3,6e3];async function vR(e,t,n){let r=new AbortController,i=globalThis.setTimeout(()=>r.abort(),hR);try{await Sn(e,t,n,{signal:r.signal})}finally{globalThis.clearTimeout(i)}}function yR(e){return e instanceof vn&&e.status>=400&&e.status<500&&e.status!==408&&e.status!==429}function bR(e,t){console.error(`Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.`,e),t({lastInteractionPostResult:`error`,lastError:qR(e).message})}function xR(e,t,n,r){(async()=>{let i;for(let a of _R){await new Promise(e=>setTimeout(e,a));try{await vR(e,t,n),r({lastInteractionPostResult:`recovered`,lastError:void 0});return}catch(e){if(i=e,yR(e))break}}bR(i,r)})()}var SR=2e3;function CR(e){return e.correct_answer===void 0?gR:SR}var wR=48,TR=`allow-scripts`,ER={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`,"canvas.text":`allow-scripts allow-popups allow-popups-to-escape-sandbox`};function DR(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 OR=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{DR(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 kR(e){for(let t of NS)if(e.some(e=>UR(e)===t))return t;return null}function AR({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=WR(),callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}={}){let{client:c}=Hv(),{dataTheme:l,cssVars:u}=tF(),d=yh(),f=Qg(),[p,m]=j([]),[h,g]=zR(),[_,v]=j(()=>({enabled:n,iframeLifecycleState:`idle`})),y=cR({instances:p,viewport:g,callControlsBandPx:72,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}),b=F(e=>{v(t=>({...t,...e}))},[]),x=F((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=P(()=>({theme:l.value===`dark`?`dark`:`light`,cssVars:u.value}),[l.value,u.value]);M(()=>{v(e=>e.enabled===n?e:{...e,enabled:n})},[n]),u_({onAppMessage:F(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=EC(e.data);if(!t)return;m(e=>GS(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:qR(e).message})}},[f,b])});let C=p.map(e=>{let t=QS(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=$S(C.map(({layout:e})=>e),g),T=[...C].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;M(()=>{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 ee=kR(C.map(({layout:e})=>e));M(()=>{t?.(ee)},[t,ee]);let E=p.length>0||_.enabled;return I(`div`,{ref:h,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,children:[E&&T&&I(`div`,{class:`absolute inset-0 bg-black/45`}),E&&!T&&y.sheetBottomPx!==null&&I(`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))`}}),E&&C.map(({instance:e,layout:t,gridRect:n})=>I(MR,{slot:UR(t),safeAreaTop:w.safe_area?.y,frameWidth:g.width,...n?{gridRect:n,gridAnimate:y.animate}:{},children:r=>I(NR,{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)),E&&I(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:I(dR,{state:_})}),y.debug]})}var jR=16;function MR({slot:e,safeAreaTop:t,frameWidth:n,gridRect:r,gridAnimate:i=!1,children:a}){let[o,s]=BR(),c=a(r?r.height:e===`full`?void 0:s);if(r)return I(`div`,{ref:o,class:`pointer-events-auto absolute`,style:uR(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-jR*2):void 0;return I(`div`,{ref:o,class:HR(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:HR(e),"data-canvas-slot":e,children:I(`div`,{class:`contents`,children:c})})}function NR({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=N(null),m=N(null),h=N(e),g=N(r),_=N(320),v=N(i),y=N(a),b=N(o),x=N(-1),S=N(l),C=N(u),w=N(d),T=N(f),[ee,E]=j(720);M(()=>{y.current=a},[a]),M(()=>{_.current=ee,m.current?.setHostContext(LR(y.current,v.current,b.current,h.current,ee,g.current))},[ee]),M(()=>{h.current=e,g.current=r;let t=IR(i,p.current);v.current=t,m.current?.setHostContext(LR(y.current,t,b.current,e,_.current,r))},[e,i,r]),M(()=>{b.current=o,m.current?.setHostContext(LR(y.current,v.current,o,e,_.current,g.current))},[e,o]),M(()=>{S.current=l,C.current=u,w.current=d,T.current=f},[l,u,d,f]),M(()=>{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:qR(e).message})},d=()=>{if(n||!i)return;let e=y.current,t=XS(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 $P(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:LR(a,IR(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,wR),720);E(t),w.current(y.current.id,t)}},f.onmessage=async e=>{let r=KS(e),i=YS(e);if(!r){if(i){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 a=y.current,o=(()=>{try{let e=qS(a,r);return{interaction:e,request:DC(e)}}catch(e){return{error:e}}})();if(`error`in o){let e=qR(o.error).message;return c({lastInteractionPostResult:`error`,lastError:e}),{isError:!0,code:`interaction_normalization_failed`,message:e}}let{interaction:l,request:u}=o,d=!0;try{await vR(t,l.conversation_id,u.body)}catch(e){d=!1,yR(e)?bR(e,c):(console.warn(`Magic Canvas interaction POST failed; continuing without it and retrying in the background.`,e),c({lastInteractionPostResult:`failed_open`,lastError:qR(e).message}),xR(t,l.conversation_id,u.body,c))}if(n)return{};if(i)try{T.current({message_type:`conversation`,event_type:`conversation.respond`,conversation_id:a.conversation_id,properties:{text:i}})}catch(e){console.error(`Magic Canvas respond send failed.`,e),c({lastError:qR(e).message})}return d&&c({lastInteractionPostResult:`success`,lastError:void 0}),JS(l)&&(l.type===`submit`?(s&&clearTimeout(s),s=setTimeout(()=>{s=null,n||S.current()},CR(a.arguments))):S.current()),{}},f.onupdatemodelcontext=async e=>(i=e,o||=setTimeout(()=>{o=null,d()},mR),{}),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(LR(y.current,v.current,b.current,h.current,_.current,g.current)),{mode:t}},f.connect(new OR(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 ee=()=>{f()};return e.addEventListener(`load`,ee),f(),()=>{o&&=(clearTimeout(o),null),s&&=(clearTimeout(s),null),d(),n=!0,e.removeEventListener(`load`,ee),m.current=null,c({iframeLifecycleState:`closed`}),r&&jS(r)}},[t,a.id,a.canvas_config.sandbox_url,c]),M(()=>{a.revision!==0&&(a.revision<=x.current||(x.current=a.revision,m.current?.sendToolInput({arguments:a.arguments}).catch(e=>{c({iframeLifecycleState:`error`,lastError:qR(e).message})})))},[a.arguments,a.revision,c]);let D=o.viable_slot===`full`||o.display_mode===`fullscreen`,te=D?null:RR(ee,e,r),ne=te?.placeholderStyle,re=te?.cardStyle,O=D?{height:`100%`}:te?.iframeStyle??{height:`${ee}px`},ie=[`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`,D?`fixed inset-4 z-10 max-w-none`:n?`max-w-none`:`max-w-md`,s?`scale-[0.98] opacity-40`:``].filter(Boolean).join(` `),ae=ER[a.canvas_config.component]??TR,k=I(`div`,{class:ie,style:re,"data-canvas-card":o.viable_slot,children:I(`iframe`,{ref:p,title:`${a.canvas_config.component} ${a.canvas_config.component_version}`,class:D?`block h-full w-full border-0 bg-transparent`:`block border-0 bg-transparent`,sandbox:ae,style:O})});return D?k:I(`div`,{class:`block w-full`,style:ne,children:k})}var PR=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`];function FR(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of PR){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function IR(e,t){let n=FR(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function LR(e,t,n,r,i,a=!1){let o=OC(t,n),s=n.viable_slot===`full`||n.display_mode===`fullscreen`,c=s?void 0:GR(r),l=s?1:RR(i??0,r,a)?.displayScale??1;return{...e.canvas_config.host_context,...o,containerDimensions:{...KR(o.containerDimensions)?o.containerDimensions:{},...c===void 0?{}:{maxHeight:c},displayScale:l}}}function RR(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 zR(){let e=N(null),[t,n]=j(()=>VR(null));return M(()=>{let t=()=>n(t=>{let n=VR(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 BR(){let e=N(null),[t,n]=j();return M(()=>{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 VR(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 HR(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 UR(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function WR(){return!1}function GR(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function KR(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function qR(e){return e instanceof Error?e:Error(String(e))}var JR=class extends A{state={errored:!1};componentDidCatch(e){this.props.onError(e),this.setState({errored:!0})}render(){return this.state.errored?null:this.props.children}},YR=1e4;function XR(e,t=YR){let[n,r]=j(!1),i=N(!1);return M(()=>{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 ZR(e){let t=rg(),n=C_(t??``),r=!x_(t??``).isOff,i=_S(e),a=i.phase===`ready`?i.replicaId:``,o=x_(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 P(()=>({presence:i,localId:t,isScreenSharing:r,isPersonaPresenting:s,hasPersonaVideo:c,hasSelfView:l}),[i.phase,a,u,t,r,s,c,l])}function QR(e,t,n){let[r,i]=j(!0);return M(()=>{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 $R(e,t,n,r,i){let[a,o]=j(void 0);return M(()=>{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 ez=1e4;function tz({onTimeout:e,timeoutMs:t=ez,active:n=!0}){let r=gS().length>0,[i,a]=j(!1),o=N(e);return M(()=>{o.current=e},[e]),M(()=>{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 nz(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function rz({onShutdown:e}){let t=N(e);M(()=>{t.current=e},[e]),u_({onAppMessage:F(e=>{nz(e?.data)&&t.current()},[])})}var iz=hn(`PiP`),az=360,oz=280;function sz(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window}function cz(e){let{enabled:t,active:n}=e,[r,i]=j(null),a=sz(),o=st(uy),s=F(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=F(async()=>{if(a&&!(!t||!n)&&!(r&&!r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:az,height:oz}),t=Ue.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){iz.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return M(()=>{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){iz.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),r.push(t)}catch(e){iz.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]),M(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),M(()=>()=>{r&&!r.closed&&r.close()},[r]),M(()=>{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 lz=Bt(null),uz={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},dz=_a(({id:e,showAudioWave:t=!0})=>{let n=C_(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(_g,{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(lS,{id:e})})]})}),fz=_a(()=>{let e=rg(),{isScreenSharing:t}=Sx(),n=gS()[0];return I(k,{children:[t&&n&&I(dz,{id:n}),e&&I(dz,{id:e,showAudioWave:!1})]})}),pz=_a(()=>I(`div`,{class:`absolute bottom-4 @max-mobile:bottom-20 left-4 flex flex-col items-end gap-2 z-20`,children:I(fz,{})})),mz=_a(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,effect:i,animate:a})=>I(k,{children:[I(`div`,{class:`absolute inset-0 bg-base-200`}),i.content&&I(`div`,{class:`absolute overflow-hidden rounded-box bg-black`,style:uR(i.content,a),children:I(_g,{sessionId:n?t??``:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 h-full w-full object-contain`})}),i.replica&&I(`div`,{class:ZL(`absolute overflow-hidden`,i.replicaCollapsed&&`rounded-box`),style:uR(i.replica,a),children:I(xS,{personaSessionId:e,localSessionId:t,isScreenSharing:!1,avatarOff:r})})]})),hz=_a(()=>{let{effect:e,animate:t}=nR.value,n=rg();return n===null||e.selfView===null?null:I(`div`,{class:`absolute z-20 overflow-hidden rounded-box bg-black/30`,style:uR(e.selfView,t),children:I(_g,{automirror:!0,sessionId:n,type:`video`,fit:`cover`,className:`h-full w-full object-cover`})})}),gz=_a(({canvasRenderedSlot:e})=>{let t=gI(nR.value.effect);return t===`hidden`?null:t===`engine`?I(JR,{onError:cI,children:I(hz,{})}):e===`safe-area-bottom`?null:I(pz,{})}),_z=_a(()=>{let e=gS()[0];return e?I(hg,{sessionId:e}):null}),vz=_a(e=>I(k,{children:[I(_z,{}),I(yz,{...e})]})),yz=_a(({isAudioOnly:e,presence:t,canvasLayoutEffect:n,canvasRenderedSlot:r})=>{let{presence:i,localId:a,isScreenSharing:o,isPersonaPresenting:s}=t,c=nR.value,l=n.active&&!o&&(!e||s);return i.phase===`left`?I(sS,{}):i.phase===`connecting`?I(oS,{}):e&&!s?I(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:I(pS,{sessionId:i.replicaId})}):c.effect.driving?I(JR,{onError:cI,children:I(mz,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,effect:c.effect,animate:c.animate})}):s?I(sw,{personaSessionId:i.replicaId,isAudioOnly:e,avatarOff:i.videoState.isOff,canvasLayoutEffect:n,smartSidecarActive:l}):I(bz,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,smartSidecarActive:l,canvasLayoutEffect:n,canvasRenderedSlot:r})}),bz=_a(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,smartSidecarActive:i,canvasLayoutEffect:a,canvasRenderedSlot:o})=>I(aw,{canvasLayoutEffect:a,smartSidecarActive:i,isScreenSharing:n,captureSnapshot:wz,personaMode:`auto`,renderedSlot:o,fill:i=>I(xS,{personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})})),xz=_a(({items:e})=>{let[t,n]=j(!1),r=N(null);return M(()=>{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(Ab,{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})]})}),Sz=_a(({items:e})=>e.length<=1?I(k,{children:e}):I(xz,{items:e})),Cz=_a(({onLeave:e})=>{let t=Qg(),{config:n}=Hv(),{session:r,end:i}=qx(),a=rg(),o=N(null),s=st(xy)?.frameRef??o,[c,l]=j(!1),u=Qb()===`full-screen`,[d,f]=j(!1),[p,m]=j(uz),[h,g]=j(null),_=n.value.customization.conversation,v=XR(_.show_fullscreen_hint&&h!==null&&!c&&!u),y=N(null),b=N(null),x=r.value?.conversationUrl,S=r.value?.magicGrid===!0,C=nI(_.magic_grid,S),w=QR(y,C,x),T=$R(y,b,72,C,x),ee=_.modality===`audio`,E=ZR(ee),D=_.modality===`chat`,te=_.modality===`video`,ne=_.enable_chat,re=_.enable_closed_captions,O=_.enable_picture_in_picture,{pipWindow:ie}=cz({enabled:O&&!D,active:t===`joined-meeting`});M(()=>()=>{i()},[i]);let{camera:ae,requestCamera:k}=ny(),{isCamMuted:A}=bx(),oe=ae.isGranted&&!A;M(()=>{te&&t===`joined-meeting`&&(lz.value=oe)},[te,t,oe]);let se=N(te&&!a&&lz.value===!0);M(()=>{t===`joined-meeting`&&se.current&&(se.current=!1,k())},[t,k]),M(()=>{(t===`left-meeting`||t===`error`)&&e()},[t,e]),M(()=>{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 ce=F(()=>{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?.()},[]);F(()=>{f(e=>!e)},[]);let le=F(()=>{i()},[i]);if(tz({active:!D&&t===`joined-meeting`,onTimeout:le}),rz({onShutdown:le}),!x)return null;if(D)return I(eS,{defaultOpen:!0,children:I(`div`,{class:`cvi-call-surface absolute inset-0`,children:I(iS,{docked:!0,headerAction:I(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle text-base-content/60 hover:text-error`,onClick:le,"aria-label":`Leave conversation`,children:I(Ab,{name:`leave`,size:20,"aria-label":`Leave conversation`})})})})});let ue=[I(Kx,{compact:!0},`screen-share`)];ne&&ue.push(I(nS,{compact:!0},`chat`));let de=t===`left-meeting`;return I(Yx,{children:I(eS,{children:I(kx,{children:[I(`div`,{class:`cvi-call-surface absolute inset-0${ee?``:` cvi-video-surface`}`,ref:y,children:[I(`div`,{class:`relative w-full h-full z-[5]`,children:[I(vz,{isAudioOnly:ee,presence:E,canvasLayoutEffect:p,canvasRenderedSlot:h}),!ee&&I(gz,{canvasRenderedSlot:h}),I(AR,{debugEnabled:d,callPresence:E,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":de,"data-pinned":v,children:I(cS,{active:c,onToggle:ce,nudge:v,compact:!0})})]}),I(iS,{}),I(Qx,{}),I(`div`,{class:`cvi-autohide cvi-autohide-slide pointer-events-none absolute bottom-6 left-0 right-0 z-20`,"data-hidden":de,"aria-hidden":de,children:I(`div`,{class:`cvi-control-rail flex justify-center items-center gap-2 @max-mobile:gap-1`,"data-hidden":de,ref:b,children:[I(Vx,{level:!0}),!ee&&I(Ux,{}),re&&I(Zx,{}),I(Sz,{items:ue}),I(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:le,"aria-label":`Leave call`,children:I(Ab,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),ie&&Pa(I(yS,{onLeave:le}),ie.document.body)]})})})});function wz(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 Tz(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 Ez=_a(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=yh(),{config:a}=Hv(),{cameraOnStart:o}=st(bt),{localSessionId:s,isCamMuted:c}=bx(),{mic:l,camera:u,requestMic:d,requestCamera:f}=ny(),p=a.value.customization.conversation.modality===`video`,m=Fb(a.value),h=Pb(a.value);M(()=>{d()},[]);let g=l.isGranted,_=N(!1);M(()=>{!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=Tz(e,l.status,v);return I(kx,{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(_g,{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(Bb,{variant:m.background,replica:h}),I(`div`,{class:`${lx} 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(ex,{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(Vx,{level:!0}),p&&I(Ux,{})]}),I(Wb,{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(Ab,{name:`cancel`})})]})]})]})})}),Dz=`Password required`,Oz=`Enter the password to start this conversation.`,kz=`Password`,Az=`Continue`;function jz({onSubmit:e,text:t,isSubmitting:n=!1,errorMessage:r}){let[i,a]=j(``),o=lt();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??Dz}),I(`p`,{class:`text-sm text-base-content/70`,children:t?.description??Oz}),I(`input`,{id:o,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:t?.placeholder??kz,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(Wb,{class:`btn-primary`,type:`submit`,disabled:!i.trim(),loading:n,children:t?.submit??Az})]})})})}function Mz({text:e,onStart:t,isStarting:n,permissionRequest:r}){let{config:i,deploymentId:a}=Hv(),o=Qb()===`full-screen`,s=st(vv),c=Fb(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=P(()=>p&&q_(a,u),[p,a,u]),h=p&&!m,g=i.value.has_password===!0,_=s?.password.value??null,v=g&&!_,y=lt(),[b,x]=j(m),S=n||p&&!b||v;return I(dx,{title:c.title,description:c.description,overlay:v&&s?I(jz,{onSubmit:s.setPassword}):null,children:[I(`div`,{class:`relative`,children:[r&&I(ex,{message:$b(r),class:`absolute bottom-full mb-3 z-20 ${o?`left-1/2 -translate-x-1/2`:`right-0`}`}),I(mx,{onClick:()=>{p&&b&&!m&&X_(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 Nz(...e){for(let t of e){let e=t?.trim();if(e)return e}}function Pz(){let{config:e}=Hv(),{haircheck:t}=e.value.customization;return P(()=>({prompt:Nz(t.permission_request_description,t.permission_request_title),ready:Nz(t.permission_granted_description,t.permission_granted_title),denied:Nz(t.permission_denied_description,t.permission_denied_title),join:Nz(t.join_button),cancel:Nz(t.cancel_btn)}),[t])}function Fz({flow:e,welcomeText:t,onUnavailableCancel:n}){let r=Pz();switch(e.state){case`idle`:return I(Mz,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting,permissionRequest:e.permissionRequest});case`haircheck`:return I(Ez,{text:r,onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return I(Cz,{onLeave:()=>e.leave()});case`ended`:return I(yx,{isStarting:e.isStarting,permissionRequest:e.permissionRequest,onRestart:()=>{e.start()}});case`unavailable`:return I(Xb,{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)}`)}}}var Iz=Ae(null);function Lz({children:e}){let{config:t}=st(vi),n=t.peek().customization?.widget,r=n?.expandable??`default`,i=sn(r===`start-expanded`||r===`always`),a=sn(n?.variant??`full`),o=sn(n?.position??`bottom-right`),s=sn(r),c=sn(n?.avatar?.type??`orb`),l=N(r);mn(()=>{let e=t.value.customization?.widget,n=e?.expandable??`default`;a.value=e?.variant??`full`,o.value=e?.position??`bottom-right`,s.value=n,c.value=e?.avatar?.type??`orb`,l.current!==n&&(i.value=n===`start-expanded`||n===`always`,l.current=n)});let u=F(()=>{s.peek()!==`always`&&(i.value=!i.peek())},[i,s]),d=F(()=>{i.value=!0},[i]),f=F(()=>{s.peek()!==`always`&&(i.value=!1)},[i,s]),p=st(Bv);mn(()=>{p&&(p.hostVisible.value=i.value)});let m=st(R_),h=m?.flowSignal.value??`idle`,g=m?.isStarting??!1;M(()=>{(g||h===`haircheck`||h===`call`)&&(i.value=!0)},[g,h,i]);let _=st(sy)?.shadowHost.value??null;M(()=>{if(_)return Object.assign(_,{open:d,close:f}),()=>{delete _.open,delete _.close}},[_,d,f]);let v=P(()=>({expanded:i,variant:a,position:o,expandable:s,avatarType:c,toggle:u,expand:d,collapse:f}),[i,a,o,s,c,u,d,f]);return I(Iz.Provider,{value:v,children:e})}function Rz(){let{config:e}=Hv(),t=e.value.customization.branding;return e.value.show_tavus_branding!==!1&&!t?.hide_tavus_badge?I(zz,{}):t?.logo||t?.text?I(Bz,{logo:t.logo,text:t.text}):null}function zz(){let{isDark:e}=tF(),t=e.value?`white`:`#140206`;return I(`a`,{href:`https://tavus.io`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center gap-1 text-xs text-base-content/50 hover:text-base-content/80 transition-colors`,children:[I(`svg`,{viewBox:`0 0 488 452`,class:`h-2.5 w-2.5 shrink-0`,fill:`none`,"aria-hidden":`true`,children:[I(`path`,{d:`M160 152V208H104V152H160Z`,fill:t}),I(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M488 270.5L436 285L451 326L418.766 346L441 360L423 392L435 452H0V0H394.766L488 270.5ZM24 24V428H216.2L209 392L227 360L204.766 346L237 326L222 285L274 270.5L189.038 24H24ZM352 152C336.536 152 324 164.536 324 180C324 195.464 336.536 208 352 208C367.464 208 380 195.464 380 180C380 164.536 367.464 152 352 152Z`,fill:t})]}),I(`span`,{children:[`Powered by `,I(`span`,{class:`underline`,children:`Tavus`})]})]})}function Bz({logo:e,text:t}){return I(`div`,{class:`inline-flex items-center gap-1 text-xs text-base-content/50`,children:[e?I(`img`,{src:e,alt:t||`Branding`,class:`h-2.5 shrink-0`}):null,t?I(`span`,{children:t}):null]})}var Vz={title:`Hi! Want to chat?`,btn_title:`Start conversation`};function Hz(){let{config:e}=Hv(),t=e.value.customization.widget?.text;return P(()=>({title:t?.title||Vz.title,btn_title:t?.btn_title||Vz.btn_title}),[t])}function Uz(){let e=st(Iz);if(!e)throw Error(`useWidgetUI must be used within WidgetUIProvider`);return e}var Wz={xs:`w-6 h-6`,sm:`w-8 h-8`,md:`w-10 h-10`,lg:`w-16 h-16`},Gz={xs:`w-3 h-3`,sm:`w-4 h-4`,md:`w-5 h-5`,lg:`w-8 h-8`};function Kz({size:e=`md`,className:t=``}){let{avatarType:n}=Uz(),{config:r}=Hv(),i=Pb(r.value);return(Fb(r.value).background.type===`replica`||n.value===`image`)&&i?I(`div`,{class:`relative ${Wz[e]} rounded-box overflow-hidden bg-base-300 ${t}`,children:I(zb,{replica:i})}):I(`div`,{class:`relative ${Wz[e]} rounded-box bg-primary/15 flex items-center justify-center ${t}`,children:I(`span`,{class:`${Gz[e]} rounded-full bg-primary animate-pulse`})})}function qz({variant:e}){let{toggle:t}=Uz(),n=Hz();return e===`tiny`?I(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`rounded-box overflow-hidden shadow-xl hover:shadow-2xl transition-shadow cursor-pointer`,children:I(Kz,{size:`lg`})}):e===`compact`?I(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`group flex items-center gap-2.5 py-2.5 pl-2.5 pr-8 rounded-box bg-base-100 text-base-content border border-base-300 shadow-lg hover:shadow-xl transition-shadow cursor-pointer text-left`,children:[I(Kz,{size:`md`}),I(`span`,{class:`flex flex-col gap-0.5`,children:[I(`span`,{class:`text-base font-medium leading-tight`,children:n.title}),I(`span`,{class:`text-sm text-base-content/60 leading-tight`,children:n.btn_title})]})]}):I(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`flex flex-col gap-3 p-3 w-64 rounded-box bg-base-100 text-base-content border border-base-300 shadow-xl hover:shadow-2xl transition-shadow cursor-pointer text-left`,children:[I(`div`,{class:`flex items-center gap-2.5`,children:[I(Kz,{size:`md`}),I(`span`,{class:`text-sm font-medium leading-snug`,children:n.title})]}),I(`span`,{class:`btn btn-primary btn-sm w-full pointer-events-none gap-2 flex items-center`,children:[I(Ab,{name:`cam`,size:16}),I(`span`,{className:`leading-4`,children:n.btn_title})]})]})}var Jz=`tavus:widget:greeting-dismissed`;function Yz({anchor:e}){let t=Hz(),{variant:n,expand:r}=Uz(),[i,a]=j(!1);M(()=>{if(n.value===`tiny`){try{if(sessionStorage.getItem(Jz)===`1`)return}catch{}a(!0)}},[n]);let o=F(e=>{e.stopPropagation();try{sessionStorage.setItem(Jz,`1`)}catch{}a(!1)},[]);if(!i)return null;let s=e===`right`?`right-[-6px] border-r border-b`:`left-[-6px] border-l border-t`,c=e===`right`?`-right-2`:`-left-2`;return I(`button`,{type:`button`,onClick:r,class:`relative max-w-56 rounded-box bg-base-100 text-base-content shadow-lg border border-base-300 px-3 py-2 text-sm text-left cursor-pointer animate-[tavusFadeUp_240ms_ease-out] hover:bg-base-200 transition-colors`,children:[I(`p`,{class:`leading-snug pr-3`,children:t.title}),I(`span`,{role:`button`,tabIndex:0,onClick:o,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&o(e)},class:`absolute -top-2 ${c} btn btn-ghost btn-circle btn-xs bg-base-100 border border-base-300 shadow-sm`,"aria-label":`Dismiss`,children:`×`}),I(`span`,{class:`absolute bottom-3 w-3 h-3 rotate-45 bg-base-100 border-base-300 ${s}`})]})}function Xz(){let e=st(sy);if(!e)throw Error(`useHostBridge must be used within HostBridgeProvider`);return e}var Zz=`bg-base-100 text-base-content rounded-box border border-base-300 shadow-xl w-[22rem] flex flex-col animate-[tavusPopIn_180ms_ease-out]`,Qz=`bg-base-100 text-base-content w-[100vw] h-[100dvh] flex flex-col animate-[tavusFadeUp_180ms_ease-out]`,$z=`p-1 flex-1 min-h-0`,eB=`p-1 flex-1 min-h-0`;function tB({variant:e,children:t,onClose:n,fullscreen:r}){let{expandable:i}=Uz(),a=i.value!==`always`;return r?I(`div`,{class:Qz,children:[I(`div`,{class:`flex items-center justify-end gap-2 px-2.5 py-1.5 border-b border-base-300`,children:a&&I(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:n,"aria-label":`Close`,children:I(Ab,{name:`close`,size:14})})}),I(`div`,{class:eB,children:t}),I(`div`,{class:`flex justify-end px-2.5`,children:I(Rz,{})})]}):I(`div`,{class:`flex flex-col h-[min(34rem,calc(100dvh-3rem))]`,children:[I(`div`,{class:`${Zz} flex-1 overflow-hidden`,children:[I(`div`,{class:`flex items-center justify-end gap-2 px-2.5 pt-1.5 shrink-0`,children:a&&I(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:n,"aria-label":`Close`,children:I(Ab,{name:`close`,size:14})})}),I(`div`,{class:$z,children:t})]}),I(`div`,{class:`flex justify-end pr-2 pt-1.5 shrink-0`,children:I(Rz,{})})]})}var nB=hn(`Widget`),rB=`1rem`,iB=480;function aB(e,t,n){let r=e.state===`call`,i=r||e.state===`haircheck`||e.isStarting;e.cancel(),r&&e.leave(),i&&t(),n()}function oB(){return typeof window>`u`?!1:window.innerWidth<=iB}function sB(e){switch(e){case`bottom-right`:return{bottom:rB,right:rB};case`bottom-left`:return{bottom:rB,left:rB};case`top-right`:return{top:rB,right:rB};case`top-left`:return{top:rB,left:rB};case`top`:return{top:rB,left:`50%`,transform:`translateX(-50%)`};case`bottom`:return{bottom:rB,left:`50%`,transform:`translateX(-50%)`}}}var cB=[`top`,`bottom`,`left`,`right`,`transform`];function lB(e){return e===`bottom-left`||e===`top-left`?`left`:`right`}function uB(){let{config:e,initError:t}=Hv(),n=Hz(),{expanded:r,position:i,variant:a,collapse:o}=Uz(),{end:s}=qx(),{shadowHost:c}=Xz(),l=Zb(),u=sn(oB());M(()=>{if(typeof window>`u`)return;u.value=oB();let e=()=>{u.value=oB()};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[u]);let d=P(()=>({fallback_button:n.btn_title}),[n.btn_title]),f=F(()=>{aB(l,s,o)},[l,s,o]);if(mn(()=>{let e=c.value,t=i.value,n=r.value,a=n&&u.value;if(e){if(a)e.style.top=`0`,e.style.right=`0`,e.style.bottom=`0`,e.style.left=`0`,e.style.transform=``;else{let n=sB(t);for(let t of cB)e.style[t]=n[t]??``}e.dataset.tavusWidgetPosition=t,e.dataset.tavusWidgetExpanded=n?`true`:`false`,e.dataset.tavusWidgetFullscreen=a?`true`:`false`,e.dataset.tavusWidgetSmall=u.value?`true`:`false`}}),t.value)return nB.error(`Widget cannot initialize (init request failed):`,t.value),null;if(e.value.is_available===!1&&e.value.unavailable_reason===`total_limit`)return nB.error(`Widget is unavailable (total_limit reached) — not rendering`),null;if(!r.value){let e=lB(i.value),t=e===`right`?`flex items-end gap-2 justify-end`:`flex items-end gap-2 flex-row-reverse justify-end`,n=e===`right`?`justify-end pr-2`:`justify-start pl-2`;return I(`div`,{class:`flex flex-col`,children:[I(`div`,{class:t,children:[I(Yz,{anchor:e}),I(qz,{variant:a.value})]}),I(`div`,{class:`flex ${n} pt-1.5`,children:I(Rz,{})})]})}return e.value.is_available===!1?I(tB,{variant:a.value,fullscreen:u.value,onClose:f,children:I(Sy,{children:I(Xb,{cause:e.value.unavailable_reason??`daily_limit`,canRetry:!1,onRetry:()=>{}})})}):I(tB,{variant:a.value,fullscreen:u.value,onClose:f,children:I(Sy,{children:I(Fz,{flow:l,welcomeText:d,onUnavailableCancel:()=>l.restart()})})})}var dB=`:host {
|
|
165
|
+
- "app": Tool callable by the app from this server only`),csp:vT().optional(),permissions:vT().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 Xk=Y({method:X(`ui/download-file`),params:Y({contents:J(bT([wO,TO])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Zk=Y({method:X(`ui/message`),params:Y({role:X(`user`).describe(`Message role, currently only "user" is supported.`),content:J(EO).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:Lk.optional().describe(`CSP configuration from resource metadata.`),permissions:Rk.optional().describe(`Sandbox permissions from resource metadata.`)})}),Y({method:X(`ui/notifications/tool-result`),params:FO.describe(`Standard MCP tool execution result.`)});var Qk=Y({toolInfo:Y({id:tD.optional().describe(`JSON-RPC id of the tools/call request.`),tool:MO.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Mk.optional().describe(`Current color theme preference.`),styles:Vk.optional().describe(`Style configuration for theming the app.`),displayMode:Nk.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:J(Nk).optional().describe(`Display modes the host supports.`),containerDimensions:bT([Y({height:q().describe(`Fixed container height in pixels.`)}),Y({maxHeight:bT([q(),hT()]).optional().describe(`Maximum container height in pixels.`)})]).and(bT([Y({width:q().describe(`Fixed container width in pixels.`)}),Y({maxWidth:bT([q(),hT()]).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:bT([X(`web`),X(`desktop`),X(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Y({touch:mT().optional().describe(`Whether the device supports touch input.`),hover:mT().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:Qk.describe(`Partial context update containing only changed fields.`)});var $k=Y({method:X(`ui/update-model-context`),params:Y({content:J(EO).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:CT(K(),_T().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),eA=Y({method:X(`ui/initialize`),params:Y({appInfo:gD.describe(`App identification (name and version).`),appCapabilities:Kk.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:gD.describe(`Host application identification and version.`),hostCapabilities:Gk.describe(`Features and capabilities provided by the host.`),hostContext:Qk.describe(`Rich context about the host environment.`)}).passthrough();var tA=[jk],nA=class extends Ak{_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:zk,sandboxready:Ik,initialized:qk,requestteardown:Wk,loggingmessage:UO};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(eA,e=>this._oninitialize(e)),this.setRequestHandler(ED,(e,t)=>(this.onping?.(e.params,t),{})),this.replaceRequestHandler(Jk,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(Zk,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(Fk,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(Xk,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(Jk,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($k,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(LO,async(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}set oncreatesamplingmessage(e){this.setRequestHandler(ZO,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($D,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(tO,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(aO,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(gO,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:tA.includes(t)?t:jk,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];rA(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},Hk,t)}sendResourceTeardown=this.teardownResource;callTool(e,t){return this.request({method:`tools/call`,params:e},FO,t)}listTools(e,t){return this.request({method:`tools/list`,params:e},PO,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},FO,{signal:t.signal}),e.tools.listChanged&&this._client.setNotificationHandler(RO,e=>this.sendToolListChanged(e.params))),e.resources&&(this.onlistresources=async(e,t)=>this._client.request({method:`resources/list`,params:e},eO,{signal:t.signal}),this.onlistresourcetemplates=async(e,t)=>this._client.request({method:`resources/templates/list`,params:e},nO,{signal:t.signal}),this.onreadresource=async(e,t)=>this._client.request({method:`resources/read`,params:e},oO,{signal:t.signal}),e.resources.listChanged&&this._client.setNotificationHandler(sO,e=>this.sendResourceListChanged(e.params))),e.prompts&&(this.onlistprompts=async(e,t)=>this._client.request({method:`prompts/list`,params:e},_O,{signal:t.signal}),e.prompts.listChanged&&this._client.setNotificationHandler(kO,e=>this.sendPromptListChanged(e.params)))}return super.connect(e)}};function rA(e,t){return JSON.stringify(e)===JSON.stringify(t)}function iA(){let e=P(lm);if(!e)throw Error(`useTheme must be used within ThemeProvider`);return e}var aA={committedClass:null,pendingClass:null,pendingSinceMs:null,lastResolution:null},oA={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 sA(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 cA={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}]}},lA={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`}}},uA={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 dA(e,t,n=cA,r=lA,i=!0,a=!1){let o=a&&r===lA&&e===`conversation-canvas`&&t.composition===`stacked`&&t.width!==`compact`?`canvas-kiosk-overlay`:t.composition!==void 0&&r===lA?uA[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 fA(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 pA={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}},mA={minWidthPx:240,sizeClass:()=>`M`,estimateHeightPx:e=>e.coldDefaultHeightPx??320},hA=`canvas.`;function gA(e){return e.startsWith(hA)?e.slice(7):e}function _A(e,t){let n=gA(e),r=pA[n]??mA,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(pA);function vA(e,t,n){let r=_A(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 yA(e,t){let n=gA(e);return pA[n]===void 0?(t?.[n]??t?.[e])?.hardMinHeightPx:_A(e,t).hardMinHeightPx}function bA(e,t){return _A(e,t).minWidthPx}function xA(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 SA(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 CA(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 wA(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 TA(e,t,n){let r=[],i=e.find(e=>e.kind===`replica`),a=e=>e.kind===`selfView`&&e.layer===`overlay`&&i!==void 0&&wA(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&&!wA(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:yA(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:bA(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&&CA(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 EA=(e,t,n)=>Math.min(n,Math.max(t,e));function DA(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 OA(e,t,n){return e===`canvas-dominant`&&t.width===`compact`?n.eviction.compactTakeoverMaxCards:n.eviction.maxVisibleCards}function kA(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 AA(e,t,n,r,i,a){let o=i??DA(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=vA(e.component,{...e.contentOpts,naturalHeightPx:e.naturalHeightPx,widthPx:c,coldDefaultHeightPx:n.card.coldDefaultHeightPx},n.card.componentOverrides);return{card:e,constraints:t,clampedHeightPx:xA(t.naturalHeightPx,n)}})}}function jA(e,t){return`fraction`in e?e.fraction*t:e.px>=0?e.px:t+e.px}function MA(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 NA(e,t,n,r,i,a){let o=n===`x`?t.width:t.height,s=[...e].sort((e,t)=>jA(n===`x`?e.x:e.y,o)-jA(n===`x`?t.x:t.y,o)),c=s.map(e=>n===`x`?MA(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)):EA(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(EA(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 PA(e,t,n){let r=t.width,i=t.height,a=MA(e,e.width,n,`width`),o=MA(e,e.x,n,`x`),s=EA(Math.round(jA(o,r)),0,r),c=EA(Math.round(jA(e.y,i)),0,i);return{x:s,y:c,width:EA(Math.round(`fraction`in a?a.fraction*r:a.px),0,r-s),height:EA(Math.round(`fraction`in e.height?e.height.fraction*i:e.height.px),0,i-c)}}function FA(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))?NA(a,t,`x`,n):a.length>1&&a.every(e=>o(e.width))?NA(a,t,`y`,n,r,i):a.map(e=>({region:e,rect:PA(e,t,n)}))}function IA(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}=AA(kA(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}=DA(c,l),_=jA(f.y,i.height),v=d.every(e=>jA(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 LA(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 RA=`bottom-left`;function zA(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 BA(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 VA(e,t,n){return t===null||!CA(e,t)?e:{...e,y:Math.round(t.y)-n-e.height}}function HA(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 UA(e,t,n){let r=e;for(let e of t.filter(HA).sort((e,t)=>t.y-e.y))r=VA(r,e,n);return r}function WA(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 GA(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?DA(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:FA(e,f,a,IA(e,t.state,t.contentKind,n,f,i,o,d,a,r.width,OA(t.state,r,a)),LA(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 KA(e,t,n,r,i,a){let o=n.selfView&&n.prefs.hideSelfView!==!0,{regions:s,surfacePad:c,controlsInset:l,bandTopY:u}=GA(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=OA(e.state,r,a),b=p?kA(n.cards,y,a.eviction.policy):h===void 0?[]:kA(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=WA(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}=AA(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=SA(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=PA(h,e,a),o=h.sheetAnchor===`bottom`,s=DA(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}=AA(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=SA(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`)?RA: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=BA(e,_,a,r.width===`compact`),i=n===null?null:zA(e,t,_,n.w,n.h),o=i===null?null:UA(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=UA(zA(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`)&&CA(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=TA(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=TA(C.tiles,i,a);else e===`drop-self-view`?C.tiles.some(e=>e.kind===`selfView`)&&(S={...S,selfViewDropped:!0},C=x(S),w=TA(C.tiles,i,a)):e===`collapse-replica`&&!S.replicaCollapsed&&C.tiles.some(e=>e.kind===`replica`)&&(S={...S,replicaCollapsed:!0},C=x(S),w=TA(C.tiles,i,a))}return C}function qA(e){if(e!==void 0&&e.length!==0)return{...cA,...Object.fromEntries(e.map(e=>[e.id,e]))}}function JA(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=fA(a,t,n),c=a.replica||a.selfView&&a.prefs.hideSelfView!==!0,l=dA(s.state,t,qA(r?.templates),void 0,c,a.kioskMode===!0),{tiles:u,degradations:d}=KA(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 YA={compact:0,medium:1,expanded:2};function XA(e,t){return e.width===t.width&&e.height===t.height&&e.composition===t.composition}function ZA(e,t,n,r,i){let a=e.committedClass;if(a===null||a.composition===void 0)return{committedClass:t,pendingClass:null,pendingSinceMs:null};if(XA(t,a))return{committedClass:a,pendingClass:null,pendingSinceMs:null};let o=Math.abs(YA[t.width]-YA[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&&XA(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 QA=(e,t)=>e<t?-1:+(e>t);function $A(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(QA))r.has(e)||i.push({type:`exit`,tileId:e});let a=[],o=[],s=[];for(let e of[...r.keys()].sort(QA)){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 ej(e,t,n,r,i){let a=ZA(e,sA(t.container,r),t.container,n,r),o=JA(t,a.committedClass,r,i);return{resolution:o,transitions:$A(e.lastResolution,o),nextState:{committedClass:a.committedClass,pendingClass:a.pendingClass,pendingSinceMs:a.pendingSinceMs,lastResolution:o}}}var tj=`0.1.13`,nj=aA,rj=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_enabled`)===`1`}catch{return!1}})(),ij=(()=>{try{return new URLSearchParams(globalThis.location?.search??``).get(`grid_debug`)===`1`}catch{return!1}})();function aj(e,t){return rj||e===!0||t===!0}function oj(e=globalThis.location?.search??``){return new URLSearchParams(e).get(`kiosk`)===`1`}function sj({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 cj=16,lj=200,uj=kt(null);function dj(e){uj.peek()===null&&(console.error(`Magic Grid engine error; rendering the legacy layout.`,e),uj.value=(e instanceof Error?`${e.name}: ${e.message}`:String(e)).slice(0,lj))}function fj(){uj.peek()!==null&&(uj.value=null)}function pj({kioskMode:e=!1,instances:t,viewport:n,presence:r,callControlsBandPx:i,callControlsVisible:a,callControlsRect:o,enabled:s}){let c=j(nj),l=j(null),[u,d]=k({}),[f,p]=k(null),m=N((e,t)=>{s&&d(n=>n[e]===t?n:{...n,[e]:t})},[s]);A(()=>{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=M(()=>sj({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 A(()=>{if(!s||uj.peek()!==null)return;l.current===null&&(l.current=Date.now());let e=null,t=()=>{if(e=null,uj.peek()!==null)return;let n=Date.now()-(l.current??0),r;try{r=ej(c.current,h,n,oA)}catch(e){dj(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(cj,oA.hysteresis.windowMs-i+cj))}};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 mj(e){return e.kind===`card`&&e.sheet===!0&&e.sheetAnchor===`bottom`}function hj(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`&&!mj(e))?`card-overflow`:null:`no-persona-video`:`flag-off`}function gj(e,t){if(t!==null||e===null)return null;let n=e.tiles.find(e=>e.kind===`card`&&e.sheet===!0&&!mj(e));return n===void 0?null:n.rect.y+n.rect.height}var _j={driving:!1,containerPx:null,replica:null,selfView:null,content:null,replicaCollapsed:!1};function vj(e,t,n){if(e===null)return _j;let r=t===null;if(!r&&!(t===`no-persona-video`&&n))return _j;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 yj(e){return e.selfView===null?e.driving?`hidden`:`legacy`:`engine`}function bj(e,t){return e.containerPx===null||t.containerPx===null?!1:e.containerPx.width===t.containerPx.width&&e.containerPx.height===t.containerPx.height}function xj(e){let t=`composition`in e?e.composition:void 0;return t===`stacked`||t===`side-by-side`?t:void 0}var Sj=`conversation.grid_status`,Cj=6e4;function wj(e,t,n){return n?e&&t?`url+config+start`:e?`url+start`:t?`config+start`:`start`:e&&t?`both`:e?`url`:`config`}function Tj(e,t){return{message_type:`conversation`,event_type:Sj,conversation_id:e,properties:t}}function Ej(e){let t=xj(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 Dj(e){let{send:t,enabledVia:n,engineVersion:r=tj,now:i=Date.now,transitionDebounceMs:a=500,summaryIntervalMs:o=Cj}=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=Ej(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 Oj({enabled:e,enabledVia:t,bail:n,resolution:r,engineError:i}){let a=jd(),o=Md(),s=P(gp),c=j({daily:a,meetingState:o,conversation:s});c.current={daily:a,meetingState:o,conversation:s};let l=j(null);A(()=>{if(!e)return;let n=Dj({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(Tj(n,e),`*`)}catch{}}});return l.current=n,()=>{l.current=null,n.dispose()}},[e,t]),A(()=>{l.current?.update(n,r)},[n,r]),A(()=>{i!==null&&l.current?.error(i)},[i])}var kj=(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},Aj=(e,t)=>({classGroupId:e,validator:t}),jj=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Mj=`-`,Nj=[],Pj=`arbitrary..`,Fj=e=>{let t=Rj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Lj(e);let n=e.split(Mj);return Ij(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?kj(i,t):t:i||Nj}return n[e]||Nj}}},Ij=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ij(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Mj):e.slice(t).join(Mj),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Lj=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?Pj+r:void 0})(),Rj=e=>{let{theme:t,classGroups:n}=e;return zj(n,t)},zj=(e,t)=>{let n=jj();for(let r in e){let i=e[r];Bj(i,n,r,t)}return n},Bj=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Vj(i,t,n,r)}},Vj=(e,t,n,r)=>{if(typeof e==`string`){Hj(e,t,n);return}if(typeof e==`function`){Uj(e,t,n,r);return}Wj(e,t,n,r)},Hj=(e,t,n)=>{let r=e===``?t:Gj(t,e);r.classGroupId=n},Uj=(e,t,n,r)=>{if(Kj(e)){Bj(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Aj(n,e))},Wj=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Bj(o,Gj(t,a),n,r)}},Gj=(e,t)=>{let n=e,r=t.split(Mj),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=jj(),n.nextPart.set(t,i)),n=i}return n},Kj=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,qj=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)}}},Jj=`!`,Yj=`:`,Xj=[],Zj=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Qj=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===Yj){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(Jj)?(c=s.slice(0,-1),l=!0):s.startsWith(Jj)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Zj(t,l,c,u)};if(t){let e=t+Yj,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Zj(Xj,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},$j=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}},eM=e=>({cache:qj(e.cacheSize),parseClassName:Qj(e),sortModifiers:$j(e),postfixLookupClassGroupIds:tM(e),...Fj(e)}),tM=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},nM=/\s+/,rM=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(nM),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?_+Jj:_,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},iM=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=aM(n))&&(i&&(i+=` `),i+=r);return i},aM=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=aM(e[r]))&&(n&&(n+=` `),n+=t);return n},oM=(e,...t)=>{let n,r,i,a,o=o=>(n=eM(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=rM(e,n);return i(e,a),a};return a=o,(...e)=>a(iM(...e))},sM=[],cM=e=>{let t=t=>t[e]||sM;return t.isThemeGetter=!0,t},lM=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uM=/^\((?:(\w[\w-]*):)?(.+)\)$/i,dM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,fM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pM=/\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$/,mM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,hM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_M=e=>dM.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),vM=e=>!!e&&Number.isInteger(Number(e)),yM=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),bM=e=>fM.test(e),xM=()=>!0,SM=e=>pM.test(e)&&!mM.test(e),CM=()=>!1,wM=e=>hM.test(e),TM=e=>gM.test(e),EM=e=>!Q(e)&&!$(e),DM=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)),OM=e=>UM(e,qM,CM),Q=e=>lM.test(e),kM=e=>UM(e,JM,SM),AM=e=>UM(e,YM,Z),jM=e=>UM(e,ZM,xM),MM=e=>UM(e,XM,CM),NM=e=>UM(e,GM,CM),PM=e=>UM(e,KM,TM),FM=e=>UM(e,QM,wM),$=e=>uM.test(e),IM=e=>WM(e,JM),LM=e=>WM(e,XM),RM=e=>WM(e,GM),zM=e=>WM(e,qM),BM=e=>WM(e,KM),VM=e=>WM(e,QM,!0),HM=e=>WM(e,ZM,!0),UM=(e,t,n)=>{let r=lM.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},WM=(e,t,n=!1)=>{let r=uM.exec(e);return r?r[1]?t(r[1]):n:!1},GM=e=>e===`position`||e===`percentage`,KM=e=>e===`image`||e===`url`,qM=e=>e===`length`||e===`size`||e===`bg-size`,JM=e=>e===`length`,YM=e=>e===`number`,XM=e=>e===`family-name`,ZM=e=>e===`number`||e===`weight`,QM=e=>e===`shadow`,$M=oM(()=>{let e=cM(`color`),t=cM(`font`),n=cM(`text`),r=cM(`font-weight`),i=cM(`tracking`),a=cM(`leading`),o=cM(`breakpoint`),s=cM(`container`),c=cM(`spacing`),l=cM(`radius`),u=cM(`shadow`),d=cM(`inset-shadow`),f=cM(`text-shadow`),p=cM(`drop-shadow`),m=cM(`blur`),h=cM(`perspective`),g=cM(`aspect`),_=cM(`ease`),v=cM(`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=()=>[_M,`full`,`auto`,...w()],E=()=>[vM,`none`,`subgrid`,$,Q],ee=()=>[`auto`,{span:[`full`,vM,$,Q]},vM,$,Q],te=()=>[vM,`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`],D=()=>[`auto`,...w()],ae=()=>[_M,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],oe=()=>[_M,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],se=()=>[_M,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],O=()=>[e,$,Q],ce=()=>[...b(),RM,NM,{position:[$,Q]}],le=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ue=()=>[`auto`,`cover`,`contain`,zM,OM,{size:[$,Q]}],de=()=>[yM,IM,kM],fe=()=>[``,`none`,`full`,l,$,Q],pe=()=>[``,Z,IM,kM],me=()=>[`solid`,`dashed`,`dotted`,`double`],he=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ge=()=>[Z,yM,RM,NM],_e=()=>[``,`none`,m,$,Q],ve=()=>[`none`,Z,$,Q],ye=()=>[`none`,Z,$,Q],be=()=>[Z,$,Q],xe=()=>[_M,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[bM],breakpoint:[bM],color:[xM],container:[bM],"drop-shadow":[bM],ease:[`in`,`out`,`in-out`],font:[EM],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[bM],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[bM],shadow:[bM],spacing:[`px`,Z],text:[bM],"text-shadow":[bM],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,_M,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[DM],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:[vM,`auto`,$,Q]}],basis:[{basis:[_M,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,_M,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[vM,`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:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"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`,...se()]}],"min-block-size":[{"min-block":[`auto`,...se()]}],"max-block-size":[{"max-block":[`none`,...se()]}],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,IM,kM]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,HM,jM]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,yM,Q]}],"font-family":[{font:[LM,MM,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`,$,AM]}],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:O()}],"text-color":[{text:O()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...me(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,kM]}],"text-decoration-color":[{decoration:O()}],"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:[vM,$,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:ce()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},vM,$,Q],radial:[``,$,Q],conic:[vM,$,Q]},BM,PM]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:de()}],"gradient-via-pos":[{via:de()}],"gradient-to-pos":[{to:de()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...me(),`hidden`,`none`]}],"divide-style":[{divide:[...me(),`hidden`,`none`]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...me(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,IM,kM]}],"outline-color":[{outline:O()}],shadow:[{shadow:[``,`none`,u,VM,FM]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":[`none`,d,VM,FM]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:pe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Z,kM]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":[`none`,f,VM,FM]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...he(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":he()}],"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":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:_e()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,VM,FM]}],"drop-shadow-color":[{"drop-shadow":O()}],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":_e()}],"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:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":[`scale-3d`],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":[`translate-none`],zoom:[{zoom:[vM,$,Q]}],accent:[{accent:O()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:O()}],"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":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"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`,...O()]}],"stroke-w":[{stroke:[Z,IM,kM,AM]}],stroke:[{stroke:[`none`,...O()]}],"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 eN({resolution:e,inputs:t,config:n,bailReason:r}){if(e===null||t===null)return null;let i=cA[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}=GA(i,{state:e.state,contentKind:u},t,e.sizeClass,e.containerPx,n);return F(`div`,{class:`pointer-events-none absolute inset-0 z-40`,"aria-hidden":`true`,children:[a&&F(`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=>F(`div`,{class:$M(`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:F(`span`,{class:$M(`absolute top-1 left-1 flex flex-col rounded px-1.5 py-0.5 font-mono text-[10px] leading-tight`,s),children:[F(`span`,{children:e.region.name}),F(`span`,{class:`opacity-75`,children:e.region.accepts.join(` · `)})]})},e.region.name)),e.tiles.map(e=>F(`div`,{class:$M(`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:F(`span`,{class:$M(`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 tN(e){return{version:1,buildSha:tj,engineVersion:tj,config:oA,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 nN({resolution:e,inputs:t,shadowing:n,bailReason:r,engineError:i=null}){let[a,o]=k(!1),s=j(null);if(A(()=>()=>{s.current!==null&&clearTimeout(s.current)},[]),e===null||t===null)return i===null?null:F(`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:[F(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[F(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),F(`span`,{class:`text-warning`,children:`observing`})]}),F(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[F(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),F(`dd`,{class:`text-warning`,children:r}),F(`dt`,{class:`text-error opacity-80`,children:`error`}),F(`dd`,{class:`text-error break-all`,children:i})]})]});let c=()=>{let e=JSON.stringify(tN(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=xj(e.sizeClass);return F(`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:[F(`div`,{class:`mb-1 flex items-center justify-between gap-2`,children:[F(`span`,{class:`font-bold uppercase tracking-wide`,children:`magic grid`}),F(`span`,{class:n?`text-warning`:`text-success`,children:n?`observing`:`driving`})]}),F(`dl`,{class:`grid grid-cols-[5.5rem_1fr] gap-x-2`,children:[F(`dt`,{class:`opacity-60`,children:`state`}),F(`dd`,{children:e.state}),F(`dt`,{class:`opacity-60`,children:`template`}),F(`dd`,{children:e.templateId}),F(`dt`,{class:`opacity-60`,children:`class`}),F(`dd`,{children:[e.sizeClass.width,` / `,e.sizeClass.height]}),u!==void 0&&F(E,{children:[F(`dt`,{class:`opacity-60`,children:`composition`}),F(`dd`,{children:u})]}),F(`dt`,{class:`opacity-60`,children:`container`}),F(`dd`,{children:[e.containerPx.width,`×`,e.containerPx.height]}),t.callControlsRect!==void 0&&F(E,{children:[F(`dt`,{class:`opacity-60`,children:`controls`}),F(`dd`,{children:[`x `,t.callControlsRect.x,`–`,t.callControlsRect.x+t.callControlsRect.width,t.callControlsVisible===!1?` · hidden`:` · shown`]})]}),F(`dt`,{class:`opacity-60`,children:`tiles`}),F(`dd`,{children:e.tiles.map(e=>`${e.kind}:${e.rect.width}×${e.rect.height}`).join(` `)||`none`}),l.length>0&&F(E,{children:[F(`dt`,{class:`text-error opacity-80`,children:`dropped`}),F(`dd`,{class:`text-error`,children:l.join(`, `)})]}),r!==null&&F(E,{children:[F(`dt`,{class:`text-warning opacity-80`,children:`legacy`}),F(`dd`,{class:`text-warning`,children:r})]}),i!==null&&F(E,{children:[F(`dt`,{class:`text-error opacity-80`,children:`error`}),F(`dd`,{class:`text-error break-all`,children:i})]})]}),F(`button`,{type:`button`,class:`btn btn-xs mt-2 w-full`,onClick:c,children:a?`copied`:`copy envelope for playground`})]})}var rN={effect:_j,animate:!1},iN=kt(rN),aN={presence:{phase:`connecting`},localId:null,isScreenSharing:!1,isPersonaPresenting:!1,hasPersonaVideo:!1,hasSelfView:!1};function oN(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 sN(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&&oN(e.replica,t.replica)&&oN(e.selfView,t.selfView)&&oN(e.content,t.content)}var cN=new Map,lN=new Set;function uN({instances:e,viewport:t,callControlsBandPx:n,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}){let c=aj(o,s)&&r!==void 0,l=r??aN,u=globalThis.location?.search??``,d=pj({kioskMode:M(()=>oj(u),[u]),instances:e,viewport:t,presence:l,callControlsBandPx:n,callControlsVisible:i,callControlsRect:a,enabled:c}),f=c?uj.value:null,p=f===null?hj(d.resolution,l,c):`engine-error`;Oj({enabled:c,enabledVia:wj(rj,o===!0,s===!0),bail:p,resolution:d.resolution,engineError:f});let m=j(!1);l.presence.phase===`ready`?l.hasPersonaVideo&&(m.current=!0):m.current=!1;let h=!m.current,g;try{g=vj(d.resolution,p,h)}catch(e){dj(e),g=_j}let _=j(_j),v=bj(_.current,g);A(()=>{_.current=g,sN(iN.peek().effect,g)||(iN.value={effect:g,animate:v})}),A(()=>()=>{fj(),iN.peek()!==rN&&(iN.value=rN)},[]);let y=d.resolution,b=M(()=>{if(p!==null||y===null)return cN;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 dj(e),cN}},[p,y]),x=M(()=>p!==null||y===null?lN:new Set(y.tiles.filter(mj).map(e=>e.id)),[p,y]),S=ij?F(`div`,{class:`contents`,"data-grid-debug":!0,children:[F(eN,{resolution:d.resolution,inputs:d.inputs,config:oA,bailReason:p}),F(`div`,{class:`pointer-events-none absolute bottom-4 left-4 z-50`,children:F(nN,{resolution:d.resolution,inputs:d.inputs,shadowing:p!==null,bailReason:p,engineError:f})})]}):null;return{cardRects:b,kioskCardIds:x,sheetBottomPx:gj(y,p),animate:v,recordNaturalHeight:d.recordNaturalHeight,debug:S}}var dN=[`left`,`top`,`width`,`height`].map(e=>`${e} ${Qv}`).join(`, `);function fN(e,t){return{left:`${e.x}px`,top:`${e.y}px`,width:`${e.width}px`,height:`${e.height}px`,transition:t&&!cy()?dN:`none`}}function pN({state:e}){return e.enabled?F(`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:[F(`summary`,{class:`cursor-pointer font-medium`,children:`Magic Canvas debug`}),F(`dl`,{class:`mt-2 grid gap-2`,children:[F(mN,{label:`iframe`,value:e.iframeLifecycleState}),F(mN,{label:`post`,value:e.lastInteractionPostResult}),F(mN,{label:`context`,value:e.lastModelContextUpdate}),F(mN,{label:`error`,value:e.lastError}),F(hN,{label:`tool_call`,value:e.lastToolCall}),F(hN,{label:`canvas_config`,value:e.parsedCanvasConfig})]})]}):null}function mN({label:e,value:t}){return t?F(`div`,{children:[F(`dt`,{class:`font-semibold`,children:e}),F(`dd`,{class:`break-words text-base-content/70`,children:t})]}):null}function hN({label:e,value:t}){return t===void 0?null:F(`div`,{children:[F(`dt`,{class:`font-semibold`,children:e}),F(`dd`,{children:F(`pre`,{class:`max-h-40 overflow-auto rounded bg-base-200 p-2 text-[10px] leading-relaxed`,children:JSON.stringify(t,null,2)})})]})}var gN=1e3,_N=5e3,vN=1200,yN=[2e3,6e3];async function bN(e,t,n){let r=new AbortController,i=globalThis.setTimeout(()=>r.abort(),_N);try{await dn(e,t,n,{signal:r.signal})}finally{globalThis.clearTimeout(i)}}function xN(e){return e instanceof sn&&e.status>=400&&e.status<500&&e.status!==408&&e.status!==429}function SN(e,t){console.error(`Magic Canvas interaction POST failed; this interaction may not have been recorded server-side.`,e),t({lastInteractionPostResult:`error`,lastError:YN(e).message})}function CN(e){return e.content.some(e=>e.type===`text`&&typeof e.text==`string`&&e.text.trim()!==``)}function wN(e,t,n,r){(async()=>{let i;for(let a of yN){await new Promise(e=>setTimeout(e,a));try{await bN(e,t,n),r({lastInteractionPostResult:`recovered`,lastError:void 0});return}catch(e){if(i=e,xN(e))break}}SN(i,r)})()}var TN=2e3;function EN(e){return e.correct_answer===void 0?vN:TN}var DN=48,ON=`allow-scripts`,kN={"canvas.scheduling_embed":`allow-scripts allow-same-origin allow-popups allow-forms`,"canvas.text":`allow-scripts allow-popups allow-popups-to-escape-sandbox`};function AN(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 jN=class{onmessage;onerror;onclose;#e;#t;constructor(e){this.#e=e}start(){let e=e=>{AN(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 MN(e){for(let t of H_)if(e.some(e=>GN(e)===t))return t;return null}function NN({onLayoutEffectChange:e,onRenderedSlotChange:t,debugEnabled:n=KN(),callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}={}){let{client:c}=Bp(),{dataTheme:l,cssVars:u}=iA(),d=jd(),f=Md(),[p,m]=k([]),[h,g]=VN(),[_,v]=k(()=>({enabled:n,iframeLifecycleState:`idle`})),y=uN({instances:p,viewport:g,callControlsBandPx:72,callPresence:r,callControlsVisible:i,callControlsRect:a,gridConfigEnabled:o,gridStartEnabled:s}),b=N(e=>{v(t=>({...t,...e}))},[]),x=N((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=M(()=>({theme:l.value===`dark`?`dark`:`light`,cssVars:u.value}),[l.value,u.value]);A(()=>{v(e=>e.enabled===n?e:{...e,enabled:n})},[n]),Id({onAppMessage:N(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=Rv(e.data);if(!t)return;m(e=>nv(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:YN(e).message})}},[f,b])});let C=p.map(e=>{let t=lv(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=uv(C.map(({layout:e})=>e),g),T=[...C].reverse().find(({layout:e})=>e.display_mode===`fullscreen`)?.instance.tool_call_id;A(()=>{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=MN(C.map(({layout:e})=>e));A(()=>{t?.(E)},[t,E]);let ee=p.length>0||_.enabled;return F(`div`,{ref:h,"data-magic-canvas-root":!0,class:`pointer-events-none absolute inset-0 z-30`,children:[ee&&T&&F(`div`,{class:`absolute inset-0 bg-black/45`}),ee&&!T&&y.sheetBottomPx!==null&&F(`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})=>F(PN,{slot:GN(t),safeAreaTop:w.safe_area?.y,frameWidth:g.width,...n?{gridRect:n,gridAnimate:y.animate}:{},children:r=>F(FN,{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&&F(`div`,{class:`absolute right-4 bottom-24 @max-mobile:right-3 @max-mobile:bottom-20`,children:F(pN,{state:_})}),y.debug]})}function PN({slot:e,safeAreaTop:t,frameWidth:n,gridRect:r,gridAnimate:i=!1,children:a}){let[o,s]=HN(),c=a(r?r.height:e===`full`?void 0:s);if(r)return F(`div`,{ref:o,class:`pointer-events-auto absolute`,style:fN(r,i),"data-canvas-slot":e,"data-grid-driven":`true`,children:F(`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 F(`div`,{ref:o,class:WN(e),style:{top:r,bottom:`72px`,maxWidth:i},"data-canvas-slot":e,children:F(`div`,{class:`my-auto flex w-full flex-col gap-2`,children:c})})}return F(`div`,{ref:o,class:WN(e),"data-canvas-slot":e,children:F(`div`,{class:`contents`,children:c})})}function FN({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=j(null),m=j(null),h=j(e),g=j(r),_=j(320),v=j(i),y=j(a),b=j(o),x=j(-1),S=j(l),C=j(u),w=j(d),T=j(f),[E,ee]=k(720);A(()=>{y.current=a},[a]),A(()=>{_.current=E,m.current?.setHostContext(zN(y.current,v.current,b.current,h.current,E,g.current))},[E]),A(()=>{h.current=e,g.current=r;let t=RN(i,p.current);v.current=t,m.current?.setHostContext(zN(y.current,t,b.current,e,_.current,r))},[e,i,r]),A(()=>{b.current=o,m.current?.setHostContext(zN(y.current,v.current,o,e,_.current,g.current))},[e,o]),A(()=>{S.current=l,C.current=u,w.current=d,T.current=f},[l,u,d,f]),A(()=>{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:YN(e).message})},d=()=>{if(n||!i)return;let e=y.current,t=sv(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 nA(null,{name:`tavus-deployment`,version:`0.0.0`},{logging:{},message:{text:{},structuredContent:{}},updateModelContext:{text:{},structuredContent:{}}},{hostContext:zN(a,RN(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,DN),720);ee(t),w.current(y.current.id,t)}},f.onmessage=async e=>{let r=rv(e);if(!r){if(CN(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=iv(i,r);return{interaction:e,request:zv(e)}}catch(e){return{error:e}}})();if(`error`in a){let e=YN(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=ov(e,o)}catch(e){c({lastError:YN(e).message}),o.type===`submit`&&console.warn(`Magic Canvas dropped the response text of a submitted card.`,e)}let d=!0;try{await bN(t,o.conversation_id,l.body)}catch(e){d=!1,xN(e)?SN(e,c):(console.warn(`Magic Canvas interaction POST failed; continuing without it and retrying in the background.`,e),c({lastInteractionPostResult:`failed_open`,lastError:YN(e).message}),wN(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:YN(e).message})}return d&&c({lastInteractionPostResult:`success`,lastError:void 0}),av(o)&&(o.type===`submit`?(s&&clearTimeout(s),s=setTimeout(()=>{s=null,n||S.current()},EN(i.arguments))):S.current()),{}},f.onupdatemodelcontext=async e=>(i=e,o||=setTimeout(()=>{o=null,d()},gN),{}),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(zN(y.current,v.current,b.current,h.current,_.current,g.current)),{mode:t}},f.connect(new jN(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&&B_(r)}},[t,a.id,a.canvas_config.sandbox_url,c]),A(()=>{a.revision!==0&&(a.revision<=x.current||(x.current=a.revision,m.current?.sendToolInput({arguments:a.arguments}).catch(e=>{c({iframeLifecycleState:`error`,lastError:YN(e).message})})))},[a.arguments,a.revision,c]);let te=o.viable_slot===`full`||o.display_mode===`fullscreen`,ne=te?null:BN(E,e,r),re=ne?.placeholderStyle,ie=ne?.cardStyle,D=te?{height:`100%`}:ne?.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`,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(` `),oe=kN[a.canvas_config.component]??ON,se=F(`div`,{class:ae,style:ie,"data-canvas-card":o.viable_slot,children:F(`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:oe,style:D})});return te?se:F(`div`,{class:`block w-full`,style:re,children:se})}var IN=[`--color-base-100`,`--color-base-200`,`--color-base-300`,`--color-base-content`,`--color-primary`,`--color-error`];function LN(e){if(!e||typeof getComputedStyle!=`function`)return{};let t=getComputedStyle(e),n={};for(let e of IN){let r=t.getPropertyValue(e).trim();r&&(n[e]=r)}return n}function RN(e,t){let n=LN(t);return Object.keys(n).length===0?e:{...e,cssVars:{...e.cssVars,...n}}}function zN(e,t,n,r,i,a=!1){let o=Bv(t,n),s=n.viable_slot===`full`||n.display_mode===`fullscreen`,c=s?void 0:qN(r),l=s?1:BN(i??0,r,a)?.displayScale??1;return{...e.canvas_config.host_context,...o,containerDimensions:{...JN(o.containerDimensions)?o.containerDimensions:{},...c===void 0?{}:{maxHeight:c},displayScale:l}}}function BN(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 VN(){let e=j(null),[t,n]=k(()=>UN(null));return A(()=>{let t=()=>n(t=>{let n=UN(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 HN(){let e=j(null),[t,n]=k();return A(()=>{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 UN(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 WN(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 GN(e){return e.display_mode===`fullscreen`&&e.preferred_slot!==`full`?e.preferred_slot:e.viable_slot}function KN(){return!1}function qN(e){return e===void 0||!Number.isFinite(e)||e<=0?720:Math.min(Math.floor(e),720)}function JN(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function YN(e){return e instanceof Error?e:Error(String(e))}var XN=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}},ZN=1e4;function QN(e,t=ZN){let[n,r]=k(!1),i=j(!1);return A(()=>{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 $N(e){let t=Nd(),n=zd(t??``),r=!Vd(t??``).isOff,i=y_(e),a=i.phase===`ready`?i.replicaId:``,o=Vd(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 M(()=>({presence:i,localId:t,isScreenSharing:r,isPersonaPresenting:s,hasPersonaVideo:c,hasSelfView:l}),[i.phase,a,u,t,r,s,c,l])}function eP(e,t,n){let[r,i]=k(!0);return A(()=>{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 tP(e,t,n,r,i){let[a,o]=k(void 0);return A(()=>{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 nP=1e4;function rP({onTimeout:e,timeoutMs:t=nP,active:n=!0}){let r=v_().length>0,[i,a]=k(!1),o=j(e);return A(()=>{o.current=e},[e]),A(()=>{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 iP(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.message_type===`system`&&t.event_type===`system.shutdown`}function aP({onShutdown:e}){let t=j(e);A(()=>{t.current=e},[e]),Id({onAppMessage:N(e=>{iP(e?.data)&&t.current()},[])})}var oP=rn(`PiP`),sP=360,cP=280;function lP(){return globalThis.window!==void 0&&`documentPictureInPicture`in globalThis.window}function uP(e){let{enabled:t,active:n}=e,[r,i]=k(null),a=lP(),o=P(lm),s=N(()=>{i(e=>(e&&!e.closed&&e.close(),null))},[]),c=N(async()=>{if(a&&t&&n&&(!r||r.closed))try{let e=await globalThis.window.documentPictureInPicture.requestWindow({width:sP,height:cP}),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){oP.warn(`Failed to open PiP window`,e)}},[a,t,n,r]);return A(()=>{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){oP.warn(`mediaSession metadata setup failed`,e)}let t=(t,n)=>{try{e.setActionHandler(t,n),r.push(t)}catch(e){oP.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]),A(()=>{(!n||!t)&&r&&!r.closed&&s()},[n,t,r,s]),A(()=>()=>{r&&!r.closed&&r.close()},[r]),A(()=>{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 dP=kt(null),fP={active:!1,video_shift_x:0,backdrop:{type:`snapshot_mirror`}},pP=qd(({id:e,showAudioWave:t=!0})=>{let n=zd(e).isOff;return F(`div`,{class:`relative aspect-square w-32 @max-mobile:w-24 rounded-box overflow-hidden bg-black/30 z-10 ${n?`hidden`:``}`,children:[F(xf,{automirror:!0,sessionId:e,type:`video`,fit:`cover`,className:`w-full h-full object-cover ${n?`hidden`:``}`}),t&&F(`div`,{class:`absolute bottom-2 right-2`,children:F(d_,{id:e})})]})}),mP=qd(()=>{let e=Nd(),{isScreenSharing:t}=wg(),n=v_()[0];return F(E,{children:[t&&n&&F(pP,{id:n}),e&&F(pP,{id:e,showAudioWave:!1})]})}),hP=qd(()=>F(`div`,{class:`absolute bottom-4 @max-mobile:bottom-20 left-4 flex flex-col items-end gap-2 z-20`,children:F(mP,{})})),gP=qd(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,effect:i,animate:a})=>F(E,{children:[F(`div`,{class:`absolute inset-0 bg-base-200`}),i.content&&F(`div`,{class:`absolute overflow-hidden rounded-box bg-black`,style:fN(i.content,a),children:F(xf,{sessionId:n?t??``:e,type:`screenVideo`,fit:`contain`,className:`absolute inset-0 h-full w-full object-contain`})}),i.replica&&F(`div`,{class:$M(`absolute overflow-hidden`,i.replicaCollapsed&&`rounded-box`),style:fN(i.replica,a),children:F(C_,{personaSessionId:e,localSessionId:t,isScreenSharing:!1,avatarOff:r})})]})),_P=qd(()=>{let{effect:e,animate:t}=iN.value,n=Nd();return n===null||e.selfView===null?null:F(`div`,{class:`absolute z-20 overflow-hidden rounded-box bg-black/30`,style:fN(e.selfView,t),children:F(xf,{automirror:!0,sessionId:n,type:`video`,fit:`cover`,className:`h-full w-full object-cover`})})}),vP=qd(({canvasRenderedSlot:e})=>{let t=yj(iN.value.effect);return t===`hidden`?null:t===`engine`?F(XN,{onError:dj,children:F(_P,{})}):e===`safe-area-bottom`?null:F(hP,{})}),yP=qd(()=>{let e=v_()[0];return e?F(Sf,{sessionId:e}):null}),bP=qd(e=>F(E,{children:[F(yP,{}),F(xP,{...e})]})),xP=qd(({isAudioOnly:e,presence:t,canvasLayoutEffect:n,canvasRenderedSlot:r})=>{let{presence:i,localId:a,isScreenSharing:o,isPersonaPresenting:s}=t,c=iN.value,l=n.active&&!o&&(!e||s);return i.phase===`left`?F(l_,{}):i.phase===`connecting`?F(c_,{}):e&&!s?F(`div`,{class:`absolute inset-0 flex items-center justify-center`,children:F(h_,{sessionId:i.replicaId})}):c.effect.driving?F(XN,{onError:dj,children:F(gP,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,effect:c.effect,animate:c.animate})}):s?F(vy,{personaSessionId:i.replicaId,isAudioOnly:e,avatarOff:i.videoState.isOff,canvasLayoutEffect:n,smartSidecarActive:l}):F(SP,{personaSessionId:i.replicaId,localId:a,isScreenSharing:o,avatarOff:i.videoState.isOff,smartSidecarActive:l,canvasLayoutEffect:n,canvasRenderedSlot:r})}),SP=qd(({personaSessionId:e,localId:t,isScreenSharing:n,avatarOff:r,smartSidecarActive:i,canvasLayoutEffect:a,canvasRenderedSlot:o})=>F(gy,{canvasLayoutEffect:a,smartSidecarActive:i,isScreenSharing:n,captureSnapshot:EP,personaMode:`auto`,renderedSlot:o,fill:i=>F(C_,{personaSessionId:e,localSessionId:t,isScreenSharing:n,avatarOff:r,videoRef:i})})),CP=qd(({items:e})=>{let[t,n]=k(!1),r=j(null);return A(()=>{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]),F(`div`,{ref:r,class:`relative`,children:[F(`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:F(Mh,{name:`more`})}),t&&F(`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})]})}),wP=qd(({items:e})=>e.length<=1?F(E,{children:e}):F(CP,{items:e})),TP=qd(({onLeave:e})=>{let t=Md(),{config:n}=Bp(),{session:r,end:i}=Yg(),a=Nd(),o=j(null),s=P(bm)?.frameRef??o,[c,l]=k(!1),u=eg()===`full-screen`,[d,f]=k(!1),[p,m]=k(fP),[h,g]=k(null),_=n.value.customization.conversation,v=QN(_.show_fullscreen_hint&&h!==null&&!c&&!u),y=j(null),b=j(null),x=r.value?.conversationUrl,S=r.value?.magicGrid===!0,C=aj(_.magic_grid,S),w=eP(y,C,x),T=tP(y,b,72,C,x),E=_.modality===`audio`,ee=$N(E),te=_.modality===`chat`,ne=_.modality===`video`,re=_.enable_chat,ie=_.enable_closed_captions,D=_.enable_picture_in_picture,{pipWindow:ae}=uP({enabled:D&&!te,active:t===`joined-meeting`});A(()=>()=>{i()},[i]);let{camera:oe,requestCamera:se}=em(),{isCamMuted:O}=Sg(),ce=oe.isGranted&&!O;A(()=>{ne&&t===`joined-meeting`&&(dP.value=ce)},[ne,t,ce]);let le=j(ne&&!a&&dP.value===!0);A(()=>{t===`joined-meeting`&&le.current&&(le.current=!1,se())},[t,se]),A(()=>{(t===`left-meeting`||t===`error`)&&e()},[t,e]),A(()=>{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 ue=N(()=>{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?.()},[]);N(()=>{f(e=>!e)},[]);let de=N(()=>{i()},[i]);if(rP({active:!te&&t===`joined-meeting`,onTimeout:de}),aP({onShutdown:de}),!x)return null;if(te)return F(n_,{defaultOpen:!0,children:F(`div`,{class:`cvi-call-surface absolute inset-0`,children:F(o_,{docked:!0,headerAction:F(`button`,{type:`button`,class:`btn btn-ghost btn-sm btn-circle text-base-content/60 hover:text-error`,onClick:de,"aria-label":`Leave conversation`,children:F(Mh,{name:`leave`,size:20,"aria-label":`Leave conversation`})})})})});let fe=[F(Jg,{compact:!0},`screen-share`)];re&&fe.push(F(i_,{compact:!0},`chat`));let pe=t===`left-meeting`;return F(Zg,{children:F(n_,{children:F(jg,{children:[F(`div`,{class:`cvi-call-surface absolute inset-0${E?``:` cvi-video-surface`}`,ref:y,children:[F(`div`,{class:`relative w-full h-full z-[5]`,children:[F(bP,{isAudioOnly:E,presence:ee,canvasLayoutEffect:p,canvasRenderedSlot:h}),!E&&F(vP,{canvasRenderedSlot:h}),F(NN,{debugEnabled:d,callPresence:ee,callControlsVisible:w,callControlsRect:T,gridConfigEnabled:_.magic_grid,gridStartEnabled:S,onLayoutEffectChange:m,onRenderedSlotChange:g}),!u&&F(`div`,{class:`cvi-autohide absolute top-4 right-4 z-20`,"data-hidden":pe,"data-pinned":v,children:F(u_,{active:c,onToggle:ue,nudge:v,compact:!0})})]}),F(o_,{}),F(e_,{}),F(`div`,{class:`cvi-autohide cvi-autohide-slide pointer-events-none absolute bottom-6 left-0 right-0 z-20`,"data-hidden":pe,"aria-hidden":pe,children:F(`div`,{class:`cvi-control-rail flex justify-center items-center gap-2 @max-mobile:gap-1`,"data-hidden":pe,ref:b,children:[F(Ug,{level:!0}),!E&&F(Gg,{}),ie&&F($g,{}),F(wP,{items:fe}),F(`button`,{type:`button`,class:`btn btn-control btn-error`,onClick:de,"aria-label":`Leave call`,children:F(Mh,{name:`leave`,"aria-label":`Leave Call`})})]})})]}),ae&&cf(F(x_,{onLeave:de}),ae.document.body)]})})})});function EP(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 DP(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 OP=qd(({text:e,isJoining:t=!1,onJoin:n,onCancel:r})=>{let i=jd(),{config:a}=Bp(),{cameraOnStart:o}=P(lt),{localSessionId:s,isCamMuted:c}=Sg(),{mic:l,camera:u,requestMic:d,requestCamera:f}=em(),p=a.value.customization.conversation.modality===`video`,m=Lh(a.value),h=Ih(a.value);A(()=>{d()},[]);let g=l.isGranted,_=j(!1);A(()=>{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=DP(e,l.status,v);return F(jg,{children:F(`div`,{class:`absolute inset-0 motion-safe:animate-[tavusFadeUp_280ms_ease-out]`,children:[u.isGranted&&!c?F(`div`,{class:`absolute inset-0 flex items-center justify-center bg-black overflow-hidden`,children:F(xf,{type:`video`,sessionId:s??``,mirror:!0,fit:`cover`,className:`w-full h-full object-cover!`})}):F(`div`,{class:`absolute inset-0 overflow-hidden bg-base-300`,children:[F(Hh,{variant:m.background,replica:h}),F(`div`,{class:`${dg} backdrop-blur-xs`})]}),F(`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&&F(ng,{message:y,class:`relative`}),F(`div`,{class:`flex flex-wrap items-center justify-center gap-1.5 @max-mobile:gap-1`,children:[F(`div`,{class:`flex items-center justify-center gap-1.5 shrink-0 @max-mobile:gap-1`,children:[F(Ug,{level:!0}),p&&F(Gg,{})]}),F(Kh,{class:`btn-accent `,loading:t,disabled:!g,onClick:n,children:e?.join??`Join`}),F(`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:F(Mh,{name:`cancel`})})]})]})]})})}),kP=`Password required`,AP=`Enter the password to start this conversation.`,jP=`Password`,MP=`Continue`;function NP({onSubmit:e,text:t,isSubmitting:n=!1,errorMessage:r}){let[i,a]=k(``),o=$e();return F(`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:F(`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:F(`div`,{class:`card-body gap-3`,children:[F(`h3`,{id:`${o}-title`,class:`card-title text-base-content`,children:t?.title??kP}),F(`p`,{class:`text-sm text-base-content/70`,children:t?.description??AP}),F(`input`,{id:o,type:`password`,autocomplete:`current-password`,class:`input input-bordered w-full`,placeholder:t?.placeholder??jP,value:i,disabled:n,onInput:e=>a(e.target.value),autoFocus:!0}),r&&F(`p`,{class:`text-error text-xs`,role:`alert`,children:r}),F(Kh,{class:`btn-primary`,type:`submit`,disabled:!i.trim(),loading:n,children:t?.submit??MP})]})})})}function PP({text:e,onStart:t,isStarting:n,permissionRequest:r}){let{config:i,deploymentId:a}=Bp(),o=eg()===`full-screen`,s=P(gp),c=Lh(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=M(()=>p&&Gf(a,u),[p,a,u]),h=p&&!m,g=i.value.has_password===!0,_=s?.password.value??null,v=g&&!_,y=$e(),[b,x]=k(m),S=n||p&&!b||v;return F(pg,{title:c.title,description:c.description,overlay:v&&s?F(NP,{onSubmit:s.setPassword}):null,children:[F(`div`,{class:`relative`,children:[r&&F(ng,{message:tg(r),class:`absolute bottom-full mb-3 z-20 ${o?`left-1/2 -translate-x-1/2`:`right-0`}`}),F(gg,{onClick:()=>{p&&b&&!m&&Jf(a,u),t()},disabled:S,loading:n,children:l})]}),f&&F(`div`,{class:`max-w-xs text-center`,children:h?F(`label`,{for:y,class:`flex items-center gap-2 text-xs text-left cursor-pointer`,children:[F(`input`,{id:y,type:`checkbox`,class:`checkbox checkbox-secondary checkbox-xs mt-0.5 shrink-0`,checked:b,onChange:e=>x(e.target.checked)}),F(`span`,{class:`leading-snug`,children:u})]}):F(`p`,{class:`text-xs leading-snug text-white/70`,children:u})})]})}function FP(...e){for(let t of e){let e=t?.trim();if(e)return e}}function IP(){let{config:e}=Bp(),{haircheck:t}=e.value.customization;return M(()=>({prompt:FP(t.permission_request_description,t.permission_request_title),ready:FP(t.permission_granted_description,t.permission_granted_title),denied:FP(t.permission_denied_description,t.permission_denied_title),join:FP(t.join_button),cancel:FP(t.cancel_btn)}),[t])}function LP({flow:e,welcomeText:t,onUnavailableCancel:n}){let r=IP();switch(e.state){case`idle`:return F(PP,{text:t,onStart:()=>{e.start()},isStarting:e.isStarting,permissionRequest:e.permissionRequest});case`haircheck`:return F(OP,{text:r,onJoin:()=>{e.join()},onCancel:()=>e.cancel(),isJoining:e.isStarting});case`call`:return F(TP,{onLeave:()=>e.leave()});case`ended`:return F(xg,{isStarting:e.isStarting,permissionRequest:e.permissionRequest,onRestart:()=>{e.start()}});case`unavailable`:return F(Qh,{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 RP({children:e}){let{config:t}=P(Sn),n=t.peek().customization?.widget,r=n?.expandable??`default`,i=Yt(r===`start-expanded`||r===`always`),a=Yt(n?.variant??`full`),o=Yt(n?.position??`bottom-right`),s=Yt(r),c=Yt(n?.avatar?.type??`orb`),l=j(r);nn(()=>{let e=t.value.customization?.widget,n=e?.expandable??`default`;a.value=e?.variant??`full`,o.value=e?.position??`bottom-right`,s.value=n,c.value=e?.avatar?.type??`orb`,l.current!==n&&(i.value=n===`start-expanded`||n===`always`,l.current=n)});let u=N(()=>{s.peek()!==`always`&&(i.value=!i.peek())},[i,s]),d=N(()=>{i.value=!0},[i]),f=N(()=>{s.peek()!==`always`&&(i.value=!1)},[i,s]),p=P(Rp);nn(()=>{p&&(p.hostVisible.value=i.value)});let m=P(If),h=m?.flowSignal.value??`idle`,g=m?.isStarting??!1;A(()=>{(g||h===`haircheck`||h===`call`)&&(i.value=!0)},[g,h,i]);let _=M(()=>({expanded:i,variant:a,position:o,expandable:s,avatarType:c,toggle:u,expand:d,collapse:f}),[i,a,o,s,c,u,d,f]);return F(im.Provider,{value:_,children:e})}function zP(){let{config:e}=Bp(),t=e.value.customization.branding;return e.value.show_tavus_branding!==!1&&!t?.hide_tavus_badge?F(BP,{}):t?.logo||t?.text?F(VP,{logo:t.logo,text:t.text}):null}function BP(){let{isDark:e}=iA(),t=e.value?`white`:`#140206`;return F(`a`,{href:`https://tavus.io`,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center gap-1 text-xs text-base-content/50 hover:text-base-content/80 transition-colors`,children:[F(`svg`,{viewBox:`0 0 488 452`,class:`h-2.5 w-2.5 shrink-0`,fill:`none`,"aria-hidden":`true`,children:[F(`path`,{d:`M160 152V208H104V152H160Z`,fill:t}),F(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M488 270.5L436 285L451 326L418.766 346L441 360L423 392L435 452H0V0H394.766L488 270.5ZM24 24V428H216.2L209 392L227 360L204.766 346L237 326L222 285L274 270.5L189.038 24H24ZM352 152C336.536 152 324 164.536 324 180C324 195.464 336.536 208 352 208C367.464 208 380 195.464 380 180C380 164.536 367.464 152 352 152Z`,fill:t})]}),F(`span`,{children:[`Powered by `,F(`span`,{class:`underline`,children:`Tavus`})]})]})}function VP({logo:e,text:t}){return F(`div`,{class:`inline-flex items-center gap-1 text-xs text-base-content/50`,children:[e?F(`img`,{src:e,alt:t||`Branding`,class:`h-2.5 shrink-0`}):null,t?F(`span`,{children:t}):null]})}var HP={title:`Hi! Want to chat?`,btn_title:`Start conversation`};function UP(){let{config:e}=Bp(),t=e.value.customization.widget?.text;return M(()=>({title:t?.title||HP.title,btn_title:t?.btn_title||HP.btn_title}),[t])}function WP(){let e=P(im);if(!e)throw Error(`useWidgetUI must be used within WidgetUIProvider`);return e}var GP={xs:`w-6 h-6`,sm:`w-8 h-8`,md:`w-10 h-10`,lg:`w-16 h-16`},KP={xs:`w-3 h-3`,sm:`w-4 h-4`,md:`w-5 h-5`,lg:`w-8 h-8`};function qP({size:e=`md`,className:t=``}){let{avatarType:n}=WP(),{config:r}=Bp(),i=Ih(r.value);return(Lh(r.value).background.type===`replica`||n.value===`image`)&&i?F(`div`,{class:`relative ${GP[e]} rounded-box overflow-hidden bg-base-300 ${t}`,children:F(Vh,{replica:i})}):F(`div`,{class:`relative ${GP[e]} rounded-box bg-primary/15 flex items-center justify-center ${t}`,children:F(`span`,{class:`${KP[e]} rounded-full bg-primary animate-pulse`})})}function JP({variant:e}){let{toggle:t}=WP(),n=UP();return e===`tiny`?F(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`rounded-box overflow-hidden shadow-xl hover:shadow-2xl transition-shadow cursor-pointer`,children:F(qP,{size:`lg`})}):e===`compact`?F(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`group flex items-center gap-2.5 py-2.5 pl-2.5 pr-8 rounded-box bg-base-100 text-base-content border border-base-300 shadow-lg hover:shadow-xl transition-shadow cursor-pointer text-left`,children:[F(qP,{size:`md`}),F(`span`,{class:`flex flex-col gap-0.5`,children:[F(`span`,{class:`text-base font-medium leading-tight`,children:n.title}),F(`span`,{class:`text-sm text-base-content/60 leading-tight`,children:n.btn_title})]})]}):F(`button`,{type:`button`,onClick:t,"aria-label":n.btn_title,class:`flex flex-col gap-3 p-3 w-64 rounded-box bg-base-100 text-base-content border border-base-300 shadow-xl hover:shadow-2xl transition-shadow cursor-pointer text-left`,children:[F(`div`,{class:`flex items-center gap-2.5`,children:[F(qP,{size:`md`}),F(`span`,{class:`text-sm font-medium leading-snug`,children:n.title})]}),F(`span`,{class:`btn btn-primary btn-sm w-full pointer-events-none gap-2 flex items-center`,children:[F(Mh,{name:`cam`,size:16}),F(`span`,{className:`leading-4`,children:n.btn_title})]})]})}var YP=`tavus:widget:greeting-dismissed`;function XP({anchor:e}){let t=UP(),{variant:n,expand:r}=WP(),[i,a]=k(!1);A(()=>{if(n.value===`tiny`){try{if(sessionStorage.getItem(YP)===`1`)return}catch{}a(!0)}},[n]);let o=N(e=>{e.stopPropagation();try{sessionStorage.setItem(YP,`1`)}catch{}a(!1)},[]);if(!i)return null;let s=e===`right`?`right-[-6px] border-r border-b`:`left-[-6px] border-l border-t`,c=e===`right`?`-right-2`:`-left-2`;return F(`button`,{type:`button`,onClick:r,class:`relative max-w-56 rounded-box bg-base-100 text-base-content shadow-lg border border-base-300 px-3 py-2 text-sm text-left cursor-pointer animate-[tavusFadeUp_240ms_ease-out] hover:bg-base-200 transition-colors`,children:[F(`p`,{class:`leading-snug pr-3`,children:t.title}),F(`span`,{role:`button`,tabIndex:0,onClick:o,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&o(e)},class:`absolute -top-2 ${c} btn btn-ghost btn-circle btn-xs bg-base-100 border border-base-300 shadow-sm`,"aria-label":`Dismiss`,children:`×`}),F(`span`,{class:`absolute bottom-3 w-3 h-3 rotate-45 bg-base-100 border-base-300 ${s}`})]})}function ZP(){let e=P(om);if(!e)throw Error(`useHostBridge must be used within HostBridgeProvider`);return e}var QP=`bg-base-100 text-base-content rounded-box border border-base-300 shadow-xl w-[22rem] flex flex-col animate-[tavusPopIn_180ms_ease-out]`,$P=`bg-base-100 text-base-content w-[100vw] h-[100dvh] flex flex-col animate-[tavusFadeUp_180ms_ease-out]`,eF=`p-1 flex-1 min-h-0`,tF=`p-1 flex-1 min-h-0`;function nF({variant:e,children:t,onClose:n,fullscreen:r}){let{expandable:i}=WP(),a=i.value!==`always`;return r?F(`div`,{class:$P,children:[F(`div`,{class:`flex items-center justify-end gap-2 px-2.5 py-1.5 border-b border-base-300`,children:a&&F(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:n,"aria-label":`Close`,children:F(Mh,{name:`close`,size:14})})}),F(`div`,{class:tF,children:t}),F(`div`,{class:`flex justify-end px-2.5`,children:F(zP,{})})]}):F(`div`,{class:`flex flex-col h-[min(34rem,calc(100dvh-3rem))]`,children:[F(`div`,{class:`${QP} flex-1 overflow-hidden`,children:[F(`div`,{class:`flex items-center justify-end gap-2 px-2.5 pt-1.5 shrink-0`,children:a&&F(`button`,{type:`button`,class:`btn btn-ghost btn-circle btn-xs`,onClick:n,"aria-label":`Close`,children:F(Mh,{name:`close`,size:14})})}),F(`div`,{class:eF,children:t})]}),F(`div`,{class:`flex justify-end pr-2 pt-1.5 shrink-0`,children:F(zP,{})})]})}var rF=rn(`Widget`),iF=`1rem`,aF=480;function oF(e,t,n){let r=e.state===`call`,i=r||e.state===`haircheck`||e.isStarting;e.cancel(),r&&e.leave(),i&&t(),n()}function sF(){return typeof window>`u`?!1:window.innerWidth<=aF}function cF(e){switch(e){case`bottom-right`:return{bottom:iF,right:iF};case`bottom-left`:return{bottom:iF,left:iF};case`top-right`:return{top:iF,right:iF};case`top-left`:return{top:iF,left:iF};case`top`:return{top:iF,left:`50%`,transform:`translateX(-50%)`};case`bottom`:return{bottom:iF,left:`50%`,transform:`translateX(-50%)`}}}var lF=[`top`,`bottom`,`left`,`right`,`transform`];function uF(e){return e===`bottom-left`||e===`top-left`?`left`:`right`}function dF(){let{config:e,initError:t}=Bp(),n=UP(),{expanded:r,position:i,variant:a,collapse:o}=WP(),{end:s}=Yg(),{shadowHost:c}=ZP(),l=$h(),u=Yt(sF());A(()=>{if(typeof window>`u`)return;u.value=sF();let e=()=>{u.value=sF()};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[u]);let d=M(()=>({fallback_button:n.btn_title}),[n.btn_title]),f=N(()=>{oF(l,s,o)},[l,s,o]);if(nn(()=>{let e=c.value,t=i.value,n=r.value,a=n&&u.value;if(e){if(a)e.style.top=`0`,e.style.right=`0`,e.style.bottom=`0`,e.style.left=`0`,e.style.transform=``;else{let n=cF(t);for(let t of lF)e.style[t]=n[t]??``}e.dataset.tavusWidgetPosition=t,e.dataset.tavusWidgetExpanded=n?`true`:`false`,e.dataset.tavusWidgetFullscreen=a?`true`:`false`,e.dataset.tavusWidgetSmall=u.value?`true`:`false`}}),t.value)return rF.error(`Widget cannot initialize (init request failed):`,t.value),null;if(e.value.is_available===!1&&e.value.unavailable_reason===`total_limit`)return rF.error(`Widget is unavailable (total_limit reached) — not rendering`),null;if(!r.value){let e=uF(i.value),t=e===`right`?`flex items-end gap-2 justify-end`:`flex items-end gap-2 flex-row-reverse justify-end`,n=e===`right`?`justify-end pr-2`:`justify-start pl-2`;return F(`div`,{class:`flex flex-col`,children:[F(`div`,{class:t,children:[F(XP,{anchor:e}),F(JP,{variant:a.value})]}),F(`div`,{class:`flex ${n} pt-1.5`,children:F(zP,{})})]})}return e.value.is_available===!1?F(nF,{variant:a.value,fullscreen:u.value,onClose:f,children:F(xm,{children:F(Qh,{cause:e.value.unavailable_reason??`daily_limit`,canRetry:!1,onRetry:()=>{}})})}):F(nF,{variant:a.value,fullscreen:u.value,onClose:f,children:F(xm,{children:F(LP,{flow:l,welcomeText:d,onUnavailableCancel:()=>l.restart()})})})}var fF=`:host {
|
|
197
167
|
display: block;
|
|
198
168
|
position: fixed;
|
|
199
169
|
z-index: 50;
|
|
200
170
|
background: transparent;
|
|
201
171
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
202
|
-
}`;function
|
|
172
|
+
}`;function pF(e){return F(E,{children:[F(`style`,{dangerouslySetInnerHTML:{__html:Ie}}),F(`style`,{dangerouslySetInnerHTML:{__html:fF}}),F(dt,{"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`],token:e.token,children:F(Cn,{children:F(Tn,{children:F(_p,{children:F(zp,{children:F(rm,{children:F(RP,{children:F(cm,{children:F(um,{children:F(dF,{})})})})})})})})})})]})}var mF;function hF(){mF||=Oe(pF,`tavus-widget`,[`camera-on-start`,`deployment-id`,`override-config`,`conversational-context`,`custom-greeting`,`memory-stores`,`base-url`,`token`],{shadow:!0,mode:`open`})}var gF=[`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`],_F=class{element=null;tagName;constructor(e=`tavus-widget`){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`&&hF(),e.TAVUS_EVENT_NAMES=gF,e.TavusIntegration=_F,e})({});
|