PageSourceSearch

https://talex.ai/_next/static/chunks/11be2572.5c28b41f4a951cbf.js

js talex.ai collected 2026-10-05 14:25:58 UTC 233,626 bytes, 4 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5b8adc2c-bfb9-450b-9cbb-172bd0fbaead",e._sentryDebugIdIdentifier="sentry-dbid-5b8adc2c-bfb9-450b-9cbb-172bd0fbaead")}catch(e){}{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:talex-website":!0})}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5150],{65273:(e,t,r)=>{let n,i,a,s,o,c,l,u;function d(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function h(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function g(e,t,r){return t&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e,t){if(t&&("object"==p(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}function k(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S(e,t,r,n,i,a,s){try{var o=e[a](s),c=o.value}catch(e){return void r(e)}o.done?t(c):Promise.resolve(c).then(n,i)}function w(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function s(e){S(a,n,i,s,o,"next",e)}function o(e){S(a,n,i,s,o,"throw",e)}s(void 0)})}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,s,o=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?M(e,t):void 0}}
1(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}r.d(t,{Ay:()=>id});var E,T,O={exports:{}},P=function(){if(T)return O.exports;T=1;var e,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}O.exports=i,O.exports.once=function(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}f(e,t,a,{once:!0}),"error"!==t&&"function"==typeof e.on&&f(e,"error",i,{once:!0})})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function o(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,a,c;if(s(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),c=a[t]),void 0===c)c=a[t]=r,++e._eventsCount;else if("function"==typeof c?c=a[t]=n?[r,c]:[c,r]:n?c.unshift(r):c.push(r),(i=o(e))>0&&c.length>i&&!c.warned){c.warned=!0;var l=Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=c.length,console&&console.warn&&console.warn(l)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function f(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(a){n.once&&e.removeEventListener(t,i),r(a)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
1,set:function(e){if("number"!=typeof e||e<0||n(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return o(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var s,o=Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,u=p(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return c(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return c(this,e,t,!0)},i.prototype.once=function(e,t){return s(t),this.on(e,u(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,u(this,e,t)),this},i.prototype.removeListener=function(e,t){var r,n,i,a,o;if(s(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)"removeListener"!==(i=a[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]},O.exports}(),A=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(P),j=Object.prototype.hasOwnProperty;function I(e,t,r){for(r of e.keys())if(x(r,t))return r}function x(e,t){var r,n,i;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((n=e.length)===t.length)for(;n--&&x(e[n],t[n]););return -1===n}if(r===Set){if(e.size!==t.size)return!1;for(n of e)if((i=n)&&"object"==typeof i&&!(i=I(t,i))||!t.has(i))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(n of e)if((i=n[0])&&"object"==typeof i&&!(i=I(t,i))||!x(n[1],t.get(i)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((n=e.byteLength)===t.byteLength)for(;n--&&e.getInt8(n)===t.getInt8(n););return -1===n}if(ArrayBuffer.isView(e)){if((n=e.byteLength)===t.byteLength)for(;n--&&e[n]===t[n];);return -1===n}if(!r||"object"==typeof e){for(r in n=0,e)if(j.call(e,r)&&++n&&!j.call(t,r)||!(r in t)||!x(e[r],t[r]))return!1;return Object.keys(t).length===n}}return e!=e&&t!=t}let L={"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"},D={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"},N={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},F={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"},R={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class B{static getFirstMatch(e,t){let r=t.match(e);return r&&r.length>0&&r[1]||""}static getSecondMatch(e,t){let r=t.match(e);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(e,t,r){if(e.test(t))return r}
1static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){let t=e.split(".").splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),10===t[0])switch(t[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(e){let t=e.split(".").splice(0,2).map(e=>parseInt(e,10)||0);if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,r=!1){let n=B.getVersionPrecision(e),i=B.getVersionPrecision(t),a=Math.max(n,i),s=0,o=B.map([e,t],e=>{let t=a-B.getVersionPrecision(e),r=e+Array(t+1).join(".0");return B.map(r.split("."),e=>Array(20-e.length).join("0")+e).reverse()});for(r&&(s=a-Math.min(n,i)),a-=1;a>=s;){if(o[0][a]>o[1][a])return 1;if(o[0][a]===o[1][a]){if(a===s)return 0;a-=1}else if(o[0][a]<o[1][a])return -1}}static map(e,t){let r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){let n=e[r];if(t(n,r))return n}}static assign(e,...t){let r,n;if(Object.assign)return Object.assign(e,...t);for(r=0,n=t.length;r<n;r+=1){let n=t[r];"object"==typeof n&&null!==n&&Object.keys(n).forEach(t=>{e[t]=n[t]})}return e}static getBrowserAlias(e){return L[e]}static getBrowserTypeByAlias(e){return D[e]||""}}let V=/version\/(\d+(\.?_?\d+)+)/i,U=[{test:[/googlebot/i],describe(e){let t={name:"Googlebot"},r=B.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/opera/i],describe(e){let t={name:"Opera"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe(e){let t={name:"Opera"},r=B.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:"Samsung Internet for Android"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe(e){let t={name:"NAVER Whale Browser"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe(e){let t={name:"MZ Browser"},r=B.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/focus/i],describe(e){let t={name:"Focus"},r=B.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/swing/i],describe(e){let t={name:"Swing"},r=B.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/coast/i],describe(e){let t={name:"Opera Coast"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:"Opera Touch"},r=B.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe(e){let t={name:"Yandex Browser"},r=B.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe(e){let t={name:"UC Browser"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:"Maxthon"}
1,r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe(e){let t={name:"Epiphany"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe(e){let t={name:"Puffin"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe(e){let t={name:"Sleipnir"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe(e){let t={name:"K-Meleon"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe(e){let t={name:"WeChat"},r=B.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=B.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe(e){let t={name:"Internet Explorer"},r=B.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe(e){let t={name:"Microsoft Edge"},r=B.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:"Microsoft Edge"},r=B.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe(e){let t={name:"Vivaldi"},r=B.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe(e){let t={name:"SeaMonkey"},r=B.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe(e){let t={name:"Sailfish"},r=B.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe(e){let t={name:"Amazon Silk"},r=B.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe(e){let t={name:"PhantomJS"},r=B.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe(e){let t={name:"SlimerJS"},r=B.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:"BlackBerry"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:"WebOS Browser"},r=B.getFirstMatch(V,e)||B.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe(e){let t={name:"Bada"},r=B.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe(e){let t={name:"Tizen"},r=B.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe(e){let t={name:"QupZilla"},r=B.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:"Firefox"},r=B.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe(e){let t={name:"Electron"},r=B.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:"Miui"},r=B.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe(e){let t={name:"Chromium"},r=B.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:"Chrome"},r=B.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe(e){let t={name:"Google Search"},r=B.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test(e){let t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe(e){let t={name:"Android Browser"},r=B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe(e){let t={name:"PlayStation 4"},r=B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:"Safari"},r=B.getFirstMatch(V,e);return r&&(t.version=r),t}},{test:[/.*/i],describe(e){let t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:B.getFirstMatch(t,e),version:B.getSecondMatch(t,e)}}}];var J=[{test:[/Roku\/DVP/],describe(e){let t=B.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:F.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=B.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:F.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=B.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=B.getWindowsVersionName(t);return{name:F.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:F.iOS},r=B.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe(e){let t=B.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=B.getMacOSVersionName(t),n={name:F.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=B.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:F.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe(e){let t=B.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=B.getAndroidVersionName(t),n={name:F.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=B.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:F.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=B.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||B.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||B.getFirstMatch(/\bbb(\d+)/i,e);return{name:F.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=B.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:F.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=B.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:F.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:F.Linux})},{test:[/CrOS/],describe:()=>({name:F.ChromeOS})},{test:[/PlayStation 4/],describe(e){let t=B.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);
1return{name:F.PlayStation4,version:t}}}],q=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){let t=B.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:N.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:N.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:N.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:N.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:N.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:N.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:N.tablet})},{test(e){let t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe(e){let t=B.getFirstMatch(/(ipod|iphone)/i,e);return{type:N.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:N.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:N.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:N.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:N.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:N.mobile,vendor:"Microsoft"})},{test(e){let t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:N.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:N.mobile})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:N.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:N.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:N.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:N.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:N.tv})}],z=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:R.Blink};let t=B.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:R.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:R.Trident},r=B.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:e=>e.test(/presto/i),describe(e){let t={name:R.Presto},r=B.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test(e){let t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe(e){let t={name:R.Gecko},r=B.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:R.Blink})},{test:[/(apple)?webkit/i],describe(e){let t={name:R.WebKit},r=B.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];class ${constructor(e,t=!1){if(null==e||""===e)throw Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=B.find(U,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=B.find(J,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};let e=B.find(q,e=>
1{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let e=B.find(z,e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some(e=>this.test(e));throw Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return B.assign({},this.parsedResult)}satisfies(e){let t={},r=0,n={},i=0;if(Object.keys(e).forEach(a=>{let s=e[a];"string"==typeof s?(n[a]=s,i+=1):"object"==typeof s&&(t[a]=s,r+=1)}),r>0){let e=Object.keys(t),r=B.find(e,e=>this.isOS(e));if(r){let e=this.satisfies(t[r]);if(void 0!==e)return e}let n=B.find(e,e=>this.isPlatform(e));if(n){let e=this.satisfies(t[n]);if(void 0!==e)return e}}if(i>0){let e=Object.keys(n),t=B.find(e,e=>this.isBrowser(e,!0));if(void 0!==t)return this.compareVersion(n[t])}}isBrowser(e,t=!1){let r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=B.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r}compareVersion(e){let t=[0],r=e,n=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(B.compareVersions(i,r,n))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(e=>this.is(e))}}class W{static getParser(e,t=!1){if("string"!=typeof e)throw Error("UserAgent should be a string");return new $(e,t)}static parse(e){return new $(e).getResult()}static get BROWSER_MAP(){return D}static get ENGINE_MAP(){return R}static get OS_MAP(){return F}static get PLATFORMS_MAP(){return N}}function H(){return Date.now()+Math.random().toString()}function Q(){throw Error("Method must be implemented in subclass")}function G(e,t){return null!=t&&t.proxyUrl?t.proxyUrl+("/"===t.proxyUrl.slice(-1)?"":"/")+e.substring(8):e}function K(e){return null!=e&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:G("https://c.daily.co/call-machine/versioned/".concat("0.83.1","/static/call-machine-object-bundle.js"),e)}function Y(e){try{new URL(e)}catch(e){return!1}return!0}let X="8.55.0",Z=globalThis;function ee(e,t,r){let n=r||Z,i=n.__SENTRY__=n.__SENTRY__||{},a=i[X]=i[X]||{};return a[e]||(a[e]=t())}let et=["debug","info","warn","error","log","assert","trace"],er={};function en(e){if(!("console"in Z))return e();let t=Z.console,r={},n=Object.keys(er);n.forEach(e=>{let n=er[e];r[e]=t[e],t[e]=n});try{return e()}finally{n.forEach(e=>{t[e]=r[e]})}}let ei=ee("logger",function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return et.forEach(e=>{t[e]=()=>{}}),t}),ea=/\(error: (.*)\)/,es=/captureMessage|captureException/;function eo(e){return e[e.length-1]||{}}let ec="<anonymous>";function el(e){try{return e&&"function"==typeof e&&e.name||ec}catch(e){return ec}}function eu(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch(e){return}}}let ed={},eh={};function ep(e,t){ed[e]=ed[e]||[],ed[e].push(t)}function ef(e,t){if(!eh[e]){eh[e]=!0;try{t()}catch(e){}}}function ev(e,t){let r=e&&ed[e];if(r)for(let e of r)try{e(t)}catch(e){}}let eg=null;function em(){eg=Z.onerror,Z.onerror=function(e,t,r,n,i){return ev("error",{column:n,error:i,line:r,msg:e,url:t}),!!eg&&eg.apply(this,arguments)},Z.onerror.__SENTRY_INSTRUMENTED__=!0}let ey=null;function eb(){ey=Z.onunhandledrejection,Z.onunhandledrejection=function(e){return ev("unhandledrejection",e),!ey||ey.apply(this,arguments)},Z.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function e_(){return ek(Z),Z}function ek(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||X,t[X]=t[X]||{}}let eS=Object.prototype.toString;function ew(e){switch(eS.call(e)){case"[object Error]":case"[object E
1xception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ex(e,Error)}}function eM(e,t){return eS.call(e)===`[object ${t}]`}function eC(e){return eM(e,"ErrorEvent")}function eE(e){return eM(e,"DOMError")}function eT(e){return eM(e,"String")}function eO(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function eP(e){return null===e||eO(e)||"object"!=typeof e&&"function"!=typeof e}function eA(e){return eM(e,"Object")}function ej(e){return"undefined"!=typeof Event&&ex(e,Event)}function eI(e){return!!(e&&e.then&&"function"==typeof e.then)}function ex(e,t){try{return e instanceof t}catch(e){return!1}}function eL(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}function eD(e,t={}){if(!e)return"<unknown>";try{let r,n=e,i=[],a=0,s=0,o=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&a++<5&&(r=function(e,t){let r=[];if(!e||!e.tagName)return"";if(Z.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}r.push(e.tagName.toLowerCase());let n=t&&t.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(n&&n.length)n.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{e.id&&r.push(`#${e.id}`);let t=e.className;if(t&&eT(t))for(let e of t.split(/\s+/))r.push(`.${e}`)}for(let t of["aria-label","type","name","title","alt"]){let n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}(n,o),!("html"===r||a>1&&s+3*i.length+r.length>=c));)i.push(r),s+=r.length,n=n.parentNode;return i.reverse().join(" > ")}catch(e){return"<unknown>"}}function eN(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function eF(e,t){if(!Array.isArray(e))return"";let r=[];for(let t=0;t<e.length;t++){let n=e[t];try{eL(n)?r.push("[VueViewModel]"):r.push(String(n))}catch(e){r.push("[value cannot be serialized]")}}return r.join(t)}function eR(e,t=[],r=!1){return t.some(t=>(function(e,t,r=!1){return!!eT(e)&&(eM(t,"RegExp")?t.test(e):!!eT(t)&&(r?e===t:e.includes(t)))})(e,t,r))}function eB(e,t,r){if(!(t in e))return;let n=e[t],i=r(n);"function"==typeof i&&eU(i,n);try{e[t]=i}catch(e){}}function eV(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch(e){}}function eU(e,t){try{let r=t.prototype||{};e.prototype=t.prototype=r,eV(e,"__sentry_original__",t)}catch(e){}}function eJ(e){return e.__sentry_original__}function eq(e){if(ew(e))return{message:e.message,name:e.name,stack:e.stack,...e$(e)};if(ej(e)){let t={type:e.type,target:ez(e.target),currentTarget:ez(e.currentTarget),...e$(e)};return"undefined"!=typeof CustomEvent&&ex(e,CustomEvent)&&(t.detail=e.detail),t}return e}function ez(e){try{return"undefined"!=typeof Element&&ex(e,Element)?eD(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function e$(e){if("object"==typeof e&&null!==e){let t={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}return{}}function eW(e){return function e(t,r){if(function(e){if(!eA(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(t)){let n=r.get(t);if(void 0!==n)return n;let i={};for(let n of(r.set(t,i),Object.getOwnPropertyNames(t)))void 0!==t[n]&&(i[n]=e(t[n],r));return i}if(Array.isArray(t)){let n=r.get(t);if(void 0!==n)return n;let i=[];return r.set(t,i),t.forEach(t=>{i.push(e(t,r))}),i}return t}(e,new Map)}function eH(){return Date.now()/1e3}let eQ=function(){let{performance:e}=Z;if(!e||!e.now)return eH;let t=Date.now()-e.now(),r=null==e.timeOrigin?t:e.timeOrigin;return()=>(r+e.now())/1e3}();function eG(){let e=Z.crypto||Z.msCrypto,t=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(t=()=>{let t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(e){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&t())>>e/4).toString(16))}function eK(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function eY(e,t,r){let n=e.exception=e.exception||{},i=n.values=n.values||[],a=i[0]=i[0]||{};a.value||(a.value=t||""),a.type||(a.type=r||"Error")}function eX(e,t){let r=eK(e);if(!r)return;let n=r.mechanism;if(r.mechanism={type:"generic",handled:!0,...n,...t},t&&"data"in t){let e={...n&&n.data,...t.data};r.mechanism.data=e}}function eZ(e){if(function(e){try{return e.__sentry_captured__}catch(e){}}(e))return!0;try{eV(e,"__sentry_captured__",!0)}catch(e){}return!1}function e0(e){return new e2(t=>{t(e)})}function e1(e){return new e2((t,r)=>{r(e)})}(()=>{let{performance:e}=Z;if(!e||!e.now)return;let t=e.now(),r=Date.now(),n=e.timeOrigin?Math.abs(e.timeOrigin+t-r):36e5,i=e.timing&&e.timing.navigationStart,a="number"==typeof i?Math.abs(i+t-r):36e5;(n<36e5||a<36e5)&&n<=a&&e.timeOrigin}
vendor: 5,469 bytes, line 1
1)(),function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(E||(E={}));class e2{constructor(e){e2.prototype.__init.call(this),e2.prototype.__init2.call(this),e2.prototype.__init3.call(this),e2.prototype.__init4.call(this),this._state=E.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new e2((r,n)=>{this._handlers.push([!1,t=>{if(e)try{r(e(t))}catch(e){n(e)}else r(t)},e=>{if(t)try{r(t(e))}catch(e){n(e)}else n(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new e2((t,r)=>{let n,i;return this.then(t=>{i=!1,n=t,e&&e()},t=>{i=!0,n=t,e&&e()}).then(()=>{i?r(n):t(n)})})}__init(){this._resolve=e=>{this._setResult(E.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(E.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===E.PENDING&&(eI(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===E.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===E.RESOLVED&&e[1](this._value),this._state===E.REJECTED&&e[2](this._value),e[0]=!0)})}}}function e3(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||eQ(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:eG()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function e4(){return eG().substring(16)}function e5(e,t,r=2){if(!t||"object"!=typeof t||r<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;let n={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=e5(n[e],t[e],r-1));return n}let e6="_sentrySpan";function e9(e,t){t?eV(e,e6,t):delete e[e6]}class e8{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:eG(),spanId:e4()}}clone(){let e=new e8;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e9(e,this[e6]),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&e3(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t="function"==typeof e?e(this):e,[r,n]=t instanceof e7?[t.getScopeData(),t.getRequestSession()]:eA(t)?[e,e.requestSession]:[],{tags:i,extra:a,user:s,contexts:o,level:c,fingerprint:l=[],propagationContext:u}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...o},s&&Object.keys(s).length&&(this._user=s),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),n&&(this._requestSession=n),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,e9
1(this,void 0),this._attachments=[],this.setPropagationContext({traceId:eG()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let r="number"==typeof t?t:100;if(r<=0)return this;let n={timestamp:eH(),...e};return this._breadcrumbs.push(n),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(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:this[e6]}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=e5(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:e4(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){let r=t&&t.event_id?t.event_id:eG();if(!this._client)return ei.warn("No client configured on scope - will not capture exception!"),r;let n=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:n,...t,event_id:r},this),r}captureMessage(e,t,r){let n=r&&r.event_id?r.event_id:eG();if(!this._client)return ei.warn("No client configured on scope - will not capture message!"),n;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...r,event_id:n},this),n}captureEvent(e,t){let r=t&&t.event_id?t.event_id:eG();return this._client?this._client.captureEvent(e,{...t,event_id:r},this):ei.warn("No client configured on scope - will not capture event!"),r}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}let e7=e8;class te{constructor(e,t){let r,n;r=e||new e7,n=t||new e7,this._stack=[{scope:r}],this._isolationScope=n}withScope(e){let t,r=this._pushScope();try{t=e(r)}catch(e){throw this._popScope(),e}return eI(t)?t.then(e=>(this._popScope(),e),e=>{throw this._popScope(),e}):(this._popScope(),t)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function tt(){let e=ek(e_());return e.stack=e.stack||new te(ee("defaultCurrentScope",()=>new e7),ee("defaultIsolationScope",()=>new e7))}function tr(e){return tt().withScope(e)}function tn(e,t){let r=tt();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function ti(e){return tt().withScope(()=>e(tt().getIsolationScope()))}function ta(e){let t=ek(e);return t.acs?t.acs:{withIsolationScope:ti,withScope:tr,withSetScope:tn,withSetIsolationScope:(e,t)=>ti(t),getCurrentScope:()=>tt().getScope(),getIsolationScope:()=>tt().getIsolationScope()}}function ts(){return ta(e_()).getCurrentScope()}function to(){return ta(e_()).getIsolationScope()}function tc(){return ts().getClient()}let tl=/^sentry-/;function tu(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,r])=>(t&&r&&(e[t]=r),e),{})}let td=!1;function th(e){return"number"==typeof e?tp(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?tp(e.getTime()):eQ()}function tp(e){return e>0x2540be3ff?e/1e3:e}function tf(e){if("function"==typeof e.getSpanJSON)return e.getSpanJSON();try{let{spanId:t,traceId:r}=e.spanContext();if(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status){let{attributes:n,startTime:i,name:a,endTime:s,parentSpanId:o,status:c}=e;return eW({span_id:t,trace_id:r,data:n,description:a,parent_span_id:o,start_timestamp:th(i),timestamp:th(s)||void 0,status:function(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}(c),op:n["sentry.op"],origin:n["sentry.origin"],_metrics_summary:function(e){let t=e._sentryMetrics;if(!t)return;let r={};for(let[,[e,n]]of t)(r[e]||(r[e]=[])).push(eW(n));return r}(e)})}return{span_id:t,trace_id:r}}catch(e){return{}}}function tv(e){return e._sentryRootSpan||e}let tg="production";function tm(e,t){let r=t.getOptions(),{publicKey:n}=t.getDsn()||{},i=eW({environment:r.environment||tg,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",i),i}let ty=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function tb(e,t=!1){let{host:r,path:n,pass:i,port:a,projectId:s,protocol:o,publicKey:c}=e;return`${o}://${c}${t&&i?`:${i}`:""}@${r}${a?`:${a}`:""}/${n?`${n}/`:n}${s}`}function t_(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function tk(e,t=100,n=1/0){try{return function e(t,n,i=1/0,a=1/0,s=function(){let e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(r){if(e)return!!t.has(r)||(t.add(r),!1);for(let e=0;e<t.length;e++)if(t[e]===r)return!0;return t.push(r),!1},function(r){if(e)t.delete(r);else for(let e=0;e<t.length;e++)if(t[e]===r){t.splice(e,1);break}}]}()){let[o,c]=s;if(null==n||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;let l=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(void 0!==r.g&&t===r.g)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(eL(t))return"[VueViewModel]";if(eA(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t)return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${el(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;let n=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}(t,n);if(!l.startsWith("[object "))return l;if(n.__sentry_skip_normalization__)return n;let u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:i;if(0===u)return l.replace("object ","");if(o(n))return"[Circular ~]";if(n&&"function"==typeof n.toJSON)try{return e("",n.toJSON(),u-1,a,s)}catch(e){}let d=Array.isArray(n)?[]:{},h=0,p=eq(n);for(let t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(h>=a){d[t]="[MaxProperties ~]";break}let r=p[t];d[t]=e(t,r,u-1,a,s),h++}return c(n),d}("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function tS(e,t=[]){return[e,t]}function tw(e,t){for(let r of e[1])if(t(r,r[0].type))return!0;return!1}function tM(e){return Z.__SENTRY__&&Z.__SENTRY__.encodePolyfill?Z.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}let tC={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_
1security:"security"};function tE(e){if(!e||!e.sdk)return;let{name:t,version:r}=e.sdk;return{name:t,version:r}}function tT(e,t){let{extra:r,tags:n,user:i,contexts:a,level:s,sdkProcessingMetadata:o,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:d,propagationContext:h,transactionName:p,span:f}=t;tO(e,"extra",r),tO(e,"tags",n),tO(e,"user",i),tO(e,"contexts",a),e.sdkProcessingMetadata=e5(e.sdkProcessingMetadata,o,2),s&&(e.level=s),p&&(e.transactionName=p),f&&(e.span=f),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function tO(e,t,r){e[t]=e5(e[t],r,1)}let tP=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function tA(e,t){return ts().captureEvent(e,t)}function tj(e){let t=tc(),r=to(),n=ts(),{release:i,environment:a=tg}=t&&t.getOptions()||{},{userAgent:s}=Z.navigator||{},o=function(e){let t=eQ(),r={sid:eG(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>eW({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:"number"==typeof r.did||"string"==typeof r.did?`${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}})};return e&&e3(r,e),r}({release:i,environment:a,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),c=r.getSession();return c&&"ok"===c.status&&e3(c,{status:"exited"}),tI(),r.setSession(o),n.setSession(o),o}function tI(){let e,t=to(),r=ts(),n=r.getSession()||t.getSession();n&&(e={},"ok"===n.status&&(e={status:"exited"}),e3(n,e)),tx(),t.setSession(),r.setSession()}function tx(){let e=to(),t=ts(),r=tc(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function tL(e=!1){e?tI():tx()}let tD=[];function tN(e,t){for(let r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function tF(e,t,r){if(r[t.name]);else{if(r[t.name]=t,-1===tD.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),tD.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,n)=>r(t,n,e))}if("function"==typeof t.processEvent){let r=t.processEvent.bind(t),n=Object.assign((t,n)=>r(t,n,e),{id:t.name});e.addEventProcessor(n)}}}class tR extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}class tB{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn&&(this._dsn=function(e){let t="string"==typeof e?function(e){let t=ty.exec(e);if(!t)return void en(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});let[r,n,i="",a="",s="",o=""]=t.slice(1),c="",l=o,u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return t_({host:a,pass:i,path:c,projectId:l,port:s,protocol:r,publicKey:n})}(e):t_(e);if(t&&1)return t}(e.dsn)),this._dsn){let t=function(e,t,r){return t||`${function(e){let t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/?${function(e,t){let r={sentry_version:"7"};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}(e,r)}`}(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}let t=["enableTracing","tracesSampleRate","tracesSampler"].find(t=>t in e&&null==e[t]);t&&en(()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(e,t,r){let n=eG();if(eZ(e))return n;let i={event_id:n,...t};return this._process(this.eventFromException(e,i).then(e=>this._captureEvent(e,i,r))),i.event_id}captureMessage(e,t,r,n){let i={event_id:eG(),...r}
1,a=eO(e)?e:String(e),s=eP(e)?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(s.then(e=>this._captureEvent(e,i,n))),i.event_id}captureEvent(e,t,r){let n=eG();if(t&&t.originalException&&eZ(t.originalException))return n;let i={event_id:n,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,a||r)),i.event_id}captureSession(e){"string"==typeof e.release&&(this.sendSession(e),e3(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>t.flush(e).then(e=>r&&e))):e0(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.emit("close"),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];tF(this,e,this._integrations),t||tN(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let r=function(e,t,r,n){var i;let a=tE(r),s=e.type&&"replay_event"!==e.type?e.type:"event";(i=r&&r.sdk)&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||i.name,e.sdk.version=e.sdk.version||i.version,e.sdk.integrations=[...e.sdk.integrations||[],...i.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...i.packages||[]]);let o=function(e,t,r,n){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:tb(n)},...i&&{trace:eW({...i})}}}(e,a,n,t);return delete e.sdkProcessingMetadata,tS(o,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=function(e,t){let[r,n]=e;return[r,[...n,t]]}(r,function(e){let t="string"==typeof e.data?tM(e.data):e.data;return[eW({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}(e));let n=this.sendEnvelope(r);n&&n.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){let t=function(e,t,r,n){let i=tE(r);return tS({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!n&&t&&{dsn:tb(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,r){if(this._options.sendClientReports){let n=`${e}:${t}`;this._outcomes[n]=(this._outcomes[n]||0)+("number"==typeof r?r:1)}}on(e,t){let r=this._hooks[e]=this._hooks[e]||[];return r.push(t),()=>{let e=r.indexOf(t);e>-1&&r.splice(e,1)}}emit(e,...t){let r=this._hooks[e];r&&r.forEach(e=>e(...t))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,e=>e):e0({})}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let r={};return t.forEach(t=>{t&&tF(e,t,r)}),r}(this,e),tN(this,e)}_updateSessionFromEvent(e,t){let r="fatal"===t.level,n=!1,i=t.exception&&t.exception.values;if(i)for(let e of(n=!0,i)){let t=e.mechanism;if(t&&!1===t.handled){r=!0;break}}let a="ok"===e.status;(a&&0===e.errors||a&&r)&&(e3(e,{...r&&{status:"crashed"},errors:e.errors||Number(n||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new e2(t=>{let r=0,n=setInterval(()=>{0==this._numProcessing?(clearInterval(n),t(!0)):(r+=1,e&&r>=e&&(clearInterval(n),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,r=ts(),s=to()){let o=this.getOptions(),c=Object.keys(this._integrations);return!t.integrations&&c.length>0&&(t.integrations=c),this.emit("preprocessEvent",e,t),e.type||s.setLastEventId(e.event_id||t.event_id),(function(e,t,r,s,o,c){let{normalizeDepth:l=3,normalizeMaxBreadth:u=1e3}=e,d={...t,event_id:t.event_id||r.event_id||eG(),timestamp:t.timestamp||eH()},h=r.integrations||e.integrations.map(e=>e.name);!function(e,t){let{environment:r,release:n,dist:i,maxValueLength:a=250}=t;e.environment=e.environment||r||tg,!e.release&&n&&(e.release=n),!e.dist&&i&&(e.dist=i),e.message&&(e.message=eN(e.message,a));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=eN(s.value,a));let o=e.request;o&&o.url&&(o.url=eN(o.url,a))}(d,e),h.length>0&&(d.sdk=d.sdk||{},d.sdk.integrations=[...d.sdk.integrations||[],...h]),o&&o.emit("applyFrameMetadata",t),void 0===t.type&&function(e,t){let r=function(e){let t=Z._sentryDebugIds;if(!t)return{};let r=Object.keys(t);return a&&r.length===i||(i=r.length,a=r.reduce((r,i)=>{n||(n={});let a=n[i];if(a)r[a[0]]=a[1];else{let a=e(i);for(let e=a.length-1;e>=0;e--){let s=a[e],o=s&&s.filename,c=t[i];if(o&&c){r[o]=c,n[i]=[o,c];break}}}return r},{})),a}(t);
1try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{r&&e.filename&&(e.debug_id=r[e.filename])})})}catch(e){}}(d,e.stackParser);let p=function(e,t){if(!t)return e;let r=e?e.clone():new e7;return r.update(t),r}(s,r.captureContext);r.mechanism&&eX(d,r.mechanism);let f=o?o.getEventProcessors():[],v=ee("globalScope",()=>new e7).getScopeData();c&&tT(v,c.getScopeData()),p&&tT(v,p.getScopeData());let g=[...r.attachments||[],...v.attachments];return g.length&&(r.attachments=g),function(e,t){let{fingerprint:r,span:n,breadcrumbs:i,sdkProcessingMetadata:a}=t;!function(e,t){let{extra:r,tags:n,user:i,contexts:a,level:s,transactionName:o}=t,c=eW(r);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let l=eW(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});let u=eW(i);u&&Object.keys(u).length&&(e.user={...u,...e.user});let d=eW(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),o&&"transaction"!==e.type&&(e.transaction=o)}(e,t),n&&function(e,t){e.contexts={trace:function(e){let{spanId:t,traceId:r,isRemote:n}=e.spanContext();return eW({parent_span_id:n?t:tf(e).parent_span_id,span_id:n?e4():t,trace_id:r})}(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e){let t=tc();if(!t)return{};let r=tv(e),n=r._frozenDsc;if(n)return n;let i=r.spanContext().traceState,a=i&&i.get("sentry.dsc"),s=a&&function(e){let t=function(e){if(e&&(eT(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>(Object.entries(tu(t)).forEach(([t,r])=>{e[t]=r}),e),{}):tu(e)}(e);if(!t)return;let r=Object.entries(t).reduce((e,[t,r])=>(t.match(tl)&&(e[t.slice(7)]=r),e),{});return Object.keys(r).length>0?r:void 0}(a);if(s)return s;let o=tm(e.spanContext().traceId,t),c=tf(r),l=c.data||{},u=l["sentry.sample_rate"];null!=u&&(o.sample_rate=`${u}`);let d=l["sentry.source"],h=c.description;return"url"!==d&&h&&(o.transaction=h),function(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;let t=tc(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}()&&(o.sampled=String(function(e){let{traceFlags:t}=e.spanContext();return 1===t}(r))),t.emit("createDsc",o,r),o}(t),...e.sdkProcessingMetadata};let r=tf(tv(t)).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,n),e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],r&&(e.fingerprint=e.fingerprint.concat(r)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint,function(e,t){let r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}(e,i),e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...a}}(d,v),(function e(t,r,n,i=0){return new e2((a,s)=>{let o=t[i];if(null===r||"function"!=typeof o)a(r);else{let c=o({...r},n);eI(c)?c.then(r=>e(t,r,n,i+1).then(a)).then(null,s):e(t,c,n,i+1).then(a).then(null,s)}})})([...f,...v.eventProcessors],d,r).then(e=>(e&&function(e){let t={};try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})})}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let r=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{r.push({type:"sourcemap",code_file:e,debug_id:t})})}(e),"number"==typeof l&&l>0?function(e,t,r){if(!e)return null;let n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:tk(e.data,t,r)}}))},...e.user&&{user:tk(e.user,t,r)},...e.contexts&&{contexts:tk(e.contexts,t,r)},...e.extra&&{extra:tk(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=tk(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(e=>({...e,...e.data&&{data:tk(e.data,t,r)}}))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=tk(e.contexts.flags,3,r)),n}(e,l,u):e))})(o,e,t,r,this,s).then(e=>(null===e||(e.contexts={trace:function(e){let{traceId:t,spanId:r,parentSpanId:n}=e.getPropagationContext();return eW({trace_id:t,span_id:r,parent_span_id:n})}(r),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:function(e,t){let r=t.getPropagationContext();return r.dsc||tm(r.traceId,e)}(this,r),...e.sdkProcessingMetadata}),e))}_captureEvent(e,t={},r){return this._processEvent(e,t,r).then(e=>e.event_id,e=>{})}_processEvent(e,t,r){let n=this.getOptions(),{sampleRate:i}=n,a=tU(e),s=tV(e),o=e.type||"error",c=`before send for type \`${o}\``,l=void 0===i?void 0:function(e){if("boolean"==typeof e)return Number(e);let t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t}(i);if(s&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error",e),e1(new tR(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let u="replay_event"===o?"replay":o,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,r,d).then(r=>{if(null===r)throw this.recordDroppedEvent("event_processor",u,e),new tR("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return r;var i=function(e,t,r,n){let{beforeSend:i,beforeSendTransaction:a,beforeSendSpan:s}=t;if(tV(r)&&i)return i(r,n);if(tU(r)){if(r.spans&&s){let t=[];for(let n of r.spans){let r=s(n);r?t.push(r):(td||(en(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK ver
1sion 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),td=!0),e.recordDroppedEvent("before_send","span"))}r.spans=t}if(a){if(r.spans){let e=r.spans.length;r.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(r,n)}}return r}(this,n,r,t);let a=`${c} must return \`null\` or a valid event.`;if(eI(i))return i.then(e=>{if(!eA(e)&&null!==e)throw new tR(a);return e},e=>{throw new tR(`${c} rejected with ${e}`)});if(!eA(i)&&null!==i)throw new tR(a);return i}).then(n=>{if(null===n){if(this.recordDroppedEvent("before_send",u,e),a){let t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new tR(`${c} returned \`null\`, will not send event.`,"log")}let i=r&&r.getSession();if(!a&&i&&this._updateSessionFromEvent(i,n),a){let e=(n.sdkProcessingMetadata&&n.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(n.spans?n.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}let s=n.transaction_info;return a&&s&&n.transaction!==e.transaction&&(n.transaction_info={...s,source:"custom"}),this.sendEvent(n,t),n}).then(null,e=>{if(e instanceof tR)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new tR(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
2Reason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[r,n]=e.split(":");return{reason:r,category:n,quantity:t}})}_flushOutcomes(){var e,t;let r=this._clearOutcomes();if(0===r.length||!this._dsn)return;let n=tS((e=this._options.tunnel&&tb(this._dsn))?{dsn:e}:{},[[{type:"client_report"},{timestamp:t||eH(),discarded_events:r}]]);this.sendEnvelope(n)}}function tV(e){return void 0===e.type}function tU(e){return"transaction"===e.type}function tJ(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function tq(e,t){let r=tc(),n=to();if(!r)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=100}=r.getOptions();if(a<=0)return;let s={timestamp:eH(),...e},o=i?en(()=>i(s,t)):s;null!==o&&(r.emit&&r.emit("beforeAddBreadcrumb",o,t),n.addBreadcrumb(o,a))}let tz=new WeakMap,t$=[/^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+$/];function tW(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r&&"<anonymous>"!==r.filename&&"[native code]"!==r.filename)return r.filename||null}return null}(t):null}catch(e){return null}}function tH(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function tQ(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function tG(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function tK(){"console"in Z&&et.forEach(function(e){e in Z.console&&eB(Z.console,e,function(t){return er[e]=t,function(...t){ev("console",{args:t,level:e});let r=er[e];r&&r.apply(Z.console,t)}})})}function tY(e,t){let r=eu(e),n=eu(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||n.length!==r.length)return!1;for(let e=0;e<n.length;e++){let t=n[e],i=r[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function tX(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;
2if(r&&!n||!r&&n)return!1;try{return r.join("")===n.join("")}catch(e){return!1}}function tZ(e){return e.exception&&e.exception.values&&e.exception.values[0]}function t0(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}function t1(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function t2(e,t){return!!e&&"object"==typeof e&&!!e[t]}function t3(e){return"string"==typeof e?e:e?t2(e,"url")?e.url:e.toString?e.toString():"":""}let t4=0;function t5(e,t={}){if("function"!=typeof e)return e;try{let t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(eJ(e))return e}catch(t){return e}let r=function(...r){try{let n=r.map(e=>t5(e,t));return e.apply(this,n)}catch(e){throw t4++,setTimeout(()=>{t4--}),function(...e){let t=ta(e_());if(2===e.length){let[r,n]=e;return r?t.withSetScope(r,n):t.withScope(n)}t.withScope(e[0])}(n=>{var i;n.addEventProcessor(e=>(t.mechanism&&(eY(e,void 0,void 0),eX(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),ts().captureException(e,function(e){if(e)return e instanceof e7||"function"==typeof e||Object.keys(e).some(e=>tP.includes(e))?{captureContext:e}:e}(i))}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}eU(r,e),eV(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}function t6(e,t){let r=t8(e,t),n={type:function(e){let t=e&&e.name;return!t&&re(e)?e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception":t}(t),value:function(e){let t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:re(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}(t)};return r.length&&(n.stacktrace={frames:r}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function t9(e,t){return{exception:{values:[t6(e,t)]}}}function t8(e,t){let r=t.stacktrace||t.stack||"",n=t&&t7.test(t.message)?1:0,i="number"==typeof t.framesToPop?t.framesToPop:0;try{return e(r,n,i)}catch(e){}return[]}let t7=/Minified React error #\d+;/i;function re(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function rt(e,t,r,n,i){let a;if(eC(t)&&t.error)return t9(e,t.error);if(eE(t)||eM(t,"DOMException")){if("stack"in t)a=t9(e,t);else{let i=t.name||(eE(t)?"DOMError":"DOMException"),s=t.message?`${i}: ${t.message}`:i;eY(a=rr(e,s,r,n),s)}return"code"in t&&(a.tags={...a.tags,"DOMException.code":`${t.code}`}),a}return ew(t)?t9(e,t):(eA(t)||ej(t)?eX(a=function(e,t,r,n){let i=tc(),a=i&&i.getOptions().normalizeDepth,s=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let r=e[t];if(r instanceof Error)return r}}(t),o={__serialized__:function e(t,r=3,n=102400){let i=tk(t,r);return~-encodeURI(JSON.stringify(i)).split(/%..|./).length>n?e(t,r-1,n):i}(t,a)};if(s)return{exception:{values:[t6(e,s)]},extra:o};let c={exception:{values:[{type:ej(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:function(e,{isUnhandledRejection:t}){let r=function(e,t=40){let r=Object.keys(eq(e));r.sort();let n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return eN(n,t);for(let e=r.length;e>0;e--){let n=r.slice(0,e).join(", ");if(!(n.length>t))return e===r.length?n:eN(n,t)}return""}(e),n=t?"promise rejection":"exception";return eC(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:ej(e)?`Event \`${function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}(t,{isUnhandledRejection:n})}]},extra:o};if(r){let t=t8(e,r);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}(e,t,r,i),{synthetic:!0}):(eY(a=rr(e,t,r,n),`${t}`,void 0),eX(a,{synthetic:!0})),a)}function rr(e,t,r,n){let i={};if(n&&r){let n=t8(e,r);n.length&&(i.exception={values:[{value:t,stacktrace:{frames:n}}]}),eX(i,{synthetic:!0})}if(eO(t)){let{__sentry_template_string__:e,__sentry_template_values__:r}=t;return i.logentry={message:e,params:r},i}return i.message=t,i}class rn extends tB{constructor(e){let t={parentSpanIsAlwaysRootSpan:!0,...e};!function(e,t,r=[t],n="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:r.map(e=>({name:`${n}:@sentry/${e}`,version:X})),version:X}),e._metadata=i}(t,"browser",["browser"],Z.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&Z.document&&Z.document.addEventListener("visibilitychange",()=>{"hidden"===Z.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,r,n){let i=rt(e,t,r&&r.syntheticException||void 0,n);return eX(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),e0(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return function(e,t,r="info",n,i){let a=rr(e,t,n&&n.syntheticException||void 0,i);return a.level=r,n&&n.event_id&&(a.event_id=n.event_id),e0(a)}(this._options.stackParser,e,t,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return;let t=function(e,{metadata:t,tunnel:r,dsn:n}){return tS({event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:tb(n)}},[[{type:"user_report"},e]])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r)}}function ri(){if(!Z.document)return;let e=ev.bind(null,"dom"),t=ra(e,!0);Z.document.addEventListener("click",t,!1),Z.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{let r=Z[t],n=r&&r.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(eB(n,"addEventListener",function(t){return function(r,n,i){if("click"===r||"keypress"==r)try{let n=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=n[r]=n[r]||{refCount:0};if(!a.handler){let n=ra(e);a.handler=n,t.call(this,r,n,i)}a.refCount++}catch(e){}return t.call(this,r,n,i)}}),eB(n,"removeEventListener",function(e){return function(t,r,n){if("click"===t||"keypress"==t)try{let r=this.__sentry_instrumentation_handlers__||{},i=r[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,n),i.handler=void 0,delete r[t]),0===Object.keys(r).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,r,n)}}))})}function ra(e,t=!1){return r=>{var n;if(!r||r._sentryCaptured)return;let i=function(e){try{return e.target}catch(e){return null}}(r);if(n=r.type,"keypress"===n&&(!i||!i.tagName||"INPUT"!==i.tagName&&"TEXTAREA"!==i.tagName&&!i.isContentEditable))return;eV(r,"_sentryCaptured",!0),i&&!i._sentryId&&eV(i,"_sentryId",eG());let a="keypress"===r.type?"input":r.type;!function(e){if(e.type!==c)return!1;try{if(!e.target||e.target._sentryId!==l)return!1}catch(e){}return!0}(r)&&(e({event:r,name:a,global:t}),c=r.type,l=i?i._sentryId:void 0),clearTimeout(o),o=Z.setTimeout(()=>{l=void 0,c=void 0},1e3)}}function rs(e){let t="history";ep(t,e),ef(t,ro)}function ro(){if(!function(){let e=Z.chrome,t=e&&e.app&&e.app.runtime,r="history"in Z&&!!Z.history.pushState&&!!Z.history.replaceState;return!t&&r}())return;let e=Z.onpopstate;function t(e){return function(...t){let r=t.length>2?t[2]:void 0;
2if(r){let e=u,t=String(r);u=t,ev("history",{from:e,to:t})}return e.apply(this,t)}}Z.onpopstate=function(...t){let r=Z.location.href,n=u;if(u=r,ev("history",{from:n,to:r}),e)try{return e.apply(this,t)}catch(e){}},eB(Z.history,"pushState",t),eB(Z.history,"replaceState",t)}let rc={},rl="__sentry_xhr_v3__";function ru(){if(!Z.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,r){let n=Error(),i=1e3*eQ(),a=eT(r[0])?r[0].toUpperCase():void 0,s=function(e){if(eT(e))return e;try{return e.toString()}catch(e){}}(r[1]);if(!a||!s)return e.apply(t,r);t[rl]={method:a,url:s,request_headers:{}},"POST"===a&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let o=()=>{let e=t[rl];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}ev("xhr",{endTimestamp:1e3*eQ(),startTimestamp:i,xhr:t,virtualError:n})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,r)=>(o(),e.apply(t,r))}):t.addEventListener("readystatechange",o),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,r){let[n,i]=r,a=t[rl];return a&&eT(n)&&eT(i)&&(a.request_headers[n.toLowerCase()]=i),e.apply(t,r)}}),e.apply(t,r)}}),e.send=new Proxy(e.send,{apply(e,t,r){let n=t[rl];return n&&(void 0!==r[0]&&(n.body=r[0]),ev("xhr",{startTimestamp:1e3*eQ(),xhr:t})),e.apply(t,r)}})}function rd(e,t=function(e){let t=rc[e];if(t)return t;let r=Z[e];if(t1(r))return rc[e]=r.bind(Z);let n=Z.document;if(n&&"function"==typeof n.createElement)try{let t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch(e){}return r?rc[e]=r.bind(Z):r}("fetch")){let r=0,n=0;return function(e,t,r=function(e){let t=[];function r(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(n){if(!(void 0===e||t.length<e))return e1(new tR("Not adding Promise because buffer limit was reached."));let i=n();return -1===t.indexOf(i)&&t.push(i),i.then(()=>r(i)).then(null,()=>r(i).then(null,()=>{})),i},drain:function(e){return new e2((r,n)=>{let i=t.length;if(!i)return r(!0);let a=setTimeout(()=>{e&&e>0&&r(!1)},e);t.forEach(e=>{e0(e).then(()=>{--i||(clearTimeout(a),r(!0))},n)})})}}}(e.bufferSize||64)){let n={};return{send:function(i){let a=[];if(tw(i,(t,r)=>{let i=tC[r];if(function(e,t,r=Date.now()){return(e[t]||e.all||0)>r}(n,i)){let n=tJ(t,r);e.recordDroppedEvent("ratelimit_backoff",i,n)}else a.push(t)}),0===a.length)return e0({});let s=tS(i[0],a),o=t=>{tw(s,(r,n)=>{let i=tJ(r,n);e.recordDroppedEvent(t,tC[n],i)})};return r.add(()=>t({body:function(e){let[t,r]=e,n=JSON.stringify(t);function i(e){"string"==typeof n?n="string"==typeof e?n+e:[tM(n),e]:n.push("string"==typeof e?tM(e):e)}for(let e of r){let[t,r]=e;if(i(`
3${JSON.stringify(t)}
4`),"string"==typeof r||r instanceof Uint8Array)i(r);else{let e;try{e=JSON.stringify(r)}catch(t){e=JSON.stringify(tk(r))}i(e)}}return"string"==typeof n?n:function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}(n)}(s)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode),n=function(e,{statusCode:t,headers:r},n=Date.now()){let i={...e},a=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(a)for(let e of a.trim().split(",")){let[t,r,,,a]=e.split(":",5),s=parseInt(t,10),o=1e3*(isNaN(s)?60:s);if(r)for(let e of r.split(";"))"metric_bucket"===e&&a&&!a.split(";").includes("custom")||(i[e]=n+o);else i.all=n+o}else s?i.all=n+function(e,t=Date.now()){let r=parseInt(`${e}`,10);if(!isNaN(r))return 1e3*r;let n=Date.parse(`${e}`);return isNaN(n)?6e4:n-t}(s,n):429===t&&(i.all=n+6e4);return i}(n,e),e),e=>{throw o("network_error"),e})).then(e=>e,e=>{if(e instanceof tR)return o("queue_overflow"),e0({});throw e})},flush:e=>r.drain(e)}}(e,function(i){let a=i.body.length;r+=a,n++;let s={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};if(!t)return rc.fetch=void 0,e1("No fetch implementation available");try{return t(e.url,s).then(e=>(r-=a,n--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}catch(e){return rc.fetch=void 0,r-=a,n--,e1(e)}})}function rh(e,t,r,n){let i={filename:e,function:"<anonymous>"===t?"?":t,in_app:!0};return void 0!==r&&(i.lineno=r),void 0!==n&&(i.colno=n),i}let rp=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,rf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rv=/\((\S*)(?::(\d+))(?::(\d+))\)/,rg=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,rm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ry=function(...e){let t=e.sort((e,t)=>
4e[0]-t[0]).map(e=>e[1]);return(e,r=0,n=0)=>{let i=[],a=e.split("\n");for(let e=r;e<a.length;e++){let r=a[e];if(r.length>1024)continue;let s=ea.test(r)?r.replace(ea,"$1"):r;if(!s.match(/\S*Error: /)){for(let e of t){let t=e(s);if(t){i.push(t);break}}if(i.length>=50+n)break}}var s=i.slice(n);if(!s.length)return[];let o=Array.from(s);return/sentryWrapped/.test(eo(o).function||"")&&o.pop(),o.reverse(),es.test(eo(o).function||"")&&(o.pop(),es.test(eo(o).function||"")&&o.pop()),o.slice(0,50).map(e=>({...e,filename:e.filename||eo(o).filename,function:e.function||"?"}))}}([30,e=>{let t=rp.exec(e);if(t){let[,e,r,n]=t;return rh(e,"?",+r,+n)}let r=rf.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){let e=rv.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=rb(r[1]||"?",r[2]);return rh(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],[50,e=>{let t=rg.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let e=rm.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],r=t[1]||"?";return[r,e]=rb(r,e),rh(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),rb=(e,t)=>{let r=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return r||n?[-1!==e.indexOf("@")?e.split("@")[0]:"?",r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},r_=["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"];function rk(e){return function(...t){let r=t[0];return t[0]=t5(r,{mechanism:{data:{function:el(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function rS(e){return function(t){return e.apply(this,[t5(t,{mechanism:{data:{function:"requestAnimationFrame",handler:el(e)},handled:!1,type:"instrument"}})])}}function rw(e){return function(...t){let r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in r&&"function"==typeof r[e]&&eB(r,e,function(t){let r={mechanism:{data:{function:e,handler:el(t)},handled:!1,type:"instrument"}},n=eJ(t);return n&&(r.mechanism.data.handler=el(n)),t5(t,r)})}),e.apply(this,t)}}function rM(e){let t=Z[e],r=t&&t.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(eB(r,"addEventListener",function(t){return function(r,n,i){try{"function"==typeof n.handleEvent&&(n.handleEvent=t5(n.handleEvent,{mechanism:{data:{function:"handleEvent",handler:el(n),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[r,t5(n,{mechanism:{data:{function:"addEventListener",handler:el(n),target:e},handled:!1,type:"instrument"}}),i])}}),eB(r,"removeEventListener",function(e){return function(t,r,n){try{let i=r.__sentry_wrapped__;i&&e.call(this,t,i,n)}catch(e){}return e.call(this,t,r,n)}}))}function rC(){let e=tc();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}var rE="loading",rT="loaded",rO="joining-meeting",rP="joined-meeting",rA="left-meeting",rj="error",rI="unknown",rx="no-room",rL="loaded",rD="recording-started",rN="recording-stopped",rF="fullscreen",rR="exited-fullscreen",rB="input-settings-updated",rV="nonfatal-error",rU="error",rJ="iframe-call-message",rq="local-screen-start",rz="daily-method-update-live-streaming-endpoints",r$="transmit-log",rW="daily-custom-track",rH={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image",FACE_DETECTION:"face-detection"},rQ={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},rG={PLAY:"play",PAUSE:"pause"},rK=["jpg","png","jpeg"],rY="sip-call-transfer";function rX(){return!rZ()&&"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function rZ(){return"undefined"!=typeof navigator&&navigator.product&&"ReactNative"===navigator.product}function r0(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function r1(){if(rZ()||!document)return!1;var e=document.createElement("iframe");
4return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var r2="none",r3=function(){try{var e,t=document.createElement("canvas"),r=!1;(e=t.getContext("webgl2",{failIfMajorPerformanceCaveat:!0}))||(r=!0,e=t.getContext("webgl2"));var n=null!=e;return t.remove(),n?r?"software":"hardware":r2}catch(e){return r2}}();function r4(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!rZ()&&r3!==r2&&(e?!r8()&&["Chrome","Firefox"].includes(r7()):function(){if(r8())return!1;var e=r7();if("Safari"===e){var t=ni();if(t.major<15||15===t.major&&t.minor<4)return!1}return"Chrome"===e?nt().major>=77:"Firefox"===e?na().major>=97:["Chrome","Firefox","Safari"].includes(e)}())}function r5(){if(rZ()||r9()||"undefined"==typeof AudioWorkletNode)return!1;switch(r7()){case"Chrome":case"Firefox":return!0;case"Safari":var e=ne();return e.major>17||17===e.major&&e.minor>=4}return!1}function r6(){return r0()&&!function(){var e,t=r7();if(!rX())return!0;switch(t){case"Chrome":return(e=nt()).major&&e.major>0&&e.major<75;case"Firefox":return(e=na()).major<91;case"Safari":return(e=ni()).major<13||13===e.major&&e.minor<1;default:return!0}}()}function r9(){return rX().match(/Linux; Android/)}function r8(){var e,t=rX(),r=t.match(/Mac/)&&(!rZ()&&"undefined"!=typeof window&&null!=(e=window)&&null!=(e=e.navigator)&&e.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(t.match(/Mobi/)||t.match(/Android/)||r)||!!rX().match(/DailyAnd\//)||void 0}function r7(){if("undefined"!=typeof window){var e=rX();return nr()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||nn()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function ne(){switch(r7()){case"Chrome":return nt();case"Safari":return ni();case"Firefox":return na();case"Edge":var e=0,t=0;if("undefined"!=typeof window){var r=rX().match(/Edge\/(\d+).(\d+)/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2])}catch(e){}}return{major:e,minor:t}}}function nt(){var e=0,t=0,r=0,n=0,i=!1;if("undefined"!=typeof window){var a=rX(),s=a.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(s)try{e=parseInt(s[1]),t=parseInt(s[2]),r=parseInt(s[3]),n=parseInt(s[4]),i=a.indexOf("OPR/")>-1}catch(e){}}return{major:e,minor:t,build:r,patch:n,opera:i}}function nr(){return!!rX().match(/iPad|iPhone|iPod/i)&&r0()}function nn(){return rX().indexOf("AppleWebKit/605.1.15")>-1}function ni(){var e=0,t=0,r=0;if("undefined"!=typeof window){var n=rX().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2]),r=parseInt(n[4])}catch(e){}else(nr()||nn())&&(e=14,t=0,r=3)}return{major:e,minor:t,point:r}}function na(){var e=0,t=0;if("undefined"!=typeof window){var r=rX().match(/Firefox\/(\d+).(\d+)/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2])}catch(e){}}return{major:e,minor:t}}var ns=g(function e(){h(this,e)},[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,r){Q()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,r){Q()}},{key:"sendMessageToCallMachine",value:function(e,t,r,n){Q()}},{key:"sendMessageToDailyJs",value:function(e,t){Q()}},{key:"removeListener",value:function(e){Q()}}]);function no(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nc(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?no(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):no(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function nl(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nl=function(){return!!e})()}var nu=function(){function e(){var t,r,n;return h(this,e),r=y(r=e),(t=m(this,nl()?Reflect.construct(r,n||[],y(this).constructor):r.apply(this,n)))._wrappedListeners={},t._messageCallbacks={},t}return _(e,ns),g(e,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,r){var n=this,i=function(i){if(i.data&&"iframe-call-message"===i.data.what&&(!i.data.callClientId||i.data.callClientId===t)&&(!i.data.from||"module"!==i.data.from)){var a=nc({},i.data);if(delete a.from,a.callbackStamp&&n._messageCallbacks[a.callbackStamp]){var s=a.callbackStamp;n._messageCallbacks[s].call(r,a),delete n._messageCallbacks[s]}delete a.what,delete a.callbackStamp,e.call(r,a)}};this._wrappedListeners[e]=i,window.addEventListener("message",i)}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,r){var n=function(n){var i;if(!(!n.data||n.data.what!==rJ||!n.data.action||n.data.from&&"module"!==n.data.from||n.data.callClientId&&t&&n.data.callClientId!==t||null!=n&&null!=(i=n.data)&&i.callFrameId)){var a=n.data;e.call(r,a)}};this._wrappedListeners[e]=n,window.addEventListener("message",n)}},{key:"sendMessageToCallMachine",value:function(e,t,r,n){if(!r)throw Error("undefined callClientId. Are you trying to use a DailyCall instance previously destroyed?");var i=nc({},e);if(i.what=rJ,i.from="module",i.callClientId=r,t){var a=H();this._messageCallbacks[a]=t,i.callbackStamp=a}var s=n?n.contentWindow:window,o=this._callMachineTargetOrigin(n);o&&s.postMessage(i,o)}},{key:"sendMessageToDailyJs",value:function(e,t){e.what=rJ,e.callClientId=t,e.from="embedded",window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"forwardPackagedMessageToCallMachine",value:function(e,t,r){var n=nc({},e);n.callClientId=r;var i=t?t.contentWindow:window,a=this._callMachineTargetOrigin(t);a&&i.postMessage(n,a)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e,t){var r=function(r){!r.data||"iframe-call-message"!==r.data.what||r.data.callClientId&&r.data.callClientId!==t||r.data.from&&"module"===r.data.from||e(r.data)};return this._wrappedListeners[e]=r,window.addEventListener("message",r),e}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"_callMachineTargetOrigin",value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return"file:"===window.location.protocol?"*":window.location.origin}}])}();
4function nd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nh=function(){return!!e})()}var np=function(){function e(){var t,n,i;return h(this,e),n=y(n=e),t=m(this,nh()?Reflect.construct(n,i||[],y(this).constructor):n.apply(this,i)),r.g.callMachineToDailyJsEmitter=r.g.callMachineToDailyJsEmitter||new P.EventEmitter,r.g.dailyJsToCallMachineEmitter=r.g.dailyJsToCallMachineEmitter||new P.EventEmitter,t._wrappedListeners={},t._messageCallbacks={},t}return _(e,ns),g(e,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){this._addListener(e,r.g.callMachineToDailyJsEmitter,t,n,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){this._addListener(e,r.g.dailyJsToCallMachineEmitter,t,n,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,t,n){this._sendMessage(e,r.g.dailyJsToCallMachineEmitter,n,t,"sending message to call machine")}},{key:"sendMessageToDailyJs",value:function(e,t){this._sendMessage(e,r.g.callMachineToDailyJsEmitter,t,null,"sending message to daily-js")}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(r.g.callMachineToDailyJsEmitter.removeListener("message",t),r.g.dailyJsToCallMachineEmitter.removeListener("message",t),delete this._wrappedListeners[e])}},{key:"_addListener",value:function(e,t,r,n,i){var a=this,s=function(t){if(t.callClientId===r){if(t.callbackStamp&&a._messageCallbacks[t.callbackStamp]){var i=t.callbackStamp;a._messageCallbacks[i].call(n,t),delete a._messageCallbacks[i]}e.call(n,t)}};this._wrappedListeners[e]=s,t.addListener("message",s)}},{key:"_sendMessage",value:function(e,t,r,n,i){var a=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nd(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nd(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e);if(a.callClientId=r,n){var s=H();this._messageCallbacks[s]=n,a.callbackStamp=s}t.emit("message",a)}}])}(),nf="replace",nv="shallow-merge",ng=[nf,nv],nm=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.data,n=t.mergeStrategy,i=void 0===n?nf:n;h(this,e),e._validateMergeStrategy(i),e._validateData(r,i),this.mergeStrategy=i,this.data=r}return g(e,[{key:"isNoOp",value:function(){return e.isNoOpUpdate(this.data,this.mergeStrategy)}}],[{key:"isNoOpUpdate",value:function(e,t){return 0===Object.keys(e).length&&t===nv}},{key:"_validateMergeStrategy",value:function(e){if(!ng.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(ng,"]"))}},{key:"_validateData",value:function(e,t){if(!function(e){if(null==e||"object"!==p(e))return!1;var t=Object.getPrototypeOf(e);return null==t||t===Object.prototype}(e))throw Error("Meeting session data must be a plain (map-like) object");try{if(r=JSON.stringify(e),t===nf){var r,n=JSON.parse(r);x(n,e)||console.warn("The meeting session data provided will be modified when serialized.",n,e)}else if(t===nv){for(var i in e)if(Object.hasOwnProperty.call(e,i)&&void 0!==e[i]){var a=JSON.parse(JSON.stringify(e[i]));x(e[i],a)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",a,e[i])}}}catch(e){throw Error("Meeting session data must be serializable to JSON: ".concat(e))}if(r.length>102400)throw Error("Meeting session data is too large (".concat(r.length," characters). Maximum size suppported is ").concat(102400,"."))}}])}();function ny(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ny=function(){return!!e})()}function nb(e){var t="function"==typeof Map?new Map:void 0;return(nb=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(ny())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&b(i,r.prototype),i}(e,arguments,y(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),b(r,e)})(e)}function n_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n_=function(){return!!e})()}function nk(e){var t,r=null==(t=window._daily)?void 0:t.pendings;if(r){var n=r.indexOf(e);-1!==n&&r.splice(n,1)}}var nS=g(function e(t){h(this,e),this._currentLoad=null,this._callClientId=t},[{key:"load",value:function(){var e,t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=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 n(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new nw(r,function(){n(!1)},function(e,r){r||nk(t._callClientId),i(e,r)}),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),nk(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),nw=g(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;h(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=r,this._failureCallback=n},[{key:"start",value:function(){var e=this;if(!this._currentAttempt){var t=function(r){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(r,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout(function(){e._currentAttempt.cancelled||(e._currentAttempt=new nC(e._dailyConfig,e._successCallback,t),e._currentAttempt.start())},3e3))};this._currentAttempt=new nC(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}}
4]),nM=function(){function e(){var t,r;return h(this,e),r=arguments,t=y(t=e),m(this,n_()?Reflect.construct(t,r||[],y(this).constructor):t.apply(this,r))}return _(e,nb(Error)),g(e)}(),nC=function(){var e;return g(function e(t,r,n){h(this,e),this._loadAttemptImpl=rZ()||!t.avoidEval?new nE(t,r,n):new nT(t,r,n)},[{key:"start",value:(e=w(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}}])}(),nE=function(){var e,t,r,n;return g(function e(t,r,n){h(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._successCallback=r,this._failureCallback=n},[{key:"start",value:(n=w(function*(){var e=K(this._dailyConfig);(yield this._tryLoadFromIOSCache(e))||this._loadFromNetwork(e)}),function(){return n.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=w(function*(e){if(!this._iosCache)return!1;try{var t=yield this._iosCache.get(e);return!!this.cancelled||!!t&&(t.code?(Function('"use strict";'+t.code)(),this.succeeded=!0,this._successCallback(),!0):(this._refetchHeaders=t.refetchHeaders,!1))}catch(e){return!1}}),function(e){return r.apply(this,arguments)})},{key:"_loadFromNetwork",value:(t=w(function*(e){var t=this;this._networkTimeout=setTimeout(function(){t._networkTimedOut=!0,t._failureCallback({msg:"Timed out (>".concat(2e4," ms) when loading call object bundle ").concat(e),type:"timeout"})},2e4);try{var r=this._refetchHeaders?{headers:this._refetchHeaders}:{},n=yield fetch(e,r);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new nM;var i=yield this._getBundleCodeFromResponse(e,n);if(this.cancelled)throw new nM;Function('"use strict";'+i)(),this._iosCache&&this._iosCache.set(e,i,n.headers),this.succeeded=!0,this._successCallback()}catch(t){if(clearTimeout(this._networkTimeout),t instanceof nM||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(e,": ").concat(t),type:t.message})}}),function(e){return t.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(e=w(function*(e,t){if(t.ok)return yield t.text();if(this._iosCache&&304===t.status)return(yield this._iosCache.renew(e,t.headers)).code;throw Error("Received ".concat(t.status," response"))}),function(t,r){return e.apply(this,arguments)})}])}(),nT=g(function e(t,r,n){h(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=r,this._failureCallback=n,this._attemptId=H(),this._networkTimeout=null,this._scriptElement=null},[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=K(this._dailyConfig);"object"===("undefined"==typeof document?"undefined":p(document))?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(2e4," ms) when loading call object bundle ").concat(e),type:"timeout"})},2e4);var r=document.getElementsByTagName("head")[0],n=document.createElement("script");this._scriptElement=n,n.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},n.onerror=function(e){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(e.target.src),type:e.message})},n.src=e,r.appendChild(n)}},{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)}}]),nO=function(e,t,r){return!0===nA(e.local,t,r)},nP=function(e,t,r,n){var i=nj(e,t,r,n);return i&&i.pendingTrack},nA=function(e,t,r){if(!e)return!1;var n=function(e){switch(e){case"avatar":return!0;case"staged":return e;default:return!!e}},i=e.public.subscribedTracks;return i&&i[t]?n(-1===["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(r)&&i[t].custom?[!0,"staged"].includes(i[t].custom)?i[t].custom:i[t].custom[r]:i[t][r]):!i||n(i.ALL)},nj=function(e,t,r,n){var i=Object.values(e.streams||{}).filter(function(e){return e.participantId===t&&e.type===r&&e.pendingTrack&&e.pendingTrack.kind===n}).sort(function(e,t){return new Date(t.starttime)-new Date(e.starttime)});return i&&i[0]},nI=function(e,t){var r=e.local.public.customTracks;
vendor: 8,454 bytes, line 4
4if(r&&r[t])return r[t].track};function nx(e,t){for(var r=t.getState(),n=0,i=["cam","screen"];n<i.length;n++)for(var a=i[n],s=0,o=["video","audio"];s<o.length;s++){var c=o[s],l="cam"===a?c:"screen".concat(c.charAt(0).toUpperCase()+c.slice(1)),u=e.tracks[l];if(u){var d=e.local?r.local.streams&&r.local.streams[a]&&r.local.streams[a].stream&&r.local.streams[a].stream["get".concat("video"===c?"Video":"Audio","Tracks")]()[0]:nP(r,e.session_id,a,c);"playable"===u.state&&(u.track=d),u.persistentTrack=d}}}function nL(e,t){try{var r,n=t.getState();for(var i in e.tracks){if(r=i,!["video","audio","screenVideo","screenAudio"].includes(r)){var a=e.tracks[i].kind;if(a){var s=e.tracks[i];if(s){var o=e.local?nI(n,i):nP(n,e.session_id,i,a);"playable"===s.state&&(e.tracks[i].track=o),s.persistentTrack=o}}else console.error("unknown type for custom track")}}}catch(e){console.error(e)}}function nD(e,t,r){var n=r.getState();if(e.local){if(e.audio)try{e.audioTrack=n.local.streams.cam.stream.getAudioTracks()[0],e.audioTrack||(e.audio=!1)}catch(e){}if(e.video)try{e.videoTrack=n.local.streams.cam.stream.getVideoTracks()[0],e.videoTrack||(e.video=!1)}catch(e){}if(e.screen)try{e.screenVideoTrack=n.local.streams.screen.stream.getVideoTracks()[0],e.screenAudioTrack=n.local.streams.screen.stream.getAudioTracks()[0],e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){}}else{var i=!0;try{var a=n.participants[e.session_id];a&&a.public&&a.public.rtcType&&"peer-to-peer"===a.public.rtcType.impl&&a.private&&!["connected","completed"].includes(a.private.peeringState)&&(i=!1)}catch(e){console.error(e)}if(!i)return e.audio=!1,e.audioTrack=!1,e.video=!1,e.videoTrack=!1,e.screen=!1,void(e.screenTrack=!1);try{if(n.streams,e.audio&&nO(n,e.session_id,"cam-audio")){var s=nP(n,e.session_id,"cam","audio");s&&(t&&t.audioTrack&&t.audioTrack.id===s.id?e.audioTrack=s:s.muted||(e.audioTrack=s)),e.audioTrack||(e.audio=!1)}if(e.video&&nO(n,e.session_id,"cam-video")){var o=nP(n,e.session_id,"cam","video");o&&(t&&t.videoTrack&&t.videoTrack.id===o.id?e.videoTrack=o:o.muted||(e.videoTrack=o)),e.videoTrack||(e.video=!1)}if(e.screen&&nO(n,e.session_id,"screen-audio")){var c=nP(n,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&&nO(n,e.session_id,"screen-video")){var l=nP(n,e.session_id,"screen","video");l&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===l.id?e.screenVideoTrack=l:l.muted||(e.screenVideoTrack=l))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){console.error("unexpected error matching up tracks",e)}}}function nN(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var nF=new Map,nR=null;function nB(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var nV=new Map,nU=null;function nJ(){var e;return rZ()||void 0!==(null==(e=navigator.mediaDevices)?void 0:e.ondevicechange)}var nq=new Set;function nz(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n$(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nz(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nz(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var nW=Object.freeze({VIDEO:"video",AUDIO:"audio",SCREEN_VIDEO:"screenVideo",SCREEN_AUDIO:"screenAudio",CUSTOM_VIDEO:"customVideo",CUSTOM_AUDIO:"customAudio"}),nH=Object.freeze({PARTICIPANTS:"participants",STREAMING:"streaming",TRANSCRIPTION:"transcription"}),nQ=Object.values(nW),nG=["v","a","sv","sa","cv","ca"];Object.freeze(nQ.reduce(function(e,t,r){return e[t]=nG[r],e},{})),Object.freeze(nG.reduce(function(e,t,r){return e[t]=nQ[r],e},{}));var nK=[nW.VIDEO,nW.AUDIO,nW.SCREEN_VIDEO,nW.SCREEN_AUDIO],nY=Object.values(nH),nX=["p","s","t"];Object.freeze(nY.reduce(function(e,t,r){return e[t]=nX[r],e},{})),Object.freeze(nX.reduce(function(e,t,r){return e[t]=nY[r],e},{}));var nZ=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.base,n=t.byUserId,i=t.byParticipantId;h(this,e),this.base=r,this.byUserId=n,this.byParticipantId=i}return g(e,[{key:"clone",value:function(){var t=new e;if(this.base instanceof n0?t.base=this.base.clone():t.base=this.base,void 0!==this.byUserId)for(var r in t.byUserId={},this.byUserId){var n=this.byUserId[r];t.byUserId[r]=n instanceof n0?n.clone():n}if(void 0!==this.byParticipantId)for(var i in t.byParticipantId={},this.byParticipantId){var a=this.byParticipantId[i];t.byParticipantId[i]=a instanceof n0?a.clone():a}return t}},{key:"toJSONObject",value:function(){var e={};if("boolean"==typeof this.base?e.base=this.base:this.base instanceof n0&&(e.base=this.base.toJSONObject()),void 0!==this.byUserId)for(var t in e.byUserId={},this.byUserId){var r=this.byUserId[t];e.byUserId[t]=r instanceof n0?r.toJSONObject():r}if(void 0!==this.byParticipantId)for(var n in e.byParticipantId={},this.byParticipantId){var i=this.byParticipantId[n];e.byParticipantId[n]=i instanceof n0?i.toJSONObject():i}return e}},{key:"toMinifiedJSONObject",value:function(){var e={};if(void 0!==this.base&&("boolean"==typeof this.base?e.b=this.base:e.b=this.base.toMinifiedJSONObject()),void 0!==this.byUserId)for(var t in e.u={},this.byUserId){var r=this.byUserId[t];e.u[t]="boolean"==typeof r?r:r.toMinifiedJSONObject()}if(void 0!==this.byParticipantId)for(var n in e.p={},this.byParticipantId){var i=this.byParticipantId[n];e.p[n]="boolean"==typeof i?i:i.toMinifiedJSONObject()}return e}},{key:"normalize",value:function(){return this.base instanceof n0&&(this.base=this.base.normalize()),this.byUserId&&(this.byUserId=Object.fromEntries(Object.entries(this.byUserId).map(function(e){var t=C(e,2),r=t[0],n=t[1];return[r,n instanceof n0?n.normalize():n]}))),this.byParticipantId&&(this.byParticipantId=Object.fromEntries(Object.entries(this.byParticipantId).map(function(e){var t=C(e,2),r=t[0],n=t[1];return[r,n instanceof n0?n.normalize():n]}))),this}}],[{key:"fromJSONObject",value:function(t){var r,n,i;if(void 0!==t.base&&(r="boolean"==typeof t.base?t.base:n0.fromJSONObject(t.base)),void 0!==t.byUserId)for(var a in n={},t.byUserId){var s=t.byUserId[a];n[a]="boolean"==typeof s?s:n0.fromJSONObject(s)}if(void 0!==t.byParticipantId)for(var o in i={},t.byParticipantId){var c=t.byParticipantId[o];i[o]="boolean"==typeof c?c:n0.fromJSONObject(c)}return new e({base:r,byUserId:n,byParticipantId:i})}},{key:"fromMinifiedJSONObject",value:function(t){var r,n,i;if(void 0!==t.b&&(r="boolean"==typeof t.b?t.b:n0.fromMinifiedJSONObject(t.b)),void 0!==t.u)for(var a in n={},t.u){var s=t.u[a];n[a]="boolean"==typeof s?s:n0.fromMinifiedJSONObject(s)}if(void 0!==t.p)for(var o in i={},t.p){var c=t.p[o];i[o]="boolean"==typeof c?c:n0.fromMinifiedJSONObject(c)}return new e({base:r,byUserId:n,byParticipantId:i})}},{key:"validateJSONObject",value:function(e){if("object"!==p(e))return[!1,"canReceive must be an object"];for(var t=["base","byUserId","byParticipantId"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(!t.includes(i))return[!1,"canReceive can only contain keys (".concat(t.join(", "),")")];if("base"===i){var a=C(n0.validateJSONObject(e.base,!0),2),s=a[0],o=a[1];if(!s)return[!1,o]}else{if("object"!==p(e[i]))return[!1,"invalid (non-object) value for field '".concat(i,"' in canReceive")];for(var c=0,l=Object.values(e[i]);c<l.length;c++){var u=l[c],d=C(n0.validateJSONObject(u),2),h=d[0],f=d[1];if(!h)return[!1,f]}}}return[!0]}}])}(),n0=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.video,n=t.audio,i=t.screenVideo,a=t.screenAudio,s=t.customVideo,o=t.customAudio;h(this,e),this.video=r,this.audio=n,this.screenVideo=i,this.screenAudio=a,this.customVideo=s,this.customAudio=o}return g(e,[{key:"clone",value:function(){var t=new e;return void 0!==this.video&&(t.video=this.video),void 0!==this.audio&&(t.audio=this.audio),void 0!==this.screenVideo&&(t.screenVideo=this.screenVideo),void 0!==this.screenAudio&&(t.screenAudio=this.screenAudio),void 0!==this.customVideo&&(t.customVideo=n$({},this.customVideo)),void 0!==this.customAudio&&(t.customAudio=n$({},this.customAudio)),t}}
vendor: 12,745 bytes, line 4
4,{key:"toJSONObject",value:function(){var e={};return void 0!==this.video&&(e.video=this.video),void 0!==this.audio&&(e.audio=this.audio),void 0!==this.screenVideo&&(e.screenVideo=this.screenVideo),void 0!==this.screenAudio&&(e.screenAudio=this.screenAudio),void 0!==this.customVideo&&(e.customVideo=n$({},this.customVideo)),void 0!==this.customAudio&&(e.customAudio=n$({},this.customAudio)),e}},{key:"toMinifiedJSONObject",value:function(){var e={};return void 0!==this.video&&(e.v=this.video),void 0!==this.audio&&(e.a=this.audio),void 0!==this.screenVideo&&(e.sv=this.screenVideo),void 0!==this.screenAudio&&(e.sa=this.screenAudio),void 0!==this.customVideo&&(e.cv=n$({},this.customVideo)),void 0!==this.customAudio&&(e.ca=n$({},this.customAudio)),e}},{key:"normalize",value:function(){function e(e,t){return e&&1===Object.keys(e).length&&e["*"]===t}return!(!0!==this.video||!0!==this.audio||!0!==this.screenVideo||!0!==this.screenAudio||!e(this.customVideo,!0)||!e(this.customAudio,!0))||(!1!==this.video||!1!==this.audio||!1!==this.screenVideo||!1!==this.screenAudio||!e(this.customVideo,!1)||!e(this.customAudio,!1))&&this}}],[{key:"fromBoolean",value:function(t){return new e({video:t,audio:t,screenVideo:t,screenAudio:t,customVideo:{"*":t},customAudio:{"*":t}})}},{key:"fromJSONObject",value:function(t){return new e({video:t.video,audio:t.audio,screenVideo:t.screenVideo,screenAudio:t.screenAudio,customVideo:void 0!==t.customVideo?n$({},t.customVideo):void 0,customAudio:void 0!==t.customAudio?n$({},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(e,t){if("boolean"==typeof e)return[!0];if("object"!==p(e))return[!1,"invalid (non-object, non-boolean) value in canReceive"];for(var r=Object.keys(e),n=0;n<r.length;n++){var i=r[n];if(!nQ.includes(i))return[!1,"invalid media type '".concat(i,"' in canReceive")];if(nK.includes(i)){if("boolean"!=typeof e[i])return[!1,"invalid (non-boolean) value for media type '".concat(i,"' in canReceive")]}else{if("object"!==p(e[i]))return[!1,"invalid (non-object) value for media type '".concat(i,"' in canReceive")];for(var a=0,s=Object.values(e[i]);a<s.length;a++)if("boolean"!=typeof s[a])return[!1,"invalid (non-boolean) value for entry within '".concat(i,"' in canReceive")];if(t&&void 0===e[i]["*"])return[!1,'canReceive "base" permission must specify "*" as an entry within \''.concat(i,"'")]}}return t&&r.length!==nQ.length?[!1,'canReceive "base" permission must specify all media types: '.concat(nQ.join(", ")," (or be set to a boolean shorthand)")]:[!0]}}])}(),n1=["result"],n2=["preserveIframe"];function n3(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n4(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n3(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n3(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function n5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(n5=function(){return!!e})()}function n6(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n9(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n9(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}function n9(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var n8={},n7="video",ie=rZ()?{data:{}}:{data:{},topology:"none"},it={present:0,hidden:0},ir={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},ii=Object.keys(ir),ia=["state","volume","simulcastEncodings"],is={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},io={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string",visualState:"'default' | 'sidebar-open' | 'active'"}},ic={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"}},il={customIntegrations:{validate:iI,help:iA()},customTrayButtons:{validate:ij,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(io))},url:{validate:function(e){return"string"==typeof e},help:"url should be a string"},baseUrl:{validate:function(e){return"string"==typeof e},help:"baseUrl should be a string"},token:{validate:function(e){return"string"==typeof e},help:"token should be a string",queryString:"t"},dailyConfig:{validate:function(e,t){try{return t.validateDailyConfig(e),!0}catch(e){console.error("Failed to validate dailyConfig",e)}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(e){return function e(t,r){if(void 0===r)return!1;switch(p(r)){case"string":return p(t)===r;case"object":if("object"!==p(t))return!1;for(var n in t)if(!e(t[n],r[n]))return!1;return!0;default:return!1}}(e,is)},help:"reactNativeConfig should look like ".concat(JSON.stringify(is),", 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 iw(e),!0}catch(e){return console.error(e),!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!0,allowLocalVideo:!0,allowLocalAudio:!0,activeSpeakerMode:!0,showLeaveButton:!0,showLocalVideo:!0,showParticipantsBar:!0,showFullscreenButton:!0,showUserNameChangeUI:!0,iframeStyle:!0,customLayout:!0,cssFile:!0,cssText:!0,bodyClass:!0,videoSource:{validate:function(e,t){var r;if("boolean"==typeof e)return t._preloadCache.allowLocalVideo=e,!0;if(e instanceof MediaStreamTrack)t._sharedTracks.videoTrack=e,r={customTrack:rW};else{if(delete t._sharedTracks.videoTrack,"string"!=typeof e)return console.error("videoSource must be a MediaStreamTrack, boolean, or a string"),!1;r={deviceId:e}}return t._updatePreloadCacheInputSettings({video:{settings:r}},!1),!0}},audioSource:{validate:function(e,t){var r;if("boolean"==typeof e)return t._preloadCache.allowLocalAudio=e,!0;if(e instanceof MediaStreamTrack)t._sharedTracks.audioTrack=e,r={customTrack:rW};else{if(delete t._sharedTracks.audioTrack,"string"!=typeof e)return console.error("audioSource must be a MediaStreamTrack, boolean, or a string"),!1;r={deviceId:e}}return t._updatePreloadCacheInputSettings({audio:{settings:r}},!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"],r=function(e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(!t.includes(i))return console.error('unsupported color "'.concat(i,'". Valid colors: ').concat(t.join(", "))),!1;if(!e[i].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return console.error("".concat(i,' theme color should be provided in valid hex color format. Received: "').concat(e[i],'"')),!1}return!0};return"object"===p(e)&&("light"in e&&"dark"in e||"colors"in e)?"light"in e&&"dark"in e?"colors"in e.light?"colors"in e.dark?r(e.light.colors)&&r(e.dark.colors):(console.error('Dark theme is missing "colors" property.',e),!1):(console.error('Light theme is missing "colors" property.',e),!1):r(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 iM(e,{allowAllParticipantsKey:!1})},help:iP({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error("Failed to validate send settings",e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var r;return!!iC(e)&&(t._inputSettings||(t._inputSettings={}),iE(e,null==(r=t.properties)?void 0:r.dailyConfig,t._sharedTracks),t._updatePreloadCacheInputSettings(e,!0),!0)},help:iO()},layout:{validate:function(e){return"custom-v1"===e||"browser"===e||"none"===e},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},iu={styles:{validate:function(e){for(var t in e)if("cam"!==t&&"screen"!==t)return!1;if(e.cam){for(var r in e.cam)if("div"!==r&&"video"!==r)return!1}if(e.screen){for(var n in e.screen)if("div"!==n&&"video"!==n)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 r=[!0,!1,"staged"];if(r.includes(e)||!rZ()&&"avatar"===e)return!0;var n=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"],i=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var a in e)if("custom"===a){if(!r.includes(e[a])&&!i(e[a],!0))return!1}else{var s=!t&&!n.includes(a),o=!r.includes(e[a]);if(s||o)return!1}return!0};return i(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(rZ()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return!1===e},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(e){for(var t=0,r=Object.entries(e);t<r.length;t++){var n=C(r[t],2),i=n[0],a=n[1];switch(i){case"hasPresence":if("boolean"!=typeof a)return!1;break;case"canSend":if(a instanceof Set||a instanceof Array||Array.isArray(a)){var s,o=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],c=n6(a);try{for(c.s();!(s=c.n()).done;){var l=s.value;if(!o.includes(l))return!1}}catch(e){c.e(e)}finally{c.f()}}else if("boolean"!=typeof a)return!1;
4(a instanceof Array||Array.isArray(a))&&(e.canSend=new Set(a));break;case"canReceive":var u=C(nZ.validateJSONObject(a),2),d=u[0],h=u[1];if(!d)return console.error(h),!1;break;case"canAdmin":if(a instanceof Set||a instanceof Array||Array.isArray(a)){var p,f=["participants","streaming","transcription"],v=n6(a);try{for(v.s();!(p=v.n()).done;){var g=p.value;if(!f.includes(g))return!1}}catch(e){v.e(e)}finally{v.f()}}else if("boolean"!=typeof a)return!1;(a instanceof Array||Array.isArray(a))&&(e.canAdmin=new Set(a));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, canReceive, and canAdmin permissions. hasPresence must be a boolean. canSend can be a boolean or an Array or Set of media types (video, audio, screenVideo, screenAudio, customVideo, customAudio). canReceive must be an object specifying base, byUserId, and/or byParticipantId fields (see documentation for more details). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}};Promise.any||(Promise.any=function(){var e=w(function*(e){return new Promise(function(t,r){var n=[];e.forEach(function(i){return Promise.resolve(i).then(function(e){t(e)}).catch(function(t){n.push(t),n.length===e.length&&r(n)})})})});return function(t){return e.apply(this,arguments)}}());var id=function(){var e,t,r,n,i,a,o,c,l,u,f,v,b,S,M,E,T,O,P,j,I,L,D,N,F,R,B,V,U,J,q,z,$,Q,Y,X,ee,et;function er(e){var t,r,n,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(h(this,er),i=y(i=er),k(n=m(this,n5()?Reflect.construct(i,a||[],y(this).constructor):i.apply(this,a)),"startListeningForDeviceChanges",function(){var e;e=n.handleDeviceChange,nJ()?nF.has(e)||(nF.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){var r;nF.has(e)&&(nF.get(e).lastDevicesString=JSON.stringify(t),nR||(r=w(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return nN(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nN(e,void 0):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}(nF.keys());try{for(r.s();!(e=r.n()).done;){var n=e.value,i=JSON.stringify(t);i!==nF.get(n).lastDevicesString&&(nF.get(n).lastDevicesString=i,n(t))}}catch(e){r.e(e)}finally{r.f()}}),nR=function(){return r.apply(this,arguments)},navigator.mediaDevices.addEventListener("devicechange",nR)))}).catch(function(){})):nV.has(e)||(nV.set(e,{}),navigator.mediaDevices.enumerateDevices().then(function(t){nV.has(e)&&(nV.get(e).lastDevicesString=JSON.stringify(t),nU||(nU=setInterval(w(function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return nB(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nB(e,void 0):void 0}}(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,a=e}
4,f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}(nV.keys());try{for(r.s();!(e=r.n()).done;){var n=e.value,i=JSON.stringify(t);i!==nV.get(n).lastDevicesString&&(nV.get(n).lastDevicesString=i,n(t))}}catch(e){r.e(e)}finally{r.f()}}),3e3)))}))}),k(n,"stopListeningForDeviceChanges",function(){var e;e=n.handleDeviceChange,nJ()?nF.has(e)&&(nF.delete(e),0===nF.size&&nR&&(navigator.mediaDevices.removeEventListener("devicechange",nR),nR=null)):nV.has(e)&&(nV.delete(e),0===nV.size&&nU&&(clearInterval(nU),nU=null))}),k(n,"handleDeviceChange",function(e){e=e.map(function(e){return JSON.parse(JSON.stringify(e))}),n.emitDailyJSEvent({action:"available-devices-updated",availableDevices:e})}),k(n,"handleNativeAppStateChange",(t=w(function*(e){if("destroyed"===e)return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield n.destroy());n.disableReactNativeAutoDeviceManagement("video")||("active"===e?n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!0):(n.camUnmutedBeforeLosingNativeActiveState=n.localVideo(),n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!1)))}),function(e){return t.apply(this,arguments)})),k(n,"handleNativeAudioFocusChange",function(e){n.disableReactNativeAutoDeviceManagement("audio")||(n._hasNativeAudioFocus=e,n.toggleParticipantAudioBasedOnNativeAudioFocus(),n._hasNativeAudioFocus?n.micUnmutedBeforeLosingNativeAudioFocus&&n.setLocalAudio(!0):(n.micUnmutedBeforeLosingNativeAudioFocus=n.localAudio(),n.setLocalAudio(!1)))}),k(n,"handleNativeSystemScreenCaptureStop",function(){n.stopScreenShare()}),n.strictMode=void 0===s.strictMode||s.strictMode,n.allowMultipleCallInstances=null!=(r=s.allowMultipleCallInstances)&&r,Object.keys(n8).length&&(n._logDuplicateInstanceAttempt(),!n.allowMultipleCallInstances)){if(n.strictMode)throw Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),n.callClientId=H(),n8[n.callClientId]=n,window._daily.instances[n.callClientId]={},n._sharedTracks={},window._daily.instances[n.callClientId].tracks=n._sharedTracks,s.dailyJsVersion=er.version(),n._iframe=e,n._callObjectMode="none"===s.layout&&!n._iframe,n._preloadCache={subscribeToTracksAutomatically:!0,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==s.showLocalVideo?n._callObjectMode?console.error("showLocalVideo is not available in call object mode"):n._showLocalVideo=!!s.showLocalVideo:n._showLocalVideo=!0,void 0!==s.showParticipantsBar?n._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):n._showParticipantsBar=!!s.showParticipantsBar:n._showParticipantsBar=!0,void 0!==s.customIntegrations?n._callObjectMode?console.error("customIntegrations is not available in call object mode"):n._customIntegrations=s.customIntegrations:n._customIntegrations={},void 0!==s.customTrayButtons?n._callObjectMode?console.error("customTrayButtons is not available in call object mode"):n._customTrayButtons=s.customTrayButtons:n._customTrayButtons={},void 0!==s.activeSpeakerMode?n._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):n._activeSpeakerMode=!!s.activeSpeakerMode:n._activeSpeakerMode=!1,s.receiveSettings?n._callObjectMode?n._receiveSettings=s.receiveSettings:console.error("receiveSettings is only available in call object mode"):n._receiveSettings={},n.validateProperties(s),n.properties=n4({},s),n._inputSettings||(n._inputSettings={}),n._callObjectLoader=n._callObjectMode?new nS(n.callClientId):null,n._callState="new",n._isPreparingToJoin=!1,n._accessState={access:rI},n._meetingSessionSummary={},n._finalSummaryOfPrevSession={},n._meetingSessionState=iN(ie,n._callObjectMode),n._nativeInCallAudioMode=n7,n._participants={},n._isScreenSharing=!1,n._participantCounts=it,n._rmpPlayerState={},n._waitingParticipants={},n._network={threshold:"good",quality:100,networkState:"unknown",stats:{}},n._activeSpeaker={},n._localAudioLevel=0,n._isLocalAudioLevelObserverRunning=!1,n._remoteParticipantsAudioLevel={},n._isRemoteParticipantsAudioLevelObserverRunning=!1,n._maxAppMessageSize=4096,n._messageChannel=rZ()?new np:new nu,n._iframe&&(n._iframe.requestFullscreen?n._iframe.addEventListener("fullscreenchange",function(){document.fullscreenElement===n._iframe?(n.emitDailyJSEvent({action:rF}),n.sendMessageToCallMachine({action:rF})):(n.emitDailyJSEvent({action:rR}),n.sendMessageToCallMachine({action:rR}))}):n._iframe.webkitRequestFullscreen&&n._iframe.addEventListener("webkitfullscreenchange",function(){document.webkitFullscreenElement===n._iframe?(n.emitDailyJSEvent({action:rF}),n.sendMessageToCallMachine({action:rF})):(n.emitDailyJSEvent({action:rR}),n.sendMessageToCallMachine({action:rR}))}
4)),rZ()){var o=n.nativeUtils();o.addAudioFocusChangeListener&&o.removeAudioFocusChangeListener&&o.addAppStateChangeListener&&o.removeAppStateChangeListener&&o.addSystemScreenCaptureStopListener&&o.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),n._hasNativeAudioFocus=!0,o.addAudioFocusChangeListener(n.handleNativeAudioFocusChange),o.addAppStateChangeListener(n.handleNativeAppStateChange),o.addSystemScreenCaptureStopListener(n.handleNativeSystemScreenCaptureStop)}return n._callObjectMode&&n.startListeningForDeviceChanges(),n._messageChannel.addListenerForMessagesFromCallMachine(n.handleMessageFromCallMachine,n.callClientId,n),n}return _(er,A),g(er,[{key:"destroy",value:(et=w(function*(){try{yield this.leave()}catch(e){}var e,t=this._iframe;if(t){var r=t.parentElement;r&&r.removeChild(t)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),rZ()){var n=this.nativeUtils();n.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),n.removeAppStateChangeListener(this.handleNativeAppStateChange),n.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete n8[this.callClientId],(null==(e=window)||null==(e=e._daily)?void 0:e.instances)&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=void 0)}),function(){return et.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(e){var t=e.bodyClass,r=e.cssFile,n=e.cssText;return ik(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(r),bodyClass:t,cssText:n}),this}},{key:"iframe",value:function(){return ik(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return ib(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return ib(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(e,t){for(var r in t){if(!iu[r])throw Error("unrecognized updateParticipant property ".concat(r));if(iu[r].validate&&!iu[r].validate(t[r],this,this._participants[e]))throw Error(iu[r].help)}}},{key:"updateParticipant",value:function(e,t){return this._participants.local&&this._participants.local.session_id===e&&(e="local"),e&&t&&(this.validateParticipantProperties(e,t),this.sendMessageToCallMachine({action:"update-participant",id:e,properties:t})),this}},{key:"updateParticipants",value:function(e){var t=this._participants.local&&this._participants.local.session_id;for(var r in e)r===t&&(r="local"),r&&e[r]&&this.validateParticipantProperties(r,e[r]);return this.sendMessageToCallMachine({action:"update-participants",participants:e}),this}},{key:"updateWaitingParticipant",value:(ee=w(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ib(this._callObjectMode,"updateWaitingParticipant()"),ip(this._callState,"updateWaitingParticipant()"),"string"!=typeof t||"object"!==p(r))throw Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise(function(n,i){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:t,updates:r},function(e){e.error&&i(e.error),e.id||i(Error("unknown error in updateWaitingParticipant()")),n({id:e.id})})})}),function(){return ee.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(X=w(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ib(this._callObjectMode,"updateWaitingParticipants()"),ip(this._callState,"updateWaitingParticipants()"),"object"!==p(t))throw Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise(function(r,n){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updates
4ById:t},function(e){e.error&&n(e.error),e.ids||n(Error("unknown error in updateWaitingParticipants()")),r({ids:e.ids})})})}),function(){return X.apply(this,arguments)})},{key:"requestAccess",value:(Y=w(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.access,n=void 0===r?{level:"full"}:r,i=t.name,a=void 0===i?"":i;return ib(this._callObjectMode,"requestAccess()"),ip(this._callState,"requestAccess()"),new Promise(function(t,r){e.sendMessageToCallMachine({action:"daily-method-request-access",access:n,name:a},function(e){e.error&&r(e.error),e.access||r(Error("unknown error in requestAccess()")),t({access:e.access,granted:e.granted})})})}),function(){return Y.apply(this,arguments)})},{key:"localAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.audio.state):null}},{key:"localVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.video.state):null}},{key:"setLocalAudio",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"forceDiscardTrack"in t&&(rZ()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),t={}):e&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),t={})),this.sendMessageToCallMachine({action:"local-audio",state:e,options:t}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:e}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(e){return this.sendMessageToCallMachine({action:"local-video",state:e}),this}},{key:"_setAllowLocalAudio",value:function(e){if(this._preloadCache.allowLocalAudio=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-audio",state:e}),this}},{key:"_setAllowLocalVideo",value:function(e){if(this._preloadCache.allowLocalVideo=e,this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-allow-local-video",state:e}),this}},{key:"getReceiveSettings",value:(Q=w(function*(e){var t=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,n=void 0!==r&&r;if(ib(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(p(e)){case"string":return new Promise(function(r){t.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:e,showInheritedValues:n},function(e){r(e.receiveSettings)})});case"undefined":return this._receiveSettings;default:throw Error('first argument to getReceiveSettings() must be a participant id (or "base"), or there should be no arguments')}}),function(e){return Q.apply(this,arguments)})},{key:"updateReceiveSettings",value:($=w(function*(e){var t=this;if(ib(this._callObjectMode,"updateReceiveSettings()"),!iM(e,{allowAllParticipantsKey:!0}))throw Error(iP({allowAllParticipantsKey:!0}));return ip(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise(function(r){t.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:e},function(e){r({receiveSettings:e.receiveSettings})})})}),function(e){return $.apply(this,arguments)})},{key:"_prepInputSettingsForSharing",value:function(e,t){if(e){var r={};if(e.audio){e.audio.settings&&(!Object.keys(e.audio.settings).length&&t||(r.audio={settings:n4({},e.audio.settings)})),t&&null!=(n=r.audio)&&null!=(n=n.settings)&&n.customTrack&&(r.audio.settings={customTrack:this._sharedTracks.audioTrack});var n,i,a,s="none"===(null==(i=e.audio.processor)?void 0:i.type)&&(null==(a=e.audio.processor)?void 0:a._isDefaultWhenNone);if(e.audio.processor&&!s){var o=n4({},e.audio.processor);delete o._isDefaultWhenNone,r.audio=n4(n4({},r.audio),{},{processor:o})}}if(e.video){e.video.settings&&(!Object.keys(e.video.settings).length&&t||(r.video={settings:n4({},e.video.settings)})),t&&null!=(c=r.video)&&null!=(c=c.settings)&&c.customTrack&&(r.video.settings={customTrack:this._sharedTracks.videoTrack});var c,l,u,d="none"===(null==(l=e.video.processor)?void 0:l.type)&&(null==(u=e.video.processor)?void 0:u._isDefaultWhenNone);if(e.video.processor&&!d){var h=n4({},e.video.processor);delete h._isDefaultWhenNone,r.video=n4(n4({},r.video),{},{processor:h})}}return r}}},{key:"getInputSettings",value:function(){var e=this;return ik(),new Promise(function(t){t(e._getInputSettings())})}},{key:"_getInputSettings",value:function(){var e,t,r,n,i,a,s={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(e=(null==(r=this._inputSettings)?void 0:r.video)||s,t=(null==(n=this._inputSettings)?void 0:n.audio)||s):(e=(null==(i=this._preloadCache)||null==(i=i.inputSettings)?void 0:i.video)||s,t=(null==(a=this._preloadCache)||null==(a=a.inputSettings)?void 0:a.audio)||s);var o={audio:t,video:e};return this._prepInputSettingsForSharing(o,!0)}},{key:"_updatePreloadCacheInputSettings",value:function(e,t){var r,n,i,a,s,o,c=this._inputSettings||{},l={};e.video?((l.video={},e.video.settings)?(l.video.settings={},t||e.video.settings.customTrack||null==(i=c.video)||!i.settings?l.video.settings=e.video.settings:l.video.settings=n4(n4({},c.video.settings),e.video.settings),Object.keys(l.video.settings).length||delete l.video.settings):null!=(r=c.video)&&r.settings&&(l.video.settings=c.video.settings),e.video.processor?l.video.processor=e.video.processor:null!=(n=c.video)&&n.processor&&(l.video.processor=c.video.processor)):c.video&&(l.video=c.video),e.audio?((l.audio={},e.audio.settings)?(l.audio.settings={},t||e.audio.settings.customTrack||null==(o=c.audio)||!o.settings?l.audio.settings=e.audio.settings:l.audio.settings=n4(n4({},c.audio.settings),e.audio.settings),Object.keys(l.audio.settings).length||delete l.audio.settings):null!=(a=c.audio)&&a.settings&&(l.audio.settings=c.audio.settings),e.audio.processor?l.audio.processor=e.audio.processor:null!=(s=c.audio)&&s.processor&&(l.audio.processor=c.audio.processor)):c.audio&&(l.audio=c.audio),this._maybeUpdateInputSettings(l)}},{key:"_devicesFromInputSettings",value:function(e){var t,r,n=(null==e||null==(t=e.video)||null==(t=t.settings)?void 0:t.deviceId)||null,i=(null==e||null==(r=e.audio)||null==(r=r.settings)?void 0:r.deviceId)||null,a=this._preloadCache.outputDeviceId||null;return{camera:n?{deviceId:n}:{},mic:i?{deviceId:i}:{},speaker:a?{deviceId:a}:{}}}},{key:"updateInputSettings",value:(z=w(function*(e){var t=this;return ik(),iC(e)?e.video||e.audio?(iE(e,this.properties.dailyConfig,this._sharedTracks),this._callObjectMode&&!this._callMachineInitialized?(this._updatePreloadCacheInputSettings(e,!0),this._getInputSettings()):new Promise(function(r,n){t.sendMessageToCallMachine({action:"update-input-sett
4ings",inputSettings:e},function(i){if(i.error)n(i.error);else{if(i.returnPreloadCache)return t._updatePreloadCacheInputSettings(e,!0),void r(t._getInputSettings());t._maybeUpdateInputSettings(i.inputSettings),r(t._prepInputSettingsForSharing(i.inputSettings,!0))}})})):this._getInputSettings():(console.error(iO()),Promise.reject(iO()))}),function(e){return z.apply(this,arguments)})},{key:"setBandwidth",value:function(e){var t=e.kbs,r=e.trackConstraints;if(ik(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:r}),this}},{key:"getDailyLang",value:function(){var e=this;if(ik(),this._callMachineInitialized)return new Promise(function(t){e.sendMessageToCallMachine({action:"get-daily-lang"},function(e){delete e.action,delete e.callbackStamp,t(e)})})}},{key:"setDailyLang",value:function(e){return ik(),this.sendMessageToCallMachine({action:"set-daily-lang",lang:e}),this}},{key:"setProxyUrl",value:function(e){return this.sendMessageToCallMachine({action:"set-proxy-url",proxyUrl:e}),this}},{key:"setIceConfig",value:function(e){return this.sendMessageToCallMachine({action:"set-ice-config",iceConfig:e}),this}},{key:"meetingSessionSummary",value:function(){return[rA,rj].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(q=w(function*(){var e=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),ip(this._callState,"getMeetingSession()"),new Promise(function(t){e.sendMessageToCallMachine({action:"get-meeting-session"},function(e){delete e.action,delete e.callbackStamp,t(e)})})}),function(){return q.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return ip(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";ib(this._callObjectMode,"setMeetingSessionData()"),ip(this._callState,"setMeetingSessionData");try{new nm({data:e,mergeStrategy:t})}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:"set-session-data",data:e,mergeStrategy:t})}catch(e){throw Error("Error setting meeting session data: ".concat(e))}}},{key:"setUserName",value:function(e,t){var r=this;return this.properties.userName=e,new Promise(function(n){r.sendMessageToCallMachine({action:"set-user-name",name:null!=e?e:"",thisMeetingOnly:rZ()||!!t&&!!t.thisMeetingOnly},function(e){delete e.action,delete e.callbackStamp,n(e)})})}},{key:"setUserData",value:(J=w(function*(e){var t=this;try{iw(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise(function(r){try{t.sendMessageToCallMachine({action:"set-user-data",userData:e},function(e){delete e.action,delete e.callbackStamp,r(e)})}catch(e){throw Error("Error setting user data: ".concat(e))}})}),function(e){return J.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(e){if(e&&(e<100||"number"!=typeof e))throw Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(e){var t=this;if("undefined"==typeof AudioWorkletNode&&!rZ())throw Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise(function(r,n){t.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:e},function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?n({error:e.error}):r()})});this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise(function(r,n){t.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:e},function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?n({error:e.error}):r()})});this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(U=w(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ib(this._callObjectMode,"startCamera()"),ig(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or set
4LocalVideo() instead?"),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(t),this.properties=n4(n4({},this.properties),t)}return new Promise(function(t){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"start-camera",properties:ih(e.properties,e.callClientId),preloadCache:ih(e._preloadCache,e.callClientId)},function(e){t({camera:e.camera,mic:e.mic,speaker:e.speaker})})})}),function(){return U.apply(this,arguments)})},{key:"validateCustomTrack",value:function(e,t,r){if(r&&r.length>50)throw Error("Custom track `trackName` must not be more than 50 characters");if(t&&"music"!==t&&"speech"!==t&&!(t instanceof Object))throw Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(r&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(r))throw 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(!(e instanceof MediaStreamTrack))throw Error("Custom tracks provided must be instances of MediaStreamTrack")}},{key:"startCustomTrack",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{track:track,mode:mode,trackName:trackName,ignoreAudioLevel:ignoreAudioLevel};return ik(),ip(this._callState,"startCustomTrack()"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise(function(r,n){e._sharedTracks.customTrack=t.track,t.track=rW,e.sendMessageToCallMachine({action:"start-custom-track",properties:t},function(e){e.error?n({error:e.error}):r(e.mediaTag)})})}},{key:"stopCustomTrack",value:function(e){var t=this;return ik(),ip(this._callState,"stopCustomTrack()"),new Promise(function(r){t.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:e},function(e){r(e.mediaTag)})})}},{key:"setCamera",value:function(e){var t=this;return iS(),im(this._callMachineInitialized,"setCamera()"),new Promise(function(r){t.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:e},function(e){r({device:e.device})})})}},{key:"setAudioDevice",value:(V=w(function*(e){return iS(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}}),function(e){return V.apply(this,arguments)})},{key:"cycleCamera",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(r){e.sendMessageToCallMachine({action:"cycle-camera",properties:t},function(e){r({device:e.device})})})}},{key:"cycleMic",value:function(){var e=this;return ik(),new Promise(function(t){e.sendMessageToCallMachine({action:"cycle-mic"},function(e){t({device:e.device})})})}},{key:"getCameraFacingMode",value:function(){var e=this;return iS(),new Promise(function(t){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},function(e){t(e.facingMode)})})}},{key:"setInputDevicesAsync",value:(B=w(function*(e){var t=this,r=e.audioDeviceId,n=e.videoDeviceId,i=e.audioSource,a=e.videoSource;if(ik(),void 0!==i&&(r=i),void 0!==a&&(n=a),"boolean"==typeof r&&(this._setAllowLocalAudio(r),r=void 0),"boolean"==typeof n&&(this._setAllowLocalVideo(n),n=void 0),!r&&!n)return yield this.getInputDevices();var s={};return r&&(r instanceof MediaStreamTrack?(this._sharedTracks.audioTrack=r,s.audio={settings:{customTrack:r=rW}}):(delete this._sharedTracks.audioTrack,s.audio={settings:{deviceId:r}})),n&&(n instanceof MediaStreamTrack?(this._sharedTracks.videoTrack=n,s.video={settings:{customTrack:n=rW}}):(delete this._sharedTracks.videoTrack,s.video={settings:{deviceId:n}})),this._callObjectMode&&this.needsLoad()?(this._updatePreloadCacheInputSettings(s,!1),this._devicesFromInputSettings(this._inputSettings)):new Promise(function(e){t.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:r,videoDeviceId:n},function(r){if(delete r.action,delete r.callbackStamp,r.returnPreloadCache)return t._updatePreloadCacheInputSettings(s,!1),void e(t._devicesFromInputSettings(t._inputSettings));e(r)})})}),function(e){return B.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(R=w(function*(e){var t=this,r=e.outputDeviceId;if(ik(),!r||"string"!=typeof r)throw Error("outputDeviceId must be provided and must be a valid device id");return this._preloadCache.outputDeviceId=r,this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(e,n){t.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:r},function(r){if(delete r.action,delete r.callbackStamp,r.error){var i=Error(r.error.message);return i.type=r.error.type,void n(i)}r.returnPreloadCache?e(t._devicesFromInputSettings(t._inputSettings)):e(r)})})}),function(e){return R.apply(this,arguments)})},{key:"getInputDevices",value:(F=w(function*(){var e=this;return this._callObjectMode&&this.needsLoad()?this._devicesFromInputSettings(this._inputSettings):new Promise(function(t){e.sendMessageToCallMachine({action:"get-input-devices"},function(r){r.returnPreloadCache?t(e._devicesFromInputSettings(e._inputSettings)):t({camera:r.camera,mic:r.mic,speaker:r.speaker})})})}),function(){return F.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return iS(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(iS(),[n7,"voice"].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&iv(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMo
4de(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",e)}},{key:"preAuth",value:(N=w(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ib(this._callObjectMode,"preAuth()"),ig(this._callState,this._isPreparingToJoin,"preAuth()"),this.needsLoad()&&(yield this.load(t)),!t.url)throw Error("preAuth() requires at least a url to be provided");return this.validateProperties(t),this.properties=n4(n4({},this.properties),t),new Promise(function(t,r){e._preloadCache.inputSettings=e._prepInputSettingsForSharing(e._inputSettings,!1),e.sendMessageToCallMachine({action:"daily-method-preauth",properties:ih(e.properties,e.callClientId),preloadCache:ih(e._preloadCache,e.callClientId)},function(n){return n.error?r(n.error):n.access?(e._didPreAuth=!0,void t({access:n.access})):r(Error("unknown error in preAuth()"))})})}),function(){return N.apply(this,arguments)})},{key:"load",value:(D=w(function*(e){var t=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error("Use after destroy");if(e&&(this.validateProperties(e),this.properties=n4(n4({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw Error("can't load iframe meeting because url property isn't set");return this._updateCallState(rE),this.emitDailyJSEvent({action:"loading"}),this._callObjectMode?new Promise(function(e,r){t._callObjectLoader.cancel();var n=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,function(r){t._bundleLoadTime=r?"no-op":Date.now()-n,t._updateCallState(rT),r&&t.emitDailyJSEvent({action:rL}),e()},function(e,n){if(t.emitDailyJSEvent({action:"load-attempt-failed"}),!n){t._updateCallState(rj),t.resetMeetingDependentVars();var i={action:rU,errorMsg:e.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:e,bundleUrl:K(t.properties.dailyConfig)}}};t._maybeSendToSentry(i),t.emitDailyJSEvent(i),r(e.msg)}})}):(this._iframe.src=G(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise(function(e,r){t._loadedCallback=function(n){t._callState!==rj?(t._updateCallState(rT),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e()):r(n)}}))}}),function(e){return D.apply(this,arguments)})},{key:"join",value:(L=w(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();var r=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(r=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(t.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=n4(n4({},this.properties),t)}return void 0!==t.showLocalVideo&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!t.showLocalVideo),void 0!==t.showParticipantsBar&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===rP||this._callState===rO?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(rO,!1),this.emitDailyJSEvent({action:"joining-meeting"}),this._preloadCache.inputSettings=this._prepInputSettingsForSharing(this._inputSettings||{},!1),this.sendMessageToCallMachine({action:"join-meeting",properties:ih(this.properties,this.callClientId),preloadCache:ih(this._preloadCache,this.callClientId)}),new Promise(function(t,n){e._joinedCallback=function(i,a){if(e._callState!==rj){if(e._updateCallState(rP),i)for(var s in i){if(e._callObjectMode){var o=e._callMachine().store;nx(i[s],o),nL(i[s],o),nD(i[s],e._participants[s],o)}e._participants[s]=n4({},i[s]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}r&&e.loadCss(e.properties),t(i)}else n(a)}}))}),function(){return L.apply(this,arguments)})},{key:"leave",value:(I=w(function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise(function(t){e._callState===rA||e._callState===rj?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(rA),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:rA}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:"leave-meeting"}))})}),function(){return I.apply(this,arguments)})},{key:"startScreenShare",value:(j=w(function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(im(this._callMachineInitialized,"startScreenShare()"),t.screenVideoSendSettings&&this._val
4idateVideoSendSettings("screenVideo",t.screenVideoSendSettings),t.mediaStream&&(this._sharedTracks.screenMediaStream=t.mediaStream,t.mediaStream=rW),"undefined"!=typeof DailyNativeUtils&&void 0!==DailyNativeUtils.isIOS&&DailyNativeUtils.isIOS){var r=this.nativeUtils();if(yield r.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:rV,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});r.setSystemScreenCaptureStartCallback(function(){r.setSystemScreenCaptureStartCallback(null),e.sendMessageToCallMachine({action:rq,captureOptions:t})}),r.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:rq,captureOptions:t})}),function(){return j.apply(this,arguments)})},{key:"stopScreenShare",value:function(){im(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type;if(t&&"cloud"!==t&&"raw-tracks"!==t&&"local"!==t)throw Error("invalid type: ".concat(t,", allowed values 'cloud', 'raw-tracks', or 'local'"));this.sendMessageToCallMachine(n4({action:"local-recording-start"},e))}},{key:"updateRecording",value:function(e){var t=e.layout,r=e.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:void 0===t?{preset:"default"}:t,instanceId:r})}},{key:"stopRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(n4({action:"local-recording-stop"},e))}},{key:"startLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(n4({action:"daily-method-start-live-streaming"},e))}},{key:"updateLiveStreaming",value:function(e){var t=e.layout,r=e.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:void 0===t?{preset:"default"}:t,instanceId:r})}},{key:"addLiveStreamingEndpoints",value:function(e){var t=e.endpoints,r=e.instanceId;this.sendMessageToCallMachine({action:rz,endpointsOp:"add-endpoints",endpoints:t,instanceId:r})}},{key:"removeLiveStreamingEndpoints",value:function(e){var t=e.endpoints,r=e.instanceId;this.sendMessageToCallMachine({action:rz,endpointsOp:"remove-endpoints",endpoints:t,instanceId:r})}},{key:"stopLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
4this.sendMessageToCallMachine(n4({action:"daily-method-stop-live-streaming"},e))}},{key:"validateDailyConfig",value:function(e){e.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),r9()&&e.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw Error("encodings must be an Array");if(!iD(e.length,1,3))throw Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var n=0;n<e.length;n++){var i=e[n];for(var a in this._validateEncodingLayerHasValidProperties(i),i)if(ii.includes(a)){if("number"!=typeof i[a])throw Error("".concat(a," must be a number"));if(t){var s=t[a],o=s.min,c=s.max;if(!iD(i[a],o,c))throw Error("".concat(a," value not in range. valid range: ").concat(o," to ").concat(c))}}else if(!["active","scalabilityMode"].includes(a))throw Error("Invalid key ".concat(a,", valid keys are:")+Object.values(ii));if(r&&!i.hasOwnProperty("maxBitrate"))throw Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(P=w(function*(e){var t=this,r=e.url,n=e.settings,i=void 0===n?{state:rG.PLAY}:n;try{!function(e){if("string"!=typeof e)throw Error('url parameter must be "string" type')}(r),iL(i),function(e){for(var t in e)if(!ia.includes(t))throw Error("Invalid key ".concat(t,", valid keys are: ").concat(ia));e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,ir,!0)}(i)}catch(e){throw console.error("invalid argument Error: ".concat(e)),console.error('startRemoteMediaPlayer arguments must be of the form:\n  { url: "playback url",\n  settings?:\n  {state: "play"|"pause", simulcastEncodings?: [{}] } }'),e}return new Promise(function(e,n){t.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:r,settings:i},function(t){t.error?n({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})})})}),function(e){return P.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(O=w(function*(e){var t=this;if("string"!=typeof e)throw Error(" remotePlayerID must be of type string");return new Promise(function(r,n){t.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:e},function(e){e.error?n({error:e.error,errorMsg:e.errorMsg}):r()})})}),function(e){return O.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(T=w(function*(e){var t=this,r=e.session_id,n=e.settings;try{iL(n)}catch(e){throw console.error("invalid argument Error: ".concat(e)),console.error('updateRemoteMediaPlayer arguments must be of the form:\n  session_id: "participant session",\n  { settings?: {state: "play"|"pause"} }'),e}return new Promise(function(e,i){t.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:r,settings:n},function(t){t.error?i({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})})})}),function(e){return T.apply(this,arguments)})},{key:"startTranscription",value:function(e){ip(this._callState,"startTranscription()"),this.sendMessageToCallMachine(n4({action:"daily-method-start-transcription"},e))}},{key:"updateTranscription",value:function(e){if(ip(this._callState,"updateTranscription()"),!e)throw Error("updateTranscription Error: options is mandatory");if("object"!==p(e))throw Error("updateTranscription Error: options must be object type");if(e.participants&&!Array.isArray(e.participants))throw Error("updateTranscription Error: participants must be an array");this.sendMessageToCallMachine(n4({action:"daily-method-update-transcription"},e))}},{key:"stopTranscription",value:function(e){if(ip(this._callState,"stopTranscription()"),e&&"object"!==p(e))throw Error("stopTranscription 
4Error: options must be object type");if(e&&!e.instanceId)throw Error('"instanceId" not provided');this.sendMessageToCallMachine(n4({action:"daily-method-stop-transcription"},e))}},{key:"startDialOut",value:(E=w(function*(e){var t=this;ip(this._callState,"startDialOut()");var r=function(e){if(e){if(!Array.isArray(e))throw Error("Error starting dial out: audio codec must be an array");if(e.length<=0)throw Error("Error starting dial out: audio codec array specified but empty");e.forEach(function(e){if("string"!=typeof e)throw Error("Error starting dial out: audio codec must be a string");if("OPUS"!==e&&"PCMU"!==e&&"PCMA"!==e&&"G722"!==e)throw Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")})}};if(!e.sipUri&&!e.phoneNumber)throw Error("Error starting dial out: either a sip uri or phone number must be provided");if(e.sipUri&&e.phoneNumber)throw Error("Error starting dial out: only one of sip uri or phone number must be provided");if(e.sipUri){if("string"!=typeof e.sipUri)throw Error("Error starting dial out: sipUri must be a string");if(!e.sipUri.startsWith("sip:"))throw Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(e.video&&"boolean"!=typeof e.video)throw Error("Error starting dial out: video must be a boolean value");var n=e.codecs;if(n&&(r(n.audio),n.video)){if(!Array.isArray(n.video))throw Error("Error starting dial out: video codec must be an array");if(n.video.length<=0)throw Error("Error starting dial out: video codec array specified but empty");n.video.forEach(function(e){if("string"!=typeof e)throw Error("Error starting dial out: video codec must be a string");if("H264"!==e&&"VP8"!==e)throw Error("Error starting dial out: video codec must be H264 or VP8")})}}if(e.phoneNumber){if("string"!=typeof e.phoneNumber)throw Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(e.phoneNumber))throw Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");e.codecs&&r(e.codecs.audio)}if(e.callerId){if("string"!=typeof e.callerId)throw Error("Error starting dial out: callerId must be a string");if(e.sipUri)throw Error("Error starting dial out: callerId not allowed with sipUri")}if(e.displayName){if("string"!=typeof e.displayName)throw Error("Error starting dial out: displayName must be a string");if(e.displayName.length>=200)throw Error("Error starting dial out: displayName length must be less than 200")}if(e.userId){if("string"!=typeof e.userId)throw Error("Error starting dial out: userId must be a string");if(e.userId.length>36)throw Error("Error starting dial out: userId length must be less than or equal to 36")}if(e.permissions&&e.permissions.canReceive){var i=C(nZ.validateJSONObject(e.permissions.canReceive),2),a=i[0],s=i[1];if(!a)throw Error(s)}return new Promise(function(r,n){t.sendMessageToCallMachine(n4({action:"dialout-start"},e),function(e){e.error?n(e.error):r(e)})})}),function(e){return E.apply(this,arguments)})},{key:"stopDialOut",value:function(e){var t=this;return ip(this._callState,"stopDialOut()"),new Promise(function(r,n){t.sendMessageToCallMachine(n4({action:"dialout-stop"},e),function(e){e.error?n(e.error):r(e)})})}},{key:"sipCallTransfer",value:(M=w(function*(e){var t=this;if(ip(this._callState,"sipCallTransfer()"),!e)throw Error("sipCallTransfer() requires a sessionId and toEndPoint");return e.useSipRefer=!1,ix(e,"sipCallTransfer"),new Promise(function(r,n){t.sendMessageToCallMachine(n4({action:rY},e),function(e){e.error?n(e.error):r(e)})})}),function(e){return M.apply(this,arguments)})},{key:"sipRefer",value:(S=w(function*(e){var t=this;if(ip(this._callState,"sipRefer()"),!e)throw Error("sessionId and toEndPoint are mandatory parameter");return e.useSipRefer=!0,ix(e,"sipRefer"),new Promise(function(r,n){t.sendMessageToCallMachine(n4({action:rY},e),function(e){e.error?n(e.error):r(e)})})}),function(e){return S.apply(this,arguments)})},{key:"sendDTMF",value:(b=w(function*(e){var t=this;return ip(this._callState,"sendDTMF()"),function(e){var t=e.sessionId,r=e.tones;if(!t||!r)throw Error("sessionId and tones are mandatory parameter");if("string"!=typeof t||"string"!=typeof r)throw Error("sessionId and tones should be of string type");if(r.length>20)throw Error("tones string must be upto 20 characters");var n=r.match(/[^0-9A-D*#]/g);
vendor: 4,378 bytes, line 4
4if(n&&n[0])throw Error("".concat(n[0]," is not valid DTMF tone"))}(e),new Promise(function(r,n){t.sendMessageToCallMachine(n4({action:"send-dtmf"},e),function(e){e.error?n(e.error):r(e)})})}),function(e){return b.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var e=this;return this._callState!==rP?Promise.resolve(n4({stats:{latest:{}}},this._network)):new Promise(function(t){e.sendMessageToCallMachine({action:"get-calc-stats"},function(r){t(n4(n4({},e._network),{},{stats:r.stats}))})})}},{key:"testWebsocketConnectivity",value:(v=w(function*(){var e=this;if(iy(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}return new Promise(function(t,r){e.sendMessageToCallMachine({action:"test-websocket-connectivity"},function(e){e.error?r(e.error):t(e.results)})})}),function(){return v.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(e){return e?e instanceof MediaStreamTrack?!!(e&&"live"===e.readyState&&(!e.muted||nq.has(e.id)))||(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=w(function*(){var e=this;ik(),ib(this._callObjectMode,"testCallQuality()"),im(this._callMachineInitialized,"testCallQuality()",null,!0),ig(this._callState,this._isPreparingToJoin,"testCallQuality()");var t=this._testCallAlreadyInProgress,r=function(r){t||(e._testCallInProgress=r)};if(r(!0),this.needsLoad())try{var n=this._callState;yield this.load(),this._callState=n}catch(e){return r(!1),Promise.reject(e)}return new Promise(function(t){e.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:e.properties.dailyJsVersion},function(n){var i=n.results,a=i.result,s=d(i,n1);if("failed"===a){var o,c=n4({},s);null!=(o=s.error)&&o.details?(s.error.details=JSON.parse(s.error.details),c.error=n4(n4({},c.error),{},{details:n4({},c.error.details)}),c.error.details.duringTest="testCallQuality"):(c.error=c.error?n4({},c.error):{},c.error.details={duringTest:"testCallQuality"}),e._maybeSendToSentry(c)}r(!1),t(n4({result:a},s))})})}),function(){return f.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(u=w(function*(e){rZ()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),t=yield this.testPeerToPeerCallQuality(e)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),t=yield this.testCallQuality());var t,r={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(r.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),r}),function(e){return u.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(l=w(function*(e){var t=this;if(iy(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var r=e.videoTrack,n=e.duration;if(!this._validateVideoTrackForNetworkTests(r))throw Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=r,new Promise(function(e,r){t.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:n},function(t){t.error?r(t.error):e(t.results)})})}),function(e){return l.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){rZ()?(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=w(function*(e){var t=this;if(iy(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}
4if(!this._validateVideoTrackForNetworkTests(e))throw Error("Video track error");return this._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise(function(e,r){t.sendMessageToCallMachine({action:"test-network-connectivity"},function(t){t.error?r(t.error):e(t.results)})})}),function(e){return c.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var e=this;return new Promise(function(t){e._callState===rP?e.sendMessageToCallMachine({action:"get-cpu-load-stats"},function(e){t(e.cpuStats)}):t({cpuLoadState:void 0,cpuLoadStateReason:void 0,stats:{}})})}},{key:"_validateEncodingLayerHasValidProperties",value:function(e){var t;if(!((null==(t=Object.keys(e))?void 0:t.length)>0))throw Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(ii))}},{key:"_validateVideoSendSettings",value:function(e,t){var r="screenVideo"===e?["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"],n="Video send settings should be either an object or one of the supported presets: ".concat(r.join());if("string"==typeof t){if(!r.includes(t))throw Error(n)}else{if("object"!==p(t))throw Error(n);if(!t.maxQuality&&!t.encodings&&void 0===t.allowAdaptiveLayers)throw Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(t.maxQuality&&-1===["low","medium","high"].indexOf(t.maxQuality))throw Error("maxQuality must be either low, medium or high");if(t.encodings){var i=!1;switch(Object.keys(t.encodings).length){case 1:i=!t.encodings.low;break;case 2:i=!t.encodings.low||!t.encodings.medium;break;case 3:i=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:i=!0}if(i)throw Error("Encodings must be defined as: low, low and medium, or low, medium and high.");t.encodings.low&&this._validateEncodingLayerHasValidProperties(t.encodings.low),t.encodings.medium&&this._validateEncodingLayerHasValidProperties(t.encodings.medium),t.encodings.high&&this._validateEncodingLayerHasValidProperties(t.encodings.high)}}}},{key:"validateUpdateSendSettings",value:function(e){var t=this;if(!e||0===Object.keys(e).length)throw Error("Send settings must contain at least information for one track!");Object.entries(e).forEach(function(e){var r=C(e,2),n=r[0],i=r[1];t._validateVideoSendSettings(n,i)})}},{key:"updateSendSettings",value:function(e){var t=this;return this.validateUpdateSendSettings(e),this.needsLoad()?(this._preloadCache.sendSettings=e,{sendSettings:this._preloadCache.sendSettings}):new Promise(function(r,n){t.sendMessageToCallMachine({action:"update-send-settings",sendSettings:e},function(e){e.error?n(e.error):r(e.sendSettings)})})}},{key:"getSendSettings",value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:"getLocalAudioLevel",value:function(){return this._localAudioLevel}},{key:"getRemoteParticipantsAudioLevel",value:function(){return this._remoteParticipantsAudioLevel}},{key:"getActiveSpeaker",value:function(){return ik(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return ik(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return ik(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){return ip(this._callState,"setSubscribeToTracksAutomatically()","Use the subscribeToTracksAutomatically configuration property."),this._preloadCache.subscribeToTracksAutomatically=e,this.sendMessageToCallMachine({action:"daily-method-subscribe-to-tracks-automatically",enabled:e}),this}},{key:"enumerateDevices",value:(o=w(function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===r7()&&ne().major>115&&ne().major<123&&(t=t.filter(function(e){return"audiooutput"!==e.kind})),{devices:t.map(function(e){var t=JSON.parse(JSON.stringify(e));if(!rZ()&&"videoinput"===e.kind&&e.getCapabilities){var r,n=e.getCapabilities();t.facing=(null==n||null==(r=n.facingMode)?void 0:r.length)>=1?n.facingMode[0]:void 0}return t})}}return new Promise(function(t){e.sendMessageToCallMachine({action:"enumerate-devices"},function(e){t({devices:e.devices})})})}),function(){return o.apply(this,arguments)})},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(ip(this._callState,"sendAppMessage()"),JSON.stringify(e).length>this._maxAppMessageSize)throw Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:e,to:t}),this}},{key:"addFakeParticipant",value:function(e){return ik(),ip(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(n4({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return i_(this._callObjectMode,"setShowNamesMode()"),ik(),e&&"always"!==e&&"never"!==e?console.error('setShowNamesMode argument should be "always", "never", or false'):this.sendMessageToCallMachine({action:"set-show-names",mode:e}),this}},{key:"setShowLocalVideo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return i_(this._callObjectMode,"setShowLocalVideo()"),ik(),ip(this._callState,"setShowLocalVideo()"),"boolean"!=typeof e?console.error("setShowLocalVideo only accepts a boolean value"):(this.sendMessageToCallMachine({action:"set-show-local-video",show:e}),this._showLocalVideo=e),this}},{key:"showLocalVideo",value:function(){return i_(this._callObjectMode,"showLocalVideo()"),ik(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return i_(this._callObjectMode,"setShowParticipantsBar()"),ik(),ip(this._callState,"setShowParticipantsBar()"),"boolean"!=typeof e?console.error("setShowParticipantsBar only accepts a boolean value"):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:e}),this._showParticipantsBar=e),this}},{key:"showParticipantsBar",value:function(){return i_(this._callObjectMode,"showParticipantsBar()"),ik(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return ik(),i_(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(e){return ik(),i_(this._callObjectMode,"setCustomIntegrations()"),ip(this._callState,"setCustomIntegrations()"),iI(e)&&(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:e}),this._customIntegrations=e),this}},{key:"startCustomIntegrations",value:function(e){var t=this;if(ik(),i_(this._callObjectMode,"startCustomIntegrations()"),ip(this._callState,"startCustomIntegrations()"),Array.isArray(e)&&e.some(function(e){return"string"!=typeof e})||!Array.isArray(e)&&"string"!=typeof e)return console.error("startCustomIntegrations() only accepts string | string[]"),this;var r="string"==typeof e?[e]:e,n=r.filter(function(e){return!(e in t._customIntegrations)});return n.length?console.error("Can't find custom integration(s): \"".concat(n.join(", "),'"')):this.sendMessageToCallMachine({action:"start-custom-integrations",ids:r}),this}},{key:"stopCustomIntegrations",value:function(e){var t=this;if(ik(),i_(this._callObjectMode,"stopCustomIntegrations()"),ip(this._callState,"stopCustomIntegrations()"),Array.isArray(e)&&e.some(function(e){return"string"!=typeof e})||!Array.isArray(e)&&"string"!=typeof e)return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var r="string"==typeof e?[e]:e,n=r.filter(function(e){return!(e in t._customIntegrations)});return n.length?console.error("Can't find custom integration(s): \"".concat(n.join(", "),'"')):this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:r}),this}},{key:"customTrayButtons",value:function(){return i_(this._callObjectMode,"customTrayButtons()"),ik(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(e){return i_(this._callObjectMode,"updateCustomTrayButtons()"),ik(),ip(this._callState,"updateCustomTrayButtons()"),ij(e)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:e}),this._customTrayButtons=e):console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(io))),this}},{key:"theme",value:function(){return i_(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(e){var t=this;return i_(this._callObjectMode,"setTheme()"),new Promise(function(r,n){try{t.validateProperties({theme:e}),t.properties.theme=n4({},e),t.sendMessageToCallMachine({action:"set-theme",theme:t.properties.theme});try{t.emitDailyJSEvent({action:"theme-updated",theme:t.properties.theme})}catch(e){console.log("could not emit 'theme-updated'",e)}r(t.properties.theme)}catch(e){n(e)}})}},{key:"requestFullscreen",value:(a=w(function*(){if(ik(),this._iframe&&!document.fullscreenElement&&r1())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log("could not make video call fullscreen",e)}}),function(){return a.apply(this,arguments)})},{key:"exitFullscreen",value:function(){ik(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(i=w(function*(){var e=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise(function(t){e.sendMessageToCallMachine({action:"get-sidebar-view"},function(e){t(e.view)})})}),function(){return i.apply(this,arguments)})},{key:"setSidebarView",value:function(e){return this._callObjectMode?console.error("setSidebarView is not available in callObject mode"):this.sendMessageToCallMachine({action:"set-sidebar-view",view:e}),this}},{key:"room",value:(n=w(function*(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
4).includeRoomConfigDefaults,r=void 0===t||t;return this._accessState.access===rI||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise(function(t){e.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:r},function(e){delete e.action,delete e.callbackStamp,t(e)})})}),function(){return n.apply(this,arguments)})},{key:"geo",value:(r=w(function*(){try{var e=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield e.json()).geo}}catch(e){return console.error("geo lookup failed",e),{current:""}}}),function(){return r.apply(this,arguments)})},{key:"setNetworkTopology",value:(t=w(function*(e){var t=this;return ik(),ip(this._callState,"setNetworkTopology()"),new Promise(function(r,n){t.sendMessageToCallMachine({action:"set-network-topology",opts:e},function(e){e.error?n({error:e.error}):r({workerId:e.workerId})})})}),function(e){return t.apply(this,arguments)})},{key:"getNetworkTopology",value:(e=w(function*(){var e=this;return new Promise(function(t,r){e.needsLoad()&&t({topology:"none"}),e.sendMessageToCallMachine({action:"get-network-topology"},function(e){e.error?r({error:e.error}):t({topology:e.topology})})})}),function(){return e.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(e){if(ik(),"number"!=typeof e&&!0!==e&&!1!==e)throw Error("argument to setShouldPlayNewParticipantSound should be true, false, or a number, but is ".concat(e));this.sendMessageToCallMachine({action:"daily-method-set-play-ding",arg:e})}},{key:"on",value:function(e,t){return A.prototype.on.call(this,e,t)}},{key:"once",value:function(e,t){return A.prototype.once.call(this,e,t)}},{key:"off",value:function(e,t){return A.prototype.off.call(this,e,t)}},{key:"validateProperties",value:function(e){var t,r;if(null!=e&&null!=(t=e.dailyConfig)&&t.userMediaAudioConstraints){rZ()||console.warn("userMediaAudioConstraints is deprecated. You can override constraints with inputSettings.audio.settings, found in DailyCallOptions.");var n,i,a=e.inputSettings||{};a.audio=(null==(n=e.inputSettings)?void 0:n.audio)||{},a.audio.settings=(null==(i=e.inputSettings)||null==(i=i.audio)?void 0:i.settings)||{},a.audio.settings=n4(n4({},a.audio.settings),e.dailyConfig.userMediaAudioConstraints),e.inputSettings=a,delete e.dailyConfig.userMediaAudioConstraints}if(null!=e&&null!=(r=e.dailyConfig)&&r.userMediaVideoConstraints){rZ()||console.warn("userMediaVideoConstraints is deprecated. You can override constraints with inputSettings.video.settings, found in DailyCallOptions.");var s,o,c=e.inputSettings||{};c.video=(null==(s=e.inputSettings)?void 0:s.video)||{},c.video.settings=(null==(o=e.inputSettings)||null==(o=o.video)?void 0:o.settings)||{},c.video.settings=n4(n4({},c.video.settings),e.dailyConfig.userMediaVideoConstraints),e.inputSettings=c,delete e.dailyConfig.userMediaVideoConstraints}for(var l in e){if(!il[l])throw Error("unrecognized property '".concat(l,"'"));if(il[l].validate&&!il[l].validate(e[l],this))throw Error("property '".concat(l,"': ").concat(il[l].help))}}},{key:"assembleMeetingUrl",value:function(){var e,t,r=n4(n4({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:null!=(e=this.properties.dailyConfig)&&e.proxyUrl?encodeURIComponent(null==(t=this.properties.dailyConfig)?void 0:t.proxyUrl):void 0}),n=r.url.match(/\?/)?"&":"?";return r.url+n+Object.keys(il).filter(function(e){return il[e].queryString&&void 0!==r[e]}).map(function(e){return"".concat(il[e].queryString,"=").concat(r[e])}).join("&")}},{key:"needsLoad",value:function(){return["new",rE,rA,rj].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(e,t){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(e,t,this.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:"handleMessageFromCallMachine",value:function(e){switch(e.action){case"iframe-ready-for-launch-config":this.sendMessageToCallMachine(n4({action:"iframe-launch-config"},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!0;var t={action:r$,level:"log",code:1011,stats:{event:"bundle load",time:"no-op"===this._bundleLoadTime?0:this._bundleLoadTime,preLoaded:"no-op"===this._bundleLoadTime,url:K(this.properties.dailyConfig)}
4};this.sendMessageToCallMachine(t),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case rL:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(e);break;case"joined-meeting":var r,n=n4({},e);delete n.internal,this._maxAppMessageSize=(null==(r=e.internal)?void 0:r._maxAppMessageSize)||4096,this._joinedCallback&&(this._joinedCallback(e.participants),this._joinedCallback=null),this.emitDailyJSEvent(n);break;case"participant-joined":case"participant-updated":if(this._callState===rA)return;if(e.participant&&e.participant.session_id){var i=e.participant.local?"local":e.participant.session_id;if(this._callObjectMode){var a=this._callMachine().store;nx(e.participant,a),nL(e.participant,a),nD(e.participant,this._participants[i],a)}try{this.maybeParticipantTracksStopped(this._participants[i],e.participant),this.maybeParticipantTracksStarted(this._participants[i],e.participant),this.maybeEventRecordingStopped(this._participants[i],e.participant),this.maybeEventRecordingStarted(this._participants[i],e.participant)}catch(e){console.error("track events error",e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[i])||(this._participants[i]=n4({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case"participant-left":if(e.participant&&e.participant.session_id){var s=this._participants[e.participant.session_id];s&&this.maybeParticipantTracksStopped(s,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case"participant-counts-updated":x(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case"access-state-updated":var o={access:e.access};e.awaitingAccess&&(o.awaitingAccess=e.awaitingAccess),x(this._accessState,o)||(this._accessState=o,this.emitDailyJSEvent(e));break;case"meeting-session-summary-updated":if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var c=n4(n4({},e),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(c)}break;case rU:this._iframe&&!e.preserveIframe&&(this._iframe.src=""),this._updateCallState(rj),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(e.errorMsg),this._loadedCallback=null),e.preserveIframe;var l,u=d(e,n2);null!=u&&null!=(l=u.error)&&l.details&&(u.error.details=JSON.parse(u.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&(this._joinedCallback(null,u),this._joinedCallback=null),this.emitDailyJSEvent(u);break;case"left-meeting":this._callState!==rj&&this._updateCallState(rA),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(e);break;case"selected-devices-updated":e.devices&&this.emitDailyJSEvent(e);break;case"network-quality-change":var h=e.state,p=e.threshold,f=e.quality,v=h.state,g=h.reasons;v===this._network.networkState&&x(g,this._network.networkStateReasons)&&p===this._network.threshold&&f===this._network.quality||(this._network.networkState=v,this._network.networkStateReasons=g,this._network.quality=f,this._network.threshold=p,e.networkState=v,g.length&&(e.networkStateReasons=g),delete e.state,this.emitDailyJSEvent(e));break;case"cpu-load-change":e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case"face-counts-updated":e&&void 0!==e.faceCounts&&this.emitDailyJSEvent(e);break;case"active-speaker-change":var m=e.activeSpeaker;this._activeSpeaker.peerId!==m.peerId&&(this._activeSpeaker.peerId=m.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var y=e.show;this._showLocalVideo=y,this.emitDailyJSEvent({action:e.action,show:y});break;case"active-speaker-mode-change":var b=e.enabled;this._activeSpeakerMode!==b&&(this._activeSpeakerMode=b,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case"waiting-participant-added":case"waiting-participant-updated":case"waiting-participant-removed":this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;
4case"receive-settings-updated":x(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case rB:this._maybeUpdateInputSettings(e.inputSettings);break;case"send-settings-updated":x(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case"local-audio-level":this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case"remote-media-player-started":var _=e.session_id;this._rmpPlayerState[_]=e.playerState,this.emitDailyJSEvent(e);break;case"remote-media-player-stopped":delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case"remote-media-player-updated":var k=e.session_id,S=this._rmpPlayerState[k];S&&this.compareEqualForRMPUpdateEvent(S,e.remoteMediaPlayerState)||(this._rmpPlayerState[k]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(e);break;case"meeting-session-state-updated":var w=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=iN(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||w)&&this.emitDailyJSEvent(e);break;case"local-screen-share-started":this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case"local-screen-share-stopped":case"local-screen-share-canceled":this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case rD:case rN:case"recording-stats":case"recording-error":case"recording-upload-completed":case"transcription-started":case"transcription-stopped":case"transcription-error":case"started-camera":case"camera-error":case"app-message":case"transcription-message":case"test-completed":case"network-connection":case"recording-data":case"live-streaming-started":case"live-streaming-updated":case"live-streaming-stopped":case"live-streaming-error":case rV:case"lang-updated":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(e);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(e,t){var r="record";e&&(t.local||!1!==t[r]||e[r]===t[r]||this.emitDailyJSEvent({action:rN}))}},{key:"maybeEventRecordingStarted",value:function(e,t){var r="record";e&&(t.local||!0!==t[r]||e[r]===t[r]||this.emitDailyJSEvent({action:rD}))}},{key:"_trackStatePlayable",value:function(e){return!(!e||"playable"!==e.state)}},{key:"_trackChanged",value:function(e,t){return(null==e?void 0:e.id)!==(null==t?void 0:t.id)}},{key:"maybeEventTrackStopped",value:function(e,t,r){var n,i,a=null!=(n=null==t?void 0:t.tracks[e])?n:null,s=null!=(i=null==r?void 0:r.tracks[e])?i:null,o=null==a?void 0:a.track;if(o){var c=this._trackStatePlayable(a),l=this._trackStatePlayable(s),u=this._trackChanged(o,null==s?void 0:s.track);c&&(l&&!u||this.emitDailyJSEvent({action:"track-stopped",track:o,participant:null!=r?r:t,type:e}))}}},{key:"maybeEventTrackStarted",value:function(e,t,r){var n,i,a=null!=(n=null==t?void 0:t.tracks[e])?n:null,s=null!=(i=null==r?void 0:r.tracks[e])?i:null,o=null==s?void 0:s.track;if(o){var c=this._trackStatePlayable(a),l=this._trackStatePlayable(s),u=this._trackChanged(null==a?void 0:a.track,o);l&&(c&&!u||this.emitDailyJSEvent({action:"track-started",track:o,participant:r,type:e}))}}},{key:"maybeParticipantTracksStopped",value:function(e,t){if(e)for(var r in e.tracks)this.maybeEventTrackStopped(r,e,t)}},{key:"maybeParticipantTracksStarted",value:function(e,t){if(t)for(var r in t.tracks)this.maybeEventTrackStarted(r,e,t)}},{key:"compareEqualForRMPUpdateEvent",value:function(e,t){var r,n;return e.state===t.state&&(null==(r=e.settings)?void 0:r.volume)===(null==(n=t.settings)?void 0:n.volume)}},{key:"emitDailyJSEvent",value:function(e){try{e.callClientId=this.callClientId,this.emit
vendor: 2,785 bytes, line 4
4(e.action,e)}catch(t){console.log("could not emit",e,t)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(e,t){return!!x(e,t)&&(!e.videoTrack||!t.videoTrack||e.videoTrack.id===t.videoTrack.id&&e.videoTrack.muted===t.videoTrack.muted&&e.videoTrack.enabled===t.videoTrack.enabled)&&(!e.audioTrack||!t.audioTrack||e.audioTrack.id===t.audioTrack.id&&e.audioTrack.muted===t.audioTrack.muted&&e.audioTrack.enabled===t.audioTrack.enabled)}},{key:"nativeUtils",value:function(){return rZ()?"undefined"==typeof DailyNativeUtils?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(e){this._updateCallState(this._callState,e)}},{key:"_updateCallState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var r=this._callState,n=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=this._callState===rP;this.updateShowAndroidOngoingMeetingNotification(i);var a=iv(r,n),s=iv(this._callState,this._isPreparingToJoin);a!==s&&(this.updateKeepDeviceAwake(s),this.updateDeviceAudioMode(s),this.updateNoOpRecordingEnsuringBackgroundContinuity(s))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=it,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:rI},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=iN(ie,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=4096,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(e){rZ()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(e){if(rZ()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(rZ()&&this.nativeUtils().setShowOngoingMeetingNotification){var t,r,n,i;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var a=this.properties.reactNativeConfig.androidInCallNotification;t=a.title,r=a.subtitle,n=a.iconName,i=a.disableForCustomOverride}i&&(e=!1),this.nativeUtils().setShowOngoingMeetingNotification(e,t,r,n,this.callClientId)}}}
4,{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(e){rZ()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var e;if(rZ()){var t=null==(e=this._callMachine())||null==(e=e.store)?void 0:e.getState();for(var r in null==t?void 0:t.streams){var n=t.streams[r];n&&n.pendingTrack&&"audio"===n.pendingTrack.kind&&(n.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:"absoluteUrl",value:function(e){if(void 0!==e){var t=document.createElement("a");return t.href=e,t.href}}},{key:"sayHello",value:function(){var e="hello, world.";return console.log(e),e}},{key:"_logUseAfterDestroy",value:function(){var e=Object.values(n8)[0];if(this.needsLoad())if(e&&!e.needsLoad()){var t={action:r$,level:"error",code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var r={action:r$,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(r,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var e=0,t=Object.values(n8);e<t.length;e++){var r=t[e];r._callMachineInitialized?(r.sendMessageToCallMachine({action:r$,level:"warn",code:this.allowMultipleCallInstances?9993:9992}),r._delayDuplicateInstanceLog=!1):r._delayDuplicateInstanceLog=!0}}},{key:"_maybeSendToSentry",value:function(e){if(!(null!=(n=e.error)&&n.type&&(!["connection-error","end-of-life",rx].includes(e.error.type)||e.error.type===rx&&e.error.msg.includes("deleted")))){var t=null!=(i=this.properties)&&i.url?new URL(this.properties.url):void 0,r="production";t&&t.host.includes(".staging.daily")&&(r="staging");var n,i,a,o,c,l,u,d,h,p=new rn({dsn:"https://[email protected]/168844",transport:rd,stackParser:ry,integrations:(function(e){let t,r=[((e={})=>({name:"InboundFilters",processEvent:(t,r,n)=>!function(e,t){var r;return!!(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e)||(r=t.ignoreErrors,!e.type&&r&&r.length&&(function(e){let t,r=[];e.message&&r.push(e.message);try{t=e.exception.values[e.exception.values.length-1]}catch(e){}return t&&t.value&&(r.push(t.value),t.type&&r.push(`${t.type}: ${t.value}`)),r})(e).some(e=>eR(e,r))))||!(e.type||!e.exception||!e.exception.values||0===e.exception.values.length||e.message||e.exception.values.some(e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))||!!function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;let r=e.transaction;return!!r&&eR(r,t)}(e,t.ignoreTransactions)||!!function(e,t){if(!t||!t.length)return!1;let r=tW(e);return!!r&&eR(r,t)}(e,t.denyUrls)||!function(e,t){if(!t||!t.length)return!0;let r=tW(e);return!r||eR(r,t)}(e,t.allowUrls)}(t,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:t$],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,n.getOptions()))?t:null}))(),{name:"FunctionToString",setupOnce(){s=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=eJ(this),r=tz.has(tc())&&void 0!==t?t:this;return s.apply(r,e)}}catch(e){}},setup(e){tz.set(e,!0)}},((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&eB(Z,"setTimeout",rk),t.setInterval&&eB(Z,"setInterval",rk),t.requestAnimationFrame&&eB(Z,"requestAnimationFrame",rS),t.XMLHttpRequest&&"XMLHttpRequest"in Z&&eB(XMLHttpRequest.prototype,"send",rw);let e=t.eventTarget;e&&(Array.isArray(e)?e:r_).forEach(rM)}}})(),((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){var r;t.console&&function(e){let t="console";ep(t,e),ef(t,tK)}(function(t){var r;if(tc()!==e)return;let n={category:"console",data:{arguments:t.args,logger:"console"},level:"warn"===(r=t.level)?"warning":["fatal","error","warning","log","info","debug"].includes(r)?r:"log",message:eF(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${eF(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}tq(n,{input:t.args,level:t.level})}),t.dom&&(r=t.dom,ep("dom",function(t){if(tc()!==e)return;let n,i,a="object"==typeof r?r.serializeAttribute:void 0,s="object"==typeof r&&"number"==typeof r.maxStringLength?r.maxStringLength:void 0;s&&s>
41024&&(s=1024),"string"==typeof a&&(a=[a]);try{let e=t.event,r=e&&e.target?e.target:e;n=eD(r,{keyAttrs:a,maxStringLength:s}),i=function(e){if(!Z.HTMLElement)return null;let t=e;for(let e=0;e<5&&t;e++){if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}(r)}catch(e){n="<unknown>"}if(0===n.length)return;let o={category:`ui.${t.name}`,message:n};i&&(o.data={"ui.component_name":i}),tq(o,{event:t.event,name:t.name,global:t.global})}),ef("dom",ri)),t.xhr&&(ep("xhr",function(t){if(tc()!==e)return;let{startTimestamp:r,endTimestamp:n}=t,i=t.xhr[rl];if(!r||!n||!i)return;let{method:a,url:s,status_code:o,body:c}=i,l={xhr:t.xhr,input:c,startTimestamp:r,endTimestamp:n};tq({category:"xhr",data:{method:a,url:s,status_code:o},type:"http",level:t0(o)},l)}),ef("xhr",ru)),t.fetch&&function(e,t){let r="fetch";ep(r,e),ef(r,()=>(function(e,t=!1){(!t||function(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Z))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(t1(Z.fetch))return!0;let e=!1,t=Z.document;if(t&&"function"==typeof t.createElement)try{let r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=t1(r.contentWindow.fetch)),t.head.removeChild(r)}catch(e){}return e}())&&eB(Z,"fetch",function(t){return function(...r){let n=Error(),{method:i,url:a}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){let[t,r]=e;return{url:t3(t),method:t2(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:t3(t),method:t2(t,"method")?String(t.method).toUpperCase():"GET"}}(r),s={args:r,fetchData:{method:i,url:a},startTimestamp:1e3*eQ(),virtualError:n};return e||ev("fetch",{...s}),t.apply(Z,r).then(async t=>(e?e(t):ev("fetch",{...s,endTimestamp:1e3*eQ(),response:t}),t),e=>{throw ev("fetch",{...s,endTimestamp:1e3*eQ(),error:e}),ew(e)&&void 0===e.stack&&(e.stack=n.stack,eV(e,"framesToPop",1)),e})}})})(void 0,void 0))}(function(t){if(tc()!==e)return;let{startTimestamp:r,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error)tq({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:r,endTimestamp:n});else{let e=t.response,i={...t.fetchData,status_code:e&&e.status},a={input:t.args,response:e,startTimestamp:r,endTimestamp:n};tq({category:"fetch",data:i,type:"http",level:t0(i.status_code)},a)}}),t.history&&rs(function(t){if(tc()!==e)return;let r=t.from,n=t.to,i=tG(Z.location.href),a=r?tG(r):void 0,s=tG(n);a&&a.path||(a=i),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),tq({category:"navigation",data:{from:r,to:n}})}),t.sentry&&e.on("beforeSendEvent",function(t){tc()===e&&tq({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:function(e){let{message:t,event_id:r}=e;if(t)return t;let n=eK(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}(t)},{event:t})})}}})(),((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&!function(e){let t="error";ep(t,t=>{let{stackParser:r,attachStacktrace:n}=rC();if(tc()!==e||t4>0)return;let{msg:i,url:a,line:s,column:o,error:c}=t,l=function(e,t,r,n){let i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{},o=s.stacktrace=s.stacktrace||{},c=o.frames=o.frames||[],l=eT(t)&&t.length>0?t:function(){try{return Z.document.location.href}catch(e){return""}}();return 0===c.length&&c.push({colno:n,filename:l,function:"?",in_app:!0,lineno:r}),e}(rt(r,c||i,void 0,n,!1),a,s,o);l.level="error",tA(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})}),ef(t,em)}(e),t.onunhandledrejection&&!function(e){let t="unhandledrejection";ep(t,t=>{let{stackParser:r,attachStacktrace:n}=rC();if(tc()!==e||t4>0)return;let i=function(e){if(eP(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(t),a=eP(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:rt(r,i,void 0,n,!0);a.level="error",tA(a,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}),ef(t,eb)}(e)}}})(),((e={})=>{let t=e.limit||5,r=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,n,i){let a=i.getOptions();
4!function(e,t,r=250,n,i,a,s){if(!(a.exception&&a.exception.values&&s&&ex(s.originalException,Error)))return;let o=a.exception.values.length>0?a.exception.values[a.exception.values.length-1]:void 0;o&&(a.exception.values=(function e(t,r,n,i,a,s,o,c){if(s.length>=n+1)return s;let l=[...s];if(ex(i[a],Error)){tH(o,c);let s=t(r,i[a]),u=l.length;tQ(s,a,u,c),l=e(t,r,n,i[a],a,[s,...l],s,u)}return Array.isArray(i.errors)&&i.errors.forEach((i,s)=>{if(ex(i,Error)){tH(o,c);let u=t(r,i),d=l.length;tQ(u,`errors[${s}]`,d,c),l=e(t,r,n,i,a,[u,...l],u,d)}}),l})(e,t,i,s.originalException,n,a.exception.values,o,0).map(e=>(e.value&&(e.value=eN(e.value,r)),e)))}(t6,a.stackParser,a.maxValueLength,r,t,e,n)}}})(),{name:"Dedupe",processEvent(e){if(e.type)return e;try{var r;if((r=t)&&(function(e,t){let r=e.message,n=t.message;return(!!r||!!n)&&(!r||!!n)&&(!!r||!n)&&r===n&&!!tX(e,t)&&!!tY(e,t)&&!0}(e,r)||function(e,t){let r=tZ(t),n=tZ(e);return!!r&&!!n&&r.type===n.type&&r.value===n.value&&!!tX(e,t)&&!!tY(e,t)}(e,r)))return null}catch(e){}return t=e}},{name:"HttpContext",preprocessEvent(e){if(!Z.navigator&&!Z.location&&!Z.document)return;let t=e.request&&e.request.url||Z.location&&Z.location.href,{referrer:r}=Z.document||{},{userAgent:n}=Z.navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},a={...e.request,...t&&{url:t},headers:i};e.request=a}}];return!1!==e.autoSessionTracking&&r.push({name:"BrowserSession",setupOnce(){void 0!==Z.document&&(tj({ignoreDuration:!0}),tL(),rs(({from:e,to:t})=>{void 0!==e&&e!==t&&(tj({ignoreDuration:!0}),tL())}))}}),r})({}).filter(function(e){return!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(e.name)}),environment:r}),f=new e7;if(f.setClient(p),p.init(),this.session_id&&f.setExtra("sessionId",this.session_id),this.properties){var v=n4({},this.properties);v.userName=v.userName?"[Filtered]":void 0,v.userData=v.userData?"[Filtered]":void 0,v.token=v.token?"[Filtered]":void 0,f.setExtra("properties",v)}if(t){var g=t.searchParams.get("domain");if(!g){var m=t.host.match(/(.*?)\./);g=m&&m[1]||""}g&&f.setTag("domain",g)}e.error&&(f.setTag("fatalErrorType",e.error.type),f.setExtra("errorDetails",e.error.details),(null==(c=e.error.details)?void 0:c.uri)&&f.setTag("serverAddress",e.error.details.uri),(null==(l=e.error.details)?void 0:l.workerGroup)&&f.setTag("workerGroup",e.error.details.workerGroup),(null==(u=e.error.details)?void 0:u.geoGroup)&&f.setTag("geoGroup",e.error.details.geoGroup),(null==(d=e.error.details)?void 0:d.on)&&f.setTag("connectionAttempt",e.error.details.on),null!=(h=e.error.details)&&h.bundleUrl&&(f.setTag("bundleUrl",e.error.details.bundleUrl),f.setTag("bundleError",e.error.details.sourceError.type))),f.setTags({callMode:this._callObjectMode?rZ()?"reactNative":null!=(a=this.properties)&&null!=(a=a.dailyConfig)&&null!=(a=a.callMode)&&a.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:er.version()});var y=(null==(o=e.error)?void 0:o.msg)||e.errorMsg;f.captureException(Error(y))}}},{key:"_callMachine",value:function(){var e;return null==(e=window._daily)||null==(e=e.instances)||null==(e=e[this.callClientId])?void 0:e.callMachine}},{key:"_maybeUpdateInputSettings",value:function(e){if(!x(this._inputSettings,e)){var t=this._getInputSettings();this._inputSettings=e;var r=this._getInputSettings();x(t,r)||this.emitDailyJSEvent({action:rB,inputSettings:r})}}}],[{key:"supportedBrowser",value:function(){if(rZ())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=W.getParser(rX());return{supported:!!r6(),mobile:"mobile"===e.getPlatformType(),name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!r1(),supportsScreenShare:!!(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")&&(13!==t.major||0!==t.minor||0!==t.point);case"Firefox":return t.major>=67}return!0}(r7(),ne())||rZ())),supportsSfu:!!r6(),supportsVideoProcessing:r4(),supportsAudioProcessing:r5()}}},{key:"version",value:function(){return"0.83.1"}},{key:"createCallObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.layout="none",new er(null,e)}},{key:"wrap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ik(),!e||!e.contentWindow||"string"!=typeof e.src)throw Error("DailyIframe::Wrap needs an iframe-like first argument");return t.layout||(t.customLayout?t.layout="custom-v1":t.layout="browser"),new er(e,t)}},{key:"createFrame",value:function(e,t){ik(),e&&t?(r=e,n=t):e&&e.append?(r=e,n={}):(r=document.body,n=e||{});var r,n,i=n.iframeStyle;i||(i=r===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var a=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?a.allow="microphone, camera":a.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",a.style.visibility="hidden",r.appendChild(a),a.style.visibility=null,Object.keys(i).forEac
4h(function(e){return a.style[e]=i[e]}),n.layout||(n.customLayout?n.layout="custom-v1":n.layout="browser");try{return new er(a,n)}catch(e){throw r.removeChild(a),e}}},{key:"createTransparentFrame",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ik();var t=document.createElement("iframe");return t.allow="microphone; camera; autoplay",t.style.cssText="\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      border: 0;\n      pointer-events: none;\n    ",document.body.appendChild(t),e.layout||(e.layout="custom-v1"),er.wrap(t,e)}},{key:"getCallInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?n8[e]:Object.values(n8)[0]}}])}();function ih(e,t){var r={};for(var n in e)if(e[n]instanceof MediaStreamTrack)console.warn("MediaStreamTrack found in props or cache.",n),r[n]=rW;else if("dailyConfig"===n){if(e[n].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[n].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[n].modifyLocalSdpHook}if(e[n].modifyRemoteSdpHook){var a=window._daily.instances[t].customCallbacks||{};a.modifyRemoteSdpHook=e[n].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=a,delete e[n].modifyRemoteSdpHook}r[n]=e[n]}else r[n]=e[n];return r}function ip(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==rP){var r="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(r+=" ".concat(t)),console.error(r),Error(r)}}function iv(e,t){return[rO,rP].includes(e)||t}function ig(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"This daily-js method",n=arguments.length>3?arguments[3]:void 0;if(iv(e,t)){var i="".concat(r," not supported after joining a meeting.");throw n&&(i+=" ".concat(n)),console.error(i),Error(i)}}function im(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method",r=arguments.length>2?arguments[2]:void 0;if(!e){var n="".concat(t,arguments.length>3&&void 0!==arguments[3]&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw r&&(n+=" ".concat(r)),console.error(n),Error(n)}}function iy(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(t),Error(t)}}function ib(e){if(!e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),Error(t)}}function i_(e){if(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(t),Error(t)}}function ik(){if(rZ())throw Error("This daily-js method is not currently supported in React Native")}function iS(){if(!rZ())throw Error("This daily-js method is only supported in React Native")}function iw(e){var t;if(void 0===e)return!0;if("string"==typeof e)t=e;else try{t=JSON.stringify(e),x(JSON.parse(t),e)||console.warn("The userData provided will be modified when serialized.")}catch(e){throw Error("userData must be serializable to JSON: ".concat(e))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function iM(e,t){for(var r=t.allowAllParticipantsKey,n=function(e){return!!(void 0===e.layer||Number.isInteger(e.layer)&&e.layer>=0||"inherit"===e.layer)},i=0,a=Object.entries(e);i<a.length;i++){var s=C(a[i],2),o=s[0],c=s[1];if(!function(e){var t=["local"];return r||t.push("*"),e&&!t.includes(e)}(o)||!(c&&!(c.video&&!n(c.video))&&!(c.screenVideo&&!n(c.screenVideo))))return!1}return!0}function iC(e){if("object"!==p(e))return!1;for(var t=0,r=Object.entries(e);t<r.length;t++){var n=C(r[t],2),i=n[0],a=n[1];switch(i){case"video":if("object"!==p(a))return!1;for(var s=0,o=Object.entries(a);s<o.length;s++){var c=C(o[s],2),l=c[0],u=c[1];switch(l){case"processor":if(!function(e){if(rZ())return console.warn("Video processing is not yet supported in React Native"),!1;var t,r=["type","config"];return!!e&&"object"===p(e)&&!!("string"==typeof(t=e.type)&&(Object.values(rH).includes(t)||(console.error("inputSettings video processor type invalid"),0)))&&(!e.config||"object"===p(e.config)&&!!function(e,t){var r,n=Object.keys(t);if(0===n.length)return!0;var i="invalid object in inputSettings -> video -> processor -> config";switch(e){case rH.BGBLUR:return n.length>1||"strength"!==n[0]?(console.error(i),!1):!("number"!=typeof t.strength||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error("".concat(i,"; expected: {0 < strength <= 1}, got: ").concat(t.strength)),!1);case rH.BGIMAGE:return!(void 0!==t.source&&!("default"===t.source?(t.type="default",!0):t.source instanceof ArrayBuffer||(Y(t.source)?(t.type="url",!!function(e){var t=new URL(e),r=t.pathname;if("data:"===t.protocol)try{var n=r.substring(r.indexOf(":")+1,r.indexOf(";")).split("/")[1];return rK.includes(n)}catch(e){return console.error("failed to deduce blob content type",e),!1}var i=r.split(".").at(-1).toLowerCase().trim();return rK.includes(i)}(t.source)||(console.error("invalid image type; supported types: [".concat(rK.join(", "),"]")),!1)):isNaN(r=Number(t.source))||!Number.isInteger(r)||r<=0||r>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(t.type="daily-preselect",!0))));default:return!0}}(e.type,e.config))&&(Object.keys(e).filter(function(e){return!r.includes(e)}
4).forEach(function(t){console.warn("invalid key inputSettings -> video -> processor : ".concat(t)),delete e[t]}),!0)}(u))return!1;break;case"settings":if(!iT(u))return!1;break;default:return!1}}break;case"audio":if("object"!==p(a))return!1;for(var d=0,h=Object.entries(a);d<h.length;d++){var f=C(h[d],2),v=f[0],g=f[1];switch(v){case"processor":if(!function(e){if(rZ())return console.warn("Video processing is not yet supported in React Native"),!1;var t,r=["type"];return!!e&&"object"===p(e)&&(Object.keys(e).filter(function(e){return!r.includes(e)}).forEach(function(t){console.warn("invalid key inputSettings -> audio -> processor : ".concat(t)),delete e[t]}),!!("string"==typeof(t=e.type)&&(Object.values(rQ).includes(t)||(console.error("inputSettings audio processor type invalid"),0))))}(g))return!1;break;case"settings":if(!iT(g))return!1;break;default:return!1}}break;default:return!1}}return!0}function iE(e,t,r){var n,i=[];e.video&&e.video.processor&&(r4(null!=(n=null==t?void 0:t.useLegacyVideoProcessor)&&n)||(e.video.settings?delete e.video.processor:delete e.video,i.push("video"))),e.audio&&e.audio.processor&&(r5()||(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?(r.audioTrack=e.audio.settings.customTrack,e.audio.settings={customTrack:rW}):delete r.audioTrack),e.video&&e.video.settings&&(e.video.settings.customTrack?(r.videoTrack=e.video.settings.customTrack,e.video.settings={customTrack:rW}):delete r.videoTrack)}function iT(e){return"object"===p(e)&&(!e.customTrack||e.customTrack instanceof MediaStreamTrack)}function iO(){var e=Object.values(rH).join(" | "),t=Object.values(rQ).join(" | ");return"inputSettings must be of the form: { video?: { processor?: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function iP(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat("base").concat(t?' | "'.concat("*",'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function iA(){return"customIntegrations should be an object of type ".concat(JSON.stringify(ic),".")}function ij(e){if(e&&"object"!==p(e)||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(io),".")),!1;if(e)for(var t=0,r=Object.entries(e);t<r.length;t++)for(var n=C(r[t],1)[0],i=0,a=Object.entries(e[n]);i<a.length;i++){var s=C(a[i],2),o=s[0],c=s[1],l=io.id[o];if(!l)return console.error("customTrayButton does not support key ".concat(o)),!1;switch(o){case"iconPath":case"iconPathDarkMode":if(!Y(c))return console.error("customTrayButton ".concat(o," should be a url.")),!1;break;case"visualState":if(!["default","sidebar-open","active"].includes(c))return console.error("customTrayButton ".concat(o," should be ").concat(l,". Got: ").concat(c)),!1;break;default:if(p(c)!==l)return console.error("customTrayButton ".concat(o," should be a ").concat(l,".")),!1}}return!0}function iI(e){if(!e||e&&"object"!==p(e)||Array.isArray(e))return console.error(iA()),!1;for(var t=function(e){return"".concat(e," should be ").concat(ic.id[e])},r=function(e,t){return console.error("customIntegration ".concat(e,": ").concat(t))},n=0,i=Object.entries(e);n<i.length;n++){var a=C(i[n],1)[0];if(!("label"in e[a]))return r(a,"label is required"),!1;if(!("location"in e[a]))return r(a,"location is required"),!1;if(!("src"in e[a])&&!("srcdoc"in e[a]))return r(a,"src or srcdoc is required"),!1;for(var s=0,o=Object.entries(e[a]);s<o.length;s++){var c=C(o[s],2),l=c[0],u=c[1];switch(l){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if("string"!=typeof u)return r(a,t(l)),!1;break;case"iconURL":if(!Y(u))return r(a,"".concat(l," should be a url")),!1;break;case"src":if("srcdoc"in e[a])return r(a,"cannot have both src and srcdoc"),!1;if(!Y(u))return r(a,'src "'.concat(u,'" is not a valid URL')),!1;break;case"srcdoc":if("src"in e[a])return r(a,"cannot have both src and srcdoc"),!1;if("string"!=typeof u)return r(a,t(l)),!1;break;case"location":if(!["main","sidebar"].includes(u))return r(a,t(l)),!1;break;case"controlledBy":if("*"!==u&&"owners"!==u&&(!Array.isArray(u)||u.some(function(e){return"string"!=typeof e})))return r(a,t(l)),!1;break;case"shared":if((!Array.isArray(u)||u.some(function(e){return"string"!=typeof e}))&&"owners"!==u&&"boolean"!=typeof u)return r(a,t(l)),!1;break;default:if(!ic.id[l])return console.error("customIntegration does not support key ".concat(l)),!1}}}return!0}function ix(e,t){var r=e.sessionId,n=e.toEndPoint,i=e.callerId,a=e.useSipRefer;if(!r||!n)throw Error("".concat(t,"() requires a sessionId and toEndPoint"));if("string"!=typeof r||"string"!=typeof n)throw Error("Invalid paramater: sessionId and toEndPoint must be of type string");if(a&&!n.startsWith("sip:"))throw Error('"toEndPoint" must be a "sip" address');
4if(!n.startsWith("sip:")&&!n.startsWith("+"))throw Error("toEndPoint: ".concat(n,' must starts with either "sip:" or "+"'));if(i&&"string"!=typeof i)throw Error("callerId must be of type string");if(i&&!n.startsWith("+"))throw Error("callerId is only valid when transferring to a PSTN number")}function iL(e){if("object"!==p(e))throw Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(rG).includes(e.state))throw Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(rG));if(e.volume){if("number"!=typeof e.volume)throw Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(e.volume<0||e.volume>2)throw Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function iD(e,t,r){return!("number"!=typeof e||e<t||e>r)}function iN(e,t){return e&&!t&&delete e.data,e}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.