@lemonsliceai/lemon-slice-widget 1.0.28 → 1.0.29

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.
Files changed (2) hide show
  1. package/dist/index.js +26 -26
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
- var LemonSliceWidget=(function(xo){"use strict";var pr,oe,Vc,on,Fc,Bc,$c,Uc,To,Mo,Co,zc,mr={},Wc=[],Qm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,gr=Array.isArray;function Tt(e,t){for(var n in t)e[n]=t[n];return e}function Po(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function re(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?pr.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return vr(e,a,r,i,null)}function vr(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Vc,__i:-1,__u:0};return i==null&&oe.vnode!=null&&oe.vnode(o),o}function Zm(){return{current:null}}function Fe(e){return e.children}function vt(e,t){this.props=e,this.context=t}function jn(e,t){if(t==null)return e.__?jn(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"?jn(e):null}function Hc(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Hc(e)}}function Eo(e){(!e.__d&&(e.__d=!0)&&on.push(e)&&!ti.__r++||Fc!=oe.debounceRendering)&&((Fc=oe.debounceRendering)||Bc)(ti)}function ti(){for(var e,t,n,r,i,o,a,s=1;on.length;)on.length>s&&on.sort($c),e=on.shift(),s=on.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,o=[],a=[],t.__P&&((n=Tt({},r)).__v=r.__v+1,oe.vnode&&oe.vnode(n),Ao(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,i??jn(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,Yc(o,n,a),r.__e=r.__=null,n.__e!=i&&Hc(n)));ti.__r=0}function Jc(e,t,n,r,i,o,a,s,c,l,d){var f,m,g,y,v,b,_,S=r&&r.__k||Wc,T=t.length;for(c=eg(n,t,S,c,T),f=0;f<T;f++)(g=n.__k[f])!=null&&(m=g.__i==-1?mr:S[g.__i]||mr,g.__i=f,b=Ao(e,g,m,i,o,a,s,c,l,d),y=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&Io(m.ref,null,g),d.push(g.ref,g.__c||y,g)),v==null&&y!=null&&(v=y),(_=!!(4&g.__u))||m.__k===g.__k?c=qc(g,c,e,_):typeof g.type=="function"&&b!==void 0?c=b:y&&(c=y.nextSibling),g.__u&=-7);return n.__e=v,c}function eg(e,t,n,r,i){var o,a,s,c,l,d=n.length,f=d,m=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(c=o+m,(a=e.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?vr(null,a,null,null,null):gr(a)?vr(Fe,{children:a},null,null,null):a.constructor==null&&a.__b>0?vr(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,(l=a.__i=tg(a,n,c,f))!=-1&&(f--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>d?m--:i<d&&m++),typeof a.type!="function"&&(a.__u|=4)):l!=c&&(l==c-1?m--:l==c+1?m++:(l>c?m--:m++,a.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<d;o++)(s=n[o])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=jn(s)),Qc(s,s));return r}function qc(e,t,n,r){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=qc(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=jn(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Lt(e,t){return t=t||[],e==null||typeof e=="boolean"||(gr(e)?e.some(function(n){Lt(n,t)}):t.push(e)),t}function tg(e,t,n,r){var i,o,a,s=e.key,c=e.type,l=t[n],d=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||d&&s==l.key&&c==l.type)return n;if(r>(d?1:0)){for(i=n-1,o=n+1;i>=0||o<t.length;)if((l=t[a=i>=0?i--:o++])!=null&&(2&l.__u)==0&&s==l.key&&c==l.type)return a}return-1}function Gc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Qm.test(t)?n:n+"px"}function ni(e,t,n,r,i){var o,a;e: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||Gc(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Gc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(Uc,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=To,e.addEventListener(t,o?Co:Mo,o)):e.removeEventListener(t,o?Co:Mo,o);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 e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Kc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=To++;else if(t.t<n.u)return;return n(oe.event?oe.event(t):t)}}}function Ao(e,t,n,r,i,o,a,s,c,l){var d,f,m,g,y,v,b,_,S,T,M,x,C,E,O,V,B,N=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),o=[s=t.__e=n.__e]),(d=oe.__b)&&d(t);e:if(typeof N=="function")try{if(_=t.props,S="prototype"in N&&N.prototype.render,T=(d=N.contextType)&&r[d.__c],M=d?T?T.props.value:d.__:r,n.__c?b=(f=t.__c=n.__c).__=f.__E:(S?t.__c=f=new N(_,M):(t.__c=f=new vt(_,M),f.constructor=N,f.render=rg),T&&T.sub(f),f.props=_,f.state||(f.state={}),f.context=M,f.__n=r,m=f.__d=!0,f.__h=[],f._sb=[]),S&&f.__s==null&&(f.__s=f.state),S&&N.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Tt({},f.__s)),Tt(f.__s,N.getDerivedStateFromProps(_,f.__s))),g=f.props,y=f.state,f.__v=t,m)S&&N.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),S&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(S&&N.getDerivedStateFromProps==null&&_!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(_,M),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(_,f.__s,M)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=_,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(z){z&&(z.__=t)}),x=0;x<f._sb.length;x++)f.__h.push(f._sb[x]);f._sb=[],f.__h.length&&a.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(_,f.__s,M),S&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,y,v)})}if(f.context=M,f.props=_,f.__P=e,f.__e=!1,C=oe.__r,E=0,S){for(f.state=f.__s,f.__d=!1,C&&C(t),d=f.render(f.props,f.state,f.context),O=0;O<f._sb.length;O++)f.__h.push(f._sb[O]);f._sb=[]}else do f.__d=!1,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++E<25);f.state=f.__s,f.getChildContext!=null&&(r=Tt(Tt({},r),f.getChildContext())),S&&!m&&f.getSnapshotBeforeUpdate!=null&&(v=f.getSnapshotBeforeUpdate(g,y)),V=d,d!=null&&d.type===Fe&&d.key==null&&(V=Xc(d.props.children)),s=Jc(e,gr(V)?V:[V],t,n,r,i,o,a,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&a.push(f),b&&(f.__E=f.__=null)}catch(z){if(t.__v=null,c||o!=null)if(z.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(B=o.length;B--;)Po(o[B]);Oo(t)}else t.__e=n.__e,t.__k=n.__k,z.then||Oo(t);oe.__e(z,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=ng(n.__e,t,n,r,i,o,a,c,l);return(d=oe.diffed)&&d(t),128&t.__u?void 0:s}function Oo(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Oo)}function Yc(e,t,n){for(var r=0;r<n.length;r++)Io(n[r],n[++r],n[++r]);oe.__c&&oe.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){oe.__e(o,i.__v)}})}function Xc(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:gr(e)?e.map(Xc):Tt({},e)}function ng(e,t,n,r,i,o,a,s,c){var l,d,f,m,g,y,v,b=n.props,_=t.props,S=t.type;if(S=="svg"?i="http://www.w3.org/2000/svg":S=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(l=0;l<o.length;l++)if((g=o[l])&&"setAttribute"in g==!!S&&(S?g.localName==S:g.nodeType==3)){e=g,o[l]=null;break}}if(e==null){if(S==null)return document.createTextNode(_);e=document.createElementNS(i,S,_.is&&_),s&&(oe.__m&&oe.__m(t,o),s=!1),o=null}if(S==null)b===_||s&&e.data==_||(e.data=_);else{if(o=o&&pr.call(e.childNodes),b=n.props||mr,!s&&o!=null)for(b={},l=0;l<e.attributes.length;l++)b[(g=e.attributes[l]).name]=g.value;for(l in b)if(g=b[l],l!="children"){if(l=="dangerouslySetInnerHTML")f=g;else if(!(l in _)){if(l=="value"&&"defaultValue"in _||l=="checked"&&"defaultChecked"in _)continue;ni(e,l,null,g,i)}}for(l in _)g=_[l],l=="children"?m=g:l=="dangerouslySetInnerHTML"?d=g:l=="value"?y=g:l=="checked"?v=g:s&&typeof g!="function"||b[l]===g||ni(e,l,g,b[l],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=""),Jc(t.type=="template"?e.content:e,gr(m)?m:[m],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&jn(n,0),s,c),o!=null)for(l=o.length;l--;)Po(o[l]);s||(l="value",S=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[l]||S=="progress"&&!y||S=="option"&&y!=b[l])&&ni(e,l,y,b[l],i),l="checked",v!=null&&v!=e[l]&&ni(e,l,v,b[l],i))}return e}function Io(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(i){oe.__e(i,n)}}function Qc(e,t,n){var r,i;if(oe.unmount&&oe.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Io(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){oe.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Qc(r[i],t,n||typeof e.type!="function");n||Po(e.__e),e.__c=e.__=e.__e=void 0}function rg(e,t,n){return this.constructor(e,n)}function zt(e,t,n){var r,i,o,a;t==document&&(t=document.documentElement),oe.__&&oe.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],a=[],Ao(t,e=(!r&&n||t).__k=re(Fe,null,[e]),i||mr,mr,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?pr.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,a),Yc(o,e,a)}function Do(e,t){zt(e,t,Do)}function Lo(e,t,n){var r,i,o,a,s=Tt({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o]===void 0&&a!=null?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?pr.call(arguments,2):n),vr(e.type,s,r||e.key,i||e.ref,null)}function Le(e){function t(n){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(a){a.__e=!0,Eo(a)})},this.sub=function(o){r.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),a&&a.call(o)}}),n.children}return t.__c="__cC"+zc++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}pr=Wc.slice,oe={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Vc=0,vt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Tt({},this.state),typeof e=="function"&&(e=e(Tt({},n),this.props)),e&&Tt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Eo(this))},vt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Eo(this))},vt.prototype.render=Fe,on=[],Bc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$c=function(e,t){return e.__v.__b-t.__v.__b},ti.__r=0,Uc=/(PointerCapture)$|Capture$/i,To=0,Mo=Kc(!1),Co=Kc(!0),zc=0;function ri(){return ri=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},ri.apply(this,arguments)}function Zc(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var ig=["context","children"],og=["useFragment"];function ag(e,t,n,r){function i(){var o,a=Reflect.construct(HTMLElement,[],i);return a._vdomComponent=e,r&&r.shadow?(a._root=a.attachShadow({mode:r.mode||"open",serializable:(o=r.serializable)!=null&&o}),r.adoptedStyleSheets&&(a._root.adoptedStyleSheets=r.adoptedStyleSheets)):a._root=a,a}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){cg.call(this,r)},i.prototype.attributeChangedCallback=lg,i.prototype.disconnectedCallback=ug,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(o){Object.defineProperty(i.prototype,o,{get:function(){return this._vdom?this._vdom.props[o]:this._props[o]},set:function(a){this._vdom?this.attributeChangedCallback(o,null,a):(this._props||(this._props={}),this._props[o]=a);var s=typeof a;a!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(o,a)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function sg(e){this.getChildContext=function(){return e.context};var t=e.children,n=Zc(e,ig);return Lo(t,n)}function cg(e){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=re(sg,ri({},this._props,{context:t.detail.context}),nl(this,this._vdomComponent,e)),(this.hasAttribute("hydrate")?Do:zt)(this._vdom,this._root)}function el(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function lg(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[el(e)]=n,this._vdom=Lo(this._vdom,r),zt(this._vdom,this._root)}}function ug(){zt(this._vdom=null,this._root)}function tl(e,t){var n=this,r=e.useFragment,i=Zc(e,og);return re(r?Fe:"slot",ri({},i,{ref:function(o){o?(n.ref=o,n._listener||(n._listener=function(a){a.stopPropagation(),a.detail.context=t},o.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function nl(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;var r=[],i={},o=0,a=e.attributes,s=e.childNodes;for(o=a.length;o--;)a[o].name!=="slot"&&(i[a[o].name]=a[o].value,i[el(a[o].name)]=a[o].value);for(o=s.length;o--;){var c=nl(s[o],null,n),l=s[o].slot;l?i[l]=re(tl,{name:l},c):r[o]=c}var d=!(!n||!n.shadow),f=t?re(tl,{useFragment:!d},r):r;return!d&&t&&(e.innerHTML=""),re(t||e.nodeName.toLowerCase(),i,f)}var dg=0;function A(e,t,n,r,i,o){t||(t={});var a,s,c=t;if("ref"in c)for(s in c={},t)s=="ref"?a=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--dg,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)c[s]===void 0&&(c[s]=a[s]);return oe.vnode&&oe.vnode(l),l}var Wt,xe,jo,rl,Rn=0,il=[],Ce=oe,ol=Ce.__b,al=Ce.__r,sl=Ce.diffed,cl=Ce.__c,ll=Ce.unmount,ul=Ce.__;function Nn(e,t){Ce.__h&&Ce.__h(xe,e,Rn||t),Rn=0;var n=xe.__H||(xe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function te(e){return Rn=1,ii(fl,e)}function ii(e,t,n){var r=Nn(Wt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):fl(void 0,t),function(s){var c=r.__N?r.__N[0]:r.__[0],l=r.t(c,s);c!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=xe,!xe.__f)){var i=function(s,c,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!o||o.call(this,s,c,l);var f=r.__c.props!==s;return d.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(f=!0)}}),o&&o.call(this,s,c,l)||f};xe.__f=!0;var o=xe.shouldComponentUpdate,a=xe.componentWillUpdate;xe.componentWillUpdate=function(s,c,l){if(this.__e){var d=o;o=void 0,i(s,c,l),o=d}a&&a.call(this,s,c,l)},xe.shouldComponentUpdate=i}return r.__N||r.__}function J(e,t){var n=Nn(Wt++,3);!Ce.__s&&Fo(n.__H,t)&&(n.__=e,n.u=t,xe.__H.__h.push(n))}function an(e,t){var n=Nn(Wt++,4);!Ce.__s&&Fo(n.__H,t)&&(n.__=e,n.u=t,xe.__h.push(n))}function ae(e){return Rn=5,Ne(function(){return{current:e}},[])}function Ro(e,t,n){Rn=6,an(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Ne(e,t){var n=Nn(Wt++,7);return Fo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function j(e,t){return Rn=8,Ne(function(){return e},t)}function ye(e){var t=xe.context[e.__c],n=Nn(Wt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(xe)),t.props.value):e.__}function rt(e,t){Ce.useDebugValue&&Ce.useDebugValue(t?t(e):e)}function No(){var e=Nn(Wt++,11);if(!e.__){for(var t=xe.__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 fg(){for(var e;e=il.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(oi),e.__H.__h.forEach(Vo),e.__H.__h=[]}catch(t){e.__H.__h=[],Ce.__e(t,e.__v)}}Ce.__b=function(e){xe=null,ol&&ol(e)},Ce.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ul&&ul(e,t)},Ce.__r=function(e){al&&al(e),Wt=0;var t=(xe=e.__c).__H;t&&(jo===xe?(t.__h=[],xe.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(oi),t.__h.forEach(Vo),t.__h=[],Wt=0)),jo=xe},Ce.diffed=function(e){sl&&sl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(il.push(t)!==1&&rl===Ce.requestAnimationFrame||((rl=Ce.requestAnimationFrame)||hg)(fg)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),jo=xe=null},Ce.__c=function(e,t){t.some(function(n){try{n.__h.forEach(oi),n.__h=n.__h.filter(function(r){return!r.__||Vo(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Ce.__e(r,n.__v)}}),cl&&cl(e,t)},Ce.unmount=function(e){ll&&ll(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{oi(r)}catch(i){t=i}}),n.__H=void 0,t&&Ce.__e(t,n.__v))};var dl=typeof requestAnimationFrame=="function";function hg(e){var t,n=function(){clearTimeout(r),dl&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);dl&&(t=requestAnimationFrame(n))}function oi(e){var t=xe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),xe=t}function Vo(e){var t=xe;e.__c=e.__(),xe=t}function Fo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function fl(e,t){return typeof t=="function"?t(e):t}const Vn={};function hl(e){return"init"in e}function Bo(e){return!!e.write}function pl(e){return"v"in e||"e"in e}function ai(e){if("e"in e)throw e.e;if((Vn?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const si=new WeakMap;function ml(e){var t;return ci(e)&&!!((t=si.get(e))!=null&&t[0])}function pg(e){const t=si.get(e);t?.[0]&&(t[0]=!1,t[1].forEach(n=>n()))}function $o(e,t){let n=si.get(e);if(!n){n=[!0,new Set],si.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)}function ci(e){return typeof e?.then=="function"}function gl(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function vl(e,t,n){var r;const i=new Set;for(const o of((r=n.get(e))==null?void 0:r.t)||[])n.has(o)&&i.add(o);for(const o of t.p)i.add(o);return i}const mg=(e,t,...n)=>t.read(...n),gg=(e,t,...n)=>t.write(...n),vg=(e,t)=>{var n;return(n=t.unstable_onInit)==null?void 0:n.call(t,e)},yg=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},bg=(e,t)=>{const n=Ue(e),r=n[0],i=n[9];if((Vn?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let o=r.get(t);return o||(o={d:new Map,p:new Set,n:0},r.set(t,o),i?.(e,t)),o},_g=e=>{const t=Ue(e),n=t[1],r=t[3],i=t[4],o=t[5],a=t[6],s=t[13],c=[],l=d=>{try{d()}catch(f){c.push(f)}};do{a.f&&l(a.f);const d=new Set,f=d.add.bind(d);r.forEach(m=>{var g;return(g=n.get(m))==null?void 0:g.l.forEach(f)}),r.clear(),o.forEach(f),o.clear(),i.forEach(f),i.clear(),d.forEach(l),r.size&&s(e)}while(r.size||o.size||i.size);if(c.length)throw new AggregateError(c)},wg=e=>{const t=Ue(e),n=t[1],r=t[2],i=t[3],o=t[11],a=t[14],s=t[17],c=[],l=new WeakSet,d=new WeakSet,f=Array.from(i);for(;f.length;){const m=f[f.length-1],g=o(e,m);if(d.has(m)){f.pop();continue}if(l.has(m)){if(r.get(m)===g.n)c.push([m,g]);else if((Vn?"production":void 0)!=="production"&&r.has(m))throw new Error("[Bug] invalidated atom exists");d.add(m),f.pop();continue}l.add(m);for(const y of vl(m,g,n))l.has(y)||f.push(y)}for(let m=c.length-1;m>=0;--m){const[g,y]=c[m];let v=!1;for(const b of y.d.keys())if(b!==g&&i.has(b)){v=!0;break}v&&(a(e,g),s(e,g)),r.delete(g)}},kg=(e,t)=>{var n,r;const i=Ue(e),o=i[1],a=i[2],s=i[3],c=i[6],l=i[7],d=i[11],f=i[12],m=i[13],g=i[14],y=i[16],v=i[17],b=d(e,t);if(pl(b)&&(o.has(t)&&a.get(t)!==b.n||Array.from(b.d).every(([O,V])=>g(e,O).n===V)))return b;b.d.clear();let _=!0;function S(){o.has(t)&&(v(e,t),m(e),f(e))}function T(O){var V;if(O===t){const N=d(e,O);if(!pl(N))if(hl(O))li(e,O,O.init);else throw new Error("no atom init");return ai(N)}const B=g(e,O);try{return ai(B)}finally{b.d.set(O,B.n),ml(b.v)&&gl(t,b.v,B),(V=o.get(O))==null||V.t.add(t),_||S()}}let M,x;const C={get signal(){return M||(M=new AbortController),M.signal},get setSelf(){return(Vn?"production":void 0)!=="production"&&!Bo(t)&&console.warn("setSelf function cannot be used with read-only atom"),!x&&Bo(t)&&(x=(...O)=>{if((Vn?"production":void 0)!=="production"&&_&&console.warn("setSelf function cannot be called in sync"),!_)try{return y(e,t,...O)}finally{m(e),f(e)}}),x}},E=b.n;try{const O=l(e,t,T,C);return li(e,t,O),ci(O)&&($o(O,()=>M?.abort()),O.then(S,S)),(n=c.r)==null||n.call(c,t),b}catch(O){return delete b.v,b.e=O,++b.n,b}finally{_=!1,E!==b.n&&a.get(t)===E&&(a.set(t,b.n),s.add(t),(r=c.c)==null||r.call(c,t))}},Sg=(e,t)=>{const n=Ue(e),r=n[1],i=n[2],o=n[11],a=[t];for(;a.length;){const s=a.pop(),c=o(e,s);for(const l of vl(s,c,r)){const d=o(e,l);i.set(l,d.n),a.push(l)}}},yl=(e,t,...n)=>{const r=Ue(e),i=r[3],o=r[6],a=r[8],s=r[11],c=r[12],l=r[13],d=r[14],f=r[15],m=r[17];let g=!0;const y=b=>ai(d(e,b)),v=(b,..._)=>{var S;const T=s(e,b);try{if(b===t){if(!hl(b))throw new Error("atom not writable");const M=T.n,x=_[0];li(e,b,x),m(e,b),M!==T.n&&(i.add(b),(S=o.c)==null||S.call(o,b),f(e,b));return}else return yl(e,b,..._)}finally{g||(l(e),c(e))}};try{return a(e,t,y,v,...n)}finally{g=!1}},xg=(e,t)=>{var n;const r=Ue(e),i=r[1],o=r[3],a=r[6],s=r[11],c=r[15],l=r[18],d=r[19],f=s(e,t),m=i.get(t);if(m&&!ml(f.v)){for(const[g,y]of f.d)if(!m.d.has(g)){const v=s(e,g);l(e,g).t.add(t),m.d.add(g),y!==v.n&&(o.add(g),(n=a.c)==null||n.call(a,g),c(e,g))}for(const g of m.d||[])if(!f.d.has(g)){m.d.delete(g);const y=d(e,g);y?.t.delete(t)}}},bl=(e,t)=>{var n;const r=Ue(e),i=r[1],o=r[4],a=r[6],s=r[10],c=r[11],l=r[12],d=r[13],f=r[14],m=r[16],g=c(e,t);let y=i.get(t);if(!y){f(e,t);for(const v of g.d.keys())bl(e,v).t.add(t);if(y={l:new Set,d:new Set(g.d.keys()),t:new Set},i.set(t,y),(n=a.m)==null||n.call(a,t),Bo(t)){const v=()=>{let b=!0;const _=(...S)=>{try{return m(e,t,...S)}finally{b||(d(e),l(e))}};try{const S=s(e,t,_);S&&(y.u=()=>{b=!0;try{S()}finally{b=!1}})}finally{b=!1}};o.add(v)}}return y},Tg=(e,t)=>{var n;const r=Ue(e),i=r[1],o=r[5],a=r[6],s=r[11],c=r[19],l=s(e,t);let d=i.get(t);if(d&&!d.l.size&&!Array.from(d.t).some(f=>{var m;return(m=i.get(f))==null?void 0:m.d.has(t)})){d.u&&o.add(d.u),d=void 0,i.delete(t),(n=a.u)==null||n.call(a,t);for(const f of l.d.keys()){const m=c(e,f);m?.t.delete(t)}return}return d},li=(e,t,n)=>{const r=Ue(e)[11],i=r(e,t),o="v"in i,a=i.v;if(ci(n))for(const s of i.d.keys())gl(t,n,r(e,s));i.v=n,delete i.e,(!o||!Object.is(a,i.v))&&(++i.n,ci(a)&&pg(a))},Mg=(e,t)=>{const n=Ue(e)[14];return ai(n(e,t))},Cg=(e,t,...n)=>{const r=Ue(e),i=r[12],o=r[13],a=r[16];try{return a(e,t,...n)}finally{o(e),i(e)}},Pg=(e,t,n)=>{const r=Ue(e),i=r[12],o=r[18],a=r[19],c=o(e,t).l;return c.add(n),i(e),()=>{c.delete(n),a(e,t),i(e)}},_l=new WeakMap,Ue=e=>{const t=_l.get(e);if((Vn?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function Eg(...e){const t={get(r){const i=Ue(t)[21];return i(t,r)},set(r,...i){const o=Ue(t)[22];return o(t,r,...i)},sub(r,i){const o=Ue(t)[23];return o(t,r,i)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},mg,gg,vg,yg,bg,_g,wg,kg,Sg,yl,xg,bl,Tg,li,Mg,Cg,Pg,void 0].map((r,i)=>e[i]||r);return _l.set(t,Object.freeze(n)),t}const wl={};let Ag=0;function de(e,t){const n=`atom${++Ag}`,r={toString(){return(wl?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=Og,r.write=Ig),t&&(r.write=t),r}function Og(e){return e(this)}function Ig(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function kl(){return Eg()}let yr;function Dg(){return yr||(yr=kl(),(wl?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=yr),globalThis.__JOTAI_DEFAULT_STORE__!==yr&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),yr}const Lg={};function br(e,t){let n=null;const r=new Map,i=new Set,o=s=>{let c;if(c=r.get(s),c!==void 0)if(n?.(c[1],s))o.remove(s);else return c[0];const l=e(s);return r.set(s,[l,Date.now()]),a("CREATE",s,l),l},a=(s,c,l)=>{for(const d of i)d({type:s,param:c,atom:l})};return o.unstable_listen=s=>(i.add(s),()=>{i.delete(s)}),o.getParams=()=>r.keys(),o.remove=s=>{{if(!r.has(s))return;const[c]=r.get(s);r.delete(s),a("REMOVE",s,c)}},o.setShouldRemove=s=>{if(n=s,!!n)for(const[c,[l,d]]of r)n(d,c)&&(r.delete(c),a("REMOVE",c,l))},o}const jg=e=>typeof e?.then=="function";function Rg(e=()=>{try{return window.localStorage}catch(n){(Lg?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(n);return}},t){var n;let r,i;const o={getItem:(c,l)=>{var d,f;const m=y=>{if(y=y||"",r!==y){try{i=JSON.parse(y,t?.reviver)}catch{return l}r=y}return i},g=(f=(d=e())==null?void 0:d.getItem(c))!=null?f:null;return jg(g)?g.then(m):m(g)},setItem:(c,l)=>{var d;return(d=e())==null?void 0:d.setItem(c,JSON.stringify(l,void 0))},removeItem:c=>{var l;return(l=e())==null?void 0:l.removeItem(c)}},a=c=>(l,d,f)=>c(l,m=>{let g;try{g=JSON.parse(m||"")}catch{g=f}d(g)});let s;try{s=(n=e())==null?void 0:n.subscribe}catch{}return!s&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(s=(c,l)=>{if(!(e()instanceof window.Storage))return()=>{};const d=f=>{f.storageArea===e()&&f.key===c&&l(f.newValue)};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}}),s&&(o.subscribe=a(s)),o}Rg();function Sl(e,t){for(var n in t)e[n]=t[n];return e}function Uo(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 xl(e,t){var n=t(),r=te({t:{__:n,u:t}}),i=r[0].t,o=r[1];return an(function(){i.__=n,i.u=t,zo(i)&&o({t:i})},[e,n,t]),J(function(){return zo(i)&&o({t:i}),e(function(){zo(i)&&o({t:i})})},[e]),n}function zo(e){var t,n,r=e.u,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function Tl(e){e()}function Ml(e){return e}function Cl(){return[!1,Tl]}var Wo=an;function Ho(e,t){this.props=e,this.context=t}function Jo(e,t){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:Uo(this.props,i)}function r(i){return this.shouldComponentUpdate=n,re(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Ho.prototype=new vt).isPureReactComponent=!0,Ho.prototype.shouldComponentUpdate=function(e,t){return Uo(this.props,e)||Uo(this.state,t)};var Pl=oe.__b;oe.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Pl&&Pl(e)};var Ng=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ge(e){function t(n){var r=Sl({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Ng,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var El=function(e,t){return e==null?null:Lt(Lt(e).map(t))},Vg={map:El,forEach:El,count:function(e){return e?Lt(e).length:0},only:function(e){var t=Lt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Lt},Fg=oe.__e;oe.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Fg(e,t,n,r)};var Al=oe.unmount;function Ol(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Sl({},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(r){return Ol(r,t,n)})),e}function Il(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Il(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ui(){this.__u=0,this.o=null,this.__b=null}function Dl(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Bg(e){var t,n,r;function i(o){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return re(n,o)}return i.displayName="Lazy",i.__f=!0,i}function _r(){this.i=null,this.l=null}oe.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Al&&Al(e)},(ui.prototype=new vt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Dl(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Il(c,c.__c.__P,c.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.o.pop();)l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},ui.prototype.componentWillUnmount=function(){this.o=[]},ui.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]=Ol(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&re(Fe,null,e.fallback);return i&&(i.__u&=-33),[re(Fe,null,t.__a?null:e.children),i]};var Ll=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 $g(e){return this.getChildContext=function(){return e.context},e.children}function Ug(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){zt(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},insertBefore:function(i,o){this.childNodes.push(i),t.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.h.removeChild(i)}}}zt(re($g,{context:t.context},e.__v),t.v)}function jl(e,t){var n=re(Ug,{__v:e,h:t});return n.containerInfo=t,n}(_r.prototype=new vt).__a=function(e){var t=this,n=Dl(t.__v),r=t.l.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Ll(t,e,r)):i()};n?n(o):o()}},_r.prototype.render=function(e){this.i=null,this.l=new Map;var t=Lt(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},_r.prototype.componentDidUpdate=_r.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ll(e,n,t)})};var Rl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,zg=/^(?: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]/,Wg=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Hg=/[A-Z0-9]/g,Jg=typeof document<"u",qg=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Gg(e,t,n){return t.__k==null&&(t.textContent=""),zt(e,t),typeof n=="function"&&n(),e?e.__c:null}function Kg(e,t,n){return Do(e,t),typeof n=="function"&&n(),e?e.__c:null}vt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(vt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Nl=oe.event;function Yg(){}function Xg(){return this.cancelBubble}function Qg(){return this.defaultPrevented}oe.event=function(e){return Nl&&(e=Nl(e)),e.persist=Yg,e.isPropagationStopped=Xg,e.isDefaultPrevented=Qg,e.nativeEvent=e};var qo,Zg={enumerable:!1,configurable:!0,get:function(){return this.class}},Vl=oe.vnode;oe.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,i={},o=r.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||Jg&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var c=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":c==="translate"&&s==="no"?s=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?a="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||qg(n.type)?c==="onfocus"?a="onfocusin":c==="onblur"?a="onfocusout":Wg.test(a)&&(a=c):c=a="oninput":o&&zg.test(a)?a=a.replace(Hg,"-$&").toLowerCase():s===null&&(s=void 0),c==="oninput"&&i[a=c]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Lt(n.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Lt(n.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Zg)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i})(e),e.$$typeof=Rl,Vl&&Vl(e)};var Fl=oe.__r;oe.__r=function(e){Fl&&Fl(e),qo=e.__c};var Bl=oe.diffed;oe.diffed=function(e){Bl&&Bl(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),qo=null};var ev={ReactCurrentDispatcher:{current:{readContext:function(e){return qo.__n[e.__c].props.value},useCallback:j,useContext:ye,useDebugValue:rt,useDeferredValue:Ml,useEffect:J,useId:No,useImperativeHandle:Ro,useInsertionEffect:Wo,useLayoutEffect:an,useMemo:Ne,useReducer:ii,useRef:ae,useState:te,useSyncExternalStore:xl,useTransition:Cl}}};function tv(e){return re.bind(null,e)}function di(e){return!!e&&e.$$typeof===Rl}function nv(e){return di(e)&&e.type===Fe}function rv(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function iv(e){return di(e)?Lo.apply(null,arguments):e}function ov(e){return!!e.__k&&(zt(null,e),!0)}function av(e){return e&&(e.base||e.nodeType===1&&e)||null}var sv=function(e,t){return e(t)},cv=function(e,t){return e(t)},lv=Fe,uv=di,pe={useState:te,useId:No,useReducer:ii,useEffect:J,useLayoutEffect:an,useInsertionEffect:Wo,useTransition:Cl,useDeferredValue:Ml,useSyncExternalStore:xl,startTransition:Tl,useRef:ae,useImperativeHandle:Ro,useMemo:Ne,useCallback:j,useContext:ye,useDebugValue:rt,version:"18.3.1",Children:Vg,render:Gg,hydrate:Kg,unmountComponentAtNode:ov,createPortal:jl,createElement:re,createContext:Le,createFactory:tv,cloneElement:iv,createRef:Zm,Fragment:Fe,isValidElement:di,isElement:uv,isFragment:nv,isMemo:rv,findDOMNode:av,Component:vt,PureComponent:Ho,memo:Jo,forwardRef:Ge,flushSync:cv,unstable_batchedUpdates:sv,StrictMode:lv,Suspense:ui,SuspenseList:_r,lazy:Bg,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ev};const dv={},Go=Le(void 0);function $l(e){return ye(Go)||Dg()}function fv({children:e,store:t}){const n=ae(null);return t?re(Go.Provider,{value:t},e):(n.current===null&&(n.current=kl()),re(Go.Provider,{value:n.current},e))}const Ko=e=>typeof e?.then=="function",Yo=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},hv=pe.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(Yo(e),e)}),Xo=new WeakMap,Ul=(e,t)=>{let n=Xo.get(e);return n||(n=new Promise((r,i)=>{let o=e;const a=l=>d=>{o===l&&r(d)},s=l=>d=>{o===l&&i(d)},c=()=>{try{const l=t();Ko(l)?(Xo.set(l,n),o=l,l.then(a(l),s(l)),$o(l,c)):r(l)}catch(l){i(l)}};e.then(a(e),s(e)),$o(e,c)}),Xo.set(e,n)),n};function sn(e,t){const{delay:n,unstable_promiseStatus:r=!pe.use}={},i=$l(),[[o,a,s],c]=ii(d=>{const f=i.get(e);return Object.is(d[0],f)&&d[1]===i&&d[2]===e?d:[f,i,e]},void 0,()=>[i.get(e),i,e]);let l=o;if((a!==i||s!==e)&&(c(),l=i.get(e)),J(()=>{const d=i.sub(e,()=>{if(r)try{const f=i.get(e);Ko(f)&&Yo(Ul(f,()=>i.get(e)))}catch{}if(typeof n=="number"){setTimeout(c,n);return}c()});return c(),d},[i,e,n,r]),rt(l),Ko(l)){const d=Ul(l,()=>i.get(e));return r&&Yo(d),hv(d)}return l}function pv(e,t){const n=$l();return j((...i)=>{if((dv?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...i)},[n,e])}function ce(e,t){const n=Ne(()=>de(null,(r,i,...o)=>e(r,i,...o)),[e]);return pv(n)}function zl(e,t){if(e==null)return{};var n,r,i=(function(a,s){if(a==null)return{};var c={};for(var l in a)if({}.hasOwnProperty.call(a,l)){if(s.indexOf(l)!==-1)continue;c[l]=a[l]}return c})(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function it(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e){return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},me(e)}function Wl(e){var t=(function(n,r){if(me(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(me(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(e,"string");return me(t)=="symbol"?t:t+""}function Hl(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,Wl(r.key),r)}}function ot(e,t,n){return t&&Hl(e.prototype,t),n&&Hl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fi(e,t){if(t&&(me(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n})(e)}function yt(e){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yt(e)}function wr(e,t){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},wr(e,t)}function hi(e,t){if(typeof t!="function"&&t!==null)throw new 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&&wr(e,t)}function Mt(e,t,n){return(t=Wl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jl(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function Q(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(c){Jl(o,r,i,a,s,"next",c)}function s(c){Jl(o,r,i,a,s,"throw",c)}a(void 0)}))}}function ql(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 ze(e,t){return(function(n){if(Array.isArray(n))return n})(e)||(function(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,a,s,c,l=[],d=!0,f=!1;try{if(s=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(o=s.call(i)).done)&&(l.push(o.value),l.length!==r);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(f)throw a}}return l}})(e,t)||(function(n,r){if(n){if(typeof n=="string")return ql(n,r);var i={}.toString.call(n).slice(8,-1);return i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set"?Array.from(n):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ql(n,r):void 0}})(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function mv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gl,pi={exports:{}},Qo=(function(){if(Gl)return pi.exports;Gl=1;var e,t=typeof Reflect=="object"?Reflect:null,n=t&&typeof t.apply=="function"?t.apply:function(v,b,_){return Function.prototype.apply.call(v,b,_)};e=t&&typeof t.ownKeys=="function"?t.ownKeys:Object.getOwnPropertySymbols?function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:function(v){return Object.getOwnPropertyNames(v)};var r=Number.isNaN||function(v){return v!=v};function i(){i.init.call(this)}pi.exports=i,pi.exports.once=function(v,b){return new Promise((function(_,S){function T(x){v.removeListener(b,M),S(x)}function M(){typeof v.removeListener=="function"&&v.removeListener("error",T),_([].slice.call(arguments))}y(v,b,M,{once:!0}),b!=="error"&&(function(x,C,E){typeof x.on=="function"&&y(x,"error",C,E)})(v,T,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(v){if(typeof v!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof v)}function s(v){return v._maxListeners===void 0?i.defaultMaxListeners:v._maxListeners}function c(v,b,_,S){var T,M,x,C;if(a(_),(M=v._events)===void 0?(M=v._events=Object.create(null),v._eventsCount=0):(M.newListener!==void 0&&(v.emit("newListener",b,_.listener?_.listener:_),M=v._events),x=M[b]),x===void 0)x=M[b]=_,++v._eventsCount;else if(typeof x=="function"?x=M[b]=S?[_,x]:[x,_]:S?x.unshift(_):x.push(_),(T=s(v))>0&&x.length>T&&!x.warned){x.warned=!0;var E=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");E.name="MaxListenersExceededWarning",E.emitter=v,E.type=b,E.count=x.length,C=E,console&&console.warn&&console.warn(C)}return v}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 d(v,b,_){var S={fired:!1,wrapFn:void 0,target:v,type:b,listener:_},T=l.bind(S);return T.listener=_,S.wrapFn=T,T}function f(v,b,_){var S=v._events;if(S===void 0)return[];var T=S[b];return T===void 0?[]:typeof T=="function"?_?[T.listener||T]:[T]:_?(function(M){for(var x=new Array(M.length),C=0;C<x.length;++C)x[C]=M[C].listener||M[C];return x})(T):g(T,T.length)}function m(v){var b=this._events;if(b!==void 0){var _=b[v];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}function g(v,b){for(var _=new Array(b),S=0;S<b;++S)_[S]=v[S];return _}function y(v,b,_,S){if(typeof v.on=="function")S.once?v.once(b,_):v.on(b,_);else{if(typeof v.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof v);v.addEventListener(b,(function T(M){S.once&&v.removeEventListener(b,T),_(M)}))}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(v){if(typeof v!="number"||v<0||r(v))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+v+".");o=v}}),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(v){if(typeof v!="number"||v<0||r(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(v){for(var b=[],_=1;_<arguments.length;_++)b.push(arguments[_]);var S=v==="error",T=this._events;if(T!==void 0)S=S&&T.error===void 0;else if(!S)return!1;if(S){var M;if(b.length>0&&(M=b[0]),M instanceof Error)throw M;var x=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw x.context=M,x}var C=T[v];if(C===void 0)return!1;if(typeof C=="function")n(C,this,b);else{var E=C.length,O=g(C,E);for(_=0;_<E;++_)n(O[_],this,b)}return!0},i.prototype.addListener=function(v,b){return c(this,v,b,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(v,b){return c(this,v,b,!0)},i.prototype.once=function(v,b){return a(b),this.on(v,d(this,v,b)),this},i.prototype.prependOnceListener=function(v,b){return a(b),this.prependListener(v,d(this,v,b)),this},i.prototype.removeListener=function(v,b){var _,S,T,M,x;if(a(b),(S=this._events)===void 0)return this;if((_=S[v])===void 0)return this;if(_===b||_.listener===b)--this._eventsCount==0?this._events=Object.create(null):(delete S[v],S.removeListener&&this.emit("removeListener",v,_.listener||b));else if(typeof _!="function"){for(T=-1,M=_.length-1;M>=0;M--)if(_[M]===b||_[M].listener===b){x=_[M].listener,T=M;break}if(T<0)return this;T===0?_.shift():(function(C,E){for(;E+1<C.length;E++)C[E]=C[E+1];C.pop()})(_,T),_.length===1&&(S[v]=_[0]),S.removeListener!==void 0&&this.emit("removeListener",v,x||b)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(v){var b,_,S;if((_=this._events)===void 0)return this;if(_.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):_[v]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete _[v]),this;if(arguments.length===0){var T,M=Object.keys(_);for(S=0;S<M.length;++S)(T=M[S])!=="removeListener"&&this.removeAllListeners(T);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(b=_[v])=="function")this.removeListener(v,b);else if(b!==void 0)for(S=b.length-1;S>=0;S--)this.removeListener(v,b[S]);return this},i.prototype.listeners=function(v){return f(this,v,!0)},i.prototype.rawListeners=function(v){return f(this,v,!1)},i.listenerCount=function(v,b){return typeof v.listenerCount=="function"?v.listenerCount(b):m.call(v,b)},i.prototype.listenerCount=m,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},pi.exports})(),mi=mv(Qo),Kl=Object.prototype.hasOwnProperty;function Yl(e,t,n){for(n of e.keys())if(Ke(n,t))return n}function Ke(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--&&Ke(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=Yl(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=Yl(t,i))||!Ke(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(Kl.call(e,n)&&++r&&!Kl.call(t,n)||!(n in t)||!Ke(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}const gv={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Xl={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Oe={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Ye={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Ht={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class L{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){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(t){const n=t.split(".").splice(0,2).map((r=>parseInt(r,10)||0));if(n.push(0),n[0]===10)switch(n[1]){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}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map((r=>parseInt(r,10)||0));if(n.push(0),!(n[0]===1&&n[1]<5))return n[0]===1&&n[1]<6?"Cupcake":n[0]===1&&n[1]>=6?"Donut":n[0]===2&&n[1]<2?"Eclair":n[0]===2&&n[1]===2?"Froyo":n[0]===2&&n[1]>2?"Gingerbread":n[0]===3?"Honeycomb":n[0]===4&&n[1]<1?"Ice Cream Sandwich":n[0]===4&&n[1]<4?"Jelly Bean":n[0]===4&&n[1]>=4?"KitKat":n[0]===5?"Lollipop":n[0]===6?"Marshmallow":n[0]===7?"Nougat":n[0]===8?"Oreo":n[0]===9?"Pie":void 0}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=L.getVersionPrecision(t),o=L.getVersionPrecision(n);let a=Math.max(i,o),s=0;const c=L.map([t,n],(l=>{const d=a-L.getVersionPrecision(l),f=l+new Array(d+1).join(".0");return L.map(f.split("."),(m=>new Array(20-m.length).join("0")+m)).reverse()}));for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]<c[1][a])return-1}}static map(t,n){const r=[];let i;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(i=0;i<t.length;i+=1)r.push(n(t[i]));return r}static find(t,n){let r,i;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,i=t.length;r<i;r+=1){const o=t[r];if(n(o,r))return o}}static assign(t,...n){const r=t;let i,o;if(Object.assign)return Object.assign(t,...n);for(i=0,o=n.length;i<o;i+=1){const a=n[i];typeof a=="object"&&a!==null&&Object.keys(a).forEach((s=>{r[s]=a[s]}))}return t}static getBrowserAlias(t){return gv[t]}static getBrowserTypeByAlias(t){return Xl[t]||""}}const be=/version\/(\d+(\.?_?\d+)+)/i,vv=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=L.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=L.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=L.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=L.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=L.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=L.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=L.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=L.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=L.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=L.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=L.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=L.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=L.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=L.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=L.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=L.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=L.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=L.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=L.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=L.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=L.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=L.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=L.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=L.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=L.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=L.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=L.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=e.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:L.getFirstMatch(t,e),version:L.getSecondMatch(t,e)}}}];var yv=[{test:[/Roku\/DVP/],describe(e){const t=L.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Ye.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=L.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Ye.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=L.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=L.getWindowsVersionName(t);return{name:Ye.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Ye.iOS},n=L.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=L.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=L.getMacOSVersionName(t),r={name:Ye.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=L.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Ye.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=L.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=L.getAndroidVersionName(t),r={name:Ye.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=L.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Ye.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=L.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||L.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||L.getFirstMatch(/\bbb(\d+)/i,e);return{name:Ye.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=L.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Ye.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=L.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Ye.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Ye.Linux})},{test:[/CrOS/],describe:()=>({name:Ye.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=L.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Ye.PlayStation4,version:t}}}],bv=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=L.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Oe.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:Oe.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:Oe.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:Oe.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:Oe.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:Oe.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:Oe.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=L.getFirstMatch(/(ipod|iphone)/i,e);return{type:Oe.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:Oe.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:Oe.mobile})},{test:e=>e.getBrowserName(!0)==="blackberry",describe:()=>({type:Oe.mobile,vendor:"BlackBerry"})},{test:e=>e.getBrowserName(!0)==="bada",describe:()=>({type:Oe.mobile})},{test:e=>e.getBrowserName()==="windows phone",describe:()=>({type:Oe.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe:()=>({type:Oe.tablet})},{test:e=>e.getOSName(!0)==="android",describe:()=>({type:Oe.mobile})},{test:e=>e.getOSName(!0)==="macos",describe:()=>({type:Oe.desktop,vendor:"Apple"})},{test:e=>e.getOSName(!0)==="windows",describe:()=>({type:Oe.desktop})},{test:e=>e.getOSName(!0)==="linux",describe:()=>({type:Oe.desktop})},{test:e=>e.getOSName(!0)==="playstation 4",describe:()=>({type:Oe.tv})},{test:e=>e.getOSName(!0)==="roku",describe:()=>({type:Oe.tv})}],_v=[{test:e=>e.getBrowserName(!0)==="microsoft edge",describe(e){if(/\sedg\//i.test(e))return{name:Ht.Blink};const t=L.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Ht.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Ht.Trident},n=L.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:Ht.Presto},n=L.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Ht.Gecko},n=L.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Ht.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:Ht.WebKit},n=L.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Ql{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=L.find(vv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?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={};const t=L.find(yv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=L.find(bv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=L.find(_v,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return L.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach((a=>{const s=t[a];typeof s=="string"?(i[a]=s,o+=1):typeof s=="object"&&(n[a]=s,r+=1)})),r>0){const a=Object.keys(n),s=L.find(a,(l=>this.isOS(l)));if(s){const l=this.satisfies(n[s]);if(l!==void 0)return l}const c=L.find(a,(l=>this.isPlatform(l)));if(c){const l=this.satisfies(n[c]);if(l!==void 0)return l}}if(o>0){const a=Object.keys(i),s=L.find(a,(c=>this.isBrowser(c,!0)));if(s!==void 0)return this.compareVersion(i[s])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=L.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(L.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some((n=>this.is(n)))}}class wv{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Ql(t,n)}static parse(t){return new Ql(t).getResult()}static get BROWSER_MAP(){return Xl}static get ENGINE_MAP(){return Ht}static get OS_MAP(){return Ye}static get PLATFORMS_MAP(){return Oe}}function gi(){return Date.now()+Math.random().toString()}function kr(){throw new Error("Method must be implemented in subclass")}function Zl(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)==="/"?"":"/")+e.substring(8):e}function vi(e){return e!=null&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:Zl("https://c.daily.co/call-machine/versioned/".concat("0.85.0","/static/call-machine-object-bundle.js"),e)}function yi(e){try{new URL(e)}catch{return!1}return!0}const Se=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,cn="8.55.0",ge=globalThis;function bi(e,t,n){const r=ge,i=r.__SENTRY__=r.__SENTRY__||{},o=i[cn]=i[cn]||{};return o[e]||(o[e]=t())}const ln=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Zo=["debug","info","warn","error","log","assert","trace"],_i={};function Sr(e){if(!("console"in ge))return e();const t=ge.console,n={},r=Object.keys(_i);r.forEach((i=>{const o=_i[i];n[i]=t[i],t[i]=o}));try{return e()}finally{r.forEach((i=>{t[i]=n[i]}))}}const ne=bi("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ln?Zo.forEach((n=>{t[n]=(...r)=>{e&&Sr((()=>{ge.console[n](`Sentry Logger [${n}]:`,...r)}))}})):Zo.forEach((n=>{t[n]=()=>{}})),t})),un="?",eu=/\(error: (.*)\)/,tu=/captureMessage|captureException/;function wi(e){return e[e.length-1]||{}}const nu="<anonymous>";function Jt(e){try{return e&&typeof e=="function"&&e.name||nu}catch{return nu}}function ru(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach((r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)})),n}catch{return}}}const ki={},iu={};function dn(e,t){ki[e]=ki[e]||[],ki[e].push(t)}function fn(e,t){if(!iu[e]){iu[e]=!0;try{t()}catch(n){ln&&ne.error(`Error while instrumenting ${e}`,n)}}}function bt(e,t){const n=e&&ki[e];if(n)for(const r of n)try{r(t)}catch(i){ln&&ne.error(`Error while triggering instrumentation handler.
1
+ var LemonSliceWidget=(function(xo){"use strict";var pr,oe,Vc,on,Fc,Bc,$c,Uc,To,Mo,Co,zc,mr={},Wc=[],Zm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,gr=Array.isArray;function Tt(e,t){for(var n in t)e[n]=t[n];return e}function Po(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function re(e,t,n){var r,i,o,a={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?pr.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return vr(e,a,r,i,null)}function vr(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Vc,__i:-1,__u:0};return i==null&&oe.vnode!=null&&oe.vnode(o),o}function eg(){return{current:null}}function Fe(e){return e.children}function vt(e,t){this.props=e,this.context=t}function jn(e,t){if(t==null)return e.__?jn(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"?jn(e):null}function Hc(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Hc(e)}}function Eo(e){(!e.__d&&(e.__d=!0)&&on.push(e)&&!ni.__r++||Fc!=oe.debounceRendering)&&((Fc=oe.debounceRendering)||Bc)(ni)}function ni(){for(var e,t,n,r,i,o,a,s=1;on.length;)on.length>s&&on.sort($c),e=on.shift(),s=on.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,o=[],a=[],t.__P&&((n=Tt({},r)).__v=r.__v+1,oe.vnode&&oe.vnode(n),Ao(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,i??jn(r),!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,Yc(o,n,a),r.__e=r.__=null,n.__e!=i&&Hc(n)));ni.__r=0}function Jc(e,t,n,r,i,o,a,s,c,l,d){var f,m,g,y,v,b,_,S=r&&r.__k||Wc,T=t.length;for(c=tg(n,t,S,c,T),f=0;f<T;f++)(g=n.__k[f])!=null&&(m=g.__i==-1?mr:S[g.__i]||mr,g.__i=f,b=Ao(e,g,m,i,o,a,s,c,l,d),y=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&Io(m.ref,null,g),d.push(g.ref,g.__c||y,g)),v==null&&y!=null&&(v=y),(_=!!(4&g.__u))||m.__k===g.__k?c=qc(g,c,e,_):typeof g.type=="function"&&b!==void 0?c=b:y&&(c=y.nextSibling),g.__u&=-7);return n.__e=v,c}function tg(e,t,n,r,i){var o,a,s,c,l,d=n.length,f=d,m=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(c=o+m,(a=e.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?vr(null,a,null,null,null):gr(a)?vr(Fe,{children:a},null,null,null):a.constructor==null&&a.__b>0?vr(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,(l=a.__i=ng(a,n,c,f))!=-1&&(f--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>d?m--:i<d&&m++),typeof a.type!="function"&&(a.__u|=4)):l!=c&&(l==c-1?m--:l==c+1?m++:(l>c?m--:m++,a.__u|=4))):e.__k[o]=null;if(f)for(o=0;o<d;o++)(s=n[o])!=null&&(2&s.__u)==0&&(s.__e==r&&(r=jn(s)),Qc(s,s));return r}function qc(e,t,n,r){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=qc(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=jn(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Lt(e,t){return t=t||[],e==null||typeof e=="boolean"||(gr(e)?e.some(function(n){Lt(n,t)}):t.push(e)),t}function ng(e,t,n,r){var i,o,a,s=e.key,c=e.type,l=t[n],d=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||d&&s==l.key&&c==l.type)return n;if(r>(d?1:0)){for(i=n-1,o=n+1;i>=0||o<t.length;)if((l=t[a=i>=0?i--:o++])!=null&&(2&l.__u)==0&&s==l.key&&c==l.type)return a}return-1}function Gc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Zm.test(t)?n:n+"px"}function ri(e,t,n,r,i){var o,a;e: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||Gc(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Gc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(Uc,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=To,e.addEventListener(t,o?Co:Mo,o)):e.removeEventListener(t,o?Co:Mo,o);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 e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Kc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=To++;else if(t.t<n.u)return;return n(oe.event?oe.event(t):t)}}}function Ao(e,t,n,r,i,o,a,s,c,l){var d,f,m,g,y,v,b,_,S,T,M,x,C,E,O,V,B,N=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),o=[s=t.__e=n.__e]),(d=oe.__b)&&d(t);e:if(typeof N=="function")try{if(_=t.props,S="prototype"in N&&N.prototype.render,T=(d=N.contextType)&&r[d.__c],M=d?T?T.props.value:d.__:r,n.__c?b=(f=t.__c=n.__c).__=f.__E:(S?t.__c=f=new N(_,M):(t.__c=f=new vt(_,M),f.constructor=N,f.render=ig),T&&T.sub(f),f.props=_,f.state||(f.state={}),f.context=M,f.__n=r,m=f.__d=!0,f.__h=[],f._sb=[]),S&&f.__s==null&&(f.__s=f.state),S&&N.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Tt({},f.__s)),Tt(f.__s,N.getDerivedStateFromProps(_,f.__s))),g=f.props,y=f.state,f.__v=t,m)S&&N.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),S&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(S&&N.getDerivedStateFromProps==null&&_!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(_,M),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(_,f.__s,M)===!1||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=_,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(z){z&&(z.__=t)}),x=0;x<f._sb.length;x++)f.__h.push(f._sb[x]);f._sb=[],f.__h.length&&a.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(_,f.__s,M),S&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,y,v)})}if(f.context=M,f.props=_,f.__P=e,f.__e=!1,C=oe.__r,E=0,S){for(f.state=f.__s,f.__d=!1,C&&C(t),d=f.render(f.props,f.state,f.context),O=0;O<f._sb.length;O++)f.__h.push(f._sb[O]);f._sb=[]}else do f.__d=!1,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++E<25);f.state=f.__s,f.getChildContext!=null&&(r=Tt(Tt({},r),f.getChildContext())),S&&!m&&f.getSnapshotBeforeUpdate!=null&&(v=f.getSnapshotBeforeUpdate(g,y)),V=d,d!=null&&d.type===Fe&&d.key==null&&(V=Xc(d.props.children)),s=Jc(e,gr(V)?V:[V],t,n,r,i,o,a,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&a.push(f),b&&(f.__E=f.__=null)}catch(z){if(t.__v=null,c||o!=null)if(z.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(B=o.length;B--;)Po(o[B]);Oo(t)}else t.__e=n.__e,t.__k=n.__k,z.then||Oo(t);oe.__e(z,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=rg(n.__e,t,n,r,i,o,a,c,l);return(d=oe.diffed)&&d(t),128&t.__u?void 0:s}function Oo(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Oo)}function Yc(e,t,n){for(var r=0;r<n.length;r++)Io(n[r],n[++r],n[++r]);oe.__c&&oe.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){oe.__e(o,i.__v)}})}function Xc(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:gr(e)?e.map(Xc):Tt({},e)}function rg(e,t,n,r,i,o,a,s,c){var l,d,f,m,g,y,v,b=n.props,_=t.props,S=t.type;if(S=="svg"?i="http://www.w3.org/2000/svg":S=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(l=0;l<o.length;l++)if((g=o[l])&&"setAttribute"in g==!!S&&(S?g.localName==S:g.nodeType==3)){e=g,o[l]=null;break}}if(e==null){if(S==null)return document.createTextNode(_);e=document.createElementNS(i,S,_.is&&_),s&&(oe.__m&&oe.__m(t,o),s=!1),o=null}if(S==null)b===_||s&&e.data==_||(e.data=_);else{if(o=o&&pr.call(e.childNodes),b=n.props||mr,!s&&o!=null)for(b={},l=0;l<e.attributes.length;l++)b[(g=e.attributes[l]).name]=g.value;for(l in b)if(g=b[l],l!="children"){if(l=="dangerouslySetInnerHTML")f=g;else if(!(l in _)){if(l=="value"&&"defaultValue"in _||l=="checked"&&"defaultChecked"in _)continue;ri(e,l,null,g,i)}}for(l in _)g=_[l],l=="children"?m=g:l=="dangerouslySetInnerHTML"?d=g:l=="value"?y=g:l=="checked"?v=g:s&&typeof g!="function"||b[l]===g||ri(e,l,g,b[l],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=""),Jc(t.type=="template"?e.content:e,gr(m)?m:[m],t,n,r,S=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:n.__k&&jn(n,0),s,c),o!=null)for(l=o.length;l--;)Po(o[l]);s||(l="value",S=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[l]||S=="progress"&&!y||S=="option"&&y!=b[l])&&ri(e,l,y,b[l],i),l="checked",v!=null&&v!=e[l]&&ri(e,l,v,b[l],i))}return e}function Io(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(i){oe.__e(i,n)}}function Qc(e,t,n){var r,i;if(oe.unmount&&oe.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Io(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){oe.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Qc(r[i],t,n||typeof e.type!="function");n||Po(e.__e),e.__c=e.__=e.__e=void 0}function ig(e,t,n){return this.constructor(e,n)}function zt(e,t,n){var r,i,o,a;t==document&&(t=document.documentElement),oe.__&&oe.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],a=[],Ao(t,e=(!r&&n||t).__k=re(Fe,null,[e]),i||mr,mr,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?pr.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,a),Yc(o,e,a)}function Do(e,t){zt(e,t,Do)}function Lo(e,t,n){var r,i,o,a,s=Tt({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o]===void 0&&a!=null?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?pr.call(arguments,2):n),vr(e.type,s,r||e.key,i||e.ref,null)}function Le(e){function t(n){var r,i;return this.getChildContext||(r=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(a){a.__e=!0,Eo(a)})},this.sub=function(o){r.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),a&&a.call(o)}}),n.children}return t.__c="__cC"+zc++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}pr=Wc.slice,oe={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Vc=0,vt.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Tt({},this.state),typeof e=="function"&&(e=e(Tt({},n),this.props)),e&&Tt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Eo(this))},vt.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Eo(this))},vt.prototype.render=Fe,on=[],Bc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$c=function(e,t){return e.__v.__b-t.__v.__b},ni.__r=0,Uc=/(PointerCapture)$|Capture$/i,To=0,Mo=Kc(!1),Co=Kc(!0),zc=0;function ii(){return ii=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},ii.apply(this,arguments)}function Zc(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}var og=["context","children"],ag=["useFragment"];function sg(e,t,n,r){function i(){var o,a=Reflect.construct(HTMLElement,[],i);return a._vdomComponent=e,r&&r.shadow?(a._root=a.attachShadow({mode:r.mode||"open",serializable:(o=r.serializable)!=null&&o}),r.adoptedStyleSheets&&(a._root.adoptedStyleSheets=r.adoptedStyleSheets)):a._root=a,a}return(i.prototype=Object.create(HTMLElement.prototype)).constructor=i,i.prototype.connectedCallback=function(){lg.call(this,r)},i.prototype.attributeChangedCallback=ug,i.prototype.disconnectedCallback=dg,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),i.observedAttributes=n,e.formAssociated&&(i.formAssociated=!0),n.forEach(function(o){Object.defineProperty(i.prototype,o,{get:function(){return this._vdom?this._vdom.props[o]:this._props[o]},set:function(a){this._vdom?this.attributeChangedCallback(o,null,a):(this._props||(this._props={}),this._props[o]=a);var s=typeof a;a!=null&&s!=="string"&&s!=="boolean"&&s!=="number"||this.setAttribute(o,a)}})}),customElements.define(t||e.tagName||e.displayName||e.name,i),i}function cg(e){this.getChildContext=function(){return e.context};var t=e.children,n=Zc(e,og);return Lo(t,n)}function lg(e){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=re(cg,ii({},this._props,{context:t.detail.context}),nl(this,this._vdomComponent,e)),(this.hasAttribute("hydrate")?Do:zt)(this._vdom,this._root)}function el(e){return e.replace(/-(\w)/g,function(t,n){return n?n.toUpperCase():""})}function ug(e,t,n){if(this._vdom){var r={};r[e]=n=n??void 0,r[el(e)]=n,this._vdom=Lo(this._vdom,r),zt(this._vdom,this._root)}}function dg(){zt(this._vdom=null,this._root)}function tl(e,t){var n=this,r=e.useFragment,i=Zc(e,ag);return re(r?Fe:"slot",ii({},i,{ref:function(o){o?(n.ref=o,n._listener||(n._listener=function(a){a.stopPropagation(),a.detail.context=t},o.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}function nl(e,t,n){if(e.nodeType===3)return e.data;if(e.nodeType!==1)return null;var r=[],i={},o=0,a=e.attributes,s=e.childNodes;for(o=a.length;o--;)a[o].name!=="slot"&&(i[a[o].name]=a[o].value,i[el(a[o].name)]=a[o].value);for(o=s.length;o--;){var c=nl(s[o],null,n),l=s[o].slot;l?i[l]=re(tl,{name:l},c):r[o]=c}var d=!(!n||!n.shadow),f=t?re(tl,{useFragment:!d},r):r;return!d&&t&&(e.innerHTML=""),re(t||e.nodeName.toLowerCase(),i,f)}var fg=0;function A(e,t,n,r,i,o){t||(t={});var a,s,c=t;if("ref"in c)for(s in c={},t)s=="ref"?a=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--fg,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)c[s]===void 0&&(c[s]=a[s]);return oe.vnode&&oe.vnode(l),l}var Wt,xe,jo,rl,Rn=0,il=[],Ce=oe,ol=Ce.__b,al=Ce.__r,sl=Ce.diffed,cl=Ce.__c,ll=Ce.unmount,ul=Ce.__;function Nn(e,t){Ce.__h&&Ce.__h(xe,e,Rn||t),Rn=0;var n=xe.__H||(xe.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function te(e){return Rn=1,oi(fl,e)}function oi(e,t,n){var r=Nn(Wt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):fl(void 0,t),function(s){var c=r.__N?r.__N[0]:r.__[0],l=r.t(c,s);c!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=xe,!xe.__f)){var i=function(s,c,l){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(m){return!!m.__c});if(d.every(function(m){return!m.__N}))return!o||o.call(this,s,c,l);var f=r.__c.props!==s;return d.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(f=!0)}}),o&&o.call(this,s,c,l)||f};xe.__f=!0;var o=xe.shouldComponentUpdate,a=xe.componentWillUpdate;xe.componentWillUpdate=function(s,c,l){if(this.__e){var d=o;o=void 0,i(s,c,l),o=d}a&&a.call(this,s,c,l)},xe.shouldComponentUpdate=i}return r.__N||r.__}function J(e,t){var n=Nn(Wt++,3);!Ce.__s&&Fo(n.__H,t)&&(n.__=e,n.u=t,xe.__H.__h.push(n))}function an(e,t){var n=Nn(Wt++,4);!Ce.__s&&Fo(n.__H,t)&&(n.__=e,n.u=t,xe.__h.push(n))}function ae(e){return Rn=5,Ne(function(){return{current:e}},[])}function Ro(e,t,n){Rn=6,an(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Ne(e,t){var n=Nn(Wt++,7);return Fo(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function j(e,t){return Rn=8,Ne(function(){return e},t)}function ye(e){var t=xe.context[e.__c],n=Nn(Wt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(xe)),t.props.value):e.__}function rt(e,t){Ce.useDebugValue&&Ce.useDebugValue(t?t(e):e)}function No(){var e=Nn(Wt++,11);if(!e.__){for(var t=xe.__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 hg(){for(var e;e=il.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ai),e.__H.__h.forEach(Vo),e.__H.__h=[]}catch(t){e.__H.__h=[],Ce.__e(t,e.__v)}}Ce.__b=function(e){xe=null,ol&&ol(e)},Ce.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ul&&ul(e,t)},Ce.__r=function(e){al&&al(e),Wt=0;var t=(xe=e.__c).__H;t&&(jo===xe?(t.__h=[],xe.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(ai),t.__h.forEach(Vo),t.__h=[],Wt=0)),jo=xe},Ce.diffed=function(e){sl&&sl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(il.push(t)!==1&&rl===Ce.requestAnimationFrame||((rl=Ce.requestAnimationFrame)||pg)(hg)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),jo=xe=null},Ce.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ai),n.__h=n.__h.filter(function(r){return!r.__||Vo(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Ce.__e(r,n.__v)}}),cl&&cl(e,t)},Ce.unmount=function(e){ll&&ll(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ai(r)}catch(i){t=i}}),n.__H=void 0,t&&Ce.__e(t,n.__v))};var dl=typeof requestAnimationFrame=="function";function pg(e){var t,n=function(){clearTimeout(r),dl&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);dl&&(t=requestAnimationFrame(n))}function ai(e){var t=xe,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),xe=t}function Vo(e){var t=xe;e.__c=e.__(),xe=t}function Fo(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function fl(e,t){return typeof t=="function"?t(e):t}const Vn={};function hl(e){return"init"in e}function Bo(e){return!!e.write}function pl(e){return"v"in e||"e"in e}function si(e){if("e"in e)throw e.e;if((Vn?"production":void 0)!=="production"&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}const ci=new WeakMap;function ml(e){var t;return li(e)&&!!((t=ci.get(e))!=null&&t[0])}function mg(e){const t=ci.get(e);t?.[0]&&(t[0]=!1,t[1].forEach(n=>n()))}function $o(e,t){let n=ci.get(e);if(!n){n=[!0,new Set],ci.set(e,n);const r=()=>{n[0]=!1};e.then(r,r)}n[1].add(t)}function li(e){return typeof e?.then=="function"}function gl(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function vl(e,t,n){var r;const i=new Set;for(const o of((r=n.get(e))==null?void 0:r.t)||[])n.has(o)&&i.add(o);for(const o of t.p)i.add(o);return i}const gg=(e,t,...n)=>t.read(...n),vg=(e,t,...n)=>t.write(...n),yg=(e,t)=>{var n;return(n=t.unstable_onInit)==null?void 0:n.call(t,e)},bg=(e,t,n)=>{var r;return(r=t.onMount)==null?void 0:r.call(t,n)},_g=(e,t)=>{const n=Ue(e),r=n[0],i=n[9];if((Vn?"production":void 0)!=="production"&&!t)throw new Error("Atom is undefined or null");let o=r.get(t);return o||(o={d:new Map,p:new Set,n:0},r.set(t,o),i?.(e,t)),o},wg=e=>{const t=Ue(e),n=t[1],r=t[3],i=t[4],o=t[5],a=t[6],s=t[13],c=[],l=d=>{try{d()}catch(f){c.push(f)}};do{a.f&&l(a.f);const d=new Set,f=d.add.bind(d);r.forEach(m=>{var g;return(g=n.get(m))==null?void 0:g.l.forEach(f)}),r.clear(),o.forEach(f),o.clear(),i.forEach(f),i.clear(),d.forEach(l),r.size&&s(e)}while(r.size||o.size||i.size);if(c.length)throw new AggregateError(c)},kg=e=>{const t=Ue(e),n=t[1],r=t[2],i=t[3],o=t[11],a=t[14],s=t[17],c=[],l=new WeakSet,d=new WeakSet,f=Array.from(i);for(;f.length;){const m=f[f.length-1],g=o(e,m);if(d.has(m)){f.pop();continue}if(l.has(m)){if(r.get(m)===g.n)c.push([m,g]);else if((Vn?"production":void 0)!=="production"&&r.has(m))throw new Error("[Bug] invalidated atom exists");d.add(m),f.pop();continue}l.add(m);for(const y of vl(m,g,n))l.has(y)||f.push(y)}for(let m=c.length-1;m>=0;--m){const[g,y]=c[m];let v=!1;for(const b of y.d.keys())if(b!==g&&i.has(b)){v=!0;break}v&&(a(e,g),s(e,g)),r.delete(g)}},Sg=(e,t)=>{var n,r;const i=Ue(e),o=i[1],a=i[2],s=i[3],c=i[6],l=i[7],d=i[11],f=i[12],m=i[13],g=i[14],y=i[16],v=i[17],b=d(e,t);if(pl(b)&&(o.has(t)&&a.get(t)!==b.n||Array.from(b.d).every(([O,V])=>g(e,O).n===V)))return b;b.d.clear();let _=!0;function S(){o.has(t)&&(v(e,t),m(e),f(e))}function T(O){var V;if(O===t){const N=d(e,O);if(!pl(N))if(hl(O))ui(e,O,O.init);else throw new Error("no atom init");return si(N)}const B=g(e,O);try{return si(B)}finally{b.d.set(O,B.n),ml(b.v)&&gl(t,b.v,B),(V=o.get(O))==null||V.t.add(t),_||S()}}let M,x;const C={get signal(){return M||(M=new AbortController),M.signal},get setSelf(){return(Vn?"production":void 0)!=="production"&&!Bo(t)&&console.warn("setSelf function cannot be used with read-only atom"),!x&&Bo(t)&&(x=(...O)=>{if((Vn?"production":void 0)!=="production"&&_&&console.warn("setSelf function cannot be called in sync"),!_)try{return y(e,t,...O)}finally{m(e),f(e)}}),x}},E=b.n;try{const O=l(e,t,T,C);return ui(e,t,O),li(O)&&($o(O,()=>M?.abort()),O.then(S,S)),(n=c.r)==null||n.call(c,t),b}catch(O){return delete b.v,b.e=O,++b.n,b}finally{_=!1,E!==b.n&&a.get(t)===E&&(a.set(t,b.n),s.add(t),(r=c.c)==null||r.call(c,t))}},xg=(e,t)=>{const n=Ue(e),r=n[1],i=n[2],o=n[11],a=[t];for(;a.length;){const s=a.pop(),c=o(e,s);for(const l of vl(s,c,r)){const d=o(e,l);i.set(l,d.n),a.push(l)}}},yl=(e,t,...n)=>{const r=Ue(e),i=r[3],o=r[6],a=r[8],s=r[11],c=r[12],l=r[13],d=r[14],f=r[15],m=r[17];let g=!0;const y=b=>si(d(e,b)),v=(b,..._)=>{var S;const T=s(e,b);try{if(b===t){if(!hl(b))throw new Error("atom not writable");const M=T.n,x=_[0];ui(e,b,x),m(e,b),M!==T.n&&(i.add(b),(S=o.c)==null||S.call(o,b),f(e,b));return}else return yl(e,b,..._)}finally{g||(l(e),c(e))}};try{return a(e,t,y,v,...n)}finally{g=!1}},Tg=(e,t)=>{var n;const r=Ue(e),i=r[1],o=r[3],a=r[6],s=r[11],c=r[15],l=r[18],d=r[19],f=s(e,t),m=i.get(t);if(m&&!ml(f.v)){for(const[g,y]of f.d)if(!m.d.has(g)){const v=s(e,g);l(e,g).t.add(t),m.d.add(g),y!==v.n&&(o.add(g),(n=a.c)==null||n.call(a,g),c(e,g))}for(const g of m.d||[])if(!f.d.has(g)){m.d.delete(g);const y=d(e,g);y?.t.delete(t)}}},bl=(e,t)=>{var n;const r=Ue(e),i=r[1],o=r[4],a=r[6],s=r[10],c=r[11],l=r[12],d=r[13],f=r[14],m=r[16],g=c(e,t);let y=i.get(t);if(!y){f(e,t);for(const v of g.d.keys())bl(e,v).t.add(t);if(y={l:new Set,d:new Set(g.d.keys()),t:new Set},i.set(t,y),(n=a.m)==null||n.call(a,t),Bo(t)){const v=()=>{let b=!0;const _=(...S)=>{try{return m(e,t,...S)}finally{b||(d(e),l(e))}};try{const S=s(e,t,_);S&&(y.u=()=>{b=!0;try{S()}finally{b=!1}})}finally{b=!1}};o.add(v)}}return y},Mg=(e,t)=>{var n;const r=Ue(e),i=r[1],o=r[5],a=r[6],s=r[11],c=r[19],l=s(e,t);let d=i.get(t);if(d&&!d.l.size&&!Array.from(d.t).some(f=>{var m;return(m=i.get(f))==null?void 0:m.d.has(t)})){d.u&&o.add(d.u),d=void 0,i.delete(t),(n=a.u)==null||n.call(a,t);for(const f of l.d.keys()){const m=c(e,f);m?.t.delete(t)}return}return d},ui=(e,t,n)=>{const r=Ue(e)[11],i=r(e,t),o="v"in i,a=i.v;if(li(n))for(const s of i.d.keys())gl(t,n,r(e,s));i.v=n,delete i.e,(!o||!Object.is(a,i.v))&&(++i.n,li(a)&&mg(a))},Cg=(e,t)=>{const n=Ue(e)[14];return si(n(e,t))},Pg=(e,t,...n)=>{const r=Ue(e),i=r[12],o=r[13],a=r[16];try{return a(e,t,...n)}finally{o(e),i(e)}},Eg=(e,t,n)=>{const r=Ue(e),i=r[12],o=r[18],a=r[19],c=o(e,t).l;return c.add(n),i(e),()=>{c.delete(n),a(e,t),i(e)}},_l=new WeakMap,Ue=e=>{const t=_l.get(e);if((Vn?"production":void 0)!=="production"&&!t)throw new Error("Store must be created by buildStore to read its building blocks");return t};function Ag(...e){const t={get(r){const i=Ue(t)[21];return i(t,r)},set(r,...i){const o=Ue(t)[22];return o(t,r,...i)},sub(r,i){const o=Ue(t)[23];return o(t,r,i)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},gg,vg,yg,bg,_g,wg,kg,Sg,xg,yl,Tg,bl,Mg,ui,Cg,Pg,Eg,void 0].map((r,i)=>e[i]||r);return _l.set(t,Object.freeze(n)),t}const wl={};let Og=0;function de(e,t){const n=`atom${++Og}`,r={toString(){return(wl?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof e=="function"?r.read=e:(r.init=e,r.read=Ig,r.write=Dg),t&&(r.write=t),r}function Ig(e){return e(this)}function Dg(e,t,n){return t(this,typeof n=="function"?n(e(this)):n)}function kl(){return Ag()}let yr;function Lg(){return yr||(yr=kl(),(wl?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=yr),globalThis.__JOTAI_DEFAULT_STORE__!==yr&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),yr}const jg={};function br(e,t){let n=null;const r=new Map,i=new Set,o=s=>{let c;if(c=r.get(s),c!==void 0)if(n?.(c[1],s))o.remove(s);else return c[0];const l=e(s);return r.set(s,[l,Date.now()]),a("CREATE",s,l),l},a=(s,c,l)=>{for(const d of i)d({type:s,param:c,atom:l})};return o.unstable_listen=s=>(i.add(s),()=>{i.delete(s)}),o.getParams=()=>r.keys(),o.remove=s=>{{if(!r.has(s))return;const[c]=r.get(s);r.delete(s),a("REMOVE",s,c)}},o.setShouldRemove=s=>{if(n=s,!!n)for(const[c,[l,d]]of r)n(d,c)&&(r.delete(c),a("REMOVE",c,l))},o}const Rg=e=>typeof e?.then=="function";function Ng(e=()=>{try{return window.localStorage}catch(n){(jg?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(n);return}},t){var n;let r,i;const o={getItem:(c,l)=>{var d,f;const m=y=>{if(y=y||"",r!==y){try{i=JSON.parse(y,t?.reviver)}catch{return l}r=y}return i},g=(f=(d=e())==null?void 0:d.getItem(c))!=null?f:null;return Rg(g)?g.then(m):m(g)},setItem:(c,l)=>{var d;return(d=e())==null?void 0:d.setItem(c,JSON.stringify(l,void 0))},removeItem:c=>{var l;return(l=e())==null?void 0:l.removeItem(c)}},a=c=>(l,d,f)=>c(l,m=>{let g;try{g=JSON.parse(m||"")}catch{g=f}d(g)});let s;try{s=(n=e())==null?void 0:n.subscribe}catch{}return!s&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(s=(c,l)=>{if(!(e()instanceof window.Storage))return()=>{};const d=f=>{f.storageArea===e()&&f.key===c&&l(f.newValue)};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}}),s&&(o.subscribe=a(s)),o}Ng();function Sl(e,t){for(var n in t)e[n]=t[n];return e}function Uo(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 xl(e,t){var n=t(),r=te({t:{__:n,u:t}}),i=r[0].t,o=r[1];return an(function(){i.__=n,i.u=t,zo(i)&&o({t:i})},[e,n,t]),J(function(){return zo(i)&&o({t:i}),e(function(){zo(i)&&o({t:i})})},[e]),n}function zo(e){var t,n,r=e.u,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function Tl(e){e()}function Ml(e){return e}function Cl(){return[!1,Tl]}var Wo=an;function Ho(e,t){this.props=e,this.context=t}function Jo(e,t){function n(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:Uo(this.props,i)}function r(i){return this.shouldComponentUpdate=n,re(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Ho.prototype=new vt).isPureReactComponent=!0,Ho.prototype.shouldComponentUpdate=function(e,t){return Uo(this.props,e)||Uo(this.state,t)};var Pl=oe.__b;oe.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Pl&&Pl(e)};var Vg=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ge(e){function t(n){var r=Sl({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Vg,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var El=function(e,t){return e==null?null:Lt(Lt(e).map(t))},Fg={map:El,forEach:El,count:function(e){return e?Lt(e).length:0},only:function(e){var t=Lt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Lt},Bg=oe.__e;oe.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}Bg(e,t,n,r)};var Al=oe.unmount;function Ol(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Sl({},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(r){return Ol(r,t,n)})),e}function Il(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Il(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function di(){this.__u=0,this.o=null,this.__b=null}function Dl(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function $g(e){var t,n,r;function i(o){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return re(n,o)}return i.displayName="Lazy",i.__f=!0,i}function _r(){this.i=null,this.l=null}oe.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Al&&Al(e)},(di.prototype=new vt).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Dl(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var c=r.state.__a;r.__v.__k[0]=Il(c,c.__c.__P,c.__c.__O)}var l;for(r.setState({__a:r.__b=null});l=r.o.pop();)l.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},di.prototype.componentWillUnmount=function(){this.o=[]},di.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]=Ol(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&re(Fe,null,e.fallback);return i&&(i.__u&=-33),[re(Fe,null,t.__a?null:e.children),i]};var Ll=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 Ug(e){return this.getChildContext=function(){return e.context},e.children}function zg(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){zt(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},insertBefore:function(i,o){this.childNodes.push(i),t.h.insertBefore(i,o)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),t.h.removeChild(i)}}}zt(re(Ug,{context:t.context},e.__v),t.v)}function jl(e,t){var n=re(zg,{__v:e,h:t});return n.containerInfo=t,n}(_r.prototype=new vt).__a=function(e){var t=this,n=Dl(t.__v),r=t.l.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),Ll(t,e,r)):i()};n?n(o):o()}},_r.prototype.render=function(e){this.i=null,this.l=new Map;var t=Lt(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},_r.prototype.componentDidUpdate=_r.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ll(e,n,t)})};var Rl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Wg=/^(?: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]/,Hg=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Jg=/[A-Z0-9]/g,qg=typeof document<"u",Gg=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Kg(e,t,n){return t.__k==null&&(t.textContent=""),zt(e,t),typeof n=="function"&&n(),e?e.__c:null}function Yg(e,t,n){return Do(e,t),typeof n=="function"&&n(),e?e.__c:null}vt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(vt.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Nl=oe.event;function Xg(){}function Qg(){return this.cancelBubble}function Zg(){return this.defaultPrevented}oe.event=function(e){return Nl&&(e=Nl(e)),e.persist=Xg,e.isPropagationStopped=Qg,e.isDefaultPrevented=Zg,e.nativeEvent=e};var qo,ev={enumerable:!1,configurable:!0,get:function(){return this.class}},Vl=oe.vnode;oe.vnode=function(e){typeof e.type=="string"&&(function(t){var n=t.props,r=t.type,i={},o=r.indexOf("-")===-1;for(var a in n){var s=n[a];if(!(a==="value"&&"defaultValue"in n&&s==null||qg&&a==="children"&&r==="noscript"||a==="class"||a==="className")){var c=a.toLowerCase();a==="defaultValue"&&"value"in n&&n.value==null?a="value":a==="download"&&s===!0?s="":c==="translate"&&s==="no"?s=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?a="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||Gg(n.type)?c==="onfocus"?a="onfocusin":c==="onblur"?a="onfocusout":Hg.test(a)&&(a=c):c=a="oninput":o&&Wg.test(a)?a=a.replace(Jg,"-$&").toLowerCase():s===null&&(s=void 0),c==="oninput"&&i[a=c]&&(a="oninputCapture"),i[a]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Lt(n.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Lt(n.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",ev)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i})(e),e.$$typeof=Rl,Vl&&Vl(e)};var Fl=oe.__r;oe.__r=function(e){Fl&&Fl(e),qo=e.__c};var Bl=oe.diffed;oe.diffed=function(e){Bl&&Bl(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),qo=null};var tv={ReactCurrentDispatcher:{current:{readContext:function(e){return qo.__n[e.__c].props.value},useCallback:j,useContext:ye,useDebugValue:rt,useDeferredValue:Ml,useEffect:J,useId:No,useImperativeHandle:Ro,useInsertionEffect:Wo,useLayoutEffect:an,useMemo:Ne,useReducer:oi,useRef:ae,useState:te,useSyncExternalStore:xl,useTransition:Cl}}};function nv(e){return re.bind(null,e)}function fi(e){return!!e&&e.$$typeof===Rl}function rv(e){return fi(e)&&e.type===Fe}function iv(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function ov(e){return fi(e)?Lo.apply(null,arguments):e}function av(e){return!!e.__k&&(zt(null,e),!0)}function sv(e){return e&&(e.base||e.nodeType===1&&e)||null}var cv=function(e,t){return e(t)},lv=function(e,t){return e(t)},uv=Fe,dv=fi,pe={useState:te,useId:No,useReducer:oi,useEffect:J,useLayoutEffect:an,useInsertionEffect:Wo,useTransition:Cl,useDeferredValue:Ml,useSyncExternalStore:xl,startTransition:Tl,useRef:ae,useImperativeHandle:Ro,useMemo:Ne,useCallback:j,useContext:ye,useDebugValue:rt,version:"18.3.1",Children:Fg,render:Kg,hydrate:Yg,unmountComponentAtNode:av,createPortal:jl,createElement:re,createContext:Le,createFactory:nv,cloneElement:ov,createRef:eg,Fragment:Fe,isValidElement:fi,isElement:dv,isFragment:rv,isMemo:iv,findDOMNode:sv,Component:vt,PureComponent:Ho,memo:Jo,forwardRef:Ge,flushSync:lv,unstable_batchedUpdates:cv,StrictMode:uv,Suspense:di,SuspenseList:_r,lazy:$g,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:tv};const fv={},Go=Le(void 0);function $l(e){return ye(Go)||Lg()}function hv({children:e,store:t}){const n=ae(null);return t?re(Go.Provider,{value:t},e):(n.current===null&&(n.current=kl()),re(Go.Provider,{value:n.current},e))}const Ko=e=>typeof e?.then=="function",Yo=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},pv=pe.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(Yo(e),e)}),Xo=new WeakMap,Ul=(e,t)=>{let n=Xo.get(e);return n||(n=new Promise((r,i)=>{let o=e;const a=l=>d=>{o===l&&r(d)},s=l=>d=>{o===l&&i(d)},c=()=>{try{const l=t();Ko(l)?(Xo.set(l,n),o=l,l.then(a(l),s(l)),$o(l,c)):r(l)}catch(l){i(l)}};e.then(a(e),s(e)),$o(e,c)}),Xo.set(e,n)),n};function sn(e,t){const{delay:n,unstable_promiseStatus:r=!pe.use}={},i=$l(),[[o,a,s],c]=oi(d=>{const f=i.get(e);return Object.is(d[0],f)&&d[1]===i&&d[2]===e?d:[f,i,e]},void 0,()=>[i.get(e),i,e]);let l=o;if((a!==i||s!==e)&&(c(),l=i.get(e)),J(()=>{const d=i.sub(e,()=>{if(r)try{const f=i.get(e);Ko(f)&&Yo(Ul(f,()=>i.get(e)))}catch{}if(typeof n=="number"){setTimeout(c,n);return}c()});return c(),d},[i,e,n,r]),rt(l),Ko(l)){const d=Ul(l,()=>i.get(e));return r&&Yo(d),pv(d)}return l}function mv(e,t){const n=$l();return j((...i)=>{if((fv?"production":void 0)!=="production"&&!("write"in e))throw new Error("not writable atom");return n.set(e,...i)},[n,e])}function ce(e,t){const n=Ne(()=>de(null,(r,i,...o)=>e(r,i,...o)),[e]);return mv(n)}function zl(e,t){if(e==null)return{};var n,r,i=(function(a,s){if(a==null)return{};var c={};for(var l in a)if({}.hasOwnProperty.call(a,l)){if(s.indexOf(l)!==-1)continue;c[l]=a[l]}return c})(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function it(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e){return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},me(e)}function Wl(e){var t=(function(n,r){if(me(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(me(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(e,"string");return me(t)=="symbol"?t:t+""}function Hl(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,Wl(r.key),r)}}function ot(e,t,n){return t&&Hl(e.prototype,t),n&&Hl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function hi(e,t){if(t&&(me(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n})(e)}function yt(e){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yt(e)}function wr(e,t){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},wr(e,t)}function pi(e,t){if(typeof t!="function"&&t!==null)throw new 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&&wr(e,t)}function Mt(e,t,n){return(t=Wl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jl(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,i)}function Q(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(c){Jl(o,r,i,a,s,"next",c)}function s(c){Jl(o,r,i,a,s,"throw",c)}a(void 0)}))}}function ql(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 ze(e,t){return(function(n){if(Array.isArray(n))return n})(e)||(function(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,a,s,c,l=[],d=!0,f=!1;try{if(s=(i=i.call(n)).next,r===0){if(Object(i)!==i)return;d=!1}else for(;!(d=(o=s.call(i)).done)&&(l.push(o.value),l.length!==r);d=!0);}catch(m){f=!0,a=m}finally{try{if(!d&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(f)throw a}}return l}})(e,t)||(function(n,r){if(n){if(typeof n=="string")return ql(n,r);var i={}.toString.call(n).slice(8,-1);return i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set"?Array.from(n):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ql(n,r):void 0}})(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function gv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gl,mi={exports:{}},Qo=(function(){if(Gl)return mi.exports;Gl=1;var e,t=typeof Reflect=="object"?Reflect:null,n=t&&typeof t.apply=="function"?t.apply:function(v,b,_){return Function.prototype.apply.call(v,b,_)};e=t&&typeof t.ownKeys=="function"?t.ownKeys:Object.getOwnPropertySymbols?function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:function(v){return Object.getOwnPropertyNames(v)};var r=Number.isNaN||function(v){return v!=v};function i(){i.init.call(this)}mi.exports=i,mi.exports.once=function(v,b){return new Promise((function(_,S){function T(x){v.removeListener(b,M),S(x)}function M(){typeof v.removeListener=="function"&&v.removeListener("error",T),_([].slice.call(arguments))}y(v,b,M,{once:!0}),b!=="error"&&(function(x,C,E){typeof x.on=="function"&&y(x,"error",C,E)})(v,T,{once:!0})}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(v){if(typeof v!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof v)}function s(v){return v._maxListeners===void 0?i.defaultMaxListeners:v._maxListeners}function c(v,b,_,S){var T,M,x,C;if(a(_),(M=v._events)===void 0?(M=v._events=Object.create(null),v._eventsCount=0):(M.newListener!==void 0&&(v.emit("newListener",b,_.listener?_.listener:_),M=v._events),x=M[b]),x===void 0)x=M[b]=_,++v._eventsCount;else if(typeof x=="function"?x=M[b]=S?[_,x]:[x,_]:S?x.unshift(_):x.push(_),(T=s(v))>0&&x.length>T&&!x.warned){x.warned=!0;var E=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit");E.name="MaxListenersExceededWarning",E.emitter=v,E.type=b,E.count=x.length,C=E,console&&console.warn&&console.warn(C)}return v}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 d(v,b,_){var S={fired:!1,wrapFn:void 0,target:v,type:b,listener:_},T=l.bind(S);return T.listener=_,S.wrapFn=T,T}function f(v,b,_){var S=v._events;if(S===void 0)return[];var T=S[b];return T===void 0?[]:typeof T=="function"?_?[T.listener||T]:[T]:_?(function(M){for(var x=new Array(M.length),C=0;C<x.length;++C)x[C]=M[C].listener||M[C];return x})(T):g(T,T.length)}function m(v){var b=this._events;if(b!==void 0){var _=b[v];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}function g(v,b){for(var _=new Array(b),S=0;S<b;++S)_[S]=v[S];return _}function y(v,b,_,S){if(typeof v.on=="function")S.once?v.once(b,_):v.on(b,_);else{if(typeof v.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof v);v.addEventListener(b,(function T(M){S.once&&v.removeEventListener(b,T),_(M)}))}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(v){if(typeof v!="number"||v<0||r(v))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+v+".");o=v}}),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(v){if(typeof v!="number"||v<0||r(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this},i.prototype.getMaxListeners=function(){return s(this)},i.prototype.emit=function(v){for(var b=[],_=1;_<arguments.length;_++)b.push(arguments[_]);var S=v==="error",T=this._events;if(T!==void 0)S=S&&T.error===void 0;else if(!S)return!1;if(S){var M;if(b.length>0&&(M=b[0]),M instanceof Error)throw M;var x=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw x.context=M,x}var C=T[v];if(C===void 0)return!1;if(typeof C=="function")n(C,this,b);else{var E=C.length,O=g(C,E);for(_=0;_<E;++_)n(O[_],this,b)}return!0},i.prototype.addListener=function(v,b){return c(this,v,b,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(v,b){return c(this,v,b,!0)},i.prototype.once=function(v,b){return a(b),this.on(v,d(this,v,b)),this},i.prototype.prependOnceListener=function(v,b){return a(b),this.prependListener(v,d(this,v,b)),this},i.prototype.removeListener=function(v,b){var _,S,T,M,x;if(a(b),(S=this._events)===void 0)return this;if((_=S[v])===void 0)return this;if(_===b||_.listener===b)--this._eventsCount==0?this._events=Object.create(null):(delete S[v],S.removeListener&&this.emit("removeListener",v,_.listener||b));else if(typeof _!="function"){for(T=-1,M=_.length-1;M>=0;M--)if(_[M]===b||_[M].listener===b){x=_[M].listener,T=M;break}if(T<0)return this;T===0?_.shift():(function(C,E){for(;E+1<C.length;E++)C[E]=C[E+1];C.pop()})(_,T),_.length===1&&(S[v]=_[0]),S.removeListener!==void 0&&this.emit("removeListener",v,x||b)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(v){var b,_,S;if((_=this._events)===void 0)return this;if(_.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):_[v]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete _[v]),this;if(arguments.length===0){var T,M=Object.keys(_);for(S=0;S<M.length;++S)(T=M[S])!=="removeListener"&&this.removeAllListeners(T);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(b=_[v])=="function")this.removeListener(v,b);else if(b!==void 0)for(S=b.length-1;S>=0;S--)this.removeListener(v,b[S]);return this},i.prototype.listeners=function(v){return f(this,v,!0)},i.prototype.rawListeners=function(v){return f(this,v,!1)},i.listenerCount=function(v,b){return typeof v.listenerCount=="function"?v.listenerCount(b):m.call(v,b)},i.prototype.listenerCount=m,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},mi.exports})(),gi=gv(Qo),Kl=Object.prototype.hasOwnProperty;function Yl(e,t,n){for(n of e.keys())if(Ke(n,t))return n}function Ke(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--&&Ke(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=Yl(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=Yl(t,i))||!Ke(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(Kl.call(e,n)&&++r&&!Kl.call(t,n)||!(n in t)||!Ke(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}const vv={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Xl={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Oe={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Ye={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Ht={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class L{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){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(t){const n=t.split(".").splice(0,2).map((r=>parseInt(r,10)||0));if(n.push(0),n[0]===10)switch(n[1]){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}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map((r=>parseInt(r,10)||0));if(n.push(0),!(n[0]===1&&n[1]<5))return n[0]===1&&n[1]<6?"Cupcake":n[0]===1&&n[1]>=6?"Donut":n[0]===2&&n[1]<2?"Eclair":n[0]===2&&n[1]===2?"Froyo":n[0]===2&&n[1]>2?"Gingerbread":n[0]===3?"Honeycomb":n[0]===4&&n[1]<1?"Ice Cream Sandwich":n[0]===4&&n[1]<4?"Jelly Bean":n[0]===4&&n[1]>=4?"KitKat":n[0]===5?"Lollipop":n[0]===6?"Marshmallow":n[0]===7?"Nougat":n[0]===8?"Oreo":n[0]===9?"Pie":void 0}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=L.getVersionPrecision(t),o=L.getVersionPrecision(n);let a=Math.max(i,o),s=0;const c=L.map([t,n],(l=>{const d=a-L.getVersionPrecision(l),f=l+new Array(d+1).join(".0");return L.map(f.split("."),(m=>new Array(20-m.length).join("0")+m)).reverse()}));for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===s)return 0;a-=1}else if(c[0][a]<c[1][a])return-1}}static map(t,n){const r=[];let i;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(i=0;i<t.length;i+=1)r.push(n(t[i]));return r}static find(t,n){let r,i;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,i=t.length;r<i;r+=1){const o=t[r];if(n(o,r))return o}}static assign(t,...n){const r=t;let i,o;if(Object.assign)return Object.assign(t,...n);for(i=0,o=n.length;i<o;i+=1){const a=n[i];typeof a=="object"&&a!==null&&Object.keys(a).forEach((s=>{r[s]=a[s]}))}return t}static getBrowserAlias(t){return vv[t]}static getBrowserTypeByAlias(t){return Xl[t]||""}}const be=/version\/(\d+(\.?_?\d+)+)/i,yv=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=L.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=L.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=L.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=L.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=L.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=L.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=L.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=L.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=L.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=L.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=L.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=L.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=L.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=L.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=L.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=L.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=L.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=L.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=L.getFirstMatch(be,e)||L.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=L.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=L.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=L.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=L.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=L.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=L.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=L.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=L.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=L.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=L.getFirstMatch(be,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=e.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:L.getFirstMatch(t,e),version:L.getSecondMatch(t,e)}}}];var bv=[{test:[/Roku\/DVP/],describe(e){const t=L.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Ye.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=L.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Ye.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=L.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=L.getWindowsVersionName(t);return{name:Ye.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Ye.iOS},n=L.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=L.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=L.getMacOSVersionName(t),r={name:Ye.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=L.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Ye.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=L.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=L.getAndroidVersionName(t),r={name:Ye.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=L.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Ye.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=L.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||L.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||L.getFirstMatch(/\bbb(\d+)/i,e);return{name:Ye.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=L.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Ye.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=L.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Ye.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Ye.Linux})},{test:[/CrOS/],describe:()=>({name:Ye.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=L.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Ye.PlayStation4,version:t}}}],_v=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=L.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Oe.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:Oe.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:Oe.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:Oe.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:Oe.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:Oe.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:Oe.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=L.getFirstMatch(/(ipod|iphone)/i,e);return{type:Oe.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:Oe.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:Oe.mobile})},{test:e=>e.getBrowserName(!0)==="blackberry",describe:()=>({type:Oe.mobile,vendor:"BlackBerry"})},{test:e=>e.getBrowserName(!0)==="bada",describe:()=>({type:Oe.mobile})},{test:e=>e.getBrowserName()==="windows phone",describe:()=>({type:Oe.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe:()=>({type:Oe.tablet})},{test:e=>e.getOSName(!0)==="android",describe:()=>({type:Oe.mobile})},{test:e=>e.getOSName(!0)==="macos",describe:()=>({type:Oe.desktop,vendor:"Apple"})},{test:e=>e.getOSName(!0)==="windows",describe:()=>({type:Oe.desktop})},{test:e=>e.getOSName(!0)==="linux",describe:()=>({type:Oe.desktop})},{test:e=>e.getOSName(!0)==="playstation 4",describe:()=>({type:Oe.tv})},{test:e=>e.getOSName(!0)==="roku",describe:()=>({type:Oe.tv})}],wv=[{test:e=>e.getBrowserName(!0)==="microsoft edge",describe(e){if(/\sedg\//i.test(e))return{name:Ht.Blink};const t=L.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Ht.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Ht.Trident},n=L.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:Ht.Presto},n=L.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:Ht.Gecko},n=L.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Ht.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:Ht.WebKit},n=L.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Ql{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=L.find(yv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?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={};const t=L.find(bv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=L.find(_v,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=L.find(wv,(n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some((r=>this.test(r)));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return L.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach((a=>{const s=t[a];typeof s=="string"?(i[a]=s,o+=1):typeof s=="object"&&(n[a]=s,r+=1)})),r>0){const a=Object.keys(n),s=L.find(a,(l=>this.isOS(l)));if(s){const l=this.satisfies(n[s]);if(l!==void 0)return l}const c=L.find(a,(l=>this.isPlatform(l)));if(c){const l=this.satisfies(n[c]);if(l!==void 0)return l}}if(o>0){const a=Object.keys(i),s=L.find(a,(c=>this.isBrowser(c,!0)));if(s!==void 0)return this.compareVersion(i[s])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=L.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(L.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some((n=>this.is(n)))}}class kv{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Ql(t,n)}static parse(t){return new Ql(t).getResult()}static get BROWSER_MAP(){return Xl}static get ENGINE_MAP(){return Ht}static get OS_MAP(){return Ye}static get PLATFORMS_MAP(){return Oe}}function vi(){return Date.now()+Math.random().toString()}function kr(){throw new Error("Method must be implemented in subclass")}function Zl(e,t){return t!=null&&t.proxyUrl?t.proxyUrl+(t.proxyUrl.slice(-1)==="/"?"":"/")+e.substring(8):e}function yi(e){return e!=null&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:Zl("https://c.daily.co/call-machine/versioned/".concat("0.85.0","/static/call-machine-object-bundle.js"),e)}function bi(e){try{new URL(e)}catch{return!1}return!0}const Se=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,cn="8.55.0",ge=globalThis;function _i(e,t,n){const r=ge,i=r.__SENTRY__=r.__SENTRY__||{},o=i[cn]=i[cn]||{};return o[e]||(o[e]=t())}const ln=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Zo=["debug","info","warn","error","log","assert","trace"],wi={};function Sr(e){if(!("console"in ge))return e();const t=ge.console,n={},r=Object.keys(wi);r.forEach((i=>{const o=wi[i];n[i]=t[i],t[i]=o}));try{return e()}finally{r.forEach((i=>{t[i]=n[i]}))}}const ne=_i("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return ln?Zo.forEach((n=>{t[n]=(...r)=>{e&&Sr((()=>{ge.console[n](`Sentry Logger [${n}]:`,...r)}))}})):Zo.forEach((n=>{t[n]=()=>{}})),t})),un="?",eu=/\(error: (.*)\)/,tu=/captureMessage|captureException/;function ki(e){return e[e.length-1]||{}}const nu="<anonymous>";function Jt(e){try{return e&&typeof e=="function"&&e.name||nu}catch{return nu}}function ru(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach((r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)})),n}catch{return}}}const Si={},iu={};function dn(e,t){Si[e]=Si[e]||[],Si[e].push(t)}function fn(e,t){if(!iu[e]){iu[e]=!0;try{t()}catch(n){ln&&ne.error(`Error while instrumenting ${e}`,n)}}}function bt(e,t){const n=e&&Si[e];if(n)for(const r of n)try{r(t)}catch(i){ln&&ne.error(`Error while triggering instrumentation handler.
3
3
  Type: ${e}
4
4
  Name: ${Jt(r)}
5
- Error:`,i)}}let ea=null;function kv(){ea=ge.onerror,ge.onerror=function(e,t,n,r,i){return bt("error",{column:r,error:i,line:n,msg:e,url:t}),!!ea&&ea.apply(this,arguments)},ge.onerror.__SENTRY_INSTRUMENTED__=!0}let ta=null;function Sv(){ta=ge.onunhandledrejection,ge.onunhandledrejection=function(e){return bt("unhandledrejection",e),!ta||ta.apply(this,arguments)},ge.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Si(){return na(ge),ge}function na(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||cn,t[cn]=t[cn]||{}}const ou=Object.prototype.toString;function ra(e){switch(ou.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return hn(e,Error)}}function Fn(e,t){return ou.call(e)===`[object ${t}]`}function au(e){return Fn(e,"ErrorEvent")}function su(e){return Fn(e,"DOMError")}function jt(e){return Fn(e,"String")}function ia(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function oa(e){return e===null||ia(e)||typeof e!="object"&&typeof e!="function"}function Bn(e){return Fn(e,"Object")}function xi(e){return typeof Event<"u"&&hn(e,Event)}function Ti(e){return!!(e&&e.then&&typeof e.then=="function")}function hn(e,t){try{return e instanceof t}catch{return!1}}function cu(e){return!(typeof e!="object"||e===null||!e.__isVue&&!e._isVue)}const aa=ge;function lu(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,a=0;const s=" > ",c=s.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=xv(n,d),!(l==="html"||o>1&&a+i.length*c+l.length>=f));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function xv(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(aa.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());const i=t&&t.length?t.filter((a=>n.getAttribute(a))).map((a=>[a,n.getAttribute(a)])):null;if(i&&i.length)i.forEach((a=>{r.push(`[${a[0]}="${a[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const a=n.className;if(a&&jt(a)){const s=a.split(/\s+/);for(const c of s)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const a of o){const s=n.getAttribute(a);s&&r.push(`[${a}="${s}"]`)}return r.join("")}function $n(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function uu(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{cu(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Tv(e,t,n=!1){return!!jt(e)&&(Fn(t,"RegExp")?t.test(e):!!jt(t)&&(n?e===t:e.includes(t)))}function Mi(e,t=[],n=!1){return t.some((r=>Tv(e,r,n)))}function at(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);typeof i=="function"&&du(i,r);try{e[t]=i}catch{ln&&ne.log(`Failed to replace method "${t}" in object`,e)}}function pn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ln&&ne.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function du(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,pn(e,"__sentry_original__",t)}catch{}}function sa(e){return e.__sentry_original__}function fu(e){if(ra(e))return{message:e.message,name:e.name,stack:e.stack,...pu(e)};if(xi(e)){const t={type:e.type,target:hu(e.target),currentTarget:hu(e.currentTarget),...pu(e)};return typeof CustomEvent<"u"&&hn(e,CustomEvent)&&(t.detail=e.detail),t}return e}function hu(e){try{return t=e,typeof Element<"u"&&hn(t,Element)?lu(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}var t}function pu(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function lt(e){return ca(e,new Map)}function ca(e,t){if((function(n){if(!Bn(n))return!1;try{const r=Object.getPrototypeOf(n).constructor.name;return!r||r==="Object"}catch{return!0}})(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const i of Object.getOwnPropertyNames(e))e[i]!==void 0&&(r[i]=ca(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach((i=>{r.push(ca(i,t))})),r}return e}function xr(){return Date.now()/1e3}const Rt=(function(){const{performance:e}=ge;if(!e||!e.now)return xr;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3})();function ut(){const e=ge,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,(r=>(r^(15&n())>>r/4).toString(16)))}function mu(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function qt(e){const{message:t,event_id:n}=e;if(t)return t;const r=mu(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function la(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Un(e,t){const n=mu(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const i={...r&&r.data,...t.data};n.mechanism.data=i}}function gu(e){if((function(t){try{return t.__sentry_captured__}catch{}})(e))return!0;try{pn(e,"__sentry_captured__",!0)}catch{}return!1}var Nt;function mn(e){return new dt((t=>{t(e)}))}function Ci(e){return new dt(((t,n)=>{n(e)}))}(()=>{const{performance:e}=ge;!e||!e.now||(e.now(),e.timing&&e.timing.navigationStart)})(),(function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"})(Nt||(Nt={}));class dt{constructor(t){dt.prototype.__init.call(this),dt.prototype.__init2.call(this),dt.prototype.__init3.call(this),dt.prototype.__init4.call(this),this._state=Nt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new dt(((r,i)=>{this._handlers.push([!1,o=>{if(t)try{r(t(o))}catch(a){i(a)}else r(o)},o=>{if(n)try{r(n(o))}catch(a){i(a)}else i(o)}]),this._executeHandlers()}))}catch(t){return this.then((n=>n),t)}finally(t){return new dt(((n,r)=>{let i,o;return this.then((a=>{o=!1,i=a,t&&t()}),(a=>{o=!0,i=a,t&&t()})).then((()=>{o?r(i):n(i)}))}))}__init(){this._resolve=t=>{this._setResult(Nt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Nt.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{this._state===Nt.PENDING&&(Ti(n)?n.then(this._resolve,this._reject):(this._state=t,this._value=n,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Nt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((n=>{n[0]||(this._state===Nt.RESOLVED&&n[1](this._value),this._state===Nt.REJECTED&&n[2](this._value),n[0]=!0)}))}}}function Mv(e){const t=Rt(),n={sid:ut(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(function(r){return lt({sid:`${r.sid}`,init:r.init,started:new Date(1e3*r.started).toISOString(),timestamp:new Date(1e3*r.timestamp).toISOString(),status:r.status,errors:r.errors,did:typeof r.did=="number"||typeof r.did=="string"?`${r.did}`:void 0,duration:r.duration,abnormal_mechanism:r.abnormal_mechanism,attrs:{release:r.release,environment:r.environment,ip_address:r.ipAddress,user_agent:r.userAgent}})})(n)};return e&&zn(n,e),n}function zn(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||Rt(),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:ut()),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{const n=e.timestamp-e.started;e.duration=n>=0?n: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 vu(){return ut()}function ua(){return ut().substring(16)}function Pi(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Pi(r[i],t[i],n-1));return r}const da="_sentrySpan";function yu(e,t){t?pn(e,da,t):delete e[da]}function bu(e){return e[da]}class fa{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:vu(),spanId:ua()}}clone(){const t=new fa;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,yu(t,bu(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&zn(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,i]=n instanceof Gt?[n.getScopeData(),n.getRequestSession()]:Bn(n)?[t,t.requestSession]:[],{tags:o,extra:a,user:s,contexts:c,level:l,fingerprint:d=[],propagationContext:f}=r||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...a},this._contexts={...this._contexts,...c},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),i&&(this._requestSession=i),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,yu(this,void 0),this._attachments=[],this.setPropagationContext({traceId:vu()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:100;if(r<=0)return this;const i={timestamp:xr(),...t};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),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(t){return this._attachments.push(t),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:bu(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Pi(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:ua(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:ut();if(!this._client)return ne.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r&&r.event_id?r.event_id:ut();if(!this._client)return ne.warn("No client configured on scope - will not capture message!"),i;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:ut();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(ne.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}}const Gt=fa;class Cv{constructor(t,n){let r,i;r=t||new Gt,i=n||new Gt,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return Ti(r)?r.then((i=>(this._popScope(),i)),(i=>{throw this._popScope(),i})):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Wn(){const e=na(Si());return e.stack=e.stack||new Cv(bi("defaultCurrentScope",(()=>new Gt)),bi("defaultIsolationScope",(()=>new Gt)))}function Pv(e){return Wn().withScope(e)}function Ev(e,t){const n=Wn();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function _u(e){return Wn().withScope((()=>e(Wn().getIsolationScope())))}function ha(e){const t=na(e);return t.acs?t.acs:{withIsolationScope:_u,withScope:Pv,withSetScope:Ev,withSetIsolationScope:(n,r)=>_u(r),getCurrentScope:()=>Wn().getScope(),getIsolationScope:()=>Wn().getIsolationScope()}}function gn(){return ha(Si()).getCurrentScope()}function Tr(){return ha(Si()).getIsolationScope()}function We(){return gn().getClient()}function Av(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:i}=t;return lt({trace_id:n,span_id:r,parent_span_id:i})}function Ov(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[r,i]]of t)(n[r]||(n[r]=[])).push(lt(i));return n}const Iv=/^sentry-/;function Dv(e){const t=(function(r){if(!(!r||!jt(r)&&!Array.isArray(r)))return Array.isArray(r)?r.reduce(((i,o)=>{const a=wu(o);return Object.entries(a).forEach((([s,c])=>{i[s]=c})),i}),{}):wu(r)})(e);if(!t)return;const n=Object.entries(t).reduce(((r,[i,o])=>(i.match(Iv)&&(r[i.slice(7)]=o),r)),{});return Object.keys(n).length>0?n:void 0}function wu(e){return e.split(",").map((t=>t.split("=").map((n=>decodeURIComponent(n.trim()))))).reduce(((t,[n,r])=>(n&&r&&(t[n]=r),t)),{})}let ku=!1;function Lv(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return lt({parent_span_id:r?t:pa(e).parent_span_id,span_id:r?ua():t,trace_id:n})}function Su(e){return typeof e=="number"?xu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?xu(e.getTime()):Rt()}function xu(e){return e>9999999999?e/1e3:e}function pa(e){if((function(t){return typeof t.getSpanJSON=="function"})(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if((function(r){const i=r;return!!(i.attributes&&i.startTime&&i.name&&i.endTime&&i.status)})(e)){const{attributes:r,startTime:i,name:o,endTime:a,parentSpanId:s,status:c}=e;return lt({span_id:t,trace_id:n,data:r,description:o,parent_span_id:s,start_timestamp:Su(i),timestamp:Su(a)||void 0,status:jv(c),op:r["sentry.op"],origin:r["sentry.origin"],_metrics_summary:Ov(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function jv(e){if(e&&e.code!==0)return e.code===1?"ok":e.message||"unknown_error"}function Tu(e){return e._sentryRootSpan||e}function Rv(){ku||(Sr((()=>{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.")})),ku=!0)}const ma="production";function Mu(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=lt({environment:n.environment||ma,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function Nv(e){const t=We();if(!t)return{};const n=Tu(e),r=n._frozenDsc;if(r)return r;const i=n.spanContext().traceState,o=i&&i.get("sentry.dsc"),a=o&&Dv(o);if(a)return a;const s=Mu(e.spanContext().traceId,t),c=pa(n),l=c.data||{},d=l["sentry.sample_rate"];d!=null&&(s.sample_rate=`${d}`);const f=l["sentry.source"],m=c.description;return f!=="url"&&m&&(s.transaction=m),(function(g){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const y=We(),v=y&&y.getOptions();return!!v&&(v.enableTracing||"tracesSampleRate"in v||"tracesSampler"in v)})()&&(s.sampled=String((function(g){const{traceFlags:y}=g.spanContext();return y===1})(n))),t.emit("createDsc",s,n),s}const Vv=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ei(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${a}`}function Cu(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Fv(e){const t=typeof e=="string"?(function(n){const r=Vv.exec(n);if(!r)return void Sr((()=>{console.error(`Invalid Sentry Dsn: ${n}`)}));const[i,o,a="",s="",c="",l=""]=r.slice(1);let d="",f=l;const m=f.split("/");if(m.length>1&&(d=m.slice(0,-1).join("/"),f=m.pop()),f){const g=f.match(/^\d+/);g&&(f=g[0])}return Cu({host:s,pass:a,path:d,projectId:f,port:c,protocol:i,publicKey:o})})(e):Cu(e);if(t&&(function(n){if(!ln)return!0;const{port:r,projectId:i,protocol:o}=n;return!(["protocol","publicKey","host","projectId"].find((a=>!n[a]&&(ne.error(`Invalid Sentry Dsn: ${a} missing`),!0)))||(i.match(/^\d+$/)?(function(a){return a==="http"||a==="https"})(o)?r&&isNaN(parseInt(r,10))&&(ne.error(`Invalid Sentry Dsn: Invalid port ${r}`),1):(ne.error(`Invalid Sentry Dsn: Invalid protocol ${o}`),1):(ne.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),1)))})(t))return t}function Vt(e,t=100,n=1/0){try{return ga("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Pu(e,t=3,n=102400){const r=Vt(e,t);return i=r,(function(o){return~-encodeURI(o).split(/%..|./).length})(JSON.stringify(i))>n?Pu(e,t-1,n):r;var i}function ga(e,t,n=1/0,r=1/0,i=(function(){const o=typeof WeakSet=="function",a=o?new WeakSet:[];return[function(s){if(o)return!!a.has(s)||(a.add(s),!1);for(let c=0;c<a.length;c++)if(a[c]===s)return!0;return a.push(s),!1},function(s){if(o)a.delete(s);else for(let c=0;c<a.length;c++)if(a[c]===s){a.splice(c,1);break}}]})()){const[o,a]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const s=(function(g,y){try{if(g==="domain"&&y&&typeof y=="object"&&y._events)return"[Domain]";if(g==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&y===global)return"[Global]";if(typeof window<"u"&&y===window)return"[Window]";if(typeof document<"u"&&y===document)return"[Document]";if(cu(y))return"[VueViewModel]";if(Bn(v=y)&&"nativeEvent"in v&&"preventDefault"in v&&"stopPropagation"in v)return"[SyntheticEvent]";if(typeof y=="number"&&!Number.isFinite(y))return`[${y}]`;if(typeof y=="function")return`[Function: ${Jt(y)}]`;if(typeof y=="symbol")return`[${String(y)}]`;if(typeof y=="bigint")return`[BigInt: ${String(y)}]`;const b=(function(_){const S=Object.getPrototypeOf(_);return S?S.constructor.name:"null prototype"})(y);return/^HTML(\w*)Element$/.test(b)?`[HTMLElement: ${b}]`:`[object ${b}]`}catch(b){return`**non-serializable** (${b})`}var v})(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{return ga("",l.toJSON(),c-1,r,i)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const m=fu(t);for(const g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(f>=r){d[g]="[MaxProperties ~]";break}const y=m[g];d[g]=ga(g,y,c-1,r,i),f++}return a(t),d}function Mr(e,t=[]){return[e,t]}function Bv(e,t){const[n,r]=e;return[n,[...r,t]]}function Eu(e,t){const n=e[1];for(const r of n)if(t(r,r[0].type))return!0;return!1}function va(e){return ge.__SENTRY__&&ge.__SENTRY__.encodePolyfill?ge.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function $v(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[va(r),o]:r.push(typeof o=="string"?va(o):o)}for(const o of n){const[a,s]=o;if(i(`
5
+ Error:`,i)}}let ea=null;function Sv(){ea=ge.onerror,ge.onerror=function(e,t,n,r,i){return bt("error",{column:r,error:i,line:n,msg:e,url:t}),!!ea&&ea.apply(this,arguments)},ge.onerror.__SENTRY_INSTRUMENTED__=!0}let ta=null;function xv(){ta=ge.onunhandledrejection,ge.onunhandledrejection=function(e){return bt("unhandledrejection",e),!ta||ta.apply(this,arguments)},ge.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function xi(){return na(ge),ge}function na(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||cn,t[cn]=t[cn]||{}}const ou=Object.prototype.toString;function ra(e){switch(ou.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return hn(e,Error)}}function Fn(e,t){return ou.call(e)===`[object ${t}]`}function au(e){return Fn(e,"ErrorEvent")}function su(e){return Fn(e,"DOMError")}function jt(e){return Fn(e,"String")}function ia(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function oa(e){return e===null||ia(e)||typeof e!="object"&&typeof e!="function"}function Bn(e){return Fn(e,"Object")}function Ti(e){return typeof Event<"u"&&hn(e,Event)}function Mi(e){return!!(e&&e.then&&typeof e.then=="function")}function hn(e,t){try{return e instanceof t}catch{return!1}}function cu(e){return!(typeof e!="object"||e===null||!e.__isVue&&!e._isVue)}const aa=ge;function lu(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let o=0,a=0;const s=" > ",c=s.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=Tv(n,d),!(l==="html"||o>1&&a+i.length*c+l.length>=f));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(s)}catch{return"<unknown>"}}function Tv(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(aa.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());const i=t&&t.length?t.filter((a=>n.getAttribute(a))).map((a=>[a,n.getAttribute(a)])):null;if(i&&i.length)i.forEach((a=>{r.push(`[${a[0]}="${a[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const a=n.className;if(a&&jt(a)){const s=a.split(/\s+/);for(const c of s)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const a of o){const s=n.getAttribute(a);s&&r.push(`[${a}="${s}"]`)}return r.join("")}function $n(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function uu(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];try{cu(i)?n.push("[VueViewModel]"):n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Mv(e,t,n=!1){return!!jt(e)&&(Fn(t,"RegExp")?t.test(e):!!jt(t)&&(n?e===t:e.includes(t)))}function Ci(e,t=[],n=!1){return t.some((r=>Mv(e,r,n)))}function at(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);typeof i=="function"&&du(i,r);try{e[t]=i}catch{ln&&ne.log(`Failed to replace method "${t}" in object`,e)}}function pn(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{ln&&ne.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function du(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,pn(e,"__sentry_original__",t)}catch{}}function sa(e){return e.__sentry_original__}function fu(e){if(ra(e))return{message:e.message,name:e.name,stack:e.stack,...pu(e)};if(Ti(e)){const t={type:e.type,target:hu(e.target),currentTarget:hu(e.currentTarget),...pu(e)};return typeof CustomEvent<"u"&&hn(e,CustomEvent)&&(t.detail=e.detail),t}return e}function hu(e){try{return t=e,typeof Element<"u"&&hn(t,Element)?lu(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}var t}function pu(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function lt(e){return ca(e,new Map)}function ca(e,t){if((function(n){if(!Bn(n))return!1;try{const r=Object.getPrototypeOf(n).constructor.name;return!r||r==="Object"}catch{return!0}})(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const i of Object.getOwnPropertyNames(e))e[i]!==void 0&&(r[i]=ca(e[i],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach((i=>{r.push(ca(i,t))})),r}return e}function xr(){return Date.now()/1e3}const Rt=(function(){const{performance:e}=ge;if(!e||!e.now)return xr;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/1e3})();function ut(){const e=ge,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,(r=>(r^(15&n())>>r/4).toString(16)))}function mu(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function qt(e){const{message:t,event_id:n}=e;if(t)return t;const r=mu(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function la(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Un(e,t){const n=mu(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const i={...r&&r.data,...t.data};n.mechanism.data=i}}function gu(e){if((function(t){try{return t.__sentry_captured__}catch{}})(e))return!0;try{pn(e,"__sentry_captured__",!0)}catch{}return!1}var Nt;function mn(e){return new dt((t=>{t(e)}))}function Pi(e){return new dt(((t,n)=>{n(e)}))}(()=>{const{performance:e}=ge;!e||!e.now||(e.now(),e.timing&&e.timing.navigationStart)})(),(function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"})(Nt||(Nt={}));class dt{constructor(t){dt.prototype.__init.call(this),dt.prototype.__init2.call(this),dt.prototype.__init3.call(this),dt.prototype.__init4.call(this),this._state=Nt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new dt(((r,i)=>{this._handlers.push([!1,o=>{if(t)try{r(t(o))}catch(a){i(a)}else r(o)},o=>{if(n)try{r(n(o))}catch(a){i(a)}else i(o)}]),this._executeHandlers()}))}catch(t){return this.then((n=>n),t)}finally(t){return new dt(((n,r)=>{let i,o;return this.then((a=>{o=!1,i=a,t&&t()}),(a=>{o=!0,i=a,t&&t()})).then((()=>{o?r(i):n(i)}))}))}__init(){this._resolve=t=>{this._setResult(Nt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Nt.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{this._state===Nt.PENDING&&(Mi(n)?n.then(this._resolve,this._reject):(this._state=t,this._value=n,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Nt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach((n=>{n[0]||(this._state===Nt.RESOLVED&&n[1](this._value),this._state===Nt.REJECTED&&n[2](this._value),n[0]=!0)}))}}}function Cv(e){const t=Rt(),n={sid:ut(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(function(r){return lt({sid:`${r.sid}`,init:r.init,started:new Date(1e3*r.started).toISOString(),timestamp:new Date(1e3*r.timestamp).toISOString(),status:r.status,errors:r.errors,did:typeof r.did=="number"||typeof r.did=="string"?`${r.did}`:void 0,duration:r.duration,abnormal_mechanism:r.abnormal_mechanism,attrs:{release:r.release,environment:r.environment,ip_address:r.ipAddress,user_agent:r.userAgent}})})(n)};return e&&zn(n,e),n}function zn(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||Rt(),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:ut()),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{const n=e.timestamp-e.started;e.duration=n>=0?n: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 vu(){return ut()}function ua(){return ut().substring(16)}function Ei(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=Ei(r[i],t[i],n-1));return r}const da="_sentrySpan";function yu(e,t){t?pn(e,da,t):delete e[da]}function bu(e){return e[da]}class fa{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:vu(),spanId:ua()}}clone(){const t=new fa;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,yu(t,bu(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&zn(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,i]=n instanceof Gt?[n.getScopeData(),n.getRequestSession()]:Bn(n)?[t,t.requestSession]:[],{tags:o,extra:a,user:s,contexts:c,level:l,fingerprint:d=[],propagationContext:f}=r||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...a},this._contexts={...this._contexts,...c},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),i&&(this._requestSession=i),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,yu(this,void 0),this._attachments=[],this.setPropagationContext({traceId:vu()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:100;if(r<=0)return this;const i={timestamp:xr(),...t};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),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(t){return this._attachments.push(t),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:bu(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Ei(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:ua(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:ut();if(!this._client)return ne.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r&&r.event_id?r.event_id:ut();if(!this._client)return ne.warn("No client configured on scope - will not capture message!"),i;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:i},this),i}captureEvent(t,n){const r=n&&n.event_id?n.event_id:ut();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(ne.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}}const Gt=fa;class Pv{constructor(t,n){let r,i;r=t||new Gt,i=n||new Gt,this._stack=[{scope:r}],this._isolationScope=i}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(i){throw this._popScope(),i}return Mi(r)?r.then((i=>(this._popScope(),i)),(i=>{throw this._popScope(),i})):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function Wn(){const e=na(xi());return e.stack=e.stack||new Pv(_i("defaultCurrentScope",(()=>new Gt)),_i("defaultIsolationScope",(()=>new Gt)))}function Ev(e){return Wn().withScope(e)}function Av(e,t){const n=Wn();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function _u(e){return Wn().withScope((()=>e(Wn().getIsolationScope())))}function ha(e){const t=na(e);return t.acs?t.acs:{withIsolationScope:_u,withScope:Ev,withSetScope:Av,withSetIsolationScope:(n,r)=>_u(r),getCurrentScope:()=>Wn().getScope(),getIsolationScope:()=>Wn().getIsolationScope()}}function gn(){return ha(xi()).getCurrentScope()}function Tr(){return ha(xi()).getIsolationScope()}function We(){return gn().getClient()}function Ov(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:i}=t;return lt({trace_id:n,span_id:r,parent_span_id:i})}function Iv(e){const t=e._sentryMetrics;if(!t)return;const n={};for(const[,[r,i]]of t)(n[r]||(n[r]=[])).push(lt(i));return n}const Dv=/^sentry-/;function Lv(e){const t=(function(r){if(!(!r||!jt(r)&&!Array.isArray(r)))return Array.isArray(r)?r.reduce(((i,o)=>{const a=wu(o);return Object.entries(a).forEach((([s,c])=>{i[s]=c})),i}),{}):wu(r)})(e);if(!t)return;const n=Object.entries(t).reduce(((r,[i,o])=>(i.match(Dv)&&(r[i.slice(7)]=o),r)),{});return Object.keys(n).length>0?n:void 0}function wu(e){return e.split(",").map((t=>t.split("=").map((n=>decodeURIComponent(n.trim()))))).reduce(((t,[n,r])=>(n&&r&&(t[n]=r),t)),{})}let ku=!1;function jv(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return lt({parent_span_id:r?t:pa(e).parent_span_id,span_id:r?ua():t,trace_id:n})}function Su(e){return typeof e=="number"?xu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?xu(e.getTime()):Rt()}function xu(e){return e>9999999999?e/1e3:e}function pa(e){if((function(t){return typeof t.getSpanJSON=="function"})(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if((function(r){const i=r;return!!(i.attributes&&i.startTime&&i.name&&i.endTime&&i.status)})(e)){const{attributes:r,startTime:i,name:o,endTime:a,parentSpanId:s,status:c}=e;return lt({span_id:t,trace_id:n,data:r,description:o,parent_span_id:s,start_timestamp:Su(i),timestamp:Su(a)||void 0,status:Rv(c),op:r["sentry.op"],origin:r["sentry.origin"],_metrics_summary:Iv(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Rv(e){if(e&&e.code!==0)return e.code===1?"ok":e.message||"unknown_error"}function Tu(e){return e._sentryRootSpan||e}function Nv(){ku||(Sr((()=>{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.")})),ku=!0)}const ma="production";function Mu(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i=lt({environment:n.environment||ma,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",i),i}function Vv(e){const t=We();if(!t)return{};const n=Tu(e),r=n._frozenDsc;if(r)return r;const i=n.spanContext().traceState,o=i&&i.get("sentry.dsc"),a=o&&Lv(o);if(a)return a;const s=Mu(e.spanContext().traceId,t),c=pa(n),l=c.data||{},d=l["sentry.sample_rate"];d!=null&&(s.sample_rate=`${d}`);const f=l["sentry.source"],m=c.description;return f!=="url"&&m&&(s.transaction=m),(function(g){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const y=We(),v=y&&y.getOptions();return!!v&&(v.enableTracing||"tracesSampleRate"in v||"tracesSampler"in v)})()&&(s.sampled=String((function(g){const{traceFlags:y}=g.spanContext();return y===1})(n))),t.emit("createDsc",s,n),s}const Fv=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ai(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${a}`}function Cu(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Bv(e){const t=typeof e=="string"?(function(n){const r=Fv.exec(n);if(!r)return void Sr((()=>{console.error(`Invalid Sentry Dsn: ${n}`)}));const[i,o,a="",s="",c="",l=""]=r.slice(1);let d="",f=l;const m=f.split("/");if(m.length>1&&(d=m.slice(0,-1).join("/"),f=m.pop()),f){const g=f.match(/^\d+/);g&&(f=g[0])}return Cu({host:s,pass:a,path:d,projectId:f,port:c,protocol:i,publicKey:o})})(e):Cu(e);if(t&&(function(n){if(!ln)return!0;const{port:r,projectId:i,protocol:o}=n;return!(["protocol","publicKey","host","projectId"].find((a=>!n[a]&&(ne.error(`Invalid Sentry Dsn: ${a} missing`),!0)))||(i.match(/^\d+$/)?(function(a){return a==="http"||a==="https"})(o)?r&&isNaN(parseInt(r,10))&&(ne.error(`Invalid Sentry Dsn: Invalid port ${r}`),1):(ne.error(`Invalid Sentry Dsn: Invalid protocol ${o}`),1):(ne.error(`Invalid Sentry Dsn: Invalid projectId ${i}`),1)))})(t))return t}function Vt(e,t=100,n=1/0){try{return ga("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Pu(e,t=3,n=102400){const r=Vt(e,t);return i=r,(function(o){return~-encodeURI(o).split(/%..|./).length})(JSON.stringify(i))>n?Pu(e,t-1,n):r;var i}function ga(e,t,n=1/0,r=1/0,i=(function(){const o=typeof WeakSet=="function",a=o?new WeakSet:[];return[function(s){if(o)return!!a.has(s)||(a.add(s),!1);for(let c=0;c<a.length;c++)if(a[c]===s)return!0;return a.push(s),!1},function(s){if(o)a.delete(s);else for(let c=0;c<a.length;c++)if(a[c]===s){a.splice(c,1);break}}]})()){const[o,a]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const s=(function(g,y){try{if(g==="domain"&&y&&typeof y=="object"&&y._events)return"[Domain]";if(g==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&y===global)return"[Global]";if(typeof window<"u"&&y===window)return"[Window]";if(typeof document<"u"&&y===document)return"[Document]";if(cu(y))return"[VueViewModel]";if(Bn(v=y)&&"nativeEvent"in v&&"preventDefault"in v&&"stopPropagation"in v)return"[SyntheticEvent]";if(typeof y=="number"&&!Number.isFinite(y))return`[${y}]`;if(typeof y=="function")return`[Function: ${Jt(y)}]`;if(typeof y=="symbol")return`[${String(y)}]`;if(typeof y=="bigint")return`[BigInt: ${String(y)}]`;const b=(function(_){const S=Object.getPrototypeOf(_);return S?S.constructor.name:"null prototype"})(y);return/^HTML(\w*)Element$/.test(b)?`[HTMLElement: ${b}]`:`[object ${b}]`}catch(b){return`**non-serializable** (${b})`}var v})(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return s.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{return ga("",l.toJSON(),c-1,r,i)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const m=fu(t);for(const g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(f>=r){d[g]="[MaxProperties ~]";break}const y=m[g];d[g]=ga(g,y,c-1,r,i),f++}return a(t),d}function Mr(e,t=[]){return[e,t]}function $v(e,t){const[n,r]=e;return[n,[...r,t]]}function Eu(e,t){const n=e[1];for(const r of n)if(t(r,r[0].type))return!0;return!1}function va(e){return ge.__SENTRY__&&ge.__SENTRY__.encodePolyfill?ge.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Uv(e){const[t,n]=e;let r=JSON.stringify(t);function i(o){typeof r=="string"?r=typeof o=="string"?r+o:[va(r),o]:r.push(typeof o=="string"?va(o):o)}for(const o of n){const[a,s]=o;if(i(`
6
6
  ${JSON.stringify(a)}
7
- `),typeof s=="string"||s instanceof Uint8Array)i(s);else{let c;try{c=JSON.stringify(s)}catch{c=JSON.stringify(Vt(s))}i(c)}}return typeof r=="string"?r:(function(o){const a=o.reduce(((l,d)=>l+d.length),0),s=new Uint8Array(a);let c=0;for(const l of o)s.set(l,c),c+=l.length;return s})(r)}function Uv(e){const t=typeof e.data=="string"?va(e.data):e.data;return[lt({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const zv={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 Au(e){return zv[e]}function Ou(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Wv(e,t,n,r){const i=Ou(n),o=e.type&&e.type!=="replay_event"?e.type:"event";(function(s,c){c&&(s.sdk=s.sdk||{},s.sdk.name=s.sdk.name||c.name,s.sdk.version=s.sdk.version||c.version,s.sdk.integrations=[...s.sdk.integrations||[],...c.integrations||[]],s.sdk.packages=[...s.sdk.packages||[],...c.packages||[]])})(e,n&&n.sdk);const a=(function(s,c,l,d){const f=s.sdkProcessingMetadata&&s.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:s.event_id,sent_at:new Date().toISOString(),...c&&{sdk:c},...!!l&&d&&{dsn:Ei(d)},...f&&{trace:lt({...f})}}})(e,i,r,t);return delete e.sdkProcessingMetadata,Mr(a,[[{type:o},e]])}function ya(e,t,n,r=0){return new dt(((i,o)=>{const a=e[r];if(t===null||typeof a!="function")i(t);else{const s=a({...t},n);Se&&a.id&&s===null&&ne.log(`Event processor "${a.id}" dropped event`),Ti(s)?s.then((c=>ya(e,c,n,r+1).then(i))).then(null,o):ya(e,s,n,r+1).then(i).then(null,o)}}))}let Ai,Iu,ba;function Hv(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;(function(a,s){const{extra:c,tags:l,user:d,contexts:f,level:m,transactionName:g}=s,y=lt(c);y&&Object.keys(y).length&&(a.extra={...y,...a.extra});const v=lt(l);v&&Object.keys(v).length&&(a.tags={...v,...a.tags});const b=lt(d);b&&Object.keys(b).length&&(a.user={...b,...a.user});const _=lt(f);_&&Object.keys(_).length&&(a.contexts={..._,...a.contexts}),m&&(a.level=m),g&&a.type!=="transaction"&&(a.transaction=g)})(e,t),r&&(function(a,s){a.contexts={trace:Lv(s),...a.contexts},a.sdkProcessingMetadata={dynamicSamplingContext:Nv(s),...a.sdkProcessingMetadata};const c=Tu(s),l=pa(c).description;l&&!a.transaction&&a.type==="transaction"&&(a.transaction=l)})(e,r),(function(a,s){a.fingerprint=a.fingerprint?Array.isArray(a.fingerprint)?a.fingerprint:[a.fingerprint]:[],s&&(a.fingerprint=a.fingerprint.concat(s)),a.fingerprint&&!a.fingerprint.length&&delete a.fingerprint})(e,n),(function(a,s){const c=[...a.breadcrumbs||[],...s];a.breadcrumbs=c.length?c:void 0})(e,i),(function(a,s){a.sdkProcessingMetadata={...a.sdkProcessingMetadata,...s}})(e,o)}function Du(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:f,propagationContext:m,transactionName:g,span:y}=t;Oi(e,"extra",n),Oi(e,"tags",r),Oi(e,"user",i),Oi(e,"contexts",o),e.sdkProcessingMetadata=Pi(e.sdkProcessingMetadata,s,2),a&&(e.level=a),g&&(e.transactionName=g),y&&(e.span=y),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...m}}function Oi(e,t,n){e[t]=Pi(e[t],n,1)}function Jv(e,t,n,r,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ut(),timestamp:t.timestamp||xr()},l=n.integrations||e.integrations.map((y=>y.name));(function(y,v){const{environment:b,release:_,dist:S,maxValueLength:T=250}=v;y.environment=y.environment||b||ma,!y.release&&_&&(y.release=_),!y.dist&&S&&(y.dist=S),y.message&&(y.message=$n(y.message,T));const M=y.exception&&y.exception.values&&y.exception.values[0];M&&M.value&&(M.value=$n(M.value,T));const x=y.request;x&&x.url&&(x.url=$n(x.url,T))})(c,e),(function(y,v){v.length>0&&(y.sdk=y.sdk||{},y.sdk.integrations=[...y.sdk.integrations||[],...v])})(c,l),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&(function(y,v){const b=(function(_){const S=ge._sentryDebugIds;if(!S)return{};const T=Object.keys(S);return ba&&T.length===Iu||(Iu=T.length,ba=T.reduce(((M,x)=>{Ai||(Ai={});const C=Ai[x];if(C)M[C[0]]=C[1];else{const E=_(x);for(let O=E.length-1;O>=0;O--){const V=E[O],B=V&&V.filename,N=S[x];if(B&&N){M[B]=N,Ai[x]=[B,N];break}}}return M}),{})),ba})(v);try{y.exception.values.forEach((_=>{_.stacktrace.frames.forEach((S=>{b&&S.filename&&(S.debug_id=b[S.filename])}))}))}catch{}})(c,e.stackParser);const d=(function(y,v){if(!v)return y;const b=y?y.clone():new Gt;return b.update(v),b})(r,n.captureContext);n.mechanism&&Un(c,n.mechanism);const f=i?i.getEventProcessors():[],m=bi("globalScope",(()=>new Gt)).getScopeData();o&&Du(m,o.getScopeData()),d&&Du(m,d.getScopeData());const g=[...n.attachments||[],...m.attachments];return g.length&&(n.attachments=g),Hv(c,m),ya([...f,...m.eventProcessors],c,n).then((y=>(y&&(function(v){const b={};try{v.exception.values.forEach((S=>{S.stacktrace.frames.forEach((T=>{T.debug_id&&(T.abs_path?b[T.abs_path]=T.debug_id:T.filename&&(b[T.filename]=T.debug_id),delete T.debug_id)}))}))}catch{}if(Object.keys(b).length===0)return;v.debug_meta=v.debug_meta||{},v.debug_meta.images=v.debug_meta.images||[];const _=v.debug_meta.images;Object.entries(b).forEach((([S,T])=>{_.push({type:"sourcemap",code_file:S,debug_id:T})}))})(y),typeof a=="number"&&a>0?(function(v,b,_){if(!v)return null;const S={...v,...v.breadcrumbs&&{breadcrumbs:v.breadcrumbs.map((T=>({...T,...T.data&&{data:Vt(T.data,b,_)}})))},...v.user&&{user:Vt(v.user,b,_)},...v.contexts&&{contexts:Vt(v.contexts,b,_)},...v.extra&&{extra:Vt(v.extra,b,_)}};return v.contexts&&v.contexts.trace&&S.contexts&&(S.contexts.trace=v.contexts.trace,v.contexts.trace.data&&(S.contexts.trace.data=Vt(v.contexts.trace.data,b,_))),v.spans&&(S.spans=v.spans.map((T=>({...T,...T.data&&{data:Vt(T.data,b,_)}})))),v.contexts&&v.contexts.flags&&S.contexts&&(S.contexts.flags=Vt(v.contexts.flags,3,_)),S})(y,a,s):y)))}function Tx(e){}function Lu(e,t){return gn().captureEvent(e,t)}function ju(e){const t=We(),n=Tr(),r=gn(),{release:i,environment:o=ma}=t&&t.getOptions()||{},{userAgent:a}=ge.navigator||{},s=Mv({release:i,environment:o,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),c=n.getSession();return c&&c.status==="ok"&&zn(c,{status:"exited"}),Ru(),n.setSession(s),r.setSession(s),s}function Ru(){const e=Tr(),t=gn(),n=t.getSession()||e.getSession();n&&(function(r,i){let o={};r.status==="ok"&&(o={status:"exited"}),zn(r,o)})(n),Nu(),e.setSession(),t.setSession()}function Nu(){const e=Tr(),t=gn(),n=We(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Vu(e=!1){e?Ru():Nu()}function qv(e,t,n){return t||`${(function(r){return`${(function(i){const o=i.protocol?`${i.protocol}:`:"",a=i.port?`:${i.port}`:"";return`${o}//${i.host}${a}${i.path?`/${i.path}`:""}/api/`})(r)}${r.projectId}/envelope/`})(e)}?${(function(r,i){const o={sentry_version:"7"};return r.publicKey&&(o.sentry_key=r.publicKey),i&&(o.sentry_client=`${i.name}/${i.version}`),new URLSearchParams(o).toString()})(e,n)}`}const Fu=[];function Bu(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function $u(e,t,n){if(n[t.name])Se&&ne.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Fu.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Fu.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",((i,o)=>r(i,o,e)))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign(((o,a)=>r(o,a,e)),{id:t.name});e.addEventProcessor(i)}Se&&ne.log(`Integration installed: ${t.name}`)}}class _t extends Error{constructor(t,n="warn"){super(t),this.message=t,this.logLevel=n}}const Uu="Not capturing exception because it's already been captured.";class Gv{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Fv(t.dsn):Se&&ne.warn("No DSN provided, client will not send events."),this._dsn){const r=qv(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}const n=["enableTracing","tracesSampleRate","tracesSampler"].find((r=>r in t&&t[r]==null));n&&Sr((()=>{console.warn(`[Sentry] Deprecation warning: \`${n}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(t,n,r){const i=ut();if(gu(t))return Se&&ne.log(Uu),i;const o={event_id:i,...n};return this._process(this.eventFromException(t,o).then((a=>this._captureEvent(a,o,r)))),o.event_id}captureMessage(t,n,r,i){const o={event_id:ut(),...r},a=ia(t)?t:String(t),s=oa(t)?this.eventFromMessage(a,n,o):this.eventFromException(t,o);return this._process(s.then((c=>this._captureEvent(c,o,i)))),o.event_id}captureEvent(t,n,r){const i=ut();if(n&&n.originalException&&gu(n.originalException))return Se&&ne.log(Uu),i;const o={event_id:i,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,o,a||r)),o.event_id}captureSession(t){typeof t.release!="string"?Se&&ne.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),zn(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then((r=>n.flush(t).then((i=>r&&i))))):mn(!0)}close(t){return this.flush(t).then((n=>(this.getOptions().enabled=!1,this.emit("close"),n)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some((({name:t})=>t.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];$u(this,t,this._integrations),n||Bu(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Wv(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=Bv(r,Uv(o));const i=this.sendEnvelope(r);i&&i.then((o=>this.emit("afterSendEvent",t,o)),null)}sendSession(t){const n=(function(r,i,o,a){const s=Ou(o);return Mr({sent_at:new Date().toISOString(),...s&&{sdk:s},...!!a&&i&&{dsn:Ei(i)}},["aggregates"in r?[{type:"sessions"},r]:[{type:"session"},r.toJSON()]])})(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const i=typeof r=="number"?r:1,o=`${t}:${n}`;Se&&ne.log(`Recording outcome: "${o}"${i>1?` (${i} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+i}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach((i=>i(...n)))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,(n=>(Se&&ne.error("Error while sending envelope:",n),n))):(Se&&ne.error("Transport disabled"),mn({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=(function(n,r){const i={};return r.forEach((o=>{o&&$u(n,o,i)})),i})(this,t),Bu(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const o=n.exception&&n.exception.values;if(o){i=!0;for(const s of o){const c=s.mechanism;if(c&&c.handled===!1){r=!0;break}}}const a=t.status==="ok";(a&&t.errors===0||a&&r)&&(zn(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new dt((n=>{let r=0;const i=setInterval((()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=1,t&&r>=t&&(clearInterval(i),n(!1)))}),1)}))}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r=gn(),i=Tr()){const o=this.getOptions(),a=Object.keys(this._integrations);return!n.integrations&&a.length>0&&(n.integrations=a),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),Jv(o,t,n,r,this,i).then((s=>{if(s===null)return s;s.contexts={trace:Av(r),...s.contexts};const c=(function(l,d){const f=d.getPropagationContext();return f.dsc||Mu(f.traceId,l)})(this,r);return s.sdkProcessingMetadata={dynamicSamplingContext:c,...s.sdkProcessingMetadata},s}))}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then((i=>i.event_id),(i=>{Se&&(i instanceof _t&&i.logLevel==="log"?ne.log(i.message):ne.warn(i))}))}_processEvent(t,n,r){const i=this.getOptions(),{sampleRate:o}=i,a=Wu(t),s=zu(t),c=t.type||"error",l=`before send for type \`${c}\``,d=o===void 0?void 0:(function(g){if(typeof g=="boolean")return Number(g);const y=typeof g=="string"?parseFloat(g):g;if(!(typeof y!="number"||isNaN(y)||y<0||y>1))return y;Se&&ne.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(g)} of type ${JSON.stringify(typeof g)}.`)})(o);if(s&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Ci(new _t(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f=c==="replay_event"?"replay":c,m=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,m).then((g=>{if(g===null)throw this.recordDroppedEvent("event_processor",f,t),new _t("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return g;const y=(function(v,b,_,S){const{beforeSend:T,beforeSendTransaction:M,beforeSendSpan:x}=b;if(zu(_)&&T)return T(_,S);if(Wu(_)){if(_.spans&&x){const C=[];for(const E of _.spans){const O=x(E);O?C.push(O):(Rv(),v.recordDroppedEvent("before_send","span"))}_.spans=C}if(M){if(_.spans){const C=_.spans.length;_.sdkProcessingMetadata={..._.sdkProcessingMetadata,spanCountBeforeProcessing:C}}return M(_,S)}}return _})(this,i,g,n);return(function(v,b){const _=`${b} must return \`null\` or a valid event.`;if(Ti(v))return v.then((S=>{if(!Bn(S)&&S!==null)throw new _t(_);return S}),(S=>{throw new _t(`${b} rejected with ${S}`)}));if(!Bn(v)&&v!==null)throw new _t(_);return v})(y,l)})).then((g=>{if(g===null){if(this.recordDroppedEvent("before_send",f,t),a){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw new _t(`${l} returned \`null\`, will not send event.`,"log")}const y=r&&r.getSession();if(!a&&y&&this._updateSessionFromEvent(y,g),a){const b=(g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(g.spans?g.spans.length:0);b>0&&this.recordDroppedEvent("before_send","span",b)}const v=g.transaction_info;if(a&&v&&g.transaction!==t.transaction){const b="custom";g.transaction_info={...v,source:b}}return this.sendEvent(g,n),g})).then(null,(g=>{throw g instanceof _t?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new _t(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
- Reason: ${g}`))}))}_process(t){this._numProcessing++,t.then((n=>(this._numProcessing--,n)),(n=>(this._numProcessing--,n)))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map((([n,r])=>{const[i,o]=n.split(":");return{reason:i,category:o,quantity:r}}))}_flushOutcomes(){Se&&ne.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0)return void(Se&&ne.log("No outcomes to send"));if(!this._dsn)return void(Se&&ne.log("No dsn provided, will not send outcomes"));Se&&ne.log("Sending outcomes:",t);const n=(r=t,Mr((i=this._options.tunnel&&Ei(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:o||xr(),discarded_events:r}]]));var r,i,o;this.sendEnvelope(n)}}function zu(e){return e.type===void 0}function Wu(e){return e.type==="transaction"}function Kv(e){const t=[];function n(r){return t.splice(t.indexOf(r),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(e===void 0||t.length<e))return Ci(new _t("Not adding Promise because buffer limit was reached."));const i=r();return t.indexOf(i)===-1&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(r){return new dt(((i,o)=>{let a=t.length;if(!a)return i(!0);const s=setTimeout((()=>{r&&r>0&&i(!1)}),r);t.forEach((c=>{mn(c).then((()=>{--a||(clearTimeout(s),i(!0))}),o)}))}))}}}function Yv(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(const s of o.trim().split(",")){const[c,l,,,d]=s.split(":",5),f=parseInt(c,10),m=1e3*(isNaN(f)?60:f);if(l)for(const g of l.split(";"))g==="metric_bucket"&&d&&!d.split(";").includes("custom")||(i[g]=r+m);else i.all=r+m}else a?i.all=r+(function(s,c=Date.now()){const l=parseInt(`${s}`,10);if(!isNaN(l))return 1e3*l;const d=Date.parse(`${s}`);return isNaN(d)?6e4:d-c})(a,r):t===429&&(i.all=r+6e4);return i}function Xv(e,t,n=Kv(e.bufferSize||64)){let r={};return{send:function(i){const o=[];if(Eu(i,((c,l)=>{const d=Au(l);if((function(f,m,g=Date.now()){return(function(y,v){return y[v]||y.all||0})(f,m)>g})(r,d)){const f=Hu(c,l);e.recordDroppedEvent("ratelimit_backoff",d,f)}else o.push(c)})),o.length===0)return mn({});const a=Mr(i[0],o),s=c=>{Eu(a,((l,d)=>{const f=Hu(l,d);e.recordDroppedEvent(c,Au(d),f)}))};return n.add((()=>t({body:$v(a)}).then((c=>(c.statusCode!==void 0&&(c.statusCode<200||c.statusCode>=300)&&Se&&ne.warn(`Sentry responded with status code ${c.statusCode} to sent event.`),r=Yv(r,c),c)),(c=>{throw s("network_error"),c})))).then((c=>c),(c=>{if(c instanceof _t)return Se&&ne.error("Skipped sending event because buffer is full."),s("queue_overflow"),mn({});throw c}))},flush:i=>n.drain(i)}}function Hu(e,t){if(t==="event"||t==="transaction")return Array.isArray(e)?e[1]:void 0}const Qv=100;function vn(e,t){const n=We(),r=Tr();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Qv}=n.getOptions();if(o<=0)return;const a={timestamp:xr(),...e},s=i?Sr((()=>i(a,t))):a;s!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}let Ju;const qu=new WeakMap,Zv=()=>({name:"FunctionToString",setupOnce(){Ju=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=sa(this),n=qu.has(We())&&t!==void 0?t:this;return Ju.apply(n,e)}}catch{}},setup(e){qu.set(e,!0)}}),ey=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"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+$/],ty=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const i=r.getOptions(),o=(function(a={},s={}){return{allowUrls:[...a.allowUrls||[],...s.allowUrls||[]],denyUrls:[...a.denyUrls||[],...s.denyUrls||[]],ignoreErrors:[...a.ignoreErrors||[],...s.ignoreErrors||[],...a.disableErrorDefaults?[]:ey],ignoreTransactions:[...a.ignoreTransactions||[],...s.ignoreTransactions||[]],ignoreInternal:a.ignoreInternal===void 0||a.ignoreInternal}})(e,i);return(function(a,s){return s.ignoreInternal&&(function(c){try{return c.exception.values[0].type==="SentryError"}catch{}return!1})(a)?(Se&&ne.warn(`Event dropped due to being internal Sentry Error.
9
- Event: ${qt(a)}`),!0):(function(c,l){return c.type||!l||!l.length?!1:(function(d){const f=[];d.message&&f.push(d.message);let m;try{m=d.exception.values[d.exception.values.length-1]}catch{}return m&&m.value&&(f.push(m.value),m.type&&f.push(`${m.type}: ${m.value}`)),f})(c).some((d=>Mi(d,l)))})(a,s.ignoreErrors)?(Se&&ne.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
7
+ `),typeof s=="string"||s instanceof Uint8Array)i(s);else{let c;try{c=JSON.stringify(s)}catch{c=JSON.stringify(Vt(s))}i(c)}}return typeof r=="string"?r:(function(o){const a=o.reduce(((l,d)=>l+d.length),0),s=new Uint8Array(a);let c=0;for(const l of o)s.set(l,c),c+=l.length;return s})(r)}function zv(e){const t=typeof e.data=="string"?va(e.data):e.data;return[lt({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Wv={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 Au(e){return Wv[e]}function Ou(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Hv(e,t,n,r){const i=Ou(n),o=e.type&&e.type!=="replay_event"?e.type:"event";(function(s,c){c&&(s.sdk=s.sdk||{},s.sdk.name=s.sdk.name||c.name,s.sdk.version=s.sdk.version||c.version,s.sdk.integrations=[...s.sdk.integrations||[],...c.integrations||[]],s.sdk.packages=[...s.sdk.packages||[],...c.packages||[]])})(e,n&&n.sdk);const a=(function(s,c,l,d){const f=s.sdkProcessingMetadata&&s.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:s.event_id,sent_at:new Date().toISOString(),...c&&{sdk:c},...!!l&&d&&{dsn:Ai(d)},...f&&{trace:lt({...f})}}})(e,i,r,t);return delete e.sdkProcessingMetadata,Mr(a,[[{type:o},e]])}function ya(e,t,n,r=0){return new dt(((i,o)=>{const a=e[r];if(t===null||typeof a!="function")i(t);else{const s=a({...t},n);Se&&a.id&&s===null&&ne.log(`Event processor "${a.id}" dropped event`),Mi(s)?s.then((c=>ya(e,c,n,r+1).then(i))).then(null,o):ya(e,s,n,r+1).then(i).then(null,o)}}))}let Oi,Iu,ba;function Jv(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=t;(function(a,s){const{extra:c,tags:l,user:d,contexts:f,level:m,transactionName:g}=s,y=lt(c);y&&Object.keys(y).length&&(a.extra={...y,...a.extra});const v=lt(l);v&&Object.keys(v).length&&(a.tags={...v,...a.tags});const b=lt(d);b&&Object.keys(b).length&&(a.user={...b,...a.user});const _=lt(f);_&&Object.keys(_).length&&(a.contexts={..._,...a.contexts}),m&&(a.level=m),g&&a.type!=="transaction"&&(a.transaction=g)})(e,t),r&&(function(a,s){a.contexts={trace:jv(s),...a.contexts},a.sdkProcessingMetadata={dynamicSamplingContext:Vv(s),...a.sdkProcessingMetadata};const c=Tu(s),l=pa(c).description;l&&!a.transaction&&a.type==="transaction"&&(a.transaction=l)})(e,r),(function(a,s){a.fingerprint=a.fingerprint?Array.isArray(a.fingerprint)?a.fingerprint:[a.fingerprint]:[],s&&(a.fingerprint=a.fingerprint.concat(s)),a.fingerprint&&!a.fingerprint.length&&delete a.fingerprint})(e,n),(function(a,s){const c=[...a.breadcrumbs||[],...s];a.breadcrumbs=c.length?c:void 0})(e,i),(function(a,s){a.sdkProcessingMetadata={...a.sdkProcessingMetadata,...s}})(e,o)}function Du(e,t){const{extra:n,tags:r,user:i,contexts:o,level:a,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:f,propagationContext:m,transactionName:g,span:y}=t;Ii(e,"extra",n),Ii(e,"tags",r),Ii(e,"user",i),Ii(e,"contexts",o),e.sdkProcessingMetadata=Ei(e.sdkProcessingMetadata,s,2),a&&(e.level=a),g&&(e.transactionName=g),y&&(e.span=y),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...m}}function Ii(e,t,n){e[t]=Ei(e[t],n,1)}function qv(e,t,n,r,i,o){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ut(),timestamp:t.timestamp||xr()},l=n.integrations||e.integrations.map((y=>y.name));(function(y,v){const{environment:b,release:_,dist:S,maxValueLength:T=250}=v;y.environment=y.environment||b||ma,!y.release&&_&&(y.release=_),!y.dist&&S&&(y.dist=S),y.message&&(y.message=$n(y.message,T));const M=y.exception&&y.exception.values&&y.exception.values[0];M&&M.value&&(M.value=$n(M.value,T));const x=y.request;x&&x.url&&(x.url=$n(x.url,T))})(c,e),(function(y,v){v.length>0&&(y.sdk=y.sdk||{},y.sdk.integrations=[...y.sdk.integrations||[],...v])})(c,l),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&(function(y,v){const b=(function(_){const S=ge._sentryDebugIds;if(!S)return{};const T=Object.keys(S);return ba&&T.length===Iu||(Iu=T.length,ba=T.reduce(((M,x)=>{Oi||(Oi={});const C=Oi[x];if(C)M[C[0]]=C[1];else{const E=_(x);for(let O=E.length-1;O>=0;O--){const V=E[O],B=V&&V.filename,N=S[x];if(B&&N){M[B]=N,Oi[x]=[B,N];break}}}return M}),{})),ba})(v);try{y.exception.values.forEach((_=>{_.stacktrace.frames.forEach((S=>{b&&S.filename&&(S.debug_id=b[S.filename])}))}))}catch{}})(c,e.stackParser);const d=(function(y,v){if(!v)return y;const b=y?y.clone():new Gt;return b.update(v),b})(r,n.captureContext);n.mechanism&&Un(c,n.mechanism);const f=i?i.getEventProcessors():[],m=_i("globalScope",(()=>new Gt)).getScopeData();o&&Du(m,o.getScopeData()),d&&Du(m,d.getScopeData());const g=[...n.attachments||[],...m.attachments];return g.length&&(n.attachments=g),Jv(c,m),ya([...f,...m.eventProcessors],c,n).then((y=>(y&&(function(v){const b={};try{v.exception.values.forEach((S=>{S.stacktrace.frames.forEach((T=>{T.debug_id&&(T.abs_path?b[T.abs_path]=T.debug_id:T.filename&&(b[T.filename]=T.debug_id),delete T.debug_id)}))}))}catch{}if(Object.keys(b).length===0)return;v.debug_meta=v.debug_meta||{},v.debug_meta.images=v.debug_meta.images||[];const _=v.debug_meta.images;Object.entries(b).forEach((([S,T])=>{_.push({type:"sourcemap",code_file:S,debug_id:T})}))})(y),typeof a=="number"&&a>0?(function(v,b,_){if(!v)return null;const S={...v,...v.breadcrumbs&&{breadcrumbs:v.breadcrumbs.map((T=>({...T,...T.data&&{data:Vt(T.data,b,_)}})))},...v.user&&{user:Vt(v.user,b,_)},...v.contexts&&{contexts:Vt(v.contexts,b,_)},...v.extra&&{extra:Vt(v.extra,b,_)}};return v.contexts&&v.contexts.trace&&S.contexts&&(S.contexts.trace=v.contexts.trace,v.contexts.trace.data&&(S.contexts.trace.data=Vt(v.contexts.trace.data,b,_))),v.spans&&(S.spans=v.spans.map((T=>({...T,...T.data&&{data:Vt(T.data,b,_)}})))),v.contexts&&v.contexts.flags&&S.contexts&&(S.contexts.flags=Vt(v.contexts.flags,3,_)),S})(y,a,s):y)))}function Mx(e){}function Lu(e,t){return gn().captureEvent(e,t)}function ju(e){const t=We(),n=Tr(),r=gn(),{release:i,environment:o=ma}=t&&t.getOptions()||{},{userAgent:a}=ge.navigator||{},s=Cv({release:i,environment:o,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),c=n.getSession();return c&&c.status==="ok"&&zn(c,{status:"exited"}),Ru(),n.setSession(s),r.setSession(s),s}function Ru(){const e=Tr(),t=gn(),n=t.getSession()||e.getSession();n&&(function(r,i){let o={};r.status==="ok"&&(o={status:"exited"}),zn(r,o)})(n),Nu(),e.setSession(),t.setSession()}function Nu(){const e=Tr(),t=gn(),n=We(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Vu(e=!1){e?Ru():Nu()}function Gv(e,t,n){return t||`${(function(r){return`${(function(i){const o=i.protocol?`${i.protocol}:`:"",a=i.port?`:${i.port}`:"";return`${o}//${i.host}${a}${i.path?`/${i.path}`:""}/api/`})(r)}${r.projectId}/envelope/`})(e)}?${(function(r,i){const o={sentry_version:"7"};return r.publicKey&&(o.sentry_key=r.publicKey),i&&(o.sentry_client=`${i.name}/${i.version}`),new URLSearchParams(o).toString()})(e,n)}`}const Fu=[];function Bu(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function $u(e,t,n){if(n[t.name])Se&&ne.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,Fu.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Fu.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",((i,o)=>r(i,o,e)))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign(((o,a)=>r(o,a,e)),{id:t.name});e.addEventProcessor(i)}Se&&ne.log(`Integration installed: ${t.name}`)}}class _t extends Error{constructor(t,n="warn"){super(t),this.message=t,this.logLevel=n}}const Uu="Not capturing exception because it's already been captured.";class Kv{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Bv(t.dsn):Se&&ne.warn("No DSN provided, client will not send events."),this._dsn){const r=Gv(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}const n=["enableTracing","tracesSampleRate","tracesSampler"].find((r=>r in t&&t[r]==null));n&&Sr((()=>{console.warn(`[Sentry] Deprecation warning: \`${n}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(t,n,r){const i=ut();if(gu(t))return Se&&ne.log(Uu),i;const o={event_id:i,...n};return this._process(this.eventFromException(t,o).then((a=>this._captureEvent(a,o,r)))),o.event_id}captureMessage(t,n,r,i){const o={event_id:ut(),...r},a=ia(t)?t:String(t),s=oa(t)?this.eventFromMessage(a,n,o):this.eventFromException(t,o);return this._process(s.then((c=>this._captureEvent(c,o,i)))),o.event_id}captureEvent(t,n,r){const i=ut();if(n&&n.originalException&&gu(n.originalException))return Se&&ne.log(Uu),i;const o={event_id:i,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,o,a||r)),o.event_id}captureSession(t){typeof t.release!="string"?Se&&ne.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),zn(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then((r=>n.flush(t).then((i=>r&&i))))):mn(!0)}close(t){return this.flush(t).then((n=>(this.getOptions().enabled=!1,this.emit("close"),n)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some((({name:t})=>t.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];$u(this,t,this._integrations),n||Bu(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Hv(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=$v(r,zv(o));const i=this.sendEnvelope(r);i&&i.then((o=>this.emit("afterSendEvent",t,o)),null)}sendSession(t){const n=(function(r,i,o,a){const s=Ou(o);return Mr({sent_at:new Date().toISOString(),...s&&{sdk:s},...!!a&&i&&{dsn:Ai(i)}},["aggregates"in r?[{type:"sessions"},r]:[{type:"session"},r.toJSON()]])})(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const i=typeof r=="number"?r:1,o=`${t}:${n}`;Se&&ne.log(`Recording outcome: "${o}"${i>1?` (${i} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+i}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach((i=>i(...n)))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,(n=>(Se&&ne.error("Error while sending envelope:",n),n))):(Se&&ne.error("Transport disabled"),mn({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=(function(n,r){const i={};return r.forEach((o=>{o&&$u(n,o,i)})),i})(this,t),Bu(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",i=!1;const o=n.exception&&n.exception.values;if(o){i=!0;for(const s of o){const c=s.mechanism;if(c&&c.handled===!1){r=!0;break}}}const a=t.status==="ok";(a&&t.errors===0||a&&r)&&(zn(t,{...r&&{status:"crashed"},errors:t.errors||Number(i||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new dt((n=>{let r=0;const i=setInterval((()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=1,t&&r>=t&&(clearInterval(i),n(!1)))}),1)}))}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r=gn(),i=Tr()){const o=this.getOptions(),a=Object.keys(this._integrations);return!n.integrations&&a.length>0&&(n.integrations=a),this.emit("preprocessEvent",t,n),t.type||i.setLastEventId(t.event_id||n.event_id),qv(o,t,n,r,this,i).then((s=>{if(s===null)return s;s.contexts={trace:Ov(r),...s.contexts};const c=(function(l,d){const f=d.getPropagationContext();return f.dsc||Mu(f.traceId,l)})(this,r);return s.sdkProcessingMetadata={dynamicSamplingContext:c,...s.sdkProcessingMetadata},s}))}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then((i=>i.event_id),(i=>{Se&&(i instanceof _t&&i.logLevel==="log"?ne.log(i.message):ne.warn(i))}))}_processEvent(t,n,r){const i=this.getOptions(),{sampleRate:o}=i,a=Wu(t),s=zu(t),c=t.type||"error",l=`before send for type \`${c}\``,d=o===void 0?void 0:(function(g){if(typeof g=="boolean")return Number(g);const y=typeof g=="string"?parseFloat(g):g;if(!(typeof y!="number"||isNaN(y)||y<0||y>1))return y;Se&&ne.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(g)} of type ${JSON.stringify(typeof g)}.`)})(o);if(s&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Pi(new _t(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f=c==="replay_event"?"replay":c,m=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,m).then((g=>{if(g===null)throw this.recordDroppedEvent("event_processor",f,t),new _t("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return g;const y=(function(v,b,_,S){const{beforeSend:T,beforeSendTransaction:M,beforeSendSpan:x}=b;if(zu(_)&&T)return T(_,S);if(Wu(_)){if(_.spans&&x){const C=[];for(const E of _.spans){const O=x(E);O?C.push(O):(Nv(),v.recordDroppedEvent("before_send","span"))}_.spans=C}if(M){if(_.spans){const C=_.spans.length;_.sdkProcessingMetadata={..._.sdkProcessingMetadata,spanCountBeforeProcessing:C}}return M(_,S)}}return _})(this,i,g,n);return(function(v,b){const _=`${b} must return \`null\` or a valid event.`;if(Mi(v))return v.then((S=>{if(!Bn(S)&&S!==null)throw new _t(_);return S}),(S=>{throw new _t(`${b} rejected with ${S}`)}));if(!Bn(v)&&v!==null)throw new _t(_);return v})(y,l)})).then((g=>{if(g===null){if(this.recordDroppedEvent("before_send",f,t),a){const b=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",b)}throw new _t(`${l} returned \`null\`, will not send event.`,"log")}const y=r&&r.getSession();if(!a&&y&&this._updateSessionFromEvent(y,g),a){const b=(g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(g.spans?g.spans.length:0);b>0&&this.recordDroppedEvent("before_send","span",b)}const v=g.transaction_info;if(a&&v&&g.transaction!==t.transaction){const b="custom";g.transaction_info={...v,source:b}}return this.sendEvent(g,n),g})).then(null,(g=>{throw g instanceof _t?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new _t(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
+ Reason: ${g}`))}))}_process(t){this._numProcessing++,t.then((n=>(this._numProcessing--,n)),(n=>(this._numProcessing--,n)))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map((([n,r])=>{const[i,o]=n.split(":");return{reason:i,category:o,quantity:r}}))}_flushOutcomes(){Se&&ne.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0)return void(Se&&ne.log("No outcomes to send"));if(!this._dsn)return void(Se&&ne.log("No dsn provided, will not send outcomes"));Se&&ne.log("Sending outcomes:",t);const n=(r=t,Mr((i=this._options.tunnel&&Ai(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:o||xr(),discarded_events:r}]]));var r,i,o;this.sendEnvelope(n)}}function zu(e){return e.type===void 0}function Wu(e){return e.type==="transaction"}function Yv(e){const t=[];function n(r){return t.splice(t.indexOf(r),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(r){if(!(e===void 0||t.length<e))return Pi(new _t("Not adding Promise because buffer limit was reached."));const i=r();return t.indexOf(i)===-1&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(r){return new dt(((i,o)=>{let a=t.length;if(!a)return i(!0);const s=setTimeout((()=>{r&&r>0&&i(!1)}),r);t.forEach((c=>{mn(c).then((()=>{--a||(clearTimeout(s),i(!0))}),o)}))}))}}}function Xv(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(o)for(const s of o.trim().split(",")){const[c,l,,,d]=s.split(":",5),f=parseInt(c,10),m=1e3*(isNaN(f)?60:f);if(l)for(const g of l.split(";"))g==="metric_bucket"&&d&&!d.split(";").includes("custom")||(i[g]=r+m);else i.all=r+m}else a?i.all=r+(function(s,c=Date.now()){const l=parseInt(`${s}`,10);if(!isNaN(l))return 1e3*l;const d=Date.parse(`${s}`);return isNaN(d)?6e4:d-c})(a,r):t===429&&(i.all=r+6e4);return i}function Qv(e,t,n=Yv(e.bufferSize||64)){let r={};return{send:function(i){const o=[];if(Eu(i,((c,l)=>{const d=Au(l);if((function(f,m,g=Date.now()){return(function(y,v){return y[v]||y.all||0})(f,m)>g})(r,d)){const f=Hu(c,l);e.recordDroppedEvent("ratelimit_backoff",d,f)}else o.push(c)})),o.length===0)return mn({});const a=Mr(i[0],o),s=c=>{Eu(a,((l,d)=>{const f=Hu(l,d);e.recordDroppedEvent(c,Au(d),f)}))};return n.add((()=>t({body:Uv(a)}).then((c=>(c.statusCode!==void 0&&(c.statusCode<200||c.statusCode>=300)&&Se&&ne.warn(`Sentry responded with status code ${c.statusCode} to sent event.`),r=Xv(r,c),c)),(c=>{throw s("network_error"),c})))).then((c=>c),(c=>{if(c instanceof _t)return Se&&ne.error("Skipped sending event because buffer is full."),s("queue_overflow"),mn({});throw c}))},flush:i=>n.drain(i)}}function Hu(e,t){if(t==="event"||t==="transaction")return Array.isArray(e)?e[1]:void 0}const Zv=100;function vn(e,t){const n=We(),r=Tr();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Zv}=n.getOptions();if(o<=0)return;const a={timestamp:xr(),...e},s=i?Sr((()=>i(a,t))):a;s!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}let Ju;const qu=new WeakMap,ey=()=>({name:"FunctionToString",setupOnce(){Ju=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=sa(this),n=qu.has(We())&&t!==void 0?t:this;return Ju.apply(n,e)}}catch{}},setup(e){qu.set(e,!0)}}),ty=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"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+$/],ny=(e={})=>({name:"InboundFilters",processEvent(t,n,r){const i=r.getOptions(),o=(function(a={},s={}){return{allowUrls:[...a.allowUrls||[],...s.allowUrls||[]],denyUrls:[...a.denyUrls||[],...s.denyUrls||[]],ignoreErrors:[...a.ignoreErrors||[],...s.ignoreErrors||[],...a.disableErrorDefaults?[]:ty],ignoreTransactions:[...a.ignoreTransactions||[],...s.ignoreTransactions||[]],ignoreInternal:a.ignoreInternal===void 0||a.ignoreInternal}})(e,i);return(function(a,s){return s.ignoreInternal&&(function(c){try{return c.exception.values[0].type==="SentryError"}catch{}return!1})(a)?(Se&&ne.warn(`Event dropped due to being internal Sentry Error.
9
+ Event: ${qt(a)}`),!0):(function(c,l){return c.type||!l||!l.length?!1:(function(d){const f=[];d.message&&f.push(d.message);let m;try{m=d.exception.values[d.exception.values.length-1]}catch{}return m&&m.value&&(f.push(m.value),m.type&&f.push(`${m.type}: ${m.value}`)),f})(c).some((d=>Ci(d,l)))})(a,s.ignoreErrors)?(Se&&ne.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
10
  Event: ${qt(a)}`),!0):(function(c){return c.type||!c.exception||!c.exception.values||c.exception.values.length===0?!1:!c.message&&!c.exception.values.some((l=>l.stacktrace||l.type&&l.type!=="Error"||l.value))})(a)?(Se&&ne.warn(`Event dropped due to not having an error message, error type or stacktrace.
11
- Event: ${qt(a)}`),!0):(function(c,l){if(c.type!=="transaction"||!l||!l.length)return!1;const d=c.transaction;return!!d&&Mi(d,l)})(a,s.ignoreTransactions)?(Se&&ne.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
12
- Event: ${qt(a)}`),!0):(function(c,l){if(!l||!l.length)return!1;const d=Ii(c);return!!d&&Mi(d,l)})(a,s.denyUrls)?(Se&&ne.warn(`Event dropped due to being matched by \`denyUrls\` option.
11
+ Event: ${qt(a)}`),!0):(function(c,l){if(c.type!=="transaction"||!l||!l.length)return!1;const d=c.transaction;return!!d&&Ci(d,l)})(a,s.ignoreTransactions)?(Se&&ne.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
12
+ Event: ${qt(a)}`),!0):(function(c,l){if(!l||!l.length)return!1;const d=Di(c);return!!d&&Ci(d,l)})(a,s.denyUrls)?(Se&&ne.warn(`Event dropped due to being matched by \`denyUrls\` option.
13
13
  Event: ${qt(a)}.
14
- Url: ${Ii(a)}`),!0):(function(c,l){if(!l||!l.length)return!0;const d=Ii(c);return!d||Mi(d,l)})(a,s.allowUrls)?!1:(Se&&ne.warn(`Event dropped due to not being matched by \`allowUrls\` option.
14
+ Url: ${Di(a)}`),!0):(function(c,l){if(!l||!l.length)return!0;const d=Di(c);return!d||Ci(d,l)})(a,s.allowUrls)?!1:(Se&&ne.warn(`Event dropped due to not being matched by \`allowUrls\` option.
15
15
  Event: ${qt(a)}.
16
- Url: ${Ii(a)}`),!0)})(t,o)?null:t}});function Ii(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?(function(n=[]){for(let r=n.length-1;r>=0;r--){const i=n[r];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null})(t):null}catch{return Se&&ne.error(`Cannot extract url for event ${qt(e)}`),null}}function ny(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&hn(a.originalException,Error)))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,l;s&&(o.exception.values=(c=_a(e,t,i,a.originalException,r,o.exception.values,s,0),l=n,c.map((d=>(d.value&&(d.value=$n(d.value,l)),d)))))}function _a(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let c=[...o];if(hn(r[i],Error)){Gu(a,s);const l=e(t,r[i]),d=c.length;Ku(l,i,d,s),c=_a(e,t,n,r[i],i,[l,...c],l,d)}return Array.isArray(r.errors)&&r.errors.forEach(((l,d)=>{if(hn(l,Error)){Gu(a,s);const f=e(t,l),m=c.length;Ku(f,`errors[${d}]`,m,s),c=_a(e,t,n,l,i,[f,...c],f,m)}})),c}function Gu(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 Ku(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 wa(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const 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 ry(){"console"in ge&&Zo.forEach((function(e){e in ge.console&&at(ge.console,e,(function(t){return _i[e]=t,function(...n){bt("console",{args:n,level:e});const r=_i[e];r&&r.apply(ge.console,n)}}))}))}function iy(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const oy=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if((function(n,r){return r?!!((function(i,o){const a=i.message,s=o.message;return!(!a&&!s||a&&!s||!a&&s||a!==s||!Xu(i,o)||!Yu(i,o))})(n,r)||(function(i,o){const a=Qu(o),s=Qu(i);return!(!a||!s||a.type!==s.type||a.value!==s.value||!Xu(i,o)||!Yu(i,o))})(n,r)):!1})(t,e))return Se&&ne.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Yu(e,t){let n=ru(e),r=ru(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const o=r[i],a=n[i];if(o.filename!==a.filename||o.lineno!==a.lineno||o.colno!==a.colno||o.function!==a.function)return!1}return!0}function Xu(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 Qu(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Zu(e){return e===void 0?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const ka=ge;function Sa(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ay(){if(typeof EdgeRuntime=="string")return!0;if(!(function(){if(!("fetch"in ka))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}})())return!1;if(Sa(ka.fetch))return!0;let e=!1;const t=ka.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Sa(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ln&&ne.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function sy(e,t){const n="fetch";dn(n,e),fn(n,(()=>(function(r,i=!1){i&&!ay()||at(ge,"fetch",(function(o){return function(...a){const s=new Error,{method:c,url:l}=(function(f){if(f.length===0)return{method:"GET",url:""};if(f.length===2){const[g,y]=f;return{url:ed(g),method:xa(y,"method")?String(y.method).toUpperCase():"GET"}}const m=f[0];return{url:ed(m),method:xa(m,"method")?String(m.method).toUpperCase():"GET"}})(a),d={args:a,fetchData:{method:c,url:l},startTimestamp:1e3*Rt(),virtualError:s};return r||bt("fetch",{...d}),o.apply(ge,a).then((async f=>(r?r(f):bt("fetch",{...d,endTimestamp:1e3*Rt(),response:f}),f)),(f=>{throw bt("fetch",{...d,endTimestamp:1e3*Rt(),error:f}),ra(f)&&f.stack===void 0&&(f.stack=s.stack,pn(f,"framesToPop",1)),f}))}}))})(void 0,t)))}function xa(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ed(e){return typeof e=="string"?e:e?xa(e,"url")?e.url:e.toString?e.toString():"":""}const Di=ge,Ve=ge;let Ta=0;function td(){return Ta>0}function Hn(e,t={}){if(!(function(r){return typeof r=="function"})(e))return e;try{const r=e.__sentry_wrapped__;if(r)return typeof r=="function"?r:e;if(sa(e))return e}catch{return e}const n=function(...r){try{const i=r.map((o=>Hn(o,t)));return e.apply(this,i)}catch(i){throw Ta++,setTimeout((()=>{Ta--})),(function(...o){const a=ha(Si());if(o.length===2){const[s,c]=o;return s?a.withSetScope(s,c):a.withScope(c)}a.withScope(o[0])})((o=>{var a;o.addEventProcessor((s=>(t.mechanism&&(la(s,void 0),Un(s,t.mechanism)),s.extra={...s.extra,arguments:r},s))),a=i,gn().captureException(a,void 0)})),i}};try{for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}catch{}du(n,e),pn(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const Li=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ma(e,t){const n=Pa(e,t),r={type:uy(t),value:dy(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function cy(e,t,n,r){const i=We(),o=i&&i.getOptions().normalizeDepth,a=(function(l){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)){const f=l[d];if(f instanceof Error)return f}})(t),s={__serialized__:Pu(t,o)};if(a)return{exception:{values:[Ma(e,a)]},extra:s};const c={exception:{values:[{type:xi(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:fy(t,{isUnhandledRejection:r})}]},extra:s};if(n){const l=Pa(e,n);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function Ca(e,t){return{exception:{values:[Ma(e,t)]}}}function Pa(e,t){const n=t.stacktrace||t.stack||"",r=(function(o){return o&&ly.test(o.message)?1:0})(t),i=(function(o){return typeof o.framesToPop=="number"?o.framesToPop:0})(t);try{return e(n,r,i)}catch{}return[]}const ly=/Minified React error #\d+;/i;function nd(e){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function uy(e){const t=e&&e.name;return!t&&nd(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function dy(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:nd(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function Ea(e,t,n,r,i){let o;if(au(t)&&t.error)return Ca(e,t.error);if(su(t)||Fn(t,"DOMException")){const a=t;if("stack"in t)o=Ca(e,t);else{const s=a.name||(su(a)?"DOMError":"DOMException"),c=a.message?`${s}: ${a.message}`:s;o=Aa(e,c,n,r),la(o,c)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return ra(t)?Ca(e,t):Bn(t)||xi(t)?(o=cy(e,t,n,i),Un(o,{synthetic:!0}),o):(o=Aa(e,t,n,r),la(o,`${t}`),Un(o,{synthetic:!0}),o)}function Aa(e,t,n,r){const i={};if(r&&n){const o=Pa(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),Un(i,{synthetic:!0})}if(ia(t)){const{__sentry_template_string__:o,__sentry_template_values__:a}=t;return i.logentry={message:o,params:a},i}return i.message=t,i}function fy(e,{isUnhandledRejection:t}){const n=(function(i,o=40){const a=Object.keys(fu(i));a.sort();const s=a[0];if(!s)return"[object has no keys]";if(s.length>=o)return $n(s,o);for(let c=a.length;c>0;c--){const l=a.slice(0,c).join(", ");if(!(l.length>o))return c===a.length?l:$n(l,o)}return""})(e),r=t?"promise rejection":"exception";return au(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:xi(e)?`Event \`${(function(i){try{const o=Object.getPrototypeOf(i);return o?o.constructor.name:void 0}catch{}})(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class hy extends Gv{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t};(function(r,i,o=[i],a="npm"){const s=r._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${i}`,packages:o.map((c=>({name:`${a}:@sentry/${c}`,version:cn}))),version:cn}),r._metadata=s})(n,"browser",["browser"],Ve.SENTRY_SDK_SOURCE||"npm"),super(n),n.sendClientReports&&Ve.document&&Ve.document.addEventListener("visibilitychange",(()=>{Ve.document.visibilityState==="hidden"&&this._flushOutcomes()}))}eventFromException(t,n){return(function(r,i,o,a){const s=Ea(r,i,o&&o.syntheticException||void 0,a);return Un(s),s.level="error",o&&o.event_id&&(s.event_id=o.event_id),mn(s)})(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return(function(i,o,a="info",s,c){const l=Aa(i,o,s&&s.syntheticException||void 0,c);return l.level=a,s&&s.event_id&&(l.event_id=s.event_id),mn(l)})(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(Li&&ne.warn("SDK not enabled, will not capture user feedback."));const n=(function(r,{metadata:i,tunnel:o,dsn:a}){const s={event_id:r.event_id,sent_at:new Date().toISOString(),...i&&i.sdk&&{sdk:{name:i.sdk.name,version:i.sdk.version}},...!!o&&!!a&&{dsn:Ei(a)}};return Mr(s,[(function(l){return[{type:"user_report"},l]})(r)])})(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const py=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Xe=ge;let rd,Oa,Ia,ji;function my(){if(!Xe.document)return;const e=bt.bind(null,"dom"),t=id(e,!0);Xe.document.addEventListener("click",t,!1),Xe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((n=>{const r=Xe[n],i=r&&r.prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(at(i,"addEventListener",(function(o){return function(a,s,c){if(a==="click"||a=="keypress")try{const l=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=l[a]=l[a]||{refCount:0};if(!d.handler){const f=id(e);d.handler=f,o.call(this,a,f,c)}d.refCount++}catch{}return o.call(this,a,s,c)}})),at(i,"removeEventListener",(function(o){return function(a,s,c){if(a==="click"||a=="keypress")try{const l=this.__sentry_instrumentation_handlers__||{},d=l[a];d&&(d.refCount--,d.refCount<=0&&(o.call(this,a,d.handler,c),d.handler=void 0,delete l[a]),Object.keys(l).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,a,s,c)}})))}))}function id(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=(function(o){try{return o.target}catch{return null}})(n);if((function(o,a){return o==="keypress"&&(!a||!a.tagName||a.tagName!=="INPUT"&&a.tagName!=="TEXTAREA"&&!a.isContentEditable)})(n.type,r))return;pn(n,"_sentryCaptured",!0),r&&!r._sentryId&&pn(r,"_sentryId",ut());const i=n.type==="keypress"?"input":n.type;(function(o){if(o.type!==Oa)return!1;try{if(!o.target||o.target._sentryId!==Ia)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),Oa=n.type,Ia=r?r._sentryId:void 0),clearTimeout(rd),rd=Xe.setTimeout((()=>{Ia=void 0,Oa=void 0}),1e3)}}function od(e){const t="history";dn(t,e),fn(t,gy)}function gy(){if(!(function(){const n=Di.chrome,r=n&&n.app&&n.app.runtime,i="history"in Di&&!!Di.history.pushState&&!!Di.history.replaceState;return!r&&i})())return;const e=Xe.onpopstate;function t(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const o=ji,a=String(i);ji=a,bt("history",{from:o,to:a})}return n.apply(this,r)}}Xe.onpopstate=function(...n){const r=Xe.location.href,i=ji;if(ji=r,bt("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}},at(Xe.history,"pushState",t),at(Xe.history,"replaceState",t)}const Ri={};function ad(e){Ri[e]=void 0}const Cr="__sentry_xhr_v3__";function vy(){if(!Xe.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=1e3*Rt(),a=jt(r[0])?r[0].toUpperCase():void 0,s=(function(l){if(jt(l))return l;try{return l.toString()}catch{}})(r[1]);if(!a||!s)return t.apply(n,r);n[Cr]={method:a,url:s,request_headers:{}},a==="POST"&&s.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const l=n[Cr];if(l&&n.readyState===4){try{l.status_code=n.status}catch{}bt("xhr",{endTimestamp:1e3*Rt(),startTimestamp:o,xhr:n,virtualError:i})}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply:(l,d,f)=>(c(),l.apply(d,f))}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(l,d,f){const[m,g]=f,y=d[Cr];return y&&jt(m)&&jt(g)&&(y.request_headers[m.toLowerCase()]=g),l.apply(d,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Cr];return i?(r[0]!==void 0&&(i.body=r[0]),bt("xhr",{startTimestamp:1e3*Rt(),xhr:n}),t.apply(n,r)):t.apply(n,r)}})}function yy(e,t=(function(n){const r=Ri[n];if(r)return r;let i=Xe[n];if(Sa(i))return Ri[n]=i.bind(Xe);const o=Xe.document;if(o&&typeof o.createElement=="function")try{const a=o.createElement("iframe");a.hidden=!0,o.head.appendChild(a);const s=a.contentWindow;s&&s[n]&&(i=s[n]),o.head.removeChild(a)}catch(a){py&&ne.warn(`Could not create sandbox iframe for ${n} check, bailing to window.${n}: `,a)}return i&&(Ri[n]=i.bind(Xe))})("fetch")){let n=0,r=0;return Xv(e,(function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return ad("fetch"),Ci("No fetch implementation available");try{return t(e.url,a).then((s=>(n-=o,r--,{statusCode:s.status,headers:{"x-sentry-rate-limits":s.headers.get("X-Sentry-Rate-Limits"),"retry-after":s.headers.get("Retry-After")}})))}catch(s){return ad("fetch"),n-=o,r--,Ci(s)}}))}function Da(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?un:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const by=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,_y=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,wy=/\((\S*)(?::(\d+))(?::(\d+))\)/,ky=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Sy=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,xy=(function(...e){const t=e.sort(((n,r)=>n[0]-r[0])).map((n=>n[1]));return(n,r=0,i=0)=>{const o=[],a=n.split(`
17
- `);for(let s=r;s<a.length;s++){const c=a[s];if(c.length>1024)continue;const l=eu.test(c)?c.replace(eu,"$1"):c;if(!l.match(/\S*Error: /)){for(const d of t){const f=d(l);if(f){o.push(f);break}}if(o.length>=50+i)break}}return(function(s){if(!s.length)return[];const c=Array.from(s);return/sentryWrapped/.test(wi(c).function||"")&&c.pop(),c.reverse(),tu.test(wi(c).function||"")&&(c.pop(),tu.test(wi(c).function||"")&&c.pop()),c.slice(0,50).map((l=>({...l,filename:l.filename||wi(c).filename,function:l.function||un})))})(o.slice(i))}})([30,e=>{const t=by.exec(e);if(t){const[,r,i,o]=t;return Da(r,un,+i,+o)}const n=_y.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=wy.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[r,i]=sd(n[1]||un,n[2]);return Da(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=ky.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Sy.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||un;return[r,n]=sd(r,n),Da(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),sd=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:un,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},cd=1024,Ty=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(n){var r;t.console&&(function(i){const o="console";dn(o,i),fn(o,ry)})((function(i){return function(o){if(We()!==i)return;const a={category:"console",data:{arguments:o.args,logger:"console"},level:iy(o.level),message:uu(o.args," ")};if(o.level==="assert"){if(o.args[0]!==!1)return;a.message=`Assertion failed: ${uu(o.args.slice(1)," ")||"console.assert"}`,a.data.arguments=o.args.slice(1)}vn(a,{input:o.args,level:o.level})}})(n)),t.dom&&(r=(function(i,o){return function(a){if(We()!==i)return;let s,c,l=typeof o=="object"?o.serializeAttribute:void 0,d=typeof o=="object"&&typeof o.maxStringLength=="number"?o.maxStringLength:void 0;d&&d>cd&&(Li&&ne.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${d} was configured. Sentry will use 1024 instead.`),d=cd),typeof l=="string"&&(l=[l]);try{const m=a.event,g=(function(y){return!!y&&!!y.target})(m)?m.target:m;s=lu(g,{keyAttrs:l,maxStringLength:d}),c=(function(y){if(!aa.HTMLElement)return null;let v=y;for(let b=0;b<5;b++){if(!v)return null;if(v instanceof HTMLElement){if(v.dataset.sentryComponent)return v.dataset.sentryComponent;if(v.dataset.sentryElement)return v.dataset.sentryElement}v=v.parentNode}return null})(g)}catch{s="<unknown>"}if(s.length===0)return;const f={category:`ui.${a.name}`,message:s};c&&(f.data={"ui.component_name":c}),vn(f,{event:a.event,name:a.name,global:a.global})}})(n,t.dom),dn("dom",r),fn("dom",my)),t.xhr&&(function(i){dn("xhr",i),fn("xhr",vy)})((function(i){return function(o){if(We()!==i)return;const{startTimestamp:a,endTimestamp:s}=o,c=o.xhr[Cr];if(!a||!s||!c)return;const{method:l,url:d,status_code:f,body:m}=c,g={method:l,url:d,status_code:f},y={xhr:o.xhr,input:m,startTimestamp:a,endTimestamp:s};vn({category:"xhr",data:g,type:"http",level:Zu(f)},y)}})(n)),t.fetch&&sy((function(i){return function(o){if(We()!==i)return;const{startTimestamp:a,endTimestamp:s}=o;if(s&&(!o.fetchData.url.match(/sentry_key/)||o.fetchData.method!=="POST"))if(o.error)vn({category:"fetch",data:o.fetchData,level:"error",type:"http"},{data:o.error,input:o.args,startTimestamp:a,endTimestamp:s});else{const c=o.response,l={...o.fetchData,status_code:c&&c.status},d={input:o.args,response:c,startTimestamp:a,endTimestamp:s};vn({category:"fetch",data:l,type:"http",level:Zu(l.status_code)},d)}}})(n)),t.history&&od((function(i){return function(o){if(We()!==i)return;let a=o.from,s=o.to;const c=wa(Ve.location.href);let l=a?wa(a):void 0;const d=wa(s);l&&l.path||(l=c),c.protocol===d.protocol&&c.host===d.host&&(s=d.relative),c.protocol===l.protocol&&c.host===l.host&&(a=l.relative),vn({category:"navigation",data:{from:a,to:s}})}})(n)),t.sentry&&n.on("beforeSendEvent",(function(i){return function(o){We()===i&&vn({category:"sentry."+(o.type==="transaction"?"transaction":"event"),event_id:o.event_id,level:o.level,message:qt(o)},{event:o})}})(n))}}},My=["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"],Cy=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&at(Ve,"setTimeout",ld),t.setInterval&&at(Ve,"setInterval",ld),t.requestAnimationFrame&&at(Ve,"requestAnimationFrame",Py),t.XMLHttpRequest&&"XMLHttpRequest"in Ve&&at(XMLHttpRequest.prototype,"send",Ey);const n=t.eventTarget;n&&(Array.isArray(n)?n:My).forEach(Ay)}}};function ld(e){return function(...t){const n=t[0];return t[0]=Hn(n,{mechanism:{data:{function:Jt(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Py(e){return function(t){return e.apply(this,[Hn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Jt(e)},handled:!1,type:"instrument"}})])}}function Ey(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((r=>{r in n&&typeof n[r]=="function"&&at(n,r,(function(i){const o={mechanism:{data:{function:r,handler:Jt(i)},handled:!1,type:"instrument"}},a=sa(i);return a&&(o.mechanism.data.handler=Jt(a)),Hn(i,o)}))})),e.apply(this,t)}}function Ay(e){const t=Ve[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(at(n,"addEventListener",(function(r){return function(i,o,a){try{typeof o.handleEvent=="function"&&(o.handleEvent=Hn(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Jt(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,Hn(o,{mechanism:{data:{function:"addEventListener",handler:Jt(o),target:e},handled:!1,type:"instrument"}}),a])}})),at(n,"removeEventListener",(function(r){return function(i,o,a){try{const s=o.__sentry_wrapped__;s&&r.call(this,i,s,a)}catch{}return r.call(this,i,o,a)}})))}const Oy=()=>({name:"BrowserSession",setupOnce(){Ve.document!==void 0?(ju({ignoreDuration:!0}),Vu(),od((({from:e,to:t})=>{e!==void 0&&e!==t&&(ju({ignoreDuration:!0}),Vu())}))):Li&&ne.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),Iy=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&((function(r){(function(i){const o="error";dn(o,i),fn(o,kv)})((i=>{const{stackParser:o,attachStacktrace:a}=dd();if(We()!==r||td())return;const{msg:s,url:c,line:l,column:d,error:f}=i,m=(function(g,y,v,b){const _=g.exception=g.exception||{},S=_.values=_.values||[],T=S[0]=S[0]||{},M=T.stacktrace=T.stacktrace||{},x=M.frames=M.frames||[],C=b,E=v,O=jt(y)&&y.length>0?y:(function(){try{return aa.document.location.href}catch{return""}})();return x.length===0&&x.push({colno:C,filename:O,function:un,in_app:!0,lineno:E}),g})(Ea(o,f||s,void 0,a,!1),c,l,d);m.level="error",Lu(m,{originalException:f,mechanism:{handled:!1,type:"onerror"}})}))})(n),ud("onerror")),t.onunhandledrejection&&((function(r){(function(i){const o="unhandledrejection";dn(o,i),fn(o,Sv)})((i=>{const{stackParser:o,attachStacktrace:a}=dd();if(We()!==r||td())return;const s=(function(l){if(oa(l))return l;try{if("reason"in l)return l.reason;if("detail"in l&&"reason"in l.detail)return l.detail.reason}catch{}return l})(i),c=oa(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:Ea(o,s,void 0,a,!0);c.level="error",Lu(c,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))})(n),ud("onunhandledrejection"))}}};function ud(e){Li&&ne.log(`Global Handler attached: ${e}`)}function dd(){const e=We();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Dy=()=>({name:"HttpContext",preprocessEvent(e){if(!Ve.navigator&&!Ve.location&&!Ve.document)return;const t=e.request&&e.request.url||Ve.location&&Ve.location.href,{referrer:n}=Ve.document||{},{userAgent:r}=Ve.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};e.request=o}}),Ly=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(r,i,o){const a=o.getOptions();ny(Ma,a.stackParser,a.maxValueLength,n,t,r,i)}}};var fd="new",hd="loading",pd="loaded",La="joining-meeting",yn="joined-meeting",bn="left-meeting",Kt="error",jy="playable",ja="unknown",Ry="full",Ny="base",md="no-room",Vy="end-of-life",Fy="connection-error",By="iframe-ready-for-launch-config",$y="iframe-launch-config",Uy="theme-updated",zy="loading",Wy="load-attempt-failed",gd="loaded",Hy="started-camera",Jy="camera-error",qy="joining-meeting",Gy="joined-meeting",Ky="left-meeting",Yy="participant-joined",Xy="participant-updated",Qy="participant-left",Zy="participant-counts-updated",eb="access-state-updated",tb="meeting-session-summary-updated",nb="meeting-session-state-updated",rb="waiting-participant-added",ib="waiting-participant-updated",ob="waiting-participant-removed",ab="track-started",sb="track-stopped",cb="transcription-started",lb="transcription-stopped",ub="transcription-error",vd="recording-started",yd="recording-stopped",db="recording-stats",fb="recording-error",hb="recording-upload-completed",pb="recording-data",mb="app-message",gb="transcription-message",vb="remote-media-player-started",yb="remote-media-player-updated",bb="remote-media-player-stopped",_b="local-screen-share-started",wb="local-screen-share-stopped",kb="local-screen-share-canceled",Sb="active-speaker-change",xb="active-speaker-mode-change",Tb="network-quality-change",Mb="network-connection",Cb="cpu-load-change",Pb="face-counts-updated",Ni="fullscreen",Vi="exited-fullscreen",Eb="live-streaming-started",Ab="live-streaming-updated",Ob="live-streaming-stopped",Ib="live-streaming-error",Db="lang-updated",Lb="receive-settings-updated",bd="input-settings-updated",_d="nonfatal-error",wd="error",Ra=4096,kd=102400,Na="iframe-call-message",Sd="local-screen-start",xd="daily-method-update-live-streaming-endpoints",Fi="transmit-log",Ft="daily-custom-track",Bi={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},Td={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},Va={PLAY:"play",PAUSE:"pause"},Fa=["jpg","png","jpeg"],jb="add-endpoints",Rb="remove-endpoints",Md="sip-call-transfer";function ft(){return!fe()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function fe(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function Cd(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Nb(){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})(_n(),$i())||fe())}function Pd(){if(fe()||!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var Ba="none",Vb="software",Fb="hardware",Bb=(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?Vb:Fb:Ba}catch{return Ba}})();function Ed(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!fe()&&Bb!==Ba&&(e?(function(){return Id()?!1:["Chrome","Firefox"].includes(_n())})():(function(){if(Id())return!1;var t=_n();if(t==="Safari"){var n=za();if(n.major<15||n.major===15&&n.minor<4)return!1}return t==="Chrome"?Ua().major>=77:t==="Firefox"?Wa().major>=97:["Chrome","Firefox","Safari"].includes(t)})())}function Ad(){if(fe()||Od()||typeof AudioWorkletNode>"u")return!1;switch(_n()){case"Chrome":case"Firefox":return!0;case"Safari":var e=$i();return e.major>17||e.major===17&&e.minor>=4}return!1}function $a(){return Cd()&&typeof MediaStreamTrack<"u"&&!(function(){var e,t=_n();if(!ft())return!0;switch(t){case"Chrome":return(e=Ua()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Wa()).major<91;case"Safari":return(e=za()).major<13||e.major===13&&e.minor<1;default:return!0}})()}function Od(){return ft().match(/Linux; Android/)}function Id(){var e,t=ft(),n=t.match(/Mac/)&&(!fe()&&typeof window<"u"&&(e=window)!==null&&e!==void 0&&(e=e.navigator)!==null&&e!==void 0&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||!!ft().match(/DailyAnd\//)||void 0}function _n(){if(typeof window<"u"){var e=ft();return Dd()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||Ld()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function $i(){switch(_n()){case"Chrome":return Ua();case"Safari":return za();case"Firefox":return Wa();case"Edge":return(function(){var e=0,t=0;if(typeof window<"u"){var n=ft().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}})()}}function Ua(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<"u"){var o=ft(),a=o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(a)try{e=parseInt(a[1]),t=parseInt(a[2]),n=parseInt(a[3]),r=parseInt(a[4]),i=o.indexOf("OPR/")>-1}catch{}}return{major:e,minor:t,build:n,patch:r,opera:i}}function Dd(){return!!ft().match(/iPad|iPhone|iPod/i)&&Cd()}function Ld(){return ft().indexOf("AppleWebKit/605.1.15")>-1}function za(){var e=0,t=0,n=0;if(typeof window<"u"){var r=ft().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else(Dd()||Ld())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Wa(){var e=0,t=0;if(typeof window<"u"){var n=ft().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var jd=(function(){return ot((function e(){it(this,e)}),[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){kr()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){kr()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){kr()}},{key:"sendMessageToDailyJs",value:function(e,t){kr()}},{key:"removeListener",value:function(e){kr()}}])})();function Rd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rd(Object(n),!0).forEach((function(r){Mt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rd(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Nd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Nd=function(){return!!e})()}var $b=(function(){function e(){var t,n,r,i;return it(this,e),n=this,r=yt(r=e),(t=fi(n,Nd()?Reflect.construct(r,[],yt(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return hi(e,jd),ot(e,[{key:"addListenerForMessagesFromCallMachine",value:function(t,n,r){var i=this,o=function(a){if(a.data&&a.data.what==="iframe-call-message"&&(!a.data.callClientId||a.data.callClientId===n)&&(!a.data.from||a.data.from!=="module")){var s=Ha({},a.data);if(delete s.from,s.callbackStamp&&i._messageCallbacks[s.callbackStamp]){var c=s.callbackStamp;i._messageCallbacks[c].call(r,s),delete i._messageCallbacks[c]}delete s.what,delete s.callbackStamp,t.call(r,s)}};this._wrappedListeners[t]=o,window.addEventListener("message",o)}},{key:"addListenerForMessagesFromDailyJs",value:function(t,n,r){var i=function(o){var a;if(!(!o.data||o.data.what!==Na||!o.data.action||o.data.from&&o.data.from!=="module"||o.data.callClientId&&n&&o.data.callClientId!==n||o!=null&&(a=o.data)!==null&&a!==void 0&&a.callFrameId)){var s=o.data;t.call(r,s)}};this._wrappedListeners[t]=i,window.addEventListener("message",i)}},{key:"sendMessageToCallMachine",value:function(t,n,r,i){if(!r)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var o=Ha({},t);if(o.what=Na,o.from="module",o.callClientId=r,n){var a=gi();this._messageCallbacks[a]=n,o.callbackStamp=a}var s=i?i.contentWindow:window,c=this._callMachineTargetOrigin(i);c&&s.postMessage(o,c)}},{key:"sendMessageToDailyJs",value:function(t,n){t.what=Na,t.callClientId=n,t.from="embedded",window.postMessage(t,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(t){var n=this._wrappedListeners[t];n&&(window.removeEventListener("message",n),delete this._wrappedListeners[t])}},{key:"forwardPackagedMessageToCallMachine",value:function(t,n,r){var i=Ha({},t);i.callClientId=r;var o=n?n.contentWindow:window,a=this._callMachineTargetOrigin(n);a&&o.postMessage(i,a)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(t,n){var r=function(i){if(i.data&&i.data.what==="iframe-call-message"&&(!i.data.callClientId||i.data.callClientId===n)&&(!i.data.from||i.data.from!=="module")){var o=i.data;t(o)}};return this._wrappedListeners[t]=r,window.addEventListener("message",r),t}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(t){var n=this._wrappedListeners[t];n&&(window.removeEventListener("message",n),delete this._wrappedListeners[t])}},{key:"_callMachineTargetOrigin",value:function(t){return t?t.src?new URL(t.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}])})();function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Fd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Fd=function(){return!!e})()}var Ub=(function(){function e(){var t,n,r,i;return it(this,e),n=this,r=yt(r=e),t=fi(n,Fd()?Reflect.construct(r,[],yt(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new Qo.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new Qo.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return hi(e,jd),ot(e,[{key:"addListenerForMessagesFromCallMachine",value:function(t,n,r){this._addListener(t,global.callMachineToDailyJsEmitter,n,r,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(t,n,r){this._addListener(t,global.dailyJsToCallMachineEmitter,n,r,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(t,n,r){this._sendMessage(t,global.dailyJsToCallMachineEmitter,r,n,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(t,n){this._sendMessage(t,global.callMachineToDailyJsEmitter,n,null,"sending message to daily-js")}},{key:"removeListener",value:function(t){var n=this._wrappedListeners[t];n&&(global.callMachineToDailyJsEmitter.removeListener("message",n),global.dailyJsToCallMachineEmitter.removeListener("message",n),delete this._wrappedListeners[t])}},{key:"_addListener",value:function(t,n,r,i,o){var a=this,s=function(c){if(c.callClientId===r){if(c.callbackStamp&&a._messageCallbacks[c.callbackStamp]){var l=c.callbackStamp;a._messageCallbacks[l].call(i,c),delete a._messageCallbacks[l]}t.call(i,c)}};this._wrappedListeners[t]=s,n.addListener("message",s)}},{key:"_sendMessage",value:function(t,n,r,i,o){var a=(function(c){for(var l=1;l<arguments.length;l++){var d=arguments[l]!=null?arguments[l]:{};l%2?Vd(Object(d),!0).forEach((function(f){Mt(c,f,d[f])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):Vd(Object(d)).forEach((function(f){Object.defineProperty(c,f,Object.getOwnPropertyDescriptor(d,f))}))}return c})({},t);if(a.callClientId=r,i){var s=gi();this._messageCallbacks[s]=i,a.callbackStamp=s}n.emit("message",a)}}])})(),Ja="replace",qa="shallow-merge",Bd=[Ja,qa],zb=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?Ja:r;it(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return ot(e,[{key:"isNoOp",value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(t,n){return Object.keys(t).length===0&&n===qa}},{key:"_validateMergeStrategy",value:function(t){if(!Bd.includes(t))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(Bd,"]"))}},{key:"_validateData",value:function(t,n){if(!(function(s){if(s==null||me(s)!=="object")return!1;var c=Object.getPrototypeOf(s);return c==null||c===Object.prototype})(t))throw Error("Meeting session data must be a plain (map-like) object");var r;try{if(r=JSON.stringify(t),n===Ja){var i=JSON.parse(r);Ke(i,t)||console.warn("The meeting session data provided will be modified when serialized.",i,t)}else if(n===qa){for(var o in t)if(Object.hasOwnProperty.call(t,o)&&t[o]!==void 0){var a=JSON.parse(JSON.stringify(t[o]));Ke(t[o],a)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",a,t[o])}}}catch(s){throw Error("Meeting session data must be serializable to JSON: ".concat(s))}if(r.length>kd)throw Error("Meeting session data is too large (".concat(r.length," characters). Maximum size suppported is ").concat(kd,"."))}}])})();function $d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return($d=function(){return!!e})()}function Ga(e){var t=typeof Map=="function"?new Map:void 0;return Ga=function(n){if(n===null||!(function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}})(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return(function(i,o,a){if($d())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,o);var c=new(i.bind.apply(i,s));return a&&wr(c,a.prototype),c})(n,arguments,yt(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),wr(r,n)},Ga(e)}function Ud(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ud=function(){return!!e})()}function zd(e){var t,n=(t=window._daily)===null||t===void 0?void 0:t.pendings;if(n){var r=n.indexOf(e);r!==-1&&n.splice(r,1)}}var Wb=(function(){return ot((function e(t){it(this,e),this._currentLoad=null,this._callClientId=t}),[{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(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Hb(n,(function(){r(!1)}),(function(o,a){a||zd(t._callClientId),i(o,a)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),zd(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])})(),Hb=(function(){return ot((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;it(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}),[{key:"start",value:function(){var e=this;if(!this._currentAttempt){var t=function(n){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(n,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout((function(){e._currentAttempt.cancelled||(e._currentAttempt=new Wd(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())}),3e3))};this._currentAttempt=new Wd(this._dailyConfig,this._successCallback,t),this._currentAttempt.start()}}},{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}}])})(),Ka=(function(){function e(){return it(this,e),t=this,r=arguments,n=yt(n=e),fi(t,Ud()?Reflect.construct(n,r||[],yt(t).constructor):n.apply(t,r));var t,n,r}return hi(e,Ga(Error)),ot(e)})(),Ui=2e4,Wd=(function(){return ot((function t(n,r,i){it(this,t),this._loadAttemptImpl=fe()||!n.avoidEval?new Jb(n,r,i):new qb(n,r,i)}),[{key:"start",value:(e=Q((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})(),Jb=(function(){return ot((function i(o,a,s){it(this,i),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<"u"&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=o,this._successCallback=a,this._failureCallback=s}),[{key:"start",value:(r=Q((function*(){var i=vi(this._dailyConfig);!(yield this._tryLoadFromIOSCache(i))&&this._loadFromNetwork(i)})),function(){return r.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(n=Q((function*(i){if(!this._iosCache)return!1;try{var o=yield this._iosCache.get(i);return!!this.cancelled||!!o&&(o.code?(Function('"use strict";'+o.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=o.refetchHeaders,!1))}catch{return!1}})),function(i){return n.apply(this,arguments)})},{key:"_loadFromNetwork",value:(t=Q((function*(i){var o=this;this._networkTimeout=setTimeout((function(){o._networkTimedOut=!0,o._failureCallback({msg:"Timed out (>".concat(Ui," ms) when loading call object bundle ").concat(i),type:"timeout"})}),Ui);try{var a=this._refetchHeaders?{headers:this._refetchHeaders}:{},s=yield fetch(i,a);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Ka;var c=yield this._getBundleCodeFromResponse(i,s);if(this.cancelled)throw new Ka;Function('"use strict";'+c)(),this._iosCache&&this._iosCache.set(i,c,s.headers),this.succeeded=!0,this._successCallback()}catch(l){if(clearTimeout(this._networkTimeout),l instanceof Ka||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(i,": ").concat(l),type:l.message})}})),function(i){return t.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=Q((function*(i,o){if(o.ok)return yield o.text();if(this._iosCache&&o.status===304)return(yield this._iosCache.renew(i,o.headers)).code;throw new Error("Received ".concat(o.status," response"))})),function(i,o){return e.apply(this,arguments)})}]);var e,t,n,r})(),qb=(function(){return ot((function e(t,n,r){it(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=gi(),this._networkTimeout=null,this._scriptElement=null}),[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=vi(this._dailyConfig);(typeof document>"u"?"undefined":me(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 (>".concat(Ui," ms) when loading call object bundle ").concat(e),type:"timeout"})}),Ui);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(i){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(i.target.src),type:i.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)}}])})(),zi=function(e,t,n){return Kb(e.local,t,n)===!0},Gb=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream["get".concat(n==="video"?"Video":"Audio","Tracks")]()[0]},Jn=function(e,t,n,r){var i=Yb(e,t,n,r);return i&&i.pendingTrack},Kb=function(e,t,n){if(!e)return!1;var r=function(o){switch(o){case"avatar":return!0;case"staged":return o;default:return!!o}},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)},Yb=function(e,t,n,r){var i=Object.values(e.streams||{}).filter((function(o){return o.participantId===t&&o.type===n&&o.pendingTrack&&o.pendingTrack.kind===r})).sort((function(o,a){return new Date(a.starttime)-new Date(o.starttime)}));return i&&i[0]},Xb=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function Hd(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];r<i.length;r++)for(var o=i[r],a=0,s=["video","audio"];a<s.length;a++){var c=s[a],l=o==="cam"?c:"screen".concat(c.charAt(0).toUpperCase()+c.slice(1)),d=e.tracks[l];if(d){var f=e.local?Gb(n,o,c):Jn(n,e.session_id,o,c);d.state==="playable"&&(d.track=f),d.persistentTrack=f}}}function Jd(e,t){try{var n=t.getState();for(var r in e.tracks)if(!Qb(r)){var i=e.tracks[r].kind;if(i){var o=e.tracks[r];if(o){var a=e.local?Xb(n,r):Jn(n,e.session_id,r,i);o.state==="playable"&&(e.tracks[r].track=a),o.persistentTrack=a}}else console.error("unknown type for custom track")}}catch(s){console.error(s)}}function Qb(e){return["video","audio","screenVideo","screenAudio"].includes(e)}function qd(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 o=r.participants[e.session_id];o&&o.public&&o.public.rtcType&&o.public.rtcType.impl==="peer-to-peer"&&o.private&&!["connected","completed"].includes(o.private.peeringState)&&(i=!1)}catch(d){console.error(d)}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&&zi(r,e.session_id,"cam-audio")){var a=Jn(r,e.session_id,"cam","audio");a&&(t&&t.audioTrack&&t.audioTrack.id===a.id?e.audioTrack=a:a.muted||(e.audioTrack=a)),e.audioTrack||(e.audio=!1)}if(e.video&&zi(r,e.session_id,"cam-video")){var s=Jn(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&&zi(r,e.session_id,"screen-audio")){var c=Jn(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&&zi(r,e.session_id,"screen-video")){var l=Jn(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(d){console.error("unexpected error matching up tracks",d)}}}function Zb(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return Gd(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Gd(c,l):void 0}})(e))||t){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(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Gd(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 Ct=new Map,qn=null;function e0(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return Kd(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Kd(c,l):void 0}})(e))||t){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(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Kd(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 Pt=new Map,Pr=null;function t0(e){Yd()?(function(t){Ct.has(t)||(Ct.set(t,{}),navigator.mediaDevices.enumerateDevices().then((function(n){Ct.has(t)&&(Ct.get(t).lastDevicesString=JSON.stringify(n),qn||(qn=(function(){var r=Q((function*(){var i,o=yield navigator.mediaDevices.enumerateDevices(),a=Zb(Ct.keys());try{for(a.s();!(i=a.n()).done;){var s=i.value,c=JSON.stringify(o);c!==Ct.get(s).lastDevicesString&&(Ct.get(s).lastDevicesString=c,s(o))}}catch(l){a.e(l)}finally{a.f()}}));return function(){return r.apply(this,arguments)}})(),navigator.mediaDevices.addEventListener("devicechange",qn)))})).catch((function(){})))})(e):(function(t){Pt.has(t)||(Pt.set(t,{}),navigator.mediaDevices.enumerateDevices().then((function(n){Pt.has(t)&&(Pt.get(t).lastDevicesString=JSON.stringify(n),Pr||(Pr=setInterval(Q((function*(){var r,i=yield navigator.mediaDevices.enumerateDevices(),o=e0(Pt.keys());try{for(o.s();!(r=o.n()).done;){var a=r.value,s=JSON.stringify(i);s!==Pt.get(a).lastDevicesString&&(Pt.get(a).lastDevicesString=s,a(i))}}catch(c){o.e(c)}finally{o.f()}})),3e3)))})))})(e)}function n0(e){Yd()?(function(t){Ct.has(t)&&(Ct.delete(t),Ct.size===0&&qn&&(navigator.mediaDevices.removeEventListener("devicechange",qn),qn=null))})(e):(function(t){Pt.has(t)&&(Pt.delete(t),Pt.size===0&&Pr&&(clearInterval(Pr),Pr=null))})(e)}function Yd(){var e;return fe()||((e=navigator.mediaDevices)===null||e===void 0?void 0:e.ondevicechange)!==void 0}var r0=new Set;function i0(e,t){return e&&e.readyState==="live"&&!(function(n,r){return n.muted&&!r0.has(n.id)})(e)}function Xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xd(Object(n),!0).forEach((function(r){Mt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var Er=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),o0=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),Ar=Object.values(Er),Qd=["v","a","sv","sa","cv","ca"];Object.freeze(Ar.reduce((function(e,t,n){return e[t]=Qd[n],e}),{})),Object.freeze(Qd.reduce((function(e,t,n){return e[t]=Ar[n],e}),{}));var a0=[Er.VIDEO,Er.AUDIO,Er.SCREEN_VIDEO,Er.SCREEN_AUDIO],Zd=Object.values(o0),ef=["p","s","t"];Object.freeze(Zd.reduce((function(e,t,n){return e[t]=ef[n],e}),{})),Object.freeze(ef.reduce((function(e,t,n){return e[t]=Zd[n],e}),{}));var tf=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;it(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return ot(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof Be?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 Be?r.clone():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var o=this.byParticipantId[i];t.byParticipantId[i]=o instanceof Be?o.clone():o}return t}},{key:"toJSONObject",value:function(){var t={};if(typeof this.base=="boolean"?t.base=this.base:this.base instanceof Be&&(t.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof Be?r.toJSONObject():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var o=this.byParticipantId[i];t.byParticipantId[i]=o instanceof Be?o.toJSONObject():o}return t}},{key:"toMinifiedJSONObject",value:function(){var t={};if(this.base!==void 0&&(typeof this.base=="boolean"?t.b=this.base:t.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var n in t.u={},this.byUserId){var r=this.byUserId[n];t.u[n]=typeof r=="boolean"?r:r.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var i in t.p={},this.byParticipantId){var o=this.byParticipantId[i];t.p[i]=typeof o=="boolean"?o:o.toMinifiedJSONObject()}return t}},{key:"normalize",value:function(){return this.base instanceof Be&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map((function(t){var n=ze(t,2),r=n[0],i=n[1];return[r,i instanceof Be?i.normalize():i]})))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map((function(t){var n=ze(t,2),r=n[0],i=n[1];return[r,i instanceof Be?i.normalize():i]})))),this}}],[{key:"fromJSONObject",value:function(t){var n,r,i;if(t.base!==void 0&&(n=typeof t.base=="boolean"?t.base:Be.fromJSONObject(t.base)),t.byUserId!==void 0)for(var o in r={},t.byUserId){var a=t.byUserId[o];r[o]=typeof a=="boolean"?a:Be.fromJSONObject(a)}if(t.byParticipantId!==void 0)for(var s in i={},t.byParticipantId){var c=t.byParticipantId[s];i[s]=typeof c=="boolean"?c:Be.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:Be.fromMinifiedJSONObject(t.b)),t.u!==void 0)for(var o in r={},t.u){var a=t.u[o];r[o]=typeof a=="boolean"?a:Be.fromMinifiedJSONObject(a)}if(t.p!==void 0)for(var s in i={},t.p){var c=t.p[s];i[s]=typeof c=="boolean"?c:Be.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"validateJSONObject",value:function(t){if(me(t)!=="object")return[!1,"canReceive must be an object"];for(var n=["base","byUserId","byParticipantId"],r=0,i=Object.keys(t);r<i.length;r++){var o=i[r];if(!n.includes(o))return[!1,"canReceive can only contain keys (".concat(n.join(", "),")")];if(o==="base"){var a=ze(Be.validateJSONObject(t.base,!0),2),s=a[0],c=a[1];if(!s)return[!1,c]}else{if(me(t[o])!=="object")return[!1,"invalid (non-object) value for field '".concat(o,"' in canReceive")];for(var l=0,d=Object.values(t[o]);l<d.length;l++){var f=d[l],m=ze(Be.validateJSONObject(f),2),g=m[0],y=m[1];if(!g)return[!1,y]}}}return[!0]}}])})(),Be=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.video,r=t.audio,i=t.screenVideo,o=t.screenAudio,a=t.customVideo,s=t.customAudio;it(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=o,this.customVideo=a,this.customAudio=s}return ot(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=Yt({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=Yt({},this.customAudio)),t}},{key:"toJSONObject",value:function(){var t={};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=Yt({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=Yt({},this.customAudio)),t}},{key:"toMinifiedJSONObject",value:function(){var t={};return this.video!==void 0&&(t.v=this.video),this.audio!==void 0&&(t.a=this.audio),this.screenVideo!==void 0&&(t.sv=this.screenVideo),this.screenAudio!==void 0&&(t.sa=this.screenAudio),this.customVideo!==void 0&&(t.cv=Yt({},this.customVideo)),this.customAudio!==void 0&&(t.ca=Yt({},this.customAudio)),t}},{key:"normalize",value:function(){function t(n,r){return n&&Object.keys(n).length===1&&n["*"]===r}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!t(this.customVideo,!0)||!t(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!t(this.customVideo,!1)||!t(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?Yt({},t.customVideo):void 0,customAudio:t.customAudio!==void 0?Yt({},t.customAudio):void 0})}},{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(t,n){if(typeof t=="boolean")return[!0];if(me(t)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var r=Object.keys(t),i=0,o=r;i<o.length;i++){var a=o[i];if(!Ar.includes(a))return[!1,"invalid media type '".concat(a,"' in canReceive")];if(a0.includes(a)){if(typeof t[a]!="boolean")return[!1,"invalid (non-boolean) value for media type '".concat(a,"' in canReceive")]}else{if(me(t[a])!=="object")return[!1,"invalid (non-object) value for media type '".concat(a,"' in canReceive")];for(var s=0,c=Object.values(t[a]);s<c.length;s++)if(typeof c[s]!="boolean")return[!1,"invalid (non-boolean) value for entry within '".concat(a,"' in canReceive")];if(n&&t[a]["*"]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '`.concat(a,"'")]}}return n&&r.length!==Ar.length?[!1,'canReceive "base" permission must specify all media types: '.concat(Ar.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])})(),s0=["result"],c0=["preserveIframe"];function nf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nf(Object(n),!0).forEach((function(r){Mt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nf(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function rf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(rf=function(){return!!e})()}function of(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return af(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?af(c,l):void 0}})(e))||t){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(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function af(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 wn={},sf="video",l0="voice",cf=fe()?{data:{}}:{data:{},topology:"none"},lf={present:0,hidden:0},uf={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Ya=Object.keys(uf),df=["state","volume","simulcastEncodings"],ff={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},Wi={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},Xa={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"}},kn={customIntegrations:{validate:kf,help:_f()},customTrayButtons:{validate:wf,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(Wi))},url:{validate:function(e){return typeof e=="string"},help:"url should be a string"},baseUrl:{validate:function(e){return 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(n){console.error("Failed to validate dailyConfig",n)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(e){return Sf(e,ff)},help:"reactNativeConfig should look like ".concat(JSON.stringify(ff),", all fields optional")},lang:{validate:function(e){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(e)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(e){try{return pf(e),!0}catch(t){return console.error(t),!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:Ft};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:Ft};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(r){for(var i=0,o=Object.keys(r);i<o.length;i++){var a=o[i];if(!t.includes(a))return console.error('unsupported color "'.concat(a,'". Valid colors: ').concat(t.join(", "))),!1;if(!r[a].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(a,' theme color should be provided in valid hex color format. Received: "').concat(r[a],'"')),!1}return!0};return me(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 ".concat(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 ".concat(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 mf(e,{allowAllParticipantsKey:!1})},help:bf({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!(function(n,r){try{return r.validateUpdateSendSettings(n),!0}catch(i){return console.error("Failed to validate send settings",i),!1}})(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var n;return!!gf(e)&&(t._inputSettings||(t._inputSettings={}),vf(e,(n=t.properties)===null||n===void 0?void 0:n.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:es()},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"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},Hi={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)||!fe()&&e==="avatar")return!0;var r=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(o){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var s in o)if(s==="custom"){if(!n.includes(o[s])&&!i(o[s],!0))return!1}else{var c=!a&&!r.includes(s),l=!n.includes(o[s]);if(c||l)return!1}return!0};return i(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(fe()?"":" | '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 e===!1},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=ze(n[t],2),i=r[0],o=r[1];switch(i){case"hasPresence":if(typeof o!="boolean")return!1;break;case"canSend":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var a,s=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],c=of(o);try{for(c.s();!(a=c.n()).done;){var l=a.value;if(!s.includes(l))return!1}}catch(_){c.e(_)}finally{c.f()}}else if(typeof o!="boolean")return!1;(o instanceof Array||Array.isArray(o))&&(e.canSend=new Set(o));break;case"canReceive":var d=ze(tf.validateJSONObject(o),2),f=d[0],m=d[1];if(!f)return console.error(m),!1;break;case"canAdmin":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var g,y=["participants","streaming","transcription"],v=of(o);try{for(v.s();!(g=v.n()).done;){var b=g.value;if(!y.includes(b))return!1}}catch(_){v.e(_)}finally{v.f()}}else if(typeof o!="boolean")return!1;(o instanceof Array||Array.isArray(o))&&(e.canAdmin=new Set(o));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=Q((function*(t){return new Promise((function(n,r){var i=[];t.forEach((function(o){return Promise.resolve(o).then((function(a){n(a)})).catch((function(a){i.push(a),i.length===t.length&&r(i)}))}))}))}));return function(t){return e.apply(this,arguments)}})());var Or=(function(){function e(u){var p,h,w,k,P,D,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(it(this,e),w=this,k=yt(k=e),Mt(h=fi(w,rf()?Reflect.construct(k,[],yt(w).constructor):k.apply(w,P)),"startListeningForDeviceChanges",(function(){t0(h.handleDeviceChange)})),Mt(h,"stopListeningForDeviceChanges",(function(){n0(h.handleDeviceChange)})),Mt(h,"handleDeviceChange",(function(G){G=G.map((function(ue){return JSON.parse(JSON.stringify(ue))})),h.emitDailyJSEvent({action:"available-devices-updated",availableDevices:G})})),Mt(h,"handleNativeAppStateChange",(function(){var G=Q((function*(ue){if(ue==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield h.destroy());var nt=ue==="active";h.disableReactNativeAutoDeviceManagement("video")||(nt?h.camUnmutedBeforeLosingNativeActiveState&&h.setLocalVideo(!0):(h.camUnmutedBeforeLosingNativeActiveState=h.localVideo(),h.camUnmutedBeforeLosingNativeActiveState&&h.setLocalVideo(!1)))}));return function(ue){return G.apply(this,arguments)}})()),Mt(h,"handleNativeAudioFocusChange",(function(G){h.disableReactNativeAutoDeviceManagement("audio")||(h._hasNativeAudioFocus=G,h.toggleParticipantAudioBasedOnNativeAudioFocus(),h._hasNativeAudioFocus?h.micUnmutedBeforeLosingNativeAudioFocus&&h.setLocalAudio(!0):(h.micUnmutedBeforeLosingNativeAudioFocus=h.localAudio(),h.setLocalAudio(!1)))})),Mt(h,"handleNativeSystemScreenCaptureStop",(function(){h.stopScreenShare()})),!$a()&&!fe())throw new Error("WebRTC not supported or suppressed");if(h.strictMode=I.strictMode===void 0||I.strictMode,h.allowMultipleCallInstances=(p=I.allowMultipleCallInstances)!==null&&p!==void 0&&p,Object.keys(wn).length&&(h._logDuplicateInstanceAttempt(),!h.allowMultipleCallInstances)){if(h.strictMode)throw new 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:{}}),h.callClientId=gi(),wn[(D=h).callClientId]=D,window._daily.instances[h.callClientId]={},h._sharedTracks={},window._daily.instances[h.callClientId].tracks=h._sharedTracks,I.dailyJsVersion=e.version(),h._iframe=u,h._callObjectMode=I.layout==="none"&&!h._iframe,h._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},I.showLocalVideo!==void 0?h._callObjectMode?console.error("showLocalVideo is not available in call object mode"):h._showLocalVideo=!!I.showLocalVideo:h._showLocalVideo=!0,I.showParticipantsBar!==void 0?h._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):h._showParticipantsBar=!!I.showParticipantsBar:h._showParticipantsBar=!0,I.customIntegrations!==void 0?h._callObjectMode?console.error("customIntegrations is not available in call object mode"):h._customIntegrations=I.customIntegrations:h._customIntegrations={},I.customTrayButtons!==void 0?h._callObjectMode?console.error("customTrayButtons is not available in call object mode"):h._customTrayButtons=I.customTrayButtons:h._customTrayButtons={},I.activeSpeakerMode!==void 0?h._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):h._activeSpeakerMode=!!I.activeSpeakerMode:h._activeSpeakerMode=!1,I.receiveSettings?h._callObjectMode?h._receiveSettings=I.receiveSettings:console.error("receiveSettings is only available in call object mode"):h._receiveSettings={},h.validateProperties(I),h.properties=H({},I),h._inputSettings||(h._inputSettings={}),h._callObjectLoader=h._callObjectMode?new Wb(h.callClientId):null,h._callState=fd,h._isPreparingToJoin=!1,h._accessState={access:ja},h._meetingSessionSummary={},h._finalSummaryOfPrevSession={},h._meetingSessionState=ts(cf,h._callObjectMode),h._nativeInCallAudioMode=sf,h._participants={},h._isScreenSharing=!1,h._participantCounts=lf,h._rmpPlayerState={},h._waitingParticipants={},h._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},h._activeSpeaker={},h._localAudioLevel=0,h._isLocalAudioLevelObserverRunning=!1,h._remoteParticipantsAudioLevel={},h._isRemoteParticipantsAudioLevelObserverRunning=!1,h._maxAppMessageSize=Ra,h._messageChannel=fe()?new Ub:new $b,h._iframe&&(h._iframe.requestFullscreen?h._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===h._iframe?(h.emitDailyJSEvent({action:Ni}),h.sendMessageToCallMachine({action:Ni})):(h.emitDailyJSEvent({action:Vi}),h.sendMessageToCallMachine({action:Vi}))})):h._iframe.webkitRequestFullscreen&&h._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===h._iframe?(h.emitDailyJSEvent({action:Ni}),h.sendMessageToCallMachine({action:Ni})):(h.emitDailyJSEvent({action:Vi}),h.sendMessageToCallMachine({action:Vi}))}))),fe()){var F=h.nativeUtils();F.addAudioFocusChangeListener&&F.removeAudioFocusChangeListener&&F.addAppStateChangeListener&&F.removeAppStateChangeListener&&F.addSystemScreenCaptureStopListener&&F.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),h._hasNativeAudioFocus=!0,F.addAudioFocusChangeListener(h.handleNativeAudioFocusChange),F.addAppStateChangeListener(h.handleNativeAppStateChange),F.addSystemScreenCaptureStopListener(h.handleNativeSystemScreenCaptureStop)}return h._callObjectMode&&h.startListeningForDeviceChanges(),h._messageChannel.addListenerForMessagesFromCallMachine(h.handleMessageFromCallMachine,h.callClientId,h),h}return hi(e,mi),ot(e,[{key:"destroy",value:(le=Q((function*(){var u;try{yield this.leave()}catch{}var p=this._iframe;if(p){var h=p.parentElement;h&&h.removeChild(p)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),fe()){var w=this.nativeUtils();w.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),w.removeAppStateChangeListener(this.handleNativeAppStateChange),w.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete wn[this.callClientId],!((u=window)===null||u===void 0||(u=u._daily)===null||u===void 0)&&u.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return le.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(u){var p=u.bodyClass,h=u.cssFile,w=u.cssText;return he(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(h),bodyClass:p,cssText:w}),this}},{key:"iframe",value:function(){return he(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return wt(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return wt(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(u,p){for(var h in p){if(!Hi[h])throw new Error("unrecognized updateParticipant property ".concat(h));if(Hi[h].validate&&!Hi[h].validate(p[h],this,this._participants[u]))throw new Error(Hi[h].help)}}},{key:"updateParticipant",value:function(u,p){return this._participants.local&&this._participants.local.session_id===u&&(u="local"),u&&p&&(this.validateParticipantProperties(u,p),this.sendMessageToCallMachine({action:"update-participant",id:u,properties:p})),this}},{key:"updateParticipants",value:function(u){var p=this._participants.local&&this._participants.local.session_id;for(var h in u)h===p&&(h="local"),h&&u[h]&&this.validateParticipantProperties(h,u[h]);return this.sendMessageToCallMachine({action:"update-participants",participants:u}),this}},{key:"updateWaitingParticipant",value:(ie=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(wt(this._callObjectMode,"updateWaitingParticipant()"),_e(this._callState,"updateWaitingParticipant()"),typeof p!="string"||me(h)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise((function(w,k){u.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:p,updates:h},(function(P){P.error&&k(P.error),P.id||k(new Error("unknown error in updateWaitingParticipant()")),w({id:P.id})}))}))})),function(){return ie.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(U=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wt(this._callObjectMode,"updateWaitingParticipants()"),_e(this._callState,"updateWaitingParticipants()"),me(p)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise((function(h,w){u.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:p},(function(k){k.error&&w(k.error),k.ids||w(new Error("unknown error in updateWaitingParticipants()")),h({ids:k.ids})}))}))})),function(){return U.apply(this,arguments)})},{key:"requestAccess",value:($=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=p.access,w=h===void 0?{level:Ry}:h,k=p.name,P=k===void 0?"":k;return wt(this._callObjectMode,"requestAccess()"),_e(this._callState,"requestAccess()"),new Promise((function(D,I){u.sendMessageToCallMachine({action:"daily-method-request-access",access:w,name:P},(function(F){F.error&&I(F.error),F.access||I(new Error("unknown error in requestAccess()")),D({access:F.access,granted:F.granted})}))}))})),function(){return $.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(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in p&&(fe()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),p={}):u&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),p={})),this.sendMessageToCallMachine({action:"local-audio",state:u,options:p}),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(u){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:u}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(u){return this.sendMessageToCallMachine({action:"local-video",state:u}),this}},{key:"_setAllowLocalAudio",value:function(u){if(this._preloadCache.allowLocalAudio=u,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:u}),this}},{key:"_setAllowLocalVideo",value:function(u){if(this._preloadCache.allowLocalVideo=u,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:u}),this}},{key:"getReceiveSettings",value:(K=Q((function*(u){var p=this,h=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,w=h!==void 0&&h;if(wt(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(me(u)){case"string":return new Promise((function(k){p.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:u,showInheritedValues:w},(function(P){k(P.receiveSettings)}))}));case"undefined":return this._receiveSettings;default:throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}})),function(u){return K.apply(this,arguments)})},{key:"updateReceiveSettings",value:(W=Q((function*(u){var p=this;if(wt(this._callObjectMode,"updateReceiveSettings()"),!mf(u,{allowAllParticipantsKey:!0}))throw new Error(bf({allowAllParticipantsKey:!0}));return _e(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise((function(h){p.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:u},(function(w){h({receiveSettings:w.receiveSettings})}))}))})),function(u){return W.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(u,p){if(u){var h={};if(u.audio){var w,k,P;u.audio.settings&&(!Object.keys(u.audio.settings).length&&p||(h.audio={settings:H({},u.audio.settings)})),p&&(w=h.audio)!==null&&w!==void 0&&(w=w.settings)!==null&&w!==void 0&&w.customTrack&&(h.audio.settings={customTrack:this._sharedTracks.audioTrack});var D=((k=u.audio.processor)===null||k===void 0?void 0:k.type)==="none"&&((P=u.audio.processor)===null||P===void 0?void 0:P._isDefaultWhenNone);if(u.audio.processor&&!D){var I=H({},u.audio.processor);delete I._isDefaultWhenNone,h.audio=H(H({},h.audio),{},{processor:I})}}if(u.video){var F,G,ue;u.video.settings&&(!Object.keys(u.video.settings).length&&p||(h.video={settings:H({},u.video.settings)})),p&&(F=h.video)!==null&&F!==void 0&&(F=F.settings)!==null&&F!==void 0&&F.customTrack&&(h.video.settings={customTrack:this._sharedTracks.videoTrack});var nt=((G=u.video.processor)===null||G===void 0?void 0:G.type)==="none"&&((ue=u.video.processor)===null||ue===void 0?void 0:ue._isDefaultWhenNone);if(u.video.processor&&!nt){var Dt=H({},u.video.processor);delete Dt._isDefaultWhenNone,h.video=H(H({},h.video),{},{processor:Dt})}}return h}}},{key:"getInputSettings",value:function(){var u=this;return he(),new Promise((function(p){p(u._getInputSettings())}))}},{key:"_getInputSettings",value:function(){var u,p,h,w,k,P,D={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(u=((h=this._inputSettings)===null||h===void 0?void 0:h.video)||D,p=((w=this._inputSettings)===null||w===void 0?void 0:w.audio)||D):(u=((k=this._preloadCache)===null||k===void 0||(k=k.inputSettings)===null||k===void 0?void 0:k.video)||D,p=((P=this._preloadCache)===null||P===void 0||(P=P.inputSettings)===null||P===void 0?void 0:P.audio)||D);var I={audio:p,video:u};return this._prepInputSettingsForSharing(I,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(u,p){var h=this._inputSettings||{},w={};if(u.video){var k,P,D;w.video={},u.video.settings?(w.video.settings={},p||u.video.settings.customTrack||(D=h.video)===null||D===void 0||!D.settings?w.video.settings=u.video.settings:w.video.settings=H(H({},h.video.settings),u.video.settings),Object.keys(w.video.settings).length||delete w.video.settings):(k=h.video)!==null&&k!==void 0&&k.settings&&(w.video.settings=h.video.settings),u.video.processor?w.video.processor=u.video.processor:(P=h.video)!==null&&P!==void 0&&P.processor&&(w.video.processor=h.video.processor)}else h.video&&(w.video=h.video);if(u.audio){var I,F,G;w.audio={},u.audio.settings?(w.audio.settings={},p||u.audio.settings.customTrack||(G=h.audio)===null||G===void 0||!G.settings?w.audio.settings=u.audio.settings:w.audio.settings=H(H({},h.audio.settings),u.audio.settings),Object.keys(w.audio.settings).length||delete w.audio.settings):(I=h.audio)!==null&&I!==void 0&&I.settings&&(w.audio.settings=h.audio.settings),u.audio.processor?w.audio.processor=u.audio.processor:(F=h.audio)!==null&&F!==void 0&&F.processor&&(w.audio.processor=h.audio.processor)}else h.audio&&(w.audio=h.audio);this._maybeUpdateInputSettings(w)}},{key:"_devicesFromInputSettings",value:function(u){var p,h,w=(u==null||(p=u.video)===null||p===void 0||(p=p.settings)===null||p===void 0?void 0:p.deviceId)||null,k=(u==null||(h=u.audio)===null||h===void 0||(h=h.settings)===null||h===void 0?void 0:h.deviceId)||null,P=this._preloadCache.outputDeviceId||null;return{camera:w?{deviceId:w}:{},mic:k?{deviceId:k}:{},speaker:P?{deviceId:P}:{}}}},{key:"updateInputSettings",value:(Z=Q((function*(u){var p=this;return he(),gf(u)?u.video||u.audio?(vf(u,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(u,!0),this._getInputSettings()):new Promise((function(h,w){p.sendMessageToCallMachine({action:"update-input-settings",inputSettings:u},(function(k){if(k.error)w(k.error);else{if(k.returnPreloadCache)return p._updatePreloadCacheInputSettings(u,!0),void h(p._getInputSettings());p._maybeUpdateInputSettings(k.inputSettings),h(p._prepInputSettingsForSharing(k.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(es()),Promise.reject(es()))})),function(u){return Z.apply(this,arguments)})},{key:"setBandwidth",value:function(u){var p=u.kbs,h=u.trackConstraints;if(he(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:p,trackConstraints:h}),this}},{key:"getDailyLang",value:function(){var u=this;if(he(),this._callMachineInitialized)return new Promise((function(p){u.sendMessageToCallMachine({action:"get-daily-lang"},(function(h){delete h.action,delete h.callbackStamp,p(h)}))}))}},{key:"setDailyLang",value:function(u){return he(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:u}),this}},{key:"setProxyUrl",value:function(u){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:u}),this}},{key:"setIceConfig",value:function(u){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:u}),this}},{key:"meetingSessionSummary",value:function(){return[bn,Kt].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(X=Q((function*(){var u=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),_e(this._callState,"getMeetingSession()"),new Promise((function(p){u.sendMessageToCallMachine({action:"get-meeting-session"},(function(h){delete h.action,delete h.callbackStamp,p(h)}))}))})),function(){return X.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return _e(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";wt(this._callObjectMode,"setMeetingSessionData()"),_e(this._callState,"setMeetingSessionData");try{(function(h,w){new zb({data:h,mergeStrategy:w})})(u,p)}catch(h){throw console.error(h),h}try{this.sendMessageToCallMachine({action:"set-session-data",data:u,mergeStrategy:p})}catch(h){throw new Error("Error setting meeting session data: ".concat(h))}}},{key:"setUserName",value:function(u,p){var h=this;return this.properties.userName=u,new Promise((function(w){h.sendMessageToCallMachine({action:"set-user-name",name:u??"",thisMeetingOnly:fe()||!!p&&!!p.thisMeetingOnly},(function(k){delete k.action,delete k.callbackStamp,w(k)}))}))}},{key:"setUserData",value:(ee=Q((function*(u){var p=this;try{pf(u)}catch(h){throw console.error(h),h}if(this.properties.userData=u,this._callMachineInitialized)return new Promise((function(h){try{p.sendMessageToCallMachine({action:"set-user-data",userData:u},(function(w){delete w.action,delete w.callbackStamp,h(w)}))}catch(w){throw new Error("Error setting user data: ".concat(w))}}))})),function(u){return ee.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(u){if(u&&(u<100||typeof u!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(u){var p=this;if(typeof AudioWorkletNode>"u"&&!fe())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(u),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(h,w){p.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:u},(function(k){p._isLocalAudioLevelObserverRunning=!k.error,k.error?w({error:k.error}):h()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:u}}},{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(u){var p=this;if(this.validateAudioLevelInterval(u),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(h,w){p.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:u},(function(k){p._isRemoteParticipantsAudioLevelObserverRunning=!k.error,k.error?w({error:k.error}):h()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:u}}},{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:(R=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wt(this._callObjectMode,"startCamera()"),Qa(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(p)}catch(h){return Promise.reject(h)}else{if(this._didPreAuth){if(p.url&&p.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(p.token&&p.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(p),this.properties=H(H({},this.properties),p)}return new Promise((function(h){u._preloadCache.inputSettings=u._prepInputSettingsForSharing(u._inputSettings,!1),u.sendMessageToCallMachine({action:"start-camera",properties:Gn(u.properties,u.callClientId),preloadCache:Gn(u._preloadCache,u.callClientId)},(function(w){h({camera:w.camera,mic:w.mic,speaker:w.speaker})}))}))})),function(){return R.apply(this,arguments)})},{key:"validateCustomTrack",value:function(u,p,h){if(h&&h.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(p&&p!=="music"&&p!=="speech"&&!(p instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(h&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(h))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(u instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return he(),_e(this._callState,"startCustomTrack()"),this.validateCustomTrack(p.track,p.mode,p.trackName),new Promise((function(h,w){u._sharedTracks.customTrack=p.track,p.track=Ft,u.sendMessageToCallMachine({action:"start-custom-track",properties:p},(function(k){k.error?w({error:k.error}):h(k.mediaTag)}))}))}},{key:"stopCustomTrack",value:function(u){var p=this;return he(),_e(this._callState,"stopCustomTrack()"),new Promise((function(h){p.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:u},(function(w){h(w.mediaTag)}))}))}},{key:"setCamera",value:function(u){var p=this;return Ir(),qi(this._callMachineInitialized,"setCamera()"),new Promise((function(h){p.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:u},(function(w){h({device:w.device})}))}))}},{key:"setAudioDevice",value:(z=Q((function*(u){return Ir(),this.nativeUtils().setAudioDevice(u),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(u){return z.apply(this,arguments)})},{key:"cycleCamera",value:function(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((function(h){u.sendMessageToCallMachine({action:"cycle-camera",properties:p},(function(w){h({device:w.device})}))}))}},{key:"cycleMic",value:function(){var u=this;return he(),new Promise((function(p){u.sendMessageToCallMachine({action:"cycle-mic"},(function(h){p({device:h.device})}))}))}},{key:"getCameraFacingMode",value:function(){var u=this;return Ir(),new Promise((function(p){u.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(h){p(h.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(N=Q((function*(u){var p=this,h=u.audioDeviceId,w=u.videoDeviceId,k=u.audioSource,P=u.videoSource;if(he(),k!==void 0&&(h=k),P!==void 0&&(w=P),typeof h=="boolean"&&(this._setAllowLocalAudio(h),h=void 0),typeof w=="boolean"&&(this._setAllowLocalVideo(w),w=void 0),!h&&!w)return yield this.getInputDevices();var D={};return h&&(h instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=h,h=Ft,D.audio={settings:{customTrack:h}}):(delete this._sharedTracks.audioTrack,D.audio={settings:{deviceId:h}})),w&&(w instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=w,w=Ft,D.video={settings:{customTrack:w}}):(delete this._sharedTracks.videoTrack,D.video={settings:{deviceId:w}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(D,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(I){p.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:h,videoDeviceId:w},(function(F){if(delete F.action,delete F.callbackStamp,F.returnPreloadCache)return p._updatePreloadCacheInputSettings(D,!1),void I(p._devicesFromInputSettings(p._inputSettings));I(F)}))}))})),function(u){return N.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(B=Q((function*(u){var p=this,h=u.outputDeviceId;if(he(),!h||typeof h!="string")throw new Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=h,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(w,k){p.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:h},(function(P){if(delete P.action,delete P.callbackStamp,P.error){var D=new Error(P.error.message);return D.type=P.error.type,void k(D)}P.returnPreloadCache?w(p._devicesFromInputSettings(p._inputSettings)):w(P)}))}))})),function(u){return B.apply(this,arguments)})},{key:"getInputDevices",value:(V=Q((function*(){var u=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(p){u.sendMessageToCallMachine({action:"get-input-devices"},(function(h){h.returnPreloadCache?p(u._devicesFromInputSettings(u._inputSettings)):p({camera:h.camera,mic:h.mic,speaker:h.speaker})}))}))})),function(){return V.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return Ir(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(u){if(Ir(),[sf,l0].includes(u)){if(u!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=u,!this.disableReactNativeAutoDeviceManagement("audio")&&Ji(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",u)}},{key:"preAuth",value:(O=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wt(this._callObjectMode,"preAuth()"),Qa(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(p)),!p.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(p),this.properties=H(H({},this.properties),p),new Promise((function(h,w){u._preloadCache.inputSettings=u._prepInputSettingsForSharing(u._inputSettings,!1),u.sendMessageToCallMachine({action:"daily-method-preauth",properties:Gn(u.properties,u.callClientId),preloadCache:Gn(u._preloadCache,u.callClientId)},(function(k){return k.error?w(k.error):k.access?(u._didPreAuth=!0,void h({access:k.access})):w(new Error("unknown error in preAuth()"))}))}))})),function(){return O.apply(this,arguments)})},{key:"load",value:(E=Q((function*(u){var p=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(u&&(this.validateProperties(u),this.properties=H(H({},this.properties),u)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(hd),this.emitDailyJSEvent({action:zy}),this._callObjectMode?new Promise((function(h,w){p._callObjectLoader.cancel();var k=Date.now();p._callObjectLoader.load(p.properties.dailyConfig,(function(P){p._bundleLoadTime=P?"no-op":Date.now()-k,p._updateCallState(pd),P&&p.emitDailyJSEvent({action:gd}),h()}),(function(P,D){if(p.emitDailyJSEvent({action:Wy}),!D){p._updateCallState(Kt),p.resetMeetingDependentVars();var I={action:wd,errorMsg:P.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:P,bundleUrl:vi(p.properties.dailyConfig)}}};p._maybeSendToSentry(I),p.emitDailyJSEvent(I),w(P.msg)}}))})):(this._iframe.src=Zl(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(h,w){p._loadedCallback=function(k){p._callState!==Kt?(p._updateCallState(pd),(p.properties.cssFile||p.properties.cssText)&&p.loadCss(p.properties),h()):w(k)}})))}})),function(u){return E.apply(this,arguments)})},{key:"join",value:(C=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var h=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(p)}catch(w){return this.updateIsPreparingToJoin(!1),Promise.reject(w)}}else{if(h=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(p.url&&p.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(p.token&&p.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(p.url&&!this._callObjectMode&&p.url&&p.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(p.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(p),this.properties=H(H({},this.properties),p)}return p.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!p.showLocalVideo),p.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!p.showParticipantsBar),this._callState===yn||this._callState===La?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(La,!1),this.emitDailyJSEvent({action:qy}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:Gn(this.properties,this.callClientId),preloadCache:Gn(this._preloadCache,this.callClientId)}),new Promise((function(w,k){u._joinedCallback=function(P,D){if(u._callState!==Kt){if(u._updateCallState(yn),P)for(var I in P){if(u._callObjectMode){var F=u._callMachine().store;Hd(P[I],F),Jd(P[I],F),qd(P[I],u._participants[I],F)}u._participants[I]=H({},P[I]),u.toggleParticipantAudioBasedOnNativeAudioFocus()}h&&u.loadCss(u.properties),w(P)}else k(D)}})))})),function(){return C.apply(this,arguments)})},{key:"leave",value:(x=Q((function*(){var u=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(p){u._callState===bn||u._callState===Kt?p():u._callObjectLoader&&!u._callObjectLoader.loaded?(u._callObjectLoader.cancel(),u._updateCallState(bn),u.resetMeetingDependentVars(),u.emitDailyJSEvent({action:bn}),p()):(u._resolveLeave=p,u.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return x.apply(this,arguments)})},{key:"startScreenShare",value:(M=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(qi(this._callMachineInitialized,"startScreenShare()"),p.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",p.screenVideoSendSettings),p.mediaStream&&(this._sharedTracks.screenMediaStream=p.mediaStream,p.mediaStream=Ft),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var h=this.nativeUtils();if(yield h.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:_d,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});h.setSystemScreenCaptureStartCallback((function(){h.setSystemScreenCaptureStartCallback(null),u.sendMessageToCallMachine({action:Sd,captureOptions:p})})),h.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:Sd,captureOptions:p})})),function(){return M.apply(this,arguments)})},{key:"stopScreenShare",value:function(){qi(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=u.type;if(p&&p!=="cloud"&&p!=="raw-tracks"&&p!=="local")throw new Error("invalid type: ".concat(p,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(H({action:"local-recording-start"},u))}},{key:"updateRecording",value:function(u){var p=u.layout,h=p===void 0?{preset:"default"}:p,w=u.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:h,instanceId:w})}},{key:"stopRecording",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(H({action:"local-recording-stop"},u))}},{key:"startLiveStreaming",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(H({action:"daily-method-start-live-streaming"},u))}},{key:"updateLiveStreaming",value:function(u){var p=u.layout,h=p===void 0?{preset:"default"}:p,w=u.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:h,instanceId:w})}},{key:"addLiveStreamingEndpoints",value:function(u){var p=u.endpoints,h=u.instanceId;this.sendMessageToCallMachine({action:xd,endpointsOp:jb,endpoints:p,instanceId:h})}},{key:"removeLiveStreamingEndpoints",value:function(u){var p=u.endpoints,h=u.instanceId;this.sendMessageToCallMachine({action:xd,endpointsOp:Rb,endpoints:p,instanceId:h})}},{key:"stopLiveStreaming",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(H({action:"daily-method-stop-live-streaming"},u))}},{key:"validateDailyConfig",value:function(u){u.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(u.camSimulcastEncodings)),u.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),Od()&&u.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u){if(!(u instanceof Array||Array.isArray(u)))throw new Error("encodings must be an Array");if(!Mf(u.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var w=0;w<u.length;w++){var k=u[w];for(var P in this._validateEncodingLayerHasValidProperties(k),k)if(Ya.includes(P)){if(typeof k[P]!="number")throw new Error("".concat(P," must be a number"));if(p){var D=p[P],I=D.min,F=D.max;if(!Mf(k[P],I,F))throw new Error("".concat(P," value not in range. valid range: ").concat(I," to ").concat(F))}}else if(!["active","scalabilityMode"].includes(P))throw new Error("Invalid key ".concat(P,", valid keys are:")+Object.values(Ya));if(h&&!k.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(T=Q((function*(u){var p=this,h=u.url,w=u.settings,k=w===void 0?{state:Va.PLAY}:w;try{(function(P){if(typeof P!="string")throw new Error('url parameter must be "string" type')})(h),Tf(k),(function(P){for(var D in P)if(!df.includes(D))throw new Error("Invalid key ".concat(D,", valid keys are: ").concat(df));P.simulcastEncodings&&this.validateSimulcastEncodings(P.simulcastEncodings,uf,!0)})(k)}catch(P){throw console.error("invalid argument Error: ".concat(P)),console.error(`startRemoteMediaPlayer arguments must be of the form:
16
+ Url: ${Di(a)}`),!0)})(t,o)?null:t}});function Di(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?(function(n=[]){for(let r=n.length-1;r>=0;r--){const i=n[r];if(i&&i.filename!=="<anonymous>"&&i.filename!=="[native code]")return i.filename||null}return null})(t):null}catch{return Se&&ne.error(`Cannot extract url for event ${qt(e)}`),null}}function ry(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&hn(a.originalException,Error)))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,l;s&&(o.exception.values=(c=_a(e,t,i,a.originalException,r,o.exception.values,s,0),l=n,c.map((d=>(d.value&&(d.value=$n(d.value,l)),d)))))}function _a(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let c=[...o];if(hn(r[i],Error)){Gu(a,s);const l=e(t,r[i]),d=c.length;Ku(l,i,d,s),c=_a(e,t,n,r[i],i,[l,...c],l,d)}return Array.isArray(r.errors)&&r.errors.forEach(((l,d)=>{if(hn(l,Error)){Gu(a,s);const f=e(t,l),m=c.length;Ku(f,`errors[${d}]`,m,s),c=_a(e,t,n,l,i,[f,...c],f,m)}})),c}function Gu(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 Ku(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 wa(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const 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 iy(){"console"in ge&&Zo.forEach((function(e){e in ge.console&&at(ge.console,e,(function(t){return wi[e]=t,function(...n){bt("console",{args:n,level:e});const r=wi[e];r&&r.apply(ge.console,n)}}))}))}function oy(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const ay=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if((function(n,r){return r?!!((function(i,o){const a=i.message,s=o.message;return!(!a&&!s||a&&!s||!a&&s||a!==s||!Xu(i,o)||!Yu(i,o))})(n,r)||(function(i,o){const a=Qu(o),s=Qu(i);return!(!a||!s||a.type!==s.type||a.value!==s.value||!Xu(i,o)||!Yu(i,o))})(n,r)):!1})(t,e))return Se&&ne.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}};function Yu(e,t){let n=ru(e),r=ru(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const o=r[i],a=n[i];if(o.filename!==a.filename||o.lineno!==a.lineno||o.colno!==a.colno||o.function!==a.function)return!1}return!0}function Xu(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 Qu(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Zu(e){return e===void 0?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const ka=ge;function Sa(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function sy(){if(typeof EdgeRuntime=="string")return!0;if(!(function(){if(!("fetch"in ka))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}})())return!1;if(Sa(ka.fetch))return!0;let e=!1;const t=ka.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Sa(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){ln&&ne.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function cy(e,t){const n="fetch";dn(n,e),fn(n,(()=>(function(r,i=!1){i&&!sy()||at(ge,"fetch",(function(o){return function(...a){const s=new Error,{method:c,url:l}=(function(f){if(f.length===0)return{method:"GET",url:""};if(f.length===2){const[g,y]=f;return{url:ed(g),method:xa(y,"method")?String(y.method).toUpperCase():"GET"}}const m=f[0];return{url:ed(m),method:xa(m,"method")?String(m.method).toUpperCase():"GET"}})(a),d={args:a,fetchData:{method:c,url:l},startTimestamp:1e3*Rt(),virtualError:s};return r||bt("fetch",{...d}),o.apply(ge,a).then((async f=>(r?r(f):bt("fetch",{...d,endTimestamp:1e3*Rt(),response:f}),f)),(f=>{throw bt("fetch",{...d,endTimestamp:1e3*Rt(),error:f}),ra(f)&&f.stack===void 0&&(f.stack=s.stack,pn(f,"framesToPop",1)),f}))}}))})(void 0,t)))}function xa(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ed(e){return typeof e=="string"?e:e?xa(e,"url")?e.url:e.toString?e.toString():"":""}const Li=ge,Ve=ge;let Ta=0;function td(){return Ta>0}function Hn(e,t={}){if(!(function(r){return typeof r=="function"})(e))return e;try{const r=e.__sentry_wrapped__;if(r)return typeof r=="function"?r:e;if(sa(e))return e}catch{return e}const n=function(...r){try{const i=r.map((o=>Hn(o,t)));return e.apply(this,i)}catch(i){throw Ta++,setTimeout((()=>{Ta--})),(function(...o){const a=ha(xi());if(o.length===2){const[s,c]=o;return s?a.withSetScope(s,c):a.withScope(c)}a.withScope(o[0])})((o=>{var a;o.addEventProcessor((s=>(t.mechanism&&(la(s,void 0),Un(s,t.mechanism)),s.extra={...s.extra,arguments:r},s))),a=i,gn().captureException(a,void 0)})),i}};try{for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}catch{}du(n,e),pn(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const ji=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Ma(e,t){const n=Pa(e,t),r={type:dy(t),value:fy(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function ly(e,t,n,r){const i=We(),o=i&&i.getOptions().normalizeDepth,a=(function(l){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)){const f=l[d];if(f instanceof Error)return f}})(t),s={__serialized__:Pu(t,o)};if(a)return{exception:{values:[Ma(e,a)]},extra:s};const c={exception:{values:[{type:Ti(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:hy(t,{isUnhandledRejection:r})}]},extra:s};if(n){const l=Pa(e,n);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function Ca(e,t){return{exception:{values:[Ma(e,t)]}}}function Pa(e,t){const n=t.stacktrace||t.stack||"",r=(function(o){return o&&uy.test(o.message)?1:0})(t),i=(function(o){return typeof o.framesToPop=="number"?o.framesToPop:0})(t);try{return e(n,r,i)}catch{}return[]}const uy=/Minified React error #\d+;/i;function nd(e){return typeof WebAssembly<"u"&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function dy(e){const t=e&&e.name;return!t&&nd(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function fy(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:nd(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function Ea(e,t,n,r,i){let o;if(au(t)&&t.error)return Ca(e,t.error);if(su(t)||Fn(t,"DOMException")){const a=t;if("stack"in t)o=Ca(e,t);else{const s=a.name||(su(a)?"DOMError":"DOMException"),c=a.message?`${s}: ${a.message}`:s;o=Aa(e,c,n,r),la(o,c)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return ra(t)?Ca(e,t):Bn(t)||Ti(t)?(o=ly(e,t,n,i),Un(o,{synthetic:!0}),o):(o=Aa(e,t,n,r),la(o,`${t}`),Un(o,{synthetic:!0}),o)}function Aa(e,t,n,r){const i={};if(r&&n){const o=Pa(e,n);o.length&&(i.exception={values:[{value:t,stacktrace:{frames:o}}]}),Un(i,{synthetic:!0})}if(ia(t)){const{__sentry_template_string__:o,__sentry_template_values__:a}=t;return i.logentry={message:o,params:a},i}return i.message=t,i}function hy(e,{isUnhandledRejection:t}){const n=(function(i,o=40){const a=Object.keys(fu(i));a.sort();const s=a[0];if(!s)return"[object has no keys]";if(s.length>=o)return $n(s,o);for(let c=a.length;c>0;c--){const l=a.slice(0,c).join(", ");if(!(l.length>o))return c===a.length?l:$n(l,o)}return""})(e),r=t?"promise rejection":"exception";return au(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ti(e)?`Event \`${(function(i){try{const o=Object.getPrototypeOf(i);return o?o.constructor.name:void 0}catch{}})(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}class py extends Kv{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t};(function(r,i,o=[i],a="npm"){const s=r._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${i}`,packages:o.map((c=>({name:`${a}:@sentry/${c}`,version:cn}))),version:cn}),r._metadata=s})(n,"browser",["browser"],Ve.SENTRY_SDK_SOURCE||"npm"),super(n),n.sendClientReports&&Ve.document&&Ve.document.addEventListener("visibilitychange",(()=>{Ve.document.visibilityState==="hidden"&&this._flushOutcomes()}))}eventFromException(t,n){return(function(r,i,o,a){const s=Ea(r,i,o&&o.syntheticException||void 0,a);return Un(s),s.level="error",o&&o.event_id&&(s.event_id=o.event_id),mn(s)})(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return(function(i,o,a="info",s,c){const l=Aa(i,o,s&&s.syntheticException||void 0,c);return l.level=a,s&&s.event_id&&(l.event_id=s.event_id),mn(l)})(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return void(ji&&ne.warn("SDK not enabled, will not capture user feedback."));const n=(function(r,{metadata:i,tunnel:o,dsn:a}){const s={event_id:r.event_id,sent_at:new Date().toISOString(),...i&&i.sdk&&{sdk:{name:i.sdk.name,version:i.sdk.version}},...!!o&&!!a&&{dsn:Ai(a)}};return Mr(s,[(function(l){return[{type:"user_report"},l]})(r)])})(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const my=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Xe=ge;let rd,Oa,Ia,Ri;function gy(){if(!Xe.document)return;const e=bt.bind(null,"dom"),t=id(e,!0);Xe.document.addEventListener("click",t,!1),Xe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((n=>{const r=Xe[n],i=r&&r.prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&(at(i,"addEventListener",(function(o){return function(a,s,c){if(a==="click"||a=="keypress")try{const l=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=l[a]=l[a]||{refCount:0};if(!d.handler){const f=id(e);d.handler=f,o.call(this,a,f,c)}d.refCount++}catch{}return o.call(this,a,s,c)}})),at(i,"removeEventListener",(function(o){return function(a,s,c){if(a==="click"||a=="keypress")try{const l=this.__sentry_instrumentation_handlers__||{},d=l[a];d&&(d.refCount--,d.refCount<=0&&(o.call(this,a,d.handler,c),d.handler=void 0,delete l[a]),Object.keys(l).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,a,s,c)}})))}))}function id(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=(function(o){try{return o.target}catch{return null}})(n);if((function(o,a){return o==="keypress"&&(!a||!a.tagName||a.tagName!=="INPUT"&&a.tagName!=="TEXTAREA"&&!a.isContentEditable)})(n.type,r))return;pn(n,"_sentryCaptured",!0),r&&!r._sentryId&&pn(r,"_sentryId",ut());const i=n.type==="keypress"?"input":n.type;(function(o){if(o.type!==Oa)return!1;try{if(!o.target||o.target._sentryId!==Ia)return!1}catch{}return!0})(n)||(e({event:n,name:i,global:t}),Oa=n.type,Ia=r?r._sentryId:void 0),clearTimeout(rd),rd=Xe.setTimeout((()=>{Ia=void 0,Oa=void 0}),1e3)}}function od(e){const t="history";dn(t,e),fn(t,vy)}function vy(){if(!(function(){const n=Li.chrome,r=n&&n.app&&n.app.runtime,i="history"in Li&&!!Li.history.pushState&&!!Li.history.replaceState;return!r&&i})())return;const e=Xe.onpopstate;function t(n){return function(...r){const i=r.length>2?r[2]:void 0;if(i){const o=Ri,a=String(i);Ri=a,bt("history",{from:o,to:a})}return n.apply(this,r)}}Xe.onpopstate=function(...n){const r=Xe.location.href,i=Ri;if(Ri=r,bt("history",{from:i,to:r}),e)try{return e.apply(this,n)}catch{}},at(Xe.history,"pushState",t),at(Xe.history,"replaceState",t)}const Ni={};function ad(e){Ni[e]=void 0}const Cr="__sentry_xhr_v3__";function yy(){if(!Xe.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,o=1e3*Rt(),a=jt(r[0])?r[0].toUpperCase():void 0,s=(function(l){if(jt(l))return l;try{return l.toString()}catch{}})(r[1]);if(!a||!s)return t.apply(n,r);n[Cr]={method:a,url:s,request_headers:{}},a==="POST"&&s.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const l=n[Cr];if(l&&n.readyState===4){try{l.status_code=n.status}catch{}bt("xhr",{endTimestamp:1e3*Rt(),startTimestamp:o,xhr:n,virtualError:i})}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply:(l,d,f)=>(c(),l.apply(d,f))}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(l,d,f){const[m,g]=f,y=d[Cr];return y&&jt(m)&&jt(g)&&(y.request_headers[m.toLowerCase()]=g),l.apply(d,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Cr];return i?(r[0]!==void 0&&(i.body=r[0]),bt("xhr",{startTimestamp:1e3*Rt(),xhr:n}),t.apply(n,r)):t.apply(n,r)}})}function by(e,t=(function(n){const r=Ni[n];if(r)return r;let i=Xe[n];if(Sa(i))return Ni[n]=i.bind(Xe);const o=Xe.document;if(o&&typeof o.createElement=="function")try{const a=o.createElement("iframe");a.hidden=!0,o.head.appendChild(a);const s=a.contentWindow;s&&s[n]&&(i=s[n]),o.head.removeChild(a)}catch(a){my&&ne.warn(`Could not create sandbox iframe for ${n} check, bailing to window.${n}: `,a)}return i&&(Ni[n]=i.bind(Xe))})("fetch")){let n=0,r=0;return Qv(e,(function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return ad("fetch"),Pi("No fetch implementation available");try{return t(e.url,a).then((s=>(n-=o,r--,{statusCode:s.status,headers:{"x-sentry-rate-limits":s.headers.get("X-Sentry-Rate-Limits"),"retry-after":s.headers.get("Retry-After")}})))}catch(s){return ad("fetch"),n-=o,r--,Pi(s)}}))}function Da(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?un:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}const _y=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,wy=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ky=/\((\S*)(?::(\d+))(?::(\d+))\)/,Sy=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,xy=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ty=(function(...e){const t=e.sort(((n,r)=>n[0]-r[0])).map((n=>n[1]));return(n,r=0,i=0)=>{const o=[],a=n.split(`
17
+ `);for(let s=r;s<a.length;s++){const c=a[s];if(c.length>1024)continue;const l=eu.test(c)?c.replace(eu,"$1"):c;if(!l.match(/\S*Error: /)){for(const d of t){const f=d(l);if(f){o.push(f);break}}if(o.length>=50+i)break}}return(function(s){if(!s.length)return[];const c=Array.from(s);return/sentryWrapped/.test(ki(c).function||"")&&c.pop(),c.reverse(),tu.test(ki(c).function||"")&&(c.pop(),tu.test(ki(c).function||"")&&c.pop()),c.slice(0,50).map((l=>({...l,filename:l.filename||ki(c).filename,function:l.function||un})))})(o.slice(i))}})([30,e=>{const t=_y.exec(e);if(t){const[,r,i,o]=t;return Da(r,un,+i,+o)}const n=wy.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=ky.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[r,i]=sd(n[1]||un,n[2]);return Da(i,r,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,e=>{const t=Sy.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=xy.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||un;return[r,n]=sd(r,n),Da(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),sd=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:un,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},cd=1024,My=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(n){var r;t.console&&(function(i){const o="console";dn(o,i),fn(o,iy)})((function(i){return function(o){if(We()!==i)return;const a={category:"console",data:{arguments:o.args,logger:"console"},level:oy(o.level),message:uu(o.args," ")};if(o.level==="assert"){if(o.args[0]!==!1)return;a.message=`Assertion failed: ${uu(o.args.slice(1)," ")||"console.assert"}`,a.data.arguments=o.args.slice(1)}vn(a,{input:o.args,level:o.level})}})(n)),t.dom&&(r=(function(i,o){return function(a){if(We()!==i)return;let s,c,l=typeof o=="object"?o.serializeAttribute:void 0,d=typeof o=="object"&&typeof o.maxStringLength=="number"?o.maxStringLength:void 0;d&&d>cd&&(ji&&ne.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${d} was configured. Sentry will use 1024 instead.`),d=cd),typeof l=="string"&&(l=[l]);try{const m=a.event,g=(function(y){return!!y&&!!y.target})(m)?m.target:m;s=lu(g,{keyAttrs:l,maxStringLength:d}),c=(function(y){if(!aa.HTMLElement)return null;let v=y;for(let b=0;b<5;b++){if(!v)return null;if(v instanceof HTMLElement){if(v.dataset.sentryComponent)return v.dataset.sentryComponent;if(v.dataset.sentryElement)return v.dataset.sentryElement}v=v.parentNode}return null})(g)}catch{s="<unknown>"}if(s.length===0)return;const f={category:`ui.${a.name}`,message:s};c&&(f.data={"ui.component_name":c}),vn(f,{event:a.event,name:a.name,global:a.global})}})(n,t.dom),dn("dom",r),fn("dom",gy)),t.xhr&&(function(i){dn("xhr",i),fn("xhr",yy)})((function(i){return function(o){if(We()!==i)return;const{startTimestamp:a,endTimestamp:s}=o,c=o.xhr[Cr];if(!a||!s||!c)return;const{method:l,url:d,status_code:f,body:m}=c,g={method:l,url:d,status_code:f},y={xhr:o.xhr,input:m,startTimestamp:a,endTimestamp:s};vn({category:"xhr",data:g,type:"http",level:Zu(f)},y)}})(n)),t.fetch&&cy((function(i){return function(o){if(We()!==i)return;const{startTimestamp:a,endTimestamp:s}=o;if(s&&(!o.fetchData.url.match(/sentry_key/)||o.fetchData.method!=="POST"))if(o.error)vn({category:"fetch",data:o.fetchData,level:"error",type:"http"},{data:o.error,input:o.args,startTimestamp:a,endTimestamp:s});else{const c=o.response,l={...o.fetchData,status_code:c&&c.status},d={input:o.args,response:c,startTimestamp:a,endTimestamp:s};vn({category:"fetch",data:l,type:"http",level:Zu(l.status_code)},d)}}})(n)),t.history&&od((function(i){return function(o){if(We()!==i)return;let a=o.from,s=o.to;const c=wa(Ve.location.href);let l=a?wa(a):void 0;const d=wa(s);l&&l.path||(l=c),c.protocol===d.protocol&&c.host===d.host&&(s=d.relative),c.protocol===l.protocol&&c.host===l.host&&(a=l.relative),vn({category:"navigation",data:{from:a,to:s}})}})(n)),t.sentry&&n.on("beforeSendEvent",(function(i){return function(o){We()===i&&vn({category:"sentry."+(o.type==="transaction"?"transaction":"event"),event_id:o.event_id,level:o.level,message:qt(o)},{event:o})}})(n))}}},Cy=["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"],Py=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&at(Ve,"setTimeout",ld),t.setInterval&&at(Ve,"setInterval",ld),t.requestAnimationFrame&&at(Ve,"requestAnimationFrame",Ey),t.XMLHttpRequest&&"XMLHttpRequest"in Ve&&at(XMLHttpRequest.prototype,"send",Ay);const n=t.eventTarget;n&&(Array.isArray(n)?n:Cy).forEach(Oy)}}};function ld(e){return function(...t){const n=t[0];return t[0]=Hn(n,{mechanism:{data:{function:Jt(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Ey(e){return function(t){return e.apply(this,[Hn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Jt(e)},handled:!1,type:"instrument"}})])}}function Ay(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((r=>{r in n&&typeof n[r]=="function"&&at(n,r,(function(i){const o={mechanism:{data:{function:r,handler:Jt(i)},handled:!1,type:"instrument"}},a=sa(i);return a&&(o.mechanism.data.handler=Jt(a)),Hn(i,o)}))})),e.apply(this,t)}}function Oy(e){const t=Ve[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(at(n,"addEventListener",(function(r){return function(i,o,a){try{typeof o.handleEvent=="function"&&(o.handleEvent=Hn(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Jt(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[i,Hn(o,{mechanism:{data:{function:"addEventListener",handler:Jt(o),target:e},handled:!1,type:"instrument"}}),a])}})),at(n,"removeEventListener",(function(r){return function(i,o,a){try{const s=o.__sentry_wrapped__;s&&r.call(this,i,s,a)}catch{}return r.call(this,i,o,a)}})))}const Iy=()=>({name:"BrowserSession",setupOnce(){Ve.document!==void 0?(ju({ignoreDuration:!0}),Vu(),od((({from:e,to:t})=>{e!==void 0&&e!==t&&(ju({ignoreDuration:!0}),Vu())}))):ji&&ne.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),Dy=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&((function(r){(function(i){const o="error";dn(o,i),fn(o,Sv)})((i=>{const{stackParser:o,attachStacktrace:a}=dd();if(We()!==r||td())return;const{msg:s,url:c,line:l,column:d,error:f}=i,m=(function(g,y,v,b){const _=g.exception=g.exception||{},S=_.values=_.values||[],T=S[0]=S[0]||{},M=T.stacktrace=T.stacktrace||{},x=M.frames=M.frames||[],C=b,E=v,O=jt(y)&&y.length>0?y:(function(){try{return aa.document.location.href}catch{return""}})();return x.length===0&&x.push({colno:C,filename:O,function:un,in_app:!0,lineno:E}),g})(Ea(o,f||s,void 0,a,!1),c,l,d);m.level="error",Lu(m,{originalException:f,mechanism:{handled:!1,type:"onerror"}})}))})(n),ud("onerror")),t.onunhandledrejection&&((function(r){(function(i){const o="unhandledrejection";dn(o,i),fn(o,xv)})((i=>{const{stackParser:o,attachStacktrace:a}=dd();if(We()!==r||td())return;const s=(function(l){if(oa(l))return l;try{if("reason"in l)return l.reason;if("detail"in l&&"reason"in l.detail)return l.detail.reason}catch{}return l})(i),c=oa(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:Ea(o,s,void 0,a,!0);c.level="error",Lu(c,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})}))})(n),ud("onunhandledrejection"))}}};function ud(e){ji&&ne.log(`Global Handler attached: ${e}`)}function dd(){const e=We();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Ly=()=>({name:"HttpContext",preprocessEvent(e){if(!Ve.navigator&&!Ve.location&&!Ve.document)return;const t=e.request&&e.request.url||Ve.location&&Ve.location.href,{referrer:n}=Ve.document||{},{userAgent:r}=Ve.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};e.request=o}}),jy=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(r,i,o){const a=o.getOptions();ry(Ma,a.stackParser,a.maxValueLength,n,t,r,i)}}};var fd="new",hd="loading",pd="loaded",La="joining-meeting",yn="joined-meeting",bn="left-meeting",Kt="error",Ry="playable",ja="unknown",Ny="full",Vy="base",md="no-room",Fy="end-of-life",By="connection-error",$y="iframe-ready-for-launch-config",Uy="iframe-launch-config",zy="theme-updated",Wy="loading",Hy="load-attempt-failed",gd="loaded",Jy="started-camera",qy="camera-error",Gy="joining-meeting",Ky="joined-meeting",Yy="left-meeting",Xy="participant-joined",Qy="participant-updated",Zy="participant-left",eb="participant-counts-updated",tb="access-state-updated",nb="meeting-session-summary-updated",rb="meeting-session-state-updated",ib="waiting-participant-added",ob="waiting-participant-updated",ab="waiting-participant-removed",sb="track-started",cb="track-stopped",lb="transcription-started",ub="transcription-stopped",db="transcription-error",vd="recording-started",yd="recording-stopped",fb="recording-stats",hb="recording-error",pb="recording-upload-completed",mb="recording-data",gb="app-message",vb="transcription-message",yb="remote-media-player-started",bb="remote-media-player-updated",_b="remote-media-player-stopped",wb="local-screen-share-started",kb="local-screen-share-stopped",Sb="local-screen-share-canceled",xb="active-speaker-change",Tb="active-speaker-mode-change",Mb="network-quality-change",Cb="network-connection",Pb="cpu-load-change",Eb="face-counts-updated",Vi="fullscreen",Fi="exited-fullscreen",Ab="live-streaming-started",Ob="live-streaming-updated",Ib="live-streaming-stopped",Db="live-streaming-error",Lb="lang-updated",jb="receive-settings-updated",bd="input-settings-updated",_d="nonfatal-error",wd="error",Ra=4096,kd=102400,Na="iframe-call-message",Sd="local-screen-start",xd="daily-method-update-live-streaming-endpoints",Bi="transmit-log",Ft="daily-custom-track",$i={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},Td={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},Va={PLAY:"play",PAUSE:"pause"},Fa=["jpg","png","jpeg"],Rb="add-endpoints",Nb="remove-endpoints",Md="sip-call-transfer";function ft(){return!fe()&&typeof window<"u"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function fe(){return typeof navigator<"u"&&navigator.product&&navigator.product==="ReactNative"}function Cd(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function Vb(){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})(_n(),Ui())||fe())}function Pd(){if(fe()||!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var Ba="none",Fb="software",Bb="hardware",$b=(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?Fb:Bb:Ba}catch{return Ba}})();function Ed(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];return!fe()&&$b!==Ba&&(e?(function(){return Id()?!1:["Chrome","Firefox"].includes(_n())})():(function(){if(Id())return!1;var t=_n();if(t==="Safari"){var n=za();if(n.major<15||n.major===15&&n.minor<4)return!1}return t==="Chrome"?Ua().major>=77:t==="Firefox"?Wa().major>=97:["Chrome","Firefox","Safari"].includes(t)})())}function Ad(){if(fe()||Od()||typeof AudioWorkletNode>"u")return!1;switch(_n()){case"Chrome":case"Firefox":return!0;case"Safari":var e=Ui();return e.major>17||e.major===17&&e.minor>=4}return!1}function $a(){return Cd()&&typeof MediaStreamTrack<"u"&&!(function(){var e,t=_n();if(!ft())return!0;switch(t){case"Chrome":return(e=Ua()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Wa()).major<91;case"Safari":return(e=za()).major<13||e.major===13&&e.minor<1;default:return!0}})()}function Od(){return ft().match(/Linux; Android/)}function Id(){var e,t=ft(),n=t.match(/Mac/)&&(!fe()&&typeof window<"u"&&(e=window)!==null&&e!==void 0&&(e=e.navigator)!==null&&e!==void 0&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||n)||!!ft().match(/DailyAnd\//)||void 0}function _n(){if(typeof window<"u"){var e=ft();return Dd()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||Ld()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Ui(){switch(_n()){case"Chrome":return Ua();case"Safari":return za();case"Firefox":return Wa();case"Edge":return(function(){var e=0,t=0;if(typeof window<"u"){var n=ft().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}})()}}function Ua(){var e=0,t=0,n=0,r=0,i=!1;if(typeof window<"u"){var o=ft(),a=o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(a)try{e=parseInt(a[1]),t=parseInt(a[2]),n=parseInt(a[3]),r=parseInt(a[4]),i=o.indexOf("OPR/")>-1}catch{}}return{major:e,minor:t,build:n,patch:r,opera:i}}function Dd(){return!!ft().match(/iPad|iPhone|iPod/i)&&Cd()}function Ld(){return ft().indexOf("AppleWebKit/605.1.15")>-1}function za(){var e=0,t=0,n=0;if(typeof window<"u"){var r=ft().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch{}else(Dd()||Ld())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Wa(){var e=0,t=0;if(typeof window<"u"){var n=ft().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch{}}return{major:e,minor:t}}var jd=(function(){return ot((function e(){it(this,e)}),[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){kr()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){kr()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){kr()}},{key:"sendMessageToDailyJs",value:function(e,t){kr()}},{key:"removeListener",value:function(e){kr()}}])})();function Rd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rd(Object(n),!0).forEach((function(r){Mt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rd(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Nd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Nd=function(){return!!e})()}var Ub=(function(){function e(){var t,n,r,i;return it(this,e),n=this,r=yt(r=e),(t=hi(n,Nd()?Reflect.construct(r,[],yt(n).constructor):r.apply(n,i)))._wrappedListeners={},t._messageCallbacks={},t}return pi(e,jd),ot(e,[{key:"addListenerForMessagesFromCallMachine",value:function(t,n,r){var i=this,o=function(a){if(a.data&&a.data.what==="iframe-call-message"&&(!a.data.callClientId||a.data.callClientId===n)&&(!a.data.from||a.data.from!=="module")){var s=Ha({},a.data);if(delete s.from,s.callbackStamp&&i._messageCallbacks[s.callbackStamp]){var c=s.callbackStamp;i._messageCallbacks[c].call(r,s),delete i._messageCallbacks[c]}delete s.what,delete s.callbackStamp,t.call(r,s)}};this._wrappedListeners[t]=o,window.addEventListener("message",o)}},{key:"addListenerForMessagesFromDailyJs",value:function(t,n,r){var i=function(o){var a;if(!(!o.data||o.data.what!==Na||!o.data.action||o.data.from&&o.data.from!=="module"||o.data.callClientId&&n&&o.data.callClientId!==n||o!=null&&(a=o.data)!==null&&a!==void 0&&a.callFrameId)){var s=o.data;t.call(r,s)}};this._wrappedListeners[t]=i,window.addEventListener("message",i)}},{key:"sendMessageToCallMachine",value:function(t,n,r,i){if(!r)throw new Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var o=Ha({},t);if(o.what=Na,o.from="module",o.callClientId=r,n){var a=vi();this._messageCallbacks[a]=n,o.callbackStamp=a}var s=i?i.contentWindow:window,c=this._callMachineTargetOrigin(i);c&&s.postMessage(o,c)}},{key:"sendMessageToDailyJs",value:function(t,n){t.what=Na,t.callClientId=n,t.from="embedded",window.postMessage(t,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(t){var n=this._wrappedListeners[t];n&&(window.removeEventListener("message",n),delete this._wrappedListeners[t])}},{key:"forwardPackagedMessageToCallMachine",value:function(t,n,r){var i=Ha({},t);i.callClientId=r;var o=n?n.contentWindow:window,a=this._callMachineTargetOrigin(n);a&&o.postMessage(i,a)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(t,n){var r=function(i){if(i.data&&i.data.what==="iframe-call-message"&&(!i.data.callClientId||i.data.callClientId===n)&&(!i.data.from||i.data.from!=="module")){var o=i.data;t(o)}};return this._wrappedListeners[t]=r,window.addEventListener("message",r),t}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(t){var n=this._wrappedListeners[t];n&&(window.removeEventListener("message",n),delete this._wrappedListeners[t])}},{key:"_callMachineTargetOrigin",value:function(t){return t?t.src?new URL(t.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return window.location.protocol==="file:"?"*":window.location.origin}}])})();function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Fd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Fd=function(){return!!e})()}var zb=(function(){function e(){var t,n,r,i;return it(this,e),n=this,r=yt(r=e),t=hi(n,Fd()?Reflect.construct(r,[],yt(n).constructor):r.apply(n,i)),global.callMachineToDailyJsEmitter=global.callMachineToDailyJsEmitter||new Qo.EventEmitter,global.dailyJsToCallMachineEmitter=global.dailyJsToCallMachineEmitter||new Qo.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return pi(e,jd),ot(e,[{key:"addListenerForMessagesFromCallMachine",value:function(t,n,r){this._addListener(t,global.callMachineToDailyJsEmitter,n,r,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(t,n,r){this._addListener(t,global.dailyJsToCallMachineEmitter,n,r,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(t,n,r){this._sendMessage(t,global.dailyJsToCallMachineEmitter,r,n,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(t,n){this._sendMessage(t,global.callMachineToDailyJsEmitter,n,null,"sending message to daily-js")}},{key:"removeListener",value:function(t){var n=this._wrappedListeners[t];n&&(global.callMachineToDailyJsEmitter.removeListener("message",n),global.dailyJsToCallMachineEmitter.removeListener("message",n),delete this._wrappedListeners[t])}},{key:"_addListener",value:function(t,n,r,i,o){var a=this,s=function(c){if(c.callClientId===r){if(c.callbackStamp&&a._messageCallbacks[c.callbackStamp]){var l=c.callbackStamp;a._messageCallbacks[l].call(i,c),delete a._messageCallbacks[l]}t.call(i,c)}};this._wrappedListeners[t]=s,n.addListener("message",s)}},{key:"_sendMessage",value:function(t,n,r,i,o){var a=(function(c){for(var l=1;l<arguments.length;l++){var d=arguments[l]!=null?arguments[l]:{};l%2?Vd(Object(d),!0).forEach((function(f){Mt(c,f,d[f])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):Vd(Object(d)).forEach((function(f){Object.defineProperty(c,f,Object.getOwnPropertyDescriptor(d,f))}))}return c})({},t);if(a.callClientId=r,i){var s=vi();this._messageCallbacks[s]=i,a.callbackStamp=s}n.emit("message",a)}}])})(),Ja="replace",qa="shallow-merge",Bd=[Ja,qa],Wb=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=r===void 0?Ja:r;it(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return ot(e,[{key:"isNoOp",value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(t,n){return Object.keys(t).length===0&&n===qa}},{key:"_validateMergeStrategy",value:function(t){if(!Bd.includes(t))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(Bd,"]"))}},{key:"_validateData",value:function(t,n){if(!(function(s){if(s==null||me(s)!=="object")return!1;var c=Object.getPrototypeOf(s);return c==null||c===Object.prototype})(t))throw Error("Meeting session data must be a plain (map-like) object");var r;try{if(r=JSON.stringify(t),n===Ja){var i=JSON.parse(r);Ke(i,t)||console.warn("The meeting session data provided will be modified when serialized.",i,t)}else if(n===qa){for(var o in t)if(Object.hasOwnProperty.call(t,o)&&t[o]!==void 0){var a=JSON.parse(JSON.stringify(t[o]));Ke(t[o],a)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",a,t[o])}}}catch(s){throw Error("Meeting session data must be serializable to JSON: ".concat(s))}if(r.length>kd)throw Error("Meeting session data is too large (".concat(r.length," characters). Maximum size suppported is ").concat(kd,"."))}}])})();function $d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return($d=function(){return!!e})()}function Ga(e){var t=typeof Map=="function"?new Map:void 0;return Ga=function(n){if(n===null||!(function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}})(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,r)}function r(){return(function(i,o,a){if($d())return Reflect.construct.apply(null,arguments);var s=[null];s.push.apply(s,o);var c=new(i.bind.apply(i,s));return a&&wr(c,a.prototype),c})(n,arguments,yt(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),wr(r,n)},Ga(e)}function Ud(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Ud=function(){return!!e})()}function zd(e){var t,n=(t=window._daily)===null||t===void 0?void 0:t.pendings;if(n){var r=n.indexOf(e);r!==-1&&n.splice(r,1)}}var Hb=(function(){return ot((function e(t){it(this,e),this._currentLoad=null,this._callClientId=t}),[{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(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Jb(n,(function(){r(!1)}),(function(o,a){a||zd(t._callClientId),i(o,a)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),zd(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}])})(),Jb=(function(){return ot((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;it(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}),[{key:"start",value:function(){var e=this;if(!this._currentAttempt){var t=function(n){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(n,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout((function(){e._currentAttempt.cancelled||(e._currentAttempt=new Wd(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())}),3e3))};this._currentAttempt=new Wd(this._dailyConfig,this._successCallback,t),this._currentAttempt.start()}}},{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}}])})(),Ka=(function(){function e(){return it(this,e),t=this,r=arguments,n=yt(n=e),hi(t,Ud()?Reflect.construct(n,r||[],yt(t).constructor):n.apply(t,r));var t,n,r}return pi(e,Ga(Error)),ot(e)})(),zi=2e4,Wd=(function(){return ot((function t(n,r,i){it(this,t),this._loadAttemptImpl=fe()||!n.avoidEval?new qb(n,r,i):new Gb(n,r,i)}),[{key:"start",value:(e=Q((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})(),qb=(function(){return ot((function i(o,a,s){it(this,i),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=typeof iOSCallObjectBundleCache<"u"&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=o,this._successCallback=a,this._failureCallback=s}),[{key:"start",value:(r=Q((function*(){var i=yi(this._dailyConfig);!(yield this._tryLoadFromIOSCache(i))&&this._loadFromNetwork(i)})),function(){return r.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(n=Q((function*(i){if(!this._iosCache)return!1;try{var o=yield this._iosCache.get(i);return!!this.cancelled||!!o&&(o.code?(Function('"use strict";'+o.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=o.refetchHeaders,!1))}catch{return!1}})),function(i){return n.apply(this,arguments)})},{key:"_loadFromNetwork",value:(t=Q((function*(i){var o=this;this._networkTimeout=setTimeout((function(){o._networkTimedOut=!0,o._failureCallback({msg:"Timed out (>".concat(zi," ms) when loading call object bundle ").concat(i),type:"timeout"})}),zi);try{var a=this._refetchHeaders?{headers:this._refetchHeaders}:{},s=yield fetch(i,a);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Ka;var c=yield this._getBundleCodeFromResponse(i,s);if(this.cancelled)throw new Ka;Function('"use strict";'+c)(),this._iosCache&&this._iosCache.set(i,c,s.headers),this.succeeded=!0,this._successCallback()}catch(l){if(clearTimeout(this._networkTimeout),l instanceof Ka||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(i,": ").concat(l),type:l.message})}})),function(i){return t.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=Q((function*(i,o){if(o.ok)return yield o.text();if(this._iosCache&&o.status===304)return(yield this._iosCache.renew(i,o.headers)).code;throw new Error("Received ".concat(o.status," response"))})),function(i,o){return e.apply(this,arguments)})}]);var e,t,n,r})(),Gb=(function(){return ot((function e(t,n,r){it(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=vi(),this._networkTimeout=null,this._scriptElement=null}),[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=yi(this._dailyConfig);(typeof document>"u"?"undefined":me(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 (>".concat(zi," ms) when loading call object bundle ").concat(e),type:"timeout"})}),zi);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(i){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(i.target.src),type:i.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)}}])})(),Wi=function(e,t,n){return Yb(e.local,t,n)===!0},Kb=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream["get".concat(n==="video"?"Video":"Audio","Tracks")]()[0]},Jn=function(e,t,n,r){var i=Xb(e,t,n,r);return i&&i.pendingTrack},Yb=function(e,t,n){if(!e)return!1;var r=function(o){switch(o){case"avatar":return!0;case"staged":return o;default:return!!o}},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)},Xb=function(e,t,n,r){var i=Object.values(e.streams||{}).filter((function(o){return o.participantId===t&&o.type===n&&o.pendingTrack&&o.pendingTrack.kind===r})).sort((function(o,a){return new Date(a.starttime)-new Date(o.starttime)}));return i&&i[0]},Qb=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function Hd(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];r<i.length;r++)for(var o=i[r],a=0,s=["video","audio"];a<s.length;a++){var c=s[a],l=o==="cam"?c:"screen".concat(c.charAt(0).toUpperCase()+c.slice(1)),d=e.tracks[l];if(d){var f=e.local?Kb(n,o,c):Jn(n,e.session_id,o,c);d.state==="playable"&&(d.track=f),d.persistentTrack=f}}}function Jd(e,t){try{var n=t.getState();for(var r in e.tracks)if(!Zb(r)){var i=e.tracks[r].kind;if(i){var o=e.tracks[r];if(o){var a=e.local?Qb(n,r):Jn(n,e.session_id,r,i);o.state==="playable"&&(e.tracks[r].track=a),o.persistentTrack=a}}else console.error("unknown type for custom track")}}catch(s){console.error(s)}}function Zb(e){return["video","audio","screenVideo","screenAudio"].includes(e)}function qd(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 o=r.participants[e.session_id];o&&o.public&&o.public.rtcType&&o.public.rtcType.impl==="peer-to-peer"&&o.private&&!["connected","completed"].includes(o.private.peeringState)&&(i=!1)}catch(d){console.error(d)}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&&Wi(r,e.session_id,"cam-audio")){var a=Jn(r,e.session_id,"cam","audio");a&&(t&&t.audioTrack&&t.audioTrack.id===a.id?e.audioTrack=a:a.muted||(e.audioTrack=a)),e.audioTrack||(e.audio=!1)}if(e.video&&Wi(r,e.session_id,"cam-video")){var s=Jn(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&&Wi(r,e.session_id,"screen-audio")){var c=Jn(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&&Wi(r,e.session_id,"screen-video")){var l=Jn(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(d){console.error("unexpected error matching up tracks",d)}}}function e0(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return Gd(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Gd(c,l):void 0}})(e))||t){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(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Gd(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 Ct=new Map,qn=null;function t0(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return Kd(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Kd(c,l):void 0}})(e))||t){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(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function Kd(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 Pt=new Map,Pr=null;function n0(e){Yd()?(function(t){Ct.has(t)||(Ct.set(t,{}),navigator.mediaDevices.enumerateDevices().then((function(n){Ct.has(t)&&(Ct.get(t).lastDevicesString=JSON.stringify(n),qn||(qn=(function(){var r=Q((function*(){var i,o=yield navigator.mediaDevices.enumerateDevices(),a=e0(Ct.keys());try{for(a.s();!(i=a.n()).done;){var s=i.value,c=JSON.stringify(o);c!==Ct.get(s).lastDevicesString&&(Ct.get(s).lastDevicesString=c,s(o))}}catch(l){a.e(l)}finally{a.f()}}));return function(){return r.apply(this,arguments)}})(),navigator.mediaDevices.addEventListener("devicechange",qn)))})).catch((function(){})))})(e):(function(t){Pt.has(t)||(Pt.set(t,{}),navigator.mediaDevices.enumerateDevices().then((function(n){Pt.has(t)&&(Pt.get(t).lastDevicesString=JSON.stringify(n),Pr||(Pr=setInterval(Q((function*(){var r,i=yield navigator.mediaDevices.enumerateDevices(),o=t0(Pt.keys());try{for(o.s();!(r=o.n()).done;){var a=r.value,s=JSON.stringify(i);s!==Pt.get(a).lastDevicesString&&(Pt.get(a).lastDevicesString=s,a(i))}}catch(c){o.e(c)}finally{o.f()}})),3e3)))})))})(e)}function r0(e){Yd()?(function(t){Ct.has(t)&&(Ct.delete(t),Ct.size===0&&qn&&(navigator.mediaDevices.removeEventListener("devicechange",qn),qn=null))})(e):(function(t){Pt.has(t)&&(Pt.delete(t),Pt.size===0&&Pr&&(clearInterval(Pr),Pr=null))})(e)}function Yd(){var e;return fe()||((e=navigator.mediaDevices)===null||e===void 0?void 0:e.ondevicechange)!==void 0}var i0=new Set;function o0(e,t){return e&&e.readyState==="live"&&!(function(n,r){return n.muted&&!i0.has(n.id)})(e)}function Xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xd(Object(n),!0).forEach((function(r){Mt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var Er=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),a0=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),Ar=Object.values(Er),Qd=["v","a","sv","sa","cv","ca"];Object.freeze(Ar.reduce((function(e,t,n){return e[t]=Qd[n],e}),{})),Object.freeze(Qd.reduce((function(e,t,n){return e[t]=Ar[n],e}),{}));var s0=[Er.VIDEO,Er.AUDIO,Er.SCREEN_VIDEO,Er.SCREEN_AUDIO],Zd=Object.values(a0),ef=["p","s","t"];Object.freeze(Zd.reduce((function(e,t,n){return e[t]=ef[n],e}),{})),Object.freeze(ef.reduce((function(e,t,n){return e[t]=Zd[n],e}),{}));var tf=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.base,r=t.byUserId,i=t.byParticipantId;it(this,e),this.base=n,this.byUserId=r,this.byParticipantId=i}return ot(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof Be?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 Be?r.clone():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var o=this.byParticipantId[i];t.byParticipantId[i]=o instanceof Be?o.clone():o}return t}},{key:"toJSONObject",value:function(){var t={};if(typeof this.base=="boolean"?t.base=this.base:this.base instanceof Be&&(t.base=this.base.toJSONObject()),this.byUserId!==void 0)for(var n in t.byUserId={},this.byUserId){var r=this.byUserId[n];t.byUserId[n]=r instanceof Be?r.toJSONObject():r}if(this.byParticipantId!==void 0)for(var i in t.byParticipantId={},this.byParticipantId){var o=this.byParticipantId[i];t.byParticipantId[i]=o instanceof Be?o.toJSONObject():o}return t}},{key:"toMinifiedJSONObject",value:function(){var t={};if(this.base!==void 0&&(typeof this.base=="boolean"?t.b=this.base:t.b=this.base.toMinifiedJSONObject()),this.byUserId!==void 0)for(var n in t.u={},this.byUserId){var r=this.byUserId[n];t.u[n]=typeof r=="boolean"?r:r.toMinifiedJSONObject()}if(this.byParticipantId!==void 0)for(var i in t.p={},this.byParticipantId){var o=this.byParticipantId[i];t.p[i]=typeof o=="boolean"?o:o.toMinifiedJSONObject()}return t}},{key:"normalize",value:function(){return this.base instanceof Be&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map((function(t){var n=ze(t,2),r=n[0],i=n[1];return[r,i instanceof Be?i.normalize():i]})))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map((function(t){var n=ze(t,2),r=n[0],i=n[1];return[r,i instanceof Be?i.normalize():i]})))),this}}],[{key:"fromJSONObject",value:function(t){var n,r,i;if(t.base!==void 0&&(n=typeof t.base=="boolean"?t.base:Be.fromJSONObject(t.base)),t.byUserId!==void 0)for(var o in r={},t.byUserId){var a=t.byUserId[o];r[o]=typeof a=="boolean"?a:Be.fromJSONObject(a)}if(t.byParticipantId!==void 0)for(var s in i={},t.byParticipantId){var c=t.byParticipantId[s];i[s]=typeof c=="boolean"?c:Be.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:Be.fromMinifiedJSONObject(t.b)),t.u!==void 0)for(var o in r={},t.u){var a=t.u[o];r[o]=typeof a=="boolean"?a:Be.fromMinifiedJSONObject(a)}if(t.p!==void 0)for(var s in i={},t.p){var c=t.p[s];i[s]=typeof c=="boolean"?c:Be.fromMinifiedJSONObject(c)}return new e({base:n,byUserId:r,byParticipantId:i})}},{key:"validateJSONObject",value:function(t){if(me(t)!=="object")return[!1,"canReceive must be an object"];for(var n=["base","byUserId","byParticipantId"],r=0,i=Object.keys(t);r<i.length;r++){var o=i[r];if(!n.includes(o))return[!1,"canReceive can only contain keys (".concat(n.join(", "),")")];if(o==="base"){var a=ze(Be.validateJSONObject(t.base,!0),2),s=a[0],c=a[1];if(!s)return[!1,c]}else{if(me(t[o])!=="object")return[!1,"invalid (non-object) value for field '".concat(o,"' in canReceive")];for(var l=0,d=Object.values(t[o]);l<d.length;l++){var f=d[l],m=ze(Be.validateJSONObject(f),2),g=m[0],y=m[1];if(!g)return[!1,y]}}}return[!0]}}])})(),Be=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.video,r=t.audio,i=t.screenVideo,o=t.screenAudio,a=t.customVideo,s=t.customAudio;it(this,e),this.video=n,this.audio=r,this.screenVideo=i,this.screenAudio=o,this.customVideo=a,this.customAudio=s}return ot(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=Yt({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=Yt({},this.customAudio)),t}},{key:"toJSONObject",value:function(){var t={};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=Yt({},this.customVideo)),this.customAudio!==void 0&&(t.customAudio=Yt({},this.customAudio)),t}},{key:"toMinifiedJSONObject",value:function(){var t={};return this.video!==void 0&&(t.v=this.video),this.audio!==void 0&&(t.a=this.audio),this.screenVideo!==void 0&&(t.sv=this.screenVideo),this.screenAudio!==void 0&&(t.sa=this.screenAudio),this.customVideo!==void 0&&(t.cv=Yt({},this.customVideo)),this.customAudio!==void 0&&(t.ca=Yt({},this.customAudio)),t}},{key:"normalize",value:function(){function t(n,r){return n&&Object.keys(n).length===1&&n["*"]===r}return!(this.video!==!0||this.audio!==!0||this.screenVideo!==!0||this.screenAudio!==!0||!t(this.customVideo,!0)||!t(this.customAudio,!0))||(this.video!==!1||this.audio!==!1||this.screenVideo!==!1||this.screenAudio!==!1||!t(this.customVideo,!1)||!t(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?Yt({},t.customVideo):void 0,customAudio:t.customAudio!==void 0?Yt({},t.customAudio):void 0})}},{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(t,n){if(typeof t=="boolean")return[!0];if(me(t)!=="object")return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var r=Object.keys(t),i=0,o=r;i<o.length;i++){var a=o[i];if(!Ar.includes(a))return[!1,"invalid media type '".concat(a,"' in canReceive")];if(s0.includes(a)){if(typeof t[a]!="boolean")return[!1,"invalid (non-boolean) value for media type '".concat(a,"' in canReceive")]}else{if(me(t[a])!=="object")return[!1,"invalid (non-object) value for media type '".concat(a,"' in canReceive")];for(var s=0,c=Object.values(t[a]);s<c.length;s++)if(typeof c[s]!="boolean")return[!1,"invalid (non-boolean) value for entry within '".concat(a,"' in canReceive")];if(n&&t[a]["*"]===void 0)return[!1,`canReceive "base" permission must specify "*" as an entry within '`.concat(a,"'")]}}return n&&r.length!==Ar.length?[!1,'canReceive "base" permission must specify all media types: '.concat(Ar.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])})(),c0=["result"],l0=["preserveIframe"];function nf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nf(Object(n),!0).forEach((function(r){Mt(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nf(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function rf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(rf=function(){return!!e})()}function of(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(function(c,l){if(c){if(typeof c=="string")return af(c,l);var d={}.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?af(c,l):void 0}})(e))||t){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(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return a=c.done,c},e:function(c){s=!0,o=c},f:function(){try{a||n.return==null||n.return()}finally{if(s)throw o}}}}function af(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 wn={},sf="video",u0="voice",cf=fe()?{data:{}}:{data:{},topology:"none"},lf={present:0,hidden:0},uf={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},Ya=Object.keys(uf),df=["state","volume","simulcastEncodings"],ff={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},Hi={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},Xa={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"}},kn={customIntegrations:{validate:kf,help:_f()},customTrayButtons:{validate:wf,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(Hi))},url:{validate:function(e){return typeof e=="string"},help:"url should be a string"},baseUrl:{validate:function(e){return 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(n){console.error("Failed to validate dailyConfig",n)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(e){return Sf(e,ff)},help:"reactNativeConfig should look like ".concat(JSON.stringify(ff),", all fields optional")},lang:{validate:function(e){return["da","de","en-us","en","es","fi","fr","it","jp","ka","nl","no","pl","pt","pt-BR","ru","sv","tr","user"].includes(e)},help:"language not supported. Options are: da, de, en-us, en, es, fi, fr, it, jp, ka, nl, no, pl, pt, pt-BR, ru, sv, tr, user"},userName:!0,userData:{validate:function(e){try{return pf(e),!0}catch(t){return console.error(t),!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:Ft};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:Ft};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(r){for(var i=0,o=Object.keys(r);i<o.length;i++){var a=o[i];if(!t.includes(a))return console.error('unsupported color "'.concat(a,'". Valid colors: ').concat(t.join(", "))),!1;if(!r[a].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(a,' theme color should be provided in valid hex color format. Received: "').concat(r[a],'"')),!1}return!0};return me(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 ".concat(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 ".concat(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 mf(e,{allowAllParticipantsKey:!1})},help:bf({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!(function(n,r){try{return r.validateUpdateSendSettings(n),!0}catch(i){return console.error("Failed to validate send settings",i),!1}})(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var n;return!!gf(e)&&(t._inputSettings||(t._inputSettings={}),vf(e,(n=t.properties)===null||n===void 0?void 0:n.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:es()},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"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},Ji={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)||!fe()&&e==="avatar")return!0;var r=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(o){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];for(var s in o)if(s==="custom"){if(!n.includes(o[s])&&!i(o[s],!0))return!1}else{var c=!a&&!r.includes(s),l=!n.includes(o[s]);if(c||l)return!1}return!0};return i(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(fe()?"":" | '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 e===!1},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=ze(n[t],2),i=r[0],o=r[1];switch(i){case"hasPresence":if(typeof o!="boolean")return!1;break;case"canSend":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var a,s=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],c=of(o);try{for(c.s();!(a=c.n()).done;){var l=a.value;if(!s.includes(l))return!1}}catch(_){c.e(_)}finally{c.f()}}else if(typeof o!="boolean")return!1;(o instanceof Array||Array.isArray(o))&&(e.canSend=new Set(o));break;case"canReceive":var d=ze(tf.validateJSONObject(o),2),f=d[0],m=d[1];if(!f)return console.error(m),!1;break;case"canAdmin":if(o instanceof Set||o instanceof Array||Array.isArray(o)){var g,y=["participants","streaming","transcription"],v=of(o);try{for(v.s();!(g=v.n()).done;){var b=g.value;if(!y.includes(b))return!1}}catch(_){v.e(_)}finally{v.f()}}else if(typeof o!="boolean")return!1;(o instanceof Array||Array.isArray(o))&&(e.canAdmin=new Set(o));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=Q((function*(t){return new Promise((function(n,r){var i=[];t.forEach((function(o){return Promise.resolve(o).then((function(a){n(a)})).catch((function(a){i.push(a),i.length===t.length&&r(i)}))}))}))}));return function(t){return e.apply(this,arguments)}})());var Or=(function(){function e(u){var p,h,w,k,P,D,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(it(this,e),w=this,k=yt(k=e),Mt(h=hi(w,rf()?Reflect.construct(k,[],yt(w).constructor):k.apply(w,P)),"startListeningForDeviceChanges",(function(){n0(h.handleDeviceChange)})),Mt(h,"stopListeningForDeviceChanges",(function(){r0(h.handleDeviceChange)})),Mt(h,"handleDeviceChange",(function(G){G=G.map((function(ue){return JSON.parse(JSON.stringify(ue))})),h.emitDailyJSEvent({action:"available-devices-updated",availableDevices:G})})),Mt(h,"handleNativeAppStateChange",(function(){var G=Q((function*(ue){if(ue==="destroyed")return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield h.destroy());var nt=ue==="active";h.disableReactNativeAutoDeviceManagement("video")||(nt?h.camUnmutedBeforeLosingNativeActiveState&&h.setLocalVideo(!0):(h.camUnmutedBeforeLosingNativeActiveState=h.localVideo(),h.camUnmutedBeforeLosingNativeActiveState&&h.setLocalVideo(!1)))}));return function(ue){return G.apply(this,arguments)}})()),Mt(h,"handleNativeAudioFocusChange",(function(G){h.disableReactNativeAutoDeviceManagement("audio")||(h._hasNativeAudioFocus=G,h.toggleParticipantAudioBasedOnNativeAudioFocus(),h._hasNativeAudioFocus?h.micUnmutedBeforeLosingNativeAudioFocus&&h.setLocalAudio(!0):(h.micUnmutedBeforeLosingNativeAudioFocus=h.localAudio(),h.setLocalAudio(!1)))})),Mt(h,"handleNativeSystemScreenCaptureStop",(function(){h.stopScreenShare()})),!$a()&&!fe())throw new Error("WebRTC not supported or suppressed");if(h.strictMode=I.strictMode===void 0||I.strictMode,h.allowMultipleCallInstances=(p=I.allowMultipleCallInstances)!==null&&p!==void 0&&p,Object.keys(wn).length&&(h._logDuplicateInstanceAttempt(),!h.allowMultipleCallInstances)){if(h.strictMode)throw new 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:{}}),h.callClientId=vi(),wn[(D=h).callClientId]=D,window._daily.instances[h.callClientId]={},h._sharedTracks={},window._daily.instances[h.callClientId].tracks=h._sharedTracks,I.dailyJsVersion=e.version(),h._iframe=u,h._callObjectMode=I.layout==="none"&&!h._iframe,h._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},I.showLocalVideo!==void 0?h._callObjectMode?console.error("showLocalVideo is not available in call object mode"):h._showLocalVideo=!!I.showLocalVideo:h._showLocalVideo=!0,I.showParticipantsBar!==void 0?h._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):h._showParticipantsBar=!!I.showParticipantsBar:h._showParticipantsBar=!0,I.customIntegrations!==void 0?h._callObjectMode?console.error("customIntegrations is not available in call object mode"):h._customIntegrations=I.customIntegrations:h._customIntegrations={},I.customTrayButtons!==void 0?h._callObjectMode?console.error("customTrayButtons is not available in call object mode"):h._customTrayButtons=I.customTrayButtons:h._customTrayButtons={},I.activeSpeakerMode!==void 0?h._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):h._activeSpeakerMode=!!I.activeSpeakerMode:h._activeSpeakerMode=!1,I.receiveSettings?h._callObjectMode?h._receiveSettings=I.receiveSettings:console.error("receiveSettings is only available in call object mode"):h._receiveSettings={},h.validateProperties(I),h.properties=H({},I),h._inputSettings||(h._inputSettings={}),h._callObjectLoader=h._callObjectMode?new Hb(h.callClientId):null,h._callState=fd,h._isPreparingToJoin=!1,h._accessState={access:ja},h._meetingSessionSummary={},h._finalSummaryOfPrevSession={},h._meetingSessionState=ts(cf,h._callObjectMode),h._nativeInCallAudioMode=sf,h._participants={},h._isScreenSharing=!1,h._participantCounts=lf,h._rmpPlayerState={},h._waitingParticipants={},h._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},h._activeSpeaker={},h._localAudioLevel=0,h._isLocalAudioLevelObserverRunning=!1,h._remoteParticipantsAudioLevel={},h._isRemoteParticipantsAudioLevelObserverRunning=!1,h._maxAppMessageSize=Ra,h._messageChannel=fe()?new zb:new Ub,h._iframe&&(h._iframe.requestFullscreen?h._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===h._iframe?(h.emitDailyJSEvent({action:Vi}),h.sendMessageToCallMachine({action:Vi})):(h.emitDailyJSEvent({action:Fi}),h.sendMessageToCallMachine({action:Fi}))})):h._iframe.webkitRequestFullscreen&&h._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===h._iframe?(h.emitDailyJSEvent({action:Vi}),h.sendMessageToCallMachine({action:Vi})):(h.emitDailyJSEvent({action:Fi}),h.sendMessageToCallMachine({action:Fi}))}))),fe()){var F=h.nativeUtils();F.addAudioFocusChangeListener&&F.removeAudioFocusChangeListener&&F.addAppStateChangeListener&&F.removeAppStateChangeListener&&F.addSystemScreenCaptureStopListener&&F.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),h._hasNativeAudioFocus=!0,F.addAudioFocusChangeListener(h.handleNativeAudioFocusChange),F.addAppStateChangeListener(h.handleNativeAppStateChange),F.addSystemScreenCaptureStopListener(h.handleNativeSystemScreenCaptureStop)}return h._callObjectMode&&h.startListeningForDeviceChanges(),h._messageChannel.addListenerForMessagesFromCallMachine(h.handleMessageFromCallMachine,h.callClientId,h),h}return pi(e,gi),ot(e,[{key:"destroy",value:(le=Q((function*(){var u;try{yield this.leave()}catch{}var p=this._iframe;if(p){var h=p.parentElement;h&&h.removeChild(p)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),fe()){var w=this.nativeUtils();w.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),w.removeAppStateChangeListener(this.handleNativeAppStateChange),w.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete wn[this.callClientId],!((u=window)===null||u===void 0||(u=u._daily)===null||u===void 0)&&u.instances&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)})),function(){return le.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(u){var p=u.bodyClass,h=u.cssFile,w=u.cssText;return he(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(h),bodyClass:p,cssText:w}),this}},{key:"iframe",value:function(){return he(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return wt(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return wt(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(u,p){for(var h in p){if(!Ji[h])throw new Error("unrecognized updateParticipant property ".concat(h));if(Ji[h].validate&&!Ji[h].validate(p[h],this,this._participants[u]))throw new Error(Ji[h].help)}}},{key:"updateParticipant",value:function(u,p){return this._participants.local&&this._participants.local.session_id===u&&(u="local"),u&&p&&(this.validateParticipantProperties(u,p),this.sendMessageToCallMachine({action:"update-participant",id:u,properties:p})),this}},{key:"updateParticipants",value:function(u){var p=this._participants.local&&this._participants.local.session_id;for(var h in u)h===p&&(h="local"),h&&u[h]&&this.validateParticipantProperties(h,u[h]);return this.sendMessageToCallMachine({action:"update-participants",participants:u}),this}},{key:"updateWaitingParticipant",value:(ie=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(wt(this._callObjectMode,"updateWaitingParticipant()"),_e(this._callState,"updateWaitingParticipant()"),typeof p!="string"||me(h)!=="object")throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise((function(w,k){u.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:p,updates:h},(function(P){P.error&&k(P.error),P.id||k(new Error("unknown error in updateWaitingParticipant()")),w({id:P.id})}))}))})),function(){return ie.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(U=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wt(this._callObjectMode,"updateWaitingParticipants()"),_e(this._callState,"updateWaitingParticipants()"),me(p)!=="object")throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise((function(h,w){u.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:p},(function(k){k.error&&w(k.error),k.ids||w(new Error("unknown error in updateWaitingParticipants()")),h({ids:k.ids})}))}))})),function(){return U.apply(this,arguments)})},{key:"requestAccess",value:($=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=p.access,w=h===void 0?{level:Ny}:h,k=p.name,P=k===void 0?"":k;return wt(this._callObjectMode,"requestAccess()"),_e(this._callState,"requestAccess()"),new Promise((function(D,I){u.sendMessageToCallMachine({action:"daily-method-request-access",access:w,name:P},(function(F){F.error&&I(F.error),F.access||I(new Error("unknown error in requestAccess()")),D({access:F.access,granted:F.granted})}))}))})),function(){return $.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(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return"forceDiscardTrack"in p&&(fe()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),p={}):u&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),p={})),this.sendMessageToCallMachine({action:"local-audio",state:u,options:p}),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(u){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:u}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(u){return this.sendMessageToCallMachine({action:"local-video",state:u}),this}},{key:"_setAllowLocalAudio",value:function(u){if(this._preloadCache.allowLocalAudio=u,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:u}),this}},{key:"_setAllowLocalVideo",value:function(u){if(this._preloadCache.allowLocalVideo=u,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:u}),this}},{key:"getReceiveSettings",value:(K=Q((function*(u){var p=this,h=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).showInheritedValues,w=h!==void 0&&h;if(wt(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(me(u)){case"string":return new Promise((function(k){p.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:u,showInheritedValues:w},(function(P){k(P.receiveSettings)}))}));case"undefined":return this._receiveSettings;default:throw new Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}})),function(u){return K.apply(this,arguments)})},{key:"updateReceiveSettings",value:(W=Q((function*(u){var p=this;if(wt(this._callObjectMode,"updateReceiveSettings()"),!mf(u,{allowAllParticipantsKey:!0}))throw new Error(bf({allowAllParticipantsKey:!0}));return _e(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise((function(h){p.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:u},(function(w){h({receiveSettings:w.receiveSettings})}))}))})),function(u){return W.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(u,p){if(u){var h={};if(u.audio){var w,k,P;u.audio.settings&&(!Object.keys(u.audio.settings).length&&p||(h.audio={settings:H({},u.audio.settings)})),p&&(w=h.audio)!==null&&w!==void 0&&(w=w.settings)!==null&&w!==void 0&&w.customTrack&&(h.audio.settings={customTrack:this._sharedTracks.audioTrack});var D=((k=u.audio.processor)===null||k===void 0?void 0:k.type)==="none"&&((P=u.audio.processor)===null||P===void 0?void 0:P._isDefaultWhenNone);if(u.audio.processor&&!D){var I=H({},u.audio.processor);delete I._isDefaultWhenNone,h.audio=H(H({},h.audio),{},{processor:I})}}if(u.video){var F,G,ue;u.video.settings&&(!Object.keys(u.video.settings).length&&p||(h.video={settings:H({},u.video.settings)})),p&&(F=h.video)!==null&&F!==void 0&&(F=F.settings)!==null&&F!==void 0&&F.customTrack&&(h.video.settings={customTrack:this._sharedTracks.videoTrack});var nt=((G=u.video.processor)===null||G===void 0?void 0:G.type)==="none"&&((ue=u.video.processor)===null||ue===void 0?void 0:ue._isDefaultWhenNone);if(u.video.processor&&!nt){var Dt=H({},u.video.processor);delete Dt._isDefaultWhenNone,h.video=H(H({},h.video),{},{processor:Dt})}}return h}}},{key:"getInputSettings",value:function(){var u=this;return he(),new Promise((function(p){p(u._getInputSettings())}))}},{key:"_getInputSettings",value:function(){var u,p,h,w,k,P,D={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(u=((h=this._inputSettings)===null||h===void 0?void 0:h.video)||D,p=((w=this._inputSettings)===null||w===void 0?void 0:w.audio)||D):(u=((k=this._preloadCache)===null||k===void 0||(k=k.inputSettings)===null||k===void 0?void 0:k.video)||D,p=((P=this._preloadCache)===null||P===void 0||(P=P.inputSettings)===null||P===void 0?void 0:P.audio)||D);var I={audio:p,video:u};return this._prepInputSettingsForSharing(I,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(u,p){var h=this._inputSettings||{},w={};if(u.video){var k,P,D;w.video={},u.video.settings?(w.video.settings={},p||u.video.settings.customTrack||(D=h.video)===null||D===void 0||!D.settings?w.video.settings=u.video.settings:w.video.settings=H(H({},h.video.settings),u.video.settings),Object.keys(w.video.settings).length||delete w.video.settings):(k=h.video)!==null&&k!==void 0&&k.settings&&(w.video.settings=h.video.settings),u.video.processor?w.video.processor=u.video.processor:(P=h.video)!==null&&P!==void 0&&P.processor&&(w.video.processor=h.video.processor)}else h.video&&(w.video=h.video);if(u.audio){var I,F,G;w.audio={},u.audio.settings?(w.audio.settings={},p||u.audio.settings.customTrack||(G=h.audio)===null||G===void 0||!G.settings?w.audio.settings=u.audio.settings:w.audio.settings=H(H({},h.audio.settings),u.audio.settings),Object.keys(w.audio.settings).length||delete w.audio.settings):(I=h.audio)!==null&&I!==void 0&&I.settings&&(w.audio.settings=h.audio.settings),u.audio.processor?w.audio.processor=u.audio.processor:(F=h.audio)!==null&&F!==void 0&&F.processor&&(w.audio.processor=h.audio.processor)}else h.audio&&(w.audio=h.audio);this._maybeUpdateInputSettings(w)}},{key:"_devicesFromInputSettings",value:function(u){var p,h,w=(u==null||(p=u.video)===null||p===void 0||(p=p.settings)===null||p===void 0?void 0:p.deviceId)||null,k=(u==null||(h=u.audio)===null||h===void 0||(h=h.settings)===null||h===void 0?void 0:h.deviceId)||null,P=this._preloadCache.outputDeviceId||null;return{camera:w?{deviceId:w}:{},mic:k?{deviceId:k}:{},speaker:P?{deviceId:P}:{}}}},{key:"updateInputSettings",value:(Z=Q((function*(u){var p=this;return he(),gf(u)?u.video||u.audio?(vf(u,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(u,!0),this._getInputSettings()):new Promise((function(h,w){p.sendMessageToCallMachine({action:"update-input-settings",inputSettings:u},(function(k){if(k.error)w(k.error);else{if(k.returnPreloadCache)return p._updatePreloadCacheInputSettings(u,!0),void h(p._getInputSettings());p._maybeUpdateInputSettings(k.inputSettings),h(p._prepInputSettingsForSharing(k.inputSettings,!0))}}))}))):this._getInputSettings():(console.error(es()),Promise.reject(es()))})),function(u){return Z.apply(this,arguments)})},{key:"setBandwidth",value:function(u){var p=u.kbs,h=u.trackConstraints;if(he(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:p,trackConstraints:h}),this}},{key:"getDailyLang",value:function(){var u=this;if(he(),this._callMachineInitialized)return new Promise((function(p){u.sendMessageToCallMachine({action:"get-daily-lang"},(function(h){delete h.action,delete h.callbackStamp,p(h)}))}))}},{key:"setDailyLang",value:function(u){return he(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:u}),this}},{key:"setProxyUrl",value:function(u){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:u}),this}},{key:"setIceConfig",value:function(u){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:u}),this}},{key:"meetingSessionSummary",value:function(){return[bn,Kt].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(X=Q((function*(){var u=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),_e(this._callState,"getMeetingSession()"),new Promise((function(p){u.sendMessageToCallMachine({action:"get-meeting-session"},(function(h){delete h.action,delete h.callbackStamp,p(h)}))}))})),function(){return X.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return _e(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"replace";wt(this._callObjectMode,"setMeetingSessionData()"),_e(this._callState,"setMeetingSessionData");try{(function(h,w){new Wb({data:h,mergeStrategy:w})})(u,p)}catch(h){throw console.error(h),h}try{this.sendMessageToCallMachine({action:"set-session-data",data:u,mergeStrategy:p})}catch(h){throw new Error("Error setting meeting session data: ".concat(h))}}},{key:"setUserName",value:function(u,p){var h=this;return this.properties.userName=u,new Promise((function(w){h.sendMessageToCallMachine({action:"set-user-name",name:u??"",thisMeetingOnly:fe()||!!p&&!!p.thisMeetingOnly},(function(k){delete k.action,delete k.callbackStamp,w(k)}))}))}},{key:"setUserData",value:(ee=Q((function*(u){var p=this;try{pf(u)}catch(h){throw console.error(h),h}if(this.properties.userData=u,this._callMachineInitialized)return new Promise((function(h){try{p.sendMessageToCallMachine({action:"set-user-data",userData:u},(function(w){delete w.action,delete w.callbackStamp,h(w)}))}catch(w){throw new Error("Error setting user data: ".concat(w))}}))})),function(u){return ee.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(u){if(u&&(u<100||typeof u!="number"))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(u){var p=this;if(typeof AudioWorkletNode>"u"&&!fe())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(u),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(h,w){p.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:u},(function(k){p._isLocalAudioLevelObserverRunning=!k.error,k.error?w({error:k.error}):h()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:u}}},{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(u){var p=this;if(this.validateAudioLevelInterval(u),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(h,w){p.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:u},(function(k){p._isRemoteParticipantsAudioLevelObserverRunning=!k.error,k.error?w({error:k.error}):h()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:u}}},{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:(R=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wt(this._callObjectMode,"startCamera()"),Qa(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(p)}catch(h){return Promise.reject(h)}else{if(this._didPreAuth){if(p.url&&p.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(p.token&&p.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(p),this.properties=H(H({},this.properties),p)}return new Promise((function(h){u._preloadCache.inputSettings=u._prepInputSettingsForSharing(u._inputSettings,!1),u.sendMessageToCallMachine({action:"start-camera",properties:Gn(u.properties,u.callClientId),preloadCache:Gn(u._preloadCache,u.callClientId)},(function(w){h({camera:w.camera,mic:w.mic,speaker:w.speaker})}))}))})),function(){return R.apply(this,arguments)})},{key:"validateCustomTrack",value:function(u,p,h){if(h&&h.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(p&&p!=="music"&&p!=="speech"&&!(p instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(h&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(h))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(u instanceof MediaStreamTrack))throw new Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{track,mode,trackName,ignoreAudioLevel};return he(),_e(this._callState,"startCustomTrack()"),this.validateCustomTrack(p.track,p.mode,p.trackName),new Promise((function(h,w){u._sharedTracks.customTrack=p.track,p.track=Ft,u.sendMessageToCallMachine({action:"start-custom-track",properties:p},(function(k){k.error?w({error:k.error}):h(k.mediaTag)}))}))}},{key:"stopCustomTrack",value:function(u){var p=this;return he(),_e(this._callState,"stopCustomTrack()"),new Promise((function(h){p.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:u},(function(w){h(w.mediaTag)}))}))}},{key:"setCamera",value:function(u){var p=this;return Ir(),Gi(this._callMachineInitialized,"setCamera()"),new Promise((function(h){p.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:u},(function(w){h({device:w.device})}))}))}},{key:"setAudioDevice",value:(z=Q((function*(u){return Ir(),this.nativeUtils().setAudioDevice(u),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(u){return z.apply(this,arguments)})},{key:"cycleCamera",value:function(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Promise((function(h){u.sendMessageToCallMachine({action:"cycle-camera",properties:p},(function(w){h({device:w.device})}))}))}},{key:"cycleMic",value:function(){var u=this;return he(),new Promise((function(p){u.sendMessageToCallMachine({action:"cycle-mic"},(function(h){p({device:h.device})}))}))}},{key:"getCameraFacingMode",value:function(){var u=this;return Ir(),new Promise((function(p){u.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(h){p(h.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(N=Q((function*(u){var p=this,h=u.audioDeviceId,w=u.videoDeviceId,k=u.audioSource,P=u.videoSource;if(he(),k!==void 0&&(h=k),P!==void 0&&(w=P),typeof h=="boolean"&&(this._setAllowLocalAudio(h),h=void 0),typeof w=="boolean"&&(this._setAllowLocalVideo(w),w=void 0),!h&&!w)return yield this.getInputDevices();var D={};return h&&(h instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=h,h=Ft,D.audio={settings:{customTrack:h}}):(delete this._sharedTracks.audioTrack,D.audio={settings:{deviceId:h}})),w&&(w instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=w,w=Ft,D.video={settings:{customTrack:w}}):(delete this._sharedTracks.videoTrack,D.video={settings:{deviceId:w}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(D,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise((function(I){p.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:h,videoDeviceId:w},(function(F){if(delete F.action,delete F.callbackStamp,F.returnPreloadCache)return p._updatePreloadCacheInputSettings(D,!1),void I(p._devicesFromInputSettings(p._inputSettings));I(F)}))}))})),function(u){return N.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(B=Q((function*(u){var p=this,h=u.outputDeviceId;if(he(),!h||typeof h!="string")throw new Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=h,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(w,k){p.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:h},(function(P){if(delete P.action,delete P.callbackStamp,P.error){var D=new Error(P.error.message);return D.type=P.error.type,void k(D)}P.returnPreloadCache?w(p._devicesFromInputSettings(p._inputSettings)):w(P)}))}))})),function(u){return B.apply(this,arguments)})},{key:"getInputDevices",value:(V=Q((function*(){var u=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise((function(p){u.sendMessageToCallMachine({action:"get-input-devices"},(function(h){h.returnPreloadCache?p(u._devicesFromInputSettings(u._inputSettings)):p({camera:h.camera,mic:h.mic,speaker:h.speaker})}))}))})),function(){return V.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return Ir(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(u){if(Ir(),[sf,u0].includes(u)){if(u!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=u,!this.disableReactNativeAutoDeviceManagement("audio")&&qi(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",u)}},{key:"preAuth",value:(O=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(wt(this._callObjectMode,"preAuth()"),Qa(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(p)),!p.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(p),this.properties=H(H({},this.properties),p),new Promise((function(h,w){u._preloadCache.inputSettings=u._prepInputSettingsForSharing(u._inputSettings,!1),u.sendMessageToCallMachine({action:"daily-method-preauth",properties:Gn(u.properties,u.callClientId),preloadCache:Gn(u._preloadCache,u.callClientId)},(function(k){return k.error?w(k.error):k.access?(u._didPreAuth=!0,void h({access:k.access})):w(new Error("unknown error in preAuth()"))}))}))})),function(){return O.apply(this,arguments)})},{key:"load",value:(E=Q((function*(u){var p=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(u&&(this.validateProperties(u),this.properties=H(H({},this.properties),u)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(hd),this.emitDailyJSEvent({action:Wy}),this._callObjectMode?new Promise((function(h,w){p._callObjectLoader.cancel();var k=Date.now();p._callObjectLoader.load(p.properties.dailyConfig,(function(P){p._bundleLoadTime=P?"no-op":Date.now()-k,p._updateCallState(pd),P&&p.emitDailyJSEvent({action:gd}),h()}),(function(P,D){if(p.emitDailyJSEvent({action:Hy}),!D){p._updateCallState(Kt),p.resetMeetingDependentVars();var I={action:wd,errorMsg:P.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:P,bundleUrl:yi(p.properties.dailyConfig)}}};p._maybeSendToSentry(I),p.emitDailyJSEvent(I),w(P.msg)}}))})):(this._iframe.src=Zl(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(h,w){p._loadedCallback=function(k){p._callState!==Kt?(p._updateCallState(pd),(p.properties.cssFile||p.properties.cssText)&&p.loadCss(p.properties),h()):w(k)}})))}})),function(u){return E.apply(this,arguments)})},{key:"join",value:(C=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var h=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(p)}catch(w){return this.updateIsPreparingToJoin(!1),Promise.reject(w)}}else{if(h=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(p.url&&p.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(p.token&&p.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(p.url&&!this._callObjectMode&&p.url&&p.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(p.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(p),this.properties=H(H({},this.properties),p)}return p.showLocalVideo!==void 0&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!p.showLocalVideo),p.showParticipantsBar!==void 0&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!p.showParticipantsBar),this._callState===yn||this._callState===La?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(La,!1),this.emitDailyJSEvent({action:Gy}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:Gn(this.properties,this.callClientId),preloadCache:Gn(this._preloadCache,this.callClientId)}),new Promise((function(w,k){u._joinedCallback=function(P,D){if(u._callState!==Kt){if(u._updateCallState(yn),P)for(var I in P){if(u._callObjectMode){var F=u._callMachine().store;Hd(P[I],F),Jd(P[I],F),qd(P[I],u._participants[I],F)}u._participants[I]=H({},P[I]),u.toggleParticipantAudioBasedOnNativeAudioFocus()}h&&u.loadCss(u.properties),w(P)}else k(D)}})))})),function(){return C.apply(this,arguments)})},{key:"leave",value:(x=Q((function*(){var u=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(p){u._callState===bn||u._callState===Kt?p():u._callObjectLoader&&!u._callObjectLoader.loaded?(u._callObjectLoader.cancel(),u._updateCallState(bn),u.resetMeetingDependentVars(),u.emitDailyJSEvent({action:bn}),p()):(u._resolveLeave=p,u.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return x.apply(this,arguments)})},{key:"startScreenShare",value:(M=Q((function*(){var u=this,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Gi(this._callMachineInitialized,"startScreenShare()"),p.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",p.screenVideoSendSettings),p.mediaStream&&(this._sharedTracks.screenMediaStream=p.mediaStream,p.mediaStream=Ft),typeof DailyNativeUtils<"u"&&DailyNativeUtils.isIOS!==void 0&&DailyNativeUtils.isIOS){var h=this.nativeUtils();if(yield h.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:_d,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});h.setSystemScreenCaptureStartCallback((function(){h.setSystemScreenCaptureStartCallback(null),u.sendMessageToCallMachine({action:Sd,captureOptions:p})})),h.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:Sd,captureOptions:p})})),function(){return M.apply(this,arguments)})},{key:"stopScreenShare",value:function(){Gi(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=u.type;if(p&&p!=="cloud"&&p!=="raw-tracks"&&p!=="local")throw new Error("invalid type: ".concat(p,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(H({action:"local-recording-start"},u))}},{key:"updateRecording",value:function(u){var p=u.layout,h=p===void 0?{preset:"default"}:p,w=u.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:h,instanceId:w})}},{key:"stopRecording",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(H({action:"local-recording-stop"},u))}},{key:"startLiveStreaming",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(H({action:"daily-method-start-live-streaming"},u))}},{key:"updateLiveStreaming",value:function(u){var p=u.layout,h=p===void 0?{preset:"default"}:p,w=u.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:h,instanceId:w})}},{key:"addLiveStreamingEndpoints",value:function(u){var p=u.endpoints,h=u.instanceId;this.sendMessageToCallMachine({action:xd,endpointsOp:Rb,endpoints:p,instanceId:h})}},{key:"removeLiveStreamingEndpoints",value:function(u){var p=u.endpoints,h=u.instanceId;this.sendMessageToCallMachine({action:xd,endpointsOp:Nb,endpoints:p,instanceId:h})}},{key:"stopLiveStreaming",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.sendMessageToCallMachine(H({action:"daily-method-stop-live-streaming"},u))}},{key:"validateDailyConfig",value:function(u){u.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(u.camSimulcastEncodings)),u.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),Od()&&u.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,h=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(u){if(!(u instanceof Array||Array.isArray(u)))throw new Error("encodings must be an Array");if(!Mf(u.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var w=0;w<u.length;w++){var k=u[w];for(var P in this._validateEncodingLayerHasValidProperties(k),k)if(Ya.includes(P)){if(typeof k[P]!="number")throw new Error("".concat(P," must be a number"));if(p){var D=p[P],I=D.min,F=D.max;if(!Mf(k[P],I,F))throw new Error("".concat(P," value not in range. valid range: ").concat(I," to ").concat(F))}}else if(!["active","scalabilityMode"].includes(P))throw new Error("Invalid key ".concat(P,", valid keys are:")+Object.values(Ya));if(h&&!k.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(T=Q((function*(u){var p=this,h=u.url,w=u.settings,k=w===void 0?{state:Va.PLAY}:w;try{(function(P){if(typeof P!="string")throw new Error('url parameter must be "string" type')})(h),Tf(k),(function(P){for(var D in P)if(!df.includes(D))throw new Error("Invalid key ".concat(D,", valid keys are: ").concat(df));P.simulcastEncodings&&this.validateSimulcastEncodings(P.simulcastEncodings,uf,!0)})(k)}catch(P){throw console.error("invalid argument Error: ".concat(P)),console.error(`startRemoteMediaPlayer arguments must be of the form:
21
21
  { url: "playback url",
22
22
  settings?:
23
23
  {state: "play"|"pause", simulcastEncodings?: [{}] } }`),P}return new Promise((function(P,D){p.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:h,settings:k},(function(I){I.error?D({error:I.error,errorMsg:I.errorMsg}):P({session_id:I.session_id,remoteMediaPlayerState:{state:I.state,settings:I.settings}})}))}))})),function(u){return T.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(S=Q((function*(u){var p=this;if(typeof u!="string")throw new Error(" remotePlayerID must be of type string");return new Promise((function(h,w){p.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:u},(function(k){k.error?w({error:k.error,errorMsg:k.errorMsg}):h()}))}))})),function(u){return S.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(_=Q((function*(u){var p=this,h=u.session_id,w=u.settings;try{Tf(w)}catch(k){throw console.error("invalid argument Error: ".concat(k)),console.error(`updateRemoteMediaPlayer arguments must be of the form:
24
24
  session_id: "participant session",
25
- { settings?: {state: "play"|"pause"} }`),k}return new Promise((function(k,P){p.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:h,settings:w},(function(D){D.error?P({error:D.error,errorMsg:D.errorMsg}):k({session_id:D.session_id,remoteMediaPlayerState:{state:D.state,settings:D.settings}})}))}))})),function(u){return _.apply(this,arguments)})},{key:"startTranscription",value:function(u){_e(this._callState,"startTranscription()"),this.sendMessageToCallMachine(H({action:"daily-method-start-transcription"},u))}},{key:"updateTranscription",value:function(u){if(_e(this._callState,"updateTranscription()"),!u)throw new Error("updateTranscription Error: options is mandatory");if(me(u)!=="object")throw new Error("updateTranscription Error: options must be object type");if(u.participants&&!Array.isArray(u.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(H({action:"daily-method-update-transcription"},u))}},{key:"stopTranscription",value:function(u){if(_e(this._callState,"stopTranscription()"),u&&me(u)!=="object")throw new Error("stopTranscription Error: options must be object type");if(u&&!u.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(H({action:"daily-method-stop-transcription"},u))}},{key:"startDialOut",value:(b=Q((function*(u){var p=this;_e(this._callState,"startDialOut()");var h=function(D){if(D){if(!Array.isArray(D))throw new Error("Error starting dial out: audio codec must be an array");if(D.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");D.forEach((function(I){if(typeof I!="string")throw new Error("Error starting dial out: audio codec must be a string");if(I!=="OPUS"&&I!=="PCMU"&&I!=="PCMA"&&I!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")}))}};if(!u.sipUri&&!u.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(u.sipUri&&u.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(u.sipUri){if(typeof u.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!u.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(u.video&&typeof u.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(D){if(D&&(h(D.audio),D.video)){if(!Array.isArray(D.video))throw new Error("Error starting dial out: video codec must be an array");if(D.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");D.video.forEach((function(I){if(typeof I!="string")throw new Error("Error starting dial out: video codec must be a string");if(I!=="H264"&&I!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")}))}})(u.codecs)}if(u.phoneNumber){if(typeof u.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(u.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");u.codecs&&h(u.codecs.audio)}if(u.callerId){if(typeof u.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(u.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(u.displayName){if(typeof u.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(u.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(u.userId){if(typeof u.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(u.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}if(hf(u),u.permissions&&u.permissions.canReceive){var w=ze(tf.validateJSONObject(u.permissions.canReceive),2),k=w[0],P=w[1];if(!k)throw new Error(P)}if(u.provider){if(u.provider!=="daily")throw new Error("Error: provider can be set only to 'daily', got: ".concat(u.provider));if(u.phoneNumber)throw new Error("Error starting dial out: provider valid only for sipUri, not phoneNumber");console.warn("(pre-beta) provider=daily is currently in pre-beta, things might break!")}return new Promise((function(D,I){p.sendMessageToCallMachine(H({action:"dialout-start"},u),(function(F){F.error?I(F.error):D(F)}))}))})),function(u){return b.apply(this,arguments)})},{key:"stopDialOut",value:function(u){var p=this;return _e(this._callState,"stopDialOut()"),new Promise((function(h,w){p.sendMessageToCallMachine(H({action:"dialout-stop"},u),(function(k){k.error?w(k.error):h(k)}))}))}},{key:"sipCallTransfer",value:(v=Q((function*(u){var p=this;if(_e(this._callState,"sipCallTransfer()"),!u)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return u.useSipRefer=!1,xf(u,"sipCallTransfer"),hf(u),new Promise((function(h,w){p.sendMessageToCallMachine(H({action:Md},u),(function(k){k.error?w(k.error):h(k)}))}))})),function(u){return v.apply(this,arguments)})},{key:"sipRefer",value:(y=Q((function*(u){var p=this;if(_e(this._callState,"sipRefer()"),!u)throw new Error("sessionId and toEndPoint are mandatory parameter");return u.useSipRefer=!0,xf(u,"sipRefer"),new Promise((function(h,w){p.sendMessageToCallMachine(H({action:Md},u),(function(k){k.error?w(k.error):h(k)}))}))})),function(u){return y.apply(this,arguments)})},{key:"sendDTMF",value:(g=Q((function*(u){var p=this;return _e(this._callState,"sendDTMF()"),(function(h){var w=h.sessionId,k=h.tones;if(!w||!k)throw new Error("sessionId and tones are mandatory parameter");if(typeof w!="string"||typeof k!="string")throw new Error("sessionId and tones should be of string type");if(k.length>20)throw new Error("tones string must be upto 20 characters");var P=/[^0-9A-D*#]/g,D=k.match(P);if(D&&D[0])throw new Error("".concat(D[0]," is not valid DTMF tone"))})(u),new Promise((function(h,w){p.sendMessageToCallMachine(H({action:"send-dtmf"},u),(function(k){k.error?w(k.error):h(k)}))}))})),function(u){return g.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var u=this;return this._callState!==yn?Promise.resolve(H({stats:{latest:{}}},this._network)):new Promise((function(p){u.sendMessageToCallMachine({action:"get-calc-stats"},(function(h){p(H(H({},u._network),{},{stats:h.stats}))}))}))}},{key:"testWebsocketConnectivity",value:(m=Q((function*(){var u=this;if(Za(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(p){return Promise.reject(p)}return new Promise((function(p,h){u.sendMessageToCallMachine({action:"test-websocket-connectivity"},(function(w){w.error?h(w.error):p(w.results)}))}))})),function(){return m.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(u){return u?u instanceof MediaStreamTrack?!!i0(u)||(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:(f=Q((function*(){var u=this;he(),wt(this._callObjectMode,"testCallQuality()"),qi(this._callMachineInitialized,"testCallQuality()",null,!0),Qa(this._callState,this._isPreparingToJoin,"testCallQuality()");var p=this._testCallAlreadyInProgress,h=function(k){p||(u._testCallInProgress=k)};if(h(!0),this.needsLoad())try{var w=this._callState;yield this.load(),this._callState=w}catch(k){return h(!1),Promise.reject(k)}return new Promise((function(k){u.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:u.properties.dailyJsVersion},(function(P){var D=P.results,I=D.result,F=zl(D,s0);if(I==="failed"){var G,ue=H({},F);(G=F.error)!==null&&G!==void 0&&G.details?(F.error.details=JSON.parse(F.error.details),ue.error=H(H({},ue.error),{},{details:H({},ue.error.details)}),ue.error.details.duringTest="testCallQuality"):(ue.error=ue.error?H({},ue.error):{},ue.error.details={duringTest:"testCallQuality"}),u._maybeSendToSentry(ue)}h(!1),k(H({result:I},F))}))}))})),function(){return f.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(d=Q((function*(u){var p;fe()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),p=yield this.testPeerToPeerCallQuality(u)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),p=yield this.testCallQuality());var h={result:p.result,secondsElapsed:p.secondsElapsed};return p.data&&(h.data={maxRTT:p.data.maxRoundTripTime,packetLoss:p.data.avgRecvPacketLoss}),h})),function(u){return d.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(l=Q((function*(u){var p=this;if(Za(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(k){return Promise.reject(k)}var h=u.videoTrack,w=u.duration;if(!this._validateVideoTrackForNetworkTests(h))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=h,new Promise((function(k,P){p.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:w},(function(D){D.error?P(D.error):k(D.results)}))}))})),function(u){return l.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){fe()?(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=Q((function*(u){var p=this;if(Za(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(h){return Promise.reject(h)}if(!this._validateVideoTrackForNetworkTests(u))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=u,new Promise((function(h,w){p.sendMessageToCallMachine({action:"test-network-connectivity"},(function(k){k.error?w(k.error):h(k.results)}))}))})),function(u){return c.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var u=this;return new Promise((function(p){u._callState===yn?u.sendMessageToCallMachine({action:"get-cpu-load-stats"},(function(h){p(h.cpuStats)})):p({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:"_validateEncodingLayerHasValidProperties",value:function(u){var p;if(!(((p=Object.keys(u))===null||p===void 0?void 0:p.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(Ya))}},{key:"_validateVideoSendSettings",value:function(u,p){var h=u==="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"],w="Video send settings should be either an object or one of the supported presets: ".concat(h.join());if(typeof p=="string"){if(!h.includes(p))throw new Error(w)}else{if(me(p)!=="object")throw new Error(w);if(!p.maxQuality&&!p.encodings&&p.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(p.maxQuality&&["low","medium","high"].indexOf(p.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(p.encodings){var k=!1;switch(Object.keys(p.encodings).length){case 1:k=!p.encodings.low;break;case 2:k=!p.encodings.low||!p.encodings.medium;break;case 3:k=!p.encodings.low||!p.encodings.medium||!p.encodings.high;break;default:k=!0}if(k)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");p.encodings.low&&this._validateEncodingLayerHasValidProperties(p.encodings.low),p.encodings.medium&&this._validateEncodingLayerHasValidProperties(p.encodings.medium),p.encodings.high&&this._validateEncodingLayerHasValidProperties(p.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(u){var p=this;if(!u||Object.keys(u).length===0)throw new Error("Send settings must contain at least information for one track!");Object.entries(u).forEach((function(h){var w=ze(h,2),k=w[0],P=w[1];p._validateVideoSendSettings(k,P)}))}},{key:"updateSendSettings",value:function(u){var p=this;return this.validateUpdateSendSettings(u),this.needsLoad()?(this._preloadCache.sendSettings=u,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(h,w){p.sendMessageToCallMachine({action:"update-send-settings",sendSettings:u},(function(k){k.error?w(k.error):h(k.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 he(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(u){return he(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:u}),this}},{key:"activeSpeakerMode",value:function(){return he(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(u){return _e(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=u,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:u}),this}},{key:"enumerateDevices",value:(s=Q((function*(){var u=this;if(this._callObjectMode){var p=yield navigator.mediaDevices.enumerateDevices();return _n()==="Firefox"&&$i().major>115&&$i().major<123&&(p=p.filter((function(h){return h.kind!=="audiooutput"}))),{devices:p.map((function(h){var w=JSON.parse(JSON.stringify(h));if(!fe()&&h.kind==="videoinput"&&h.getCapabilities){var k,P=h.getCapabilities();w.facing=(P==null||(k=P.facingMode)===null||k===void 0?void 0:k.length)>=1?P.facingMode[0]:void 0}return w}))}}return new Promise((function(h){u.sendMessageToCallMachine({action:"enumerate-devices"},(function(w){h({devices:w.devices})}))}))})),function(){return s.apply(this,arguments)})},{key:"sendAppMessage",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(_e(this._callState,"sendAppMessage()"),JSON.stringify(u).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:u,to:p}),this}},{key:"addFakeParticipant",value:function(u){return he(),_e(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(H({action:"add-fake-participant"},u)),this}},{key:"setShowNamesMode",value:function(u){return st(this._callObjectMode,"setShowNamesMode()"),he(),u&&u!=="always"&&u!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:u}),this)}},{key:"setShowLocalVideo",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return st(this._callObjectMode,"setShowLocalVideo()"),he(),_e(this._callState,"setShowLocalVideo()"),typeof u!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:u}),this._showLocalVideo=u,this)}},{key:"showLocalVideo",value:function(){return st(this._callObjectMode,"showLocalVideo()"),he(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return st(this._callObjectMode,"setShowParticipantsBar()"),he(),_e(this._callState,"setShowParticipantsBar()"),typeof u!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:u}),this._showParticipantsBar=u,this)}},{key:"showParticipantsBar",value:function(){return st(this._callObjectMode,"showParticipantsBar()"),he(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return he(),st(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(u){return he(),st(this._callObjectMode,"setCustomIntegrations()"),_e(this._callState,"setCustomIntegrations()"),kf(u)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:u}),this._customIntegrations=u,this):this}},{key:"startCustomIntegrations",value:function(u){var p=this;if(he(),st(this._callObjectMode,"startCustomIntegrations()"),_e(this._callState,"startCustomIntegrations()"),Array.isArray(u)&&u.some((function(k){return typeof k!="string"}))||!Array.isArray(u)&&typeof u!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var h=typeof u=="string"?[u]:u,w=h.filter((function(k){return!(k in p._customIntegrations)}));return w.length?(console.error(`Can't find custom integration(s): "`.concat(w.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:h}),this)}},{key:"stopCustomIntegrations",value:function(u){var p=this;if(he(),st(this._callObjectMode,"stopCustomIntegrations()"),_e(this._callState,"stopCustomIntegrations()"),Array.isArray(u)&&u.some((function(k){return typeof k!="string"}))||!Array.isArray(u)&&typeof u!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var h=typeof u=="string"?[u]:u,w=h.filter((function(k){return!(k in p._customIntegrations)}));return w.length?(console.error(`Can't find custom integration(s): "`.concat(w.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:h}),this)}},{key:"customTrayButtons",value:function(){return st(this._callObjectMode,"customTrayButtons()"),he(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(u){return st(this._callObjectMode,"updateCustomTrayButtons()"),he(),_e(this._callState,"updateCustomTrayButtons()"),wf(u)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:u}),this._customTrayButtons=u,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(Wi))),this)}},{key:"theme",value:function(){return st(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(u){var p=this;return st(this._callObjectMode,"setTheme()"),new Promise((function(h,w){try{p.validateProperties({theme:u}),p.properties.theme=H({},u),p.sendMessageToCallMachine({action:"set-theme",theme:p.properties.theme});try{p.emitDailyJSEvent({action:Uy,theme:p.properties.theme})}catch(k){console.log("could not emit 'theme-updated'",k)}h(p.properties.theme)}catch(k){w(k)}}))}},{key:"requestFullscreen",value:(a=Q((function*(){if(he(),this._iframe&&!document.fullscreenElement&&Pd())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(u){console.log("could not make video call fullscreen",u)}})),function(){return a.apply(this,arguments)})},{key:"exitFullscreen",value:function(){he(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(o=Q((function*(){var u=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(p){u.sendMessageToCallMachine({action:"get-sidebar-view"},(function(h){p(h.view)}))}))})),function(){return o.apply(this,arguments)})},{key:"setSidebarView",value:function(u){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:u}),this)}},{key:"room",value:(i=Q((function*(){var u=this,p=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,h=p===void 0||p;return this._accessState.access===ja||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(w){u.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:h},(function(k){delete k.action,delete k.callbackStamp,w(k)}))}))})),function(){return i.apply(this,arguments)})},{key:"geo",value:(r=Q((function*(){try{var u=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield u.json()).geo}}catch(p){return console.error("geo lookup failed",p),{current:""}}})),function(){return r.apply(this,arguments)})},{key:"setNetworkTopology",value:(n=Q((function*(u){var p=this;return he(),_e(this._callState,"setNetworkTopology()"),new Promise((function(h,w){p.sendMessageToCallMachine({action:"set-network-topology",opts:u},(function(k){k.error?w({error:k.error}):h({workerId:k.workerId})}))}))})),function(u){return n.apply(this,arguments)})},{key:"getNetworkTopology",value:(t=Q((function*(){var u=this;return new Promise((function(p,h){u.needsLoad()&&p({topology:"none"}),u.sendMessageToCallMachine({action:"get-network-topology"},(function(w){w.error?h({error:w.error}):p({topology:w.topology})}))}))})),function(){return t.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(u){if(he(),typeof u!="number"&&u!==!0&&u!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(u));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:u})}},{key:"on",value:function(u,p){return mi.prototype.on.call(this,u,p)}},{key:"once",value:function(u,p){return mi.prototype.once.call(this,u,p)}},{key:"off",value:function(u,p){return mi.prototype.off.call(this,u,p)}},{key:"validateProperties",value:function(u){var p,h;if(u!=null&&(p=u.dailyConfig)!==null&&p!==void 0&&p.userMediaAudioConstraints){var w,k;fe()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var P=u.inputSettings||{};P.audio=((w=u.inputSettings)===null||w===void 0?void 0:w.audio)||{},P.audio.settings=((k=u.inputSettings)===null||k===void 0||(k=k.audio)===null||k===void 0?void 0:k.settings)||{},P.audio.settings=H(H({},P.audio.settings),u.dailyConfig.userMediaAudioConstraints),u.inputSettings=P,delete u.dailyConfig.userMediaAudioConstraints}if(u!=null&&(h=u.dailyConfig)!==null&&h!==void 0&&h.userMediaVideoConstraints){var D,I;fe()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var F=u.inputSettings||{};F.video=((D=u.inputSettings)===null||D===void 0?void 0:D.video)||{},F.video.settings=((I=u.inputSettings)===null||I===void 0||(I=I.video)===null||I===void 0?void 0:I.settings)||{},F.video.settings=H(H({},F.video.settings),u.dailyConfig.userMediaVideoConstraints),u.inputSettings=F,delete u.dailyConfig.userMediaVideoConstraints}for(var G in u)if(kn[G]){if(kn[G].validate&&!kn[G].validate(u[G],this))throw new Error("property '".concat(G,"': ").concat(kn[G].help))}else console.warn("Ignoring unrecognized property '".concat(G,"'")),delete u[G]}},{key:"assembleMeetingUrl",value:function(){var u,p,h=H(H({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(u=this.properties.dailyConfig)!==null&&u!==void 0&&u.proxyUrl?encodeURIComponent((p=this.properties.dailyConfig)===null||p===void 0?void 0:p.proxyUrl):void 0}),w=h.url.match(/\?/)?"&":"?";return h.url+w+Object.keys(kn).filter((function(k){return kn[k].queryString&&h[k]!==void 0})).map((function(k){return"".concat(kn[k].queryString,"=").concat(h[k])})).join("&")}},{key:"needsLoad",value:function(){return[fd,hd,bn,Kt].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(u,p){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(u,p,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(u){this._messageChannel.forwardPackagedMessageToCallMachine(u,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(u){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(u,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(u){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(u)}},{key:"handleMessageFromCallMachine",value:function(u){switch(u.action){case By:this.sendMessageToCallMachine(H({action:$y},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var p={action:Fi,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:vi(this.properties.dailyConfig)}};this.sendMessageToCallMachine(p),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case gd:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(u);break;case Gy:var h,w=H({},u);delete w.internal,this._maxAppMessageSize=((h=u.internal)===null||h===void 0?void 0:h._maxAppMessageSize)||Ra,this._joinedCallback&&(this._joinedCallback(u.participants),this._joinedCallback=null),this.emitDailyJSEvent(w);break;case Yy:case Xy:if(this._callState===bn)return;if(u.participant&&u.participant.session_id){var k=u.participant.local?"local":u.participant.session_id;if(this._callObjectMode){var P=this._callMachine().store;Hd(u.participant,P),Jd(u.participant,P),qd(u.participant,this._participants[k],P)}try{this.maybeParticipantTracksStopped(this._participants[k],u.participant),this.maybeParticipantTracksStarted(this._participants[k],u.participant),this.maybeEventRecordingStopped(this._participants[k],u.participant),this.maybeEventRecordingStarted(this._participants[k],u.participant)}catch(So){console.error("track events error",So)}this.compareEqualForParticipantUpdateEvent(u.participant,this._participants[k])||(this._participants[k]=H({},u.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(u))}break;case Qy:if(u.participant&&u.participant.session_id){var D=this._participants[u.participant.session_id];D&&this.maybeParticipantTracksStopped(D,null),delete this._participants[u.participant.session_id],this.emitDailyJSEvent(u)}break;case Zy:Ke(this._participantCounts,u.participantCounts)||(this._participantCounts=u.participantCounts,this.emitDailyJSEvent(u));break;case eb:var I={access:u.access};u.awaitingAccess&&(I.awaitingAccess=u.awaitingAccess),Ke(this._accessState,I)||(this._accessState=I,this.emitDailyJSEvent(u));break;case tb:if(u.meetingSession){this._meetingSessionSummary=u.meetingSession,this.emitDailyJSEvent(u);var F=H(H({},u),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(F)}break;case wd:var G;this._iframe&&!u.preserveIframe&&(this._iframe.src=""),this._updateCallState(Kt),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(u.errorMsg),this._loadedCallback=null),u.preserveIframe;var ue=zl(u,c0);ue!=null&&(G=ue.error)!==null&&G!==void 0&&G.details&&(ue.error.details=JSON.parse(ue.error.details)),this._maybeSendToSentry(u),this._joinedCallback&&(this._joinedCallback(null,ue),this._joinedCallback=null),this.emitDailyJSEvent(ue);break;case Ky:this._callState!==Kt&&this._updateCallState(bn),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(u);break;case"selected-devices-updated":u.devices&&this.emitDailyJSEvent(u);break;case Tb:var nt=u.state,Dt=u.threshold,In=u.quality,Ae=nt.state,Ze=nt.reasons;Ae===this._network.networkState&&Ke(Ze,this._network.networkStateReasons)&&Dt===this._network.threshold&&In===this._network.quality||(this._network.networkState=Ae,this._network.networkStateReasons=Ze,this._network.quality=In,this._network.threshold=Dt,u.networkState=Ae,Ze.length&&(u.networkStateReasons=Ze),delete u.state,this.emitDailyJSEvent(u));break;case Cb:u&&u.cpuLoadState&&this.emitDailyJSEvent(u);break;case Pb:u&&u.faceCounts!==void 0&&this.emitDailyJSEvent(u);break;case Sb:var Ut=u.activeSpeaker;this._activeSpeaker.peerId!==Ut.peerId&&(this._activeSpeaker.peerId=Ut.peerId,this.emitDailyJSEvent({action:u.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var Dn=u.show;this._showLocalVideo=Dn,this.emitDailyJSEvent({action:u.action,show:Dn});break;case xb:var hr=u.enabled;this._activeSpeakerMode!==hr&&(this._activeSpeakerMode=hr,this.emitDailyJSEvent({action:u.action,enabled:this._activeSpeakerMode}));break;case rb:case ib:case ob:this._waitingParticipants=u.allWaitingParticipants,this.emitDailyJSEvent({action:u.action,participant:u.participant});break;case Lb:Ke(this._receiveSettings,u.receiveSettings)||(this._receiveSettings=u.receiveSettings,this.emitDailyJSEvent({action:u.action,receiveSettings:u.receiveSettings}));break;case bd:this._maybeUpdateInputSettings(u.inputSettings);break;case"send-settings-updated":Ke(this._sendSettings,u.sendSettings)||(this._sendSettings=u.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:u.action,sendSettings:u.sendSettings}));break;case"local-audio-level":this._localAudioLevel=u.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(u);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=u.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(u);break;case vb:var Ln=u.session_id;this._rmpPlayerState[Ln]=u.playerState,this.emitDailyJSEvent(u);break;case bb:delete this._rmpPlayerState[u.session_id],this.emitDailyJSEvent(u);break;case yb:var Te=u.session_id,rn=this._rmpPlayerState[Te];rn&&this.compareEqualForRMPUpdateEvent(rn,u.remoteMediaPlayerState)||(this._rmpPlayerState[Te]=u.remoteMediaPlayerState,this.emitDailyJSEvent(u));break;case"custom-button-click":case"sidebar-view-changed":case"pip-started":case"pip-stopped":this.emitDailyJSEvent(u);break;case nb:var Nc=this._meetingSessionState.topology!==(u.meetingSessionState&&u.meetingSessionState.topology);this._meetingSessionState=ts(u.meetingSessionState,this._callObjectMode),(this._callObjectMode||Nc)&&this.emitDailyJSEvent(u);break;case _b:this._isScreenSharing=!0,this.emitDailyJSEvent(u);break;case wb:case kb:this._isScreenSharing=!1,this.emitDailyJSEvent(u);break;case vd:case yd:case db:case fb:case hb:case cb:case lb:case ub:case Hy:case Jy:case mb:case gb:case"test-completed":case Mb:case pb:case Eb:case Ab:case Ob:case Ib:case _d:case Db:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(u);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(u,p){var h="record";u&&(p.local||p[h]!==!1||u[h]===p[h]||this.emitDailyJSEvent({action:yd}))}},{key:"maybeEventRecordingStarted",value:function(u,p){var h="record";u&&(p.local||p[h]!==!0||u[h]===p[h]||this.emitDailyJSEvent({action:vd}))}},{key:"_trackStatePlayable",value:function(u){return!(!u||u.state!==jy)}},{key:"_trackChanged",value:function(u,p){return u?.id!==p?.id}},{key:"maybeEventTrackStopped",value:function(u,p,h){var w,k,P=(w=p?.tracks[u])!==null&&w!==void 0?w:null,D=(k=h?.tracks[u])!==null&&k!==void 0?k:null,I=P?.track;if(I){var F=this._trackStatePlayable(P),G=this._trackStatePlayable(D),ue=this._trackChanged(I,D?.track);F&&(G&&!ue||this.emitDailyJSEvent({action:sb,track:I,participant:h??p,type:u}))}}},{key:"maybeEventTrackStarted",value:function(u,p,h){var w,k,P=(w=p?.tracks[u])!==null&&w!==void 0?w:null,D=(k=h?.tracks[u])!==null&&k!==void 0?k:null,I=D?.track;if(I){var F=this._trackStatePlayable(P),G=this._trackStatePlayable(D),ue=this._trackChanged(P?.track,I);G&&(F&&!ue||this.emitDailyJSEvent({action:ab,track:I,participant:h,type:u}))}}},{key:"maybeParticipantTracksStopped",value:function(u,p){if(u)for(var h in u.tracks)this.maybeEventTrackStopped(h,u,p)}},{key:"maybeParticipantTracksStarted",value:function(u,p){if(p)for(var h in p.tracks)this.maybeEventTrackStarted(h,u,p)}},{key:"compareEqualForRMPUpdateEvent",value:function(u,p){var h,w;return u.state===p.state&&((h=u.settings)===null||h===void 0?void 0:h.volume)===((w=p.settings)===null||w===void 0?void 0:w.volume)}},{key:"emitDailyJSEvent",value:function(u){try{u.callClientId=this.callClientId,this.emit(u.action,u)}catch(p){console.log("could not emit",u,p)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(u,p){return!!Ke(u,p)&&(!u.videoTrack||!p.videoTrack||u.videoTrack.id===p.videoTrack.id&&u.videoTrack.muted===p.videoTrack.muted&&u.videoTrack.enabled===p.videoTrack.enabled)&&(!u.audioTrack||!p.audioTrack||u.audioTrack.id===p.audioTrack.id&&u.audioTrack.muted===p.audioTrack.muted&&u.audioTrack.enabled===p.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return fe()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(u){this._updateCallState(this._callState,u)}},{key:"_updateCallState",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(u!==this._callState||p!==this._isPreparingToJoin){var h=this._callState,w=this._isPreparingToJoin;this._callState=u,this._isPreparingToJoin=p;var k=this._callState===yn;this.updateShowAndroidOngoingMeetingNotification(k);var P=Ji(h,w),D=Ji(this._callState,this._isPreparingToJoin);P!==D&&(this.updateKeepDeviceAwake(D),this.updateDeviceAudioMode(D),this.updateNoOpRecordingEnsuringBackgroundContinuity(D))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=lf,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:ja},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=ts(cf,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=Ra,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(u){fe()&&this.nativeUtils().setKeepDeviceAwake(u,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(u){if(fe()&&!this.disableReactNativeAutoDeviceManagement("audio")){var p=u?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(p)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(u){if(fe()&&this.nativeUtils().setShowOngoingMeetingNotification){var p,h,w,k;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var P=this.properties.reactNativeConfig.androidInCallNotification;p=P.title,h=P.subtitle,w=P.iconName,k=P.disableForCustomOverride}k&&(u=!1),this.nativeUtils().setShowOngoingMeetingNotification(u,p,h,w,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(u){fe()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(u)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var u;if(fe()){var p=(u=this._callMachine())===null||u===void 0||(u=u.store)===null||u===void 0?void 0:u.getState();for(var h in p?.streams){var w=p.streams[h];w&&w.pendingTrack&&w.pendingTrack.kind==="audio"&&(w.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(u){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[u]}},{key:"absoluteUrl",value:function(u){if(u!==void 0){var p=document.createElement("a");return p.href=u,p.href}}},{key:"sayHello",value:function(){var u="hello, world.";return console.log(u),u}},{key:"_logUseAfterDestroy",value:function(){var u=Object.values(wn)[0];if(this.needsLoad())if(u&&!u.needsLoad()){var p={action:Fi,level:"error",code:this.strictMode?9995:9997};u.sendMessageToCallMachine(p)}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 h={action:Fi,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(h,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var u=0,p=Object.values(wn);u<p.length;u++){var h=p[u];h._callMachineInitialized?(h.sendMessageToCallMachine({action:Fi,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),h._delayDuplicateInstanceLog=!1):h._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(u){var p,h,w,k;if(!((p=u.error)!==null&&p!==void 0&&p.type&&(![Fy,Vy,md].includes(u.error.type)||u.error.type===md&&u.error.msg.includes("deleted")))){var P=(h=this.properties)!==null&&h!==void 0&&h.url?new URL(this.properties.url):void 0,D="production";P&&P.host.includes(".staging.daily")&&(D="staging");var I,F,G,ue,nt,Dt=(function(Ln){const Te=[ty(),Zv(),Cy(),Ty(),Iy(),Ly(),oy(),Dy()];return Ln.autoSessionTracking!==!1&&Te.push(Oy()),Te})({}).filter((function(Ln){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(Ln.name)})),In=new hy({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:yy,stackParser:xy,integrations:Dt,environment:D}),Ae=new Gt;if(Ae.setClient(In),In.init(),this.session_id&&Ae.setExtra("sessionId",this.session_id),this.properties){var Ze=H({},this.properties);Ze.userName=Ze.userName?"[Filtered]":void 0,Ze.userData=Ze.userData?"[Filtered]":void 0,Ze.token=Ze.token?"[Filtered]":void 0,Ae.setExtra("properties",Ze)}if(P){var Ut=P.searchParams.get("domain");if(!Ut){var Dn=P.host.match(/(.*?)\./);Ut=Dn&&Dn[1]||""}Ut&&Ae.setTag("domain",Ut)}u.error&&(Ae.setTag("fatalErrorType",u.error.type),Ae.setExtra("errorDetails",u.error.details),!((I=u.error.details)===null||I===void 0)&&I.uri&&Ae.setTag("serverAddress",u.error.details.uri),!((F=u.error.details)===null||F===void 0)&&F.workerGroup&&Ae.setTag("workerGroup",u.error.details.workerGroup),!((G=u.error.details)===null||G===void 0)&&G.geoGroup&&Ae.setTag("geoGroup",u.error.details.geoGroup),!((ue=u.error.details)===null||ue===void 0)&&ue.on&&Ae.setTag("connectionAttempt",u.error.details.on),(nt=u.error.details)!==null&&nt!==void 0&&nt.bundleUrl&&(Ae.setTag("bundleUrl",u.error.details.bundleUrl),Ae.setTag("bundleError",u.error.details.sourceError.type))),Ae.setTags({callMode:this._callObjectMode?fe()?"reactNative":(w=this.properties)!==null&&w!==void 0&&(w=w.dailyConfig)!==null&&w!==void 0&&(w=w.callMode)!==null&&w!==void 0&&w.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:e.version()});var hr=((k=u.error)===null||k===void 0?void 0:k.msg)||u.errorMsg;Ae.captureException(new Error(hr))}}},{key:"_callMachine",value:function(){var u;return(u=window._daily)===null||u===void 0||(u=u.instances)===null||u===void 0||(u=u[this.callClientId])===null||u===void 0?void 0:u.callMachine}},{key:"_maybeUpdateInputSettings",value:function(u){if(!Ke(this._inputSettings,u)){var p=this._getInputSettings();this._inputSettings=u;var h=this._getInputSettings();Ke(p,h)||this.emitDailyJSEvent({action:bd,inputSettings:h})}}}],[{key:"supportedBrowser",value:function(){if(fe())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var u=wv.getParser(ft());return{supported:!!$a(),mobile:u.getPlatformType()==="mobile",name:u.getBrowserName(),version:u.getBrowserVersion(),supportsFullscreen:!!Pd(),supportsScreenShare:!!Nb(),supportsSfu:!!$a(),supportsVideoProcessing:Ed(),supportsAudioProcessing:Ad()}}},{key:"version",value:function(){return"0.85.0"}},{key:"createCallObject",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return u.layout="none",new e(null,u)}},{key:"wrap",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(he(),!u||!u.contentWindow||typeof u.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return p.layout||(p.customLayout?p.layout="custom-v1":p.layout="browser"),new e(u,p)}},{key:"createFrame",value:function(u,p){var h,w;he(),u&&p?(h=u,w=p):u&&u.append?(h=u,w={}):(h=document.body,w=u||{});var k=w.iframeStyle;k||(k=h===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 P=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?P.allow="microphone, camera":P.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",P.style.visibility="hidden",h.appendChild(P),P.style.visibility=null,Object.keys(k).forEach((function(D){return P.style[D]=k[D]})),w.layout||(w.customLayout?w.layout="custom-v1":w.layout="browser");try{return new e(P,w)}catch(D){throw h.removeChild(P),D}}},{key:"createTransparentFrame",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};he();var p=document.createElement("iframe");return p.allow="microphone; camera; autoplay",p.style.cssText=`
25
+ { settings?: {state: "play"|"pause"} }`),k}return new Promise((function(k,P){p.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:h,settings:w},(function(D){D.error?P({error:D.error,errorMsg:D.errorMsg}):k({session_id:D.session_id,remoteMediaPlayerState:{state:D.state,settings:D.settings}})}))}))})),function(u){return _.apply(this,arguments)})},{key:"startTranscription",value:function(u){_e(this._callState,"startTranscription()"),this.sendMessageToCallMachine(H({action:"daily-method-start-transcription"},u))}},{key:"updateTranscription",value:function(u){if(_e(this._callState,"updateTranscription()"),!u)throw new Error("updateTranscription Error: options is mandatory");if(me(u)!=="object")throw new Error("updateTranscription Error: options must be object type");if(u.participants&&!Array.isArray(u.participants))throw new Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(H({action:"daily-method-update-transcription"},u))}},{key:"stopTranscription",value:function(u){if(_e(this._callState,"stopTranscription()"),u&&me(u)!=="object")throw new Error("stopTranscription Error: options must be object type");if(u&&!u.instanceId)throw new Error('"instanceId" not provided');this.sendMessageToCallMachine(H({action:"daily-method-stop-transcription"},u))}},{key:"startDialOut",value:(b=Q((function*(u){var p=this;_e(this._callState,"startDialOut()");var h=function(D){if(D){if(!Array.isArray(D))throw new Error("Error starting dial out: audio codec must be an array");if(D.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");D.forEach((function(I){if(typeof I!="string")throw new Error("Error starting dial out: audio codec must be a string");if(I!=="OPUS"&&I!=="PCMU"&&I!=="PCMA"&&I!=="G722")throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")}))}};if(!u.sipUri&&!u.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(u.sipUri&&u.phoneNumber)throw new Error("Error starting dial out: only one of sip uri or phone number must be provided");if(u.sipUri){if(typeof u.sipUri!="string")throw new Error("Error starting dial out: sipUri must be a string");if(!u.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(u.video&&typeof u.video!="boolean")throw new Error("Error starting dial out: video must be a boolean value");(function(D){if(D&&(h(D.audio),D.video)){if(!Array.isArray(D.video))throw new Error("Error starting dial out: video codec must be an array");if(D.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");D.video.forEach((function(I){if(typeof I!="string")throw new Error("Error starting dial out: video codec must be a string");if(I!=="H264"&&I!=="VP8")throw new Error("Error starting dial out: video codec must be H264 or VP8")}))}})(u.codecs)}if(u.phoneNumber){if(typeof u.phoneNumber!="string")throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(u.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");u.codecs&&h(u.codecs.audio)}if(u.callerId){if(typeof u.callerId!="string")throw new Error("Error starting dial out: callerId must be a string");if(u.sipUri)throw new Error("Error starting dial out: callerId not allowed with sipUri")}if(u.displayName){if(typeof u.displayName!="string")throw new Error("Error starting dial out: displayName must be a string");if(u.displayName.length>=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(u.userId){if(typeof u.userId!="string")throw new Error("Error starting dial out: userId must be a string");if(u.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}if(hf(u),u.permissions&&u.permissions.canReceive){var w=ze(tf.validateJSONObject(u.permissions.canReceive),2),k=w[0],P=w[1];if(!k)throw new Error(P)}if(u.provider){if(u.provider!=="daily")throw new Error("Error: provider can be set only to 'daily', got: ".concat(u.provider));if(u.phoneNumber)throw new Error("Error starting dial out: provider valid only for sipUri, not phoneNumber");console.warn("(pre-beta) provider=daily is currently in pre-beta, things might break!")}return new Promise((function(D,I){p.sendMessageToCallMachine(H({action:"dialout-start"},u),(function(F){F.error?I(F.error):D(F)}))}))})),function(u){return b.apply(this,arguments)})},{key:"stopDialOut",value:function(u){var p=this;return _e(this._callState,"stopDialOut()"),new Promise((function(h,w){p.sendMessageToCallMachine(H({action:"dialout-stop"},u),(function(k){k.error?w(k.error):h(k)}))}))}},{key:"sipCallTransfer",value:(v=Q((function*(u){var p=this;if(_e(this._callState,"sipCallTransfer()"),!u)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return u.useSipRefer=!1,xf(u,"sipCallTransfer"),hf(u),new Promise((function(h,w){p.sendMessageToCallMachine(H({action:Md},u),(function(k){k.error?w(k.error):h(k)}))}))})),function(u){return v.apply(this,arguments)})},{key:"sipRefer",value:(y=Q((function*(u){var p=this;if(_e(this._callState,"sipRefer()"),!u)throw new Error("sessionId and toEndPoint are mandatory parameter");return u.useSipRefer=!0,xf(u,"sipRefer"),new Promise((function(h,w){p.sendMessageToCallMachine(H({action:Md},u),(function(k){k.error?w(k.error):h(k)}))}))})),function(u){return y.apply(this,arguments)})},{key:"sendDTMF",value:(g=Q((function*(u){var p=this;return _e(this._callState,"sendDTMF()"),(function(h){var w=h.sessionId,k=h.tones;if(!w||!k)throw new Error("sessionId and tones are mandatory parameter");if(typeof w!="string"||typeof k!="string")throw new Error("sessionId and tones should be of string type");if(k.length>20)throw new Error("tones string must be upto 20 characters");var P=/[^0-9A-D*#]/g,D=k.match(P);if(D&&D[0])throw new Error("".concat(D[0]," is not valid DTMF tone"))})(u),new Promise((function(h,w){p.sendMessageToCallMachine(H({action:"send-dtmf"},u),(function(k){k.error?w(k.error):h(k)}))}))})),function(u){return g.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var u=this;return this._callState!==yn?Promise.resolve(H({stats:{latest:{}}},this._network)):new Promise((function(p){u.sendMessageToCallMachine({action:"get-calc-stats"},(function(h){p(H(H({},u._network),{},{stats:h.stats}))}))}))}},{key:"testWebsocketConnectivity",value:(m=Q((function*(){var u=this;if(Za(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(p){return Promise.reject(p)}return new Promise((function(p,h){u.sendMessageToCallMachine({action:"test-websocket-connectivity"},(function(w){w.error?h(w.error):p(w.results)}))}))})),function(){return m.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(u){return u?u instanceof MediaStreamTrack?!!o0(u)||(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:(f=Q((function*(){var u=this;he(),wt(this._callObjectMode,"testCallQuality()"),Gi(this._callMachineInitialized,"testCallQuality()",null,!0),Qa(this._callState,this._isPreparingToJoin,"testCallQuality()");var p=this._testCallAlreadyInProgress,h=function(k){p||(u._testCallInProgress=k)};if(h(!0),this.needsLoad())try{var w=this._callState;yield this.load(),this._callState=w}catch(k){return h(!1),Promise.reject(k)}return new Promise((function(k){u.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:u.properties.dailyJsVersion},(function(P){var D=P.results,I=D.result,F=zl(D,c0);if(I==="failed"){var G,ue=H({},F);(G=F.error)!==null&&G!==void 0&&G.details?(F.error.details=JSON.parse(F.error.details),ue.error=H(H({},ue.error),{},{details:H({},ue.error.details)}),ue.error.details.duringTest="testCallQuality"):(ue.error=ue.error?H({},ue.error):{},ue.error.details={duringTest:"testCallQuality"}),u._maybeSendToSentry(ue)}h(!1),k(H({result:I},F))}))}))})),function(){return f.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(d=Q((function*(u){var p;fe()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),p=yield this.testPeerToPeerCallQuality(u)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),p=yield this.testCallQuality());var h={result:p.result,secondsElapsed:p.secondsElapsed};return p.data&&(h.data={maxRTT:p.data.maxRoundTripTime,packetLoss:p.data.avgRecvPacketLoss}),h})),function(u){return d.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(l=Q((function*(u){var p=this;if(Za(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(k){return Promise.reject(k)}var h=u.videoTrack,w=u.duration;if(!this._validateVideoTrackForNetworkTests(h))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=h,new Promise((function(k,P){p.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:w},(function(D){D.error?P(D.error):k(D.results)}))}))})),function(u){return l.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){fe()?(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=Q((function*(u){var p=this;if(Za(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(h){return Promise.reject(h)}if(!this._validateVideoTrackForNetworkTests(u))throw new Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=u,new Promise((function(h,w){p.sendMessageToCallMachine({action:"test-network-connectivity"},(function(k){k.error?w(k.error):h(k.results)}))}))})),function(u){return c.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var u=this;return new Promise((function(p){u._callState===yn?u.sendMessageToCallMachine({action:"get-cpu-load-stats"},(function(h){p(h.cpuStats)})):p({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})}))}},{key:"_validateEncodingLayerHasValidProperties",value:function(u){var p;if(!(((p=Object.keys(u))===null||p===void 0?void 0:p.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(Ya))}},{key:"_validateVideoSendSettings",value:function(u,p){var h=u==="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"],w="Video send settings should be either an object or one of the supported presets: ".concat(h.join());if(typeof p=="string"){if(!h.includes(p))throw new Error(w)}else{if(me(p)!=="object")throw new Error(w);if(!p.maxQuality&&!p.encodings&&p.allowAdaptiveLayers===void 0)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(p.maxQuality&&["low","medium","high"].indexOf(p.maxQuality)===-1)throw new Error("maxQuality must be either low, medium or high");if(p.encodings){var k=!1;switch(Object.keys(p.encodings).length){case 1:k=!p.encodings.low;break;case 2:k=!p.encodings.low||!p.encodings.medium;break;case 3:k=!p.encodings.low||!p.encodings.medium||!p.encodings.high;break;default:k=!0}if(k)throw new Error("Encodings must be defined as: low, low and medium, or low, medium and high.");p.encodings.low&&this._validateEncodingLayerHasValidProperties(p.encodings.low),p.encodings.medium&&this._validateEncodingLayerHasValidProperties(p.encodings.medium),p.encodings.high&&this._validateEncodingLayerHasValidProperties(p.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(u){var p=this;if(!u||Object.keys(u).length===0)throw new Error("Send settings must contain at least information for one track!");Object.entries(u).forEach((function(h){var w=ze(h,2),k=w[0],P=w[1];p._validateVideoSendSettings(k,P)}))}},{key:"updateSendSettings",value:function(u){var p=this;return this.validateUpdateSendSettings(u),this.needsLoad()?(this._preloadCache.sendSettings=u,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(h,w){p.sendMessageToCallMachine({action:"update-send-settings",sendSettings:u},(function(k){k.error?w(k.error):h(k.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 he(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(u){return he(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:u}),this}},{key:"activeSpeakerMode",value:function(){return he(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(u){return _e(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=u,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:u}),this}},{key:"enumerateDevices",value:(s=Q((function*(){var u=this;if(this._callObjectMode){var p=yield navigator.mediaDevices.enumerateDevices();return _n()==="Firefox"&&Ui().major>115&&Ui().major<123&&(p=p.filter((function(h){return h.kind!=="audiooutput"}))),{devices:p.map((function(h){var w=JSON.parse(JSON.stringify(h));if(!fe()&&h.kind==="videoinput"&&h.getCapabilities){var k,P=h.getCapabilities();w.facing=(P==null||(k=P.facingMode)===null||k===void 0?void 0:k.length)>=1?P.facingMode[0]:void 0}return w}))}}return new Promise((function(h){u.sendMessageToCallMachine({action:"enumerate-devices"},(function(w){h({devices:w.devices})}))}))})),function(){return s.apply(this,arguments)})},{key:"sendAppMessage",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"*";if(_e(this._callState,"sendAppMessage()"),JSON.stringify(u).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:u,to:p}),this}},{key:"addFakeParticipant",value:function(u){return he(),_e(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(H({action:"add-fake-participant"},u)),this}},{key:"setShowNamesMode",value:function(u){return st(this._callObjectMode,"setShowNamesMode()"),he(),u&&u!=="always"&&u!=="never"?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:u}),this)}},{key:"setShowLocalVideo",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return st(this._callObjectMode,"setShowLocalVideo()"),he(),_e(this._callState,"setShowLocalVideo()"),typeof u!="boolean"?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:u}),this._showLocalVideo=u,this)}},{key:"showLocalVideo",value:function(){return st(this._callObjectMode,"showLocalVideo()"),he(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var u=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return st(this._callObjectMode,"setShowParticipantsBar()"),he(),_e(this._callState,"setShowParticipantsBar()"),typeof u!="boolean"?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:u}),this._showParticipantsBar=u,this)}},{key:"showParticipantsBar",value:function(){return st(this._callObjectMode,"showParticipantsBar()"),he(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return he(),st(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(u){return he(),st(this._callObjectMode,"setCustomIntegrations()"),_e(this._callState,"setCustomIntegrations()"),kf(u)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:u}),this._customIntegrations=u,this):this}},{key:"startCustomIntegrations",value:function(u){var p=this;if(he(),st(this._callObjectMode,"startCustomIntegrations()"),_e(this._callState,"startCustomIntegrations()"),Array.isArray(u)&&u.some((function(k){return typeof k!="string"}))||!Array.isArray(u)&&typeof u!="string")return console.error("startCustomIntegrations() only accepts string | string[]"),this;var h=typeof u=="string"?[u]:u,w=h.filter((function(k){return!(k in p._customIntegrations)}));return w.length?(console.error(`Can't find custom integration(s): "`.concat(w.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:h}),this)}},{key:"stopCustomIntegrations",value:function(u){var p=this;if(he(),st(this._callObjectMode,"stopCustomIntegrations()"),_e(this._callState,"stopCustomIntegrations()"),Array.isArray(u)&&u.some((function(k){return typeof k!="string"}))||!Array.isArray(u)&&typeof u!="string")return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var h=typeof u=="string"?[u]:u,w=h.filter((function(k){return!(k in p._customIntegrations)}));return w.length?(console.error(`Can't find custom integration(s): "`.concat(w.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:h}),this)}},{key:"customTrayButtons",value:function(){return st(this._callObjectMode,"customTrayButtons()"),he(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(u){return st(this._callObjectMode,"updateCustomTrayButtons()"),he(),_e(this._callState,"updateCustomTrayButtons()"),wf(u)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:u}),this._customTrayButtons=u,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(Hi))),this)}},{key:"theme",value:function(){return st(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(u){var p=this;return st(this._callObjectMode,"setTheme()"),new Promise((function(h,w){try{p.validateProperties({theme:u}),p.properties.theme=H({},u),p.sendMessageToCallMachine({action:"set-theme",theme:p.properties.theme});try{p.emitDailyJSEvent({action:zy,theme:p.properties.theme})}catch(k){console.log("could not emit 'theme-updated'",k)}h(p.properties.theme)}catch(k){w(k)}}))}},{key:"requestFullscreen",value:(a=Q((function*(){if(he(),this._iframe&&!document.fullscreenElement&&Pd())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(u){console.log("could not make video call fullscreen",u)}})),function(){return a.apply(this,arguments)})},{key:"exitFullscreen",value:function(){he(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(o=Q((function*(){var u=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(p){u.sendMessageToCallMachine({action:"get-sidebar-view"},(function(h){p(h.view)}))}))})),function(){return o.apply(this,arguments)})},{key:"setSidebarView",value:function(u){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:u}),this)}},{key:"room",value:(i=Q((function*(){var u=this,p=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeRoomConfigDefaults,h=p===void 0||p;return this._accessState.access===ja||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(w){u.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:h},(function(k){delete k.action,delete k.callbackStamp,w(k)}))}))})),function(){return i.apply(this,arguments)})},{key:"geo",value:(r=Q((function*(){try{var u=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield u.json()).geo}}catch(p){return console.error("geo lookup failed",p),{current:""}}})),function(){return r.apply(this,arguments)})},{key:"setNetworkTopology",value:(n=Q((function*(u){var p=this;return he(),_e(this._callState,"setNetworkTopology()"),new Promise((function(h,w){p.sendMessageToCallMachine({action:"set-network-topology",opts:u},(function(k){k.error?w({error:k.error}):h({workerId:k.workerId})}))}))})),function(u){return n.apply(this,arguments)})},{key:"getNetworkTopology",value:(t=Q((function*(){var u=this;return new Promise((function(p,h){u.needsLoad()&&p({topology:"none"}),u.sendMessageToCallMachine({action:"get-network-topology"},(function(w){w.error?h({error:w.error}):p({topology:w.topology})}))}))})),function(){return t.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(u){if(he(),typeof u!="number"&&u!==!0&&u!==!1)throw new Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(u));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:u})}},{key:"on",value:function(u,p){return gi.prototype.on.call(this,u,p)}},{key:"once",value:function(u,p){return gi.prototype.once.call(this,u,p)}},{key:"off",value:function(u,p){return gi.prototype.off.call(this,u,p)}},{key:"validateProperties",value:function(u){var p,h;if(u!=null&&(p=u.dailyConfig)!==null&&p!==void 0&&p.userMediaAudioConstraints){var w,k;fe()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var P=u.inputSettings||{};P.audio=((w=u.inputSettings)===null||w===void 0?void 0:w.audio)||{},P.audio.settings=((k=u.inputSettings)===null||k===void 0||(k=k.audio)===null||k===void 0?void 0:k.settings)||{},P.audio.settings=H(H({},P.audio.settings),u.dailyConfig.userMediaAudioConstraints),u.inputSettings=P,delete u.dailyConfig.userMediaAudioConstraints}if(u!=null&&(h=u.dailyConfig)!==null&&h!==void 0&&h.userMediaVideoConstraints){var D,I;fe()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var F=u.inputSettings||{};F.video=((D=u.inputSettings)===null||D===void 0?void 0:D.video)||{},F.video.settings=((I=u.inputSettings)===null||I===void 0||(I=I.video)===null||I===void 0?void 0:I.settings)||{},F.video.settings=H(H({},F.video.settings),u.dailyConfig.userMediaVideoConstraints),u.inputSettings=F,delete u.dailyConfig.userMediaVideoConstraints}for(var G in u)if(kn[G]){if(kn[G].validate&&!kn[G].validate(u[G],this))throw new Error("property '".concat(G,"': ").concat(kn[G].help))}else console.warn("Ignoring unrecognized property '".concat(G,"'")),delete u[G]}},{key:"assembleMeetingUrl",value:function(){var u,p,h=H(H({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:(u=this.properties.dailyConfig)!==null&&u!==void 0&&u.proxyUrl?encodeURIComponent((p=this.properties.dailyConfig)===null||p===void 0?void 0:p.proxyUrl):void 0}),w=h.url.match(/\?/)?"&":"?";return h.url+w+Object.keys(kn).filter((function(k){return kn[k].queryString&&h[k]!==void 0})).map((function(k){return"".concat(kn[k].queryString,"=").concat(h[k])})).join("&")}},{key:"needsLoad",value:function(){return[fd,hd,bn,Kt].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(u,p){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(u,p,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(u){this._messageChannel.forwardPackagedMessageToCallMachine(u,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(u){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(u,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(u){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(u)}},{key:"handleMessageFromCallMachine",value:function(u){switch(u.action){case $y:this.sendMessageToCallMachine(H({action:Uy},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var p={action:Bi,level:"log",code:1011,stats:{event:"bundle load",time:this._bundleLoadTime==="no-op"?0:this._bundleLoadTime,preLoaded:this._bundleLoadTime==="no-op",url:yi(this.properties.dailyConfig)}};this.sendMessageToCallMachine(p),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case gd:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(u);break;case Ky:var h,w=H({},u);delete w.internal,this._maxAppMessageSize=((h=u.internal)===null||h===void 0?void 0:h._maxAppMessageSize)||Ra,this._joinedCallback&&(this._joinedCallback(u.participants),this._joinedCallback=null),this.emitDailyJSEvent(w);break;case Xy:case Qy:if(this._callState===bn)return;if(u.participant&&u.participant.session_id){var k=u.participant.local?"local":u.participant.session_id;if(this._callObjectMode){var P=this._callMachine().store;Hd(u.participant,P),Jd(u.participant,P),qd(u.participant,this._participants[k],P)}try{this.maybeParticipantTracksStopped(this._participants[k],u.participant),this.maybeParticipantTracksStarted(this._participants[k],u.participant),this.maybeEventRecordingStopped(this._participants[k],u.participant),this.maybeEventRecordingStarted(this._participants[k],u.participant)}catch(So){console.error("track events error",So)}this.compareEqualForParticipantUpdateEvent(u.participant,this._participants[k])||(this._participants[k]=H({},u.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(u))}break;case Zy:if(u.participant&&u.participant.session_id){var D=this._participants[u.participant.session_id];D&&this.maybeParticipantTracksStopped(D,null),delete this._participants[u.participant.session_id],this.emitDailyJSEvent(u)}break;case eb:Ke(this._participantCounts,u.participantCounts)||(this._participantCounts=u.participantCounts,this.emitDailyJSEvent(u));break;case tb:var I={access:u.access};u.awaitingAccess&&(I.awaitingAccess=u.awaitingAccess),Ke(this._accessState,I)||(this._accessState=I,this.emitDailyJSEvent(u));break;case nb:if(u.meetingSession){this._meetingSessionSummary=u.meetingSession,this.emitDailyJSEvent(u);var F=H(H({},u),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(F)}break;case wd:var G;this._iframe&&!u.preserveIframe&&(this._iframe.src=""),this._updateCallState(Kt),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(u.errorMsg),this._loadedCallback=null),u.preserveIframe;var ue=zl(u,l0);ue!=null&&(G=ue.error)!==null&&G!==void 0&&G.details&&(ue.error.details=JSON.parse(ue.error.details)),this._maybeSendToSentry(u),this._joinedCallback&&(this._joinedCallback(null,ue),this._joinedCallback=null),this.emitDailyJSEvent(ue);break;case Yy:this._callState!==Kt&&this._updateCallState(bn),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(u);break;case"selected-devices-updated":u.devices&&this.emitDailyJSEvent(u);break;case Mb:var nt=u.state,Dt=u.threshold,In=u.quality,Ae=nt.state,et=nt.reasons;Ae===this._network.networkState&&Ke(et,this._network.networkStateReasons)&&Dt===this._network.threshold&&In===this._network.quality||(this._network.networkState=Ae,this._network.networkStateReasons=et,this._network.quality=In,this._network.threshold=Dt,u.networkState=Ae,et.length&&(u.networkStateReasons=et),delete u.state,this.emitDailyJSEvent(u));break;case Pb:u&&u.cpuLoadState&&this.emitDailyJSEvent(u);break;case Eb:u&&u.faceCounts!==void 0&&this.emitDailyJSEvent(u);break;case xb:var Ut=u.activeSpeaker;this._activeSpeaker.peerId!==Ut.peerId&&(this._activeSpeaker.peerId=Ut.peerId,this.emitDailyJSEvent({action:u.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var Dn=u.show;this._showLocalVideo=Dn,this.emitDailyJSEvent({action:u.action,show:Dn});break;case Tb:var hr=u.enabled;this._activeSpeakerMode!==hr&&(this._activeSpeakerMode=hr,this.emitDailyJSEvent({action:u.action,enabled:this._activeSpeakerMode}));break;case ib:case ob:case ab:this._waitingParticipants=u.allWaitingParticipants,this.emitDailyJSEvent({action:u.action,participant:u.participant});break;case jb:Ke(this._receiveSettings,u.receiveSettings)||(this._receiveSettings=u.receiveSettings,this.emitDailyJSEvent({action:u.action,receiveSettings:u.receiveSettings}));break;case bd:this._maybeUpdateInputSettings(u.inputSettings);break;case"send-settings-updated":Ke(this._sendSettings,u.sendSettings)||(this._sendSettings=u.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:u.action,sendSettings:u.sendSettings}));break;case"local-audio-level":this._localAudioLevel=u.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(u);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=u.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(u);break;case yb:var Ln=u.session_id;this._rmpPlayerState[Ln]=u.playerState,this.emitDailyJSEvent(u);break;case _b:delete this._rmpPlayerState[u.session_id],this.emitDailyJSEvent(u);break;case bb:var Te=u.session_id,rn=this._rmpPlayerState[Te];rn&&this.compareEqualForRMPUpdateEvent(rn,u.remoteMediaPlayerState)||(this._rmpPlayerState[Te]=u.remoteMediaPlayerState,this.emitDailyJSEvent(u));break;case"custom-button-click":case"sidebar-view-changed":case"pip-started":case"pip-stopped":this.emitDailyJSEvent(u);break;case rb:var Nc=this._meetingSessionState.topology!==(u.meetingSessionState&&u.meetingSessionState.topology);this._meetingSessionState=ts(u.meetingSessionState,this._callObjectMode),(this._callObjectMode||Nc)&&this.emitDailyJSEvent(u);break;case wb:this._isScreenSharing=!0,this.emitDailyJSEvent(u);break;case kb:case Sb:this._isScreenSharing=!1,this.emitDailyJSEvent(u);break;case vd:case yd:case fb:case hb:case pb:case lb:case ub:case db:case Jy:case qy:case gb:case vb:case"test-completed":case Cb:case mb:case Ab:case Ob:case Ib:case Db:case _d:case Lb:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(u);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(u,p){var h="record";u&&(p.local||p[h]!==!1||u[h]===p[h]||this.emitDailyJSEvent({action:yd}))}},{key:"maybeEventRecordingStarted",value:function(u,p){var h="record";u&&(p.local||p[h]!==!0||u[h]===p[h]||this.emitDailyJSEvent({action:vd}))}},{key:"_trackStatePlayable",value:function(u){return!(!u||u.state!==Ry)}},{key:"_trackChanged",value:function(u,p){return u?.id!==p?.id}},{key:"maybeEventTrackStopped",value:function(u,p,h){var w,k,P=(w=p?.tracks[u])!==null&&w!==void 0?w:null,D=(k=h?.tracks[u])!==null&&k!==void 0?k:null,I=P?.track;if(I){var F=this._trackStatePlayable(P),G=this._trackStatePlayable(D),ue=this._trackChanged(I,D?.track);F&&(G&&!ue||this.emitDailyJSEvent({action:cb,track:I,participant:h??p,type:u}))}}},{key:"maybeEventTrackStarted",value:function(u,p,h){var w,k,P=(w=p?.tracks[u])!==null&&w!==void 0?w:null,D=(k=h?.tracks[u])!==null&&k!==void 0?k:null,I=D?.track;if(I){var F=this._trackStatePlayable(P),G=this._trackStatePlayable(D),ue=this._trackChanged(P?.track,I);G&&(F&&!ue||this.emitDailyJSEvent({action:sb,track:I,participant:h,type:u}))}}},{key:"maybeParticipantTracksStopped",value:function(u,p){if(u)for(var h in u.tracks)this.maybeEventTrackStopped(h,u,p)}},{key:"maybeParticipantTracksStarted",value:function(u,p){if(p)for(var h in p.tracks)this.maybeEventTrackStarted(h,u,p)}},{key:"compareEqualForRMPUpdateEvent",value:function(u,p){var h,w;return u.state===p.state&&((h=u.settings)===null||h===void 0?void 0:h.volume)===((w=p.settings)===null||w===void 0?void 0:w.volume)}},{key:"emitDailyJSEvent",value:function(u){try{u.callClientId=this.callClientId,this.emit(u.action,u)}catch(p){console.log("could not emit",u,p)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(u,p){return!!Ke(u,p)&&(!u.videoTrack||!p.videoTrack||u.videoTrack.id===p.videoTrack.id&&u.videoTrack.muted===p.videoTrack.muted&&u.videoTrack.enabled===p.videoTrack.enabled)&&(!u.audioTrack||!p.audioTrack||u.audioTrack.id===p.audioTrack.id&&u.audioTrack.muted===p.audioTrack.muted&&u.audioTrack.enabled===p.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return fe()?typeof DailyNativeUtils>"u"?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(u){this._updateCallState(this._callState,u)}},{key:"_updateCallState",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._isPreparingToJoin;if(u!==this._callState||p!==this._isPreparingToJoin){var h=this._callState,w=this._isPreparingToJoin;this._callState=u,this._isPreparingToJoin=p;var k=this._callState===yn;this.updateShowAndroidOngoingMeetingNotification(k);var P=qi(h,w),D=qi(this._callState,this._isPreparingToJoin);P!==D&&(this.updateKeepDeviceAwake(D),this.updateDeviceAudioMode(D),this.updateNoOpRecordingEnsuringBackgroundContinuity(D))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=lf,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:ja},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=ts(cf,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=Ra,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(u){fe()&&this.nativeUtils().setKeepDeviceAwake(u,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(u){if(fe()&&!this.disableReactNativeAutoDeviceManagement("audio")){var p=u?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(p)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(u){if(fe()&&this.nativeUtils().setShowOngoingMeetingNotification){var p,h,w,k;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var P=this.properties.reactNativeConfig.androidInCallNotification;p=P.title,h=P.subtitle,w=P.iconName,k=P.disableForCustomOverride}k&&(u=!1),this.nativeUtils().setShowOngoingMeetingNotification(u,p,h,w,this.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(u){fe()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(u)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var u;if(fe()){var p=(u=this._callMachine())===null||u===void 0||(u=u.store)===null||u===void 0?void 0:u.getState();for(var h in p?.streams){var w=p.streams[h];w&&w.pendingTrack&&w.pendingTrack.kind==="audio"&&(w.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(u){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[u]}},{key:"absoluteUrl",value:function(u){if(u!==void 0){var p=document.createElement("a");return p.href=u,p.href}}},{key:"sayHello",value:function(){var u="hello, world.";return console.log(u),u}},{key:"_logUseAfterDestroy",value:function(){var u=Object.values(wn)[0];if(this.needsLoad())if(u&&!u.needsLoad()){var p={action:Bi,level:"error",code:this.strictMode?9995:9997};u.sendMessageToCallMachine(p)}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 h={action:Bi,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(h,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var u=0,p=Object.values(wn);u<p.length;u++){var h=p[u];h._callMachineInitialized?(h.sendMessageToCallMachine({action:Bi,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),h._delayDuplicateInstanceLog=!1):h._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(u){var p,h,w,k;if(!((p=u.error)!==null&&p!==void 0&&p.type&&(![By,Fy,md].includes(u.error.type)||u.error.type===md&&u.error.msg.includes("deleted")))){var P=(h=this.properties)!==null&&h!==void 0&&h.url?new URL(this.properties.url):void 0,D="production";P&&P.host.includes(".staging.daily")&&(D="staging");var I,F,G,ue,nt,Dt=(function(Ln){const Te=[ny(),ey(),Py(),My(),Dy(),jy(),ay(),Ly()];return Ln.autoSessionTracking!==!1&&Te.push(Iy()),Te})({}).filter((function(Ln){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(Ln.name)})),In=new py({dsn:"https://f10f1c81e5d44a4098416c0867a8b740@o77906.ingest.sentry.io/168844",transport:by,stackParser:Ty,integrations:Dt,environment:D}),Ae=new Gt;if(Ae.setClient(In),In.init(),this.session_id&&Ae.setExtra("sessionId",this.session_id),this.properties){var et=H({},this.properties);et.userName=et.userName?"[Filtered]":void 0,et.userData=et.userData?"[Filtered]":void 0,et.token=et.token?"[Filtered]":void 0,Ae.setExtra("properties",et)}if(P){var Ut=P.searchParams.get("domain");if(!Ut){var Dn=P.host.match(/(.*?)\./);Ut=Dn&&Dn[1]||""}Ut&&Ae.setTag("domain",Ut)}u.error&&(Ae.setTag("fatalErrorType",u.error.type),Ae.setExtra("errorDetails",u.error.details),!((I=u.error.details)===null||I===void 0)&&I.uri&&Ae.setTag("serverAddress",u.error.details.uri),!((F=u.error.details)===null||F===void 0)&&F.workerGroup&&Ae.setTag("workerGroup",u.error.details.workerGroup),!((G=u.error.details)===null||G===void 0)&&G.geoGroup&&Ae.setTag("geoGroup",u.error.details.geoGroup),!((ue=u.error.details)===null||ue===void 0)&&ue.on&&Ae.setTag("connectionAttempt",u.error.details.on),(nt=u.error.details)!==null&&nt!==void 0&&nt.bundleUrl&&(Ae.setTag("bundleUrl",u.error.details.bundleUrl),Ae.setTag("bundleError",u.error.details.sourceError.type))),Ae.setTags({callMode:this._callObjectMode?fe()?"reactNative":(w=this.properties)!==null&&w!==void 0&&(w=w.dailyConfig)!==null&&w!==void 0&&(w=w.callMode)!==null&&w!==void 0&&w.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:e.version()});var hr=((k=u.error)===null||k===void 0?void 0:k.msg)||u.errorMsg;Ae.captureException(new Error(hr))}}},{key:"_callMachine",value:function(){var u;return(u=window._daily)===null||u===void 0||(u=u.instances)===null||u===void 0||(u=u[this.callClientId])===null||u===void 0?void 0:u.callMachine}},{key:"_maybeUpdateInputSettings",value:function(u){if(!Ke(this._inputSettings,u)){var p=this._getInputSettings();this._inputSettings=u;var h=this._getInputSettings();Ke(p,h)||this.emitDailyJSEvent({action:bd,inputSettings:h})}}}],[{key:"supportedBrowser",value:function(){if(fe())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var u=kv.getParser(ft());return{supported:!!$a(),mobile:u.getPlatformType()==="mobile",name:u.getBrowserName(),version:u.getBrowserVersion(),supportsFullscreen:!!Pd(),supportsScreenShare:!!Vb(),supportsSfu:!!$a(),supportsVideoProcessing:Ed(),supportsAudioProcessing:Ad()}}},{key:"version",value:function(){return"0.85.0"}},{key:"createCallObject",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return u.layout="none",new e(null,u)}},{key:"wrap",value:function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(he(),!u||!u.contentWindow||typeof u.src!="string")throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return p.layout||(p.customLayout?p.layout="custom-v1":p.layout="browser"),new e(u,p)}},{key:"createFrame",value:function(u,p){var h,w;he(),u&&p?(h=u,w=p):u&&u.append?(h=u,w={}):(h=document.body,w=u||{});var k=w.iframeStyle;k||(k=h===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 P=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?P.allow="microphone, camera":P.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",P.style.visibility="hidden",h.appendChild(P),P.style.visibility=null,Object.keys(k).forEach((function(D){return P.style[D]=k[D]})),w.layout||(w.customLayout?w.layout="custom-v1":w.layout="browser");try{return new e(P,w)}catch(D){throw h.removeChild(P),D}}},{key:"createTransparentFrame",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};he();var p=document.createElement("iframe");return p.allow="microphone; camera; autoplay",p.style.cssText=`
26
26
  position: fixed;
27
27
  top: 0;
28
28
  left: 0;
@@ -30,14 +30,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
30
30
  height: 100%;
31
31
  border: 0;
32
32
  pointer-events: none;
33
- `,document.body.appendChild(p),u.layout||(u.layout="custom-v1"),e.wrap(p,u)}},{key:"getCallInstance",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?wn[u]:Object.values(wn)[0]}}]);var t,n,r,i,o,a,s,c,l,d,f,m,g,y,v,b,_,S,T,M,x,C,E,O,V,B,N,z,R,ee,X,Z,W,K,$,U,ie,le})();function hf(e){if(e.extension){if(typeof e.extension!="string")throw new Error("Error starting dial out: extension must be a string");if(e.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!="number")throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(e.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!e.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function Gn(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]=Ft;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 o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function _e(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==yn){var n="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function Ji(e,t){return[La,yn].includes(e)||t}function Qa(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(Ji(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function qi(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="".concat(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+=" ".concat(n)),console.error(r),new Error(r)}}function Za(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(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),new Error(t)}}function wt(e){if(!e){var t="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function st(e){if(e){var t="".concat(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),new Error(t)}}function he(){if(fe())throw new Error("This daily-js method is not currently supported in React Native")}function Ir(){if(!fe())throw new Error("This daily-js method is only supported in React Native")}function pf(e){if(e===void 0)return!0;var t;if(typeof e=="string")t=e;else try{t=JSON.stringify(e),Ke(JSON.parse(t),e)||console.warn("The userData provided will be modified when serialized.")}catch(n){throw Error("userData must be serializable to JSON: ".concat(n))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function mf(e,t){for(var n=t.allowAllParticipantsKey,r=function(f){var m=["local"];return n||m.push("*"),f&&!m.includes(f)},i=function(f){return!!(f.layer===void 0||Number.isInteger(f.layer)&&f.layer>=0||f.layer==="inherit")},o=function(f){return!!f&&!(f.video&&!i(f.video))&&!(f.screenVideo&&!i(f.screenVideo))},a=0,s=Object.entries(e);a<s.length;a++){var c=ze(s[a],2),l=c[0],d=c[1];if(!r(l)||!o(d))return!1}return!0}function gf(e){if(me(e)!=="object")return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=ze(n[t],2),i=r[0],o=r[1];switch(i){case"video":if(me(o)!=="object")return!1;for(var a=0,s=Object.entries(o);a<s.length;a++){var c=ze(s[a],2),l=c[0],d=c[1];switch(l){case"processor":if(!d0(d))return!1;break;case"settings":if(!yf(d))return!1;break;default:return!1}}break;case"audio":if(me(o)!=="object")return!1;for(var f=0,m=Object.entries(o);f<m.length;f++){var g=ze(m[f],2),y=g[0],v=g[1];switch(y){case"processor":if(!u0(v))return!1;break;case"settings":if(!yf(v))return!1;break;default:return!1}}break;default:return!1}}return!0}function vf(e,t,n){var r,i=[];e.video&&e.video.processor&&(Ed((r=t?.useLegacyVideoProcessor)!==null&&r!==void 0&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push("video"))),e.audio&&e.audio.processor&&(Ad()||(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): ".concat(i.join(", "))),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:Ft}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:Ft}):delete n.videoTrack)}function u0(e){if(fe())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type"];return!!e&&me(e)==="object"&&(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> audio -> processor : ".concat(n)),delete e[n]})),!!(function(n){return typeof n!="string"?!1:Object.values(Td).includes(n)?!0:(console.error("inputSettings audio processor type invalid"),!1)})(e.type))}function d0(e){if(fe())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type","config"];return!e||me(e)!=="object"||!(function(n){return typeof n!="string"?!1:Object.values(Bi).includes(n)?!0:(console.error("inputSettings video processor type invalid"),!1)})(e.type)||e.config&&(me(e.config)!=="object"||!(function(n,r){var i=Object.keys(r);if(i.length===0)return!0;var o="invalid object in inputSettings -> video -> processor -> config";switch(n){case Bi.BGBLUR:return i.length>1||i[0]!=="strength"?(console.error(o),!1):!(typeof r.strength!="number"||r.strength<=0||r.strength>1||isNaN(r.strength))||(console.error("".concat(o,"; expected: {0 < strength <= 1}, got: ").concat(r.strength)),!1);case Bi.BGIMAGE:return!(r.source!==void 0&&!(function(a){if(a.source==="default")return a.type="default",!0;if(a.source instanceof ArrayBuffer)return!0;if(yi(a.source))return a.type="url",!!(function(l){var d=new URL(l),f=d.pathname;if(d.protocol==="data:")try{var m=f.substring(f.indexOf(":")+1,f.indexOf(";")).split("/")[1];return Fa.includes(m)}catch(y){return console.error("failed to deduce blob content type",y),!1}var g=f.split(".").at(-1).toLowerCase().trim();return Fa.includes(g)})(a.source)||(console.error("invalid image type; supported types: [".concat(Fa.join(", "),"]")),!1);return s=a.source,c=Number(s),isNaN(c)||!Number.isInteger(c)||c<=0||c>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(a.type="daily-preselect",!0);var s,c})(r));default:return!0}})(e.type,e.config))?!1:(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> video -> processor : ".concat(n)),delete e[n]})),!0)}function yf(e){return me(e)==="object"&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function es(){var e=Object.values(Bi).join(" | "),t=Object.values(Td).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function bf(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Ny).concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function _f(){return"customIntegrations should be an object of type ".concat(JSON.stringify(Xa),".")}function wf(e){if(e&&me(e)!=="object"||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Wi),".")),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=ze(n[t],1)[0],i=0,o=Object.entries(e[r]);i<o.length;i++){var a=ze(o[i],2),s=a[0],c=a[1],l=Wi.id[s];if(!l)return console.error("customTrayButton does not support key ".concat(s)),!1;switch(s){case"iconPath":case"iconPathDarkMode":if(!yi(c))return console.error("customTrayButton ".concat(s," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(c))return console.error("customTrayButton ".concat(s," should be ").concat(l,". Got: ").concat(c)),!1;break;default:if(me(c)!==l)return console.error("customTrayButton ".concat(s," should be a ").concat(l,".")),!1}}return!0}function kf(e){if(!e||e&&me(e)!=="object"||Array.isArray(e))return console.error(_f()),!1;for(var t=function(f){return"".concat(f," should be ").concat(Xa.id[f])},n=function(f,m){return console.error("customIntegration ".concat(f,": ").concat(m))},r=0,i=Object.entries(e);r<i.length;r++){var o=ze(i[r],1)[0];if(!("label"in e[o]))return n(o,"label is required"),!1;if(!("location"in e[o]))return n(o,"location is required"),!1;if(!("src"in e[o])&&!("srcdoc"in e[o]))return n(o,"src or srcdoc is required"),!1;for(var a=0,s=Object.entries(e[o]);a<s.length;a++){var c=ze(s[a],2),l=c[0],d=c[1];switch(l){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof d!="string")return n(o,t(l)),!1;break;case"iconURL":if(!yi(d))return n(o,"".concat(l," should be a url")),!1;break;case"src":if("srcdoc"in e[o])return n(o,"cannot have both src and srcdoc"),!1;if(!yi(d))return n(o,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[o])return n(o,"cannot have both src and srcdoc"),!1;if(typeof d!="string")return n(o,t(l)),!1;break;case"location":if(!["main","sidebar"].includes(d))return n(o,t(l)),!1;break;case"controlledBy":if(d!=="*"&&d!=="owners"&&(!Array.isArray(d)||d.some((function(f){return typeof f!="string"}))))return n(o,t(l)),!1;break;case"shared":if((!Array.isArray(d)||d.some((function(f){return typeof f!="string"})))&&d!=="owners"&&typeof d!="boolean")return n(o,t(l)),!1;break;default:if(!Xa.id[l])return console.error("customIntegration does not support key ".concat(l)),!1}}}return!0}function Sf(e,t){if(t===void 0)return!1;switch(me(t)){case"string":return me(e)===t;case"object":if(me(e)!=="object")return!1;for(var n in e)if(!Sf(e[n],t[n]))return!1;return!0;default:return!1}}function xf(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,o=e.useSipRefer;if(!n||!r)throw new Error("".concat(t,"() requires a sessionId and toEndPoint"));if(typeof n!="string"||typeof r!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(o&&!r.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!r.startsWith("sip:")&&!r.startsWith("+"))throw new Error("toEndPoint: ".concat(r,' must starts with either "sip:" or "+"'));if(i&&typeof i!="string")throw new Error("callerId must be of type string");if(i&&!r.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function Tf(e){if(me(e)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(Va).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(Va));if(e.volume){if(typeof e.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(e.volume<0||e.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function Mf(e,t,n){return!(typeof e!="number"||e<t||e>n)}function ts(e,t){return e&&!t&&delete e.data,e}function ct(e){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(e)}var se=function(){return se=Object.assign||function(n){for(var r,i=1,o=arguments.length;i<o;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n},se.apply(this,arguments)};function ns(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 Kn(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{l(r.next(d))}catch(f){a(f)}}function c(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((r=r.apply(e,[])).next())})}function Yn(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return c([l,d])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Cf(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 new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function we(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function He(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Pf=Le(null),kt=function(){var t=ye(Pf);return rt(t),t},rs=Le({on:function(){},off:function(){}}),f0=-1,is=function(){return f0--},h0=1,os=function(){return h0++},q=function(t,n,r){r===void 0&&(r=!1);var i=ye(rs),o=i.off,a=i.on,s=we(te(!1),2),c=s[0],l=s[1],d=ae(0),f=Ne(function(){return r?is():os()},[r]);J(function(){if(!(!t||c)){if(d.current>1e5){console.error(`useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.
33
+ `,document.body.appendChild(p),u.layout||(u.layout="custom-v1"),e.wrap(p,u)}},{key:"getCallInstance",value:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?wn[u]:Object.values(wn)[0]}}]);var t,n,r,i,o,a,s,c,l,d,f,m,g,y,v,b,_,S,T,M,x,C,E,O,V,B,N,z,R,ee,X,Z,W,K,$,U,ie,le})();function hf(e){if(e.extension){if(typeof e.extension!="string")throw new Error("Error starting dial out: extension must be a string");if(e.extension.length>20)throw new Error("Error starting dial out: extension length must be less than or equal to 20")}if(e.waitBeforeExtensionDialSec){if(typeof e.waitBeforeExtensionDialSec!="number")throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be a number");if(e.waitBeforeExtensionDialSec>60)throw new Error("Error starting dial out: waitBeforeExtensionDialSec must be less than or equal to 60");if(!e.extension)throw new Error("Error starting dial out: waitBeforeExtensionDialSec requires a phoneNumber and extension")}}function Gn(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]=Ft;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 o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function _e(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==yn){var n="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function qi(e,t){return[La,yn].includes(e)||t}function Qa(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(qi(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function Gi(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="".concat(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+=" ".concat(n)),console.error(r),new Error(r)}}function Za(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(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),new Error(t)}}function wt(e){if(!e){var t="".concat(arguments.length>1&&arguments[1]!==void 0?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function st(e){if(e){var t="".concat(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),new Error(t)}}function he(){if(fe())throw new Error("This daily-js method is not currently supported in React Native")}function Ir(){if(!fe())throw new Error("This daily-js method is only supported in React Native")}function pf(e){if(e===void 0)return!0;var t;if(typeof e=="string")t=e;else try{t=JSON.stringify(e),Ke(JSON.parse(t),e)||console.warn("The userData provided will be modified when serialized.")}catch(n){throw Error("userData must be serializable to JSON: ".concat(n))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function mf(e,t){for(var n=t.allowAllParticipantsKey,r=function(f){var m=["local"];return n||m.push("*"),f&&!m.includes(f)},i=function(f){return!!(f.layer===void 0||Number.isInteger(f.layer)&&f.layer>=0||f.layer==="inherit")},o=function(f){return!!f&&!(f.video&&!i(f.video))&&!(f.screenVideo&&!i(f.screenVideo))},a=0,s=Object.entries(e);a<s.length;a++){var c=ze(s[a],2),l=c[0],d=c[1];if(!r(l)||!o(d))return!1}return!0}function gf(e){if(me(e)!=="object")return!1;for(var t=0,n=Object.entries(e);t<n.length;t++){var r=ze(n[t],2),i=r[0],o=r[1];switch(i){case"video":if(me(o)!=="object")return!1;for(var a=0,s=Object.entries(o);a<s.length;a++){var c=ze(s[a],2),l=c[0],d=c[1];switch(l){case"processor":if(!f0(d))return!1;break;case"settings":if(!yf(d))return!1;break;default:return!1}}break;case"audio":if(me(o)!=="object")return!1;for(var f=0,m=Object.entries(o);f<m.length;f++){var g=ze(m[f],2),y=g[0],v=g[1];switch(y){case"processor":if(!d0(v))return!1;break;case"settings":if(!yf(v))return!1;break;default:return!1}}break;default:return!1}}return!0}function vf(e,t,n){var r,i=[];e.video&&e.video.processor&&(Ed((r=t?.useLegacyVideoProcessor)!==null&&r!==void 0&&r)||(e.video.settings?delete e.video.processor:delete e.video,i.push("video"))),e.audio&&e.audio.processor&&(Ad()||(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): ".concat(i.join(", "))),e.audio&&e.audio.settings&&(e.audio.settings.customTrack?(n.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:Ft}):delete n.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(n.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:Ft}):delete n.videoTrack)}function d0(e){if(fe())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type"];return!!e&&me(e)==="object"&&(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> audio -> processor : ".concat(n)),delete e[n]})),!!(function(n){return typeof n!="string"?!1:Object.values(Td).includes(n)?!0:(console.error("inputSettings audio processor type invalid"),!1)})(e.type))}function f0(e){if(fe())return console.warn("Video processing is not yet supported in React Native"),!1;var t=["type","config"];return!e||me(e)!=="object"||!(function(n){return typeof n!="string"?!1:Object.values($i).includes(n)?!0:(console.error("inputSettings video processor type invalid"),!1)})(e.type)||e.config&&(me(e.config)!=="object"||!(function(n,r){var i=Object.keys(r);if(i.length===0)return!0;var o="invalid object in inputSettings -> video -> processor -> config";switch(n){case $i.BGBLUR:return i.length>1||i[0]!=="strength"?(console.error(o),!1):!(typeof r.strength!="number"||r.strength<=0||r.strength>1||isNaN(r.strength))||(console.error("".concat(o,"; expected: {0 < strength <= 1}, got: ").concat(r.strength)),!1);case $i.BGIMAGE:return!(r.source!==void 0&&!(function(a){if(a.source==="default")return a.type="default",!0;if(a.source instanceof ArrayBuffer)return!0;if(bi(a.source))return a.type="url",!!(function(l){var d=new URL(l),f=d.pathname;if(d.protocol==="data:")try{var m=f.substring(f.indexOf(":")+1,f.indexOf(";")).split("/")[1];return Fa.includes(m)}catch(y){return console.error("failed to deduce blob content type",y),!1}var g=f.split(".").at(-1).toLowerCase().trim();return Fa.includes(g)})(a.source)||(console.error("invalid image type; supported types: [".concat(Fa.join(", "),"]")),!1);return s=a.source,c=Number(s),isNaN(c)||!Number.isInteger(c)||c<=0||c>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(a.type="daily-preselect",!0);var s,c})(r));default:return!0}})(e.type,e.config))?!1:(Object.keys(e).filter((function(n){return!t.includes(n)})).forEach((function(n){console.warn("invalid key inputSettings -> video -> processor : ".concat(n)),delete e[n]})),!0)}function yf(e){return me(e)==="object"&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function es(){var e=Object.values($i).join(" | "),t=Object.values(Td).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function bf(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Vy).concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function _f(){return"customIntegrations should be an object of type ".concat(JSON.stringify(Xa),".")}function wf(e){if(e&&me(e)!=="object"||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Hi),".")),!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=ze(n[t],1)[0],i=0,o=Object.entries(e[r]);i<o.length;i++){var a=ze(o[i],2),s=a[0],c=a[1],l=Hi.id[s];if(!l)return console.error("customTrayButton does not support key ".concat(s)),!1;switch(s){case"iconPath":case"iconPathDarkMode":if(!bi(c))return console.error("customTrayButton ".concat(s," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(c))return console.error("customTrayButton ".concat(s," should be ").concat(l,". Got: ").concat(c)),!1;break;default:if(me(c)!==l)return console.error("customTrayButton ".concat(s," should be a ").concat(l,".")),!1}}return!0}function kf(e){if(!e||e&&me(e)!=="object"||Array.isArray(e))return console.error(_f()),!1;for(var t=function(f){return"".concat(f," should be ").concat(Xa.id[f])},n=function(f,m){return console.error("customIntegration ".concat(f,": ").concat(m))},r=0,i=Object.entries(e);r<i.length;r++){var o=ze(i[r],1)[0];if(!("label"in e[o]))return n(o,"label is required"),!1;if(!("location"in e[o]))return n(o,"location is required"),!1;if(!("src"in e[o])&&!("srcdoc"in e[o]))return n(o,"src or srcdoc is required"),!1;for(var a=0,s=Object.entries(e[o]);a<s.length;a++){var c=ze(s[a],2),l=c[0],d=c[1];switch(l){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if(typeof d!="string")return n(o,t(l)),!1;break;case"iconURL":if(!bi(d))return n(o,"".concat(l," should be a url")),!1;break;case"src":if("srcdoc"in e[o])return n(o,"cannot have both src and srcdoc"),!1;if(!bi(d))return n(o,'src "'.concat(d,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[o])return n(o,"cannot have both src and srcdoc"),!1;if(typeof d!="string")return n(o,t(l)),!1;break;case"location":if(!["main","sidebar"].includes(d))return n(o,t(l)),!1;break;case"controlledBy":if(d!=="*"&&d!=="owners"&&(!Array.isArray(d)||d.some((function(f){return typeof f!="string"}))))return n(o,t(l)),!1;break;case"shared":if((!Array.isArray(d)||d.some((function(f){return typeof f!="string"})))&&d!=="owners"&&typeof d!="boolean")return n(o,t(l)),!1;break;default:if(!Xa.id[l])return console.error("customIntegration does not support key ".concat(l)),!1}}}return!0}function Sf(e,t){if(t===void 0)return!1;switch(me(t)){case"string":return me(e)===t;case"object":if(me(e)!=="object")return!1;for(var n in e)if(!Sf(e[n],t[n]))return!1;return!0;default:return!1}}function xf(e,t){var n=e.sessionId,r=e.toEndPoint,i=e.callerId,o=e.useSipRefer;if(!n||!r)throw new Error("".concat(t,"() requires a sessionId and toEndPoint"));if(typeof n!="string"||typeof r!="string")throw new Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(o&&!r.startsWith("sip:"))throw new Error('"toEndPoint" must be a "sip" address');if(!r.startsWith("sip:")&&!r.startsWith("+"))throw new Error("toEndPoint: ".concat(r,' must starts with either "sip:" or "+"'));if(i&&typeof i!="string")throw new Error("callerId must be of type string");if(i&&!r.startsWith("+"))throw new Error("callerId is only valid when transferring to a PSTN number")}function Tf(e){if(me(e)!=="object")throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(Va).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(Va));if(e.volume){if(typeof e.volume!="number")throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(e.volume<0||e.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function Mf(e,t,n){return!(typeof e!="number"||e<t||e>n)}function ts(e,t){return e&&!t&&delete e.data,e}function ct(e){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(e)}var se=function(){return se=Object.assign||function(n){for(var r,i=1,o=arguments.length;i<o;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n},se.apply(this,arguments)};function ns(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 Kn(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{l(r.next(d))}catch(f){a(f)}}function c(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((r=r.apply(e,[])).next())})}function Yn(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return c([l,d])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1],o=l;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(l);break}o[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],i=0}finally{r=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Cf(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 new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function we(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function He(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Pf=Le(null),kt=function(){var t=ye(Pf);return rt(t),t},rs=Le({on:function(){},off:function(){}}),h0=-1,is=function(){return h0--},p0=1,os=function(){return p0++},q=function(t,n,r){r===void 0&&(r=!1);var i=ye(rs),o=i.off,a=i.on,s=we(te(!1),2),c=s[0],l=s[1],d=ae(0),f=Ne(function(){return r?is():os()},[r]);J(function(){if(!(!t||c)){if(d.current>1e5){console.error(`useDailyEvent called with potentially non-memoized event callback or due to too many re-renders.
34
34
  Memoize using useCallback to avoid re-render loop or reduce the amount of state transitions the callback depends on.
35
- Passed callback for '`.concat(t,"' event is NOT registered."),n),l(!0);return}d.current++;var m=setTimeout(function(){d.current=0},50);return a(t,n,f),function(){clearTimeout(m),o(t,f)}}},[n,t,f,c,o,a]),rt({event:t,eventId:f,isBlocked:c,callback:n})};function St(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(!St(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(y,v){return St(y,t.getTracks()[v])});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 o=Array.from(e).sort(),a=Array.from(t).sort();return o.every(function(y,v){return St(y,a[v])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=Cf(e.entries()),c=s.next();!c.done;c=s.next()){var l=we(c.value,2),d=l[0],f=l[1];if(!t.has(d)||!St(f,t.get(d)))return!1}}catch(y){n={error:y}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(ct(e)!=="object"||e===null||ct(t)!=="object"||t===null)return!1;var m=Object.keys(e),g=Object.keys(t);if(m.length!==g.length)return!1;for(var i=0;i<m.length;i++){var d=m[i];if(!Object.prototype.hasOwnProperty.call(t,d)||!St(e[d],t[d]))return!1}return!0}function as(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],o=r!==null&&ct(r)==="object",a=i!==null&&ct(i)==="object";if(o||a){if(!St(r,i))return!1}else if(r!==i)return!1}return!0}function ve(e){return"daily-react-"+e}function ss(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=de(function(o){var a=e.get(r)(o),s=n.get(r);return s!=null&&e.equals(a,s)?s:(n.set(r,a),a)});t.set(r,i)}return t.get(r)}}var cs="::",Ef=";",ls=function(t,n){return t+cs+n},p0=function(t,n){return t+cs+n.join(Ef)},Je=function(t,n){return us(ls(t,n))},Xn=br(function(e){var t=de([]);return t.debugLabel=ve("participant-property-paths-".concat(e)),t}),us=br(function(e){var t=de(null);return t.debugLabel=ve("participant-property-".concat(e)),t}),m0=ss({equals:as,get:function(t){return function(n){var r=we(t.split(cs),2),i=r[0],o=r[1],a=o.split(Ef);return a.map(function(s){return n(Je(i,s))})}}}),Af=function(t,n){var r,i=sn(Array.isArray(n)?m0(p0(t,n)):us(ls(t,n)));return rt(Array.isArray(n)?n.reduce(function(o,a,s){return o[a]=i[s],o},{}):(r={},r[n]=i,r)),i},Gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function g0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ds,Of;function v0(){if(Of)return ds;Of=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=ct(Gi)=="object"&&Gi&&Gi.Object===Object&&Gi,l=(typeof self>"u"?"undefined":ct(self))=="object"&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),f=Object.prototype,m=f.toString,g=Math.max,y=Math.min,v=function(){return d.Date.now()};function b(C,E,O){var V,B,N,z,R,ee,X=0,Z=!1,W=!1,K=!0;if(typeof C!="function")throw new TypeError(e);E=x(E)||0,S(O)&&(Z=!!O.leading,W="maxWait"in O,N=W?g(x(O.maxWait)||0,E):N,K="trailing"in O?!!O.trailing:K);function $(P){var D=V,I=B;return V=B=void 0,X=P,z=C.apply(I,D),z}function U(P){return X=P,R=setTimeout(u,E),Z?$(P):z}function ie(P){var D=P-ee,I=P-X,F=E-D;return W?y(F,N-I):F}function le(P){var D=P-ee,I=P-X;return ee===void 0||D>=E||D<0||W&&I>=N}function u(){var P=v();if(le(P))return p(P);R=setTimeout(u,ie(P))}function p(P){return R=void 0,K&&V?$(P):(V=B=void 0,z)}function h(){R!==void 0&&clearTimeout(R),X=0,V=ee=B=R=void 0}function w(){return R===void 0?z:p(v())}function k(){var P=v(),D=le(P);if(V=arguments,B=this,ee=P,D){if(R===void 0)return U(ee);if(W)return R=setTimeout(u,E),$(ee)}return R===void 0&&(R=setTimeout(u,E)),z}return k.cancel=h,k.flush=w,k}function _(C,E,O){var V=!0,B=!0;if(typeof C!="function")throw new TypeError(e);return S(O)&&(V="leading"in O?!!O.leading:V,B="trailing"in O?!!O.trailing:B),b(C,E,{leading:V,maxWait:E,trailing:B})}function S(C){var E=ct(C);return!!C&&(E=="object"||E=="function")}function T(C){return!!C&&ct(C)=="object"}function M(C){return ct(C)=="symbol"||T(C)&&m.call(C)==n}function x(C){if(typeof C=="number")return C;if(M(C))return t;if(S(C)){var E=typeof C.valueOf=="function"?C.valueOf():C;C=S(E)?E+"":E}if(typeof C!="string")return C===0?C:+C;C=C.replace(r,"");var O=o.test(C);return O||a.test(C)?s(C.slice(2),O?2:8):i.test(C)?t:+C}return ds=_,ds}var y0=v0(),b0=g0(y0),Ki=function(t,n,r,i){r===void 0&&(r=500),i===void 0&&(i=!1);var o=ye(rs),a=o.off,s=o.on,c=Ne(function(){var f;return Array.isArray(t)?t.reduce(function(m,g){return m[g]=i?is():os(),m},{}):(f={},f[t]=i?is():os(),f)},[t,i]),l=ae([]);q("call-instance-destroyed",j(function(){l.current.length=0},[]));var d=Ne(function(){return b0(function(){l.current.length!==0&&(n(l.current),l.current.length=0)},r,{trailing:!0})},[n,r]);J(function(){if(t){var f=function(g){l.current.push(g),d()};return Array.isArray(t)?t.forEach(function(m){return s(m,f,c[m])}):s(t,f,c[t]),function(){Array.isArray(t)?t.forEach(function(m){return a(m,c[m])}):a(t,c[t])}}},[d,t,c,a,s]),rt({event:t,eventId:c})},If=function(t,n,r){if(n===void 0&&(n=""),r===void 0&&(r=new Set),ct(t)!=="object"||t===null||r.has(t))return[n];r.add(t);var i=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=n?"".concat(n,".").concat(o):o;i.push.apply(i,He([a],we(If(t[o],a,r)),!1))}return r.delete(t),i},fs=function(t){return If(t)},_0=function(t,n){return String(n).split(".").filter(function(r){return r.length}).reduce(function(r,i){return r&&r[i]},t)},hs=function(t,n){return n.map(function(r){return _0(t,r)})},Yi=de(null);Yi.debugLabel=ve("active-id");var Dr=de("");Dr.debugLabel=ve("local-id");var Df=de(null);Df.debugLabel=ve("local-join-date");var Sn=de([]);Sn.debugLabel=ve("participant-ids");var xn=br(function(e){var t=de(null);return t.debugLabel=ve("participant-".concat(e)),t}),ps=de([]);ps.debugLabel=ve("waiting-participants");var ms=br(function(e){var t=de({awaitingAccess:{level:"full"},id:e,name:""});return t.debugLabel=ve("waiting-participant-".concat(e)),t}),w0=function(t){var n=t.children,r=kt(),i=we(te(!1),2),o=i[0],a=i[1],s=ce(j(function(d,f,m){f(Dr,m.local.session_id);var g=Object.values(m),y=g.map(function(v){return v.session_id});f(Sn,y),g.forEach(function(v){f(xn(v.session_id),v);var b=fs(v);f(Xn(v.session_id),b),b.forEach(function(_){var S=we(hs(v,[_]),1),T=S[0];f(Je(v.session_id,_),T)})}),a(!0)},[]));J(function(){if(!(!r||o)){var d=setInterval(function(){var f=r.participants();"local"in f&&(s(f),clearInterval(d))},100);return function(){clearInterval(d)}}},[r,o,s]);var c=j(function(){if(r){var d=r?.participants();d.local&&s(d)}},[r,s]);q("started-camera",c,!0),q("access-state-updated",c,!0),q("joining-meeting",ce(j(function(d,f){f(Df,new Date),c()},[c])),!0),q("joined-meeting",j(function(d){s(d.participants)},[s]),!0);var l=ce(j(function(d,f){f(Dr,""),f(Yi,null);var m=d(Sn);m.forEach(function(g){return xn.remove(g)}),f(Sn,[])},[]));return q("call-instance-destroyed",l,!0),q("left-meeting",l,!0),Ki(["active-speaker-change","participant-joined","participant-updated","participant-left"],ce(j(function(d,f,m){m.length&&m.forEach(function(g){switch(g.action){case"active-speaker-change":{f(Yi,g.activeSpeaker.peerId),f(xn(g.activeSpeaker.peerId),function(M){return M?se(se({},M),{last_active:new Date}):null});break}case"participant-joined":{f(Sn,function(M){return M.includes(g.participant.session_id)?M:He(He([],we(M),!1),[g.participant.session_id],!1)}),f(xn(g.participant.session_id),g.participant);var y=fs(g.participant);f(Xn(g.participant.session_id),y),y.forEach(function(M){var x=we(hs(g.participant,[M]),1),C=x[0];f(Je(g.participant.session_id,M),C)});break}case"participant-updated":{f(xn(g.participant.session_id),g.participant),g.participant.local&&f(Dr,g.participant.session_id);var y=fs(g.participant),v=d(Xn(g.participant.session_id)),b=y.length!==v.length||y.some(function(x){return!v.includes(x)});b&&f(Xn(g.participant.session_id),y);var _=new Set(v),S=hs(g.participant,y);y.forEach(function(x,C){var E=S[C];_.delete(x),f(Je(g.participant.session_id,x),function(O){return St(O,E)?O:E})}),_.forEach(function(x){f(Je(g.participant.session_id,x),null)});break}case"participant-left":{f(Sn,function(M){return M.includes(g.participant.session_id)?M.filter(function(x){return x!==g.participant.session_id}):M}),xn.remove(g.participant.session_id);var T=d(Xn(g.participant.session_id));T.forEach(function(M){us.remove(ls(g.participant.session_id,M))}),Xn.remove(g.participant.session_id);break}}})},[])),100,!0),Ki(["waiting-participant-added","waiting-participant-updated","waiting-participant-removed"],ce(j(function(d,f,m){m.forEach(function(g){switch(g.action){case"waiting-participant-added":f(ps,function(y){return y.includes(g.participant.id)?y:He(He([],we(y),!1),[g.participant.id],!1)}),f(ms(g.participant.id),g.participant);break;case"waiting-participant-updated":f(ms(g.participant.id),g.participant);break;case"waiting-participant-removed":f(ps,function(y){return y.filter(function(v){return v!==g.participant.id})}),ms.remove(g.participant.id);break}})},[])),100,!0),pe.createElement(pe.Fragment,null,n)},Xi=function(){var t=sn(Dr);return rt(t),t},k0=function(){return!0},S0=function(t){var n=t===void 0?{}:t,r=n.filter,i=r===void 0?k0:r,o=n.ignoreLocal,a=o===void 0?!1:o,s=Xi(),c=sn(Yi),l=a&&c===s,d=!i?.(c),f=!l&&!d,m=we(te(f?c:null),2),g=m[0],y=m[1];return J(function(){l||d||y(c)},[d,l,c]),rt(g),g},Qi=function(t){return["blocked","off"].includes(t)},Lf=";",jf=function(t,n){return"".concat(t).concat(Lf).concat(n)},Rf=ss({equals:St,get:function(t){return function(n){var r=we(t.split(Lf),2),i=r[0],o=r[1],a=n(Sn);return a.filter(function(s){switch(i){case"local":case"owner":case"record":return n(Je(s,i));case"remote":return!n(Je(s,"local"));case"screen":{var c=n(Je(s,"tracks.screenAudio.state")),l=n(Je(s,"tracks.screenVideo.state"));return!Qi(c)||!Qi(l)}default:return!0}}).sort(function(s,c){switch(o){case"joined_at":case"session_id":case"user_id":case"user_name":{var l=n(Je(s,o)),d=n(Je(c,o));if(l!==void 0||d!==void 0){if(l===void 0)return-1;if(d===void 0||l>d)return 1;if(l<d)return-1}return 0}default:return 0}})}}}),Xt=function(t){var n=t===void 0?{}:t,r=n.filter,i=n.onActiveSpeakerChange,o=n.onParticipantJoined,a=n.onParticipantLeft,s=n.onParticipantUpdated,c=n.sort,l=sn(Rf(jf(typeof r=="string"?r:null,typeof c=="string"?c:null))),d=typeof r=="function"||typeof c=="function",f=j(function(_){if(typeof r!="function"&&typeof c!="function")return[];var S=l.map(function(T){return _(xn(T))});return S.filter(function(T){return!!T}).filter(typeof r=="function"?r:function(){return!0}).sort(typeof c=="function"?c:function(){return 0}).map(function(T){return T.session_id}).filter(Boolean)},[r,l,c]),m=we(te([]),2),g=m[0],y=m[1],v=ce(j(function(_){if(d){var S=f(_);St(S,g)||y(S)}},[g,f,d]));J(function(){v()},[v]),Ki(["participant-joined","participant-updated","active-speaker-change","participant-left"],j(function(_){_.length&&(_.forEach(function(S){switch(S.action){case"participant-joined":o?.(S);break;case"participant-updated":s?.(S);break;case"active-speaker-change":i?.(S);break;case"participant-left":a?.(S);break}}),v())},[v,i,o,a,s]));var b=typeof r=="function"||typeof c=="function"?g:l;return rt(b),b},x0=ss({equals:as,get:function(){return function(t){var n=t(Rf(jf("screen",null)));return n.map(function(r){return{local:t(Je(r,"local")),screenAudio:t(Je(r,"tracks.screenAudio")),screenVideo:t(Je(r,"tracks.screenVideo")),screenId:"".concat(r,"-screen"),session_id:r}})}}}),T0=function(t){var n={},r=n.onError,i=n.onLocalScreenShareStarted,o=n.onLocalScreenShareStopped,a=kt(),s=j(function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];a?.startScreenShare.apply(a,He([],we(f),!1))},[a]),c=j(function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];a?.stopScreenShare.apply(a,He([],we(f),!1))},[a]);q("local-screen-share-started",j(function(){return i?.()},[i])),q("local-screen-share-stopped",j(function(){return o?.()},[o])),q("nonfatal-error",j(function(f){f.type==="screen-share-error"&&r?.(f)},[r]));var l=sn(x0(void 0)),d={isSharingScreen:l.some(function(f){return f.local}),screens:l,startScreenShare:s,stopScreenShare:c};return rt(d),d},Nf=function(t,n){n===void 0&&(n="video");var r=Af(t,"tracks.".concat(n)),i=r?se(se({},r),{isOff:Qi(r.state)}):{isOff:!0,persistentTrack:void 0,state:"off",subscribed:!1};return rt(i),i};function Vf(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return j(function(n){for(var r=0;r<e.length;r++){var i=e[r];typeof i=="function"?i(n):i&&ct(i)==="object"&&(i.current=n)}},e)}var Zi=Jo(Ge(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,o=i===void 0?"audio":i,a=ns(e,["onPlayFailed","sessionId","type"]),s=ae(null),c=Nf(r,o),l=Vf(s,t),d=c?.subscribed;return J(function(){var f=s.current;if(!(!f||!c?.persistentTrack)){var m=function(){f.play().catch(function(y){n?.({sessionId:r,target:f,type:o,message:y.message,name:y.name})})};if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(o," for ").concat(r)),n?.({sessionId:r,target:f,type:o,message:"MediaStream API not available",name:"MediaStream API not available"});return}return f.addEventListener("canplay",m),f.srcObject=new MediaStream([c?.persistentTrack]),function(){f?.removeEventListener("canplay",m)}}},[c?.persistentTrack,n,r,o]),q("participant-left",j(function(f){var m=s.current;f.participant.session_id!==r||!m||(m.srcObject=null)},[r])),pe.createElement("audio",se({autoPlay:!0,ref:l},a,{"data-session-id":r,"data-audio-type":o,"data-subscribed":d}))}));Zi.displayName="DailyAudioTrack";var Ff=Jo(Ge(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,o=i===void 0?5:i,a=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=kt(),d=we(te(new Array(o).fill("")),2),f=d[0],m=d[1],g=T0().screens,y=Xi(),v=S0({ignoreLocal:!0}),b=ae(null);Ro(t,function(){return{getActiveSpeakerAudio:function(){var x,C;return(C=(x=b.current)===null||x===void 0?void 0:x.querySelector('audio[data-session-id="'.concat(v,'"][data-audio-type="audio"]')))!==null&&C!==void 0?C:null},getAllAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll("audio"))!==null&&C!==void 0?C:[])},getAudioBySessionId:function(x){var C,E;return(E=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="audio"]')))!==null&&E!==void 0?E:null},getRmpAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="rmpAudio"]'))!==null&&C!==void 0?C:[])},getScreenAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="screenAudio"]'))!==null&&C!==void 0?C:[])},getRmpAudioBySessionId:function(x){var C,E;return(E=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="rmpAudio"]')))!==null&&E!==void 0?E:null},getScreenAudioBySessionId:function(x){var C,E;return(E=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="screenAudio"]')))!==null&&E!==void 0?E:null}}},[v]);var _=ce(j(function(M,x,C){return Kn(void 0,void 0,void 0,function(){var E,O,V;return Yn(this,function(B){if(E=Object.values((V=l?.participants())!==null&&V!==void 0?V:{}).filter(function(N){return!N.local&&!!N.tracks.audio.subscribed}),O=function(z){return E.some(function(R){return R.session_id===z})},!O(C))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(C,{setSubscribedTracks:{audio:!0}});else return[2];return m(function(N){var z;if(N.includes(C))return N;var R=function(U){return!U||!O(U)};if(N.some(R)){var ee=N.findIndex(R);return N[ee]=C,He([],we(N),!1)}var X=N.findIndex(function($){return E.some(function(U){return U.session_id===$&&Qi(U.tracks.audio.state)})});if(X>=0)return N[X]=C,He([],we(N),!1);var Z=E.filter(function($){return N.includes($.session_id)&&$.session_id!==v}).sort(function($,U){var ie,le,u=(ie=M(Je($.session_id,"last_active")))!==null&&ie!==void 0?ie:new Date("1970-01-01"),p=(le=M(Je(U.session_id,"last_active")))!==null&&le!==void 0?le:new Date("1970-01-01");return u>p?1:u<p?-1:0});if(!Z.length){var W=N.findIndex(function($){return $!==v});return N[W]=C,He([],we(N),!1)}var K=N.indexOf((z=Z[0])===null||z===void 0?void 0:z.session_id);return N[K]=C,He([],we(N),!1)}),[2]})})},[v,r,l])),S=j(function(M){m(function(x){if(!x.includes(M))return x;var C=He([],we(x),!1),E=C.indexOf(M);return C[E]="",C})},[]);Ki(["active-speaker-change","track-started","participant-left"],j(function(M){M.forEach(function(x){switch(x.action){case"active-speaker-change":if(x.activeSpeaker.peerId===y)return;_(x.activeSpeaker.peerId);break;case"track-started":x.track.kind==="audio"&&x.participant&&!x.participant.local&&_(x.participant.session_id);break;case"participant-left":S(x.participant.session_id);break}})},[_,y,S]),200);var T=Xt({filter:j(function(M){var x;return!!(!((x=M?.tracks)===null||x===void 0)&&x.rmpAudio)},[])});return pe.createElement("div",{ref:b},f.map(function(M,x){return pe.createElement(Zi,{key:"speaker-slot-".concat(x),onPlayFailed:a,sessionId:M,type:"audio"})}),g.filter(function(M){return c?!0:!M.local}).map(function(M){return pe.createElement(Zi,{key:M.screenId,onPlayFailed:a,sessionId:M.session_id,type:"screenAudio"})}),T.map(function(M){return pe.createElement(Zi,{key:"".concat(M,"-rmp"),onPlayFailed:a,sessionId:M,type:"rmpAudio"})}))}));Ff.displayName="DailyAudio";var Bf=Ge(function(t,n){var r=t.automirror,i=t.fit,o=i===void 0?"contain":i,a=t.mirror,s=t.onResize,c=t.playableStyle,l=c===void 0?{}:c,d=t.sessionId,f=t.style,m=f===void 0?{}:f,g=t.type,y=g===void 0?"video":g,v=ns(t,["automirror","fit","mirror","onResize","playableStyle","sessionId","style","type"]),b=Xi(),_=b===d,S=y==="screenVideo",T=_&&!S,M=ae(null),x=Vf(M,n),C=Nf(d,y),E=C.persistentTrack,O=T||S||!C.isOff,V=Af(d,"tracks.".concat(y)),B=V?.subscribed,N=Ne(function(){if(typeof a=="boolean")return a;if(!r)return!1;if(!E)return T;var z=E.getSettings(),R="facingMode"in z?T&&z.facingMode==="user":T;return R},[r,T,a,E]);return J(function(){var R=M.current;if(R){var ee=function(){var U=R.play();U!==void 0&&U.then(function(){R.controls=!1}).catch(function(ie){R.controls=!0,console.warn("Failed to play video",ie)})},X=function(){R.paused&&ee()},Z=function(){R.style.transform="scale(1)"},W=function(){R.style.transform="",setTimeout(function(){R.paused&&ee()},100)},K=function(){document.visibilityState!=="hidden"&&R.paused&&ee()};return R.addEventListener("canplay",X),R.addEventListener("enterpictureinpicture",Z),R.addEventListener("leavepictureinpicture",W),document.addEventListener("visibilitychange",K),function(){R.removeEventListener("canplay",X),R.removeEventListener("enterpictureinpicture",Z),R.removeEventListener("leavepictureinpicture",W),document.removeEventListener("visibilitychange",K)}}},[]),J(function(){var R=M.current;if(!(!R||!E)){if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(y," for ").concat(d));return}return R.srcObject=new MediaStream([E]),R.load(),function(){R.srcObject=null,R.load()}}},[d,y,E,E?.id]),J(function(){var R=M.current;if(!s||!R)return;var ee;function X(){ee&&cancelAnimationFrame(ee),ee=requestAnimationFrame(function(){var Z=M.current;if(!(!Z||document.hidden)){var W=Z.videoWidth,K=Z.videoHeight;W&&K&&s?.({aspectRatio:W/K,height:K,width:W})}})}return X(),R.addEventListener("loadedmetadata",X),R.addEventListener("resize",X),function(){ee&&cancelAnimationFrame(ee),R.removeEventListener("loadedmetadata",X),R.removeEventListener("resize",X)}},[s]),pe.createElement("video",se({autoPlay:!0,muted:!0,playsInline:!0,ref:x,"data-local":_,"data-mirrored":N||void 0,"data-playable":O||void 0,"data-session-id":d,"data-subscribed":B,"data-video-type":y,style:se(se({objectFit:o,transform:N?"scale(-1, 1)":""},m),O?l:{})},v))});Bf.displayName="DailyVideo";var M0=Le({refreshDevices:function(){return Promise.resolve()}}),je=de("idle");je.debugLabel=ve("camera-state");var Re=de("idle");Re.debugLabel=ve("microphone-state");var eo=de([]);eo.debugLabel=ve("camera-devices");var to=de([]);to.debugLabel=ve("microphone-devices");var $f=de([]);$f.debugLabel=ve("speaker-devices");var Uf=de(null);Uf.debugLabel=ve("last-camera-error");var C0=function(t){var n=t.children,r=kt(),i=ce(j(function(a,s){return Kn(void 0,void 0,void 0,function(){var c,l,d,f,m,g,y,v,b,_,S,T;return Yn(this,function(M){switch(M.label){case 0:if(typeof((S=navigator?.mediaDevices)===null||S===void 0?void 0:S.getUserMedia)>"u"||typeof((T=navigator?.mediaDevices)===null||T===void 0?void 0:T.enumerateDevices)>"u")return s(je,"not-supported"),s(Re,"not-supported"),[2];if(!r)return[2];M.label=1;case 1:return M.trys.push([1,4,,5]),[4,r.enumerateDevices()];case 2:return c=M.sent().devices,l=c.filter(function(x){return x.kind==="videoinput"&&x.deviceId!==""}),d=c.filter(function(x){return x.kind==="audioinput"&&x.deviceId!==""}),f=c.filter(function(x){return x.kind==="audiooutput"&&x.deviceId!==""}),[4,r.getInputDevices()];case 3:return m=M.sent(),g=m.camera,y=m.mic,v=m.speaker,b=function(C,E,O){var V,B=O.find(function(R){return R.device.deviceId===E.deviceId}),N="deviceId"in C&&E.deviceId===C.deviceId,z=!("deviceId"in C)&&B?.selected;return{device:E,selected:N||!!z,state:(V=B?.state)!==null&&V!==void 0?V:"granted"}},_=function(C,E){return C.device.deviceId==="default"?-1:E.device.deviceId==="default"?1:C.device.label<E.device.label?-1:C.device.label>E.device.label?1:0},s(eo,function(x){return l.filter(Boolean).map(function(C){return b(g,C,x)}).sort(_)}),s(to,function(x){return d.filter(Boolean).map(function(C){return b(y,C,x)}).sort(_)}),s($f,function(x){return f.filter(Boolean).map(function(C){return b(v,C,x)}).sort(_)}),[3,5];case 4:return M.sent(),s(je,"not-supported"),s(Re,"not-supported"),[3,5];case 5:return[2]}})})},[r])),o=ce(j(function(a,s){return Kn(void 0,void 0,void 0,function(){var c,l,d,f,m,g,y,v,b,_,S,T,M,x,C,E,O,V,B,N,z,R,ee,X,Z,W;return Yn(this,function(K){switch(K.label){case 0:if(!r)return[2];if(c=a(je),l=a(Re),d=r.participants(),!d.local)return[2];if(f=d.local.tracks,m="prompt",g="prompt",!navigator.permissions)return[3,5];K.label=1;case 1:return K.trys.push([1,4,,5]),[4,navigator.permissions.query({name:"camera"})];case 2:return y=K.sent(),m=y.state,[4,navigator.permissions.query({name:"microphone"})];case 3:return v=K.sent(),g=v.state,[3,5];case 4:return K.sent(),[3,5];case 5:return b=m==="prompt"&&["idle","pending"].includes(c)&&f.video.state==="interrupted"&&!f.video.persistentTrack,_=["idle","pending"].includes(c)&&!f.video.persistentTrack&&!!(!((M=f.video.off)===null||M===void 0)&&M.byUser),S=g==="prompt"&&["idle","pending"].includes(l)&&f.audio.state==="interrupted"&&!f.audio.persistentTrack,T=["idle","pending"].includes(l)&&!f.audio.persistentTrack&&!!(!((x=f.audio.off)===null||x===void 0)&&x.byUser),!((E=(C=f.audio)===null||C===void 0?void 0:C.blocked)===null||E===void 0)&&E.byDeviceInUse?(s(Re,"in-use"),s(to,function($){return $.map(function(U){return U.selected?se(se({},U),{state:"in-use"}):U})})):!((V=(O=f.audio)===null||O===void 0?void 0:O.blocked)===null||V===void 0)&&V.byDeviceMissing?s(Re,"not-found"):!((N=(B=f.audio)===null||B===void 0?void 0:B.blocked)===null||N===void 0)&&N.byPermissions||g==="denied"?s(Re,"blocked"):S?s(Re,"pending"):T?s(Re,"idle"):(s(Re,"granted"),s(to,function($){return $.map(function(U){return U.selected?se(se({},U),{state:"granted"}):U})})),!((R=(z=f.video)===null||z===void 0?void 0:z.blocked)===null||R===void 0)&&R.byDeviceInUse?(s(je,"in-use"),s(eo,function($){return $.map(function(U){return U.selected?se(se({},U),{state:"in-use"}):U})})):!((X=(ee=f.video)===null||ee===void 0?void 0:ee.blocked)===null||X===void 0)&&X.byDeviceMissing?s(je,"not-found"):!((W=(Z=f.video)===null||Z===void 0?void 0:Z.blocked)===null||W===void 0)&&W.byPermissions||m==="denied"?s(je,"blocked"):b?s(je,"pending"):_?s(je,"idle"):(s(je,"granted"),s(eo,function($){return $.map(function(U){return U.selected?se(se({},U),{state:"granted"}):U})})),i(),[2]}})})},[r,i]));return q("participant-updated",j(function(a){a.participant.local&&o()},[o])),q("available-devices-updated",i),q("selected-devices-updated",i),q("camera-error",ce(j(function(a,s,c){var l,d,f,m,g,y,v;switch(s(Uf,c.error),(l=c.error)===null||l===void 0?void 0:l.type){case"cam-in-use":s(je,"in-use");break;case"mic-in-use":s(Re,"in-use");break;case"cam-mic-in-use":s(je,"in-use"),s(Re,"in-use");break;case"not-found":!((d=c.error)===null||d===void 0)&&d.missingMedia.includes("video")&&s(je,"not-found"),!((f=c.error)===null||f===void 0)&&f.missingMedia.includes("audio")&&s(Re,"not-found");break;case"permissions":!((m=c.error)===null||m===void 0)&&m.blockedMedia.includes("video")&&s(je,"blocked"),!((g=c.error)===null||g===void 0)&&g.blockedMedia.includes("audio")&&s(Re,"blocked");break;case"constraints":((y=c.error)===null||y===void 0?void 0:y.reason)==="invalid"?(s(je,"constraints-invalid"),s(Re,"constraints-invalid")):((v=c.error)===null||v===void 0?void 0:v.reason)==="none-specified"&&(s(je,"constraints-none-specified"),s(Re,"constraints-none-specified"));break;case"undefined-mediadevices":s(je,"undefined-mediadevices"),s(Re,"undefined-mediadevices");break;case"unknown":default:s(je,"unknown"),s(Re,"unknown");break}},[]))),q("started-camera",ce(j(function(a,s){s(je,"granted"),s(Re,"granted"),o()},[o]))),pe.createElement(M0.Provider,{value:{refreshDevices:i}},n)},Lr=de({errorMsg:void 0,isLiveStreaming:!1,layout:void 0});Lr.debugLabel=ve("live-streaming");var P0=function(t){var n=t.children;return q("live-streaming-started",ce(j(function(r,i,o){i(Lr,{isLiveStreaming:!0,layout:o?.layout})},[]))),q("live-streaming-stopped",ce(j(function(r,i){i(Lr,function(o){return se(se({},o),{isLiveStreaming:!1,layout:void 0})})},[]))),q("live-streaming-error",ce(j(function(r,i,o){i(Lr,function(a){return se(se({},a),{errorMsg:o.errorMsg})})},[]))),q("left-meeting",ce(j(function(r,i){i(Lr,{errorMsg:void 0,isLiveStreaming:!1,layout:void 0})},[]))),pe.createElement(pe.Fragment,null,n)},no=de("new");no.debugLabel=ve("meeting-state");var gs=de(null);gs.debugLabel=ve("meeting-error");var vs=de(null);vs.debugLabel=ve("non-fatal-error");var jr=de({data:void 0,topology:"none"});jr.debugLabel=ve("meeting-session-data");var E0=function(t){var n=t.children,r=kt(),i=ce(j(function(a,s){if(r){var c=r.meetingState();return s(no,c),c}},[r]));q("loading",i),q("loaded",i),q("joining-meeting",i),q("joined-meeting",i),q("left-meeting",i),q("error",ce(j(function(a,s,c){s(gs,c),i()},[i]))),q("nonfatal-error",ce(j(function(a,s,c){s(vs,c)},[])));var o=ce(j(function(a,s){r&&s(jr,r.meetingSessionState())},[r]));return q("joined-meeting",o),q("meeting-session-state-updated",ce(j(function(a,s,c){s(jr,c.meetingSessionState)},[]))),q("left-meeting",ce(j(function(a,s){s(jr,{data:void 0,topology:"none"})},[]))),q("call-instance-destroyed",ce(j(function(a,s){s(no,"new"),s(gs,null),s(vs,null),s(jr,{data:void 0,topology:"none"})},[]))),pe.createElement(pe.Fragment,null,n)},Qn=de("none");Qn.debugLabel=ve("topology");var zf=de("unknown"),Wf=de([]),ys=de(100);ys.debugLabel=ve("network-quality");var bs=de("good");bs.debugLabel=ve("network-threshold");var A0=function(t){var n=t.children,r=kt(),i=sn(Qn),o=ce(j(function(a,s){return Kn(void 0,void 0,void 0,function(){var c;return Yn(this,function(l){switch(l.label){case 0:return r?[4,r.getNetworkTopology()]:[2];case 1:return c=l.sent(),!c||c?.topology==="none"?[2]:(s(Qn,c.topology),[2])}})})},[r]));return q("joined-meeting",o),q("network-connection",ce(j(function(a,s,c){switch(c.event){case"connected":c.type==="peer-to-peer"&&s(Qn,"peer"),c.type==="sfu"&&s(Qn,"sfu");break}},[]))),q("network-quality-change",ce(j(function(a,s,c){s(zf,function(l){return l!==c.networkState?c.networkState:l}),s(Wf,function(l){var d,f=(d=c.networkStateReasons)!==null&&d!==void 0?d:[];return as(l,f)?l:f}),s(ys,function(l){return l!==c.quality?c.quality:l}),s(bs,function(l){return l!==c.threshold?c.threshold:l})},[]))),q("left-meeting",ce(j(function(a,s){s(Qn,"none"),s(zf,"unknown"),s(Wf,[]),s(ys,100),s(bs,"good")},[]))),J(function(){!r||i!=="none"||o()},[r,o,i]),pe.createElement(pe.Fragment,null,n)},Tn=de({isLocalParticipantRecorded:!1,isRecording:!1});Tn.debugLabel=ve("recording-state");var O0=function(t){var n=t.children,r=Xi(),i=Xt({filter:"record"}),o=ce(j(function(a,s,c,l){var d=a(Tn),f={isLocalParticipantRecorded:d.isLocalParticipantRecorded,isRecording:d.isRecording,local:d.local,type:d.type},m={isLocalParticipantRecorded:f?.type==="local"||!f?.type?c:f.isLocalParticipantRecorded,isRecording:f?.type==="local"||!f?.type?c:f.isRecording,local:(f?.type==="local"||!f?.type)&&c?l:f?.local,type:c?"local":d?.type};St(f,m)||s(Tn,se(se({},f),m))},[]));return J(function(){var a=i.length>0,s=i.includes(r||"local");o(a,s)},[r,o,i]),q("recording-started",ce(j(function(a,s,c){var l,d=!0;switch(c.type){case"cloud-beta":case"cloud":{r&&((l=c.layout)===null||l===void 0?void 0:l.preset)==="single-participant"&&c.layout.session_id!==r&&(d=!1);break}}s(Tn,{error:!1,isLocalParticipantRecorded:d,isRecording:!0,layout:c?.layout,local:c?.local,recordingId:c?.recordingId,recordingStartedDate:new Date,startedBy:c?.startedBy,type:c?.type})},[r]))),q("recording-stopped",ce(j(function(a,s){s(Tn,function(c){return se(se({},c),{isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),q("recording-error",ce(j(function(a,s){s(Tn,function(c){return se(se({},c),{error:!0,isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),q("left-meeting",ce(j(function(a,s){s(Tn,{isLocalParticipantRecorded:!1,isRecording:!1})},[]))),pe.createElement(pe.Fragment,null,n)},I0=function(){var t=sn(no);return rt(t),t},_s=de(null);_s.debugLabel=ve("room-state");var D0=function(t){var n=t.children,r=kt(),i=I0(),o=ce(j(function(a,s){return Kn(void 0,void 0,void 0,function(){var c;return Yn(this,function(l){switch(l.label){case 0:return!r||i==="left-meeting"?[2]:[4,r.room()];case 1:return c=l.sent(),c&&"id"in c&&s(_s,c),[2,c]}})})},[r,i]));return q("access-state-updated",o),q("left-meeting",ce(j(function(a,s){return function(){s(_s,null)}},[]))),pe.createElement(pe.Fragment,null,n)},Zn=de({isTranscribing:!1,model:"general",language:"en",transcriptions:[]});Zn.debugLabel=ve("transcription-state");var L0=function(t){var n=t.children;return q("transcription-started",ce(j(function(r,i,o){i(Zn,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:o.endpointing,extra:o.extra,includeRawResponse:o.includeRawResponse,instanceId:o.instanceId,language:o.language,model:o.model,profanity_filter:o.profanity_filter,punctuate:o.punctuate,redact:o.redact,startedBy:o.startedBy,tier:o.tier})},[]))),q("transcription-stopped",ce(j(function(r,i,o){i(Zn,function(a){return se(se({},a),{updatedBy:o.updatedBy,isTranscribing:!1})})},[]))),q("transcription-error",ce(j(function(r,i){i(Zn,function(o){return se(se({},o),{error:!0,isTranscribing:!1})})},[]))),q("left-meeting",ce(j(function(r,i){i(Zn,function(o){return se(se({},o),{isTranscribing:!1})})},[]))),q("app-message",ce(j(function(r,i,o){o?.fromId==="transcription"&&i(Zn,function(a){return se(se({},a),{isTranscribing:!0,transcriptions:He(He([],we(a.transcriptions),!1),[o.data],!1)})})},[]))),pe.createElement(pe.Fragment,null,n)},Hf={strictMode:!0},Jf=function(){return!0},j0={options:Hf,shouldCreateInstance:Jf},R0=function(t,n){var r=n===void 0?j0:n,i=r.parentElRef,o=r.options,a=o===void 0?Hf:o,s=r.shouldCreateInstance,c=s===void 0?Jf:s,l=we(te(null),2),d=l[0],f=l[1],m=ae();return J(function(){if(!c())return;function g(b){return Kn(this,void 0,void 0,function(){return Yn(this,function(_){switch(_.label){case 0:return[4,b.destroy()];case 1:return _.sent(),[2]}})})}var y=function(){setTimeout(function(){return f(null)},0)},v=Or.getCallInstance();if(!d&&v&&!v.isDestroyed()){v.once("call-instance-destroyed",y),f(v);return}if(d){St(m.current,a)||g(d);return}if(!v||v.isDestroyed())try{switch(t){case"callFrame":v=i?.current?Or.createFrame(i.current,se({},a)):Or.createFrame(se({},a));break;case"callObject":v=Or.createCallObject(se({},a));break}m.current=a,f(v),v.once("call-instance-destroyed",y)}catch(b){if(console.error("Error creating call instance:",b),a.strictMode)throw b}},[d,a,i,c,t]),d},N0=function(t){return R0("callObject",t)},V0=function(t){var n=t.children,r=t.jotaiStore,i=ns(t,["children","jotaiStore"]),o=ae({}),a=j(function(y){var v,b,_,S;if("action"in y){var T=y.action,M=Array.from((S=(_=o.current)===null||_===void 0?void 0:_[T])!==null&&S!==void 0?S:[]),x=M.filter(function(z){var R=we(z,1),ee=R[0];return ee<0}),C=M.filter(function(z){var R=we(z,1),ee=R[0];return ee>0}),E=He(He([],we(x),!1),we(C),!1);try{for(var O=Cf(E),V=O.next();!V.done;V=O.next()){var B=we(V.value,2),N=B[1];N(y)}}catch(z){v={error:z}}finally{try{V&&!V.done&&(b=O.return)&&b.call(O)}finally{if(v)throw v.error}}}},[]),s=j(function(y){y&&Object.keys(o.current).forEach(function(v){y.off(v,a),y.isDestroyed()||y.on(v,a)})},[a]),c="callObject"in i?i.callObject:null,l=Ne(function(){return"callObject"in i?{}:i},[i]),d=N0({options:l,shouldCreateInstance:j(function(){return!("callObject"in i)},[i])}),f=c??d;J(function(){f&&s(f)},[f,s]);var m=j(function(y,v,b){var _,S;o.current[y]||(o.current[y]=new Map,f&&(f.off(y,a),f.isDestroyed()||f.on(y,a))),!((_=o.current[y])===null||_===void 0)&&_.has(b)||(S=o.current[y])===null||S===void 0||S.set(b,v)},[f,a]),g=j(function(y,v){var b,_;(b=o.current[y])===null||b===void 0||b.delete(v),((_=o.current[y])===null||_===void 0?void 0:_.size)===0&&(f?.off(y,a),delete o.current[y])},[f,a]);return pe.createElement(fv,{store:r},pe.createElement(Pf.Provider,{value:f},pe.createElement(rs.Provider,{value:{on:m,off:g}},pe.createElement(D0,null,pe.createElement(E0,null,pe.createElement(A0,null,pe.createElement(w0,null,pe.createElement(O0,null,pe.createElement(P0,null,pe.createElement(L0,null,pe.createElement(C0,null,n)))))))))))},Rr=function(t){var n={},r=n.onAppMessage,i=kt(),o=j(function(s,c){c===void 0&&(c="*"),i&&i.sendAppMessage(s,c)},[i]),a=j(function(s){r?.(s,o)},[r,o]);return q("app-message",a),o},F0=de({state:"low",reason:"none"});F0.debugLabel=ve("cpu-load");var B0=de(null);B0.debugLabel=ve("input-settings");var $0=de({hidden:0,present:0});$0.debugLabel=ve("participant-counts");var U0=br(function(e){var t=de({},function(n,r,i){r(U0(e),i)});return t.debugLabel=ve("participant-receive-settings-".concat(e)),t}),z0=de(null);z0.debugLabel=ve("send-settings");const W0='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--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-leading:initial;--tw-font-weight: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-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-duration:initial;--tw-ease:initial}}}@layer theme{:root,: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-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-black:#000;--color-white:#fff;--spacing:.25rem;--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: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--leading-snug:1.375;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-lg:16px;--blur-xl:24px;--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-gray-40:#919191;--color-primary-action:#9191914d;--color-primary-action-hover:#91919133}}@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;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}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-2{inset:calc(var(--spacing)*2)}.inset-3{inset:calc(var(--spacing)*3)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-5{right:calc(var(--spacing)*5)}.right-15{right:calc(var(--spacing)*15)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-5{bottom:calc(var(--spacing)*5)}.bottom-25{bottom:calc(var(--spacing)*25)}.bottom-\\[6px\\]{bottom:6px}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-1000{z-index:1000}.z-\\[9999\\]{z-index:9999}.mx-auto{margin-inline:auto}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.hidden{display:none}.inline{display:inline}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-\\[20px\\]{height:20px}.h-\\[28px\\]{height:28px}.h-\\[64px\\]{height:64px}.h-\\[180px\\]{height:180px}.h-\\[216px\\]{height:216px}.h-\\[300px\\]{height:300px}.h-\\[377px\\]{height:377px}.h-full{height:100%}.max-h-36{max-height:calc(var(--spacing)*36)}.min-h-11{min-height:calc(var(--spacing)*11)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-40{width:calc(var(--spacing)*40)}.w-\\[10px\\]{width:10px}.w-\\[36px\\]{width:36px}.w-\\[120px\\]{width:120px}.w-\\[144px\\]{width:144px}.w-\\[200px\\]{width:200px}.w-\\[252px\\]{width:252px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[90\\%\\]{max-width:90%}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.scale-25{--tw-scale-x:25%;--tw-scale-y:25%;--tw-scale-z:25%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-none{scale:none}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[22px\\]{border-radius:22px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-3xl{border-top-left-radius:var(--radius-3xl);border-bottom-left-radius:var(--radius-3xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.bg-\\[var\\(--color-primary-action\\)\\]{background-color:var(--color-primary-action)}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,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\\/95{background-color:#000000f2}@supports (color:color-mix(in lab,red,red)){.bg-black\\/95{background-color:color-mix(in oklab,var(--color-black)95%,transparent)}}.bg-gray-40\\/25{background-color:#91919140}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/25{background-color:color-mix(in oklab,var(--color-gray-40)25%,transparent)}}.bg-gray-40\\/30{background-color:#9191914d}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/30{background-color:color-mix(in oklab,var(--color-gray-40)30%,transparent)}}.bg-red-600\\/25{background-color:#e4001440}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/25{background-color:color-mix(in oklab,var(--color-red-600)25%,transparent)}}.bg-red-600\\/50{background-color:#e4001480}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/50{background-color:color-mix(in oklab,var(--color-red-600)50%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-\\[linear-gradient\\(transparent\\,\\#000000\\)\\]{background-image:linear-gradient(#0000,#000)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)\\,rgba\\(0\\,0\\,0\\,1\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,0\\)_40\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%);mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,0\\)_50\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%);mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_15\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,1\\)_50\\%\\,rgba\\(0\\,0\\,0\\,0\\)_60\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%);mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,0\\)_70\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%);mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\,rgba\\(0\\,0\\,0\\,0\\)_90\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%);mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 60%,#000 80%);mask-image:linear-gradient(#0000 60%,#000 80%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_70\\%\\,rgba\\(0\\,0\\,0\\,1\\)_100\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 70%,#000 100%);mask-image:linear-gradient(#0000 70%,#000)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-14{padding-right:calc(var(--spacing)*14)}.pr-\\[4px\\]{padding-right:4px}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.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-\\[8px\\]{font-size:8px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.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)}.whitespace-nowrap{white-space:nowrap}.text-black{color:var(--color-black)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.text-white\\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\\/75{color:color-mix(in oklab,var(--color-white)75%,transparent)}}.underline{text-decoration-line:underline}.decoration-white\\/50{text-decoration-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.decoration-white\\/50{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.opacity-0{opacity:0}.opacity-100{opacity:1}.mix-blend-difference{mix-blend-mode:difference}.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-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);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)}.blur{--tw-blur:blur(8px);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,)}.blur-sm{--tw-blur:blur(var(--blur-sm));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-\\[1px\\]{--tw-backdrop-blur:blur(1px);-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-\\[2px\\]{--tw-backdrop-blur:blur(2px);-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-\\[4px\\]{--tw-backdrop-blur:blur(4px);-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-\\[8px\\]{--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-\\[16px\\]{--tw-backdrop-blur:blur(16px);-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-\\[32px\\]{--tw-backdrop-blur:blur(32px);-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-\\[64px\\]{--tw-backdrop-blur:blur(64px);-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-lg{--tw-backdrop-blur:blur(var(--blur-lg));-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-none{--tw-backdrop-blur: ;-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-xl{--tw-backdrop-blur:blur(var(--blur-xl));-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-\\[backdrop-filter\\]{transition-property:-webkit-backdrop-filter,backdrop-filter;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-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.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)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}.placeholder\\:text-white\\/70::placeholder{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-white\\/70::placeholder{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.placeholder\\:opacity-0::placeholder{opacity:0}.placeholder\\:opacity-70::placeholder{opacity:.7}@media(hover:hover){.hover\\:bg-\\[var\\(--color-primary-action-hover\\)\\]:hover{background-color:var(--color-primary-action-hover)}.hover\\:bg-black\\/30:hover{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/30:hover{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.hover\\:bg-gray-40\\/40:hover{background-color:#91919166}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-40\\/40:hover{background-color:color-mix(in oklab,var(--color-gray-40)40%,transparent)}}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/15:hover{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.hover\\:bg-white\\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/80:hover{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\\:bg-white\\/90:hover{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/90:hover{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}@media(min-width:40rem){.sm\\:flex{display:flex}.sm\\:hidden{display:none}}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}.shadow-inset-white-10{box-shadow:inset 0 0 0 1px #ffffff1a}.shadow-inset-white-20{box-shadow:inset 0 0 0 1px #fff3}.shadow-focused{box-shadow:inset 0 0 0 1.5px #fff6}}@keyframes fadeInUp{0%{opacity:0;filter:blur(12px);transform:translateY(12px)}to{opacity:1;filter:blur();transform:translateY(0)}}@keyframes fadeOutUp{0%{opacity:1;filter:blur();transform:translateY(0)}to{opacity:0;filter:blur(12px);transform:translateY(-12px)}}@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-leading{syntax:"*";inherits:false}@property --tw-font-weight{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-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-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';function H0(){return A("style",{children:W0})}const qf=Le(void 0);function J0({children:e}){const[t,n]=te(!1);return A(qf.Provider,{value:{hasUserInteracted:t,setHasUserInteracted:n},children:e})}function er(){const e=ye(qf);if(!e)throw new Error("useUserInteraction must be used within a UserInteractionProvider");return e}const ke="active",et="minimized",Et="hidden",Gf=Le(void 0),q0=3e4;function G0({children:e,showMinimizeButton:t=!0,initialState:n=et,controlledWidgetState:r=null,controlledShowMinimizeButton:i=null,customActiveWidth:o=null,customActiveHeight:a=null,customMinimizedWidth:s=null,customMinimizedHeight:c=null,videoButtonText:l=null,skipWelcomeVideo:d=!1}){const{setHasUserInteracted:f}=er(),m=Rr(),g=kt(),[y,v]=te(n),[b,_]=te(!1),[S,T]=te(!1),[M,x]=te(!1),[C,E]=te(null),[O,V]=te(!1),[B,N]=te(t),[z,R]=te(!1),[ee,X]=te(!1),[Z,W]=te(!1),K=ae(null),$=ae(null),U=ae(null),ie=ae(null),le=ae(n);J(()=>{le.current=y},[y]);const u=j(()=>{if(g)try{const h=g.meetingState();(h==="joined-meeting"||h==="joining-meeting")&&(console.log("Sending force-end event to Daily"),m({event:"force-end"},"*"))}catch{}_(!1),f(!1),V(!1),E(null),R(!1),X(!1),W(!1)},[g]),p=j(h=>{$.current!==null&&clearTimeout($.current),U.current!==null&&clearTimeout(U.current),h===ke?ie.current!==null&&(clearTimeout(ie.current),ie.current=null):le.current===ke&&h===et&&(ie.current=window.setTimeout(()=>{u(),ie.current=null},q0)),h===Et||le.current===Et?(T(!0),$.current=window.setTimeout(()=>{le.current=h,v(h),T(!1),x(!0),$.current=null,U.current=window.setTimeout(()=>{x(!1),U.current=null},300)},1)):(le.current=h,v(h),T(!1),x(!1))},[u]);return J(()=>{r!==null&&p(r)},[r]),J(()=>{i!==null&&N(i)},[i]),A(Gf.Provider,{value:{widgetState:y,setWidgetState:p,isAgentVideoReady:b,setIsAgentVideoReady:_,roomUrl:C,setRoomUrl:E,isTransitioning:M,isAboutToTransition:S,hasJoinedRoom:O,setHasJoinedRoom:V,resetDailyState:u,showMinimizeButton:B,setShowMinimizeButton:N,isImageChangeRequested:z,setIsImageChangeRequested:R,isImageChanging:ee,setIsImageChanging:X,customActiveWidth:o,customActiveHeight:a,customMinimizedWidth:s,customMinimizedHeight:c,videoButtonText:l,skipWelcomeVideo:d,audioPermissionBlocked:Z,setAudioPermissionBlocked:W,retryDailyAudioRef:K},children:e})}function At(){const e=ye(Gf);if(!e)throw new Error("useWidget must be used within a WidgetProvider");return e}const Kf=Le(void 0);function K0({children:e}){const[t,n]=te(!0),[r,i]=te(!0),o=kt();return J(()=>{o&&o.setLocalAudio(!t)},[t,o]),A(Kf.Provider,{value:{isMicMuted:t,setIsMicMuted:n,isAudioMuted:r,setIsAudioMuted:i},children:e})}function ro(){const e=ye(Kf);if(!e)throw new Error("useMute must be used within a MuteProvider");return e}const Yf=Le(void 0);function Y0({children:e}){const t=Ne(()=>typeof window>"u"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),[]);return A(Yf.Provider,{value:{isMobileDevice:t},children:e})}function ws(){const e=ye(Yf);if(!e)throw new Error("useMobile must be used within a MobileProvider");return e}const Xf=Le(void 0);function X0({children:e}){const[t,n]=te(null);return A(Xf.Provider,{value:{agentData:t,setAgentData:n},children:e})}function Qt(){const e=ye(Xf);if(!e)throw new Error("useAgent must be used within an AgentProvider");return e}const Qf=360,Q0=30,Zf=Le(void 0);function Z0({children:e}){const[t,n]=te(""),[r,i]=te(""),[o,a]=te(""),s=ae(null),c=ae(null),{agentData:l}=Qt(),{resetDailyState:d,setWidgetState:f}=At(),m=ae(Qf),g=j(b=>{c.current!==null&&(clearTimeout(c.current),c.current=null),i(b),b&&(c.current=window.setTimeout(()=>{i(""),c.current=null},1e4))},[]),y=j(()=>{n(""),g(""),a("")},[]),v=j(()=>{s.current!==null&&clearInterval(s.current);const b=l?.max_conv_dur!=null&&l.max_conv_dur>0?l.max_conv_dur:Qf;m.current=b,a(""),s.current=window.setInterval(()=>{m.current-=1,m.current<=Q0&&m.current>0?a(`• ${m.current}s left`):m.current===0&&s.current!==null&&(a(""),n(""),g(""),f(et),d(),clearInterval(s.current),s.current=null)},1e3)},[l,f,d]);return J(()=>{s.current!==null&&l?.max_conv_dur!=null&&l.max_conv_dur>0&&v()},[l?.max_conv_dur,v]),J(()=>{!r&&c.current!==null&&(clearTimeout(c.current),c.current=null)},[r]),J(()=>()=>{s.current!==null&&clearInterval(s.current),c.current!==null&&clearTimeout(c.current)},[]),A(Zf.Provider,{value:{errorMsg:t,setErrorMsg:n,nonFatalErrorMsg:r,setNonFatalErrorMsg:g,timeMsg:o,setTimeMsg:a,startMaxVideoTimer:v,resetErrors:y},children:e})}function io(){const e=ye(Zf);if(!e)throw new Error("useError must be used within an ErrorProvider");return e}function e_(){const e=Xt({filter:"remote"}),{timeMsg:t}=io(),{agentData:n}=Qt(),{isImageChanging:r}=At();if(e.length===0)return null;const i=e[0],o=n?.image_url;return A("div",{className:"h-full rounded-lg relative",children:[o&&A("div",{className:"absolute inset-0 bg-cover bg-center rounded-lg",style:{backgroundImage:`url(${o})`}}),A("div",{className:"relative w-full h-full",children:[A(Bf,{sessionId:i,type:"video",style:{objectFit:"cover",width:"100%",height:"100%",position:"relative"}}),A("div",{className:`absolute inset-0 bg-black/95 bg-cover bg-center rounded-lg transition-opacity
35
+ Passed callback for '`.concat(t,"' event is NOT registered."),n),l(!0);return}d.current++;var m=setTimeout(function(){d.current=0},50);return a(t,n,f),function(){clearTimeout(m),o(t,f)}}},[n,t,f,c,o,a]),rt({event:t,eventId:f,isBlocked:c,callback:n})};function St(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(!St(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(y,v){return St(y,t.getTracks()[v])});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 o=Array.from(e).sort(),a=Array.from(t).sort();return o.every(function(y,v){return St(y,a[v])})}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;try{for(var s=Cf(e.entries()),c=s.next();!c.done;c=s.next()){var l=we(c.value,2),d=l[0],f=l[1];if(!t.has(d)||!St(f,t.get(d)))return!1}}catch(y){n={error:y}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return!0}if(ct(e)!=="object"||e===null||ct(t)!=="object"||t===null)return!1;var m=Object.keys(e),g=Object.keys(t);if(m.length!==g.length)return!1;for(var i=0;i<m.length;i++){var d=m[i];if(!Object.prototype.hasOwnProperty.call(t,d)||!St(e[d],t[d]))return!1}return!0}function as(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],o=r!==null&&ct(r)==="object",a=i!==null&&ct(i)==="object";if(o||a){if(!St(r,i))return!1}else if(r!==i)return!1}return!0}function ve(e){return"daily-react-"+e}function ss(e){var t=new Map,n=new Map;return function(r){if(!t.has(r)){var i=de(function(o){var a=e.get(r)(o),s=n.get(r);return s!=null&&e.equals(a,s)?s:(n.set(r,a),a)});t.set(r,i)}return t.get(r)}}var cs="::",Ef=";",ls=function(t,n){return t+cs+n},m0=function(t,n){return t+cs+n.join(Ef)},Je=function(t,n){return us(ls(t,n))},Xn=br(function(e){var t=de([]);return t.debugLabel=ve("participant-property-paths-".concat(e)),t}),us=br(function(e){var t=de(null);return t.debugLabel=ve("participant-property-".concat(e)),t}),g0=ss({equals:as,get:function(t){return function(n){var r=we(t.split(cs),2),i=r[0],o=r[1],a=o.split(Ef);return a.map(function(s){return n(Je(i,s))})}}}),Af=function(t,n){var r,i=sn(Array.isArray(n)?g0(m0(t,n)):us(ls(t,n)));return rt(Array.isArray(n)?n.reduce(function(o,a,s){return o[a]=i[s],o},{}):(r={},r[n]=i,r)),i},Ki=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function v0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ds,Of;function y0(){if(Of)return ds;Of=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=ct(Ki)=="object"&&Ki&&Ki.Object===Object&&Ki,l=(typeof self>"u"?"undefined":ct(self))=="object"&&self&&self.Object===Object&&self,d=c||l||Function("return this")(),f=Object.prototype,m=f.toString,g=Math.max,y=Math.min,v=function(){return d.Date.now()};function b(C,E,O){var V,B,N,z,R,ee,X=0,Z=!1,W=!1,K=!0;if(typeof C!="function")throw new TypeError(e);E=x(E)||0,S(O)&&(Z=!!O.leading,W="maxWait"in O,N=W?g(x(O.maxWait)||0,E):N,K="trailing"in O?!!O.trailing:K);function $(P){var D=V,I=B;return V=B=void 0,X=P,z=C.apply(I,D),z}function U(P){return X=P,R=setTimeout(u,E),Z?$(P):z}function ie(P){var D=P-ee,I=P-X,F=E-D;return W?y(F,N-I):F}function le(P){var D=P-ee,I=P-X;return ee===void 0||D>=E||D<0||W&&I>=N}function u(){var P=v();if(le(P))return p(P);R=setTimeout(u,ie(P))}function p(P){return R=void 0,K&&V?$(P):(V=B=void 0,z)}function h(){R!==void 0&&clearTimeout(R),X=0,V=ee=B=R=void 0}function w(){return R===void 0?z:p(v())}function k(){var P=v(),D=le(P);if(V=arguments,B=this,ee=P,D){if(R===void 0)return U(ee);if(W)return R=setTimeout(u,E),$(ee)}return R===void 0&&(R=setTimeout(u,E)),z}return k.cancel=h,k.flush=w,k}function _(C,E,O){var V=!0,B=!0;if(typeof C!="function")throw new TypeError(e);return S(O)&&(V="leading"in O?!!O.leading:V,B="trailing"in O?!!O.trailing:B),b(C,E,{leading:V,maxWait:E,trailing:B})}function S(C){var E=ct(C);return!!C&&(E=="object"||E=="function")}function T(C){return!!C&&ct(C)=="object"}function M(C){return ct(C)=="symbol"||T(C)&&m.call(C)==n}function x(C){if(typeof C=="number")return C;if(M(C))return t;if(S(C)){var E=typeof C.valueOf=="function"?C.valueOf():C;C=S(E)?E+"":E}if(typeof C!="string")return C===0?C:+C;C=C.replace(r,"");var O=o.test(C);return O||a.test(C)?s(C.slice(2),O?2:8):i.test(C)?t:+C}return ds=_,ds}var b0=y0(),_0=v0(b0),Yi=function(t,n,r,i){r===void 0&&(r=500),i===void 0&&(i=!1);var o=ye(rs),a=o.off,s=o.on,c=Ne(function(){var f;return Array.isArray(t)?t.reduce(function(m,g){return m[g]=i?is():os(),m},{}):(f={},f[t]=i?is():os(),f)},[t,i]),l=ae([]);q("call-instance-destroyed",j(function(){l.current.length=0},[]));var d=Ne(function(){return _0(function(){l.current.length!==0&&(n(l.current),l.current.length=0)},r,{trailing:!0})},[n,r]);J(function(){if(t){var f=function(g){l.current.push(g),d()};return Array.isArray(t)?t.forEach(function(m){return s(m,f,c[m])}):s(t,f,c[t]),function(){Array.isArray(t)?t.forEach(function(m){return a(m,c[m])}):a(t,c[t])}}},[d,t,c,a,s]),rt({event:t,eventId:c})},If=function(t,n,r){if(n===void 0&&(n=""),r===void 0&&(r=new Set),ct(t)!=="object"||t===null||r.has(t))return[n];r.add(t);var i=[];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=n?"".concat(n,".").concat(o):o;i.push.apply(i,He([a],we(If(t[o],a,r)),!1))}return r.delete(t),i},fs=function(t){return If(t)},w0=function(t,n){return String(n).split(".").filter(function(r){return r.length}).reduce(function(r,i){return r&&r[i]},t)},hs=function(t,n){return n.map(function(r){return w0(t,r)})},Xi=de(null);Xi.debugLabel=ve("active-id");var Dr=de("");Dr.debugLabel=ve("local-id");var Df=de(null);Df.debugLabel=ve("local-join-date");var Sn=de([]);Sn.debugLabel=ve("participant-ids");var xn=br(function(e){var t=de(null);return t.debugLabel=ve("participant-".concat(e)),t}),ps=de([]);ps.debugLabel=ve("waiting-participants");var ms=br(function(e){var t=de({awaitingAccess:{level:"full"},id:e,name:""});return t.debugLabel=ve("waiting-participant-".concat(e)),t}),k0=function(t){var n=t.children,r=kt(),i=we(te(!1),2),o=i[0],a=i[1],s=ce(j(function(d,f,m){f(Dr,m.local.session_id);var g=Object.values(m),y=g.map(function(v){return v.session_id});f(Sn,y),g.forEach(function(v){f(xn(v.session_id),v);var b=fs(v);f(Xn(v.session_id),b),b.forEach(function(_){var S=we(hs(v,[_]),1),T=S[0];f(Je(v.session_id,_),T)})}),a(!0)},[]));J(function(){if(!(!r||o)){var d=setInterval(function(){var f=r.participants();"local"in f&&(s(f),clearInterval(d))},100);return function(){clearInterval(d)}}},[r,o,s]);var c=j(function(){if(r){var d=r?.participants();d.local&&s(d)}},[r,s]);q("started-camera",c,!0),q("access-state-updated",c,!0),q("joining-meeting",ce(j(function(d,f){f(Df,new Date),c()},[c])),!0),q("joined-meeting",j(function(d){s(d.participants)},[s]),!0);var l=ce(j(function(d,f){f(Dr,""),f(Xi,null);var m=d(Sn);m.forEach(function(g){return xn.remove(g)}),f(Sn,[])},[]));return q("call-instance-destroyed",l,!0),q("left-meeting",l,!0),Yi(["active-speaker-change","participant-joined","participant-updated","participant-left"],ce(j(function(d,f,m){m.length&&m.forEach(function(g){switch(g.action){case"active-speaker-change":{f(Xi,g.activeSpeaker.peerId),f(xn(g.activeSpeaker.peerId),function(M){return M?se(se({},M),{last_active:new Date}):null});break}case"participant-joined":{f(Sn,function(M){return M.includes(g.participant.session_id)?M:He(He([],we(M),!1),[g.participant.session_id],!1)}),f(xn(g.participant.session_id),g.participant);var y=fs(g.participant);f(Xn(g.participant.session_id),y),y.forEach(function(M){var x=we(hs(g.participant,[M]),1),C=x[0];f(Je(g.participant.session_id,M),C)});break}case"participant-updated":{f(xn(g.participant.session_id),g.participant),g.participant.local&&f(Dr,g.participant.session_id);var y=fs(g.participant),v=d(Xn(g.participant.session_id)),b=y.length!==v.length||y.some(function(x){return!v.includes(x)});b&&f(Xn(g.participant.session_id),y);var _=new Set(v),S=hs(g.participant,y);y.forEach(function(x,C){var E=S[C];_.delete(x),f(Je(g.participant.session_id,x),function(O){return St(O,E)?O:E})}),_.forEach(function(x){f(Je(g.participant.session_id,x),null)});break}case"participant-left":{f(Sn,function(M){return M.includes(g.participant.session_id)?M.filter(function(x){return x!==g.participant.session_id}):M}),xn.remove(g.participant.session_id);var T=d(Xn(g.participant.session_id));T.forEach(function(M){us.remove(ls(g.participant.session_id,M))}),Xn.remove(g.participant.session_id);break}}})},[])),100,!0),Yi(["waiting-participant-added","waiting-participant-updated","waiting-participant-removed"],ce(j(function(d,f,m){m.forEach(function(g){switch(g.action){case"waiting-participant-added":f(ps,function(y){return y.includes(g.participant.id)?y:He(He([],we(y),!1),[g.participant.id],!1)}),f(ms(g.participant.id),g.participant);break;case"waiting-participant-updated":f(ms(g.participant.id),g.participant);break;case"waiting-participant-removed":f(ps,function(y){return y.filter(function(v){return v!==g.participant.id})}),ms.remove(g.participant.id);break}})},[])),100,!0),pe.createElement(pe.Fragment,null,n)},Qi=function(){var t=sn(Dr);return rt(t),t},S0=function(){return!0},x0=function(t){var n=t===void 0?{}:t,r=n.filter,i=r===void 0?S0:r,o=n.ignoreLocal,a=o===void 0?!1:o,s=Qi(),c=sn(Xi),l=a&&c===s,d=!i?.(c),f=!l&&!d,m=we(te(f?c:null),2),g=m[0],y=m[1];return J(function(){l||d||y(c)},[d,l,c]),rt(g),g},Zi=function(t){return["blocked","off"].includes(t)},Lf=";",jf=function(t,n){return"".concat(t).concat(Lf).concat(n)},Rf=ss({equals:St,get:function(t){return function(n){var r=we(t.split(Lf),2),i=r[0],o=r[1],a=n(Sn);return a.filter(function(s){switch(i){case"local":case"owner":case"record":return n(Je(s,i));case"remote":return!n(Je(s,"local"));case"screen":{var c=n(Je(s,"tracks.screenAudio.state")),l=n(Je(s,"tracks.screenVideo.state"));return!Zi(c)||!Zi(l)}default:return!0}}).sort(function(s,c){switch(o){case"joined_at":case"session_id":case"user_id":case"user_name":{var l=n(Je(s,o)),d=n(Je(c,o));if(l!==void 0||d!==void 0){if(l===void 0)return-1;if(d===void 0||l>d)return 1;if(l<d)return-1}return 0}default:return 0}})}}}),Xt=function(t){var n=t===void 0?{}:t,r=n.filter,i=n.onActiveSpeakerChange,o=n.onParticipantJoined,a=n.onParticipantLeft,s=n.onParticipantUpdated,c=n.sort,l=sn(Rf(jf(typeof r=="string"?r:null,typeof c=="string"?c:null))),d=typeof r=="function"||typeof c=="function",f=j(function(_){if(typeof r!="function"&&typeof c!="function")return[];var S=l.map(function(T){return _(xn(T))});return S.filter(function(T){return!!T}).filter(typeof r=="function"?r:function(){return!0}).sort(typeof c=="function"?c:function(){return 0}).map(function(T){return T.session_id}).filter(Boolean)},[r,l,c]),m=we(te([]),2),g=m[0],y=m[1],v=ce(j(function(_){if(d){var S=f(_);St(S,g)||y(S)}},[g,f,d]));J(function(){v()},[v]),Yi(["participant-joined","participant-updated","active-speaker-change","participant-left"],j(function(_){_.length&&(_.forEach(function(S){switch(S.action){case"participant-joined":o?.(S);break;case"participant-updated":s?.(S);break;case"active-speaker-change":i?.(S);break;case"participant-left":a?.(S);break}}),v())},[v,i,o,a,s]));var b=typeof r=="function"||typeof c=="function"?g:l;return rt(b),b},T0=ss({equals:as,get:function(){return function(t){var n=t(Rf(jf("screen",null)));return n.map(function(r){return{local:t(Je(r,"local")),screenAudio:t(Je(r,"tracks.screenAudio")),screenVideo:t(Je(r,"tracks.screenVideo")),screenId:"".concat(r,"-screen"),session_id:r}})}}}),M0=function(t){var n={},r=n.onError,i=n.onLocalScreenShareStarted,o=n.onLocalScreenShareStopped,a=kt(),s=j(function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];a?.startScreenShare.apply(a,He([],we(f),!1))},[a]),c=j(function(){for(var f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];a?.stopScreenShare.apply(a,He([],we(f),!1))},[a]);q("local-screen-share-started",j(function(){return i?.()},[i])),q("local-screen-share-stopped",j(function(){return o?.()},[o])),q("nonfatal-error",j(function(f){f.type==="screen-share-error"&&r?.(f)},[r]));var l=sn(T0(void 0)),d={isSharingScreen:l.some(function(f){return f.local}),screens:l,startScreenShare:s,stopScreenShare:c};return rt(d),d},Nf=function(t,n){n===void 0&&(n="video");var r=Af(t,"tracks.".concat(n)),i=r?se(se({},r),{isOff:Zi(r.state)}):{isOff:!0,persistentTrack:void 0,state:"off",subscribed:!1};return rt(i),i};function Vf(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return j(function(n){for(var r=0;r<e.length;r++){var i=e[r];typeof i=="function"?i(n):i&&ct(i)==="object"&&(i.current=n)}},e)}var eo=Jo(Ge(function(e,t){var n=e.onPlayFailed,r=e.sessionId,i=e.type,o=i===void 0?"audio":i,a=ns(e,["onPlayFailed","sessionId","type"]),s=ae(null),c=Nf(r,o),l=Vf(s,t),d=c?.subscribed;return J(function(){var f=s.current;if(!(!f||!c?.persistentTrack)){var m=function(){f.play().catch(function(y){n?.({sessionId:r,target:f,type:o,message:y.message,name:y.name})})};if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(o," for ").concat(r)),n?.({sessionId:r,target:f,type:o,message:"MediaStream API not available",name:"MediaStream API not available"});return}return f.addEventListener("canplay",m),f.srcObject=new MediaStream([c?.persistentTrack]),function(){f?.removeEventListener("canplay",m)}}},[c?.persistentTrack,n,r,o]),q("participant-left",j(function(f){var m=s.current;f.participant.session_id!==r||!m||(m.srcObject=null)},[r])),pe.createElement("audio",se({autoPlay:!0,ref:l},a,{"data-session-id":r,"data-audio-type":o,"data-subscribed":d}))}));eo.displayName="DailyAudioTrack";var Ff=Jo(Ge(function(e,t){var n=e.autoSubscribeActiveSpeaker,r=n===void 0?!1:n,i=e.maxSpeakers,o=i===void 0?5:i,a=e.onPlayFailed,s=e.playLocalScreenAudio,c=s===void 0?!1:s,l=kt(),d=we(te(new Array(o).fill("")),2),f=d[0],m=d[1],g=M0().screens,y=Qi(),v=x0({ignoreLocal:!0}),b=ae(null);Ro(t,function(){return{getActiveSpeakerAudio:function(){var x,C;return(C=(x=b.current)===null||x===void 0?void 0:x.querySelector('audio[data-session-id="'.concat(v,'"][data-audio-type="audio"]')))!==null&&C!==void 0?C:null},getAllAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll("audio"))!==null&&C!==void 0?C:[])},getAudioBySessionId:function(x){var C,E;return(E=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="audio"]')))!==null&&E!==void 0?E:null},getRmpAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="rmpAudio"]'))!==null&&C!==void 0?C:[])},getScreenAudio:function(){var x,C;return Array.from((C=(x=b.current)===null||x===void 0?void 0:x.querySelectorAll('audio[data-audio-type="screenAudio"]'))!==null&&C!==void 0?C:[])},getRmpAudioBySessionId:function(x){var C,E;return(E=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="rmpAudio"]')))!==null&&E!==void 0?E:null},getScreenAudioBySessionId:function(x){var C,E;return(E=(C=b.current)===null||C===void 0?void 0:C.querySelector('audio[data-session-id="'.concat(x,'"][data-audio-type="screenAudio"]')))!==null&&E!==void 0?E:null}}},[v]);var _=ce(j(function(M,x,C){return Kn(void 0,void 0,void 0,function(){var E,O,V;return Yn(this,function(B){if(E=Object.values((V=l?.participants())!==null&&V!==void 0?V:{}).filter(function(N){return!N.local&&!!N.tracks.audio.subscribed}),O=function(z){return E.some(function(R){return R.session_id===z})},!O(C))if(l&&!l.isDestroyed()&&r&&!l.subscribeToTracksAutomatically())l.updateParticipant(C,{setSubscribedTracks:{audio:!0}});else return[2];return m(function(N){var z;if(N.includes(C))return N;var R=function(U){return!U||!O(U)};if(N.some(R)){var ee=N.findIndex(R);return N[ee]=C,He([],we(N),!1)}var X=N.findIndex(function($){return E.some(function(U){return U.session_id===$&&Zi(U.tracks.audio.state)})});if(X>=0)return N[X]=C,He([],we(N),!1);var Z=E.filter(function($){return N.includes($.session_id)&&$.session_id!==v}).sort(function($,U){var ie,le,u=(ie=M(Je($.session_id,"last_active")))!==null&&ie!==void 0?ie:new Date("1970-01-01"),p=(le=M(Je(U.session_id,"last_active")))!==null&&le!==void 0?le:new Date("1970-01-01");return u>p?1:u<p?-1:0});if(!Z.length){var W=N.findIndex(function($){return $!==v});return N[W]=C,He([],we(N),!1)}var K=N.indexOf((z=Z[0])===null||z===void 0?void 0:z.session_id);return N[K]=C,He([],we(N),!1)}),[2]})})},[v,r,l])),S=j(function(M){m(function(x){if(!x.includes(M))return x;var C=He([],we(x),!1),E=C.indexOf(M);return C[E]="",C})},[]);Yi(["active-speaker-change","track-started","participant-left"],j(function(M){M.forEach(function(x){switch(x.action){case"active-speaker-change":if(x.activeSpeaker.peerId===y)return;_(x.activeSpeaker.peerId);break;case"track-started":x.track.kind==="audio"&&x.participant&&!x.participant.local&&_(x.participant.session_id);break;case"participant-left":S(x.participant.session_id);break}})},[_,y,S]),200);var T=Xt({filter:j(function(M){var x;return!!(!((x=M?.tracks)===null||x===void 0)&&x.rmpAudio)},[])});return pe.createElement("div",{ref:b},f.map(function(M,x){return pe.createElement(eo,{key:"speaker-slot-".concat(x),onPlayFailed:a,sessionId:M,type:"audio"})}),g.filter(function(M){return c?!0:!M.local}).map(function(M){return pe.createElement(eo,{key:M.screenId,onPlayFailed:a,sessionId:M.session_id,type:"screenAudio"})}),T.map(function(M){return pe.createElement(eo,{key:"".concat(M,"-rmp"),onPlayFailed:a,sessionId:M,type:"rmpAudio"})}))}));Ff.displayName="DailyAudio";var Bf=Ge(function(t,n){var r=t.automirror,i=t.fit,o=i===void 0?"contain":i,a=t.mirror,s=t.onResize,c=t.playableStyle,l=c===void 0?{}:c,d=t.sessionId,f=t.style,m=f===void 0?{}:f,g=t.type,y=g===void 0?"video":g,v=ns(t,["automirror","fit","mirror","onResize","playableStyle","sessionId","style","type"]),b=Qi(),_=b===d,S=y==="screenVideo",T=_&&!S,M=ae(null),x=Vf(M,n),C=Nf(d,y),E=C.persistentTrack,O=T||S||!C.isOff,V=Af(d,"tracks.".concat(y)),B=V?.subscribed,N=Ne(function(){if(typeof a=="boolean")return a;if(!r)return!1;if(!E)return T;var z=E.getSettings(),R="facingMode"in z?T&&z.facingMode==="user":T;return R},[r,T,a,E]);return J(function(){var R=M.current;if(R){var ee=function(){var U=R.play();U!==void 0&&U.then(function(){R.controls=!1}).catch(function(ie){R.controls=!0,console.warn("Failed to play video",ie)})},X=function(){R.paused&&ee()},Z=function(){R.style.transform="scale(1)"},W=function(){R.style.transform="",setTimeout(function(){R.paused&&ee()},100)},K=function(){document.visibilityState!=="hidden"&&R.paused&&ee()};return R.addEventListener("canplay",X),R.addEventListener("enterpictureinpicture",Z),R.addEventListener("leavepictureinpicture",W),document.addEventListener("visibilitychange",K),function(){R.removeEventListener("canplay",X),R.removeEventListener("enterpictureinpicture",Z),R.removeEventListener("leavepictureinpicture",W),document.removeEventListener("visibilitychange",K)}}},[]),J(function(){var R=M.current;if(!(!R||!E)){if(!MediaStream){console.warn("MediaStream API not available. Can't setup ".concat(y," for ").concat(d));return}return R.srcObject=new MediaStream([E]),R.load(),function(){R.srcObject=null,R.load()}}},[d,y,E,E?.id]),J(function(){var R=M.current;if(!s||!R)return;var ee;function X(){ee&&cancelAnimationFrame(ee),ee=requestAnimationFrame(function(){var Z=M.current;if(!(!Z||document.hidden)){var W=Z.videoWidth,K=Z.videoHeight;W&&K&&s?.({aspectRatio:W/K,height:K,width:W})}})}return X(),R.addEventListener("loadedmetadata",X),R.addEventListener("resize",X),function(){ee&&cancelAnimationFrame(ee),R.removeEventListener("loadedmetadata",X),R.removeEventListener("resize",X)}},[s]),pe.createElement("video",se({autoPlay:!0,muted:!0,playsInline:!0,ref:x,"data-local":_,"data-mirrored":N||void 0,"data-playable":O||void 0,"data-session-id":d,"data-subscribed":B,"data-video-type":y,style:se(se({objectFit:o,transform:N?"scale(-1, 1)":""},m),O?l:{})},v))});Bf.displayName="DailyVideo";var C0=Le({refreshDevices:function(){return Promise.resolve()}}),je=de("idle");je.debugLabel=ve("camera-state");var Re=de("idle");Re.debugLabel=ve("microphone-state");var to=de([]);to.debugLabel=ve("camera-devices");var no=de([]);no.debugLabel=ve("microphone-devices");var $f=de([]);$f.debugLabel=ve("speaker-devices");var Uf=de(null);Uf.debugLabel=ve("last-camera-error");var P0=function(t){var n=t.children,r=kt(),i=ce(j(function(a,s){return Kn(void 0,void 0,void 0,function(){var c,l,d,f,m,g,y,v,b,_,S,T;return Yn(this,function(M){switch(M.label){case 0:if(typeof((S=navigator?.mediaDevices)===null||S===void 0?void 0:S.getUserMedia)>"u"||typeof((T=navigator?.mediaDevices)===null||T===void 0?void 0:T.enumerateDevices)>"u")return s(je,"not-supported"),s(Re,"not-supported"),[2];if(!r)return[2];M.label=1;case 1:return M.trys.push([1,4,,5]),[4,r.enumerateDevices()];case 2:return c=M.sent().devices,l=c.filter(function(x){return x.kind==="videoinput"&&x.deviceId!==""}),d=c.filter(function(x){return x.kind==="audioinput"&&x.deviceId!==""}),f=c.filter(function(x){return x.kind==="audiooutput"&&x.deviceId!==""}),[4,r.getInputDevices()];case 3:return m=M.sent(),g=m.camera,y=m.mic,v=m.speaker,b=function(C,E,O){var V,B=O.find(function(R){return R.device.deviceId===E.deviceId}),N="deviceId"in C&&E.deviceId===C.deviceId,z=!("deviceId"in C)&&B?.selected;return{device:E,selected:N||!!z,state:(V=B?.state)!==null&&V!==void 0?V:"granted"}},_=function(C,E){return C.device.deviceId==="default"?-1:E.device.deviceId==="default"?1:C.device.label<E.device.label?-1:C.device.label>E.device.label?1:0},s(to,function(x){return l.filter(Boolean).map(function(C){return b(g,C,x)}).sort(_)}),s(no,function(x){return d.filter(Boolean).map(function(C){return b(y,C,x)}).sort(_)}),s($f,function(x){return f.filter(Boolean).map(function(C){return b(v,C,x)}).sort(_)}),[3,5];case 4:return M.sent(),s(je,"not-supported"),s(Re,"not-supported"),[3,5];case 5:return[2]}})})},[r])),o=ce(j(function(a,s){return Kn(void 0,void 0,void 0,function(){var c,l,d,f,m,g,y,v,b,_,S,T,M,x,C,E,O,V,B,N,z,R,ee,X,Z,W;return Yn(this,function(K){switch(K.label){case 0:if(!r)return[2];if(c=a(je),l=a(Re),d=r.participants(),!d.local)return[2];if(f=d.local.tracks,m="prompt",g="prompt",!navigator.permissions)return[3,5];K.label=1;case 1:return K.trys.push([1,4,,5]),[4,navigator.permissions.query({name:"camera"})];case 2:return y=K.sent(),m=y.state,[4,navigator.permissions.query({name:"microphone"})];case 3:return v=K.sent(),g=v.state,[3,5];case 4:return K.sent(),[3,5];case 5:return b=m==="prompt"&&["idle","pending"].includes(c)&&f.video.state==="interrupted"&&!f.video.persistentTrack,_=["idle","pending"].includes(c)&&!f.video.persistentTrack&&!!(!((M=f.video.off)===null||M===void 0)&&M.byUser),S=g==="prompt"&&["idle","pending"].includes(l)&&f.audio.state==="interrupted"&&!f.audio.persistentTrack,T=["idle","pending"].includes(l)&&!f.audio.persistentTrack&&!!(!((x=f.audio.off)===null||x===void 0)&&x.byUser),!((E=(C=f.audio)===null||C===void 0?void 0:C.blocked)===null||E===void 0)&&E.byDeviceInUse?(s(Re,"in-use"),s(no,function($){return $.map(function(U){return U.selected?se(se({},U),{state:"in-use"}):U})})):!((V=(O=f.audio)===null||O===void 0?void 0:O.blocked)===null||V===void 0)&&V.byDeviceMissing?s(Re,"not-found"):!((N=(B=f.audio)===null||B===void 0?void 0:B.blocked)===null||N===void 0)&&N.byPermissions||g==="denied"?s(Re,"blocked"):S?s(Re,"pending"):T?s(Re,"idle"):(s(Re,"granted"),s(no,function($){return $.map(function(U){return U.selected?se(se({},U),{state:"granted"}):U})})),!((R=(z=f.video)===null||z===void 0?void 0:z.blocked)===null||R===void 0)&&R.byDeviceInUse?(s(je,"in-use"),s(to,function($){return $.map(function(U){return U.selected?se(se({},U),{state:"in-use"}):U})})):!((X=(ee=f.video)===null||ee===void 0?void 0:ee.blocked)===null||X===void 0)&&X.byDeviceMissing?s(je,"not-found"):!((W=(Z=f.video)===null||Z===void 0?void 0:Z.blocked)===null||W===void 0)&&W.byPermissions||m==="denied"?s(je,"blocked"):b?s(je,"pending"):_?s(je,"idle"):(s(je,"granted"),s(to,function($){return $.map(function(U){return U.selected?se(se({},U),{state:"granted"}):U})})),i(),[2]}})})},[r,i]));return q("participant-updated",j(function(a){a.participant.local&&o()},[o])),q("available-devices-updated",i),q("selected-devices-updated",i),q("camera-error",ce(j(function(a,s,c){var l,d,f,m,g,y,v;switch(s(Uf,c.error),(l=c.error)===null||l===void 0?void 0:l.type){case"cam-in-use":s(je,"in-use");break;case"mic-in-use":s(Re,"in-use");break;case"cam-mic-in-use":s(je,"in-use"),s(Re,"in-use");break;case"not-found":!((d=c.error)===null||d===void 0)&&d.missingMedia.includes("video")&&s(je,"not-found"),!((f=c.error)===null||f===void 0)&&f.missingMedia.includes("audio")&&s(Re,"not-found");break;case"permissions":!((m=c.error)===null||m===void 0)&&m.blockedMedia.includes("video")&&s(je,"blocked"),!((g=c.error)===null||g===void 0)&&g.blockedMedia.includes("audio")&&s(Re,"blocked");break;case"constraints":((y=c.error)===null||y===void 0?void 0:y.reason)==="invalid"?(s(je,"constraints-invalid"),s(Re,"constraints-invalid")):((v=c.error)===null||v===void 0?void 0:v.reason)==="none-specified"&&(s(je,"constraints-none-specified"),s(Re,"constraints-none-specified"));break;case"undefined-mediadevices":s(je,"undefined-mediadevices"),s(Re,"undefined-mediadevices");break;case"unknown":default:s(je,"unknown"),s(Re,"unknown");break}},[]))),q("started-camera",ce(j(function(a,s){s(je,"granted"),s(Re,"granted"),o()},[o]))),pe.createElement(C0.Provider,{value:{refreshDevices:i}},n)},Lr=de({errorMsg:void 0,isLiveStreaming:!1,layout:void 0});Lr.debugLabel=ve("live-streaming");var E0=function(t){var n=t.children;return q("live-streaming-started",ce(j(function(r,i,o){i(Lr,{isLiveStreaming:!0,layout:o?.layout})},[]))),q("live-streaming-stopped",ce(j(function(r,i){i(Lr,function(o){return se(se({},o),{isLiveStreaming:!1,layout:void 0})})},[]))),q("live-streaming-error",ce(j(function(r,i,o){i(Lr,function(a){return se(se({},a),{errorMsg:o.errorMsg})})},[]))),q("left-meeting",ce(j(function(r,i){i(Lr,{errorMsg:void 0,isLiveStreaming:!1,layout:void 0})},[]))),pe.createElement(pe.Fragment,null,n)},ro=de("new");ro.debugLabel=ve("meeting-state");var gs=de(null);gs.debugLabel=ve("meeting-error");var vs=de(null);vs.debugLabel=ve("non-fatal-error");var jr=de({data:void 0,topology:"none"});jr.debugLabel=ve("meeting-session-data");var A0=function(t){var n=t.children,r=kt(),i=ce(j(function(a,s){if(r){var c=r.meetingState();return s(ro,c),c}},[r]));q("loading",i),q("loaded",i),q("joining-meeting",i),q("joined-meeting",i),q("left-meeting",i),q("error",ce(j(function(a,s,c){s(gs,c),i()},[i]))),q("nonfatal-error",ce(j(function(a,s,c){s(vs,c)},[])));var o=ce(j(function(a,s){r&&s(jr,r.meetingSessionState())},[r]));return q("joined-meeting",o),q("meeting-session-state-updated",ce(j(function(a,s,c){s(jr,c.meetingSessionState)},[]))),q("left-meeting",ce(j(function(a,s){s(jr,{data:void 0,topology:"none"})},[]))),q("call-instance-destroyed",ce(j(function(a,s){s(ro,"new"),s(gs,null),s(vs,null),s(jr,{data:void 0,topology:"none"})},[]))),pe.createElement(pe.Fragment,null,n)},Qn=de("none");Qn.debugLabel=ve("topology");var zf=de("unknown"),Wf=de([]),ys=de(100);ys.debugLabel=ve("network-quality");var bs=de("good");bs.debugLabel=ve("network-threshold");var O0=function(t){var n=t.children,r=kt(),i=sn(Qn),o=ce(j(function(a,s){return Kn(void 0,void 0,void 0,function(){var c;return Yn(this,function(l){switch(l.label){case 0:return r?[4,r.getNetworkTopology()]:[2];case 1:return c=l.sent(),!c||c?.topology==="none"?[2]:(s(Qn,c.topology),[2])}})})},[r]));return q("joined-meeting",o),q("network-connection",ce(j(function(a,s,c){switch(c.event){case"connected":c.type==="peer-to-peer"&&s(Qn,"peer"),c.type==="sfu"&&s(Qn,"sfu");break}},[]))),q("network-quality-change",ce(j(function(a,s,c){s(zf,function(l){return l!==c.networkState?c.networkState:l}),s(Wf,function(l){var d,f=(d=c.networkStateReasons)!==null&&d!==void 0?d:[];return as(l,f)?l:f}),s(ys,function(l){return l!==c.quality?c.quality:l}),s(bs,function(l){return l!==c.threshold?c.threshold:l})},[]))),q("left-meeting",ce(j(function(a,s){s(Qn,"none"),s(zf,"unknown"),s(Wf,[]),s(ys,100),s(bs,"good")},[]))),J(function(){!r||i!=="none"||o()},[r,o,i]),pe.createElement(pe.Fragment,null,n)},Tn=de({isLocalParticipantRecorded:!1,isRecording:!1});Tn.debugLabel=ve("recording-state");var I0=function(t){var n=t.children,r=Qi(),i=Xt({filter:"record"}),o=ce(j(function(a,s,c,l){var d=a(Tn),f={isLocalParticipantRecorded:d.isLocalParticipantRecorded,isRecording:d.isRecording,local:d.local,type:d.type},m={isLocalParticipantRecorded:f?.type==="local"||!f?.type?c:f.isLocalParticipantRecorded,isRecording:f?.type==="local"||!f?.type?c:f.isRecording,local:(f?.type==="local"||!f?.type)&&c?l:f?.local,type:c?"local":d?.type};St(f,m)||s(Tn,se(se({},f),m))},[]));return J(function(){var a=i.length>0,s=i.includes(r||"local");o(a,s)},[r,o,i]),q("recording-started",ce(j(function(a,s,c){var l,d=!0;switch(c.type){case"cloud-beta":case"cloud":{r&&((l=c.layout)===null||l===void 0?void 0:l.preset)==="single-participant"&&c.layout.session_id!==r&&(d=!1);break}}s(Tn,{error:!1,isLocalParticipantRecorded:d,isRecording:!0,layout:c?.layout,local:c?.local,recordingId:c?.recordingId,recordingStartedDate:new Date,startedBy:c?.startedBy,type:c?.type})},[r]))),q("recording-stopped",ce(j(function(a,s){s(Tn,function(c){return se(se({},c),{isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),q("recording-error",ce(j(function(a,s){s(Tn,function(c){return se(se({},c),{error:!0,isLocalParticipantRecorded:!1,isRecording:!1})})},[]))),q("left-meeting",ce(j(function(a,s){s(Tn,{isLocalParticipantRecorded:!1,isRecording:!1})},[]))),pe.createElement(pe.Fragment,null,n)},D0=function(){var t=sn(ro);return rt(t),t},_s=de(null);_s.debugLabel=ve("room-state");var L0=function(t){var n=t.children,r=kt(),i=D0(),o=ce(j(function(a,s){return Kn(void 0,void 0,void 0,function(){var c;return Yn(this,function(l){switch(l.label){case 0:return!r||i==="left-meeting"?[2]:[4,r.room()];case 1:return c=l.sent(),c&&"id"in c&&s(_s,c),[2,c]}})})},[r,i]));return q("access-state-updated",o),q("left-meeting",ce(j(function(a,s){return function(){s(_s,null)}},[]))),pe.createElement(pe.Fragment,null,n)},Zn=de({isTranscribing:!1,model:"general",language:"en",transcriptions:[]});Zn.debugLabel=ve("transcription-state");var j0=function(t){var n=t.children;return q("transcription-started",ce(j(function(r,i,o){i(Zn,{error:!1,transcriptionStartDate:new Date,isTranscribing:!0,transcriptions:[],endpointing:o.endpointing,extra:o.extra,includeRawResponse:o.includeRawResponse,instanceId:o.instanceId,language:o.language,model:o.model,profanity_filter:o.profanity_filter,punctuate:o.punctuate,redact:o.redact,startedBy:o.startedBy,tier:o.tier})},[]))),q("transcription-stopped",ce(j(function(r,i,o){i(Zn,function(a){return se(se({},a),{updatedBy:o.updatedBy,isTranscribing:!1})})},[]))),q("transcription-error",ce(j(function(r,i){i(Zn,function(o){return se(se({},o),{error:!0,isTranscribing:!1})})},[]))),q("left-meeting",ce(j(function(r,i){i(Zn,function(o){return se(se({},o),{isTranscribing:!1})})},[]))),q("app-message",ce(j(function(r,i,o){o?.fromId==="transcription"&&i(Zn,function(a){return se(se({},a),{isTranscribing:!0,transcriptions:He(He([],we(a.transcriptions),!1),[o.data],!1)})})},[]))),pe.createElement(pe.Fragment,null,n)},Hf={strictMode:!0},Jf=function(){return!0},R0={options:Hf,shouldCreateInstance:Jf},N0=function(t,n){var r=n===void 0?R0:n,i=r.parentElRef,o=r.options,a=o===void 0?Hf:o,s=r.shouldCreateInstance,c=s===void 0?Jf:s,l=we(te(null),2),d=l[0],f=l[1],m=ae();return J(function(){if(!c())return;function g(b){return Kn(this,void 0,void 0,function(){return Yn(this,function(_){switch(_.label){case 0:return[4,b.destroy()];case 1:return _.sent(),[2]}})})}var y=function(){setTimeout(function(){return f(null)},0)},v=Or.getCallInstance();if(!d&&v&&!v.isDestroyed()){v.once("call-instance-destroyed",y),f(v);return}if(d){St(m.current,a)||g(d);return}if(!v||v.isDestroyed())try{switch(t){case"callFrame":v=i?.current?Or.createFrame(i.current,se({},a)):Or.createFrame(se({},a));break;case"callObject":v=Or.createCallObject(se({},a));break}m.current=a,f(v),v.once("call-instance-destroyed",y)}catch(b){if(console.error("Error creating call instance:",b),a.strictMode)throw b}},[d,a,i,c,t]),d},V0=function(t){return N0("callObject",t)},F0=function(t){var n=t.children,r=t.jotaiStore,i=ns(t,["children","jotaiStore"]),o=ae({}),a=j(function(y){var v,b,_,S;if("action"in y){var T=y.action,M=Array.from((S=(_=o.current)===null||_===void 0?void 0:_[T])!==null&&S!==void 0?S:[]),x=M.filter(function(z){var R=we(z,1),ee=R[0];return ee<0}),C=M.filter(function(z){var R=we(z,1),ee=R[0];return ee>0}),E=He(He([],we(x),!1),we(C),!1);try{for(var O=Cf(E),V=O.next();!V.done;V=O.next()){var B=we(V.value,2),N=B[1];N(y)}}catch(z){v={error:z}}finally{try{V&&!V.done&&(b=O.return)&&b.call(O)}finally{if(v)throw v.error}}}},[]),s=j(function(y){y&&Object.keys(o.current).forEach(function(v){y.off(v,a),y.isDestroyed()||y.on(v,a)})},[a]),c="callObject"in i?i.callObject:null,l=Ne(function(){return"callObject"in i?{}:i},[i]),d=V0({options:l,shouldCreateInstance:j(function(){return!("callObject"in i)},[i])}),f=c??d;J(function(){f&&s(f)},[f,s]);var m=j(function(y,v,b){var _,S;o.current[y]||(o.current[y]=new Map,f&&(f.off(y,a),f.isDestroyed()||f.on(y,a))),!((_=o.current[y])===null||_===void 0)&&_.has(b)||(S=o.current[y])===null||S===void 0||S.set(b,v)},[f,a]),g=j(function(y,v){var b,_;(b=o.current[y])===null||b===void 0||b.delete(v),((_=o.current[y])===null||_===void 0?void 0:_.size)===0&&(f?.off(y,a),delete o.current[y])},[f,a]);return pe.createElement(hv,{store:r},pe.createElement(Pf.Provider,{value:f},pe.createElement(rs.Provider,{value:{on:m,off:g}},pe.createElement(L0,null,pe.createElement(A0,null,pe.createElement(O0,null,pe.createElement(k0,null,pe.createElement(I0,null,pe.createElement(E0,null,pe.createElement(j0,null,pe.createElement(P0,null,n)))))))))))},Rr=function(t){var n={},r=n.onAppMessage,i=kt(),o=j(function(s,c){c===void 0&&(c="*"),i&&i.sendAppMessage(s,c)},[i]),a=j(function(s){r?.(s,o)},[r,o]);return q("app-message",a),o},B0=de({state:"low",reason:"none"});B0.debugLabel=ve("cpu-load");var $0=de(null);$0.debugLabel=ve("input-settings");var U0=de({hidden:0,present:0});U0.debugLabel=ve("participant-counts");var z0=br(function(e){var t=de({},function(n,r,i){r(z0(e),i)});return t.debugLabel=ve("participant-receive-settings-".concat(e)),t}),W0=de(null);W0.debugLabel=ve("send-settings");const H0='@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--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-leading:initial;--tw-font-weight: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-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-duration:initial;--tw-ease:initial}}}@layer theme{:root,: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-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-black:#000;--color-white:#fff;--spacing:.25rem;--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: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--leading-snug:1.375;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--blur-lg:16px;--blur-xl:24px;--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-gray-40:#919191;--color-primary-action:#9191914d;--color-primary-action-hover:#91919133}}@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;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}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-2{inset:calc(var(--spacing)*2)}.inset-3{inset:calc(var(--spacing)*3)}.top-0{top:calc(var(--spacing)*0)}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-5{right:calc(var(--spacing)*5)}.right-14{right:calc(var(--spacing)*14)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-5{bottom:calc(var(--spacing)*5)}.bottom-25{bottom:calc(var(--spacing)*25)}.bottom-\\[6px\\]{bottom:6px}.left-0{left:calc(var(--spacing)*0)}.left-2{left:calc(var(--spacing)*2)}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-1000{z-index:1000}.z-\\[9999\\]{z-index:9999}.mx-auto{margin-inline:auto}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.flex{display:flex}.hidden{display:none}.inline{display:inline}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-\\[20px\\]{height:20px}.h-\\[28px\\]{height:28px}.h-\\[64px\\]{height:64px}.h-\\[180px\\]{height:180px}.h-\\[216px\\]{height:216px}.h-\\[300px\\]{height:300px}.h-\\[377px\\]{height:377px}.h-full{height:100%}.max-h-36{max-height:calc(var(--spacing)*36)}.min-h-11{min-height:calc(var(--spacing)*11)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-40{width:calc(var(--spacing)*40)}.w-\\[10px\\]{width:10px}.w-\\[36px\\]{width:36px}.w-\\[120px\\]{width:120px}.w-\\[144px\\]{width:144px}.w-\\[200px\\]{width:200px}.w-\\[252px\\]{width:252px}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[90\\%\\]{max-width:90%}.min-w-0{min-width:calc(var(--spacing)*0)}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.scale-25{--tw-scale-x:25%;--tw-scale-y:25%;--tw-scale-z:25%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-none{scale:none}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[22px\\]{border-radius:22px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-3xl{border-top-left-radius:var(--radius-3xl);border-bottom-left-radius:var(--radius-3xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.bg-\\[var\\(--color-primary-action\\)\\]{background-color:var(--color-primary-action)}.bg-black{background-color:var(--color-black)}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,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\\/95{background-color:#000000f2}@supports (color:color-mix(in lab,red,red)){.bg-black\\/95{background-color:color-mix(in oklab,var(--color-black)95%,transparent)}}.bg-gray-40\\/25{background-color:#91919140}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/25{background-color:color-mix(in oklab,var(--color-gray-40)25%,transparent)}}.bg-gray-40\\/30{background-color:#9191914d}@supports (color:color-mix(in lab,red,red)){.bg-gray-40\\/30{background-color:color-mix(in oklab,var(--color-gray-40)30%,transparent)}}.bg-red-600\\/25{background-color:#e4001440}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/25{background-color:color-mix(in oklab,var(--color-red-600)25%,transparent)}}.bg-red-600\\/50{background-color:#e4001480}@supports (color:color-mix(in lab,red,red)){.bg-red-600\\/50{background-color:color-mix(in oklab,var(--color-red-600)50%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\\/10{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.bg-\\[linear-gradient\\(transparent\\,\\#000000\\)\\]{background-image:linear-gradient(#0000,#000)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)\\,rgba\\(0\\,0\\,0\\,1\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,0\\)_40\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%);mask-image:linear-gradient(#0000,#000 10% 30%,#0000 40%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_10\\%\\,rgba\\(0\\,0\\,0\\,1\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,0\\)_50\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%);mask-image:linear-gradient(#0000 10%,#000 20% 40%,#0000 50%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_15\\%\\,rgba\\(0\\,0\\,0\\,1\\)_30\\%\\,rgba\\(0\\,0\\,0\\,1\\)_50\\%\\,rgba\\(0\\,0\\,0\\,0\\)_60\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%);mask-image:linear-gradient(#0000 15%,#000 30% 50%,#0000 60%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_20\\%\\,rgba\\(0\\,0\\,0\\,1\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,0\\)_70\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%);mask-image:linear-gradient(#0000 20%,#000 40% 60%,#0000 70%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_40\\%\\,rgba\\(0\\,0\\,0\\,1\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\,rgba\\(0\\,0\\,0\\,0\\)_90\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%);mask-image:linear-gradient(#0000 40%,#000 60% 80%,#0000 90%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_60\\%\\,rgba\\(0\\,0\\,0\\,1\\)_80\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 60%,#000 80%);mask-image:linear-gradient(#0000 60%,#000 80%)}.mask-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\)_70\\%\\,rgba\\(0\\,0\\,0\\,1\\)_100\\%\\)\\]{-webkit-mask-image:linear-gradient(#0000 70%,#000 100%);mask-image:linear-gradient(#0000 70%,#000)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-14{padding-right:calc(var(--spacing)*14)}.pr-\\[4px\\]{padding-right:4px}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-4{padding-left:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.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-\\[8px\\]{font-size:8px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.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)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.text-black{color:var(--color-black)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.text-white\\/75{color:#ffffffbf}@supports (color:color-mix(in lab,red,red)){.text-white\\/75{color:color-mix(in oklab,var(--color-white)75%,transparent)}}.underline{text-decoration-line:underline}.decoration-white\\/50{text-decoration-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.decoration-white\\/50{-webkit-text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent);text-decoration-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.opacity-0{opacity:0}.opacity-100{opacity:1}.mix-blend-difference{mix-blend-mode:difference}.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-2xs{--tw-shadow:0 1px var(--tw-shadow-color,#0000000d);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)}.blur{--tw-blur:blur(8px);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,)}.blur-sm{--tw-blur:blur(var(--blur-sm));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-\\[1px\\]{--tw-backdrop-blur:blur(1px);-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-\\[2px\\]{--tw-backdrop-blur:blur(2px);-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-\\[4px\\]{--tw-backdrop-blur:blur(4px);-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-\\[8px\\]{--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-\\[16px\\]{--tw-backdrop-blur:blur(16px);-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-\\[32px\\]{--tw-backdrop-blur:blur(32px);-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-\\[64px\\]{--tw-backdrop-blur:blur(64px);-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-lg{--tw-backdrop-blur:blur(var(--blur-lg));-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-none{--tw-backdrop-blur: ;-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-xl{--tw-backdrop-blur:blur(var(--blur-xl));-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-\\[backdrop-filter\\]{transition-property:-webkit-backdrop-filter,backdrop-filter;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-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.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)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}.placeholder\\:text-white\\/70::placeholder{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-white\\/70::placeholder{color:color-mix(in oklab,var(--color-white)70%,transparent)}}.placeholder\\:opacity-0::placeholder{opacity:0}.placeholder\\:opacity-70::placeholder{opacity:.7}@media(hover:hover){.hover\\:bg-\\[var\\(--color-primary-action-hover\\)\\]:hover{background-color:var(--color-primary-action-hover)}.hover\\:bg-black\\/30:hover{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-black\\/30:hover{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.hover\\:bg-gray-40\\/40:hover{background-color:#91919166}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-gray-40\\/40:hover{background-color:color-mix(in oklab,var(--color-gray-40)40%,transparent)}}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/15:hover{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.hover\\:bg-white\\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/80:hover{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.hover\\:bg-white\\/90:hover{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/90:hover{background-color:color-mix(in oklab,var(--color-white)90%,transparent)}}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}}@media(min-width:40rem){.sm\\:flex{display:flex}.sm\\:hidden{display:none}}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}.shadow-inset-white-10{box-shadow:inset 0 0 0 1px #ffffff1a}.shadow-inset-white-20{box-shadow:inset 0 0 0 1px #fff3}.shadow-focused{box-shadow:inset 0 0 0 1.5px #fff6}}@keyframes fadeInUp{0%{opacity:0;filter:blur(12px);transform:translateY(12px)}to{opacity:1;filter:blur();transform:translateY(0)}}@keyframes fadeOutUp{0%{opacity:1;filter:blur();transform:translateY(0)}to{opacity:0;filter:blur(12px);transform:translateY(-12px)}}@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-leading{syntax:"*";inherits:false}@property --tw-font-weight{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-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-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}';function J0(){return A("style",{children:H0})}const qf=Le(void 0);function q0({children:e}){const[t,n]=te(!1);return A(qf.Provider,{value:{hasUserInteracted:t,setHasUserInteracted:n},children:e})}function er(){const e=ye(qf);if(!e)throw new Error("useUserInteraction must be used within a UserInteractionProvider");return e}const ke="active",Qe="minimized",Et="hidden",Gf=Le(void 0),G0=3e4;function K0({children:e,showMinimizeButton:t=!0,initialState:n=Qe,controlledWidgetState:r=null,controlledShowMinimizeButton:i=null,customActiveWidth:o=null,customActiveHeight:a=null,customMinimizedWidth:s=null,customMinimizedHeight:c=null,videoButtonText:l=null,skipWelcomeVideo:d=!1}){const{setHasUserInteracted:f}=er(),m=Rr(),g=kt(),[y,v]=te(n),[b,_]=te(!1),[S,T]=te(!1),[M,x]=te(!1),[C,E]=te(null),[O,V]=te(!1),[B,N]=te(t),[z,R]=te(!1),[ee,X]=te(!1),[Z,W]=te(!1),K=ae(null),$=ae(null),U=ae(null),ie=ae(null),le=ae(n);J(()=>{le.current=y},[y]);const u=j(()=>{if(g)try{const h=g.meetingState();(h==="joined-meeting"||h==="joining-meeting")&&(console.log("Sending force-end event to Daily"),m({event:"force-end"},"*"))}catch{}_(!1),f(!1),V(!1),E(null),R(!1),X(!1),W(!1)},[g]),p=j(h=>{$.current!==null&&clearTimeout($.current),U.current!==null&&clearTimeout(U.current),h===ke?ie.current!==null&&(clearTimeout(ie.current),ie.current=null):le.current===ke&&h===Qe&&(ie.current=window.setTimeout(()=>{u(),ie.current=null},G0)),h===Et||le.current===Et?(T(!0),$.current=window.setTimeout(()=>{le.current=h,v(h),T(!1),x(!0),$.current=null,U.current=window.setTimeout(()=>{x(!1),U.current=null},300)},1)):(le.current=h,v(h),T(!1),x(!1))},[u]);return J(()=>{r!==null&&p(r)},[r]),J(()=>{i!==null&&N(i)},[i]),A(Gf.Provider,{value:{widgetState:y,setWidgetState:p,isAgentVideoReady:b,setIsAgentVideoReady:_,roomUrl:C,setRoomUrl:E,isTransitioning:M,isAboutToTransition:S,hasJoinedRoom:O,setHasJoinedRoom:V,resetDailyState:u,showMinimizeButton:B,setShowMinimizeButton:N,isImageChangeRequested:z,setIsImageChangeRequested:R,isImageChanging:ee,setIsImageChanging:X,customActiveWidth:o,customActiveHeight:a,customMinimizedWidth:s,customMinimizedHeight:c,videoButtonText:l,skipWelcomeVideo:d,audioPermissionBlocked:Z,setAudioPermissionBlocked:W,retryDailyAudioRef:K},children:e})}function At(){const e=ye(Gf);if(!e)throw new Error("useWidget must be used within a WidgetProvider");return e}const Kf=Le(void 0);function Y0({children:e}){const[t,n]=te(!0),[r,i]=te(!0),o=kt();return J(()=>{o&&o.setLocalAudio(!t)},[t,o]),A(Kf.Provider,{value:{isMicMuted:t,setIsMicMuted:n,isAudioMuted:r,setIsAudioMuted:i},children:e})}function Nr(){const e=ye(Kf);if(!e)throw new Error("useMute must be used within a MuteProvider");return e}const Yf=Le(void 0);function X0({children:e}){const t=Ne(()=>typeof window>"u"?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),[]);return A(Yf.Provider,{value:{isMobileDevice:t},children:e})}function ws(){const e=ye(Yf);if(!e)throw new Error("useMobile must be used within a MobileProvider");return e}const Xf=Le(void 0);function Q0({children:e}){const[t,n]=te(null);return A(Xf.Provider,{value:{agentData:t,setAgentData:n},children:e})}function Qt(){const e=ye(Xf);if(!e)throw new Error("useAgent must be used within an AgentProvider");return e}const Qf=360,Z0=30,Zf=Le(void 0);function e_({children:e}){const[t,n]=te(""),[r,i]=te(""),[o,a]=te(""),s=ae(null),c=ae(null),{agentData:l}=Qt(),{resetDailyState:d,setWidgetState:f}=At(),m=ae(Qf),g=j(b=>{c.current!==null&&(clearTimeout(c.current),c.current=null),i(b),b&&(c.current=window.setTimeout(()=>{i(""),c.current=null},1e4))},[]),y=j(()=>{n(""),g(""),a("")},[]),v=j(()=>{s.current!==null&&clearInterval(s.current);const b=l?.max_conv_dur!=null&&l.max_conv_dur>0?l.max_conv_dur:Qf;m.current=b,a(""),s.current=window.setInterval(()=>{m.current-=1,m.current<=Z0&&m.current>0?a(`• ${m.current}s left`):m.current===0&&s.current!==null&&(a(""),n(""),g(""),f(Qe),d(),clearInterval(s.current),s.current=null)},1e3)},[l,f,d]);return J(()=>{s.current!==null&&l?.max_conv_dur!=null&&l.max_conv_dur>0&&v()},[l?.max_conv_dur,v]),J(()=>{!r&&c.current!==null&&(clearTimeout(c.current),c.current=null)},[r]),J(()=>()=>{s.current!==null&&clearInterval(s.current),c.current!==null&&clearTimeout(c.current)},[]),A(Zf.Provider,{value:{errorMsg:t,setErrorMsg:n,nonFatalErrorMsg:r,setNonFatalErrorMsg:g,timeMsg:o,setTimeMsg:a,startMaxVideoTimer:v,resetErrors:y},children:e})}function io(){const e=ye(Zf);if(!e)throw new Error("useError must be used within an ErrorProvider");return e}function t_(){const e=Xt({filter:"remote"}),{timeMsg:t}=io(),{agentData:n}=Qt(),{isImageChanging:r}=At();if(e.length===0)return null;const i=e[0],o=n?.image_url;return A("div",{className:"h-full rounded-lg relative",children:[o&&A("div",{className:"absolute inset-0 bg-cover bg-center rounded-lg",style:{backgroundImage:`url(${o})`}}),A("div",{className:"relative w-full h-full",children:[A(Bf,{sessionId:i,type:"video",style:{objectFit:"cover",width:"100%",height:"100%",position:"relative"}}),A("div",{className:`absolute inset-0 bg-black/95 bg-cover bg-center rounded-lg transition-opacity
36
36
  transition-[backdrop-filter] duration-300 ease-in-out
37
- ${r?"opacity-100 backdrop-blur-lg":"opacity-0 backdrop-blur-none"}`})]}),t&&A("div",{className:"absolute top-2 left-2",children:A("div",{className:"bg-red-600/50 backdrop-blur-xl rounded-3xl py-2 px-4 w-fit shadow-inset-white-10",children:A("p",{className:"text-white text-lg font-semibold text-center",children:t})})})]})}const eh=Le({});function t_(e){const t=ae(null);return t.current===null&&(t.current=e()),t.current}const ks=typeof window<"u",n_=ks?an:J,Ss=Le(null);function xs(e,t){e.indexOf(t)===-1&&e.push(t)}function Ts(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Bt=(e,t,n)=>n>t?t:n<e?e:n;let Ms=()=>{};const $t={},th=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function nh(e){return typeof e=="object"&&e!==null}const rh=e=>/^0[^.\s]+$/u.test(e);function Cs(e){let t;return()=>(t===void 0&&(t=e()),t)}const ht=e=>e,r_=(e,t)=>n=>t(e(n)),Nr=(...e)=>e.reduce(r_),Vr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ps{constructor(){this.subscriptions=[]}add(t){return xs(this.subscriptions,t),()=>Ts(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ot=e=>e*1e3,pt=e=>e/1e3;function ih(e,t){return t?e*(1e3/t):0}const oh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,i_=1e-7,o_=12;function a_(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=oh(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>i_&&++s<o_);return a}function Fr(e,t,n,r){if(e===t&&n===r)return ht;const i=o=>a_(o,0,1,e,n);return o=>o===0||o===1?o:oh(i(o),t,r)}const ah=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sh=e=>t=>1-e(1-t),ch=Fr(.33,1.53,.69,.99),Es=sh(ch),lh=ah(Es),uh=e=>(e*=2)<1?.5*Es(e):.5*(2-Math.pow(2,-10*(e-1))),As=e=>1-Math.sin(Math.acos(e)),dh=sh(As),fh=ah(As),s_=Fr(.42,0,1,1),c_=Fr(0,0,.58,1),hh=Fr(.42,0,.58,1),l_=e=>Array.isArray(e)&&typeof e[0]!="number",ph=e=>Array.isArray(e)&&typeof e[0]=="number",u_={linear:ht,easeIn:s_,easeInOut:hh,easeOut:c_,circIn:As,circInOut:fh,circOut:dh,backIn:Es,backInOut:lh,backOut:ch,anticipate:uh},d_=e=>typeof e=="string",mh=e=>{if(ph(e)){Ms(e.length===4);const[t,n,r,i]=e;return Fr(t,n,r,i)}else if(d_(e))return u_[e];return e},oo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function f_(e,t){let n=new Set,r=new Set,i=!1,o=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(l.schedule(d),e()),d(s)}const l={schedule:(d,f=!1,m=!1)=>{const y=m&&i?n:r;return f&&a.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(s=d,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(d))}};return l}const h_=40;function gh(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=oo.reduce((T,M)=>(T[M]=f_(o),T),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:d,update:f,preRender:m,render:g,postRender:y}=a,v=()=>{const T=$t.useManualTiming?i.timestamp:performance.now();n=!1,$t.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,h_),1)),i.timestamp=T,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),d.process(i),f.process(i),m.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},b=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:oo.reduce((T,M)=>{const x=a[M];return T[M]=(C,E=!1,O=!1)=>(n||b(),x.schedule(C,E,O)),T},{}),cancel:T=>{for(let M=0;M<oo.length;M++)a[oo[M]].cancel(T)},state:i,steps:a}}const{schedule:Me,cancel:Zt,state:$e,steps:Os}=gh(typeof requestAnimationFrame<"u"?requestAnimationFrame:ht,!0);let ao;function p_(){ao=void 0}const tt={now:()=>(ao===void 0&&tt.set($e.isProcessing||$t.useManualTiming?$e.timestamp:performance.now()),ao),set:e=>{ao=e,queueMicrotask(p_)}},vh=e=>t=>typeof t=="string"&&t.startsWith(e),Is=vh("--"),m_=vh("var(--"),Ds=e=>m_(e)?g_.test(e.split("/*")[0].trim()):!1,g_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,tr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Br={...tr,transform:e=>Bt(0,1,e)},so={...tr,default:1},$r=e=>Math.round(e*1e5)/1e5,Ls=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function v_(e){return e==null}const y_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,js=(e,t)=>n=>!!(typeof n=="string"&&y_.test(n)&&n.startsWith(e)||t&&!v_(n)&&Object.prototype.hasOwnProperty.call(n,t)),yh=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Ls);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},b_=e=>Bt(0,255,e),Rs={...tr,transform:e=>Math.round(b_(e))},Mn={test:js("rgb","red"),parse:yh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rs.transform(e)+", "+Rs.transform(t)+", "+Rs.transform(n)+", "+$r(Br.transform(r))+")"};function __(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ns={test:js("#"),parse:__,transform:Mn.transform},Ur=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),en=Ur("deg"),It=Ur("%"),Y=Ur("px"),w_=Ur("vh"),k_=Ur("vw"),bh={...It,parse:e=>It.parse(e)/100,transform:e=>It.transform(e*100)},nr={test:js("hsl","hue"),parse:yh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+It.transform($r(t))+", "+It.transform($r(n))+", "+$r(Br.transform(r))+")"},De={test:e=>Mn.test(e)||Ns.test(e)||nr.test(e),parse:e=>Mn.test(e)?Mn.parse(e):nr.test(e)?nr.parse(e):Ns.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mn.transform(e):nr.transform(e),getAnimatableNone:e=>{const t=De.parse(e);return t.alpha=0,De.transform(t)}},S_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function x_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ls)?.length||0)+(e.match(S_)?.length||0)>0}const _h="number",wh="color",T_="var",M_="var(",kh="${}",C_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function zr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(C_,c=>(De.test(c)?(r.color.push(o),i.push(wh),n.push(De.parse(c))):c.startsWith(M_)?(r.var.push(o),i.push(T_),n.push(c)):(r.number.push(o),i.push(_h),n.push(parseFloat(c))),++o,kh)).split(kh);return{values:n,split:s,indexes:r,types:i}}function Sh(e){return zr(e).values}function xh(e){const{split:t,types:n}=zr(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===_h?o+=$r(i[a]):s===wh?o+=De.transform(i[a]):o+=i[a]}return o}}const P_=e=>typeof e=="number"?0:De.test(e)?De.getAnimatableNone(e):e;function E_(e){const t=Sh(e);return xh(e)(t.map(P_))}const tn={test:x_,parse:Sh,createTransformer:xh,getAnimatableNone:E_};function Vs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function A_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=Vs(c,s,e+.3333333333333333),o=Vs(c,s,e),a=Vs(c,s,e-.3333333333333333)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function co(e,t){return n=>n>0?t:e}const Pe=(e,t,n)=>e+(t-e)*n,Fs=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},O_=[Ns,Mn,nr],I_=e=>O_.find(t=>t.test(e));function Th(e){const t=I_(e);if(!t)return!1;let n=t.parse(e);return t===nr&&(n=A_(n)),n}const Mh=(e,t)=>{const n=Th(e),r=Th(t);if(!n||!r)return co(e,t);const i={...n};return o=>(i.red=Fs(n.red,r.red,o),i.green=Fs(n.green,r.green,o),i.blue=Fs(n.blue,r.blue,o),i.alpha=Pe(n.alpha,r.alpha,o),Mn.transform(i))},Bs=new Set(["none","hidden"]);function D_(e,t){return Bs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function L_(e,t){return n=>Pe(e,t,n)}function $s(e){return typeof e=="number"?L_:typeof e=="string"?Ds(e)?co:De.test(e)?Mh:N_:Array.isArray(e)?Ch:typeof e=="object"?De.test(e)?Mh:j_:co}function Ch(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>$s(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function j_(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=$s(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function R_(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}const N_=(e,t)=>{const n=tn.createTransformer(t),r=zr(e),i=zr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Bs.has(e)&&!i.values.length||Bs.has(t)&&!r.values.length?D_(e,t):Nr(Ch(R_(r,i),i.values),n):co(e,t)};function Ph(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Pe(e,t,n):$s(e)(e,t)}const V_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Me.update(t,n),stop:()=>Zt(t),now:()=>$e.isProcessing?$e.timestamp:tt.now()}},Eh=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},lo=2e4;function Us(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<lo;)t+=n,r=e.next(t);return t>=lo?1/0:t}function F_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Us(r),lo);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:pt(i)}}const B_=5;function Ah(e,t,n){const r=Math.max(t-B_,0);return ih(n-e(r),t-r)}const Ee={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},zs=.001;function $_({duration:e=Ee.duration,bounce:t=Ee.bounce,velocity:n=Ee.velocity,mass:r=Ee.mass}){let i,o,a=1-t;a=Bt(Ee.minDamping,Ee.maxDamping,a),e=Bt(Ee.minDuration,Ee.maxDuration,pt(e)),a<1?(i=l=>{const d=l*a,f=d*e,m=d-n,g=Ws(l,a),y=Math.exp(-f);return zs-m/g*y},o=l=>{const f=l*a*e,m=f*n+n,g=Math.pow(a,2)*Math.pow(l,2)*e,y=Math.exp(-f),v=Ws(Math.pow(l,2),a);return(-i(l)+zs>0?-1:1)*((m-g)*y)/v}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-zs+d*f},o=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const s=5/e,c=z_(i,o,s);if(e=Ot(e),isNaN(c))return{stiffness:Ee.stiffness,damping:Ee.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const U_=12;function z_(e,t,n){let r=n;for(let i=1;i<U_;i++)r=r-e(r)/t(r);return r}function Ws(e,t){return e*Math.sqrt(1-t*t)}const W_=["duration","bounce"],H_=["stiffness","damping","mass"];function Oh(e,t){return t.some(n=>e[n]!==void 0)}function J_(e){let t={velocity:Ee.velocity,stiffness:Ee.stiffness,damping:Ee.damping,mass:Ee.mass,isResolvedFromDuration:!1,...e};if(!Oh(e,H_)&&Oh(e,W_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Bt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ee.mass,stiffness:i,damping:o}}else{const n=$_(e);t={...t,...n,mass:Ee.mass},t.isResolvedFromDuration=!0}return t}function uo(e=Ee.visualDuration,t=Ee.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:d,duration:f,velocity:m,isResolvedFromDuration:g}=J_({...n,velocity:-pt(n.velocity||0)}),y=m||0,v=l/(2*Math.sqrt(c*d)),b=a-o,_=pt(Math.sqrt(c/d)),S=Math.abs(b)<5;r||(r=S?Ee.restSpeed.granular:Ee.restSpeed.default),i||(i=S?Ee.restDelta.granular:Ee.restDelta.default);let T;if(v<1){const x=Ws(_,v);T=C=>{const E=Math.exp(-v*_*C);return a-E*((y+v*_*b)/x*Math.sin(x*C)+b*Math.cos(x*C))}}else if(v===1)T=x=>a-Math.exp(-_*x)*(b+(y+_*b)*x);else{const x=_*Math.sqrt(v*v-1);T=C=>{const E=Math.exp(-v*_*C),O=Math.min(x*C,300);return a-E*((y+v*_*b)*Math.sinh(O)+x*b*Math.cosh(O))/x}}const M={calculatedDuration:g&&f||null,next:x=>{const C=T(x);if(g)s.done=x>=f;else{let E=x===0?y:0;v<1&&(E=x===0?Ot(y):Ah(T,x,C));const O=Math.abs(E)<=r,V=Math.abs(a-C)<=i;s.done=O&&V}return s.value=s.done?a:C,s},toString:()=>{const x=Math.min(Us(M),lo),C=Eh(E=>M.next(x*E).value,x,30);return x+"ms "+C},toTransition:()=>{}};return M}uo.applyToOptions=e=>{const t=F_(e,100,uo);return e.ease=t.ease,e.duration=Ot(t.duration),e.type="keyframes",e};function Hs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],m={done:!1,value:f},g=O=>s!==void 0&&O<s||c!==void 0&&O>c,y=O=>s===void 0?c:c===void 0||Math.abs(s-O)<Math.abs(c-O)?s:c;let v=n*t;const b=f+v,_=a===void 0?b:a(b);_!==b&&(v=_-f);const S=O=>-v*Math.exp(-O/r),T=O=>_+S(O),M=O=>{const V=S(O),B=T(O);m.done=Math.abs(V)<=l,m.value=m.done?_:B};let x,C;const E=O=>{g(m.value)&&(x=O,C=uo({keyframes:[m.value,y(m.value)],velocity:Ah(T,O,m.value),damping:i,stiffness:o,restDelta:l,restSpeed:d}))};return E(0),{calculatedDuration:null,next:O=>{let V=!1;return!C&&x===void 0&&(V=!0,M(O),E(O)),x!==void 0&&O>=x?C.next(O-x):(!V&&M(O),m)}}}function q_(e,t,n){const r=[],i=n||$t.mix||Ph,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||ht:t;s=Nr(c,s)}r.push(s)}return r}function G_(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ms(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=q_(t,r,i),c=s.length,l=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const m=Vr(e[f],e[f+1],d);return s[f](m)};return n?d=>l(Bt(e[0],e[o-1],d)):l}function K_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Vr(0,t,r);e.push(Pe(n,1,i))}}function Y_(e){const t=[0];return K_(t,e.length-1),t}function X_(e,t){return e.map(n=>n*t)}function Q_(e,t){return e.map(()=>t||hh).splice(0,e.length-1)}function Wr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=l_(r)?r.map(mh):mh(r),o={done:!1,value:t[0]},a=X_(n&&n.length===t.length?n:Y_(t),e),s=G_(a,t,{ease:Array.isArray(i)?i:Q_(t,i)});return{calculatedDuration:e,next:c=>(o.value=s(c),o.done=c>=e,o)}}const Z_=e=>e!==null;function Js(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(Z_),s=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const ew={decay:Hs,inertia:Hs,tween:Wr,keyframes:Wr,spring:uo};function Ih(e){typeof e.type=="string"&&(e.type=ew[e.type])}class qs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const tw=e=>e/100;class Gs extends qs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==tt.now()&&this.tick(tt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ih(t);const{type:n=Wr,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=t;let{keyframes:s}=t;const c=n||Wr;c!==Wr&&typeof s[0]!="number"&&(this.mixKeyframes=Nr(tw,Ph(s[0],s[1])),s=[0,100]);const l=c({...t,keyframes:s});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...s].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=Us(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:d,repeat:f,repeatType:m,repeatDelay:g,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const _=this.currentTime-l*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,M=r;if(f){const O=Math.min(this.currentTime,i)/s;let V=Math.floor(O),B=O%1;!B&&O>=1&&(B=1),B===1&&V--,V=Math.min(V,f+1),!!(V%2)&&(m==="reverse"?(B=1-B,g&&(B-=g/s)):m==="mirror"&&(M=a)),T=Bt(0,1,B)*s}const x=S?{done:!1,value:d[0]}:M.next(T);o&&(x.value=o(x.value));let{done:C}=x;!S&&c!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&y!==Hs&&(x.value=Js(d,this.options,b,this.speed)),v&&v(x.value),E&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return pt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pt(t)}get time(){return pt(this.currentTime)}set time(t){t=Ot(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(tt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=pt(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=V_,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function nw(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Cn=e=>e*180/Math.PI,Ks=e=>{const t=Cn(Math.atan2(e[1],e[0]));return Ys(t)},rw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ks,rotateZ:Ks,skewX:e=>Cn(Math.atan(e[1])),skewY:e=>Cn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ys=e=>(e=e%360,e<0&&(e+=360),e),Dh=Ks,Lh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),iw={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Lh,scaleY:jh,scale:e=>(Lh(e)+jh(e))/2,rotateX:e=>Ys(Cn(Math.atan2(e[6],e[5]))),rotateY:e=>Ys(Cn(Math.atan2(-e[2],e[0]))),rotateZ:Dh,rotate:Dh,skewX:e=>Cn(Math.atan(e[4])),skewY:e=>Cn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xs(e){return e.includes("scale")?1:0}function Qs(e,t){if(!e||e==="none")return Xs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=iw,i=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=rw,i=s}if(!i)return Xs(t);const o=r[t],a=i[1].split(",").map(aw);return typeof o=="function"?o(a):a[o]}const ow=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qs(n,t)};function aw(e){return parseFloat(e.trim())}const rr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ir=new Set(rr),Rh=e=>e===tr||e===Y,sw=new Set(["x","y","z"]),cw=rr.filter(e=>!sw.has(e));function lw(e){const t=[];return cw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Pn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Qs(t,"x"),y:(e,{transform:t})=>Qs(t,"y")};Pn.translateX=Pn.x,Pn.translateY=Pn.y;const En=new Set;let Zs=!1,ec=!1,tc=!1;function Nh(){if(ec){const e=Array.from(En).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=lw(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{r.getValue(o)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ec=!1,Zs=!1,En.forEach(e=>e.complete(tc)),En.clear()}function Vh(){En.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ec=!0)})}function uw(){tc=!0,Vh(),Nh(),tc=!1}class nc{constructor(t,n,r,i,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(En.add(this),Zs||(Zs=!0,Me.read(Vh),Me.resolveKeyframes(Nh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}nw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),En.delete(this)}cancel(){this.state==="scheduled"&&(En.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const dw=e=>e.startsWith("--");function fw(e,t,n){dw(t)?e.style.setProperty(t,n):e.style[t]=n}const hw=Cs(()=>window.ScrollTimeline!==void 0),pw={};function mw(e,t){const n=Cs(e);return()=>pw[t]??n()}const Fh=mw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Hr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Bh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hr([0,.65,.55,1]),circOut:Hr([.55,0,1,.45]),backIn:Hr([.31,.01,.66,-.59]),backOut:Hr([.33,1.53,.69,.99])};function $h(e,t){if(e)return typeof e=="function"?Fh()?Eh(e,t):"ease-out":ph(e)?Hr(e):Array.isArray(e)?e.map(n=>$h(n,t)||Bh.easeOut):Bh[e]}function gw(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const d={[t]:n};c&&(d.offset=c);const f=$h(s,i);Array.isArray(f)&&(d.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return l&&(m.pseudoElement=l),e.animate(d,m)}function Uh(e){return typeof e=="function"&&"applyToOptions"in e}function vw({type:e,...t}){return Uh(e)&&Fh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class yw extends qs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:s,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,Ms(typeof t.type!="string");const l=vw(t);this.animation=gw(n,r,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=Js(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(d):fw(n,r,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return pt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pt(t)}get time(){return pt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ot(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&hw()?(this.animation.timeline=t,ht):n(this)}}const zh={anticipate:uh,backInOut:lh,circInOut:fh};function bw(e){return e in zh}function _w(e){typeof e.ease=="string"&&bw(e.ease)&&(e.ease=zh[e.ease])}const Wh=10;class ww extends yw{constructor(t){_w(t),Ih(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Gs({...a,autoplay:!1}),c=Ot(this.finishedTime??this.time);n.setWithVelocity(s.sample(c-Wh).value,s.sample(c).value,Wh),s.stop()}}const Hh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tn.test(e)||e==="0")&&!e.startsWith("url("));function kw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Sw(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Hh(i,t),s=Hh(o,t);return!a||!s?!1:kw(e)||(n==="spring"||Uh(n))&&r}function rc(e){e.duration=0,e.type="keyframes"}const xw=new Set(["opacity","clipPath","filter","transform"]),Tw=Cs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Mw(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Tw()&&n&&xw.has(n)&&(n!=="transform"||!l)&&!c&&!r&&i!=="mirror"&&o!==0&&a!=="inertia"}const Cw=40;class Pw extends qs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",keyframes:s,name:c,motionValue:l,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tt.now();const m={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,name:c,motionValue:l,element:d,...f},g=d?.KeyframeResolver||nc;this.keyframeResolver=new g(s,(y,v,b)=>this.onKeyframesResolved(y,v,m,!b),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:a,velocity:s,delay:c,isHandoff:l,onUpdate:d}=r;this.resolvedAt=tt.now(),Sw(t,o,a,s)||(($t.instantAnimations||!c)&&d?.(Js(t,r,n)),t[0]=t[t.length-1],rc(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Cw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&Mw(m)?new ww({...m,element:m.motionValue.owner.current}):new Gs(m);g.finished.then(()=>this.notifyFinished()).catch(ht),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),uw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ew=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Aw(e){const t=Ew.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Jh(e,t,n=1){const[r,i]=Aw(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return th(a)?parseFloat(a):a}return Ds(i)?Jh(i,t,n+1):i}function ic(e,t){return e?.[t]??e?.default??e}const qh=new Set(["width","height","top","left","right","bottom",...rr]),Ow={test:e=>e==="auto",parse:e=>e},Gh=e=>t=>t.test(e),Kh=[tr,Y,It,en,k_,w_,Ow],Yh=e=>Kh.find(Gh(e));function Iw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||rh(e):!0}const Dw=new Set(["brightness","contrast","saturate","opacity"]);function Lw(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ls)||[];if(!r)return e;const i=n.replace(r,"");let o=Dw.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const jw=/\b([a-z-]*)\(.*?\)/gu,oc={...tn,getAnimatableNone:e=>{const t=e.match(jw);return t?t.map(Lw).join(" "):e}},Xh={...tr,transform:Math.round},ac={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,radius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,backgroundPositionX:Y,backgroundPositionY:Y,...{rotate:en,rotateX:en,rotateY:en,rotateZ:en,scale:so,scaleX:so,scaleY:so,scaleZ:so,skew:en,skewX:en,skewY:en,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:Br,originX:bh,originY:bh,originZ:Y},zIndex:Xh,fillOpacity:Br,strokeOpacity:Br,numOctaves:Xh},Rw={...ac,color:De,backgroundColor:De,outlineColor:De,fill:De,stroke:De,borderColor:De,borderTopColor:De,borderRightColor:De,borderBottomColor:De,borderLeftColor:De,filter:oc,WebkitFilter:oc},Qh=e=>Rw[e];function Zh(e,t){let n=Qh(e);return n!==oc&&(n=tn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Nw=new Set(["auto","none","0"]);function Vw(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!Nw.has(o)&&zr(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Zh(n,i)}class Fw extends nc{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Ds(l))){const d=Jh(l,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!qh.has(r)||t.length!==2)return;const[i,o]=t,a=Yh(i),s=Yh(o);if(a!==s)if(Rh(a)&&Rh(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Pn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Iw(t[i]))&&r.push(i);r.length&&Vw(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,a=r[o];r[o]=Pn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,c])=>{t.getValue(s).set(c)}),this.resolveNoneKeyframes()}}function Bw(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const ep=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function $w(e){return nh(e)&&"offsetHeight"in e}const tp=30,Uw=e=>!isNaN(parseFloat(e));class zw{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=tt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=tt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Uw(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ps);const r=this.events[t].add(n);return t==="change"?()=>{r(),Me.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=tt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>tp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,tp);return ih(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function or(e,t){return new zw(e,t)}const{schedule:sc}=gh(queueMicrotask,!1),xt={x:!1,y:!1};function np(){return xt.x||xt.y}function Ww(e){return e==="x"||e==="y"?xt[e]?null:(xt[e]=!0,()=>{xt[e]=!1}):xt.x||xt.y?null:(xt.x=xt.y=!0,()=>{xt.x=xt.y=!1})}function rp(e,t){const n=Bw(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function ip(e){return!(e.pointerType==="touch"||np())}function Hw(e,t,n={}){const[r,i,o]=rp(e,n),a=s=>{if(!ip(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const d=f=>{ip(f)&&(l(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(s=>{s.addEventListener("pointerenter",a,i)}),o}const op=(e,t)=>t?e===t?!0:op(e,t.parentElement):!1,cc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Jw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function qw(e){return Jw.has(e.tagName)||e.tabIndex!==-1}const fo=new WeakSet;function ap(e){return t=>{t.key==="Enter"&&e(t)}}function lc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Gw=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ap(()=>{if(fo.has(n))return;lc(n,"down");const i=ap(()=>{lc(n,"up")}),o=()=>lc(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function sp(e){return cc(e)&&!np()}function Kw(e,t,n={}){const[r,i,o]=rp(e,n),a=s=>{const c=s.currentTarget;if(!sp(s))return;fo.add(c);const l=t(c,s),d=(g,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),fo.has(c)&&fo.delete(c),sp(g)&&typeof l=="function"&&l(g,{success:y})},f=g=>{d(g,c===window||c===document||n.useGlobalTarget||op(c,g.target))},m=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,i),$w(s)&&(s.addEventListener("focus",l=>Gw(l,i)),!qw(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),o}function cp(e){return nh(e)&&"ownerSVGElement"in e}function Yw(e){return cp(e)&&e.tagName==="svg"}const qe=e=>!!(e&&e.getVelocity),Xw=[...Kh,De,tn],Qw=e=>Xw.find(Gh(e)),lp=Le({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Zw(e=!0){const t=ye(Ss);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=No();J(()=>{if(e)return i(o)},[e]);const a=j(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const up=Le({strict:!1}),dp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ar={};for(const e in dp)ar[e]={isEnabled:t=>dp[e].some(n=>!!t[n])};function ek(e){for(const t in e)ar[t]={...ar[t],...e[t]}}const tk=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ho(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tk.has(e)}let fp=e=>!ho(e);function nk(e){typeof e=="function"&&(fp=t=>t.startsWith("on")?!ho(t):e(t))}try{nk(require("@emotion/is-prop-valid").default)}catch{}function rk(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(fp(i)||n===!0&&ho(i)||!t&&!ho(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const po=Le({});function mo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Jr(e){return typeof e=="string"||Array.isArray(e)}const uc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],dc=["initial",...uc];function go(e){return mo(e.animate)||dc.some(t=>Jr(e[t]))}function hp(e){return!!(go(e)||e.variants)}function ik(e,t){if(go(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Jr(n)?n:void 0,animate:Jr(r)?r:void 0}}return e.inherit!==!1?t:{}}function ok(e){const{initial:t,animate:n}=ik(e,ye(po));return Ne(()=>({initial:t,animate:n}),[pp(t),pp(n)])}function pp(e){return Array.isArray(e)?e.join(" "):e}const qr={};function ak(e){for(const t in e)qr[t]=e[t],Is(t)&&(qr[t].isCSSVariable=!0)}function mp(e,{layout:t,layoutId:n}){return ir.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qr[e]||e==="opacity")}const sk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ck=rr.length;function lk(e,t,n){let r="",i=!0;for(let o=0;o<ck;o++){const a=rr[o],s=e[a];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(a.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=ep(s,ac[a]);if(!c){i=!1;const d=sk[a]||a;r+=`${d}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function fc(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const c in t){const l=t[c];if(ir.has(c)){a=!0;continue}else if(Is(c)){i[c]=l;continue}else{const d=ep(l,ac[c]);c.startsWith("origin")?(s=!0,o[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=lk(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:d=0}=o;r.transformOrigin=`${c} ${l} ${d}`}}const hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gp(e,t,n){for(const r in t)!qe(t[r])&&!mp(r,n)&&(e[r]=t[r])}function uk({transformTemplate:e},t){return Ne(()=>{const n=hc();return fc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dk(e,t){const n=e.style||{},r={};return gp(r,n,e),Object.assign(r,uk(e,t)),r}function fk(e,t){const n={},r=dk(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const hk={offset:"stroke-dashoffset",array:"stroke-dasharray"},pk={offset:"strokeDashoffset",array:"strokeDasharray"};function mk(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?hk:pk;e[o.offset]=Y.transform(-r);const a=Y.transform(t),s=Y.transform(n);e[o.array]=`${a} ${s}`}function vp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},c,l,d){if(fc(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=d?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&mk(f,i,o,a,!1)}const yp=()=>({...hc(),attrs:{}}),bp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gk(e,t,n,r){const i=Ne(()=>{const o=yp();return vp(o,t,bp(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};gp(o,e.style,e),i.style={...o,...i.style}}return i}const vk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function pc(e){return typeof e!="string"||e.includes("-")?!1:!!(vk.indexOf(e)>-1||/[A-Z]/u.test(e))}function yk(e,t,n,{latestValues:r},i,o=!1){const s=(pc(e)?gk:fk)(t,r,i,e),c=rk(t,typeof e=="string",o),l=e!==Fe?{...c,...s,ref:n}:{},{children:d}=t,f=Ne(()=>qe(d)?d.get():d,[d]);return re(e,{...l,children:f})}function _p(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function mc(e,t,n,r){if(typeof t=="function"){const[i,o]=_p(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=_p(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function vo(e){return qe(e)?e.get():e}function bk({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:_k(n,r,i,e),renderState:t()}}function _k(e,t,n,r){const i={},o=r(e,{});for(const m in o)i[m]=vo(o[m]);let{initial:a,animate:s}=e;const c=go(e),l=hp(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?s:a;if(f&&typeof f!="boolean"&&!mo(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const y=mc(e,m[g]);if(y){const{transitionEnd:v,transition:b,..._}=y;for(const S in _){let T=_[S];if(Array.isArray(T)){const M=d?T.length-1:0;T=T[M]}T!==null&&(i[S]=T)}for(const S in v)i[S]=v[S]}}}return i}const wp=e=>(t,n)=>{const r=ye(po),i=ye(Ss),o=()=>bk(e,t,r,i);return n?o():t_(o)};function gc(e,t,n){const{style:r}=e,i={};for(const o in r)(qe(r[o])||t.style&&qe(t.style[o])||mp(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const wk=wp({scrapeMotionValuesFromProps:gc,createRenderState:hc});function kp(e,t,n){const r=gc(e,t,n);for(const i in e)if(qe(e[i])||qe(t[i])){const o=rr.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const kk=wp({scrapeMotionValuesFromProps:kp,createRenderState:yp}),Sk=Symbol.for("motionComponentSymbol");function sr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function xk(e,t,n){return j(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):sr(n)&&(n.current=r))},[t])}const vc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Sp="data-"+vc("framerAppearId"),xp=Le({});function Tk(e,t,n,r,i){const{visualElement:o}=ye(po),a=ye(up),s=ye(Ss),c=ye(lp).reducedMotion,l=ae(null);r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));const d=l.current,f=ye(xp);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Mk(l.current,n,i,f);const m=ae(!1);Wo(()=>{d&&m.current&&d.update(n,s)});const g=n[Sp],y=ae(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return n_(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),y.current&&d.animationState&&d.animationState.animateChanges())}),J(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),d.enteringChildren=void 0)}),d}function Mk(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Tp(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&sr(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l})}function Tp(e){if(e)return e.options.allowProjection!==!1?e.projection:Tp(e.parent)}function yc(e,{forwardMotionProps:t=!1}={},n,r){n&&ek(n);const i=pc(e)?kk:wk;function o(s,c){let l;const d={...ye(lp),...s,layoutId:Ck(s)},{isStatic:f}=d,m=ok(s),g=i(s,f);if(!f&&ks){Pk();const y=Ek(d);l=y.MeasureLayout,m.visualElement=Tk(e,g,d,r,y.ProjectionNode)}return A(po.Provider,{value:m,children:[l&&m.visualElement?A(l,{visualElement:m.visualElement,...d}):null,yk(e,s,xk(g,m.visualElement,c),g,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=Ge(o);return a[Sk]=e,a}function Ck({layoutId:e}){const t=ye(eh).id;return t&&e!==void 0?t+"-"+e:e}function Pk(e,t){ye(up).strict}function Ek(e){const{drag:t,layout:n}=ar;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Ak(e,t){if(typeof Proxy>"u")return yc;const n=new Map,r=(o,a)=>yc(o,a,e,t),i=(o,a)=>r(o,a);return new Proxy(i,{get:(o,a)=>a==="create"?r:(n.has(a)||n.set(a,yc(a,void 0,e,t)),n.get(a))})}function Mp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ok({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ik(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function bc(e){return e===void 0||e===1}function _c({scale:e,scaleX:t,scaleY:n}){return!bc(e)||!bc(t)||!bc(n)}function An(e){return _c(e)||Cp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Cp(e){return Pp(e.x)||Pp(e.y)}function Pp(e){return e&&e!=="0%"}function yo(e,t,n){const r=e-n,i=t*r;return n+i}function Ep(e,t,n,r,i){return i!==void 0&&(e=yo(e,i,r)),yo(e,n,r)+t}function wc(e,t=0,n=1,r,i){e.min=Ep(e.min,t,n,r,i),e.max=Ep(e.max,t,n,r,i)}function Ap(e,{x:t,y:n}){wc(e.x,t.translate,t.scale,t.originPoint),wc(e.y,n.translate,n.scale,n.originPoint)}const Op=.999999999999,Ip=1.0000000000001;function Dk(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&lr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Ap(e,a)),r&&An(o.latestValues)&&lr(e,o.latestValues))}t.x<Ip&&t.x>Op&&(t.x=1),t.y<Ip&&t.y>Op&&(t.y=1)}function cr(e,t){e.min=e.min+t,e.max=e.max+t}function Dp(e,t,n,r,i=.5){const o=Pe(e.min,e.max,i);wc(e,t,n,o,r)}function lr(e,t){Dp(e.x,t.x,t.scaleX,t.scale,t.originX),Dp(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lp(e,t){return Mp(Ik(e.getBoundingClientRect(),t))}function Lk(e,t,n){const r=Lp(e,n),{scroll:i}=t;return i&&(cr(r.x,i.offset.x),cr(r.y,i.offset.y)),r}const jp=()=>({translate:0,scale:1,origin:0,originPoint:0}),ur=()=>({x:jp(),y:jp()}),Rp=()=>({min:0,max:0}),Ie=()=>({x:Rp(),y:Rp()}),kc={current:null},Np={current:!1};function jk(){if(Np.current=!0,!!ks)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kc.current=e.matches;e.addEventListener("change",t),t()}else kc.current=!1}const Rk=new WeakMap;function Nk(e,t,n){for(const r in t){const i=t[r],o=n[r];if(qe(i))e.addValue(r,i);else if(qe(o))e.addValue(r,or(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,or(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Vk{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=tt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Me.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=go(n),this.isVariantNode=hp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&qe(g)&&g.set(c[m])}}mount(t){this.current=t,Rk.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Np.current||jk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:kc.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Zt(this.notifyUpdate),Zt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ir.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Me.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ar){const n=ar[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ie()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Vp.length;r++){const i=Vp[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Nk(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=or(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(th(r)||rh(r))?r=parseFloat(r):!Qw(r)&&tn.test(n)&&(r=Zh(t,n)),this.setBaseTarget(t,qe(r)?r.get():r)),qe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=mc(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!qe(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ps),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){sc.render(this.render)}}class Fp extends Vk{constructor(){super(...arguments),this.KeyframeResolver=Fw}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Bp(e,{style:t,vars:n},r,i){const o=e.style;let a;for(a in t)o[a]=t[a];i?.applyProjectionStyles(o,r);for(a in n)o.setProperty(a,n[a])}function Fk(e){return window.getComputedStyle(e)}class Bk extends Fp{constructor(){super(...arguments),this.type="html",this.renderInstance=Bp}readValueFromInstance(t,n){if(ir.has(n))return this.projection?.isProjecting?Xs(n):ow(t,n);{const r=Fk(t),i=(Is(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lp(t,n)}build(t,n,r){fc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return gc(t,n,r)}}const $p=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function $k(e,t,n,r){Bp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute($p.has(i)?i:vc(i),t.attrs[i])}class Uk extends Fp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ie}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ir.has(n)){const r=Qh(n);return r&&r.default||0}return n=$p.has(n)?n:vc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return kp(t,n,r)}build(t,n,r){vp(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){$k(t,n,r,i)}mount(t){this.isSVGTag=bp(t.tagName),super.mount(t)}}const zk=(e,t)=>pc(e)?new Uk(t):new Bk(t,{allowProjection:e!==Fe});function dr(e,t,n){const r=e.getProps();return mc(r,t,n!==void 0?n:r.custom,e)}const Sc=e=>Array.isArray(e);function Wk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,or(n))}function Hk(e){return Sc(e)?e[e.length-1]||0:e}function Jk(e,t){const n=dr(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=Hk(o[a]);Wk(e,a,s)}}function qk(e){return!!(qe(e)&&e.add)}function xc(e,t){const n=e.getValue("willChange");if(qk(n))return n.add(t);if(!n&&$t.WillChange){const r=new $t.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Up(e){return e.props[Sp]}const Gk=e=>e!==null;function Kk(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Gk),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Yk={type:"spring",stiffness:500,damping:25,restSpeed:10},Xk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Qk={type:"keyframes",duration:.8},Zk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eS=(e,{keyframes:t})=>t.length>2?Qk:ir.has(e)?e.startsWith("scale")?Xk(t[1]):Yk:Zk;function tS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...d}){return!!Object.keys(d).length}const Tc=(e,t,n,r={},i,o)=>a=>{const s=ic(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ot(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:m=>{t.set(m),s.onUpdate&&s.onUpdate(m)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};tS(s)||Object.assign(d,eS(e,d)),d.duration&&(d.duration=Ot(d.duration)),d.repeatDelay&&(d.repeatDelay=Ot(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(rc(d),d.delay===0&&(f=!0)),($t.instantAnimations||$t.skipAnimations)&&(f=!0,rc(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,f&&!o&&t.get()!==void 0){const m=Kk(d.keyframes,s);if(m!==void 0){Me.update(()=>{d.onUpdate(m),d.onComplete()});return}}return s.isSync?new Gs(d):new Pw(d)};function nS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function zp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(o=r);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const d in s){const f=e.getValue(d,e.latestValues[d]??null),m=s[d];if(m===void 0||l&&nS(l,d))continue;const g={delay:n,...ic(o||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===y&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const _=Up(e);if(_){const S=window.MotionHandoffAnimation(_,d,Me);S!==null&&(g.startTime=S,v=!0)}}xc(e,d),f.start(Tc(d,f,m,e.shouldReduceMotion&&qh.has(d)?{type:!1}:g,e,v));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{Me.update(()=>{a&&Jk(e,a)})}),c}function Wp(e,t,n,r=0,i=1){const o=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(o,a):i===1?o*r:s-o*r}function Mc(e,t,n={}){const r=dr(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(zp(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return rS(e,t,c,l,d,f,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[c,l]=s==="beforeChildren"?[o,a]:[a,o];return c().then(()=>l())}else return Promise.all([o(),a(n.delay)])}function rS(e,t,n=0,r=0,i=0,o=1,a){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(Mc(c,t,{...a,delay:n+(typeof r=="function"?0:r)+Wp(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function iS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Mc(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Mc(e,t,n);else{const i=typeof t=="function"?dr(e,t,n.custom):t;r=Promise.all(zp(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Hp(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const oS=dc.length;function Jp(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Jp(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<oS;n++){const r=dc[n],i=e.props[r];(Jr(i)||i===!1)&&(t[r]=i)}return t}const aS=[...uc].reverse(),sS=uc.length;function cS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>iS(e,n,r)))}function lS(e){let t=cS(e),n=qp(),r=!0;const i=c=>(l,d)=>{const f=dr(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:m,transitionEnd:g,...y}=f;l={...l,...y,...g}}return l};function o(c){t=c(e)}function a(c){const{props:l}=e,d=Jp(e.parent)||{},f=[],m=new Set;let g={},y=1/0;for(let b=0;b<sS;b++){const _=aS[b],S=n[_],T=l[_]!==void 0?l[_]:d[_],M=Jr(T),x=_===c?S.isActive:null;x===!1&&(y=b);let C=T===d[_]&&T!==l[_]&&M;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),S.protectedKeys={...g},!S.isActive&&x===null||!T&&!S.prevProp||mo(T)||typeof T=="boolean")continue;const E=uS(S.prevProp,T);let O=E||_===c&&S.isActive&&!C&&M||b>y&&M,V=!1;const B=Array.isArray(T)?T:[T];let N=B.reduce(i(_),{});x===!1&&(N={});const{prevResolvedValues:z={}}=S,R={...z,...N},ee=W=>{O=!0,m.has(W)&&(V=!0,m.delete(W)),S.needsAnimating[W]=!0;const K=e.getValue(W);K&&(K.liveStyle=!1)};for(const W in R){const K=N[W],$=z[W];if(g.hasOwnProperty(W))continue;let U=!1;Sc(K)&&Sc($)?U=!Hp(K,$):U=K!==$,U?K!=null?ee(W):m.add(W):K!==void 0&&m.has(W)?ee(W):S.protectedKeys[W]=!0}S.prevProp=T,S.prevResolvedValues=N,S.isActive&&(g={...g,...N}),r&&e.blockInitialAnimation&&(O=!1);const X=C&&E;O&&(!X||V)&&f.push(...B.map(W=>{const K={type:_};if(typeof W=="string"&&r&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,U=dr($,W);if($.enteringChildren&&U){const{delayChildren:ie}=U.transition||{};K.delay=Wp($.enteringChildren,e,ie)}}return{animation:W,options:K}}))}if(m.size){const b={};if(typeof l.initial!="boolean"){const _=dr(e,Array.isArray(l.initial)?l.initial[0]:l.initial);_&&_.transition&&(b.transition=_.transition)}m.forEach(_=>{const S=e.getBaseTarget(_),T=e.getValue(_);T&&(T.liveStyle=!0),b[_]=S??null}),f.push({animation:b})}let v=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function s(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=qp()}}}function uS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Hp(t,e):!1}function On(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qp(){return{animate:On(!0),whileInView:On(),whileHover:On(),whileTap:On(),whileDrag:On(),whileFocus:On(),exit:On()}}class nn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class dS extends nn{constructor(t){super(t),t.animationState||(t.animationState=lS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();mo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let fS=0;class hS extends nn{constructor(){super(...arguments),this.id=fS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const pS={animation:{Feature:dS},exit:{Feature:hS}};function Gr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kr(e){return{point:{x:e.pageX,y:e.pageY}}}const mS=e=>t=>cc(t)&&e(t,Kr(t));function Yr(e,t,n,r){return Gr(e,t,mS(n),r)}const Gp=1e-4,gS=1-Gp,vS=1+Gp,Kp=.01,yS=0-Kp,bS=0+Kp;function Qe(e){return e.max-e.min}function _S(e,t,n){return Math.abs(e-t)<=n}function Yp(e,t,n,r=.5){e.origin=r,e.originPoint=Pe(t.min,t.max,e.origin),e.scale=Qe(n)/Qe(t),e.translate=Pe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=gS&&e.scale<=vS||isNaN(e.scale))&&(e.scale=1),(e.translate>=yS&&e.translate<=bS||isNaN(e.translate))&&(e.translate=0)}function Xr(e,t,n,r){Yp(e.x,t.x,n.x,r?r.originX:void 0),Yp(e.y,t.y,n.y,r?r.originY:void 0)}function Xp(e,t,n){e.min=n.min+t.min,e.max=e.min+Qe(t)}function wS(e,t,n){Xp(e.x,t.x,n.x),Xp(e.y,t.y,n.y)}function Qp(e,t,n){e.min=t.min-n.min,e.max=e.min+Qe(t)}function Qr(e,t,n){Qp(e.x,t.x,n.x),Qp(e.y,t.y,n.y)}function mt(e){return[e("x"),e("y")]}const Zp=({current:e})=>e?e.ownerDocument.defaultView:null,em=(e,t)=>Math.abs(e-t);function kS(e,t){const n=em(e.x,t.x),r=em(e.y,t.y);return Math.sqrt(n**2+r**2)}class tm{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Pc(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=kS(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=m,{timestamp:b}=$e;this.history.push({...v,timestamp:b});const{onStart:_,onMove:S}=this.handlers;g||(_&&_(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Cc(g,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Pc(m.type==="pointercancel"?this.lastMoveEventInfo:Cc(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,_),v&&v(m,_)},!cc(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const s=Kr(t),c=Cc(s,this.transformPagePoint),{point:l}=c,{timestamp:d}=$e;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Pc(c,this.history)),this.removeListeners=Nr(Yr(this.contextWindow,"pointermove",this.handlePointerMove),Yr(this.contextWindow,"pointerup",this.handlePointerUp),Yr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zt(this.updatePoint)}}function Cc(e,t){return t?{point:t(e.point)}:e}function nm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Pc({point:e},t){return{point:e,delta:nm(e,rm(t)),offset:nm(e,SS(t)),velocity:xS(t,.1)}}function SS(e){return e[0]}function rm(e){return e[e.length-1]}function xS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=rm(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ot(t)));)n--;if(!r)return{x:0,y:0};const o=pt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function TS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pe(n,e,r.max):Math.min(e,n)),e}function im(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function MS(e,{top:t,left:n,bottom:r,right:i}){return{x:im(e.x,n,i),y:im(e.y,t,r)}}function om(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function CS(e,t){return{x:om(e.x,t.x),y:om(e.y,t.y)}}function PS(e,t){let n=.5;const r=Qe(e),i=Qe(t);return i>r?n=Vr(t.min,t.max-r,e.min):r>i&&(n=Vr(e.min,e.max-i,t.min)),Bt(0,1,n)}function ES(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Ec=.35;function AS(e=Ec){return e===!1?e=0:e===!0&&(e=Ec),{x:am(e,"left","right"),y:am(e,"top","bottom")}}function am(e,t,n){return{min:sm(e,t),max:sm(e,n)}}function sm(e,t){return typeof e=="number"?e:e[t]||0}const OS=new WeakMap;class IS{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ie(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Kr(f).point)},a=(f,m)=>{const{drag:g,dragPropagation:y,onDragStart:v}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ww(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mt(_=>{let S=this.getAxisMotionValue(_).get()||0;if(It.test(S)){const{projection:T}=this.visualElement;if(T&&T.layout){const M=T.layout.layoutBox[_];M&&(S=Qe(M)*(parseFloat(S)/100))}}this.originPoint[_]=S}),v&&Me.postRender(()=>v(f,m)),xc(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:v,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=m;if(y&&this.currentDirection===null){this.currentDirection=DS(_),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",m.point,_),this.updateAxis("y",m.point,_),this.visualElement.render(),b&&b(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>mt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new tm(t,{onSessionStart:o,onStart:a,onMove:s,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Zp(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&Me.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!bo(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=TS(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&sr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=MS(r.layoutBox,t):this.constraints=!1,this.elastic=AS(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&mt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=ES(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!sr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Lk(r,i.root,this.visualElement.getTransformPagePoint());let a=CS(i.layout.layoutBox,o);if(n){const s=n(Ok(a));this.hasMutatedConstraints=!!s,s&&(a=Mp(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=mt(d=>{if(!bo(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return xc(this.visualElement,t),r.start(Tc(t,r,0,n,this.visualElement,!1))}stopAnimation(){mt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){mt(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){mt(n=>{const{drag:r}=this.getProps();if(!bo(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Pe(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!sr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mt(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const c=s.get();i[a]=PS({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),mt(a=>{if(!bo(a,t,null))return;const s=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];s.set(Pe(c,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;OS.set(this.visualElement,this);const t=this.visualElement.current,n=Yr(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();sr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Me.read(r);const a=Gr(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(mt(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Ec,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function bo(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function DS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class LS extends nn{constructor(t){super(t),this.removeGroupControls=ht,this.removeListeners=ht,this.controls=new IS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const cm=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class jS extends nn{constructor(){super(...arguments),this.removePointerDownListener=ht}onPointerDown(t){this.session=new tm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:cm(t),onStart:cm(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Me.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=Yr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const _o={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Zr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=lm(e,t.target.x),r=lm(e,t.target.y);return`${n}% ${r}%`}},RS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=tn.parse(e);if(i.length>5)return r;const o=tn.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=c;const l=Pe(s,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}};let Ac=!1;class NS extends vt{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;ak(VS),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Ac&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),_o.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:a}=r;return a&&(a.isPresent=o,Ac=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Me.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),sc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Ac=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function um(e){const[t,n]=Zw(),r=ye(eh);return A(NS,{...e,layoutGroup:r,switchLayoutGroup:ye(xp),isPresent:t,safeToRemove:n})}const VS={borderRadius:{...Zr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Zr,borderTopRightRadius:Zr,borderBottomLeftRadius:Zr,borderBottomRightRadius:Zr,boxShadow:RS};function FS(e,t,n){const r=qe(e)?e:or(e);return r.start(Tc("",r,t,n)),r.animation}const BS=(e,t)=>e.depth-t.depth;class $S{constructor(){this.children=[],this.isDirty=!1}add(t){xs(this.children,t),this.isDirty=!0}remove(t){Ts(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(BS),this.isDirty=!1,this.children.forEach(t)}}function US(e,t){const n=tt.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zt(r),e(o-t))};return Me.setup(r,!0),()=>Zt(r)}const dm=["TopLeft","TopRight","BottomLeft","BottomRight"],zS=dm.length,fm=e=>typeof e=="string"?parseFloat(e):e,hm=e=>typeof e=="number"||Y.test(e);function WS(e,t,n,r,i,o){i?(e.opacity=Pe(0,n.opacity??1,HS(r)),e.opacityExit=Pe(t.opacity??1,0,JS(r))):o&&(e.opacity=Pe(t.opacity??1,n.opacity??1,r));for(let a=0;a<zS;a++){const s=`border${dm[a]}Radius`;let c=pm(t,s),l=pm(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||hm(c)===hm(l)?(e[s]=Math.max(Pe(fm(c),fm(l),r),0),(It.test(l)||It.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=Pe(t.rotate||0,n.rotate||0,r))}function pm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const HS=mm(0,.5,dh),JS=mm(.5,.95,ht);function mm(e,t,n){return r=>r<e?0:r>t?1:n(Vr(e,t,r))}function gm(e,t){e.min=t.min,e.max=t.max}function gt(e,t){gm(e.x,t.x),gm(e.y,t.y)}function vm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ym(e,t,n,r,i){return e-=t,e=yo(e,1/n,r),i!==void 0&&(e=yo(e,1/i,r)),e}function qS(e,t=0,n=1,r=.5,i,o=e,a=e){if(It.test(t)&&(t=parseFloat(t),t=Pe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Pe(o.min,o.max,r);e===o&&(s-=t),e.min=ym(e.min,t,n,s,i),e.max=ym(e.max,t,n,s,i)}function bm(e,t,[n,r,i],o,a){qS(e,t[n],t[r],t[i],t.scale,o,a)}const GS=["x","scaleX","originX"],KS=["y","scaleY","originY"];function _m(e,t,n,r){bm(e.x,t,GS,n?n.x:void 0,r?r.x:void 0),bm(e.y,t,KS,n?n.y:void 0,r?r.y:void 0)}function wm(e){return e.translate===0&&e.scale===1}function km(e){return wm(e.x)&&wm(e.y)}function Sm(e,t){return e.min===t.min&&e.max===t.max}function YS(e,t){return Sm(e.x,t.x)&&Sm(e.y,t.y)}function xm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Tm(e,t){return xm(e.x,t.x)&&xm(e.y,t.y)}function Mm(e){return Qe(e.x)/Qe(e.y)}function Cm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class XS{constructor(){this.members=[]}add(t){xs(this.members,t),t.scheduleRender()}remove(t){if(Ts(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function QS(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:d,rotateX:f,rotateY:m,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Oc=["","X","Y","Z"],ZS=1e3;let e1=0;function Ic(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Pm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Up(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Me,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Pm(r)}function Em({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t?.()){this.id=e1++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(r1),this.nodes.forEach(s1),this.nodes.forEach(c1),this.nodes.forEach(i1)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new $S)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Ps),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const c=this.eventHandlers.get(a);c&&c.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=cp(a)&&!Yw(a),this.instance=a;const{layoutId:s,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let d,f=0;const m=()=>this.root.updateBlockedByResize=!1;Me.read(()=>{f=window.innerWidth}),e(a,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=US(m,250),_o.hasAnimatedSinceResize&&(_o.hasAnimatedSinceResize=!1,this.nodes.forEach(Im)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&l&&(s||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||h1,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=l.getProps(),_=!this.targetLayout||!Tm(this.targetLayout,g),S=!f&&m;if(this.options.layoutRoot||this.resumeFrom||S||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...ic(y,"layout"),onPlay:v,onComplete:b};(l.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(d,S)}else f||Im(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Zt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(l1),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pm(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Am);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Om);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(a1),this.nodes.forEach(t1),this.nodes.forEach(n1)):this.nodes.forEach(Om),this.clearAllSnapshots();const s=tt.now();$e.delta=Bt(0,16.666666666666668,s-$e.timestamp),$e.timestamp=s,$e.isProcessing=!0,Os.update.process($e),Os.preRender.process($e),Os.render.process($e),$e.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(o1),this.sharedNodes.forEach(u1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Qe(this.snapshot.measuredBox.x)&&!Qe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ie(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!km(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;a&&this.instance&&(s||An(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return a&&(c=this.removeTransform(c)),p1(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Ie();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(m1))){const{scroll:l}=this.root;l&&(cr(s.x,l.offset.x),cr(s.y,l.offset.y))}return s}removeElementScroll(a){const s=Ie();if(gt(s,a),this.scroll?.wasRoot)return s;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&gt(s,a),cr(s.x,d.offset.x),cr(s.y,d.offset.y))}return s}applyTransform(a,s=!1){const c=Ie();gt(c,a);for(let l=0;l<this.path.length;l++){const d=this.path[l];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&lr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),An(d.latestValues)&&lr(c,d.latestValues)}return An(this.latestValues)&&lr(c,this.latestValues),c}removeTransform(a){const s=Ie();gt(s,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!An(l.latestValues))continue;_c(l.latestValues)&&l.updateSnapshot();const d=Ie(),f=l.measurePageBox();gt(d,f),_m(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return An(this.latestValues)&&_m(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$e.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=$e.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),Qr(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ie(),this.targetWithTransforms=Ie()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):gt(this.target,this.layout.layoutBox),Ap(this.target,this.targetDelta)):gt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),Qr(this.relativeTargetOrigin,this.target,m.target),gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||_c(this.parent.latestValues)||Cp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===$e.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||d))return;gt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Dk(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ie());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vm(this.prevProjectionDelta.x,this.projectionDelta.x),vm(this.prevProjectionDelta.y,this.projectionDelta.y)),Xr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!Cm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ur(),this.projectionDelta=ur(),this.projectionDeltaWithTransform=ur()}setAnimationOrigin(a,s=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=ur();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const m=Ie(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=g!==y,b=this.getStack(),_=!b||b.members.length<=1,S=!!(v&&!_&&this.options.crossfade===!0&&!this.path.some(f1));this.animationProgress=0;let T;this.mixTargetDelta=M=>{const x=M/1e3;Dm(f.x,a.x,x),Dm(f.y,a.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),d1(this.relativeTarget,this.relativeTargetOrigin,m,x),T&&YS(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Ie()),gt(T,this.relativeTarget)),v&&(this.animationValues=d,WS(d,l,this.latestValues,x,S,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Zt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{_o.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=or(0)),this.currentAnimation=FS(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ZS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:d}=a;if(!(!s||!c||!l)){if(this!==a&&this.layout&&l&&Vm(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ie();const f=Qe(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const m=Qe(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}gt(s,c),lr(s,d),Xr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new XS),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Ic("z",a,l,this.animationValues);for(let d=0;d<Oc.length;d++)Ic(`rotate${Oc[d]}`,a,l,this.animationValues),Ic(`skew${Oc[d]}`,a,l,this.animationValues);a.render();for(const d in l)a.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=vo(s?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=vo(s?.pointerEvents)||""),this.hasProjected&&!An(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=QS(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),a.transform=f;const{x:m,y:g}=this.projectionDelta;a.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,l.animationValues?a.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in qr){if(d[y]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:_}=qr[y],S=f==="none"?d[y]:v(d[y],l);if(b){const T=b.length;for(let M=0;M<T;M++)a[b[M]]=S}else _?this.options.visualElement.renderState.vars[y]=S:a[y]=S}this.options.layoutId&&(a.pointerEvents=l===this?vo(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Am),this.root.sharedNodes.clear()}}}function t1(e){e.updateLayout()}function n1(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?mt(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],m=Qe(f);f.min=n[d].min,f.max=f.min+m}):Vm(i,t.layoutBox,n)&&mt(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],m=Qe(n[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=ur();Xr(a,n,t.layoutBox);const s=ur();o?Xr(s,e.applyTransform(r,!0),t.measuredBox):Xr(s,n,t.layoutBox);const c=!km(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const g=Ie();Qr(g,t.layoutBox,f.layoutBox);const y=Ie();Qr(y,n,m.layoutBox),Tm(g,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function r1(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function i1(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function o1(e){e.clearSnapshot()}function Am(e){e.clearMeasurements()}function Om(e){e.isLayoutDirty=!1}function a1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Im(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function s1(e){e.resolveTargetDelta()}function c1(e){e.calcProjection()}function l1(e){e.resetSkewAndRotation()}function u1(e){e.removeLeadSnapshot()}function Dm(e,t,n){e.translate=Pe(t.translate,0,n),e.scale=Pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lm(e,t,n,r){e.min=Pe(t.min,n.min,r),e.max=Pe(t.max,n.max,r)}function d1(e,t,n,r){Lm(e.x,t.x,n.x,r),Lm(e.y,t.y,n.y,r)}function f1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const h1={duration:.45,ease:[.4,0,.1,1]},jm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rm=jm("applewebkit/")&&!jm("chrome/")?Math.round:ht;function Nm(e){e.min=Rm(e.min),e.max=Rm(e.max)}function p1(e){Nm(e.x),Nm(e.y)}function Vm(e,t,n){return e==="position"||e==="preserve-aspect"&&!_S(Mm(t),Mm(n),.2)}function m1(e){return e!==e.root&&e.scroll?.wasRoot}const g1=Em({attachResizeListener:(e,t)=>Gr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dc={current:void 0},Fm=Em({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dc.current){const e=new g1({});e.mount(window),e.setOptions({layoutScroll:!0}),Dc.current=e}return Dc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),v1={pan:{Feature:jS},drag:{Feature:LS,ProjectionNode:Fm,MeasureLayout:um}};function Bm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Me.postRender(()=>o(t,Kr(t)))}class y1 extends nn{mount(){const{current:t}=this.node;t&&(this.unmount=Hw(t,(n,r)=>(Bm(this.node,r,"Start"),i=>Bm(this.node,i,"End"))))}unmount(){}}class b1 extends nn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Nr(Gr(this.node.current,"focus",()=>this.onFocus()),Gr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $m(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&Me.postRender(()=>o(t,Kr(t)))}class _1 extends nn{mount(){const{current:t}=this.node;t&&(this.unmount=Kw(t,(n,r)=>($m(this.node,r,"Start"),(i,{success:o})=>$m(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Lc=new WeakMap,jc=new WeakMap,w1=e=>{const t=Lc.get(e.target);t&&t(e)},k1=e=>{e.forEach(w1)};function S1({root:e,...t}){const n=e||document;jc.has(n)||jc.set(n,{});const r=jc.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(k1,{root:e,...t})),r[i]}function x1(e,t,n){const r=S1(t);return Lc.set(e,n),r.observe(e),()=>{Lc.delete(e),r.unobserve(e)}}const T1={some:0,all:1};class M1 extends nn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:T1[i]},s=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=l?d:f;m&&m(c)};return x1(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(C1(t,n))&&this.startObserver()}unmount(){}}function C1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const P1={...pS,...{inView:{Feature:M1},tap:{Feature:_1},focus:{Feature:b1},hover:{Feature:y1}},...v1,...{layout:{ProjectionNode:Fm,MeasureLayout:um}}},fr=Ak(P1,zk);function E1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M8 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM8 6.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM9.5 12.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0Z"}))}const A1=Ge(E1);function O1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),re("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const I1=Ge(O1);function D1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{fillRule:"evenodd",d:"m3.855 7.286 1.067-.534a1 1 0 0 0 .542-1.046l-.44-2.858A1 1 0 0 0 4.036 2H3a1 1 0 0 0-1 1v2c0 .709.082 1.4.238 2.062a9.012 9.012 0 0 0 6.7 6.7A9.024 9.024 0 0 0 11 14h2a1 1 0 0 0 1-1v-1.036a1 1 0 0 0-.848-.988l-2.858-.44a1 1 0 0 0-1.046.542l-.534 1.067a7.52 7.52 0 0 1-4.86-4.859Z",clipRule:"evenodd"}))}const L1=Ge(D1);function j1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM12.95 3.05a.75.75 0 1 0-1.06 1.06 5.5 5.5 0 0 1 0 7.78.75.75 0 1 0 1.06 1.06 7 7 0 0 0 0-9.9Z"}),re("path",{d:"M10.828 5.172a.75.75 0 1 0-1.06 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 1 0 1.06 1.06 4 4 0 0 0 0-5.656Z"}))}const R1=Ge(j1);function N1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22 1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94l-1.22-1.22Z"}))}const V1=Ge(N1);function F1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M3 4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H3ZM15 4.75a.75.75 0 0 0-1.28-.53l-2 2a.75.75 0 0 0-.22.53v2.5c0 .199.079.39.22.53l2 2a.75.75 0 0 0 1.28-.53v-6.5Z"}))}const Um=Ge(F1);function B1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"}))}const zm=Ge(B1),$1=7;function U1(){return A("div",{className:"flex items-center justify-center gap-2 mt-4",role:"status","aria-label":"Loading",children:Array.from({length:$1},(e,t)=>A(fr.div,{className:"h-[20px] w-[10px] rounded-full bg-white",animate:{opacity:[.25,1,.25]},transition:{duration:1.2,repeat:1/0,delay:t*.12,ease:"easeInOut"}},t))})}function z1({isColdStart:e=!1}){const{agentData:t}=Qt(),{isMobileDevice:n}=ws(),r=t?.image_url;return A("div",{className:"absolute inset-0 w-full h-full flex flex-col items-center justify-center",children:[A("div",{className:"absolute inset-0 w-full h-full bg-black"}),r&&A("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center scale-125",style:{backgroundImage:`url(${r})`,filter:"blur(25px) brightness(0.5)"}}),A(fr.div,{initial:{filter:"blur(12px)",opacity:0},animate:{filter:"blur(0px)",opacity:1},transition:{duration:.2,ease:"easeOut"},className:`absolute inset-0 w-full h-full flex flex-col items-center justify-center ${n?"pb-6 px-4":"pb-4 px-8"}`,children:A("div",{className:"flex flex-col items-center text-white",children:e?A(Fe,{children:[A("p",{className:"text-sm font-medium text-center text-white max-w-[90%] leading-snug",children:"We're experiencing more traffic than usual. This may take an additional minute."}),A(U1,{})]}):A(Fe,{children:[A("div",{className:"flex items-center justify-center gap-2 mb-2",children:[A(fr.div,{animate:{rotate:[0,-10,10,-10,10,-10,10,0]},transition:{duration:.6,repeat:1/0,repeatDelay:1.4,ease:"easeInOut"},children:A(L1,{className:"size-6 text-white"})}),A("h2",{className:"text-lg font-medium text-center",children:"Calling..."})]}),A("div",{className:"flex justify-center",children:A("span",{className:"font-light text-xs text-center text-white",children:["This call with an AI may be recorded and shared with our service providers.",A("br",{}),A("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-white/50 hover:text-white transition-colors",children:"Learn more"})]})})]})})})]})}const W1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),H1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Wm=e=>{const t=H1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Hm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),J1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var q1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const G1=Ge(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},c)=>re("svg",{ref:c,...q1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Hm("lucide",i),...!o&&!J1(s)&&{"aria-hidden":"true"},...s},[...a.map(([l,d])=>re(l,d)),...Array.isArray(o)?o:[o]]));const ei=(e,t)=>{const n=Ge(({className:r,...i},o)=>re(G1,{ref:o,iconNode:t,className:Hm(`lucide-${W1(Wm(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Wm(e),n};const K1=ei("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const Y1=ei("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const X1=ei("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Q1=ei("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"}]]);const Z1=ei("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);function wo({msg:e,isError:t=!1,isFullWidth:n=!0,showSpinner:r=!1,onClick:i=null}){return A("div",{className:"absolute top-2 left-2 flex items-center justify-between z-10 text-white/75",children:A("div",{className:`backdrop-blur-sm rounded-2xl py-2.5 px-4 flex-1 shadow-inset-white-10 flex items-center gap-2
38
- ${n?"right-15":""}
37
+ ${r?"opacity-100 backdrop-blur-lg":"opacity-0 backdrop-blur-none"}`})]}),t&&A("div",{className:"absolute top-2 left-2",children:A("div",{className:"bg-red-600/50 backdrop-blur-xl rounded-3xl py-2 px-4 w-fit shadow-inset-white-10",children:A("p",{className:"text-white text-lg font-semibold text-center",children:t})})})]})}const eh=Le({});function n_(e){const t=ae(null);return t.current===null&&(t.current=e()),t.current}const ks=typeof window<"u",r_=ks?an:J,Ss=Le(null);function xs(e,t){e.indexOf(t)===-1&&e.push(t)}function Ts(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Bt=(e,t,n)=>n>t?t:n<e?e:n;let Ms=()=>{};const $t={},th=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function nh(e){return typeof e=="object"&&e!==null}const rh=e=>/^0[^.\s]+$/u.test(e);function Cs(e){let t;return()=>(t===void 0&&(t=e()),t)}const ht=e=>e,i_=(e,t)=>n=>t(e(n)),Vr=(...e)=>e.reduce(i_),Fr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ps{constructor(){this.subscriptions=[]}add(t){return xs(this.subscriptions,t),()=>Ts(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ot=e=>e*1e3,pt=e=>e/1e3;function ih(e,t){return t?e*(1e3/t):0}const oh=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,o_=1e-7,a_=12;function s_(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=oh(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>o_&&++s<a_);return a}function Br(e,t,n,r){if(e===t&&n===r)return ht;const i=o=>s_(o,0,1,e,n);return o=>o===0||o===1?o:oh(i(o),t,r)}const ah=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,sh=e=>t=>1-e(1-t),ch=Br(.33,1.53,.69,.99),Es=sh(ch),lh=ah(Es),uh=e=>(e*=2)<1?.5*Es(e):.5*(2-Math.pow(2,-10*(e-1))),As=e=>1-Math.sin(Math.acos(e)),dh=sh(As),fh=ah(As),c_=Br(.42,0,1,1),l_=Br(0,0,.58,1),hh=Br(.42,0,.58,1),u_=e=>Array.isArray(e)&&typeof e[0]!="number",ph=e=>Array.isArray(e)&&typeof e[0]=="number",d_={linear:ht,easeIn:c_,easeInOut:hh,easeOut:l_,circIn:As,circInOut:fh,circOut:dh,backIn:Es,backInOut:lh,backOut:ch,anticipate:uh},f_=e=>typeof e=="string",mh=e=>{if(ph(e)){Ms(e.length===4);const[t,n,r,i]=e;return Br(t,n,r,i)}else if(f_(e))return d_[e];return e},oo=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function h_(e,t){let n=new Set,r=new Set,i=!1,o=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(d){a.has(d)&&(l.schedule(d),e()),d(s)}const l={schedule:(d,f=!1,m=!1)=>{const y=m&&i?n:r;return f&&a.add(d),y.has(d)||y.add(d),d},cancel:d=>{r.delete(d),a.delete(d)},process:d=>{if(s=d,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,o&&(o=!1,l.process(d))}};return l}const p_=40;function gh(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=oo.reduce((T,M)=>(T[M]=h_(o),T),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:d,update:f,preRender:m,render:g,postRender:y}=a,v=()=>{const T=$t.useManualTiming?i.timestamp:performance.now();n=!1,$t.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,p_),1)),i.timestamp=T,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),d.process(i),f.process(i),m.process(i),g.process(i),y.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(v))},b=()=>{n=!0,r=!0,i.isProcessing||e(v)};return{schedule:oo.reduce((T,M)=>{const x=a[M];return T[M]=(C,E=!1,O=!1)=>(n||b(),x.schedule(C,E,O)),T},{}),cancel:T=>{for(let M=0;M<oo.length;M++)a[oo[M]].cancel(T)},state:i,steps:a}}const{schedule:Me,cancel:Zt,state:$e,steps:Os}=gh(typeof requestAnimationFrame<"u"?requestAnimationFrame:ht,!0);let ao;function m_(){ao=void 0}const tt={now:()=>(ao===void 0&&tt.set($e.isProcessing||$t.useManualTiming?$e.timestamp:performance.now()),ao),set:e=>{ao=e,queueMicrotask(m_)}},vh=e=>t=>typeof t=="string"&&t.startsWith(e),Is=vh("--"),g_=vh("var(--"),Ds=e=>g_(e)?v_.test(e.split("/*")[0].trim()):!1,v_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,tr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$r={...tr,transform:e=>Bt(0,1,e)},so={...tr,default:1},Ur=e=>Math.round(e*1e5)/1e5,Ls=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function y_(e){return e==null}const b_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,js=(e,t)=>n=>!!(typeof n=="string"&&b_.test(n)&&n.startsWith(e)||t&&!y_(n)&&Object.prototype.hasOwnProperty.call(n,t)),yh=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(Ls);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},__=e=>Bt(0,255,e),Rs={...tr,transform:e=>Math.round(__(e))},Mn={test:js("rgb","red"),parse:yh("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Rs.transform(e)+", "+Rs.transform(t)+", "+Rs.transform(n)+", "+Ur($r.transform(r))+")"};function w_(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Ns={test:js("#"),parse:w_,transform:Mn.transform},zr=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),en=zr("deg"),It=zr("%"),Y=zr("px"),k_=zr("vh"),S_=zr("vw"),bh={...It,parse:e=>It.parse(e)/100,transform:e=>It.transform(e*100)},nr={test:js("hsl","hue"),parse:yh("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+It.transform(Ur(t))+", "+It.transform(Ur(n))+", "+Ur($r.transform(r))+")"},De={test:e=>Mn.test(e)||Ns.test(e)||nr.test(e),parse:e=>Mn.test(e)?Mn.parse(e):nr.test(e)?nr.parse(e):Ns.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Mn.transform(e):nr.transform(e),getAnimatableNone:e=>{const t=De.parse(e);return t.alpha=0,De.transform(t)}},x_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function T_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ls)?.length||0)+(e.match(x_)?.length||0)>0}const _h="number",wh="color",M_="var",C_="var(",kh="${}",P_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Wr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(P_,c=>(De.test(c)?(r.color.push(o),i.push(wh),n.push(De.parse(c))):c.startsWith(C_)?(r.var.push(o),i.push(M_),n.push(c)):(r.number.push(o),i.push(_h),n.push(parseFloat(c))),++o,kh)).split(kh);return{values:n,split:s,indexes:r,types:i}}function Sh(e){return Wr(e).values}function xh(e){const{split:t,types:n}=Wr(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const s=n[a];s===_h?o+=Ur(i[a]):s===wh?o+=De.transform(i[a]):o+=i[a]}return o}}const E_=e=>typeof e=="number"?0:De.test(e)?De.getAnimatableNone(e):e;function A_(e){const t=Sh(e);return xh(e)(t.map(E_))}const tn={test:T_,parse:Sh,createTransformer:xh,getAnimatableNone:A_};function Vs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<.16666666666666666?e+(t-e)*6*n:n<.5?t:n<.6666666666666666?e+(t-e)*(.6666666666666666-n)*6:e}function O_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=Vs(c,s,e+.3333333333333333),o=Vs(c,s,e),a=Vs(c,s,e-.3333333333333333)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function co(e,t){return n=>n>0?t:e}const Pe=(e,t,n)=>e+(t-e)*n,Fs=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},I_=[Ns,Mn,nr],D_=e=>I_.find(t=>t.test(e));function Th(e){const t=D_(e);if(!t)return!1;let n=t.parse(e);return t===nr&&(n=O_(n)),n}const Mh=(e,t)=>{const n=Th(e),r=Th(t);if(!n||!r)return co(e,t);const i={...n};return o=>(i.red=Fs(n.red,r.red,o),i.green=Fs(n.green,r.green,o),i.blue=Fs(n.blue,r.blue,o),i.alpha=Pe(n.alpha,r.alpha,o),Mn.transform(i))},Bs=new Set(["none","hidden"]);function L_(e,t){return Bs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function j_(e,t){return n=>Pe(e,t,n)}function $s(e){return typeof e=="number"?j_:typeof e=="string"?Ds(e)?co:De.test(e)?Mh:V_:Array.isArray(e)?Ch:typeof e=="object"?De.test(e)?Mh:R_:co}function Ch(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>$s(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function R_(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=$s(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function N_(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][r[o]],s=e.values[a]??0;n[i]=s,r[o]++}return n}const V_=(e,t)=>{const n=tn.createTransformer(t),r=Wr(e),i=Wr(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Bs.has(e)&&!i.values.length||Bs.has(t)&&!r.values.length?L_(e,t):Vr(Ch(N_(r,i),i.values),n):co(e,t)};function Ph(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Pe(e,t,n):$s(e)(e,t)}const F_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Me.update(t,n),stop:()=>Zt(t),now:()=>$e.isProcessing?$e.timestamp:tt.now()}},Eh=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(e(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},lo=2e4;function Us(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<lo;)t+=n,r=e.next(t);return t>=lo?1/0:t}function B_(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Us(r),lo);return{type:"keyframes",ease:o=>r.next(i*o).value/t,duration:pt(i)}}const $_=5;function Ah(e,t,n){const r=Math.max(t-$_,0);return ih(n-e(r),t-r)}const Ee={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},zs=.001;function U_({duration:e=Ee.duration,bounce:t=Ee.bounce,velocity:n=Ee.velocity,mass:r=Ee.mass}){let i,o,a=1-t;a=Bt(Ee.minDamping,Ee.maxDamping,a),e=Bt(Ee.minDuration,Ee.maxDuration,pt(e)),a<1?(i=l=>{const d=l*a,f=d*e,m=d-n,g=Ws(l,a),y=Math.exp(-f);return zs-m/g*y},o=l=>{const f=l*a*e,m=f*n+n,g=Math.pow(a,2)*Math.pow(l,2)*e,y=Math.exp(-f),v=Ws(Math.pow(l,2),a);return(-i(l)+zs>0?-1:1)*((m-g)*y)/v}):(i=l=>{const d=Math.exp(-l*e),f=(l-n)*e+1;return-zs+d*f},o=l=>{const d=Math.exp(-l*e),f=(n-l)*(e*e);return d*f});const s=5/e,c=W_(i,o,s);if(e=Ot(e),isNaN(c))return{stiffness:Ee.stiffness,damping:Ee.damping,duration:e};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:a*2*Math.sqrt(r*l),duration:e}}}const z_=12;function W_(e,t,n){let r=n;for(let i=1;i<z_;i++)r=r-e(r)/t(r);return r}function Ws(e,t){return e*Math.sqrt(1-t*t)}const H_=["duration","bounce"],J_=["stiffness","damping","mass"];function Oh(e,t){return t.some(n=>e[n]!==void 0)}function q_(e){let t={velocity:Ee.velocity,stiffness:Ee.stiffness,damping:Ee.damping,mass:Ee.mass,isResolvedFromDuration:!1,...e};if(!Oh(e,J_)&&Oh(e,H_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Bt(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ee.mass,stiffness:i,damping:o}}else{const n=U_(e);t={...t,...n,mass:Ee.mass},t.isResolvedFromDuration=!0}return t}function uo(e=Ee.visualDuration,t=Ee.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:o},{stiffness:c,damping:l,mass:d,duration:f,velocity:m,isResolvedFromDuration:g}=q_({...n,velocity:-pt(n.velocity||0)}),y=m||0,v=l/(2*Math.sqrt(c*d)),b=a-o,_=pt(Math.sqrt(c/d)),S=Math.abs(b)<5;r||(r=S?Ee.restSpeed.granular:Ee.restSpeed.default),i||(i=S?Ee.restDelta.granular:Ee.restDelta.default);let T;if(v<1){const x=Ws(_,v);T=C=>{const E=Math.exp(-v*_*C);return a-E*((y+v*_*b)/x*Math.sin(x*C)+b*Math.cos(x*C))}}else if(v===1)T=x=>a-Math.exp(-_*x)*(b+(y+_*b)*x);else{const x=_*Math.sqrt(v*v-1);T=C=>{const E=Math.exp(-v*_*C),O=Math.min(x*C,300);return a-E*((y+v*_*b)*Math.sinh(O)+x*b*Math.cosh(O))/x}}const M={calculatedDuration:g&&f||null,next:x=>{const C=T(x);if(g)s.done=x>=f;else{let E=x===0?y:0;v<1&&(E=x===0?Ot(y):Ah(T,x,C));const O=Math.abs(E)<=r,V=Math.abs(a-C)<=i;s.done=O&&V}return s.value=s.done?a:C,s},toString:()=>{const x=Math.min(Us(M),lo),C=Eh(E=>M.next(x*E).value,x,30);return x+"ms "+C},toTransition:()=>{}};return M}uo.applyToOptions=e=>{const t=B_(e,100,uo);return e.ease=t.ease,e.duration=Ot(t.duration),e.type="keyframes",e};function Hs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:c,restDelta:l=.5,restSpeed:d}){const f=e[0],m={done:!1,value:f},g=O=>s!==void 0&&O<s||c!==void 0&&O>c,y=O=>s===void 0?c:c===void 0||Math.abs(s-O)<Math.abs(c-O)?s:c;let v=n*t;const b=f+v,_=a===void 0?b:a(b);_!==b&&(v=_-f);const S=O=>-v*Math.exp(-O/r),T=O=>_+S(O),M=O=>{const V=S(O),B=T(O);m.done=Math.abs(V)<=l,m.value=m.done?_:B};let x,C;const E=O=>{g(m.value)&&(x=O,C=uo({keyframes:[m.value,y(m.value)],velocity:Ah(T,O,m.value),damping:i,stiffness:o,restDelta:l,restSpeed:d}))};return E(0),{calculatedDuration:null,next:O=>{let V=!1;return!C&&x===void 0&&(V=!0,M(O),E(O)),x!==void 0&&O>=x?C.next(O-x):(!V&&M(O),m)}}}function G_(e,t,n){const r=[],i=n||$t.mix||Ph,o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||ht:t;s=Vr(c,s)}r.push(s)}return r}function K_(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Ms(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=G_(t,r,i),c=s.length,l=d=>{if(a&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const m=Fr(e[f],e[f+1],d);return s[f](m)};return n?d=>l(Bt(e[0],e[o-1],d)):l}function Y_(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Fr(0,t,r);e.push(Pe(n,1,i))}}function X_(e){const t=[0];return Y_(t,e.length-1),t}function Q_(e,t){return e.map(n=>n*t)}function Z_(e,t){return e.map(()=>t||hh).splice(0,e.length-1)}function Hr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=u_(r)?r.map(mh):mh(r),o={done:!1,value:t[0]},a=Q_(n&&n.length===t.length?n:X_(t),e),s=K_(a,t,{ease:Array.isArray(i)?i:Z_(t,i)});return{calculatedDuration:e,next:c=>(o.value=s(c),o.done=c>=e,o)}}const ew=e=>e!==null;function Js(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(ew),s=i<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const tw={decay:Hs,inertia:Hs,tween:Hr,keyframes:Hr,spring:uo};function Ih(e){typeof e.type=="string"&&(e.type=tw[e.type])}class qs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const nw=e=>e/100;class Gs extends qs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==tt.now()&&this.tick(tt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Ih(t);const{type:n=Hr,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=t;let{keyframes:s}=t;const c=n||Hr;c!==Hr&&typeof s[0]!="number"&&(this.mixKeyframes=Vr(nw,Ph(s[0],s[1])),s=[0,100]);const l=c({...t,keyframes:s});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...s].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=Us(l));const{calculatedDuration:d}=l;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=l}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:l=0,keyframes:d,repeat:f,repeatType:m,repeatDelay:g,type:y,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const _=this.currentTime-l*(this.playbackSpeed>=0?1:-1),S=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,M=r;if(f){const O=Math.min(this.currentTime,i)/s;let V=Math.floor(O),B=O%1;!B&&O>=1&&(B=1),B===1&&V--,V=Math.min(V,f+1),!!(V%2)&&(m==="reverse"?(B=1-B,g&&(B-=g/s)):m==="mirror"&&(M=a)),T=Bt(0,1,B)*s}const x=S?{done:!1,value:d[0]}:M.next(T);o&&(x.value=o(x.value));let{done:C}=x;!S&&c!==null&&(C=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&y!==Hs&&(x.value=Js(d,this.options,b,this.speed)),v&&v(x.value),E&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return pt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pt(t)}get time(){return pt(this.currentTime)}set time(t){t=Ot(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(tt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=pt(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=F_,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(tt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function rw(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Cn=e=>e*180/Math.PI,Ks=e=>{const t=Cn(Math.atan2(e[1],e[0]));return Ys(t)},iw={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ks,rotateZ:Ks,skewX:e=>Cn(Math.atan(e[1])),skewY:e=>Cn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ys=e=>(e=e%360,e<0&&(e+=360),e),Dh=Ks,Lh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),jh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ow={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Lh,scaleY:jh,scale:e=>(Lh(e)+jh(e))/2,rotateX:e=>Ys(Cn(Math.atan2(e[6],e[5]))),rotateY:e=>Ys(Cn(Math.atan2(-e[2],e[0]))),rotateZ:Dh,rotate:Dh,skewX:e=>Cn(Math.atan(e[4])),skewY:e=>Cn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Xs(e){return e.includes("scale")?1:0}function Qs(e,t){if(!e||e==="none")return Xs(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=ow,i=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=iw,i=s}if(!i)return Xs(t);const o=r[t],a=i[1].split(",").map(sw);return typeof o=="function"?o(a):a[o]}const aw=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Qs(n,t)};function sw(e){return parseFloat(e.trim())}const rr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ir=new Set(rr),Rh=e=>e===tr||e===Y,cw=new Set(["x","y","z"]),lw=rr.filter(e=>!cw.has(e));function uw(e){const t=[];return lw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Pn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Qs(t,"x"),y:(e,{transform:t})=>Qs(t,"y")};Pn.translateX=Pn.x,Pn.translateY=Pn.y;const En=new Set;let Zs=!1,ec=!1,tc=!1;function Nh(){if(ec){const e=Array.from(En).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=uw(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{r.getValue(o)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ec=!1,Zs=!1,En.forEach(e=>e.complete(tc)),En.clear()}function Vh(){En.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ec=!0)})}function dw(){tc=!0,Vh(),Nh(),tc=!1}class nc{constructor(t,n,r,i,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(En.add(this),Zs||(Zs=!0,Me.read(Vh),Me.resolveKeyframes(Nh))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const o=i?.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}rw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),En.delete(this)}cancel(){this.state==="scheduled"&&(En.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const fw=e=>e.startsWith("--");function hw(e,t,n){fw(t)?e.style.setProperty(t,n):e.style[t]=n}const pw=Cs(()=>window.ScrollTimeline!==void 0),mw={};function gw(e,t){const n=Cs(e);return()=>mw[t]??n()}const Fh=gw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Jr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Bh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jr([0,.65,.55,1]),circOut:Jr([.55,0,1,.45]),backIn:Jr([.31,.01,.66,-.59]),backOut:Jr([.33,1.53,.69,.99])};function $h(e,t){if(e)return typeof e=="function"?Fh()?Eh(e,t):"ease-out":ph(e)?Jr(e):Array.isArray(e)?e.map(n=>$h(n,t)||Bh.easeOut):Bh[e]}function vw(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeOut",times:c}={},l=void 0){const d={[t]:n};c&&(d.offset=c);const f=$h(s,i);Array.isArray(f)&&(d.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"};return l&&(m.pseudoElement=l),e.animate(d,m)}function Uh(e){return typeof e=="function"&&"applyToOptions"in e}function yw({type:e,...t}){return Uh(e)&&Fh()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class bw extends qs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:s,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=a,this.options=t,Ms(typeof t.type!="string");const l=yw(t);this.animation=vw(n,r,i,l,o),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=Js(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(d):hw(n,r,d),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return pt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+pt(t)}get time(){return pt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ot(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&pw()?(this.animation.timeline=t,ht):n(this)}}const zh={anticipate:uh,backInOut:lh,circInOut:fh};function _w(e){return e in zh}function ww(e){typeof e.ease=="string"&&_w(e.ease)&&(e.ease=zh[e.ease])}const Wh=10;class kw extends bw{constructor(t){ww(t),Ih(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Gs({...a,autoplay:!1}),c=Ot(this.finishedTime??this.time);n.setWithVelocity(s.sample(c-Wh).value,s.sample(c).value,Wh),s.stop()}}const Hh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tn.test(e)||e==="0")&&!e.startsWith("url("));function Sw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function xw(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=Hh(i,t),s=Hh(o,t);return!a||!s?!1:Sw(e)||(n==="spring"||Uh(n))&&r}function rc(e){e.duration=0,e.type="keyframes"}const Tw=new Set(["opacity","clipPath","filter","transform"]),Mw=Cs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Cw(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:o,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Mw()&&n&&Tw.has(n)&&(n!=="transform"||!l)&&!c&&!r&&i!=="mirror"&&o!==0&&a!=="inertia"}const Pw=40;class Ew extends qs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",keyframes:s,name:c,motionValue:l,element:d,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=tt.now();const m={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,name:c,motionValue:l,element:d,...f},g=d?.KeyframeResolver||nc;this.keyframeResolver=new g(s,(y,v,b)=>this.onKeyframesResolved(y,v,m,!b),c,l,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:o,type:a,velocity:s,delay:c,isHandoff:l,onUpdate:d}=r;this.resolvedAt=tt.now(),xw(t,o,a,s)||(($t.instantAnimations||!c)&&d?.(Js(t,r,n)),t[0]=t[t.length-1],rc(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Pw?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},g=!l&&Cw(m)?new kw({...m,element:m.motionValue.owner.current}):new Gs(m);g.finished.then(()=>this.notifyFinished()).catch(ht),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),dw()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Aw=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ow(e){const t=Aw.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Jh(e,t,n=1){const[r,i]=Ow(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return th(a)?parseFloat(a):a}return Ds(i)?Jh(i,t,n+1):i}function ic(e,t){return e?.[t]??e?.default??e}const qh=new Set(["width","height","top","left","right","bottom",...rr]),Iw={test:e=>e==="auto",parse:e=>e},Gh=e=>t=>t.test(e),Kh=[tr,Y,It,en,S_,k_,Iw],Yh=e=>Kh.find(Gh(e));function Dw(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||rh(e):!0}const Lw=new Set(["brightness","contrast","saturate","opacity"]);function jw(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Ls)||[];if(!r)return e;const i=n.replace(r,"");let o=Lw.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Rw=/\b([a-z-]*)\(.*?\)/gu,oc={...tn,getAnimatableNone:e=>{const t=e.match(Rw);return t?t.map(jw).join(" "):e}},Xh={...tr,transform:Math.round},ac={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,radius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,backgroundPositionX:Y,backgroundPositionY:Y,...{rotate:en,rotateX:en,rotateY:en,rotateZ:en,scale:so,scaleX:so,scaleY:so,scaleZ:so,skew:en,skewX:en,skewY:en,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:$r,originX:bh,originY:bh,originZ:Y},zIndex:Xh,fillOpacity:$r,strokeOpacity:$r,numOctaves:Xh},Nw={...ac,color:De,backgroundColor:De,outlineColor:De,fill:De,stroke:De,borderColor:De,borderTopColor:De,borderRightColor:De,borderBottomColor:De,borderLeftColor:De,filter:oc,WebkitFilter:oc},Qh=e=>Nw[e];function Zh(e,t){let n=Qh(e);return n!==oc&&(n=tn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Vw=new Set(["auto","none","0"]);function Fw(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!Vw.has(o)&&Wr(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Zh(n,i)}class Bw extends nc{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let l=t[c];if(typeof l=="string"&&(l=l.trim(),Ds(l))){const d=Jh(l,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=l)}}if(this.resolveNoneKeyframes(),!qh.has(r)||t.length!==2)return;const[i,o]=t,a=Yh(i),s=Yh(o);if(a!==s)if(Rh(a)&&Rh(s))for(let c=0;c<t.length;c++){const l=t[c];typeof l=="string"&&(t[c]=parseFloat(l))}else Pn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Dw(t[i]))&&r.push(i);r.length&&Fw(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,a=r[o];r[o]=Pn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,c])=>{t.getValue(s).set(c)}),this.resolveNoneKeyframes()}}function $w(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const ep=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Uw(e){return nh(e)&&"offsetHeight"in e}const tp=30,zw=e=>!isNaN(parseFloat(e));class Ww{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const i=tt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=tt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=zw(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ps);const r=this.events[t].add(n);return t==="change"?()=>{r(),Me.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=tt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>tp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,tp);return ih(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function or(e,t){return new Ww(e,t)}const{schedule:sc}=gh(queueMicrotask,!1),xt={x:!1,y:!1};function np(){return xt.x||xt.y}function Hw(e){return e==="x"||e==="y"?xt[e]?null:(xt[e]=!0,()=>{xt[e]=!1}):xt.x||xt.y?null:(xt.x=xt.y=!0,()=>{xt.x=xt.y=!1})}function rp(e,t){const n=$w(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function ip(e){return!(e.pointerType==="touch"||np())}function Jw(e,t,n={}){const[r,i,o]=rp(e,n),a=s=>{if(!ip(s))return;const{target:c}=s,l=t(c,s);if(typeof l!="function"||!c)return;const d=f=>{ip(f)&&(l(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(s=>{s.addEventListener("pointerenter",a,i)}),o}const op=(e,t)=>t?e===t?!0:op(e,t.parentElement):!1,cc=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,qw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Gw(e){return qw.has(e.tagName)||e.tabIndex!==-1}const fo=new WeakSet;function ap(e){return t=>{t.key==="Enter"&&e(t)}}function lc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Kw=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ap(()=>{if(fo.has(n))return;lc(n,"down");const i=ap(()=>{lc(n,"up")}),o=()=>lc(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function sp(e){return cc(e)&&!np()}function Yw(e,t,n={}){const[r,i,o]=rp(e,n),a=s=>{const c=s.currentTarget;if(!sp(s))return;fo.add(c);const l=t(c,s),d=(g,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),fo.has(c)&&fo.delete(c),sp(g)&&typeof l=="function"&&l(g,{success:y})},f=g=>{d(g,c===window||c===document||n.useGlobalTarget||op(c,g.target))},m=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,i),Uw(s)&&(s.addEventListener("focus",l=>Kw(l,i)),!Gw(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),o}function cp(e){return nh(e)&&"ownerSVGElement"in e}function Xw(e){return cp(e)&&e.tagName==="svg"}const qe=e=>!!(e&&e.getVelocity),Qw=[...Kh,De,tn],Zw=e=>Qw.find(Gh(e)),lp=Le({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ek(e=!0){const t=ye(Ss);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=No();J(()=>{if(e)return i(o)},[e]);const a=j(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const up=Le({strict:!1}),dp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ar={};for(const e in dp)ar[e]={isEnabled:t=>dp[e].some(n=>!!t[n])};function tk(e){for(const t in e)ar[t]={...ar[t],...e[t]}}const nk=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ho(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nk.has(e)}let fp=e=>!ho(e);function rk(e){typeof e=="function"&&(fp=t=>t.startsWith("on")?!ho(t):e(t))}try{rk(require("@emotion/is-prop-valid").default)}catch{}function ik(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(fp(i)||n===!0&&ho(i)||!t&&!ho(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const po=Le({});function mo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function qr(e){return typeof e=="string"||Array.isArray(e)}const uc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],dc=["initial",...uc];function go(e){return mo(e.animate)||dc.some(t=>qr(e[t]))}function hp(e){return!!(go(e)||e.variants)}function ok(e,t){if(go(e)){const{initial:n,animate:r}=e;return{initial:n===!1||qr(n)?n:void 0,animate:qr(r)?r:void 0}}return e.inherit!==!1?t:{}}function ak(e){const{initial:t,animate:n}=ok(e,ye(po));return Ne(()=>({initial:t,animate:n}),[pp(t),pp(n)])}function pp(e){return Array.isArray(e)?e.join(" "):e}const Gr={};function sk(e){for(const t in e)Gr[t]=e[t],Is(t)&&(Gr[t].isCSSVariable=!0)}function mp(e,{layout:t,layoutId:n}){return ir.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Gr[e]||e==="opacity")}const ck={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lk=rr.length;function uk(e,t,n){let r="",i=!0;for(let o=0;o<lk;o++){const a=rr[o],s=e[a];if(s===void 0)continue;let c=!0;if(typeof s=="number"?c=s===(a.startsWith("scale")?1:0):c=parseFloat(s)===0,!c||n){const l=ep(s,ac[a]);if(!c){i=!1;const d=ck[a]||a;r+=`${d}(${l}) `}n&&(t[a]=l)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function fc(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,s=!1;for(const c in t){const l=t[c];if(ir.has(c)){a=!0;continue}else if(Is(c)){i[c]=l;continue}else{const d=ep(l,ac[c]);c.startsWith("origin")?(s=!0,o[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=uk(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:l="50%",originZ:d=0}=o;r.transformOrigin=`${c} ${l} ${d}`}}const hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gp(e,t,n){for(const r in t)!qe(t[r])&&!mp(r,n)&&(e[r]=t[r])}function dk({transformTemplate:e},t){return Ne(()=>{const n=hc();return fc(n,t,e),Object.assign({},n.vars,n.style)},[t])}function fk(e,t){const n=e.style||{},r={};return gp(r,n,e),Object.assign(r,dk(e,t)),r}function hk(e,t){const n={},r=fk(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const pk={offset:"stroke-dashoffset",array:"stroke-dasharray"},mk={offset:"strokeDashoffset",array:"strokeDasharray"};function gk(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?pk:mk;e[o.offset]=Y.transform(-r);const a=Y.transform(t),s=Y.transform(n);e[o.array]=`${a} ${s}`}function vp(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:a=0,...s},c,l,d){if(fc(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=d?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&gk(f,i,o,a,!1)}const yp=()=>({...hc(),attrs:{}}),bp=e=>typeof e=="string"&&e.toLowerCase()==="svg";function vk(e,t,n,r){const i=Ne(()=>{const o=yp();return vp(o,t,bp(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};gp(o,e.style,e),i.style={...o,...i.style}}return i}const yk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function pc(e){return typeof e!="string"||e.includes("-")?!1:!!(yk.indexOf(e)>-1||/[A-Z]/u.test(e))}function bk(e,t,n,{latestValues:r},i,o=!1){const s=(pc(e)?vk:hk)(t,r,i,e),c=ik(t,typeof e=="string",o),l=e!==Fe?{...c,...s,ref:n}:{},{children:d}=t,f=Ne(()=>qe(d)?d.get():d,[d]);return re(e,{...l,children:f})}function _p(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function mc(e,t,n,r){if(typeof t=="function"){const[i,o]=_p(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=_p(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function vo(e){return qe(e)?e.get():e}function _k({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:wk(n,r,i,e),renderState:t()}}function wk(e,t,n,r){const i={},o=r(e,{});for(const m in o)i[m]=vo(o[m]);let{initial:a,animate:s}=e;const c=go(e),l=hp(e);t&&l&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const f=d?s:a;if(f&&typeof f!="boolean"&&!mo(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const y=mc(e,m[g]);if(y){const{transitionEnd:v,transition:b,..._}=y;for(const S in _){let T=_[S];if(Array.isArray(T)){const M=d?T.length-1:0;T=T[M]}T!==null&&(i[S]=T)}for(const S in v)i[S]=v[S]}}}return i}const wp=e=>(t,n)=>{const r=ye(po),i=ye(Ss),o=()=>_k(e,t,r,i);return n?o():n_(o)};function gc(e,t,n){const{style:r}=e,i={};for(const o in r)(qe(r[o])||t.style&&qe(t.style[o])||mp(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=r[o]);return i}const kk=wp({scrapeMotionValuesFromProps:gc,createRenderState:hc});function kp(e,t,n){const r=gc(e,t,n);for(const i in e)if(qe(e[i])||qe(t[i])){const o=rr.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const Sk=wp({scrapeMotionValuesFromProps:kp,createRenderState:yp}),xk=Symbol.for("motionComponentSymbol");function sr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Tk(e,t,n){return j(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):sr(n)&&(n.current=r))},[t])}const vc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Sp="data-"+vc("framerAppearId"),xp=Le({});function Mk(e,t,n,r,i){const{visualElement:o}=ye(po),a=ye(up),s=ye(Ss),c=ye(lp).reducedMotion,l=ae(null);r=r||a.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:o,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}));const d=l.current,f=ye(xp);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Ck(l.current,n,i,f);const m=ae(!1);Wo(()=>{d&&m.current&&d.update(n,s)});const g=n[Sp],y=ae(!!g&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return r_(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),y.current&&d.animationState&&d.animationState.animateChanges())}),J(()=>{d&&(!y.current&&d.animationState&&d.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),y.current=!1),d.enteringChildren=void 0)}),d}function Ck(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Tp(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&sr(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l})}function Tp(e){if(e)return e.options.allowProjection!==!1?e.projection:Tp(e.parent)}function yc(e,{forwardMotionProps:t=!1}={},n,r){n&&tk(n);const i=pc(e)?Sk:kk;function o(s,c){let l;const d={...ye(lp),...s,layoutId:Pk(s)},{isStatic:f}=d,m=ak(s),g=i(s,f);if(!f&&ks){Ek();const y=Ak(d);l=y.MeasureLayout,m.visualElement=Mk(e,g,d,r,y.ProjectionNode)}return A(po.Provider,{value:m,children:[l&&m.visualElement?A(l,{visualElement:m.visualElement,...d}):null,bk(e,s,Tk(g,m.visualElement,c),g,f,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const a=Ge(o);return a[xk]=e,a}function Pk({layoutId:e}){const t=ye(eh).id;return t&&e!==void 0?t+"-"+e:e}function Ek(e,t){ye(up).strict}function Ak(e){const{drag:t,layout:n}=ar;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Ok(e,t){if(typeof Proxy>"u")return yc;const n=new Map,r=(o,a)=>yc(o,a,e,t),i=(o,a)=>r(o,a);return new Proxy(i,{get:(o,a)=>a==="create"?r:(n.has(a)||n.set(a,yc(a,void 0,e,t)),n.get(a))})}function Mp({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ik({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Dk(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function bc(e){return e===void 0||e===1}function _c({scale:e,scaleX:t,scaleY:n}){return!bc(e)||!bc(t)||!bc(n)}function An(e){return _c(e)||Cp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Cp(e){return Pp(e.x)||Pp(e.y)}function Pp(e){return e&&e!=="0%"}function yo(e,t,n){const r=e-n,i=t*r;return n+i}function Ep(e,t,n,r,i){return i!==void 0&&(e=yo(e,i,r)),yo(e,n,r)+t}function wc(e,t=0,n=1,r,i){e.min=Ep(e.min,t,n,r,i),e.max=Ep(e.max,t,n,r,i)}function Ap(e,{x:t,y:n}){wc(e.x,t.translate,t.scale,t.originPoint),wc(e.y,n.translate,n.scale,n.originPoint)}const Op=.999999999999,Ip=1.0000000000001;function Lk(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;s<i;s++){o=n[s],a=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&lr(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Ap(e,a)),r&&An(o.latestValues)&&lr(e,o.latestValues))}t.x<Ip&&t.x>Op&&(t.x=1),t.y<Ip&&t.y>Op&&(t.y=1)}function cr(e,t){e.min=e.min+t,e.max=e.max+t}function Dp(e,t,n,r,i=.5){const o=Pe(e.min,e.max,i);wc(e,t,n,o,r)}function lr(e,t){Dp(e.x,t.x,t.scaleX,t.scale,t.originX),Dp(e.y,t.y,t.scaleY,t.scale,t.originY)}function Lp(e,t){return Mp(Dk(e.getBoundingClientRect(),t))}function jk(e,t,n){const r=Lp(e,n),{scroll:i}=t;return i&&(cr(r.x,i.offset.x),cr(r.y,i.offset.y)),r}const jp=()=>({translate:0,scale:1,origin:0,originPoint:0}),ur=()=>({x:jp(),y:jp()}),Rp=()=>({min:0,max:0}),Ie=()=>({x:Rp(),y:Rp()}),kc={current:null},Np={current:!1};function Rk(){if(Np.current=!0,!!ks)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kc.current=e.matches;e.addEventListener("change",t),t()}else kc.current=!1}const Nk=new WeakMap;function Vk(e,t,n){for(const r in t){const i=t[r],o=n[r];if(qe(i))e.addValue(r,i);else if(qe(o))e.addValue(r,or(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,or(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Vp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Fk{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=nc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=tt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Me.render(this.render,!1,!0))};const{latestValues:c,renderState:l}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=!!o,this.isControllingVariants=go(n),this.isVariantNode=hp(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&qe(g)&&g.set(c[m])}}mount(t){this.current=t,Nk.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Np.current||Rk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:kc.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Zt(this.notifyUpdate),Zt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ir.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Me.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ar){const n=ar[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ie()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Vp.length;r++){const i=Vp[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Vk(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=or(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(th(r)||rh(r))?r=parseFloat(r):!Zw(r)&&tn.test(n)&&(r=Zh(t,n)),this.setBaseTarget(t,qe(r)?r.get():r)),qe(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=mc(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!qe(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ps),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){sc.render(this.render)}}class Fp extends Fk{constructor(){super(...arguments),this.KeyframeResolver=Bw}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Bp(e,{style:t,vars:n},r,i){const o=e.style;let a;for(a in t)o[a]=t[a];i?.applyProjectionStyles(o,r);for(a in n)o.setProperty(a,n[a])}function Bk(e){return window.getComputedStyle(e)}class $k extends Fp{constructor(){super(...arguments),this.type="html",this.renderInstance=Bp}readValueFromInstance(t,n){if(ir.has(n))return this.projection?.isProjecting?Xs(n):aw(t,n);{const r=Bk(t),i=(Is(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lp(t,n)}build(t,n,r){fc(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return gc(t,n,r)}}const $p=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Uk(e,t,n,r){Bp(e,t,void 0,r);for(const i in t.attrs)e.setAttribute($p.has(i)?i:vc(i),t.attrs[i])}class zk extends Fp{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ie}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ir.has(n)){const r=Qh(n);return r&&r.default||0}return n=$p.has(n)?n:vc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return kp(t,n,r)}build(t,n,r){vp(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){Uk(t,n,r,i)}mount(t){this.isSVGTag=bp(t.tagName),super.mount(t)}}const Wk=(e,t)=>pc(e)?new zk(t):new $k(t,{allowProjection:e!==Fe});function dr(e,t,n){const r=e.getProps();return mc(r,t,n!==void 0?n:r.custom,e)}const Sc=e=>Array.isArray(e);function Hk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,or(n))}function Jk(e){return Sc(e)?e[e.length-1]||0:e}function qk(e,t){const n=dr(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=Jk(o[a]);Hk(e,a,s)}}function Gk(e){return!!(qe(e)&&e.add)}function xc(e,t){const n=e.getValue("willChange");if(Gk(n))return n.add(t);if(!n&&$t.WillChange){const r=new $t.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Up(e){return e.props[Sp]}const Kk=e=>e!==null;function Yk(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Kk),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[o]}const Xk={type:"spring",stiffness:500,damping:25,restSpeed:10},Qk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Zk={type:"keyframes",duration:.8},eS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tS=(e,{keyframes:t})=>t.length>2?Zk:ir.has(e)?e.startsWith("scale")?Qk(t[1]):Xk:eS;function nS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:c,elapsed:l,...d}){return!!Object.keys(d).length}const Tc=(e,t,n,r={},i,o)=>a=>{const s=ic(r,e)||{},c=s.delay||r.delay||0;let{elapsed:l=0}=r;l=l-Ot(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-l,onUpdate:m=>{t.set(m),s.onUpdate&&s.onUpdate(m)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};nS(s)||Object.assign(d,tS(e,d)),d.duration&&(d.duration=Ot(d.duration)),d.repeatDelay&&(d.repeatDelay=Ot(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(rc(d),d.delay===0&&(f=!0)),($t.instantAnimations||$t.skipAnimations)&&(f=!0,rc(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,f&&!o&&t.get()!==void 0){const m=Yk(d.keyframes,s);if(m!==void 0){Me.update(()=>{d.onUpdate(m),d.onComplete()});return}}return s.isSync?new Gs(d):new Ew(d)};function rS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function zp(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(o=r);const c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(const d in s){const f=e.getValue(d,e.latestValues[d]??null),m=s[d];if(m===void 0||l&&rS(l,d))continue;const g={delay:n,...ic(o||{},d)},y=f.get();if(y!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===y&&!g.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const _=Up(e);if(_){const S=window.MotionHandoffAnimation(_,d,Me);S!==null&&(g.startTime=S,v=!0)}}xc(e,d),f.start(Tc(d,f,m,e.shouldReduceMotion&&qh.has(d)?{type:!1}:g,e,v));const b=f.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{Me.update(()=>{a&&qk(e,a)})}),c}function Wp(e,t,n,r=0,i=1){const o=Array.from(e).sort((l,d)=>l.sortNodePosition(d)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(o,a):i===1?o*r:s-o*r}function Mc(e,t,n={}){const r=dr(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(zp(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:d,staggerDirection:f}=i;return iS(e,t,c,l,d,f,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[c,l]=s==="beforeChildren"?[o,a]:[a,o];return c().then(()=>l())}else return Promise.all([o(),a(n.delay)])}function iS(e,t,n=0,r=0,i=0,o=1,a){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(Mc(c,t,{...a,delay:n+(typeof r=="function"?0:r)+Wp(e.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function oS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Mc(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Mc(e,t,n);else{const i=typeof t=="function"?dr(e,t,n.custom):t;r=Promise.all(zp(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Hp(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const aS=dc.length;function Jp(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Jp(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<aS;n++){const r=dc[n],i=e.props[r];(qr(i)||i===!1)&&(t[r]=i)}return t}const sS=[...uc].reverse(),cS=uc.length;function lS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>oS(e,n,r)))}function uS(e){let t=lS(e),n=qp(),r=!0;const i=c=>(l,d)=>{const f=dr(e,d,c==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:m,transitionEnd:g,...y}=f;l={...l,...y,...g}}return l};function o(c){t=c(e)}function a(c){const{props:l}=e,d=Jp(e.parent)||{},f=[],m=new Set;let g={},y=1/0;for(let b=0;b<cS;b++){const _=sS[b],S=n[_],T=l[_]!==void 0?l[_]:d[_],M=qr(T),x=_===c?S.isActive:null;x===!1&&(y=b);let C=T===d[_]&&T!==l[_]&&M;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),S.protectedKeys={...g},!S.isActive&&x===null||!T&&!S.prevProp||mo(T)||typeof T=="boolean")continue;const E=dS(S.prevProp,T);let O=E||_===c&&S.isActive&&!C&&M||b>y&&M,V=!1;const B=Array.isArray(T)?T:[T];let N=B.reduce(i(_),{});x===!1&&(N={});const{prevResolvedValues:z={}}=S,R={...z,...N},ee=W=>{O=!0,m.has(W)&&(V=!0,m.delete(W)),S.needsAnimating[W]=!0;const K=e.getValue(W);K&&(K.liveStyle=!1)};for(const W in R){const K=N[W],$=z[W];if(g.hasOwnProperty(W))continue;let U=!1;Sc(K)&&Sc($)?U=!Hp(K,$):U=K!==$,U?K!=null?ee(W):m.add(W):K!==void 0&&m.has(W)?ee(W):S.protectedKeys[W]=!0}S.prevProp=T,S.prevResolvedValues=N,S.isActive&&(g={...g,...N}),r&&e.blockInitialAnimation&&(O=!1);const X=C&&E;O&&(!X||V)&&f.push(...B.map(W=>{const K={type:_};if(typeof W=="string"&&r&&!X&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,U=dr($,W);if($.enteringChildren&&U){const{delayChildren:ie}=U.transition||{};K.delay=Wp($.enteringChildren,e,ie)}}return{animation:W,options:K}}))}if(m.size){const b={};if(typeof l.initial!="boolean"){const _=dr(e,Array.isArray(l.initial)?l.initial[0]:l.initial);_&&_.transition&&(b.transition=_.transition)}m.forEach(_=>{const S=e.getBaseTarget(_),T=e.getValue(_);T&&(T.liveStyle=!0),b[_]=S??null}),f.push({animation:b})}let v=!!f.length;return r&&(l.initial===!1||l.initial===l.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function s(c,l){if(n[c].isActive===l)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(c,l)),n[c].isActive=l;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=qp()}}}function dS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Hp(t,e):!1}function On(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qp(){return{animate:On(!0),whileInView:On(),whileHover:On(),whileTap:On(),whileDrag:On(),whileFocus:On(),exit:On()}}class nn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class fS extends nn{constructor(t){super(t),t.animationState||(t.animationState=uS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();mo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let hS=0;class pS extends nn{constructor(){super(...arguments),this.id=hS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const mS={animation:{Feature:fS},exit:{Feature:pS}};function Kr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Yr(e){return{point:{x:e.pageX,y:e.pageY}}}const gS=e=>t=>cc(t)&&e(t,Yr(t));function Xr(e,t,n,r){return Kr(e,t,gS(n),r)}const Gp=1e-4,vS=1-Gp,yS=1+Gp,Kp=.01,bS=0-Kp,_S=0+Kp;function Ze(e){return e.max-e.min}function wS(e,t,n){return Math.abs(e-t)<=n}function Yp(e,t,n,r=.5){e.origin=r,e.originPoint=Pe(t.min,t.max,e.origin),e.scale=Ze(n)/Ze(t),e.translate=Pe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vS&&e.scale<=yS||isNaN(e.scale))&&(e.scale=1),(e.translate>=bS&&e.translate<=_S||isNaN(e.translate))&&(e.translate=0)}function Qr(e,t,n,r){Yp(e.x,t.x,n.x,r?r.originX:void 0),Yp(e.y,t.y,n.y,r?r.originY:void 0)}function Xp(e,t,n){e.min=n.min+t.min,e.max=e.min+Ze(t)}function kS(e,t,n){Xp(e.x,t.x,n.x),Xp(e.y,t.y,n.y)}function Qp(e,t,n){e.min=t.min-n.min,e.max=e.min+Ze(t)}function Zr(e,t,n){Qp(e.x,t.x,n.x),Qp(e.y,t.y,n.y)}function mt(e){return[e("x"),e("y")]}const Zp=({current:e})=>e?e.ownerDocument.defaultView:null,em=(e,t)=>Math.abs(e-t);function SS(e,t){const n=em(e.x,t.x),r=em(e.y,t.y);return Math.sqrt(n**2+r**2)}class tm{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Pc(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=SS(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:v}=m,{timestamp:b}=$e;this.history.push({...v,timestamp:b});const{onStart:_,onMove:S}=this.handlers;g||(_&&_(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),S&&S(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Cc(g,this.transformPagePoint),Me.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:y,onSessionEnd:v,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Pc(m.type==="pointercancel"?this.lastMoveEventInfo:Cc(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,_),v&&v(m,_)},!cc(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=i||window;const s=Yr(t),c=Cc(s,this.transformPagePoint),{point:l}=c,{timestamp:d}=$e;this.history=[{...l,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Pc(c,this.history)),this.removeListeners=Vr(Xr(this.contextWindow,"pointermove",this.handlePointerMove),Xr(this.contextWindow,"pointerup",this.handlePointerUp),Xr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Zt(this.updatePoint)}}function Cc(e,t){return t?{point:t(e.point)}:e}function nm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Pc({point:e},t){return{point:e,delta:nm(e,rm(t)),offset:nm(e,xS(t)),velocity:TS(t,.1)}}function xS(e){return e[0]}function rm(e){return e[e.length-1]}function TS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=rm(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ot(t)));)n--;if(!r)return{x:0,y:0};const o=pt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function MS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pe(n,e,r.max):Math.min(e,n)),e}function im(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function CS(e,{top:t,left:n,bottom:r,right:i}){return{x:im(e.x,n,i),y:im(e.y,t,r)}}function om(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function PS(e,t){return{x:om(e.x,t.x),y:om(e.y,t.y)}}function ES(e,t){let n=.5;const r=Ze(e),i=Ze(t);return i>r?n=Fr(t.min,t.max-r,e.min):r>i&&(n=Fr(e.min,e.max-i,t.min)),Bt(0,1,n)}function AS(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Ec=.35;function OS(e=Ec){return e===!1?e=0:e===!0&&(e=Ec),{x:am(e,"left","right"),y:am(e,"top","bottom")}}function am(e,t,n){return{min:sm(e,t),max:sm(e,n)}}function sm(e,t){return typeof e=="number"?e:e[t]||0}const IS=new WeakMap;class DS{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ie(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Yr(f).point)},a=(f,m)=>{const{drag:g,dragPropagation:y,onDragStart:v}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Hw(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mt(_=>{let S=this.getAxisMotionValue(_).get()||0;if(It.test(S)){const{projection:T}=this.visualElement;if(T&&T.layout){const M=T.layout.layoutBox[_];M&&(S=Ze(M)*(parseFloat(S)/100))}}this.originPoint[_]=S}),v&&Me.postRender(()=>v(f,m)),xc(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:v,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=m;if(y&&this.currentDirection===null){this.currentDirection=LS(_),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",m.point,_),this.updateAxis("y",m.point,_),this.visualElement.render(),b&&b(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>mt(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new tm(t,{onSessionStart:o,onStart:a,onMove:s,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:Zp(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:a}=i;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&Me.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!bo(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=MS(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&sr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=CS(r.layoutBox,t):this.constraints=!1,this.elastic=OS(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&mt(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=AS(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!sr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=jk(r,i.root,this.visualElement.getTransformPagePoint());let a=PS(i.layout.layoutBox,o);if(n){const s=n(Ik(a));this.hasMutatedConstraints=!!s,s&&(a=Mp(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},l=mt(d=>{if(!bo(d,n,this.currentDirection))return;let f=c&&c[d]||{};a&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(l).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return xc(this.visualElement,t),r.start(Tc(t,r,0,n,this.visualElement,!1))}stopAnimation(){mt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){mt(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){mt(n=>{const{drag:r}=this.getProps();if(!bo(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Pe(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!sr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mt(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const c=s.get();i[a]=ES({min:c,max:c},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),mt(a=>{if(!bo(a,t,null))return;const s=this.getAxisMotionValue(a),{min:c,max:l}=this.constraints[a];s.set(Pe(c,l,i[a]))})}addListeners(){if(!this.visualElement.current)return;IS.set(this.visualElement,this);const t=this.visualElement.current,n=Xr(t,"pointerdown",c=>{const{drag:l,dragListener:d=!0}=this.getProps();l&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();sr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Me.read(r);const a=Kr(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(mt(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=Ec,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function bo(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function LS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class jS extends nn{constructor(t){super(t),this.removeGroupControls=ht,this.removeListeners=ht,this.controls=new DS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ht}unmount(){this.removeGroupControls(),this.removeListeners()}}const cm=e=>(t,n)=>{e&&Me.postRender(()=>e(t,n))};class RS extends nn{constructor(){super(...arguments),this.removePointerDownListener=ht}onPointerDown(t){this.session=new tm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zp(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:cm(t),onStart:cm(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&Me.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=Xr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const _o={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lm(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ei={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=lm(e,t.target.x),r=lm(e,t.target.y);return`${n}% ${r}%`}},NS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=tn.parse(e);if(i.length>5)return r;const o=tn.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=c;const l=Pe(s,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=l),typeof i[3+a]=="number"&&(i[3+a]/=l),o(i)}};let Ac=!1;class VS extends vt{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;sk(FS),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Ac&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),_o.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:a}=r;return a&&(a.isPresent=o,Ac=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Me.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),sc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Ac=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function um(e){const[t,n]=ek(),r=ye(eh);return A(VS,{...e,layoutGroup:r,switchLayoutGroup:ye(xp),isPresent:t,safeToRemove:n})}const FS={borderRadius:{...ei,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ei,borderTopRightRadius:ei,borderBottomLeftRadius:ei,borderBottomRightRadius:ei,boxShadow:NS};function BS(e,t,n){const r=qe(e)?e:or(e);return r.start(Tc("",r,t,n)),r.animation}const $S=(e,t)=>e.depth-t.depth;class US{constructor(){this.children=[],this.isDirty=!1}add(t){xs(this.children,t),this.isDirty=!0}remove(t){Ts(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($S),this.isDirty=!1,this.children.forEach(t)}}function zS(e,t){const n=tt.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Zt(r),e(o-t))};return Me.setup(r,!0),()=>Zt(r)}const dm=["TopLeft","TopRight","BottomLeft","BottomRight"],WS=dm.length,fm=e=>typeof e=="string"?parseFloat(e):e,hm=e=>typeof e=="number"||Y.test(e);function HS(e,t,n,r,i,o){i?(e.opacity=Pe(0,n.opacity??1,JS(r)),e.opacityExit=Pe(t.opacity??1,0,qS(r))):o&&(e.opacity=Pe(t.opacity??1,n.opacity??1,r));for(let a=0;a<WS;a++){const s=`border${dm[a]}Radius`;let c=pm(t,s),l=pm(n,s);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||hm(c)===hm(l)?(e[s]=Math.max(Pe(fm(c),fm(l),r),0),(It.test(l)||It.test(c))&&(e[s]+="%")):e[s]=l}(t.rotate||n.rotate)&&(e.rotate=Pe(t.rotate||0,n.rotate||0,r))}function pm(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JS=mm(0,.5,dh),qS=mm(.5,.95,ht);function mm(e,t,n){return r=>r<e?0:r>t?1:n(Fr(e,t,r))}function gm(e,t){e.min=t.min,e.max=t.max}function gt(e,t){gm(e.x,t.x),gm(e.y,t.y)}function vm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ym(e,t,n,r,i){return e-=t,e=yo(e,1/n,r),i!==void 0&&(e=yo(e,1/i,r)),e}function GS(e,t=0,n=1,r=.5,i,o=e,a=e){if(It.test(t)&&(t=parseFloat(t),t=Pe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Pe(o.min,o.max,r);e===o&&(s-=t),e.min=ym(e.min,t,n,s,i),e.max=ym(e.max,t,n,s,i)}function bm(e,t,[n,r,i],o,a){GS(e,t[n],t[r],t[i],t.scale,o,a)}const KS=["x","scaleX","originX"],YS=["y","scaleY","originY"];function _m(e,t,n,r){bm(e.x,t,KS,n?n.x:void 0,r?r.x:void 0),bm(e.y,t,YS,n?n.y:void 0,r?r.y:void 0)}function wm(e){return e.translate===0&&e.scale===1}function km(e){return wm(e.x)&&wm(e.y)}function Sm(e,t){return e.min===t.min&&e.max===t.max}function XS(e,t){return Sm(e.x,t.x)&&Sm(e.y,t.y)}function xm(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Tm(e,t){return xm(e.x,t.x)&&xm(e.y,t.y)}function Mm(e){return Ze(e.x)/Ze(e.y)}function Cm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class QS{constructor(){this.members=[]}add(t){xs(this.members,t),t.scheduleRender()}remove(t){if(Ts(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ZS(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=n?.z||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:l,rotate:d,rotateX:f,rotateY:m,skewX:g,skewY:y}=n;l&&(r=`perspective(${l}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),y&&(r+=`skewY(${y}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Oc=["","X","Y","Z"],e1=1e3;let t1=0;function Ic(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Pm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Up(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Me,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Pm(r)}function Em({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t?.()){this.id=t1++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(i1),this.nodes.forEach(c1),this.nodes.forEach(l1),this.nodes.forEach(o1)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new US)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Ps),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const c=this.eventHandlers.get(a);c&&c.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=cp(a)&&!Xw(a),this.instance=a;const{layoutId:s,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let d,f=0;const m=()=>this.root.updateBlockedByResize=!1;Me.read(()=>{f=window.innerWidth}),e(a,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,d&&d(),d=zS(m,250),_o.hasAnimatedSinceResize&&(_o.hasAnimatedSinceResize=!1,this.nodes.forEach(Im)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&l&&(s||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||l.getDefaultTransition()||p1,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=l.getProps(),_=!this.targetLayout||!Tm(this.targetLayout,g),S=!f&&m;if(this.options.layoutRoot||this.resumeFrom||S||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...ic(y,"layout"),onPlay:v,onComplete:b};(l.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(d,S)}else f||Im(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Zt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(u1),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pm(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Am);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Om);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(s1),this.nodes.forEach(n1),this.nodes.forEach(r1)):this.nodes.forEach(Om),this.clearAllSnapshots();const s=tt.now();$e.delta=Bt(0,16.666666666666668,s-$e.timestamp),$e.timestamp=s,$e.isProcessing=!0,Os.update.process($e),Os.preRender.process($e),Os.render.process($e),$e.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(a1),this.sharedNodes.forEach(d1)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Me.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Me.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ze(this.snapshot.measuredBox.x)&&!Ze(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ie(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!km(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,d=l!==this.prevTransformTemplateValue;a&&this.instance&&(s||An(this.latestValues)||d)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return a&&(c=this.removeTransform(c)),m1(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Ie();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(g1))){const{scroll:l}=this.root;l&&(cr(s.x,l.offset.x),cr(s.y,l.offset.y))}return s}removeElementScroll(a){const s=Ie();if(gt(s,a),this.scroll?.wasRoot)return s;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:d,options:f}=l;l!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&gt(s,a),cr(s.x,d.offset.x),cr(s.y,d.offset.y))}return s}applyTransform(a,s=!1){const c=Ie();gt(c,a);for(let l=0;l<this.path.length;l++){const d=this.path[l];!s&&d.options.layoutScroll&&d.scroll&&d!==d.root&&lr(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),An(d.latestValues)&&lr(c,d.latestValues)}return An(this.latestValues)&&lr(c,this.latestValues),c}removeTransform(a){const s=Ie();gt(s,a);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!An(l.latestValues))continue;_c(l.latestValues)&&l.updateSnapshot();const d=Ie(),f=l.measurePageBox();gt(d,f),_m(s,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,d)}return An(this.latestValues)&&_m(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$e.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=$e.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),Zr(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ie(),this.targetWithTransforms=Ie()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):gt(this.target,this.layout.layoutBox),Ap(this.target,this.targetDelta)):gt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ie(),this.relativeTargetOrigin=Ie(),Zr(this.relativeTargetOrigin,this.target,m.target),gt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||_c(this.parent.latestValues)||Cp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===$e.timestamp&&(c=!1),c)return;const{layout:l,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||d))return;gt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Lk(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ie());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(vm(this.prevProjectionDelta.x,this.projectionDelta.x),vm(this.prevProjectionDelta.y,this.projectionDelta.y)),Qr(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!Cm(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ur(),this.projectionDelta=ur(),this.projectionDeltaWithTransform=ur()}setAnimationOrigin(a,s=!1){const c=this.snapshot,l=c?c.latestValues:{},d={...this.latestValues},f=ur();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const m=Ie(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,v=g!==y,b=this.getStack(),_=!b||b.members.length<=1,S=!!(v&&!_&&this.options.crossfade===!0&&!this.path.some(h1));this.animationProgress=0;let T;this.mixTargetDelta=M=>{const x=M/1e3;Dm(f.x,a.x,x),Dm(f.y,a.y,x),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f1(this.relativeTarget,this.relativeTargetOrigin,m,x),T&&XS(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Ie()),gt(T,this.relativeTarget)),v&&(this.animationValues=d,HS(d,l,this.latestValues,x,S,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Zt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Me.update(()=>{_o.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=or(0)),this.currentAnimation=BS(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(e1),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:c,layout:l,latestValues:d}=a;if(!(!s||!c||!l)){if(this!==a&&this.layout&&l&&Vm(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||Ie();const f=Ze(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+f;const m=Ze(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}gt(s,c),lr(s,d),Qr(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new QS),this.sharedNodes.get(a).add(s);const l=s.options.initialPromotionConfig;s.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const l={};c.z&&Ic("z",a,l,this.animationValues);for(let d=0;d<Oc.length;d++)Ic(`rotate${Oc[d]}`,a,l,this.animationValues),Ic(`skew${Oc[d]}`,a,l,this.animationValues);a.render();for(const d in l)a.setStaticValue(d,l[d]),this.animationValues&&(this.animationValues[d]=l[d]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=vo(s?.pointerEvents)||"",a.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=vo(s?.pointerEvents)||""),this.hasProjected&&!An(this.latestValues)&&(a.transform=c?c({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=ZS(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),a.transform=f;const{x:m,y:g}=this.projectionDelta;a.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,l.animationValues?a.opacity=l===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=l===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const y in Gr){if(d[y]===void 0)continue;const{correct:v,applyTo:b,isCSSVariable:_}=Gr[y],S=f==="none"?d[y]:v(d[y],l);if(b){const T=b.length;for(let M=0;M<T;M++)a[b[M]]=S}else _?this.options.visualElement.renderState.vars[y]=S:a[y]=S}this.options.layoutId&&(a.pointerEvents=l===this?vo(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Am),this.root.sharedNodes.clear()}}}function n1(e){e.updateLayout()}function r1(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?mt(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],m=Ze(f);f.min=n[d].min,f.max=f.min+m}):Vm(i,t.layoutBox,n)&&mt(d=>{const f=o?t.measuredBox[d]:t.layoutBox[d],m=Ze(n[d]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const a=ur();Qr(a,n,t.layoutBox);const s=ur();o?Qr(s,e.applyTransform(r,!0),t.measuredBox):Qr(s,n,t.layoutBox);const c=!km(a);let l=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:m}=d;if(f&&m){const g=Ie();Zr(g,t.layoutBox,f.layoutBox);const y=Ie();Zr(y,n,m.layoutBox),Tm(g,y)||(l=!0),d.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function i1(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function o1(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function a1(e){e.clearSnapshot()}function Am(e){e.clearMeasurements()}function Om(e){e.isLayoutDirty=!1}function s1(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Im(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function c1(e){e.resolveTargetDelta()}function l1(e){e.calcProjection()}function u1(e){e.resetSkewAndRotation()}function d1(e){e.removeLeadSnapshot()}function Dm(e,t,n){e.translate=Pe(t.translate,0,n),e.scale=Pe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lm(e,t,n,r){e.min=Pe(t.min,n.min,r),e.max=Pe(t.max,n.max,r)}function f1(e,t,n,r){Lm(e.x,t.x,n.x,r),Lm(e.y,t.y,n.y,r)}function h1(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const p1={duration:.45,ease:[.4,0,.1,1]},jm=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rm=jm("applewebkit/")&&!jm("chrome/")?Math.round:ht;function Nm(e){e.min=Rm(e.min),e.max=Rm(e.max)}function m1(e){Nm(e.x),Nm(e.y)}function Vm(e,t,n){return e==="position"||e==="preserve-aspect"&&!wS(Mm(t),Mm(n),.2)}function g1(e){return e!==e.root&&e.scroll?.wasRoot}const v1=Em({attachResizeListener:(e,t)=>Kr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dc={current:void 0},Fm=Em({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dc.current){const e=new v1({});e.mount(window),e.setOptions({layoutScroll:!0}),Dc.current=e}return Dc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),y1={pan:{Feature:RS},drag:{Feature:jS,ProjectionNode:Fm,MeasureLayout:um}};function Bm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Me.postRender(()=>o(t,Yr(t)))}class b1 extends nn{mount(){const{current:t}=this.node;t&&(this.unmount=Jw(t,(n,r)=>(Bm(this.node,r,"Start"),i=>Bm(this.node,i,"End"))))}unmount(){}}class _1 extends nn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vr(Kr(this.node.current,"focus",()=>this.onFocus()),Kr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $m(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&Me.postRender(()=>o(t,Yr(t)))}class w1 extends nn{mount(){const{current:t}=this.node;t&&(this.unmount=Yw(t,(n,r)=>($m(this.node,r,"Start"),(i,{success:o})=>$m(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Lc=new WeakMap,jc=new WeakMap,k1=e=>{const t=Lc.get(e.target);t&&t(e)},S1=e=>{e.forEach(k1)};function x1({root:e,...t}){const n=e||document;jc.has(n)||jc.set(n,{});const r=jc.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(S1,{root:e,...t})),r[i]}function T1(e,t,n){const r=x1(t);return Lc.set(e,n),r.observe(e),()=>{Lc.delete(e),r.unobserve(e)}}const M1={some:0,all:1};class C1 extends nn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:M1[i]},s=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=l?d:f;m&&m(c)};return T1(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(P1(t,n))&&this.startObserver()}unmount(){}}function P1({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const E1={...mS,...{inView:{Feature:C1},tap:{Feature:w1},focus:{Feature:_1},hover:{Feature:b1}},...y1,...{layout:{ProjectionNode:Fm,MeasureLayout:um}}},fr=Ok(E1,Wk);function A1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M8 2a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM8 6.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM9.5 12.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0Z"}))}const O1=Ge(A1);function I1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),re("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const D1=Ge(I1);function L1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{fillRule:"evenodd",d:"m3.855 7.286 1.067-.534a1 1 0 0 0 .542-1.046l-.44-2.858A1 1 0 0 0 4.036 2H3a1 1 0 0 0-1 1v2c0 .709.082 1.4.238 2.062a9.012 9.012 0 0 0 6.7 6.7A9.024 9.024 0 0 0 11 14h2a1 1 0 0 0 1-1v-1.036a1 1 0 0 0-.848-.988l-2.858-.44a1 1 0 0 0-1.046.542l-.534 1.067a7.52 7.52 0 0 1-4.86-4.859Z",clipRule:"evenodd"}))}const j1=Ge(L1);function R1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM12.95 3.05a.75.75 0 1 0-1.06 1.06 5.5 5.5 0 0 1 0 7.78.75.75 0 1 0 1.06 1.06 7 7 0 0 0 0-9.9Z"}),re("path",{d:"M10.828 5.172a.75.75 0 1 0-1.06 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 1 0 1.06 1.06 4 4 0 0 0 0-5.656Z"}))}const N1=Ge(R1);function V1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M7.557 2.066A.75.75 0 0 1 8 2.75v10.5a.75.75 0 0 1-1.248.56L3.59 11H2a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h1.59l3.162-2.81a.75.75 0 0 1 .805-.124ZM11.28 5.72a.75.75 0 1 0-1.06 1.06L11.44 8l-1.22 1.22a.75.75 0 1 0 1.06 1.06l1.22-1.22 1.22 1.22a.75.75 0 1 0 1.06-1.06L13.56 8l1.22-1.22a.75.75 0 0 0-1.06-1.06L12.5 6.94l-1.22-1.22Z"}))}const F1=Ge(V1);function B1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M3 4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H3ZM15 4.75a.75.75 0 0 0-1.28-.53l-2 2a.75.75 0 0 0-.22.53v2.5c0 .199.079.39.22.53l2 2a.75.75 0 0 0 1.28-.53v-6.5Z"}))}const Um=Ge(B1);function $1({title:e,titleId:t,...n},r){return re("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?re("title",{id:t},e):null,re("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"}))}const zm=Ge($1),U1=7;function z1(){return A("div",{className:"flex items-center justify-center gap-2 mt-4",role:"status","aria-label":"Loading",children:Array.from({length:U1},(e,t)=>A(fr.div,{className:"h-[20px] w-[10px] rounded-full bg-white",animate:{opacity:[.25,1,.25]},transition:{duration:1.2,repeat:1/0,delay:t*.12,ease:"easeInOut"}},t))})}function W1({isColdStart:e=!1}){const{agentData:t}=Qt(),{isMobileDevice:n}=ws(),r=t?.image_url;return A("div",{className:"absolute inset-0 w-full h-full flex flex-col items-center justify-center",children:[A("div",{className:"absolute inset-0 w-full h-full bg-black"}),r&&A("div",{className:"absolute inset-0 w-full h-full bg-cover bg-center scale-125",style:{backgroundImage:`url(${r})`,filter:"blur(25px) brightness(0.5)"}}),A(fr.div,{initial:{filter:"blur(12px)",opacity:0},animate:{filter:"blur(0px)",opacity:1},transition:{duration:.2,ease:"easeOut"},className:`absolute inset-0 w-full h-full flex flex-col items-center justify-center ${n?"pb-6 px-4":"pb-4 px-8"}`,children:A("div",{className:"flex flex-col items-center text-white",children:e?A(Fe,{children:[A("p",{className:"text-sm font-medium text-center text-white max-w-[90%] leading-snug",children:"We're experiencing more traffic than usual. This may take an additional minute."}),A(z1,{})]}):A(Fe,{children:[A("div",{className:"flex items-center justify-center gap-2 mb-2",children:[A(fr.div,{animate:{rotate:[0,-10,10,-10,10,-10,10,0]},transition:{duration:.6,repeat:1/0,repeatDelay:1.4,ease:"easeInOut"},children:A(j1,{className:"size-6 text-white"})}),A("h2",{className:"text-lg font-medium text-center",children:"Calling..."})]}),A("div",{className:"flex justify-center",children:A("span",{className:"font-light text-xs text-center text-white",children:["This call with an AI may be recorded and shared with our service providers.",A("br",{}),A("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline decoration-white/50 hover:text-white transition-colors",children:"Learn more"})]})})]})})})]})}const H1=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),J1=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Wm=e=>{const t=J1(e);return t.charAt(0).toUpperCase()+t.slice(1)},Hm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),q1=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var G1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const K1=Ge(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},c)=>re("svg",{ref:c,...G1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Hm("lucide",i),...!o&&!q1(s)&&{"aria-hidden":"true"},...s},[...a.map(([l,d])=>re(l,d)),...Array.isArray(o)?o:[o]]));const ti=(e,t)=>{const n=Ge(({className:r,...i},o)=>re(K1,{ref:o,iconNode:t,className:Hm(`lucide-${H1(Wm(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Wm(e),n};const Y1=ti("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const X1=ti("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Q1=ti("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Z1=ti("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"}]]);const ex=ti("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);function wo({msg:e,isError:t=!1,isFullWidth:n=!0,showSpinner:r=!1,onClick:i=null}){return A("div",{className:`absolute top-2 left-2 z-10 flex items-center text-white/75 ${n?"right-14":""}`,children:A("div",{className:`backdrop-blur-sm rounded-2xl py-2.5 px-4 shadow-inset-white-10 flex items-center gap-2 min-w-0
38
+ ${n?"w-full":""}
39
39
  ${t?"bg-red-600/25":"bg-gray-40/25"}
40
- ${i?"cursor-pointer":""}`,onClick:i||void 0,children:[r&&A(X1,{className:"animate-spin",size:16}),A("p",{className:"text-sm font-medium",children:e||"An error occurred. Please try again."})]})})}function ex(){const{agentData:e}=Qt(),{errorMsg:t,resetErrors:n}=io(),{resetDailyState:r}=At(),i=e?.image_url,o=()=>{r(),n()};return A("div",{className:"fixed inset-0 w-full h-full flex flex-col items-center justify-center",children:[A("div",{className:"absolute w-full h-full bg-black"}),i&&A("div",{className:"absolute w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${i})`,filter:"blur(25px) brightness(0.5)"}}),A(wo,{msg:t,isError:!0}),A("button",{onClick:o,className:"absolute flex items-center justify-center","aria-label":"Play video",children:A("span",{className:"opacity-100 hover:opacity-80 transition-opacity cursor-pointer",children:A(Z1,{size:40,fill:"white",color:"none"})})})]})}const tx="/imagine",Jm=Le(void 0);function nx({children:e}){const[t,n]=te(""),[r,i]=te(""),{hasJoinedRoom:o}=At(),{hasUserInteracted:a}=er(),s=Rr(),c=Xt({filter:"remote"}),l=ae(!1),d="hello",f=j(()=>{l.current=!1},[]),m=j((y,v,b,_,S)=>{const T=y.trim();if(!T)return;const M=S?.allowImageEdits&&T.toLowerCase().startsWith(tx);b&&_.length>0?(v({event:"chat-msg",message:T,name:"Guest"},"*"),M?S?.setIsImageChangeRequested?.(!0):n(T)):M||i(T)},[n,i]);J(()=>{if(c.length>0&&o&&a&&!l.current){l.current=!0;let v;r?(n(r),v=r):v=d,s({event:"chat-msg",message:v,name:"Guest"},"*"),i("")}},[r,o,c,a,l,s,n,i]);const g=Ne(()=>({lastMessage:t,setLastMessage:n,queuedMessage:r,setQueuedMessage:i,resetInitMsg:f,sendMessage:m}),[t,r,f,m]);return A(Jm.Provider,{value:g,children:e})}function Rc(){const e=ye(Jm);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e}const rx=Ge(function({title:t,titleId:n,...r},i){return A("svg",{ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-labelledby":n,...r,children:[t?A("title",{id:n,children:t}):null,A("path",{d:"M3.33157 2.40868C3.66659 2.09013 4.19642 2.10349 4.51497 2.43851L17.0321 15.6032C17.3507 15.9382 17.3373 16.4681 17.0023 16.7866C16.6673 17.1051 16.1374 17.0918 15.8189 16.7568L3.30173 3.59208C2.98318 3.25705 2.99654 2.72722 3.33157 2.40868Z",fill:"currentColor"}),A("path",{d:"M4.6877 7.8125C5.20547 7.8125 5.6252 8.23223 5.6252 8.75C5.6252 11.1662 7.58395 13.125 10.0002 13.125C10.7088 13.125 11.3769 12.9543 11.9689 12.6553L13.301 14.0566C12.5948 14.4968 11.7951 14.8007 10.9377 14.9297V16.875H12.8127C13.3305 16.875 13.7502 17.2947 13.7502 17.8125C13.7502 18.3303 13.3305 18.75 12.8127 18.75H7.1877C6.66993 18.75 6.2502 18.3303 6.2502 17.8125C6.2502 17.2947 6.66993 16.875 7.1877 16.875H9.0627V14.9297C6.05569 14.4773 3.7502 11.8831 3.7502 8.75C3.7502 8.23223 4.16993 7.8125 4.6877 7.8125Z",fill:"currentColor"}),A("path",{d:"M15.3127 7.8125C15.8305 7.8125 16.2502 8.23223 16.2502 8.75C16.2502 9.94681 15.9127 11.0644 15.3293 12.0146L13.9709 10.5859C14.2295 10.0275 14.3752 9.4059 14.3752 8.75C14.3752 8.23223 14.7949 7.8125 15.3127 7.8125Z",fill:"currentColor"}),A("path",{d:"M10.5676 11.1826C10.3851 11.225 10.1956 11.25 10.0002 11.25C8.61949 11.25 7.5002 10.1307 7.5002 8.75V7.95508L10.5676 11.1826Z",fill:"currentColor"}),A("path",{d:"M10.0002 1.25C11.3809 1.25 12.5002 2.36929 12.5002 3.75V8.75C12.5002 8.8421 12.4943 8.93294 12.4846 9.02246L7.5002 3.78027V3.75C7.5002 2.36929 8.61949 1.25 10.0002 1.25Z",fill:"currentColor"})]})}),ix=5e3;function ox({onClose:e,onSetMessageRef:t,onFocusRef:n,showKeyboardOnMobile:r=!1}){const[i,o]=te(0),{lastMessage:a,setLastMessage:s,sendMessage:c}=Rc(),{isMicMuted:l,setIsMicMuted:d,isAudioMuted:f,setIsAudioMuted:m}=ro(),{setHasUserInteracted:g}=er(),{hasJoinedRoom:y,isAgentVideoReady:v,setIsImageChangeRequested:b}=At(),{agentData:_}=Qt(),S=Rr(),T=Xt({filter:"remote"}),[M,x]=te(""),[C,E]=te(40),[O,V]=te(!1),B=ae(null),N=ae(null),[z]=te(!1),[R,ee]=te(!1),[X,Z]=te(!1),[W,K]=te(!1),[$,U]=te(null),{isMobileDevice:ie}=ws(),le=ae(null),u=ae(null),p=_?.allow_image_edits||!1;J(()=>{t&&t(x),n&&n(()=>{B.current?.focus()})},[t,n]),J(()=>{if(!a){V(!1);return}return T.length>0&&v&&(V(!0),Z(!1)),N.current!==null&&clearTimeout(N.current),N.current=window.setTimeout(()=>{Z(!0),N.current=null},ix),()=>{N.current!==null&&(clearTimeout(N.current),N.current=null)}},[i,a,T,v]),J(()=>{if(B.current&&M){B.current.style.height="auto";const I=B.current.scrollHeight,F=Math.min(I,128);B.current.style.height=`${I}px`,E(F)}else B.current&&!M&&(B.current.style.height="40px",E(40))},[M]);const h=()=>{if(g(!0),M.trim()){const I=M.trim();x(""),c(I,S,y,T,{allowImageEdits:p,setIsImageChangeRequested:b}),p&&I.toLowerCase().startsWith("/imagine")||o(F=>F+1)}else x("")},w=I=>{const F=I.target;x(F.value)},k=I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),h())},P=async()=>{g(!0),d(!l)},D=()=>{m(!f)};return an(()=>{if(!W){U(null);return}const I=le.current,F=()=>{if(!I)return;const G=I.getBoundingClientRect();U({bottom:window.innerHeight-G.top+8,right:window.innerWidth-G.right,left:G.left,centerX:G.left+G.width/2})};return F(),window.addEventListener("scroll",F,!0),window.addEventListener("resize",F),()=>{window.removeEventListener("scroll",F,!0),window.removeEventListener("resize",F)}},[W]),J(()=>{const I=F=>{const G=F.composedPath();le.current&&G.includes(le.current)||u.current&&G.includes(u.current)||K(!1)};if(W)return document.addEventListener("click",I),()=>document.removeEventListener("click",I)},[W]),A(Fe,{children:[O&&A("div",{className:"absolute left-2 right-2 flex justify-center z-10",style:{bottom:`${C+24}px`},children:A("div",{onAnimationEnd:()=>{X&&(V(!1),Z(!1),s(""))},style:{animation:X?"fadeOutUp 0.2s ease-out forwards":"fadeInUp 0.2s ease-out forwards"},className:"mx-auto bg-black/20 backdrop-blur-xl text-white rounded-2xl px-3 py-2 text-sm text-center max-w-[90%] overflow-hidden",children:A("div",{className:"line-clamp-4",children:a})},i)}),A("div",{className:"absolute bottom-0 left-0 right-0 p-2 flex items-end gap-1 pt-4",children:[A("div",{class:"absolute w-full h-full left-0 right-0 pointer-events-none bottom-0 z-0",children:[A("div",{class:"absolute inset-0 backdrop-blur-[1px] mask-[linear-gradient(rgba(0,0,0,0),rgba(0,0,0,1)_10%,rgba(0,0,0,1)_30%,rgba(0,0,0,0)_40%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[2px] mask-[linear-gradient(rgba(0,0,0,0)_10%,rgba(0,0,0,1)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,0)_50%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[4px] mask-[linear-gradient(rgba(0,0,0,0)_15%,rgba(0,0,0,1)_30%,rgba(0,0,0,1)_50%,rgba(0,0,0,0)_60%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[8px] mask-[linear-gradient(rgba(0,0,0,0)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,0)_70%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[16px] mask-[linear-gradient(rgba(0,0,0,0)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,1)_80%,rgba(0,0,0,0)_90%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[32px] mask-[linear-gradient(rgba(0,0,0,0)_60%,rgba(0,0,0,1)_80%)]"}),A("div",{class:"absolute inset-0 z-10 backdrop-blur-[64px] mask-[linear-gradient(rgba(0,0,0,0)_70%,rgba(0,0,0,1)_100%)]"}),A("div",{class:"absolute inset-0 bg-[linear-gradient(transparent,#000000)]"})]}),A(fr.div,{className:`flex items-center w-full z-10 ${ie&&!r?"justify-between":""}`,children:[(!ie||r)&&A(fr.div,{layout:!0,className:"flex-1",children:A("div",{className:`
40
+ ${i?"cursor-pointer":""}`,onClick:i||void 0,children:[r&&A(Q1,{className:"animate-spin shrink-0",size:16}),A("p",{className:"text-sm font-medium break-words",children:e||"An error occurred. Please try again."})]})})}function tx(){const{agentData:e}=Qt(),{errorMsg:t,resetErrors:n}=io(),{resetDailyState:r,setWidgetState:i}=At(),{setIsAudioMuted:o,setIsMicMuted:a}=Nr(),s=e?.image_url,c=()=>{i(Qe),o(!0),a(!0),r(),n()};return A("div",{className:"fixed inset-0 w-full h-full flex flex-col items-center justify-center",children:[A("div",{className:"absolute w-full h-full bg-black"}),s&&A("div",{className:"absolute w-full h-full bg-cover bg-center",style:{backgroundImage:`url(${s})`,filter:"blur(25px) brightness(0.5)"}}),A(wo,{msg:t,isError:!0}),A("button",{onClick:c,className:"absolute flex items-center justify-center","aria-label":"Return to widget",children:A("span",{className:"opacity-100 hover:opacity-80 transition-opacity cursor-pointer",children:A(ex,{size:40,fill:"white",color:"none"})})})]})}const nx="/imagine",Jm=Le(void 0);function rx({children:e}){const[t,n]=te(""),[r,i]=te(""),{hasJoinedRoom:o}=At(),{hasUserInteracted:a}=er(),s=Rr(),c=Xt({filter:"remote"}),l=ae(!1),d="hello",f=j(()=>{l.current=!1},[]),m=j((y,v,b,_,S)=>{const T=y.trim();if(!T)return;const M=S?.allowImageEdits&&T.toLowerCase().startsWith(nx);b&&_.length>0?(v({event:"chat-msg",message:T,name:"Guest"},"*"),M?S?.setIsImageChangeRequested?.(!0):n(T)):M||i(T)},[n,i]);J(()=>{if(c.length>0&&o&&a&&!l.current){l.current=!0;let v;r?(n(r),v=r):v=d,s({event:"chat-msg",message:v,name:"Guest"},"*"),i("")}},[r,o,c,a,l,s,n,i]);const g=Ne(()=>({lastMessage:t,setLastMessage:n,queuedMessage:r,setQueuedMessage:i,resetInitMsg:f,sendMessage:m}),[t,r,f,m]);return A(Jm.Provider,{value:g,children:e})}function Rc(){const e=ye(Jm);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e}const ix=Ge(function({title:t,titleId:n,...r},i){return A("svg",{ref:i,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-labelledby":n,...r,children:[t?A("title",{id:n,children:t}):null,A("path",{d:"M3.33157 2.40868C3.66659 2.09013 4.19642 2.10349 4.51497 2.43851L17.0321 15.6032C17.3507 15.9382 17.3373 16.4681 17.0023 16.7866C16.6673 17.1051 16.1374 17.0918 15.8189 16.7568L3.30173 3.59208C2.98318 3.25705 2.99654 2.72722 3.33157 2.40868Z",fill:"currentColor"}),A("path",{d:"M4.6877 7.8125C5.20547 7.8125 5.6252 8.23223 5.6252 8.75C5.6252 11.1662 7.58395 13.125 10.0002 13.125C10.7088 13.125 11.3769 12.9543 11.9689 12.6553L13.301 14.0566C12.5948 14.4968 11.7951 14.8007 10.9377 14.9297V16.875H12.8127C13.3305 16.875 13.7502 17.2947 13.7502 17.8125C13.7502 18.3303 13.3305 18.75 12.8127 18.75H7.1877C6.66993 18.75 6.2502 18.3303 6.2502 17.8125C6.2502 17.2947 6.66993 16.875 7.1877 16.875H9.0627V14.9297C6.05569 14.4773 3.7502 11.8831 3.7502 8.75C3.7502 8.23223 4.16993 7.8125 4.6877 7.8125Z",fill:"currentColor"}),A("path",{d:"M15.3127 7.8125C15.8305 7.8125 16.2502 8.23223 16.2502 8.75C16.2502 9.94681 15.9127 11.0644 15.3293 12.0146L13.9709 10.5859C14.2295 10.0275 14.3752 9.4059 14.3752 8.75C14.3752 8.23223 14.7949 7.8125 15.3127 7.8125Z",fill:"currentColor"}),A("path",{d:"M10.5676 11.1826C10.3851 11.225 10.1956 11.25 10.0002 11.25C8.61949 11.25 7.5002 10.1307 7.5002 8.75V7.95508L10.5676 11.1826Z",fill:"currentColor"}),A("path",{d:"M10.0002 1.25C11.3809 1.25 12.5002 2.36929 12.5002 3.75V8.75C12.5002 8.8421 12.4943 8.93294 12.4846 9.02246L7.5002 3.78027V3.75C7.5002 2.36929 8.61949 1.25 10.0002 1.25Z",fill:"currentColor"})]})}),ox=5e3;function ax({onClose:e,onSetMessageRef:t,onFocusRef:n,showKeyboardOnMobile:r=!1}){const[i,o]=te(0),{lastMessage:a,setLastMessage:s,sendMessage:c}=Rc(),{isMicMuted:l,setIsMicMuted:d,isAudioMuted:f,setIsAudioMuted:m}=Nr(),{setHasUserInteracted:g}=er(),{hasJoinedRoom:y,isAgentVideoReady:v,setIsImageChangeRequested:b}=At(),{agentData:_}=Qt(),S=Rr(),T=Xt({filter:"remote"}),[M,x]=te(""),[C,E]=te(40),[O,V]=te(!1),B=ae(null),N=ae(null),[z]=te(!1),[R,ee]=te(!1),[X,Z]=te(!1),[W,K]=te(!1),[$,U]=te(null),{isMobileDevice:ie}=ws(),le=ae(null),u=ae(null),p=_?.allow_image_edits||!1;J(()=>{t&&t(x),n&&n(()=>{B.current?.focus()})},[t,n]),J(()=>{if(!a){V(!1);return}return T.length>0&&v&&(V(!0),Z(!1)),N.current!==null&&clearTimeout(N.current),N.current=window.setTimeout(()=>{Z(!0),N.current=null},ox),()=>{N.current!==null&&(clearTimeout(N.current),N.current=null)}},[i,a,T,v]),J(()=>{if(B.current&&M){B.current.style.height="auto";const I=B.current.scrollHeight,F=Math.min(I,128);B.current.style.height=`${I}px`,E(F)}else B.current&&!M&&(B.current.style.height="40px",E(40))},[M]);const h=()=>{if(g(!0),M.trim()){const I=M.trim();x(""),c(I,S,y,T,{allowImageEdits:p,setIsImageChangeRequested:b}),p&&I.toLowerCase().startsWith("/imagine")||o(F=>F+1)}else x("")},w=I=>{const F=I.target;x(F.value)},k=I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),h())},P=async()=>{g(!0),d(!l)},D=()=>{m(!f)};return an(()=>{if(!W){U(null);return}const I=le.current,F=()=>{if(!I)return;const G=I.getBoundingClientRect();U({bottom:window.innerHeight-G.top+8,right:window.innerWidth-G.right,left:G.left,centerX:G.left+G.width/2})};return F(),window.addEventListener("scroll",F,!0),window.addEventListener("resize",F),()=>{window.removeEventListener("scroll",F,!0),window.removeEventListener("resize",F)}},[W]),J(()=>{const I=F=>{const G=F.composedPath();le.current&&G.includes(le.current)||u.current&&G.includes(u.current)||K(!1)};if(W)return document.addEventListener("click",I),()=>document.removeEventListener("click",I)},[W]),A(Fe,{children:[O&&A("div",{className:"absolute left-2 right-2 flex justify-center z-10",style:{bottom:`${C+24}px`},children:A("div",{onAnimationEnd:()=>{X&&(V(!1),Z(!1),s(""))},style:{animation:X?"fadeOutUp 0.2s ease-out forwards":"fadeInUp 0.2s ease-out forwards"},className:"mx-auto bg-black/20 backdrop-blur-xl text-white rounded-2xl px-3 py-2 text-sm text-center max-w-[90%] overflow-hidden",children:A("div",{className:"line-clamp-4",children:a})},i)}),A("div",{className:"absolute bottom-0 left-0 right-0 p-2 flex items-end gap-1 pt-4",children:[A("div",{class:"absolute w-full h-full left-0 right-0 pointer-events-none bottom-0 z-0",children:[A("div",{class:"absolute inset-0 backdrop-blur-[1px] mask-[linear-gradient(rgba(0,0,0,0),rgba(0,0,0,1)_10%,rgba(0,0,0,1)_30%,rgba(0,0,0,0)_40%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[2px] mask-[linear-gradient(rgba(0,0,0,0)_10%,rgba(0,0,0,1)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,0)_50%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[4px] mask-[linear-gradient(rgba(0,0,0,0)_15%,rgba(0,0,0,1)_30%,rgba(0,0,0,1)_50%,rgba(0,0,0,0)_60%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[8px] mask-[linear-gradient(rgba(0,0,0,0)_20%,rgba(0,0,0,1)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,0)_70%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[16px] mask-[linear-gradient(rgba(0,0,0,0)_40%,rgba(0,0,0,1)_60%,rgba(0,0,0,1)_80%,rgba(0,0,0,0)_90%)]"}),A("div",{class:"absolute inset-0 backdrop-blur-[32px] mask-[linear-gradient(rgba(0,0,0,0)_60%,rgba(0,0,0,1)_80%)]"}),A("div",{class:"absolute inset-0 z-10 backdrop-blur-[64px] mask-[linear-gradient(rgba(0,0,0,0)_70%,rgba(0,0,0,1)_100%)]"}),A("div",{class:"absolute inset-0 bg-[linear-gradient(transparent,#000000)]"})]}),A(fr.div,{className:`flex items-center w-full z-10 ${ie&&!r?"justify-between":""}`,children:[(!ie||r)&&A(fr.div,{layout:!0,className:"flex-1",children:A("div",{className:`
41
41
  relative flex gap-0 items-center w-full bg-white/10 hover:bg-white/15 transition-colors duration-150
42
42
  rounded-[22px] shadow-lg shadow-inset-white-10 min-h-11
43
43
  ${R?"shadow-focused":"shadow-inset-white-10"}
@@ -50,19 +50,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
50
50
  `}),A("div",{className:`
51
51
  absolute right-0 bottom-0 top-0 transition-all duration-150 flex items-end p-2
52
52
  ${M.trim()?"opacity-100 blur-0 scale-100 pointer-events-auto":"opacity-0 blur-sm scale-95 pointer-events-none"}
53
- `,children:A("button",{onClick:h,className:"py-1 px-3 rounded-3xl bg-white hover:bg-white/80 cursor-pointer transition-colors h-[28px]]","aria-label":"Send message",children:A(K1,{strokeWidth:2,size:20,color:"black"})})})]})}),A(fr.div,{layout:!0,animate:{opacity:M.trim()?0:1,scale:M.trim()?.2:1,width:M.trim()?0:"auto",filter:M.trim()?"blur(20px)":"blur(0px)"},transition:{layout:{duration:.25,ease:"easeOut"},opacity:{duration:.25},width:{duration:.25,ease:"easeOut"},scale:{duration:.25,ease:"easeOut"},filter:{duration:.25}},className:`flex items-center gap-1 flex-none ${!ie||r?"pl-1":""}
54
- `,children:[A("button",{onClick:P,className:`w-11 h-11 flex-none rounded-full flex items-center justify-center backdrop-blur-xl cursor-pointer transition-colors duration-150 ${l?"bg-white/10 hover:bg-white/15 shadow-inset-white-10":"bg-white hover:bg-white/90"}`,children:l?A(rx,{className:"size-5 text-red-500"}):A(I1,{className:"size-5 text-black"})}),A("div",{className:"relative",ref:le,children:[A("button",{onClick:I=>{I.stopPropagation(),K(!W)},className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10","aria-label":"Speaker options",children:A(A1,{className:"size-5 text-white"})}),W&&$&&(()=>{const I=le.current?.getRootNode(),F=I===document?document.body:I;return jl(A("div",{ref:u,className:"fixed w-40 bg-white/10 backdrop-blur-xl rounded-2xl shadow-lg shadow-inset-white-10 z-[9999] flex flex-col p-1 gap-1",style:ie?{bottom:$.bottom,left:$.centerX,transform:"translateX(-50%)"}:{bottom:$.bottom,right:$.right},children:A("button",{onClick:()=>D(),className:"w-full px-3 py-2 flex items-center gap-3 hover:bg-white/10 transition-colors text-left rounded-xl",children:f?A(Fe,{children:[A(V1,{className:"size-5 text-white flex-shrink-0"}),A("span",{className:"text-white text-sm",children:"Speaker off"})]}):A(Fe,{children:[A(R1,{className:"size-5 text-white flex-shrink-0"}),A("span",{className:"text-white text-sm",children:"Speaker on"})]})})}),F)})()]})]}),ie&&!r&&e&&A("button",{onClick:e,className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10","aria-label":"Close",children:A(zm,{className:"size-6 text-white"})})]})]})]})}const ax=15e3,sx=2e4;function cx({hideUI:e=!1,showKeyboardOnMobile:t=!1}){const{setWidgetState:n,widgetState:r,isAgentVideoReady:i,showMinimizeButton:o,isImageChangeRequested:a,customActiveWidth:s,customActiveHeight:c,customMinimizedWidth:l,customMinimizedHeight:d,videoButtonText:f,skipWelcomeVideo:m,audioPermissionBlocked:g,retryDailyAudioRef:y}=At(),{agentData:v}=Qt(),{isAudioMuted:b,setIsAudioMuted:_,setIsMicMuted:S}=ro(),{hasUserInteracted:T,setHasUserInteracted:M}=er(),{errorMsg:x,setErrorMsg:C,nonFatalErrorMsg:E}=io(),{resetDailyState:O}=At(),V=Xt({filter:"remote"}),B=ae(null),[N,z]=te(!1),[R,ee]=te(!1),X=ae(null),{isMobileDevice:Z}=ws(),[W,K]=te(!1),$=ae(null),[U,ie]=te(!1),le=ae(null),u=ae(null),p=ae(null),[h,w]=te(!1),k=ae(null),P=ae(!1),D=v?.first_video_url,I=v?.allow_image_edits||!1;J(()=>{const Te=r===ke,rn=Te?Z?200:252:Z?120:144,Nc=Te?Z?300:377:Z?180:216,So=Te?s:l,Ym=Te?c:d,Sx=So!==null?So:rn,xx=Ym!==null?Ym:Nc,Xm=document.querySelector("lemon-slice-widget");Xm&&Xm.dispatchEvent(new CustomEvent("widget-size-change",{detail:{width:Sx,height:xx,isExpanded:Te,isMobile:Z,state:r},bubbles:!0,composed:!0}))},[r,Z,s,c,l,d]),J(()=>{(r===et||r===ke)&&B.current&&(B.current.currentTime=0,B.current.play().catch(Te=>{console.error("Error restarting video:",Te)}))},[r]),J(()=>{if(r!==ke||!T||!B.current||!b)return;const Te=B.current,rn=()=>{_(!1),Te.removeEventListener("playing",rn)};if(!Te.paused&&!Te.ended){_(!1);return}return Te.addEventListener("playing",rn),()=>{Te.removeEventListener("playing",rn)}},[r,T,b,_]),J(()=>(V.length>0&&i?(X.current!==null&&clearTimeout(X.current),X.current=window.setTimeout(()=>{ee(!0),X.current=null},300)):(ee(!1),X.current!==null&&(clearTimeout(X.current),X.current=null)),()=>{X.current!==null&&(clearTimeout(X.current),X.current=null)}),[V.length,i]),J(()=>{r===ke&&m&&M(!0)},[r,m,M]),J(()=>(V.length>0&&i&&I?(ie(!0),le.current!==null&&clearTimeout(le.current),le.current=window.setTimeout(()=>{ie(!1),le.current=null},ax)):(ie(!1),le.current!==null&&(clearTimeout(le.current),le.current=null)),()=>{le.current!==null&&(clearTimeout(le.current),le.current=null)}),[V.length,i,I]);const F=()=>{n(et),_(!0),S(!0),x&&(C(""),O()),K(!0),$.current!==null&&clearTimeout($.current),$.current=window.setTimeout(()=>{K(!1),$.current=null},3e3)},G=()=>{n(Et)},ue=()=>{n(ke),_(!1),x&&(C(""),O())},nt=V.length>0&&i,Dt=r===ke&&(!T||nt||r===ke&&!nt&&T&&!x)&&!x&&!e,In=(r===et||r===Et||r===ke&&!T&&!x)&&!(m&&r===ke),Ae=r===ke&&!R&&T&&!x;J(()=>{if(!Ae){w(!1),k.current!==null&&(clearTimeout(k.current),k.current=null),R&&(P.current=!1);return}if(P.current){w(!0);return}return k.current=window.setTimeout(()=>{P.current=!0,w(!0),k.current=null},sx),()=>{k.current!==null&&(clearTimeout(k.current),k.current=null)}},[Ae,R]);const Ze=r===ke&&R&&T&&!x,Ut=r===ke&&x&&!e,Dn=r===ke&&T&&E&&!e,hr=r===ke&&R&&U&&I&&!a&&!x&&!E&&!e&&(!Z||t),Ln=r===ke&&nt&&a&&!E&&!x&&!e;return A("div",{onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),className:`relative overflow-hidden transition-all bg-black
53
+ `,children:A("button",{onClick:h,className:"py-1 px-3 rounded-3xl bg-white hover:bg-white/80 cursor-pointer transition-colors h-[28px]]","aria-label":"Send message",children:A(Y1,{strokeWidth:2,size:20,color:"black"})})})]})}),A(fr.div,{layout:!0,animate:{opacity:M.trim()?0:1,scale:M.trim()?.2:1,width:M.trim()?0:"auto",filter:M.trim()?"blur(20px)":"blur(0px)"},transition:{layout:{duration:.25,ease:"easeOut"},opacity:{duration:.25},width:{duration:.25,ease:"easeOut"},scale:{duration:.25,ease:"easeOut"},filter:{duration:.25}},className:`flex items-center gap-1 flex-none ${!ie||r?"pl-1":""}
54
+ `,children:[A("button",{onClick:P,className:`w-11 h-11 flex-none rounded-full flex items-center justify-center backdrop-blur-xl cursor-pointer transition-colors duration-150 ${l?"bg-white/10 hover:bg-white/15 shadow-inset-white-10":"bg-white hover:bg-white/90"}`,children:l?A(ix,{className:"size-5 text-red-500"}):A(D1,{className:"size-5 text-black"})}),A("div",{className:"relative",ref:le,children:[A("button",{onClick:I=>{I.stopPropagation(),K(!W)},className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10","aria-label":"Speaker options",children:A(O1,{className:"size-5 text-white"})}),W&&$&&(()=>{const I=le.current?.getRootNode(),F=I===document?document.body:I;return jl(A("div",{ref:u,className:"fixed w-40 bg-white/10 backdrop-blur-xl rounded-2xl shadow-lg shadow-inset-white-10 z-[9999] flex flex-col p-1 gap-1",style:ie?{bottom:$.bottom,left:$.centerX,transform:"translateX(-50%)"}:{bottom:$.bottom,right:$.right},children:A("button",{onClick:()=>D(),className:"w-full px-3 py-2 flex items-center gap-3 hover:bg-white/10 transition-colors text-left rounded-xl",children:f?A(Fe,{children:[A(F1,{className:"size-5 text-white flex-shrink-0"}),A("span",{className:"text-white text-sm",children:"Speaker off"})]}):A(Fe,{children:[A(N1,{className:"size-5 text-white flex-shrink-0"}),A("span",{className:"text-white text-sm",children:"Speaker on"})]})})}),F)})()]})]}),ie&&!r&&e&&A("button",{onClick:e,className:"w-11 h-11 flex-none rounded-full flex items-center justify-center bg-white/10 hover:bg-white/15 backdrop-blur-xl cursor-pointer transition-colors duration-150 shadow-inset-white-10","aria-label":"Close",children:A(zm,{className:"size-6 text-white"})})]})]})]})}const sx=15e3,cx=2e4;function lx({hideUI:e=!1,showKeyboardOnMobile:t=!1}){const{setWidgetState:n,widgetState:r,isAgentVideoReady:i,showMinimizeButton:o,isImageChangeRequested:a,customActiveWidth:s,customActiveHeight:c,customMinimizedWidth:l,customMinimizedHeight:d,videoButtonText:f,skipWelcomeVideo:m,audioPermissionBlocked:g,retryDailyAudioRef:y}=At(),{agentData:v}=Qt(),{isAudioMuted:b,setIsAudioMuted:_,setIsMicMuted:S}=Nr(),{hasUserInteracted:T,setHasUserInteracted:M}=er(),{errorMsg:x,setErrorMsg:C,nonFatalErrorMsg:E}=io(),{resetDailyState:O}=At(),V=Xt({filter:"remote"}),B=ae(null),[N,z]=te(!1),[R,ee]=te(!1),X=ae(null),{isMobileDevice:Z}=ws(),[W,K]=te(!1),$=ae(null),[U,ie]=te(!1),le=ae(null),u=ae(null),p=ae(null),[h,w]=te(!1),k=ae(null),P=ae(!1),D=v?.first_video_url,I=v?.allow_image_edits||!1;J(()=>{const Te=r===ke,rn=Te?Z?200:252:Z?120:144,Nc=Te?Z?300:377:Z?180:216,So=Te?s:l,Xm=Te?c:d,xx=So!==null?So:rn,Tx=Xm!==null?Xm:Nc,Qm=document.querySelector("lemon-slice-widget");Qm&&Qm.dispatchEvent(new CustomEvent("widget-size-change",{detail:{width:xx,height:Tx,isExpanded:Te,isMobile:Z,state:r},bubbles:!0,composed:!0}))},[r,Z,s,c,l,d]),J(()=>{(r===Qe||r===ke)&&B.current&&(B.current.currentTime=0,B.current.play().catch(Te=>{console.error("Error restarting video:",Te)}))},[r]),J(()=>{if(r!==ke||!T||!B.current||!b)return;const Te=B.current,rn=()=>{_(!1),Te.removeEventListener("playing",rn)};if(!Te.paused&&!Te.ended){_(!1);return}return Te.addEventListener("playing",rn),()=>{Te.removeEventListener("playing",rn)}},[r,T,b,_]),J(()=>(V.length>0&&i?(X.current!==null&&clearTimeout(X.current),X.current=window.setTimeout(()=>{ee(!0),X.current=null},300)):(ee(!1),X.current!==null&&(clearTimeout(X.current),X.current=null)),()=>{X.current!==null&&(clearTimeout(X.current),X.current=null)}),[V.length,i]),J(()=>{r===ke&&m&&M(!0)},[r,m,M]),J(()=>(V.length>0&&i&&I?(ie(!0),le.current!==null&&clearTimeout(le.current),le.current=window.setTimeout(()=>{ie(!1),le.current=null},sx)):(ie(!1),le.current!==null&&(clearTimeout(le.current),le.current=null)),()=>{le.current!==null&&(clearTimeout(le.current),le.current=null)}),[V.length,i,I]);const F=()=>{n(Qe),_(!0),S(!0),x&&(C(""),O()),K(!0),$.current!==null&&clearTimeout($.current),$.current=window.setTimeout(()=>{K(!1),$.current=null},3e3)},G=()=>{n(Et)},ue=()=>{n(ke),_(!1),x&&(C(""),O())},nt=V.length>0&&i,Dt=r===ke&&(!T||nt||r===ke&&!nt&&T&&!x)&&!x&&!e,In=(r===Qe||r===Et||r===ke&&!T&&!x)&&!(m&&r===ke),Ae=r===ke&&!R&&T&&!x;J(()=>{if(!Ae){w(!1),k.current!==null&&(clearTimeout(k.current),k.current=null),R&&(P.current=!1);return}if(P.current){w(!0);return}return k.current=window.setTimeout(()=>{P.current=!0,w(!0),k.current=null},cx),()=>{k.current!==null&&(clearTimeout(k.current),k.current=null)}},[Ae,R]);const et=r===ke&&R&&T&&!x,Ut=r===ke&&x&&!e,Dn=r===ke&&T&&E&&!e,hr=r===ke&&R&&U&&I&&!a&&!x&&!E&&!e&&(!Z||t),Ln=r===ke&&nt&&a&&!E&&!x&&!e;return A("div",{onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),className:`relative overflow-hidden transition-all bg-black
55
55
  ${e?"":"rounded-3xl shadow-4xl"}
56
56
  ${r===Et?"duration-300 ease-in":"duration-300 ease-out"}
57
- ${r===ke?`${s===null?Z?"w-[200px]":"w-[252px]":""} ${c===null?Z?"h-[300px]":"h-[377px]":""}`:`${l===null?Z?"w-[120px]":"w-[144px]":""} ${d===null?Z?"h-[180px]":"h-[216px]":""}`}`,style:{...r===Et?{transform:"translateX(100%) scale(0.8, 0.5)",filter:"blur(12px)",opacity:0,pointerEvents:"none"}:{transform:"translateX(0) scale(1)",filter:"blur(0px)",opacity:1},...r===ke&&s!==null&&{width:`${s}px`},...r===ke&&c!==null&&{height:`${c}px`},...(r===et||r===Et)&&l!==null&&{width:`${l}px`},...(r===et||r===Et)&&d!==null&&{height:`${d}px`}},children:[!e&&r===ke&&!(Z&&Dt&&!t)&&A("button",{onClick:F,className:`absolute top-2 right-2 p-2 rounded-full flex items-center justify-center
57
+ ${r===ke?`${s===null?Z?"w-[200px]":"w-[252px]":""} ${c===null?Z?"h-[300px]":"h-[377px]":""}`:`${l===null?Z?"w-[120px]":"w-[144px]":""} ${d===null?Z?"h-[180px]":"h-[216px]":""}`}`,style:{...r===Et?{transform:"translateX(100%) scale(0.8, 0.5)",filter:"blur(12px)",opacity:0,pointerEvents:"none"}:{transform:"translateX(0) scale(1)",filter:"blur(0px)",opacity:1},...r===ke&&s!==null&&{width:`${s}px`},...r===ke&&c!==null&&{height:`${c}px`},...(r===Qe||r===Et)&&l!==null&&{width:`${l}px`},...(r===Qe||r===Et)&&d!==null&&{height:`${d}px`}},children:[!e&&r===ke&&!(Z&&Dt&&!t)&&A("button",{onClick:F,className:`absolute top-2 right-2 p-2 rounded-full flex items-center justify-center
58
58
  bg-gray-40/30 hover:bg-gray-40/40 backdrop-blur-xl cursor-pointer z-10 transition-colors
59
- h-11 w-11 shadow-inset-white-10`,"aria-label":"Close",children:A(zm,{className:"size-6 text-white"})}),!e&&r===et&&o&&A("button",{onClick:G,className:`
59
+ h-11 w-11 shadow-inset-white-10`,"aria-label":"Close",children:A(zm,{className:"size-6 text-white"})}),!e&&r===Qe&&o&&A("button",{onClick:G,className:`
60
60
  ${Z?"h-10 w-10":"h-11 w-11"}
61
61
  absolute cursor-pointer top-2 right-2 z-10 bg-gray-40/30 hover:bg-gray-40/40 backdrop-blur-xl transition-colors shadow-inset-white-10 transition-opacity duration-200 rounded-full flex items-center
62
62
  justify-center
63
63
  ${Z||N||W?"opacity-100":"opacity-0"}
64
- `,"aria-label":"Minimize",children:A(Q1,{strokeWidth:2,size:20,color:"white"})}),A("div",{className:"absolute inset-0 w-full h-full",children:[In&&A("video",{ref:B,src:D,className:"absolute inset-0 w-full h-full object-cover",playsInline:!0,autoPlay:!0,muted:r!==ke||b,loop:!0}),Ae&&A(z1,{isColdStart:h}),Ze&&A(e_,{}),Ze&&g&&A("button",{type:"button",onClick:()=>{y.current?.(),_(!1)},className:"absolute inset-0 z-10 flex items-center justify-center bg-black/50 backdrop-blur-sm rounded-lg text-white text-sm font-medium cursor-pointer","aria-label":"Tap to enable audio",children:"Tap to unmute"}),Ut&&A(ex,{}),Dn&&A(wo,{msg:E,isError:!0}),Ln&&A(wo,{msg:"Imagining",showSpinner:!0}),hr&&A(wo,{msg:"✨ Try /imagine",isFullWidth:!1,onClick:()=>{u.current?.("/imagine "),p.current?.()}})]}),!e&&r===et&&A("button",{onClick:ue,className:"absolute inset-0 cursor-pointer",children:[A("div",{className:"hidden sm:flex absolute inset-3 items-end justify-center",children:A("div",{className:`flex items-center gap-2 px-3 h-10
64
+ `,"aria-label":"Minimize",children:A(Z1,{strokeWidth:2,size:20,color:"white"})}),A("div",{className:"absolute inset-0 w-full h-full",children:[In&&A("video",{ref:B,src:D,className:"absolute inset-0 w-full h-full object-cover",playsInline:!0,autoPlay:!0,muted:r!==ke||b,loop:!0}),Ae&&A(W1,{isColdStart:h}),et&&A(t_,{}),et&&g&&A("button",{type:"button",onClick:()=>{y.current?.(),_(!1)},className:"absolute inset-0 z-10 flex items-center justify-center bg-black/50 backdrop-blur-sm rounded-lg text-white text-sm font-medium cursor-pointer","aria-label":"Tap to enable audio",children:"Tap to unmute"}),Ut&&A(tx,{}),Dn&&A(wo,{msg:E,isError:!0}),Ln&&A(wo,{msg:"Imagining",showSpinner:!0}),hr&&A(wo,{msg:"✨ Try /imagine",isFullWidth:!1,onClick:()=>{u.current?.("/imagine "),p.current?.()}})]}),!e&&r===Qe&&A("button",{onClick:ue,className:"absolute inset-0 cursor-pointer",children:[A("div",{className:"hidden sm:flex absolute inset-3 items-end justify-center",children:A("div",{className:`flex items-center gap-2 px-3 h-10
65
65
  bg-[var(--color-primary-action)] backdrop-blur-xl
66
66
  rounded-full transition-opacity hover:bg-[var(--color-primary-action-hover)] shadow-inset-white-20`,children:[A(Um,{className:"size-5 text-white"}),A("p",{className:"text-sm text-white whitespace-nowrap font-medium",children:f||"Video chat"})]})}),A("div",{className:"flex sm:hidden absolute inset-2 items-end justify-center",children:A("div",{className:`flex items-center gap-2 px-3 h-11
67
67
  bg-[var(--color-primary-action)] backdrop-blur-xl
68
- rounded-full transition-opacity hover:bg-[var(--color-primary-action-hover)] shadow-inset-white-20`,children:[A(Um,{className:"size-5 text-white"}),A("p",{className:"text-base text-white whitespace-nowrap font-medium",children:f||"Join"})]})})]}),Dt&&A(ox,{onClose:F,onSetMessageRef:Te=>{u.current=Te},onFocusRef:Te=>{p.current=Te},showKeyboardOnMobile:t}),A("div",{className:e?"hidden":"pointer-events-none absolute inset-0 rounded-3xl shadow-inset-white-20"})]})}function lx(){const{setWidgetState:e,widgetState:t}=At();return A("button",{onClick:()=>{e(et)},className:`fixed right-0 bottom-25 z-50 bg-black/40 rounded-l-3xl w-[36px] h-[64px] flex items-center justify-center hover:bg-black/30 transition-all duration-300 cursor-pointer backdrop-blur-xl shadow-inset-white-20 ${t===et?"opacity-0 pointer-events-none":"opacity-100"}`,"aria-label":"Open widget",children:A(Y1,{size:24,color:"white"})})}const ux="https://toinfinityai--s2v-pipecat-server-create-room.modal.run",dx="https://lemonslice.com/api";async function fx(e){const t=await fetch(`${ux}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent_id:e,ack_bot_ready:!0})});if(!t.ok)throw new Error(`Failed to create agent room: ${t.statusText}`);const n=await t.json();return"session_id"in n&&n.session_id!=null&&console.info("session_info",{session_id:n.session_id}),n}async function hx(e){const t=await fetch(`${dx}/agents/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to get agent: ${t.statusText}`);return await t.json()}function px(){return 0}function mx({agentId:e,isInline:t,hidePoweredBy:n,hideUI:r=!1,showKeyboardOnMobile:i=!1}){const{agentData:o,setAgentData:a}=Qt(),{widgetState:s,setWidgetState:c,roomUrl:l,setRoomUrl:d,isTransitioning:f,isAboutToTransition:m,hasJoinedRoom:g,setHasJoinedRoom:y,resetDailyState:v,setIsAgentVideoReady:b,setIsImageChanging:_,setIsImageChangeRequested:S,setAudioPermissionBlocked:T,retryDailyAudioRef:M}=At(),{startMaxVideoTimer:x,errorMsg:C,setErrorMsg:E,setNonFatalErrorMsg:O}=io(),{resetInitMsg:V}=Rc(),{isAudioMuted:B,isMicMuted:N}=ro(),{hasUserInteracted:z}=er(),R=kt(),ee=Rr(),X=Xt({filter:"remote"}),Z=ae(!1),W=ae(!1),K=ae(null),$=ae(null),[U,ie]=te(!1),[le,u]=te(!1);J(()=>{e&&hx(e).then(h=>{if(!h.sufficient_balance)throw new Error("Insufficient balance");a(h)}).catch(h=>{console.error("Error fetching agent data:",h)})},[e,a]),J(()=>{s===ke&&z&&!Z.current&&!l&&e&&!C&&(Z.current=!0,fx(e).then(h=>{h.room_url?d(h.room_url):E("An error occurred. Please try again.")}).catch(h=>{console.error("Error creating agent room:",h),E("An error occurred. Please try again.")}).finally(()=>{Z.current=!1}))},[s,z,e,l,C]),J(()=>{if(s!==ke||!R||!l||g||W.current)return;W.current=!0;const h=px(),w=()=>{R.join({url:l,audioSource:!0,videoSource:!1,startAudioOff:N,dailyConfig:{alwaysIncludeMicInPermissionPrompt:!1}}).then(()=>{y(!0),V()}).catch(k=>{console.error("Error joining call:",k),E("An error occurred. Please try again."),y(!1)}).finally(()=>{W.current=!1})};if(h>0){console.log(`[cold start] Delaying join by ${h}ms (from ?coldStartDelay=${h})`);const k=window.setTimeout(w,h);return()=>{window.clearTimeout(k),W.current=!1}}w()},[s,R,l,g,N]),J(()=>{R&&!g&&R.leave()},[g,R]),J(()=>(!g&&$.current&&($.current.getTracks().forEach(h=>{h.stop()}),$.current=null),()=>{$.current&&($.current.getTracks().forEach(h=>{h.stop()}),$.current=null)}),[g]),q("app-message",j(h=>{h?.data?.type==="pipecat_shutdown"&&(E("An error occurred. Please try again."),v()),h?.data?.type==="bot_ready"&&(b(!0),ee({event:"bot_ready_ack"},"*")),h?.data?.type==="gpu_error"&&(E("An error occurred. Please try again."),v()),h?.data?.type==="image_created"&&(_(!0),S(!1)),h?.data?.type==="image_change_complete"&&(_(!1),S(!1)),h?.data?.type==="image_change_error"&&(S(!1),_(!1),O("Unable to imagine"))},[ee])),q("participant-joined",j(()=>{x()},[])),q("error",j(()=>{console.error("Encountered Daily error"),E("An error occurred. Please try again.")},[])),q("participant-left",j(()=>{!C&&g&&(console.error("Agent left the call"),c(et),v())},[g])),q("network-connection",j(h=>{if(!h)return;const w=h.type,k=h.event;k==="connected"?w==="peer-to-peer"||w==="sfu"?ie(!1):w==="signaling"&&u(!1):k==="interrupted"&&(w==="peer-to-peer"||w==="sfu"?ie(!0):w==="signaling"&&u(!0))},[])),J(()=>{O(le?"Network issues.":U?"Poor connection.":"")},[U,le]);const p=j(h=>{const w=new Date().toISOString();if(console.error("DailyAudio play failed:",{name:h?.name,message:h?.message,sessionId:h?.sessionId,type:h?.type,timestamp:w,full:h}),h?.name==="NotAllowedError"){T(!0);return}E("An error occurred. Please try again.")},[E,T]);return J(()=>(M.current=()=>{T(!1),R&&navigator.mediaDevices?.getUserMedia({audio:!0})?.then(w=>{const k=w.getAudioTracks()[0];k&&typeof R.updateInputSettings=="function"?($.current&&$.current.getTracks().forEach(P=>{P.stop()}),$.current=w,R.updateInputSettings({audio:{settings:{customTrack:k}}}).catch(P=>console.warn("updateInputSettings(audio) failed:",P))):w.getTracks().forEach(P=>{P.stop()})}).catch(w=>console.warn("getUserMedia(audio) in retry failed:",w));const h=K.current?.getAllAudio?.();if(h?.length){const w=h.filter(k=>k).map(k=>(k.muted=!1,k.play()));Promise.allSettled(w).then(k=>{const P=k.every(D=>D.status==="rejected");T(P)})}},()=>{M.current=null}),[M,T,R]),J(()=>{if(K.current){const h=K.current.getAllAudio();h&&h.length>0&&h.forEach(w=>{w&&(w.muted=B)})}},[B,X.length]),J(()=>{const h=()=>{v()};return window.addEventListener("beforeunload",h),()=>{window.removeEventListener("beforeunload",h),v(),$.current&&($.current.getTracks().forEach(w=>{w.stop()}),$.current=null)}},[]),o?A("div",{className:t?"":"fixed bottom-5 right-5 z-1000 flex flex-col items-end",children:[!r&&(s===Et||f||m)&&A(lx,{}),(s===ke||s===et||f||m)&&A(cx,{hideUI:r,showKeyboardOnMobile:i}),A("div",{className:"fixed bottom-[6px] right-5 text-right text-[8px] text-white mix-blend-difference transition-opacity duration-150 shadow-2xs pr-[4px]",style:{visibility:!t&&!n&&!r&&s!==Et?"visible":"hidden"},children:["Powered by"," ",A("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Lemon Slice"})]}),A(Ff,{ref:K,onPlayFailed:p})]}):null}const gx=Le(void 0);function vx({children:e,agentId:t,onAPIReady:n}){const r=Rr(),{isAudioMuted:i,setIsAudioMuted:o,isMicMuted:a,setIsMicMuted:s}=ro(),{widgetState:c,setWidgetState:l,hasJoinedRoom:d,setIsImageChangeRequested:f}=At(),{setHasUserInteracted:m}=er(),{sendMessage:g}=Rc(),{agentData:y}=Qt(),v=Xt({filter:"remote"}),b=j(()=>{m(!0),c!==ke&&l(ke)},[c,m,l]),_=j(async()=>{o(!0)},[o]),S=j(async()=>{o(!1)},[o]),T=j(()=>i,[i]),M=j(()=>!0,[]),x=j(async()=>{b(),s(!1)},[b,s]),C=j(async()=>{s(!0)},[s]),E=j(()=>!a,[a]),O=j(()=>!0,[]),V=j(async z=>{if(!z.trim())throw new Error("Message cannot be empty");const R=z.trim();b(),g(R,r,d,v,{allowImageEdits:y?.allow_image_edits||!1,setIsImageChangeRequested:f})},[b,r,g,d,v,y,f]),B=Ne(()=>({mute:_,unmute:S,isMuted:T,canUnmute:M,micOn:x,micOff:C,isMicOn:E,canTurnOnMic:O,sendMessage:V}),[_,S,T,M,x,C,E,O,V]),N=ae(n);return J(()=>{N.current=n},[n]),J(()=>{N.current&&N.current(B)},[B]),A(gx.Provider,{value:{api:B},children:e})}function ko(e){if(e==null||e==="")return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=Number(e);return Number.isFinite(t)?t:null}const qm="#919191",yx=.3,bx=.1;function _x(e,t){if(e==null||e==="")return t;const n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function Gm(e){if(typeof e!="string")return null;const n=e.trim().match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(!n)return null;let r=n[1];r.length===3&&(r=r.split("").map(s=>s+s).join(""));const i=parseInt(r.slice(0,2),16),o=parseInt(r.slice(2,4),16),a=parseInt(r.slice(4,6),16);return[i,o,a].some(s=>Number.isNaN(s))?null:{r:i,g:o,b:a}}function wx(e={}){const t=e["agent-id"]||void 0,[n,r]=te(null),i=e.inline,o=i==="true"||i===""||i===!0,a=e["show-minimize-button"],s=a===void 0||a==="true"||a===""||a===!0,c=e["initial-state"],l=c==="active"||c==="minimized"||c==="hidden"?c:"minimized",d=e["controlled-widget-state"],f=d==="active"||d==="minimized"||d==="hidden"?d:null,m=e["controlled-show-minimize-button"],g=m===void 0?null:m==="true"||m===""||m===!0,y=ko(e["custom-active-width"]),v=ko(e["custom-active-height"]),b=ko(e["custom-minimized-width"]),_=ko(e["custom-minimized-height"]),S=typeof e["video-button-color-hex"]=="string"?e["video-button-color-hex"].trim():"",T=Gm(qm),M=Gm(S||qm)??T,x=_x(e["video-button-color-opacity"],yx),C=Math.max(0,Math.min(1,x-bx)),E=e["hide-powered-by"],O=E==="true"||E===""||E===!0,V=e["hide-ui"],B=V==="true"||V===""||V===!0,N=e["skip-welcome-video"],z=N==="true"||N===""||N===!0,R=e["show-keyboard-on-mobile"],ee=R==="true"||R===""||R===!0,X=typeof e["video-button-text"]=="string"?e["video-button-text"].trim():null,Z=`rgba(${M.r}, ${M.g}, ${M.b}, ${x})`,W=`rgba(${M.r}, ${M.g}, ${M.b}, ${C})`,K={"--color-primary-action":Z,"--color-primary-action-hover":W},$=Ne(()=>Or.createCallObject({videoSource:!1,audioSource:!0}),[]),U=ae(null);return J(()=>{U.current=n},[n]),J(()=>{if(!n)return;const ie=()=>{const u=document.querySelectorAll("lemon-slice-widget");let p=null;for(const h of u){const w=h.getAttribute("agent-id");if((w===t||!w&&!t&&!p)&&(p=h,w===t))break}!p&&u.length>0&&(p=u[0]),p&&(p.mute=()=>U.current?.mute(),p.unmute=()=>U.current?.unmute(),p.isMuted=()=>U.current?.isMuted()??!1,p.canUnmute=()=>U.current?.canUnmute()??!1,p.micOn=()=>U.current?.micOn(),p.micOff=()=>U.current?.micOff(),p.isMicOn=()=>U.current?.isMicOn()??!1,p.canTurnOnMic=()=>U.current?.canTurnOnMic()??!1,p.sendMessage=h=>U.current?.sendMessage(h))};ie();const le=setTimeout(ie,100);return()=>clearTimeout(le)},[!!n,t]),J(()=>()=>{if($){try{const ie=$.meetingState();(ie==="joined-meeting"||ie==="joining-meeting")&&$.leave()}catch{}try{$.destroy()}catch(ie){console.error("Error destroying call object:",ie)}}},[$]),A("div",{translate:!1,style:K,children:A(Y0,{children:A(X0,{children:A(J0,{children:A(V0,{callObject:$,children:A(G0,{showMinimizeButton:s,initialState:l,controlledWidgetState:f,controlledShowMinimizeButton:g,customActiveWidth:y,customActiveHeight:v,customMinimizedWidth:b,customMinimizedHeight:_,videoButtonText:X,skipWelcomeVideo:z,children:A(Z0,{children:A(K0,{children:A(nx,{children:A(vx,{agentId:t,onAPIReady:ie=>{r(ie)},children:[A(H0,{}),A(mx,{agentId:t,isInline:o,hidePoweredBy:O,hideUI:B,showKeyboardOnMobile:ee})]})})})})})})})})})})}const kx=["agent-id","inline","show-minimize-button","initial-state","controlled-widget-state","controlled-show-minimize-button","custom-active-width","custom-active-height","custom-minimized-width","custom-minimized-height","video-button-color-hex","video-button-color-opacity","video-button-text","hide-powered-by","hide-ui","show-keyboard-on-mobile"];function Km(e="lemon-slice-widget"){ag(wx,e,kx,{shadow:!0,mode:"open"})}return Km(),xo.registerWidget=Km,Object.defineProperty(xo,Symbol.toStringTag,{value:"Module"}),xo})({});
68
+ rounded-full transition-opacity hover:bg-[var(--color-primary-action-hover)] shadow-inset-white-20`,children:[A(Um,{className:"size-5 text-white"}),A("p",{className:"text-base text-white whitespace-nowrap font-medium",children:f||"Join"})]})})]}),Dt&&A(ax,{onClose:F,onSetMessageRef:Te=>{u.current=Te},onFocusRef:Te=>{p.current=Te},showKeyboardOnMobile:t}),A("div",{className:e?"hidden":"pointer-events-none absolute inset-0 rounded-3xl shadow-inset-white-20"})]})}function ux(){const{setWidgetState:e,widgetState:t}=At();return A("button",{onClick:()=>{e(Qe)},className:`fixed right-0 bottom-25 z-50 bg-black/40 rounded-l-3xl w-[36px] h-[64px] flex items-center justify-center hover:bg-black/30 transition-all duration-300 cursor-pointer backdrop-blur-xl shadow-inset-white-20 ${t===Qe?"opacity-0 pointer-events-none":"opacity-100"}`,"aria-label":"Open widget",children:A(X1,{size:24,color:"white"})})}const dx="https://toinfinityai--s2v-pipecat-server-create-room.modal.run",fx="https://lemonslice.com/api";class qm extends Error{constructor(){super("Pipecat rate limited"),this.name="PipecatRateLimitedError"}}async function hx(e){const t=await fetch(`${dx}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agent_id:e,ack_bot_ready:!0})});if(!t.ok)throw t.status===429?new qm:new Error(`Failed to create agent room: ${t.statusText}`);const n=await t.json();return"session_id"in n&&n.session_id!=null&&console.info("session_info",{session_id:n.session_id}),n}async function px(e){const t=await fetch(`${fx}/agents/${e}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to get agent: ${t.statusText}`);return await t.json()}function mx(){return 0}function gx({agentId:e,isInline:t,hidePoweredBy:n,hideUI:r=!1,showKeyboardOnMobile:i=!1}){const{agentData:o,setAgentData:a}=Qt(),{widgetState:s,setWidgetState:c,roomUrl:l,setRoomUrl:d,isTransitioning:f,isAboutToTransition:m,hasJoinedRoom:g,setHasJoinedRoom:y,resetDailyState:v,setIsAgentVideoReady:b,setIsImageChanging:_,setIsImageChangeRequested:S,setAudioPermissionBlocked:T,retryDailyAudioRef:M}=At(),{startMaxVideoTimer:x,errorMsg:C,setErrorMsg:E,setNonFatalErrorMsg:O}=io(),{resetInitMsg:V}=Rc(),{isAudioMuted:B,isMicMuted:N}=Nr(),{hasUserInteracted:z}=er(),R=kt(),ee=Rr(),X=Xt({filter:"remote"}),Z=ae(!1),W=ae(!1),K=ae(null),$=ae(null),[U,ie]=te(!1),[le,u]=te(!1);J(()=>{e&&px(e).then(h=>{if(!h.sufficient_balance)throw new Error("Insufficient balance");a(h)}).catch(h=>{console.error("Error fetching agent data:",h)})},[e,a]),J(()=>{s===ke&&z&&!Z.current&&!l&&e&&!C&&(Z.current=!0,hx(e).then(h=>{h.room_url?d(h.room_url):E("An error occurred. Please try again.")}).catch(h=>{console.error("Error creating agent room:",h),h instanceof qm?E("This agent is currently busy. Please try again in a few minutes."):E("An error occurred. Please try again.")}).finally(()=>{Z.current=!1}))},[s,z,e,l,C]),J(()=>{if(s!==ke||!R||!l||g||W.current)return;W.current=!0;const h=mx(),w=()=>{R.join({url:l,audioSource:!0,videoSource:!1,startAudioOff:N,dailyConfig:{alwaysIncludeMicInPermissionPrompt:!1}}).then(()=>{y(!0),V()}).catch(k=>{console.error("Error joining call:",k),E("An error occurred. Please try again."),y(!1)}).finally(()=>{W.current=!1})};if(h>0){console.log(`[cold start] Delaying join by ${h}ms (from ?coldStartDelay=${h})`);const k=window.setTimeout(w,h);return()=>{window.clearTimeout(k),W.current=!1}}w()},[s,R,l,g,N]),J(()=>{R&&!g&&R.leave()},[g,R]),J(()=>(!g&&$.current&&($.current.getTracks().forEach(h=>{h.stop()}),$.current=null),()=>{$.current&&($.current.getTracks().forEach(h=>{h.stop()}),$.current=null)}),[g]),q("app-message",j(h=>{h?.data?.type==="pipecat_shutdown"&&(E("An error occurred. Please try again."),v()),h?.data?.type==="bot_ready"&&(b(!0),ee({event:"bot_ready_ack"},"*")),h?.data?.type==="gpu_error"&&(E("An error occurred. Please try again."),v()),h?.data?.type==="image_created"&&(_(!0),S(!1)),h?.data?.type==="image_change_complete"&&(_(!1),S(!1)),h?.data?.type==="image_change_error"&&(S(!1),_(!1),O("Unable to imagine"))},[ee])),q("participant-joined",j(()=>{x()},[])),q("error",j(()=>{console.error("Encountered Daily error"),E("An error occurred. Please try again.")},[])),q("participant-left",j(()=>{!C&&g&&(console.error("Agent left the call"),c(Qe),v())},[g])),q("network-connection",j(h=>{if(!h)return;const w=h.type,k=h.event;k==="connected"?w==="peer-to-peer"||w==="sfu"?ie(!1):w==="signaling"&&u(!1):k==="interrupted"&&(w==="peer-to-peer"||w==="sfu"?ie(!0):w==="signaling"&&u(!0))},[])),J(()=>{O(le?"Network issues.":U?"Poor connection.":"")},[U,le]);const p=j(h=>{const w=new Date().toISOString();if(console.error("DailyAudio play failed:",{name:h?.name,message:h?.message,sessionId:h?.sessionId,type:h?.type,timestamp:w,full:h}),h?.name==="NotAllowedError"){T(!0);return}E("An error occurred. Please try again.")},[E,T]);return J(()=>(M.current=()=>{T(!1),R&&navigator.mediaDevices?.getUserMedia({audio:!0})?.then(w=>{const k=w.getAudioTracks()[0];k&&typeof R.updateInputSettings=="function"?($.current&&$.current.getTracks().forEach(P=>{P.stop()}),$.current=w,R.updateInputSettings({audio:{settings:{customTrack:k}}}).catch(P=>console.warn("updateInputSettings(audio) failed:",P))):w.getTracks().forEach(P=>{P.stop()})}).catch(w=>console.warn("getUserMedia(audio) in retry failed:",w));const h=K.current?.getAllAudio?.();if(h?.length){const w=h.filter(k=>k).map(k=>(k.muted=!1,k.play()));Promise.allSettled(w).then(k=>{const P=k.every(D=>D.status==="rejected");T(P)})}},()=>{M.current=null}),[M,T,R]),J(()=>{if(K.current){const h=K.current.getAllAudio();h&&h.length>0&&h.forEach(w=>{w&&(w.muted=B)})}},[B,X.length]),J(()=>{const h=()=>{v()};return window.addEventListener("beforeunload",h),()=>{window.removeEventListener("beforeunload",h),v(),$.current&&($.current.getTracks().forEach(w=>{w.stop()}),$.current=null)}},[]),o?A("div",{className:t?"":"fixed bottom-5 right-5 z-1000 flex flex-col items-end",children:[!r&&(s===Et||f||m)&&A(ux,{}),(s===ke||s===Qe||f||m)&&A(lx,{hideUI:r,showKeyboardOnMobile:i}),A("div",{className:"fixed bottom-[6px] right-5 text-right text-[8px] text-white mix-blend-difference transition-opacity duration-150 shadow-2xs pr-[4px]",style:{visibility:!t&&!n&&!r&&s!==Et?"visible":"hidden"},children:["Powered by"," ",A("a",{href:"https://lemonslice.com",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Lemon Slice"})]}),A(Ff,{ref:K,onPlayFailed:p})]}):null}const vx=Le(void 0);function yx({children:e,agentId:t,onAPIReady:n}){const r=Rr(),{isAudioMuted:i,setIsAudioMuted:o,isMicMuted:a,setIsMicMuted:s}=Nr(),{widgetState:c,setWidgetState:l,hasJoinedRoom:d,setIsImageChangeRequested:f}=At(),{setHasUserInteracted:m}=er(),{sendMessage:g}=Rc(),{agentData:y}=Qt(),v=Xt({filter:"remote"}),b=j(()=>{m(!0),c!==ke&&l(ke)},[c,m,l]),_=j(async()=>{o(!0)},[o]),S=j(async()=>{o(!1)},[o]),T=j(()=>i,[i]),M=j(()=>!0,[]),x=j(async()=>{b(),s(!1)},[b,s]),C=j(async()=>{s(!0)},[s]),E=j(()=>!a,[a]),O=j(()=>!0,[]),V=j(async z=>{if(!z.trim())throw new Error("Message cannot be empty");const R=z.trim();b(),g(R,r,d,v,{allowImageEdits:y?.allow_image_edits||!1,setIsImageChangeRequested:f})},[b,r,g,d,v,y,f]),B=Ne(()=>({mute:_,unmute:S,isMuted:T,canUnmute:M,micOn:x,micOff:C,isMicOn:E,canTurnOnMic:O,sendMessage:V}),[_,S,T,M,x,C,E,O,V]),N=ae(n);return J(()=>{N.current=n},[n]),J(()=>{N.current&&N.current(B)},[B]),A(vx.Provider,{value:{api:B},children:e})}function ko(e){if(e==null||e==="")return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=Number(e);return Number.isFinite(t)?t:null}const Gm="#919191",bx=.3,_x=.1;function wx(e,t){if(e==null||e==="")return t;const n=typeof e=="number"?e:Number(e);return Number.isFinite(n)?Math.min(1,Math.max(0,n)):t}function Km(e){if(typeof e!="string")return null;const n=e.trim().match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);if(!n)return null;let r=n[1];r.length===3&&(r=r.split("").map(s=>s+s).join(""));const i=parseInt(r.slice(0,2),16),o=parseInt(r.slice(2,4),16),a=parseInt(r.slice(4,6),16);return[i,o,a].some(s=>Number.isNaN(s))?null:{r:i,g:o,b:a}}function kx(e={}){const t=e["agent-id"]||void 0,[n,r]=te(null),i=e.inline,o=i==="true"||i===""||i===!0,a=e["show-minimize-button"],s=a===void 0||a==="true"||a===""||a===!0,c=e["initial-state"],l=c==="active"||c==="minimized"||c==="hidden"?c:"minimized",d=e["controlled-widget-state"],f=d==="active"||d==="minimized"||d==="hidden"?d:null,m=e["controlled-show-minimize-button"],g=m===void 0?null:m==="true"||m===""||m===!0,y=ko(e["custom-active-width"]),v=ko(e["custom-active-height"]),b=ko(e["custom-minimized-width"]),_=ko(e["custom-minimized-height"]),S=typeof e["video-button-color-hex"]=="string"?e["video-button-color-hex"].trim():"",T=Km(Gm),M=Km(S||Gm)??T,x=wx(e["video-button-color-opacity"],bx),C=Math.max(0,Math.min(1,x-_x)),E=e["hide-powered-by"],O=E==="true"||E===""||E===!0,V=e["hide-ui"],B=V==="true"||V===""||V===!0,N=e["skip-welcome-video"],z=N==="true"||N===""||N===!0,R=e["show-keyboard-on-mobile"],ee=R==="true"||R===""||R===!0,X=typeof e["video-button-text"]=="string"?e["video-button-text"].trim():null,Z=`rgba(${M.r}, ${M.g}, ${M.b}, ${x})`,W=`rgba(${M.r}, ${M.g}, ${M.b}, ${C})`,K={"--color-primary-action":Z,"--color-primary-action-hover":W},$=Ne(()=>Or.createCallObject({videoSource:!1,audioSource:!0}),[]),U=ae(null);return J(()=>{U.current=n},[n]),J(()=>{if(!n)return;const ie=()=>{const u=document.querySelectorAll("lemon-slice-widget");let p=null;for(const h of u){const w=h.getAttribute("agent-id");if((w===t||!w&&!t&&!p)&&(p=h,w===t))break}!p&&u.length>0&&(p=u[0]),p&&(p.mute=()=>U.current?.mute(),p.unmute=()=>U.current?.unmute(),p.isMuted=()=>U.current?.isMuted()??!1,p.canUnmute=()=>U.current?.canUnmute()??!1,p.micOn=()=>U.current?.micOn(),p.micOff=()=>U.current?.micOff(),p.isMicOn=()=>U.current?.isMicOn()??!1,p.canTurnOnMic=()=>U.current?.canTurnOnMic()??!1,p.sendMessage=h=>U.current?.sendMessage(h))};ie();const le=setTimeout(ie,100);return()=>clearTimeout(le)},[!!n,t]),J(()=>()=>{if($){try{const ie=$.meetingState();(ie==="joined-meeting"||ie==="joining-meeting")&&$.leave()}catch{}try{$.destroy()}catch(ie){console.error("Error destroying call object:",ie)}}},[$]),A("div",{translate:!1,style:K,children:A(X0,{children:A(Q0,{children:A(q0,{children:A(F0,{callObject:$,children:A(K0,{showMinimizeButton:s,initialState:l,controlledWidgetState:f,controlledShowMinimizeButton:g,customActiveWidth:y,customActiveHeight:v,customMinimizedWidth:b,customMinimizedHeight:_,videoButtonText:X,skipWelcomeVideo:z,children:A(e_,{children:A(Y0,{children:A(rx,{children:A(yx,{agentId:t,onAPIReady:ie=>{r(ie)},children:[A(J0,{}),A(gx,{agentId:t,isInline:o,hidePoweredBy:O,hideUI:B,showKeyboardOnMobile:ee})]})})})})})})})})})})}const Sx=["agent-id","inline","show-minimize-button","initial-state","controlled-widget-state","controlled-show-minimize-button","custom-active-width","custom-active-height","custom-minimized-width","custom-minimized-height","video-button-color-hex","video-button-color-opacity","video-button-text","hide-powered-by","hide-ui","show-keyboard-on-mobile"];function Ym(e="lemon-slice-widget"){sg(kx,e,Sx,{shadow:!0,mode:"open"})}return Ym(),xo.registerWidget=Ym,Object.defineProperty(xo,Symbol.toStringTag,{value:"Module"}),xo})({});