-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path349.vg_bundle.js
1 lines (1 loc) · 221 KB
/
349.vg_bundle.js
1
"use strict";(self.webpackChunkcustom_vf_nextjs=self.webpackChunkcustom_vf_nextjs||[]).push([[349],{4190:(e,t,n)=>{function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t,n,r,i,o,s){try{var a=e[o](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var s=e.apply(t,n);function a(e){i(s,r,o,a,c,"next",e)}function c(e){i(s,r,o,a,c,"throw",e)}a(void 0)}))}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return a="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},a(e)}function c(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===a(t)?t:String(t)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function u(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function f(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function _(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n.r(t),n.d(t,{DAILY_ACCESS_LEVEL_FULL:()=>Cr,DAILY_ACCESS_LEVEL_LOBBY:()=>Mr,DAILY_ACCESS_LEVEL_NONE:()=>Ar,DAILY_ACCESS_UNKNOWN:()=>Tr,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:()=>Gr,DAILY_CAMERA_ERROR_CAM_IN_USE:()=>Vr,DAILY_CAMERA_ERROR_CONSTRAINTS:()=>Wr,DAILY_CAMERA_ERROR_MIC_IN_USE:()=>Yr,DAILY_CAMERA_ERROR_NOT_FOUND:()=>Jr,DAILY_CAMERA_ERROR_PERMISSIONS:()=>$r,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:()=>qr,DAILY_CAMERA_ERROR_UNKNOWN:()=>Hr,DAILY_EVENT_ACCESS_STATE_UPDATED:()=>di,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:()=>xi,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:()=>Fi,DAILY_EVENT_APP_MSG:()=>Oi,DAILY_EVENT_CAMERA_ERROR:()=>ni,DAILY_EVENT_CPU_LOAD_CHANGE:()=>Vi,DAILY_EVENT_ERROR:()=>Xi,DAILY_EVENT_EXIT_FULLSCREEN:()=>Gi,DAILY_EVENT_FULLSCREEN:()=>Yi,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:()=>Kr,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:()=>zr,DAILY_EVENT_INPUT_SETTINGS_UPDATED:()=>Ki,DAILY_EVENT_JOINED_MEETING:()=>ii,DAILY_EVENT_JOINING_MEETING:()=>ri,DAILY_EVENT_LANG_UPDATED:()=>Hi,DAILY_EVENT_LEFT_MEETING:()=>oi,DAILY_EVENT_LIVE_STREAMING_ERROR:()=>Wi,DAILY_EVENT_LIVE_STREAMING_STARTED:()=>$i,DAILY_EVENT_LIVE_STREAMING_STOPPED:()=>Ji,DAILY_EVENT_LIVE_STREAMING_UPDATED:()=>qi,DAILY_EVENT_LOADED:()=>ei,DAILY_EVENT_LOADING:()=>Xr,DAILY_EVENT_LOAD_ATTEMPT_FAILED:()=>Zr,DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:()=>ji,DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:()=>Ii,DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:()=>Ri,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:()=>fi,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:()=>pi,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:()=>hi,DAILY_EVENT_NETWORK_CONNECTION:()=>Bi,DAILY_EVENT_NETWORK_QUALITY_CHANGE:()=>Ui,DAILY_EVENT_NONFATAL_ERROR:()=>Qi,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:()=>ui,DAILY_EVENT_PARTICIPANT_JOINED:()=>ai,DAILY_EVENT_PARTICIPANT_LEFT:()=>li,DAILY_EVENT_PARTICIPANT_UPDATED:()=>ci,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:()=>zi,DAILY_EVENT_RECORDING_DATA:()=>Ai,DAILY_EVENT_RECORDING_ERROR:()=>Ci,DAILY_EVENT_RECORDING_STARTED:()=>wi,DAILY_EVENT_RECORDING_STATS:()=>Ti,DAILY_EVENT_RECORDING_STOPPED:()=>ki,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:()=>Mi,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:()=>Pi,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:()=>Ni,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:()=>Di,DAILY_EVENT_STARTED_CAMERA:()=>ti,DAILY_EVENT_THEME_UPDATED:()=>Qr,DAILY_EVENT_TRACK_STARTED:()=>gi,DAILY_EVENT_TRACK_STOPPED:()=>yi,DAILY_EVENT_TRANSCRIPTION_ERROR:()=>Ei,DAILY_EVENT_TRANSCRIPTION_MSG:()=>Li,DAILY_EVENT_TRANSCRIPTION_STARTED:()=>bi,DAILY_EVENT_TRANSCRIPTION_STOPPED:()=>Si,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:()=>mi,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:()=>vi,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:()=>_i,DAILY_FATAL_ERROR_CONNECTION:()=>Br,DAILY_FATAL_ERROR_EJECTED:()=>Pr,DAILY_FATAL_ERROR_EOL:()=>Fr,DAILY_FATAL_ERROR_EXP_ROOM:()=>Ir,DAILY_FATAL_ERROR_EXP_TOKEN:()=>Rr,DAILY_FATAL_ERROR_MEETING_FULL:()=>xr,DAILY_FATAL_ERROR_NBF_ROOM:()=>Dr,DAILY_FATAL_ERROR_NBF_TOKEN:()=>Nr,DAILY_FATAL_ERROR_NOT_ALLOWED:()=>Ur,DAILY_FATAL_ERROR_NO_ROOM:()=>jr,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:()=>Lr,DAILY_RECEIVE_SETTINGS_BASE_KEY:()=>Or,DAILY_STATE_ERROR:()=>gr,DAILY_STATE_JOINED:()=>_r,DAILY_STATE_JOINING:()=>mr,DAILY_STATE_LEFT:()=>vr,DAILY_STATE_NEW:()=>hr,DAILY_TRACK_STATE_BLOCKED:()=>yr,DAILY_TRACK_STATE_INTERRUPTED:()=>wr,DAILY_TRACK_STATE_LOADING:()=>Er,DAILY_TRACK_STATE_OFF:()=>br,DAILY_TRACK_STATE_PLAYABLE:()=>kr,DAILY_TRACK_STATE_SENDABLE:()=>Sr,default:()=>Ps}),e=n.hmd(e);var y,b={},S={get exports(){return b},set exports(e){b=e}},E="object"==typeof Reflect?Reflect:null,w=E&&"function"==typeof E.apply?E.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};y=E&&"function"==typeof E.ownKeys?E.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var k=Number.isNaN||function(e){return e!=e};function T(){T.init.call(this)}S.exports=T,b.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}R(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&R(e,"error",t,{once:!0})}(e,i)}))},T.EventEmitter=T,T.prototype._events=void 0,T.prototype._eventsCount=0,T.prototype._maxListeners=void 0;var C=10;function M(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function A(e){return void 0===e._maxListeners?T.defaultMaxListeners:e._maxListeners}function O(e,t,n,r){var i,o,s;if(M(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=A(e))>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,a,console&&console.warn}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 P(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=L.bind(r);return i.listener=n,r.wrapFn=i,i}function D(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):I(i,i.length)}function N(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function I(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function R(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(T,"defaultMaxListeners",{enumerable:!0,get:function(){return C},set:function(e){if("number"!=typeof e||e<0||k(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");C=e}}),T.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},T.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||k(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},T.prototype.getMaxListeners=function(){return A(this)},T.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[e];if(void 0===a)return!1;if("function"==typeof a)w(a,this,t);else{var c=a.length,l=I(a,c);for(n=0;n<c;++n)w(l[n],this,t)}return!0},T.prototype.addListener=function(e,t){return O(this,e,t,!1)},T.prototype.on=T.prototype.addListener,T.prototype.prependListener=function(e,t){return O(this,e,t,!0)},T.prototype.once=function(e,t){return M(t),this.on(e,P(this,e,t)),this},T.prototype.prependOnceListener=function(e,t){return M(t),this.prependListener(e,P(this,e,t)),this},T.prototype.removeListener=function(e,t){var n,r,i,o,s;if(M(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},T.prototype.off=T.prototype.removeListener,T.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},T.prototype.listeners=function(e){return D(this,e,!0)},T.prototype.rawListeners=function(e){return D(this,e,!1)},T.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):N.call(e,t)},T.prototype.listenerCount=N,T.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]};var j=Object.prototype.hasOwnProperty;function x(e,t,n){for(n of e.keys())if(F(n,t))return n}function F(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&F(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((i=r)&&"object"==typeof i&&!(i=x(t,i)))return!1;if(!t.has(i))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((i=r[0])&&"object"==typeof i&&!(i=x(t,i)))return!1;if(!F(r[1],t.get(i)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(j.call(e,n)&&++r&&!j.call(t,n))return!1;if(!(n in t)||!F(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}const U={"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"},B={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"},V={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Y={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"},G={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class ${static getFirstMatch(e,t){const n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){const n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){const 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){const 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,n=!1){const r=$.getVersionPrecision(e),i=$.getVersionPrecision(t);let o=Math.max(r,i),s=0;const a=$.map([e,t],(e=>{const t=o-$.getVersionPrecision(e),n=e+new Array(t+1).join(".0");return $.map(n.split("."),(e=>new Array(20-e.length).join("0")+e)).reverse()}));for(n&&(s=o-Math.min(r,i)),o-=1;o>=s;){if(a[0][o]>a[1][o])return 1;if(a[0][o]===a[1][o]){if(o===s)return 0;o-=1}else if(a[0][o]<a[1][o])return-1}}static map(e,t){const n=[];let r;if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n}static find(e,t){let n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){const r=e[n];if(t(r,n))return r}}static assign(e,...t){const n=e;let r,i;if(Object.assign)return Object.assign(e,...t);for(r=0,i=t.length;r<i;r+=1){const e=t[r];"object"==typeof e&&null!==e&&Object.keys(e).forEach((t=>{n[t]=e[t]}))}return e}static getBrowserAlias(e){return U[e]}static getBrowserTypeByAlias(e){return B[e]||""}}const q=/version\/(\d+(\.?_?\d+)+)/i,J=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=$.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=$.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=$.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=$.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=$.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=$.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=$.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=$.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=$.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=$.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=$.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=$.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=$.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=$.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=$.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=$.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=$.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=$.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=$.getFirstMatch(q,e)||$.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=$.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=$.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=$.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=$.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=$.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=$.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=$.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=$.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=$.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=$.getFirstMatch(q,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:$.getFirstMatch(t,e),version:$.getSecondMatch(t,e)}}}];var W=[{test:[/Roku\/DVP/],describe(e){const t=$.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Y.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=$.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Y.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=$.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=$.getWindowsVersionName(t);return{name:Y.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Y.iOS},n=$.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=$.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=$.getMacOSVersionName(t),r={name:Y.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=$.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Y.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=$.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=$.getAndroidVersionName(t),r={name:Y.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=$.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Y.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=$.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||$.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||$.getFirstMatch(/\bbb(\d+)/i,e);return{name:Y.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=$.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Y.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=$.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Y.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:Y.Linux})},{test:[/CrOS/],describe:()=>({name:Y.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=$.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Y.PlayStation4,version:t}}}],H=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=$.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:V.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:V.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:V.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:V.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:V.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:V.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:V.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=$.getFirstMatch(/(ipod|iphone)/i,e);return{type:V.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:V.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:V.mobile})},{test:e=>"blackberry"===e.getBrowserName(!0),describe:()=>({type:V.mobile,vendor:"BlackBerry"})},{test:e=>"bada"===e.getBrowserName(!0),describe:()=>({type:V.mobile})},{test:e=>"windows phone"===e.getBrowserName(),describe:()=>({type:V.mobile,vendor:"Microsoft"})},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:()=>({type:V.tablet})},{test:e=>"android"===e.getOSName(!0),describe:()=>({type:V.mobile})},{test:e=>"macos"===e.getOSName(!0),describe:()=>({type:V.desktop,vendor:"Apple"})},{test:e=>"windows"===e.getOSName(!0),describe:()=>({type:V.desktop})},{test:e=>"linux"===e.getOSName(!0),describe:()=>({type:V.desktop})},{test:e=>"playstation 4"===e.getOSName(!0),describe:()=>({type:V.tv})},{test:e=>"roku"===e.getOSName(!0),describe:()=>({type:V.tv})}],z=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:G.Blink};const t=$.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:G.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:G.Trident},n=$.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:G.Presto},n=$.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:G.Gecko},n=$.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:G.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:G.WebKit},n=$.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class K{constructor(e,t=!1){if(null==e||""===e)throw new 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={};const e=$.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 new 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={};const e=$.find(W,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){const{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){const{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};const e=$.find(H,(e=>{if("function"==typeof e.test)return e.test(this);if(e.test instanceof Array)return e.test.some((e=>this.test(e)));throw new 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={};const e=$.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 new 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 $.assign({},this.parsedResult)}satisfies(e){const t={};let n=0;const r={};let i=0;if(Object.keys(e).forEach((o=>{const s=e[o];"string"==typeof s?(r[o]=s,i+=1):"object"==typeof s&&(t[o]=s,n+=1)})),n>0){const e=Object.keys(t),n=$.find(e,(e=>this.isOS(e)));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const r=$.find(e,(e=>this.isPlatform(e)));if(r){const e=this.satisfies(t[r]);if(void 0!==e)return e}}if(i>0){const e=Object.keys(r),t=$.find(e,(e=>this.isBrowser(e,!0)));if(void 0!==t)return this.compareVersion(r[t])}}isBrowser(e,t=!1){const n=this.getBrowserName().toLowerCase();let r=e.toLowerCase();const i=$.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1;const i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf($.compareVersions(i,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some((e=>this.is(e)))}}class Q{static getParser(e,t=!1){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new K(e,t)}static parse(e){return new K(e).getResult()}static get BROWSER_MAP(){return B}static get ENGINE_MAP(){return G}static get OS_MAP(){return Y}static get PLATFORMS_MAP(){return V}}function X(){return Date.now()+Math.random().toString()}function Z(){throw new Error("Method must be implemented in subclass")}function ee(e){return window._dailyConfig&&window._dailyConfig.proxyUrl?window._dailyConfig.proxyUrl+("/"===window._dailyConfig.proxyUrl.slice(-1)?"":"/")+e.substring(8):e}function te(){return window._dailyConfig&&window._dailyConfig.callObjectBundleUrlOverride?window._dailyConfig.callObjectBundleUrlOverride:ee("https://c.daily.co/call-machine/versioned/".concat("0.58.0","/static/call-machine-object-bundle.js"))}function ne(e){try{new URL(e)}catch(e){return!1}return!0}const re=Object.prototype.toString;function ie(e){switch(re.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return pe(e,Error)}}function oe(e,t){return re.call(e)===`[object ${t}]`}function se(e){return oe(e,"ErrorEvent")}function ae(e){return oe(e,"DOMError")}function ce(e){return oe(e,"String")}function le(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function ue(e){return oe(e,"Object")}function de(e){return"undefined"!=typeof Event&&pe(e,Event)}function he(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function pe(e,t){try{return e instanceof t}catch(e){return!1}}function fe(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function me(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const r=e[t];try{n.push(String(r))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function _e(e,t=[],n=!1){return t.some((t=>function(e,t,n=!1){return!!ce(e)&&(oe(t,"RegExp")?t.test(e):!!ce(t)&&(n?e===t:e.includes(t)))}(e,t,n)))}function ve(e,t,n=250,r,i,o,s){if(!(o.exception&&o.exception.values&&s&&pe(s.originalException,Error)))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,l;a&&(o.exception.values=(c=ge(e,t,i,s.originalException,r,o.exception.values,a,0),l=n,c.map((e=>(e.value&&(e.value=fe(e.value,l)),e)))))}function ge(e,t,n,r,i,o,s,a){if(o.length>=n+1)return o;let c=[...o];if(pe(r[i],Error)){ye(s,a);const o=e(t,r[i]),l=c.length;be(o,i,l,a),c=ge(e,t,n,r[i],i,[o,...c],o,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(pe(r,Error)){ye(s,a);const l=e(t,r),u=c.length;be(l,`errors[${o}]`,u,a),c=ge(e,t,n,r,i,[l,...c],l,u)}})),c}function ye(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function be(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Se(e){return e&&e.Math==Math?e:void 0}const Ee="object"==typeof globalThis&&Se(globalThis)||"object"==typeof window&&Se(window)||"object"==typeof self&&Se(self)||"object"==typeof n.g&&Se(n.g)||function(){return this}()||{};function we(){return Ee}function ke(e,t,n){const r=n||Ee,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}const Te=we(),Ce=80;function Me(e,t={}){try{let n=e;const r=5,i=[];let o=0,s=0;const a=" > ",c=a.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Ce;for(;n&&o++<r&&(l=Ae(n,u),!("html"===l||o>1&&s+i.length*c+l.length>=d));)i.push(l),s+=l.length,n=n.parentNode;return i.reverse().join(a)}catch(e){return"<unknown>"}}function Ae(e,t){const n=e,r=[];let i,o,s,a,c;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(l&&l.length)l.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&ce(i))for(o=i.split(/\s+/),c=0;c<o.length;c++)r.push(`.${o[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)s=u[c],a=n.getAttribute(s),a&&r.push(`[${s}="${a}"]`);return r.join("")}const Oe=["debug","info","warn","error","log","assert","trace"];function Le(e){if(!("console"in Ee))return e();const t=Ee.console,n={};Oe.forEach((e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)}));try{return e()}finally{Object.keys(n).forEach((e=>{t[e]=n[e]}))}}function Pe(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Oe.forEach((n=>{t[n]=(...t)=>{e&&Le((()=>{Ee.console[n](`Sentry Logger [${n}]:`,...t)}))}})):Oe.forEach((e=>{t[e]=()=>{}})),t}let De;De="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?ke("logger",Pe):Pe();const Ne=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ie(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${s}`}function Re(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}class je extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}function xe(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);if("function"==typeof i)try{Ue(i,r)}catch(e){}e[t]=i}function Fe(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function Ue(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,Fe(e,"__sentry_original__",t)}function Be(e){return e.__sentry_original__}function Ve(e){if(ie(e))return{message:e.message,name:e.name,stack:e.stack,...Ge(e)};if(de(e)){const t={type:e.type,target:Ye(e.target),currentTarget:Ye(e.currentTarget),...Ge(e)};return"undefined"!=typeof CustomEvent&&pe(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ye(e){try{return"undefined"!=typeof Element&&pe(e,Element)?Me(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function Ge(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function $e(e){return qe(e,new Map)}function qe(e,t){if(ue(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))void 0!==e[n]&&(r[n]=qe(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(qe(e,t))})),r}return e}const Je="<anonymous>";function We(e){try{return e&&"function"==typeof e&&e.name||Je}catch(e){return Je}}const He=we();function ze(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const Ke=we(),Qe=we(),Xe="__sentry_xhr_v2__",Ze={},et={};function tt(e){if(!et[e])switch(et[e]=!0,e){case"console":"console"in Qe&&Oe.forEach((function(e){e in Qe.console&&xe(Qe.console,e,(function(t){return function(...n){rt("console",{args:n,level:e}),t&&t.apply(Qe.console,n)}}))}));break;case"dom":!function(){if(!("document"in Qe))return;const e=rt.bind(null,"dom"),t=ut(e,!0);Qe.document.addEventListener("click",t,!1),Qe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=Qe[t]&&Qe[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(xe(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=o[n]=o[n]||{refCount:0};if(!s.handler){const r=ut(e);s.handler=r,t.call(this,n,r,i)}s.refCount++}catch(e){}return t.call(this,n,r,i)}})),xe(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount--,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Qe))return;const e=XMLHttpRequest.prototype;xe(e,"open",(function(e){return function(...t){const n=t[1],r=this[Xe]={method:ce(t[0])?t[0].toUpperCase():t[0],url:t[1],request_headers:{}};ce(n)&&"POST"===r.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const e=this[Xe];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}rt("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?xe(this,"onreadystatechange",(function(e){return function(...t){return i(),e.apply(this,t)}})):this.addEventListener("readystatechange",i),xe(this,"setRequestHeader",(function(e){return function(...t){const[n,r]=t,i=this[Xe];return i&&(i.request_headers[n.toLowerCase()]=r),e.apply(this,t)}})),e.apply(this,t)}})),xe(e,"send",(function(e){return function(...t){const n=this[Xe];return n&&void 0!==t[0]&&(n.body=t[0]),rt("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":(function(){if(!function(){if(!("fetch"in He))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(ze(He.fetch))return!0;let e=!1;const t=He.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=ze(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&xe(Qe,"fetch",(function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:ot(t),method:it(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ot(t),method:it(t,"method")?String(t.method).toUpperCase():"GET"}}(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return rt("fetch",{...i}),e.apply(Qe,t).then((e=>(rt("fetch",{...i,endTimestamp:Date.now(),response:e}),e)),(e=>{throw rt("fetch",{...i,endTimestamp:Date.now(),error:e}),e}))}}));break;case"history":!function(){if(!function(){const e=Ke.chrome,t=e&&e.app&&e.app.runtime,n="history"in Ke&&!!Ke.history.pushState&&!!Ke.history.replaceState;return!t&&n}())return;const e=Qe.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=st,t=String(n);st=t,rt("history",{from:e,to:t})}return e.apply(this,t)}}Qe.onpopstate=function(...t){const n=Qe.location.href,r=st;if(st=n,rt("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},xe(Qe.history,"pushState",t),xe(Qe.history,"replaceState",t)}();break;case"error":dt=Qe.onerror,Qe.onerror=function(e,t,n,r,i){return rt("error",{column:r,error:i,line:n,msg:e,url:t}),!(!dt||dt.__SENTRY_LOADER__)&&dt.apply(this,arguments)},Qe.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":ht=Qe.onunhandledrejection,Qe.onunhandledrejection=function(e){return rt("unhandledrejection",e),!(ht&&!ht.__SENTRY_LOADER__)||ht.apply(this,arguments)},Qe.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("unknown instrumentation type:",e))}}function nt(e,t){Ze[e]=Ze[e]||[],Ze[e].push(t),tt(e)}function rt(e,t){if(e&&Ze[e])for(const n of Ze[e]||[])try{n(t)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${We(n)}\nError:`,t)}}function it(e,t){return!!e&&"object"==typeof e&&!!e[t]}function ot(e){return"string"==typeof e?e:e?it(e,"url")?e.url:e.toString?e.toString():"":""}let st;const at=1e3;let ct,lt;function ut(e,t=!1){return n=>{if(!n||lt===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===ct||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(lt,n))&&(e({event:n,name:r,global:t}),lt=n),clearTimeout(ct),ct=Qe.setTimeout((()=>{ct=void 0}),at)}}let dt=null,ht=null;function pt(){const e=Ee,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function ft(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function mt(e){const{message:t,event_id:n}=e;if(t)return t;const r=ft(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function _t(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function vt(e,t){const n=ft(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function gt(e){if(e&&e.__sentry_captured__)return!0;try{Fe(e,"__sentry_captured__",!0)}catch(e){}return!1}function yt(e,t=100,n=1/0){try{return St("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function bt(e,t=3,n=102400){const r=yt(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?bt(e,t-1,n):r;var i}function St(e,t,r=1/0,i=1/0,o=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[s,a]=o;if(null==t||["number","boolean","string"].includes(typeof t)&&("number"!=typeof(c=t)||c==c))return t;var c;const l=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(void 0!==n.g&&t===n.g)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(function(e){return ue(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}(t))return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${We(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}}(e,t);if(!l.startsWith("[object "))return l;if(t.__sentry_skip_normalization__)return t;const u="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:r;if(0===u)return l.replace("object ","");if(s(t))return"[Circular ~]";const d=t;if(d&&"function"==typeof d.toJSON)try{return St("",d.toJSON(),u-1,i,o)}catch(e){}const h=Array.isArray(t)?[]:{};let p=0;const f=Ve(t);for(const e in f){if(!Object.prototype.hasOwnProperty.call(f,e))continue;if(p>=i){h[e]="[MaxProperties ~]";break}const t=f[e];h[e]=St(e,t,u-1,i,o),p++}return a(t),h}var Et;function wt(e){return new Tt((t=>{t(e)}))}function kt(e){return new Tt(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"}(Et||(Et={}));class Tt{__init(){this._state=Et.PENDING}__init2(){this._handlers=[]}constructor(e){Tt.prototype.__init.call(this),Tt.prototype.__init2.call(this),Tt.prototype.__init3.call(this),Tt.prototype.__init4.call(this),Tt.prototype.__init5.call(this),Tt.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Tt(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new Tt(((t,n)=>{let r,i;return this.then((t=>{i=!1,r=t,e&&e()}),(t=>{i=!0,r=t,e&&e()})).then((()=>{i?n(r):t(r)}))}))}__init3(){this._resolve=e=>{this._setResult(Et.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(Et.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===Et.PENDING&&(he(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===Et.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===Et.RESOLVED&&e[1](this._value),this._state===Et.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function Ct(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const Mt=["fatal","error","warning","log","info","debug"],At=we(),Ot={nowSeconds:()=>Date.now()/1e3},Lt="undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__||"[object process]"!==Object.prototype.toString.call("undefined"!=typeof process?process:0)?function(){const{performance:e}=At;if(e&&e.now)return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}():function(){try{return(t=e,"perf_hooks",t.require("perf_hooks")).performance}catch(t){return}var t}(),Pt=void 0===Lt?Ot:{nowSeconds:()=>(Lt.timeOrigin+Lt.now())/1e3},Dt=Ot.nowSeconds.bind(Ot),Nt=Pt.nowSeconds.bind(Pt);function It(e,t=[]){return[e,t]}function Rt(e,t){const[n,r]=e;return[n,[...r,t]]}function jt(e,t){const n=e[1];for(const e of n)if(t(e,e[0].type))return!0;return!1}function xt(e,t){return(t||new TextEncoder).encode(e)}function Ft(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[xt(i,t),e]:i.push("string"==typeof e?xt(e,t):e)}for(const e of r){const[n,r]=e;if(o(`\n${JSON.stringify(n)}\n`),"string"==typeof r||r instanceof Uint8Array)o(r);else{let e;try{e=JSON.stringify(r)}catch(t){e=JSON.stringify(yt(r))}o(e)}}return"string"==typeof i?i:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(i)}function Ut(e,t){const n="string"==typeof e.data?xt(e.data,t):e.data;return[$e({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(()=>{const{performance:e}=At;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,s=e.timing&&e.timing.navigationStart,a="number"==typeof s?Math.abs(s+n-r):t;(o||a<t)&&i<=a&&e.timeOrigin})();const Bt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function Vt(e){return Bt[e]}function Yt(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}const Gt=6e4;const $t="production";function qt(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||Nt(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:pt()),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{const 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)}class Jt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=zt()}static clone(e){const t=new Jt;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata={...e._sdkProcessingMetadata},t._propagationContext={...e._propagationContext}),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&qt(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}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof Jt?t:this}return e instanceof Jt?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):ue(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),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._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=zt(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Dt(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),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}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction;if(t){e.sdkProcessingMetadata={dynamicSamplingContext:t.getDynamicSamplingContext(),...e.sdkProcessingMetadata};const n=t.name;n&&(e.tags={transaction:n,...e.tags})}}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},this._notifyEventProcessors([...Wt(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_notifyEventProcessors(e,t,n,r=0){return new Tt(((i,o)=>{const s=e[r];if(null===t||"function"!=typeof s)i(t);else{const a=s({...t},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.id&&null===a&&De.log(`Event processor "${s.id}" dropped event`),he(a)?a.then((t=>this._notifyEventProcessors(e,t,n,r+1).then(i))).then(null,o):this._notifyEventProcessors(e,a,n,r+1).then(i).then(null,o)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){var t;e.fingerprint=e.fingerprint?(t=e.fingerprint,Array.isArray(t)?t:[t]):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function Wt(){return ke("globalEventProcessors",(()=>[]))}function Ht(e){Wt().push(e)}function zt(){return{traceId:pt(),spanId:pt().substring(16),sampled:!1}}const Kt=4,Qt=100;class Xt{constructor(e,t=new Jt,n=Kt){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=Jt.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1||!this.getStack().pop())}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:pt(),r=new Error("Sentry syntheticException");return this._withClient(((i,o)=>{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)})),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:pt(),i=new Error(e);return this._withClient(((o,s)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},s)})),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:pt();return e.type||(this._lastEventId=n),this._withClient(((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Qt}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const s={timestamp:Dt(),...e},a=i?Le((()=>i(s,t))):s;null!==a&&(r.emit&&r.emit("beforeAddBreadcrumb",a,t),n.addBreadcrumb(a,o))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=en(this);try{e(this)}finally{en(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);return"undefined"!=typeof __SENTRY_DEBUG__&&__SENTRY_DEBUG__,n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&function(e,t){let n={};"ok"===e.status&&(n={status:"exited"}),qt(e,n)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=$t}=n&&n.getOptions()||{},{userAgent:o}=Ee.navigator||{},s=function(e){const t=Nt(),n={sid:pt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return $e({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&qt(n,e),n}({release:r,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),a=t.getSession&&t.getSession();return a&&"ok"===a.status&&qt(a,{status:"exited"}),this.endSession(),t.setSession(s),s}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=Zt().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function Zt(){return Ee.__SENTRY__=Ee.__SENTRY__||{extensions:{},hub:void 0},Ee}function en(e){const t=Zt(),n=nn(t);return rn(t,e),n}function tn(){const e=Zt();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=Zt()){var t;return(t=e)&&t.__SENTRY__&&t.__SENTRY__.hub&&!nn(e).isOlderThan(Kt)||rn(e,new Xt),nn(e)}(e)}function nn(e){return ke("hub",(()=>new Xt),e)}function rn(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}const on=[];function sn(e,t){t[e.name]=e,-1===on.indexOf(e.name)&&(e.setupOnce(Ht,tn),on.push(e.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`Integration installed: ${e.name}`))}const an=new WeakMap,cn="Not capturing exception because it's already been captured.";class ln{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(e){if(ln.prototype.__init.call(this),ln.prototype.__init2.call(this),ln.prototype.__init3.call(this),ln.prototype.__init4.call(this),ln.prototype.__init5.call(this),this._options=e,e.dsn?this._dsn=function(e){const t="string"==typeof e?function(e){const t=Ne.exec(e);if(!t)return;const[n,r,i="",o,s="",a]=t.slice(1);let c="",l=a;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return Re({host:o,pass:i,path:c,projectId:l,port:s,protocol:n,publicKey:r})}(e):Re(e);if(t&&function(e){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(De.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(De.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(De.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(De.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("No DSN provided, client will not do anything."),this._dsn){const t=function(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return n={sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}},Object.keys(n).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`)).join("&");var n}(e,r)}`}(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(gt(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(cn));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{r=e}))),r}captureMessage(e,t,n,r){let i=n&&n.event_id;const o=le(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(o.then((e=>this._captureEvent(e,n,r))).then((e=>{i=e}))),i}captureEvent(e,t,n){if(t&&t.originalException&>(t.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(cn));let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((e=>{r=e}))),r}captureSession(e){this._isEnabled()?"string"!=typeof e.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),qt(e,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e)))):wt(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,e)))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){const t={};return e.forEach((e=>{e&&sn(e,t)})),t}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){sn(e,this._integrations)}sendEvent(e,t={}){if(this._dsn){let n=function(e,t,n,r){const i=Yt(n),o=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const s=function(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:Ie(r)},...i&&{trace:$e({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,It(s,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Rt(n,Ut(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}}sendSession(e){if(this._dsn){const t=function(e,t,n,r){const i=Yt(n);return It({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Ie(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach((e=>e(...t)))}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(qt(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Tt((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const r=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i.length>0&&(t.integrations=i),function(e,t,n,r){const{normalizeDepth:i=3,normalizeMaxBreadth:o=1e3}=e,s={...t,event_id:t.event_id||n.event_id||pt(),timestamp:t.timestamp||Dt()},a=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:$t),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=fe(e.message,o));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=fe(s.value,o));const a=e.request;a&&a.url&&(a.url=fe(a.url,o))}(s,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(s,a),void 0===t.type&&function(e,t){const n=Ee._sentryDebugIds;if(!n)return;let r;const i=an.get(t);i?r=i:(r=new Map,an.set(t,r));const o=Object.keys(n).reduce(((e,i)=>{let o;const s=r.get(i);s?o=s:(o=t(i),r.set(i,o));for(let t=o.length-1;t>=0;t--){const r=o[t];if(r.filename){e[r.filename]=n[i];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=o[e.filename])}))}))}catch(e){}}(s,e.stackParser);let c=r;n.captureContext&&(c=Jt.clone(c).update(n.captureContext));let l=wt(s);if(c){if(c.getAttachments){const e=[...n.attachments||[],...c.getAttachments()];e.length&&(n.attachments=e)}l=c.applyToEvent(s,n)}return l.then((e=>(e&&function(e){const 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||[];const n=e.debug_meta.images;Object.keys(t).forEach((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"==typeof i&&i>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:yt(e.data,t,n)}})))},...e.user&&{user:yt(e.user,t,n)},...e.contexts&&{contexts:yt(e.contexts,t,n)},...e.extra&&{extra:yt(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=yt(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>(e.data&&(e.data=yt(e.data,t,n)),e)))),r}(e,i,o):e)))}(r,e,t,n).then((e=>{if(null===e)return e;const{propagationContext:t}=e.sdkProcessingMetadata||{};if((!e.contexts||!e.contexts.trace)&&t){const{traceId:r,spanId:i,parentSpanId:o,dsc:s}=t;e.contexts={trace:{trace_id:r,span_id:i,parent_span_id:o},...e.contexts};const a=s||function(e,t,n){const r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},s=$e({environment:r.environment||$t,release:r.release,user_segment:o,public_key:i,trace_id:e});return t.emit&&t.emit("createDsc",s),s}(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:a,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const t=e;"log"===t.logLevel?De.log(t.message):De.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return kt(new je("SDK not enabled, will not capture event.","log"));const o=dn(e),s=un(e),a=e.type||"error",c=`before send for type \`${a}\``;if(s&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),kt(new je(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l="replay_event"===a?"replay":a;return this._prepareEvent(e,t,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new je("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const i=function(e,t,n){const{beforeSend:r,beforeSendTransaction:i}=e;return un(t)&&r?r(t,n):dn(t)&&i?i(t,n):t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(he(e))return e.then((e=>{if(!ue(e)&&null!==e)throw new je(n);return e}),(e=>{throw new je(`${t} rejected with ${e}`)}));if(!ue(e)&&null!==e)throw new je(n);return e}(i,c)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,e),new je(`${c} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);const s=r.transaction_info;if(o&&s&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...s,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof je)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new je(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",e),this._transport.send(e).then(null,(e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Error while sending event:",e)}));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function un(e){return void 0===e.type}function dn(e){return"transaction"===e.type}const hn=30;function pn(e,t,n=function(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return kt(new je("Not adding Promise because buffer limit was reached."));const i=r();return-1===t.indexOf(i)&&t.push(i),i.then((()=>n(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new Tt(((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{wt(e).then((()=>{--i||(clearTimeout(o),n(!0))}),r)}))}))}}}(e.bufferSize||hn)){let r={};function i(i){const o=[];if(jt(i,((t,n)=>{const i=Vt(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)){const r=fn(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(t)})),0===o.length)return wt();const s=It(i[0],o),a=t=>{jt(s,((n,r)=>{const i=fn(n,r);e.recordDroppedEvent(t,Vt(r),i)}))};return n.add((()=>t({body:Ft(s,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=function(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n]=e.split(":",2),o=parseInt(t,10),s=1e3*(isNaN(o)?60:o);if(n)for(const e of n.split(";"))i[e]=r+s;else i.all=r+s}else s?i.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?Gt:r-t}(s,r):429===t&&(i.all=r+6e4);return i}(r,e),e)),(e=>{throw a("network_error"),e})))).then((e=>e),(e=>{if(e instanceof je)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error("Skipped sending event because buffer is full."),a("queue_overflow"),wt();throw e}))}return i.__sentry__baseTransport__=!0,{send:i,flush:e=>n.drain(e)}}function fn(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}const mn="7.60.1";let _n;class vn{constructor(){vn.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=vn.id}setupOnce(){_n=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Be(this)||this;return _n.apply(t,e)}}catch(e){}}}vn.__initStatic();const gn=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],yn=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class bn{static __initStatic(){this.id="InboundFilters"}__init(){this.name=bn.id}constructor(e={}){this._options=e,bn.prototype.__init.call(this)}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(bn);if(t){const r=n.getClient(),i=r?r.getOptions():{},o=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:gn],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:yn],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t._options,i);return function(e,t){return t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${mt(e)}`),!0):function(e,t){return!(e.type||!t||!t.length)&&function(e){if(e.message)return[e.message];if(e.exception){const{values:t}=e.exception;try{const{type:e="",value:n=""}=t&&t[t.length-1]||{};return[`${n}`,`${e}: ${n}`]}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(`Cannot extract message for event ${mt(e)}`),[]}}return[]}(e).some((e=>_e(e,t)))}(e,t.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${mt(e)}`),!0):function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&_e(n,t)}(e,t.ignoreTransactions)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${mt(e)}`),!0):function(e,t){if(!t||!t.length)return!1;const n=Sn(e);return!!n&&_e(n,t)}(e,t.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${mt(e)}.\nUrl: ${Sn(e)}`),!0):!function(e,t){if(!t||!t.length)return!0;const n=Sn(e);return!n||_e(n,t)}(e,t.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${mt(e)}.\nUrl: ${Sn(e)}`),!0)}(e,o)?null:e}}return e};n.id=this.name,e(n)}}function Sn(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--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.error(`Cannot extract url for event ${mt(e)}`),null}}bn.__initStatic();var En=Object.freeze({__proto__:null,FunctionToString:vn,InboundFilters:bn});const wn=Ee;let kn=0;function Tn(){return kn>0}function Cn(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(Be(e))return e}catch(t){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map((e=>Cn(e,t)));return e.apply(this,i)}catch(e){throw kn++,setTimeout((()=>{kn--})),i=n=>{var i;n.addEventProcessor((e=>(t.mechanism&&(_t(e,void 0,void 0),vt(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),i=e,tn().captureException(i,{captureContext:undefined})},tn().withScope(i),e}var i};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}Ue(r,e),Fe(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}function Mn(e,t){const n=On(e,t),r={type:t&&t.name,value:Pn(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function An(e,t){return{exception:{values:[Mn(e,t)]}}}function On(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Ln.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const Ln=/Minified React error #\d+;/i;function Pn(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Dn(e,t,n,r,i){let o;if(se(t)&&t.error)return An(e,t.error);if(ae(t)||oe(t,"DOMException")){const i=t;if("stack"in t)o=An(e,t);else{const t=i.name||(ae(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;o=Nn(e,s,n,r),_t(o,s)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return ie(t)?An(e,t):ue(t)||de(t)?(o=function(e,t,n,r){const i=tn().getClient(),o=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:de(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:In(t,{isUnhandledRejection:r})}]},extra:{__serialized__:bt(t,o)}};if(n){const t=On(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}(e,t,n,i),vt(o,{synthetic:!0}),o):(o=Nn(e,t,n,r),_t(o,`${t}`,void 0),vt(o,{synthetic:!0}),o)}function Nn(e,t,n,r){const i={message:t};if(r&&n){const r=On(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}return i}function In(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(Ve(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return fe(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:fe(r,t)}return""}(e),r=t?"promise rejection":"exception";return se(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:de(e)?`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}const Rn="Breadcrumbs";class jn{static __initStatic(){this.id=Rn}__init(){this.name=jn.id}constructor(e){jn.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&nt("console",xn),this.options.dom&&nt("dom",function(e){return function(t){let n,r="object"==typeof e?e.serializeAttribute:void 0,i="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;i&&i>1024&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof r&&(r=[r]);try{const e=t.event;n=function(e){return!!e&&!!e.target}(e)?Me(e.target,{keyAttrs:r,maxStringLength:i}):Me(e,{keyAttrs:r,maxStringLength:i})}catch(e){n="<unknown>"}0!==n.length&&tn().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}}(this.options.dom)),this.options.xhr&&nt("xhr",Fn),this.options.fetch&&nt("fetch",Un),this.options.history&&nt("history",Bn)}addSentryBreadcrumb(e){this.options.sentry&&tn().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:mt(e)},{event:e})}}function xn(e){for(let t=0;t<e.args.length;t++)if("ref=Ref<"===e.args[t]){e.args[t+1]="viewRef";break}const t={category:"console",data:{arguments:e.args,logger:"console"},level:(n=e.level,"warn"===n?"warning":Mt.includes(n)?n:"log"),message:me(e.args," ")};var n;if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${me(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}tn().addBreadcrumb(t,{input:e.args,level:e.level})}function Fn(e){const{startTimestamp:t,endTimestamp:n}=e,r=e.xhr[Xe];if(!t||!n||!r)return;const{method:i,url:o,status_code:s,body:a}=r,c={method:i,url:o,status_code:s},l={xhr:e.xhr,input:a,startTimestamp:t,endTimestamp:n};tn().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function Un(e){const{startTimestamp:t,endTimestamp:n}=e;if(n&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const r=e.fetchData,i={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};tn().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},i)}else{const r={...e.fetchData,status_code:e.response&&e.response.status},i={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};tn().addBreadcrumb({category:"fetch",data:r,type:"http"},i)}}function Bn(e){let t=e.from,n=e.to;const r=Ct(wn.location.href);let i=Ct(t);const o=Ct(n);i.path||(i=r),r.protocol===o.protocol&&r.host===o.host&&(n=o.relative),r.protocol===i.protocol&&r.host===i.host&&(t=i.relative),tn().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}jn.__initStatic();class Vn extends ln{constructor(e){const t=wn.SENTRY_SDK_SOURCE||"npm";e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:mn}],version:mn},super(e),e.sendClientReports&&wn.document&&wn.document.addEventListener("visibilitychange",(()=>{"hidden"===wn.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=Dn(e,t,n&&n.syntheticException||void 0,r);return vt(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),wt(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=Nn(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),wt(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){const n=this.getIntegrationById(Rn);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(e),super.sendEvent(e,t)}captureUserFeedback(e){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Ie(r)}},o=function(e){return[{type:"user_report"},e]}(e);return It(i,[o])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log("Sending outcomes:",e);const t=(n=e,It((r=this._options.tunnel&&Ie(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:Dt(),discarded_events:n}]]));var n,r;this._sendEnvelope(t)}}let Yn;function Gn(e,t=function(){if(Yn)return Yn;if(ze(wn.fetch))return Yn=wn.fetch.bind(wn);const e=wn.document;let t=wn.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return Yn=t.bind(wn)}()){let n=0,r=0;return pn(e,(function(i){const o=i.body.length;n+=o,r++;const s={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,s).then((e=>(n-=o,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return Yn=void 0,n-=o,r--,kt(e)}}))}class $n{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=$n.id}__init2(){this._installFunc={onerror:qn,onunhandledrejection:Jn}}constructor(e){$n.prototype.__init.call(this),$n.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const n in e){const r=this._installFunc[n];r&&e[n]&&(t=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.log(`Global Handler attached: ${t}`),r(),this._installFunc[n]=void 0)}var t}}function qn(){nt("error",(e=>{const[t,n,r]=zn();if(!t.getIntegration($n))return;const{msg:i,url:o,line:s,column:a,error:c}=e;if(Tn()||c&&c.__sentry_own_request__)return;const l=void 0===c&&ce(i)?function(e,t,n,r){let i=se(e)?e.message:e,o="Error";const s=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);s&&(o=s[1],i=s[2]);return Wn({exception:{values:[{type:o,value:i}]}},t,n,r)}(i,o,s,a):Wn(Dn(n,c||i,void 0,r,!1),o,s,a);l.level="error",Hn(t,c,l,"onerror")}))}function Jn(){nt("unhandledrejection",(e=>{const[t,n,r]=zn();if(!t.getIntegration($n))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch(e){}if(Tn()||i&&i.__sentry_own_request__)return!0;const o=le(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Dn(n,i,void 0,r,!0);o.level="error",Hn(t,i,o,"onunhandledrejection")}))}function Wn(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=ce(t)&&t.length>0?t:function(){try{return Te.document.location.href}catch(e){return""}}();return 0===c.length&&c.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),e}function Hn(e,t,n,r){vt(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function zn(){const e=tn(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}$n.__initStatic();const Kn=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Qn{static __initStatic(){this.id="TryCatch"}__init(){this.name=Qn.id}constructor(e){Qn.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&xe(wn,"setTimeout",Xn),this._options.setInterval&&xe(wn,"setInterval",Xn),this._options.requestAnimationFrame&&xe(wn,"requestAnimationFrame",Zn),this._options.XMLHttpRequest&&"XMLHttpRequest"in wn&&xe(XMLHttpRequest.prototype,"send",er);const e=this._options.eventTarget;e&&(Array.isArray(e)?e:Kn).forEach(tr)}}function Xn(e){return function(...t){const n=t[0];return t[0]=Cn(n,{mechanism:{data:{function:We(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function Zn(e){return function(t){return e.apply(this,[Cn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:We(e)},handled:!0,type:"instrument"}})])}}function er(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&xe(n,e,(function(t){const n={mechanism:{data:{function:e,handler:We(t)},handled:!0,type:"instrument"}},r=Be(t);return r&&(n.mechanism.data.handler=We(r)),Cn(t,n)}))})),e.apply(this,t)}}function tr(e){const t=wn,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(xe(n,"addEventListener",(function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Cn(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:We(r),target:e},handled:!0,type:"instrument"}}))}catch(e){}return t.apply(this,[n,Cn(r,{mechanism:{data:{function:"addEventListener",handler:We(r),target:e},handled:!0,type:"instrument"}}),i])}})),xe(n,"removeEventListener",(function(e){return function(t,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,i,r)}})))}Qn.__initStatic();class nr{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=nr.id}constructor(e={}){nr.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(e,t){e(((e,n)=>{const r=t(),i=r.getClient(),o=r.getIntegration(nr);if(!i||!o)return e;const s=i.getOptions();return ve(Mn,s.stackParser,s.maxValueLength,o._key,o._limit,e,n),e}))}}nr.__initStatic();class rr{constructor(){rr.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=rr.id}setupOnce(){Ht((e=>{if(tn().getIntegration(rr)){if(!wn.navigator&&!wn.location&&!wn.document)return e;const t=e.request&&e.request.url||wn.location&&wn.location.href,{referrer:n}=wn.document||{},{userAgent:r}=wn.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:i};return{...e,request:o}}return e}))}}rr.__initStatic();class ir{constructor(){ir.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=ir.id}setupOnce(e,t){const n=e=>{if(e.type)return e;const n=t().getIntegration(ir);if(n){try{if(function(e,t){return!!t&&(!!function(e,t){const n=e.message,r=t.message;return!(!n&&!r)&&(!(n&&!r||!n&&r)&&(n===r&&(!!sr(e,t)&&!!or(e,t))))}(e,t)||!!function(e,t){const n=ar(t),r=ar(e);return!(!n||!r)&&(n.type===r.type&&n.value===r.value&&(!!sr(e,t)&&!!or(e,t)))}(e,t))}(e,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&De.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function or(e,t){let n=cr(e),r=cr(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function sr(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function ar(e){return e.exception&&e.exception.values&&e.exception.values[0]}function cr(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){return}}ir.__initStatic();var lr=Object.freeze({__proto__:null,Breadcrumbs:jn,Dedupe:ir,GlobalHandlers:$n,HttpContext:rr,LinkedErrors:nr,TryCatch:Qn});let ur={};wn.Sentry&&wn.Sentry.Integrations&&(ur=wn.Sentry.Integrations);const dr={...ur,...En,...lr};var hr="new",pr="loading",fr="loaded",mr="joining-meeting",_r="joined-meeting",vr="left-meeting",gr="error",yr="blocked",br="off",Sr="sendable",Er="loading",wr="interrupted",kr="playable",Tr="unknown",Cr="full",Mr="lobby",Ar="none",Or="base",Lr="*",Pr="ejected",Dr="nbf-room",Nr="nbf-token",Ir="exp-room",Rr="exp-token",jr="no-room",xr="meeting-full",Fr="end-of-life",Ur="not-allowed",Br="connection-error",Vr="cam-in-use",Yr="mic-in-use",Gr="cam-mic-in-use",$r="permissions",qr="undefined-mediadevices",Jr="not-found",Wr="constraints",Hr="unknown",zr="iframe-ready-for-launch-config",Kr="iframe-launch-config",Qr="theme-updated",Xr="loading",Zr="load-attempt-failed",ei="loaded",ti="started-camera",ni="camera-error",ri="joining-meeting",ii="joined-meeting",oi="left-meeting",si="available-devices-updated",ai="participant-joined",ci="participant-updated",li="participant-left",ui="participant-counts-updated",di="access-state-updated",hi="meeting-session-summary-updated",pi="meeting-session-state-updated",fi="meeting-session-data-error",mi="waiting-participant-added",_i="waiting-participant-updated",vi="waiting-participant-removed",gi="track-started",yi="track-stopped",bi="transcription-started",Si="transcription-stopped",Ei="transcription-error",wi="recording-started",ki="recording-stopped",Ti="recording-stats",Ci="recording-error",Mi="recording-upload-completed",Ai="recording-data",Oi="app-message",Li="transcription-message",Pi="remote-media-player-started",Di="remote-media-player-updated",Ni="remote-media-player-stopped",Ii="local-screen-share-started",Ri="local-screen-share-stopped",ji="local-screen-share-canceled",xi="active-speaker-change",Fi="active-speaker-mode-change",Ui="network-quality-change",Bi="network-connection",Vi="cpu-load-change",Yi="fullscreen",Gi="exited-fullscreen",$i="live-streaming-started",qi="live-streaming-updated",Ji="live-streaming-stopped",Wi="live-streaming-error",Hi="lang-updated",zi="receive-settings-updated",Ki="input-settings-updated",Qi="nonfatal-error",Xi="error",Zi=102400,eo="iframe-call-message",to="local-screen-start",no="register-input-handler",ro="daily-method-update-live-streaming-endpoints",io="transmit-log",oo="daily-custom-track",so={NONE:"none",BGBLUR:"background-blur",BGIMAGE:"background-image"},ao={NONE:"none",NOISE_CANCELLATION:"noise-cancellation"},co={PLAY:"play",PAUSE:"pause"},lo=["jpg","png","jpeg"];function uo(){return!ho()&&"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:""}function ho(){return"undefined"!=typeof navigator&&navigator.product&&"ReactNative"===navigator.product}function po(){return!!uo().match(/iPad|iPhone|iPod/i)}function fo(){return navigator&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}function mo(){if(ho())return!1;if(!document)return!1;var e=document.createElement("iframe");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}function _o(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!ho()&&(e?!bo()&&["Chrome","Firefox"].includes(So()):function(){if(bo())return!1;var e=So();if(po()&&"Safari"===e){var t=To();if(15===t.major&&t.minor<4)return!1}return["Chrome","Firefox","Safari"].includes(e)}())}var vo=["Chrome","Firefox"];function go(){return!ho()&&!bo()&&"undefined"!=typeof AudioWorkletNode&&vo.includes(So())}function yo(){return fo()&&!function(){var e,t=So();if(!uo())return!0;switch(t){case"Chrome":return(e=wo()).major&&e.major>0&&e.major<61;case"Firefox":return(e=Co()).major<78;case"Safari":return(e=To()).major<12;default:return!0}}()}function bo(){var e,t,n=uo(),r=n.match(/Mac/)&&(!ho()&&"undefined"!=typeof window&&null!==(e=window)&&void 0!==e&&null!==(t=e.navigator)&&void 0!==t&&t.maxTouchPoints?window.navigator.maxTouchPoints:0)>=5;return!!(n.match(/Mobi/)||n.match(/Android/)||r)||!!uo().match(/DailyAnd\//)||void 0}function So(){if("undefined"!=typeof window){var e=uo();return ko()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function Eo(){switch(So()){case"Chrome":return wo();case"Safari":return To();case"Firefox":return Co();case"Edge":return function(){var e=0,t=0;if("undefined"!=typeof window){var n=uo().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}()}}function wo(){var e=0,t=0,n=0,r=0,i=!1;if("undefined"!=typeof window){var o=uo(),s=o.match(/Chrome\/(\d+).(\d+).(\d+).(\d+)/);if(s)try{e=parseInt(s[1]),t=parseInt(s[2]),n=parseInt(s[3]),r=parseInt(s[4]),i=o.indexOf("OPR/")>-1}catch(e){}}return{major:e,minor:t,build:n,patch:r,opera:i}}function ko(){return po()&&fo()}function To(){var e=0,t=0,n=0;if("undefined"!=typeof window){var r=uo().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch(e){}else ko()&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Co(){var e=0,t=0;if("undefined"!=typeof window){var n=uo().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}var Mo=function(){function e(){s(this,e)}return u(e,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){Z()}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){Z()}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){Z()}},{key:"sendMessageToDailyJs",value:function(e,t){Z()}},{key:"removeListener",value:function(e){Z()}}]),e}();function Ao(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ao(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lo=function(e){p(n,Mo);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}(n);function n(){var e;return s(this,n),(e=t.call(this))._wrappedListeners={},e._messageCallbacks={},e}return u(n,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,n){var r=this,i=function(i){if(i.data&&"iframe-call-message"===i.data.what&&(!i.data.callFrameId||i.data.callFrameId===t)&&(!i.data.from||"module"!==i.data.from)){var o=Oo({},i.data);if(delete o.from,o.callbackStamp&&r._messageCallbacks[o.callbackStamp]){var s=o.callbackStamp;r._messageCallbacks[s].call(n,o),delete r._messageCallbacks[s]}delete o.what,delete o.callbackStamp,e.call(n,o)}};this._wrappedListeners[e]=i,window.addEventListener("message",i)}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,n){var r=function(r){if(!(!r.data||r.data.what!==eo||!r.data.action||r.data.from&&"module"!==r.data.from||r.data.callFrameId&&t&&r.data.callFrameId!==t)){var i=r.data;e.call(n,i)}};this._wrappedListeners[e]=r,window.addEventListener("message",r)}},{key:"sendMessageToCallMachine",value:function(e,t,n,r){if(!r)throw new Error("undefined callFrameId. Are you trying to use a DailyCall instance previously destroyed?");var i=Oo({},e);if(i.what=eo,i.from="module",i.callFrameId=r,t){var o=X();this._messageCallbacks[o]=t,i.callbackStamp=o}var s=n?n.contentWindow:window,a=this._callMachineTargetOrigin(n);a&&s.postMessage(i,a)}},{key:"sendMessageToDailyJs",value:function(e,t){e.what=eo,e.callFrameId=t,e.from="embedded",window.postMessage(e,this._targetOriginFromWindowLocation())}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"forwardPackagedMessageToCallMachine",value:function(e,t,n){var r=Oo({},e);r.callFrameId=n;var i=t?t.contentWindow:window,o=this._callMachineTargetOrigin(t);o&&i.postMessage(r,o)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e,t){var n=function(n){if(n.data&&"iframe-call-message"===n.data.what&&(!n.data.callFrameId||n.data.callFrameId===t)&&(!n.data.from||"module"!==n.data.from)){var r=n.data;e(r)}};return this._wrappedListeners[e]=n,window.addEventListener("message",n),e}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){var t=this._wrappedListeners[e];t&&(window.removeEventListener("message",t),delete this._wrappedListeners[e])}},{key:"_callMachineTargetOrigin",value:function(e){return e?e.src?new URL(e.src).origin:void 0:this._targetOriginFromWindowLocation()}},{key:"_targetOriginFromWindowLocation",value:function(){return"file:"===window.location.protocol?"*":window.location.origin}}]),n}();var Po=function(e){p(r,Mo);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}(r);function r(){var e;return s(this,r),e=t.call(this),n.g.callMachineToDailyJsEmitter=n.g.callMachineToDailyJsEmitter||new b.EventEmitter,n.g.dailyJsToCallMachineEmitter=n.g.dailyJsToCallMachineEmitter||new b.EventEmitter,e._wrappedListeners={},e._messageCallbacks={},e}return u(r,[{key:"addListenerForMessagesFromCallMachine",value:function(e,t,r){this._addListener(e,n.g.callMachineToDailyJsEmitter,r,"received call machine message")}},{key:"addListenerForMessagesFromDailyJs",value:function(e,t,r){this._addListener(e,n.g.dailyJsToCallMachineEmitter,r,"received daily-js message")}},{key:"sendMessageToCallMachine",value:function(e,t){this._sendMessage(e,n.g.dailyJsToCallMachineEmitter,"sending message to call machine",t)}},{key:"sendMessageToDailyJs",value:function(e){this._sendMessage(e,n.g.callMachineToDailyJsEmitter,"sending message to daily-js")}},{key:"removeListener",value:function(e){var t=this._wrappedListeners[e];t&&(n.g.callMachineToDailyJsEmitter.removeListener("message",t),n.g.dailyJsToCallMachineEmitter.removeListener("message",t),delete this._wrappedListeners[e])}},{key:"_addListener",value:function(e,t,n,r){var i=this,o=function(t){if(t.callbackStamp&&i._messageCallbacks[t.callbackStamp]){var r=t.callbackStamp;i._messageCallbacks[r].call(n,t),delete i._messageCallbacks[r]}e.call(n,t)};this._wrappedListeners[e]=o,t.addListener("message",o)}},{key:"_sendMessage",value:function(e,t,n,r){if(r){var i=X();this._messageCallbacks[i]=r,e.callbackStamp=i}t.emit("message",e)}}]),r}(),Do="replace",No="shallow-merge",Io=[Do,No],Ro=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.data,r=t.mergeStrategy,i=void 0===r?Do:r;s(this,e),e._validateMergeStrategy(i),e._validateData(n,i),this.mergeStrategy=i,this.data=n}return u(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===No}},{key:"_validateMergeStrategy",value:function(e){if(!Io.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(Io,"]"))}},{key:"_validateData",value:function(e,t){if(!function(e){if(null==e||"object"!==a(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");var n;try{if(n=JSON.stringify(e),t===Do)F(JSON.parse(n),e);else if(t===No)for(var r in e)if(Object.hasOwnProperty.call(e,r)&&void 0!==e[r]){var i=JSON.parse(JSON.stringify(e[r]));F(e[r],i)}}catch(e){throw Error("Meeting session data must be serializable to JSON: ".concat(e))}if(n.length>Zi)throw Error("Meeting session data is too large (".concat(n.length," characters). Maximum size suppported is ").concat(Zi,"."))}}]),e}();function jo(e,t,n){return jo=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&h(i,n.prototype),i},jo.apply(null,arguments)}function xo(e){var t="function"==typeof Map?new Map:void 0;return xo=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new 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 jo(e,arguments,m(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)},xo(e)}var Fo=function(){function e(){s(this,e),this._currentLoad=null}return u(e,[{key:"load",value:function(e,t,n,r){if(this.loaded)return window._dailyCallObjectSetup(e),void n(!0);!function(e,t){window._dailyConfig||(window._dailyConfig={}),window._dailyConfig.callFrameId=e,window._dailyConfig.avoidEval=t}(e,t),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Uo((function(){n(!1)}),r),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel()}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),e}(),Uo=function(){function e(t,n){s(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._successCallback=t,this._failureCallback=n}return u(e,[{key:"start",value:function(){var e=this;this._currentAttempt||(this._currentAttempt=new Yo(this._successCallback,(function t(n){e._currentAttempt.cancelled||(e._attemptsRemaining--,e._failureCallback(n,e._attemptsRemaining>0),e._attemptsRemaining<=0||setTimeout((function(){e._currentAttempt.cancelled||(e._currentAttempt=new Yo(e._successCallback,t),e._currentAttempt.start())}),3e3))})),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}}]),e}(),Bo=function(e){p(n,xo(Error));var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}(n);function n(){return s(this,n),t.apply(this,arguments)}return u(n)}(),Vo=2e4,Yo=function(){function e(t,n){s(this,e),this._loadAttemptImpl=ho()||!_dailyConfig.avoidEval?new Go(t,n):new $o(t,n)}var t;return u(e,[{key:"start",value:(t=o((function*(){return this._loadAttemptImpl.start()})),function(){return t.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}}]),e}(),Go=function(){function e(t,n){s(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._successCallback=t,this._failureCallback=n}var t,n,r,i;return u(e,[{key:"start",value:(i=o((function*(){var e=te();!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)})),function(){return i.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=o((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:(n=o((function*(e){var t=this;this._networkTimeout=setTimeout((function(){t._networkTimedOut=!0,t._failureCallback("Timed out (>".concat(Vo," ms) when loading call object bundle ").concat(e))}),Vo);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Bo;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new Bo;Function('"use strict";'+i)(),this._iosCache&&this._iosCache.set(e,i,r.headers),this.succeeded=!0,this._successCallback()}catch(t){if(clearTimeout(this._networkTimeout),t instanceof Bo||this.cancelled||this._networkTimedOut)return;this._failureCallback("Failed to load call object bundle ".concat(e,": ").concat(t))}})),function(e){return n.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(t=o((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 new Error("Received ".concat(t.status," response"))})),function(e,n){return t.apply(this,arguments)})}]),e}(),$o=function(){function e(t,n){s(this,e),this.cancelled=!1,this.succeeded=!1,this._successCallback=t,this._failureCallback=n,this._attemptId=X(),this._networkTimeout=null,this._scriptElement=null}var t;return u(e,[{key:"start",value:(t=o((function*(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=te();"object"===("undefined"==typeof document?"undefined":a(document))?this._startLoading(e):this._failureCallback("Call object bundle must be loaded in a DOM/web context")})),function(){return t.apply(this,arguments)})},{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("Timed out (>".concat(Vo," ms) when loading call object bundle ").concat(e))}),Vo);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=o((function*(){t._stopLoading(),t.succeeded=!0,t._successCallback()})),r.onerror=function(){var e=o((function*(e){t._stopLoading(),t._failureCallback("Failed to load call object bundle ".concat(e.target.src))}));return function(t){return e.apply(this,arguments)}}(),r.src=e,n.appendChild(r)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}]),e}(),qo=function(e,t,n){return!0===Ho(e.local,t,n)},Jo=function(e,t,n){return e.local.streams&&e.local.streams[t]&&e.local.streams[t].stream&&e.local.streams[t].stream["get".concat("video"===n?"Video":"Audio","Tracks")]()[0]},Wo=function(e,t,n,r){var i=zo(e,t,n,r);return i&&i.pendingTrack},Ho=function(e,t,n){if(!e)return!1;var r=function(e){switch(e){case"avatar":return!0;case"staged":return e;default:return!!e}},i=e.public.subscribedTracks;return i&&i[t]?-1===["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo"].indexOf(n)&&i[t].custom?[!0,"staged"].includes(i[t].custom)?r(i[t].custom):r(i[t].custom[n]):r(i[t][n]):!i||r(i.ALL)},zo=function(e,t,n,r){var i=Object.values(e.streams||{}).filter((function(e){return e.participantId===t&&e.type===n&&e.pendingTrack&&e.pendingTrack.kind===r})).sort((function(e,t){return new Date(t.starttime)-new Date(e.starttime)}));return i&&i[0]},Ko=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function Qo(e){for(var t=store.getState(),n=0,r=["cam","screen"];n<r.length;n++)for(var i=r[n],o=0,s=["video","audio"];o<s.length;o++){var a=s[o],c="cam"===i?a:"screen".concat(a.charAt(0).toUpperCase()+a.slice(1)),l=e.tracks[c];if(l){var u=e.local?Jo(t,i,a):Wo(t,e.session_id,i,a);"playable"===l.state&&(l.track=u),l.persistentTrack=u}}}function Xo(e){try{var t=store.getState();for(var n in e.tracks)if(!Zo(n)){var r=e.tracks[n].kind;if(r){var i=e.tracks[n];if(i){var o=e.local?Ko(t,n):Wo(t,e.session_id,n,r);"playable"===i.state&&(e.tracks[n].track=o),i.persistentTrack=o}}}}catch(e){}}function Zo(e){return["video","audio","screenVideo","screenAudio"].includes(e)}function es(e,t){var n=store.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 r=!0;try{var i=n.participants[e.session_id];i&&i.public&&i.public.rtcType&&"peer-to-peer"===i.public.rtcType.impl&&i.private&&!["connected","completed"].includes(i.private.peeringState)&&(r=!1)}catch(e){}if(!r)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&&qo(n,e.session_id,"cam-audio")){var o=Wo(n,e.session_id,"cam","audio");o&&(t&&t.audioTrack&&t.audioTrack.id===o.id?e.audioTrack=o:o.muted||(e.audioTrack=o)),e.audioTrack||(e.audio=!1)}if(e.video&&qo(n,e.session_id,"cam-video")){var s=Wo(n,e.session_id,"cam","video");s&&(t&&t.videoTrack&&t.videoTrack.id===s.id?e.videoTrack=s:s.muted||(e.videoTrack=s)),e.videoTrack||(e.video=!1)}if(e.screen&&qo(n,e.session_id,"screen-audio")){var a=Wo(n,e.session_id,"screen","audio");a&&(t&&t.screenAudioTrack&&t.screenAudioTrack.id===a.id?e.screenAudioTrack=a:a.muted||(e.screenAudioTrack=a))}if(e.screen&&qo(n,e.session_id,"screen-video")){var c=Wo(n,e.session_id,"screen","video");c&&(t&&t.screenVideoTrack&&t.screenVideoTrack.id===c.id?e.screenVideoTrack=c:c.muted||(e.screenVideoTrack=c))}e.screenVideoTrack||e.screenAudioTrack||(e.screen=!1)}catch(e){}}}function ts(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ns=new Map,rs=null;function is(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var os=new Map,ss=null;function as(e){cs()?function(e){ns.has(e)||(ns.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){ns.has(e)&&(ns.get(e).lastDevicesString=JSON.stringify(t),rs||(rs=function(){var e=o((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ts(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ts(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}(ns.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ns.get(r).lastDevicesString&&(ns.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}}));return function(){return e.apply(this,arguments)}}(),navigator.mediaDevices.addEventListener("devicechange",rs)))})))}(e):function(e){os.has(e)||(os.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){os.has(e)&&(os.get(e).lastDevicesString=JSON.stringify(t),ss||(ss=setInterval(o((function*(){var e,t=yield navigator.mediaDevices.enumerateDevices(),n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return is(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?is(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}(os.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==os.get(r).lastDevicesString&&(os.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}})),3e3)))})))}(e)}function cs(){return ho()||void 0!==navigator.mediaDevices.ondevicechange}var ls=new Set;var us,ds=["videoTrack"],hs=["result"],ps=["preserveIframe"];function fs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ms(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fs(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function vs(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return gs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gs(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function gs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ys="video",bs="voice",Ss=ho()?{data:{}}:{data:{},topology:"none"},Es={present:0,hidden:0},ws={maxBitrate:{min:1e5,max:25e5},maxFramerate:{min:1,max:30},scaleResolutionDownBy:{min:1,max:8}},ks=Object.keys(ws),Ts=["state","volume","simulcastEncodings"],Cs={androidInCallNotification:{title:"string",subtitle:"string",iconName:"string",disableForCustomOverride:"boolean"},disableAutoDeviceManagement:{audio:"boolean",video:"boolean"}},Ms={id:{iconPath:"string",iconPathDarkMode:"string",label:"string",tooltip:"string"}},As={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"}},Os={customIntegrations:{validate:zs,help:"customIntegrations should be an object of type ".concat(JSON.stringify(As),".")},customTrayButtons:{validate:Hs,help:"customTrayButtons should be a dictionary of the type ".concat(JSON.stringify(Ms))},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),window._dailyConfig||(window._dailyConfig={}),window._dailyConfig.experimentalGetUserMediaConstraintsModify=e.experimentalGetUserMediaConstraintsModify,window._dailyConfig.userMediaVideoConstraints=e.userMediaVideoConstraints,window._dailyConfig.userMediaAudioConstraints=e.userMediaAudioConstraints,window._dailyConfig.callObjectBundleUrlOverride=e.callObjectBundleUrlOverride,window._dailyConfig.proxyUrl=e.proxyUrl,window._dailyConfig.iceConfig=e.iceConfig,!0}catch(e){}return!1},help:"Unsupported dailyConfig. Check error logs for detailed info."},reactNativeConfig:{validate:function(e){return Ks(e,Cs)},help:"reactNativeConfig should look like ".concat(JSON.stringify(Cs),", all fields optional")},lang:{validate:function(e){return["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: 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 Ys(e),!0}catch(e){return!1}},help:"invalid userData type provided"},startVideoOff:!0,startAudioOff:!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){return t._preloadCache.videoDeviceId=e,!0}},audioSource:{validate:function(e,t){return t._preloadCache.audioDeviceId=e,!0}},subscribeToTracksAutomatically:{validate:function(e,t){return t._preloadCache.subscribeToTracksAutomatically=e,!0}},theme:{validate:function(e){var t=["accent","accentText","background","backgroundAccent","baseText","border","mainAreaBg","mainAreaBgAccent","mainAreaText","supportiveText"],n=function(e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];if(!t.includes(i))return!1;if(!e[i].match(/^#[0-9a-f]{6}|#[0-9a-f]{3}$/i))return!1}return!0};return"object"===a(e)&&("light"in e&&"dark"in e||"colors"in e)&&("light"in e&&"dark"in e?"colors"in e.light&&("colors"in e.dark&&(n(e.light.colors)&&n(e.dark.colors))):n(e.colors))},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!1;if(t.maxTilesPerPage>49)return!1}if("minTilesPerPage"in t){if(!Number.isInteger(t.minTilesPerPage))return!1;if(t.minTilesPerPage<1)return!1;if("maxTilesPerPage"in t&&t.minTilesPerPage>t.maxTilesPerPage)return!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(e){return Gs(e,{allowAllParticipantsKey:!1})},help:Ws({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){return!!$s(e)&&(t._preloadCache.inputSettings||(t._preloadCache.inputSettings={}),qs(e),e.audio&&(t._preloadCache.inputSettings.audio=e.audio),e.video&&(t._preloadCache.inputSettings.video=e.video),!0)},help:Js()},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},Ls={styles:{validate:function(e){for(var t in e)if("cam"!==t&&"screen"!==t)return!1;if(e.cam)for(var n in e.cam)if("div"!==n&&"video"!==n)return!1;if(e.screen)for(var r in e.screen)if("div"!==r&&"video"!==r)return!1;return!0},help:"styles format should be a subset of: { cam: {div: {}, video: {}}, screen: {div: {}, video: {}} }"},setSubscribedTracks:{validate:function(e,t){if(t._preloadCache.subscribeToTracksAutomatically)return!1;var n=[!0,!1,"staged"];if(n.includes(e)||!ho()&&"avatar"===e)return!0;var r=["audio","video","screenAudio","screenVideo","rmpAudio","rmpVideo"];return function e(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var o in t)if("custom"===o){if(!n.includes(t[o])&&!e(t[o],!0))return!1}else{var s=!i&&!r.includes(o),a=!n.includes(t[o]);if(s||a)return!1}return!0}(e)},help:"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: "+"true".concat(ho()?"":" | 'avatar'"," | false | 'staged' | { [audio: true|false|'staged'], [video: true|false|'staged'], [screenAudio: true|false|'staged'], [screenVideo: true|false|'staged'] }")},setAudio:!0,setVideo:!0,setScreenShare:{validate:function(e){return!1===e},help:"setScreenShare must be false, as it's only meant for stopping remote participants' screen shares"},eject:!0,updatePermissions:{validate:function(e){for(var t=0,n=Object.entries(e);t<n.length;t++){var r=g(n[t],2),i=r[0],o=r[1];switch(i){case"hasPresence":if("boolean"!=typeof o)return!1;break;case"canSend":if(o instanceof Set||o instanceof Array){var s,a=["video","audio","screenVideo","screenAudio","customVideo","customAudio"],c=vs(o);try{for(c.s();!(s=c.n()).done;){var l=s.value;if(!a.includes(l))return!1}}catch(e){c.e(e)}finally{c.f()}}else if("boolean"!=typeof o)return!1;o instanceof Array&&(e.canSend=new Set(o));break;case"canAdmin":if(o instanceof Set||o instanceof Array){var u,d=["participants","streaming","transcription"],h=vs(o);try{for(h.s();!(u=h.n()).done;){var p=u.value;if(!d.includes(p))return!1}}catch(e){h.e(e)}finally{h.f()}}else if("boolean"!=typeof o)return!1;o instanceof Array&&(e.canAdmin=new Set(o));break;default:return!1}}return!0},help:"updatePermissions can take hasPresence, canSend, 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). canAdmin can be a boolean or an Array or Set of admin types (participants, streaming, transcription)."}},Ps=function(e){p(Z,b);var t,n,i,c,l,h,f,m,v,y,S,E,w,k,T,C,M,A,O,L,P,D,N,I,R,j,x,U,B,V,Y,G,$,q,J,W,H,z,K=_s(Z);function Z(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s(this,Z),_(d(t=K.call(this)),"startListeningForDeviceChanges",(function(){as(t.handleDeviceChange)})),_(d(t),"stopListeningForDeviceChanges",(function(){!function(e){cs()?function(e){ns.has(e)&&(ns.delete(e),0===ns.size&&rs&&(navigator.mediaDevices.removeEventListener("devicechange",rs),rs=null))}(e):function(e){os.has(e)&&(os.delete(e),0===os.size&&ss&&(clearInterval(ss),ss=null))}(e)}(t.handleDeviceChange)})),_(d(t),"handleDeviceChange",(function(e){e=e.map((function(e){return JSON.parse(JSON.stringify(e))})),t.emit(si,{action:si,availableDevices:e})})),_(d(t),"handleNativeAppActiveStateChange",(function(e){t.disableReactNativeAutoDeviceManagement("video")||(e?t.camUnmutedBeforeLosingNativeActiveState&&t.setLocalVideo(!0):(t.camUnmutedBeforeLosingNativeActiveState=t.localVideo(),t.camUnmutedBeforeLosingNativeActiveState&&t.setLocalVideo(!1)))})),_(d(t),"handleNativeAudioFocusChange",(function(e){t.disableReactNativeAutoDeviceManagement("audio")||(t._hasNativeAudioFocus=e,t.toggleParticipantAudioBasedOnNativeAudioFocus(),t._hasNativeAudioFocus?t.micUnmutedBeforeLosingNativeAudioFocus&&t.setLocalAudio(!0):(t.micUnmutedBeforeLosingNativeAudioFocus=t.localAudio(),t.setLocalAudio(!1)))})),_(d(t),"handleNativeSystemScreenCaptureStop",(function(){t.stopScreenShare()})),t.strictMode=void 0===r.strictMode||r.strictMode,us){if(t._logDuplicateInstanceAttempt(),t.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed")}else n=d(t),us=n;if(r.dailyJsVersion=Z.version(),t._iframe=e,t._callObjectMode="none"===r.layout&&!t._iframe,t._preloadCache={subscribeToTracksAutomatically:!0,audioDeviceId:null,videoDeviceId:null,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},t._callObjectMode&&(window._dailyPreloadCache=t._preloadCache),void 0!==r.showLocalVideo?t._callObjectMode||(t._showLocalVideo=!!r.showLocalVideo):t._showLocalVideo=!0,void 0!==r.showParticipantsBar?t._callObjectMode||(t._showParticipantsBar=!!r.showParticipantsBar):t._showParticipantsBar=!0,void 0!==r.customIntegrations?t._callObjectMode||(t._customIntegrations=r.customIntegrations):t._customIntegrations={},void 0!==r.customTrayButtons?t._callObjectMode||(t._customTrayButtons=r.customTrayButtons):t._customTrayButtons={},void 0!==r.activeSpeakerMode?t._callObjectMode||(t._activeSpeakerMode=!!r.activeSpeakerMode):t._activeSpeakerMode=!1,r.receiveSettings?t._callObjectMode&&(t._receiveSettings=r.receiveSettings):t._receiveSettings={},t.validateProperties(r),t.properties=ms({},r),t._preloadCache.inputSettings||(t._preloadCache.inputSettings={}),r.inputSettings&&r.inputSettings.audio&&(t._preloadCache.inputSettings.audio=r.inputSettings.audio),r.inputSettings&&r.inputSettings.video&&(t._preloadCache.inputSettings.video=r.inputSettings.video),t._callObjectLoader=t._callObjectMode?new Fo:null,t._callState=hr,t._isPreparingToJoin=!1,t._accessState={access:Tr},t._meetingSessionSummary={},t._finalSummaryOfPrevSession={},t._meetingSessionState=Zs(Ss,t._callObjectMode),t._nativeInCallAudioMode=ys,t._participants={},t._participantCounts=Es,t._rmpPlayerState={},t._waitingParticipants={},t._inputEventsOn={},t._network={threshold:"good",quality:100},t._activeSpeaker={},t._callFrameId=X(),t._localAudioLevel=0,t._remoteParticipantsAudioLevel={},t._messageChannel=ho()?new Po:new Lo,t._iframe&&(t._iframe.requestFullscreen?t._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===t._iframe?(t.emit(Yi,{action:Yi}),t.sendMessageToCallMachine({action:Yi})):(t.emit(Gi,{action:Gi}),t.sendMessageToCallMachine({action:Gi}))})):t._iframe.webkitRequestFullscreen&&t._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===t._iframe?(t.emit(Yi,{action:Yi}),t.sendMessageToCallMachine({action:Yi})):(t.emit(Gi,{action:Gi}),t.sendMessageToCallMachine({action:Gi}))}))),ho()){var i=t.nativeUtils();i.addAudioFocusChangeListener&&i.removeAudioFocusChangeListener&&i.addAppActiveStateChangeListener&&i.removeAppActiveStateChangeListener&&i.addSystemScreenCaptureStopListener&&i.removeSystemScreenCaptureStopListener,t._hasNativeAudioFocus=!0,i.addAudioFocusChangeListener(t.handleNativeAudioFocusChange),i.addAppActiveStateChangeListener(t.handleNativeAppActiveStateChange),i.addSystemScreenCaptureStopListener(t.handleNativeSystemScreenCaptureStop)}return t._callObjectMode&&t.startListeningForDeviceChanges(),t._messageChannel.addListenerForMessagesFromCallMachine(t.handleMessageFromCallMachine,t._callFrameId,d(t)),t}return u(Z,[{key:"destroy",value:(z=o((function*(){try{yield this.leave()}catch(e){}var e=this._iframe;if(e){var t=e.parentElement;t&&t.removeChild(e)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),ho()){var n=this.nativeUtils();n.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),n.removeAppActiveStateChangeListener(this.handleNativeAppActiveStateChange),n.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0;try{this.emit("call-instance-destroyed",{action:"call-instance-destroyed"})}catch(e){}this.strictMode&&(this._callFrameId=void 0),us=void 0})),function(){return z.apply(this,arguments)})},{key:"isDestroyed",value:function(){return!!this._destroyed}},{key:"loadCss",value:function(e){var t=e.bodyClass,n=e.cssFile,r=e.cssText;return Bs(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:"iframe",value:function(){return Bs(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return Fs(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return Fs(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(e,t){for(var n in t){if(!Ls[n])throw new Error("unrecognized updateParticipant property ".concat(n));if(Ls[n].validate&&!Ls[n].validate(t[n],this,this._participants[e]))throw new Error(Ls[n].help)}}},{key:"updateParticipant",value:function(e,t){return this._participants.local&&this._participants.local.session_id===e&&(e="local"),e&&t&&(this.validateParticipantProperties(e,t),this.sendMessageToCallMachine({action:"update-participant",id:e,properties:t})),this}},{key:"updateParticipants",value:function(e){var t=this._participants.local&&this._participants.local.session_id;for(var n in e)n===t&&(n="local"),n&&e[n]&&this.validateParticipantProperties(n,e[n]);return this.sendMessageToCallMachine({action:"update-participants",participants:e}),this}},{key:"updateWaitingParticipant",value:(H=o((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Fs(this._callObjectMode,"updateWaitingParticipant()"),Ns(this._callState,"updateWaitingParticipant()"),"string"!=typeof t||"object"!==a(n))throw new Error("updateWaitingParticipant() must take an id string and a updates object");return new Promise((function(r,i){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participant",id:t,updates:n},(function(e){e.error&&i(e.error),e.id||i(new Error("unknown error in updateWaitingParticipant()")),r({id:e.id})}))}))})),function(){return H.apply(this,arguments)})},{key:"updateWaitingParticipants",value:(W=o((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Fs(this._callObjectMode,"updateWaitingParticipants()"),Ns(this._callState,"updateWaitingParticipants()"),"object"!==a(t))throw new Error("updateWaitingParticipants() must take a mapping between ids and update objects");return new Promise((function(n,r){e.sendMessageToCallMachine({action:"daily-method-update-waiting-participants",updatesById:t},(function(e){e.error&&r(e.error),e.ids||r(new Error("unknown error in updateWaitingParticipants()")),n({ids:e.ids})}))}))})),function(){return W.apply(this,arguments)})},{key:"requestAccess",value:(J=o((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.access,r=void 0===n?{level:Cr}:n,i=t.name,o=void 0===i?"":i;return Fs(this._callObjectMode,"requestAccess()"),Ns(this._callState,"requestAccess()"),new Promise((function(t,n){e.sendMessageToCallMachine({action:"daily-method-request-access",access:r,name:o},(function(e){e.error&&n(e.error),e.access||n(new Error("unknown error in requestAccess()")),t({access:e.access,granted:e.granted})}))}))})),function(){return J.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){return this.sendMessageToCallMachine({action:"local-audio",state:e}),this}},{key:"setLocalVideo",value:function(e){return this.sendMessageToCallMachine({action:"local-video",state:e}),this}},{key:"getReceiveSettings",value:(q=o((function*(e){var t=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,r=void 0!==n&&n;if(Fs(this._callObjectMode,"getReceiveSettings()"),!this._dailyMainExecuted)return this._receiveSettings;switch(a(e)){case"string":return new Promise((function(n){t.sendMessageToCallMachine({action:"get-single-participant-receive-settings",id:e,showInheritedValues:r},(function(e){n(e.receiveSettings)}))}));case"undefined":return this._receiveSettings;default:throw new 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:($=o((function*(e){var t=this;if(Fs(this._callObjectMode,"updateReceiveSettings()"),!Gs(e,{allowAllParticipantsKey:!0}))throw new Error(Ws({allowAllParticipantsKey:!0}));return Ns(this._callState,"updateReceiveSettings()","To specify receive settings earlier, use the receiveSettings config property."),new Promise((function(n){t.sendMessageToCallMachine({action:"update-receive-settings",receiveSettings:e},(function(e){n({receiveSettings:e.receiveSettings})}))}))})),function(e){return $.apply(this,arguments)})},{key:"_prepInputSettingsToPresentToUser",value:function(e){var t,n,r,i,o,s,a,c;if(e){var l={},u="none"===(null===(t=e.audio)||void 0===t||null===(n=t.processor)||void 0===n?void 0:n.type)&&(null===(r=e.audio)||void 0===r||null===(i=r.processor)||void 0===i?void 0:i._isDefaultWhenNone);if(e.audio&&!u){var d=ms({},e.audio.processor);delete d._isDefaultWhenNone,l.audio=ms(ms({},e.audio),{},{processor:d})}var h="none"===(null===(o=e.video)||void 0===o||null===(s=o.processor)||void 0===s?void 0:s.type)&&(null===(a=e.video)||void 0===a||null===(c=a.processor)||void 0===c?void 0:c._isDefaultWhenNone);if(e.video&&!h){var p=ms({},e.video.processor);delete p._isDefaultWhenNone,l.video=ms(ms({},e.video),{},{processor:p})}return l}}},{key:"getInputSettings",value:function(){var e=this;return new Promise((function(t){t(e._getInputSettings())}))}},{key:"_getInputSettings",value:function(){var e,t,n,r,i,o,s,a,c={processor:{type:"none",_isDefaultWhenNone:!0}};this._inputSettings?(e=(null===(n=this._inputSettings)||void 0===n?void 0:n.video)||c,t=(null===(r=this._inputSettings)||void 0===r?void 0:r.audio)||c):(e=(null===(i=this._preloadCache)||void 0===i||null===(o=i.inputSettings)||void 0===o?void 0:o.video)||c,t=(null===(s=this._preloadCache)||void 0===s||null===(a=s.inputSettings)||void 0===a?void 0:a.audio)||c);var l={audio:t,video:e};return this._prepInputSettingsToPresentToUser(l)}},{key:"updateInputSettings",value:(G=o((function*(e){var t=this;return $s(e)?(e&&(this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),qs(e),e.audio&&(this._preloadCache.inputSettings.audio=e.audio),e.video&&(this._preloadCache.inputSettings.video=e.video)),$s(e)?this._callObjectMode&&this.needsLoad()?this._getInputSettings():new Promise((function(n,r){t.sendMessageToCallMachine({action:"update-input-settings",inputSettings:e},(function(e){e.error?r(e.error):n({inputSettings:t._prepInputSettingsToPresentToUser(e.inputSettings)})}))})):this._getInputSettings()):Promise.reject(Js())})),function(e){return G.apply(this,arguments)})},{key:"setBandwidth",value:function(e){var t=e.kbs,n=e.trackConstraints;if(Bs(),this._dailyMainExecuted)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:n}),this}},{key:"getDailyLang",value:function(){var e=this;if(Bs(),this._dailyMainExecuted)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 Bs(),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[vr,gr].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(Y=o((function*(){var e=this;return Ns(this._callState,"getMeetingSession()"),new Promise((function(t){e.sendMessageToCallMachine({action:"get-meeting-session"},(function(e){delete e.action,delete e.callbackStamp,delete e.callFrameId,t(e)}))}))})),function(){return Y.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return Ns(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";Fs(this._callObjectMode,"setMeetingSessionData()"),Ns(this._callState,"setMeetingSessionData");try{!function(e,t){new Ro({data:e,mergeStrategy:t})}(e,t)}catch(e){throw e}try{this.sendMessageToCallMachine({action:"set-session-data",data:e,mergeStrategy:t})}catch(e){throw new Error("Error setting meeting session data: ".concat(e))}}},{key:"setUserName",value:function(e,t){var n=this;return this.properties.userName=e,new Promise((function(r){n.sendMessageToCallMachine({action:"set-user-name",name:null!=e?e:"",thisMeetingOnly:ho()||!!t&&!!t.thisMeetingOnly},(function(e){delete e.action,delete e.callbackStamp,r(e)}))}))}},{key:"setUserData",value:(V=o((function*(e){var t=this;try{Ys(e)}catch(e){throw e}if(this.properties.userData=e,this._dailyMainExecuted)return new Promise((function(n){try{t.sendMessageToCallMachine({action:"set-user-data",userData:e},(function(e){delete e.action,delete e.callbackStamp,delete e.callFrameId,n(e)}))}catch(e){throw new Error("Error setting user data: ".concat(e))}}))})),function(e){return V.apply(this,arguments)})},{key:"validateAudioLevelInterval",value:function(e){if(e&&(e<100||"number"!=typeof e))throw new Error("The interval must be a number greater than or equal to 100 milliseconds.")}},{key:"startLocalAudioLevelObserver",value:function(e){var t=this;if(Bs(),this.validateAudioLevelInterval(e),this._dailyMainExecuted)return new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:e},(function(e){e.error?r({error:e.error}):n()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:"stopLocalAudioLevelObserver",value:(B=o((function*(){Bs(),this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})})),function(){return B.apply(this,arguments)})},{key:"startRemoteParticipantsAudioLevelObserver",value:function(e){var t=this;if(Bs(),this.validateAudioLevelInterval(e),this._dailyMainExecuted)return new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:e},(function(e){e.error?r({error:e.error}):n()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:"stopRemoteParticipantsAudioLevelObserver",value:(U=o((function*(){Bs(),this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})})),function(){return U.apply(this,arguments)})},{key:"startCamera",value:(x=o((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Fs(this._callObjectMode,"startCamera()"),Rs(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),xs(this._testCallInProgress,"startCamera()"),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 Promise.reject();if(t.token&&t.token!==this.properties.token)return Promise.reject()}this.validateProperties(t),this.properties=ms(ms({},this.properties),t)}return new Promise((function(t){e.sendMessageToCallMachine({action:"start-camera",properties:Ds(e.properties),preloadCache:Ds(e._preloadCache)},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return x.apply(this,arguments)})},{key:"validateCustomTrack",value:function(e,t,n){if(n&&n.length>50)throw new Error("Custom track `trackName` must not be more than 50 characters");if(t&&"music"!==t&&"speech"!==t&&!(t instanceof Object))throw new Error("Custom track `mode` must be either `music` | `speech` | `DailyMicAudioModeSettings` or `undefined`");if(n&&["cam-audio","cam-video","screen-video","screen-audio","rmpAudio","rmpVideo","customVideoDefaults"].includes(n))throw new Error("Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo");if(!(e instanceof MediaStreamTrack))throw new 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,mode,trackName};return Bs(),Ns(this._callState,"startCustomTrack()"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise((function(n,r){window._dailyPreloadCache.customTrack=t.track,t.track=oo,e.sendMessageToCallMachine({action:"start-custom-track",properties:t},(function(e){e.error?r({error:e.error}):n(e.mediaTag)}))}))}},{key:"stopCustomTrack",value:function(e){var t=this;return Bs(),Ns(this._callState,"stopCustomTrack()"),new Promise((function(n){t.sendMessageToCallMachine({action:"stop-custom-track",mediaTag:e},(function(e){n(e.mediaTag)}))}))}},{key:"setCamera",value:function(e){var t=this;return Vs(),js(this._dailyMainExecuted,"setCamera()"),new Promise((function(n){t.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:e},(function(e){n({device:e.device})}))}))}},{key:"setAudioDevice",value:(j=o((function*(e){return Vs(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(e){return j.apply(this,arguments)})},{key:"cycleCamera",value:function(){var e=this;return new Promise((function(t){e.sendMessageToCallMachine({action:"cycle-camera"},(function(e){t({device:e.device})}))}))}},{key:"cycleMic",value:function(){var e=this;return Bs(),new Promise((function(t){e.sendMessageToCallMachine({action:"cycle-mic"},(function(e){t({device:e.device})}))}))}},{key:"getCameraFacingMode",value:function(){var e=this;return Vs(),new Promise((function(t){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(e){t(e.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(R=o((function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,o=e.videoSource;return Bs(),void 0!==i&&(n=i),void 0!==o&&(r=o),n&&(this._preloadCache.audioDeviceId=n),r&&(this._preloadCache.videoDeviceId=r),this._callObjectMode&&this.needsLoad()?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:(n instanceof MediaStreamTrack&&(n=oo),r instanceof MediaStreamTrack&&(r=oo),new Promise((function(e){t.sendMessageToCallMachine({action:"set-input-devices",audioDeviceId:n,videoDeviceId:r},(function(n){delete n.action,delete n.callbackStamp,n.returnPreloadCache?e({camera:{deviceId:t._preloadCache.videoDeviceId},mic:{deviceId:t._preloadCache.audioDeviceId},speaker:{deviceId:t._preloadCache.outputDeviceId}}):e(n)}))})))})),function(e){return R.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(I=o((function*(e){var t=this,n=e.outputDeviceId;return Bs(),n&&(this._preloadCache.outputDeviceId=n),this._callObjectMode&&this.needsLoad()?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:new Promise((function(e){t.sendMessageToCallMachine({action:"set-output-device",outputDeviceId:n},(function(n){delete n.action,delete n.callbackStamp,n.returnPreloadCache?e({camera:{deviceId:t._preloadCache.videoDeviceId},mic:{deviceId:t._preloadCache.audioDeviceId},speaker:{deviceId:t._preloadCache.outputDeviceId}}):e(n)}))}))})),function(e){return I.apply(this,arguments)})},{key:"getInputDevices",value:(N=o((function*(){var e=this;return this._callObjectMode&&this.needsLoad()?{camera:{deviceId:this._preloadCache.videoDeviceId},mic:{deviceId:this._preloadCache.audioDeviceId},speaker:{deviceId:this._preloadCache.outputDeviceId}}:new Promise((function(t){e.sendMessageToCallMachine({action:"get-input-devices"},(function(n){delete n.action,delete n.callbackStamp,n.returnPreloadCache?t({camera:{deviceId:e._preloadCache.videoDeviceId},mic:{deviceId:e._preloadCache.audioDeviceId},speaker:{deviceId:e._preloadCache.outputDeviceId}}):t(n)}))}))})),function(){return N.apply(this,arguments)})},{key:"nativeInCallAudioMode",value:function(){return Vs(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(Vs(),[ys,bs].includes(e)&&e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&Is(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}},{key:"preAuth",value:(D=o((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Fs(this._callObjectMode,"preAuth()"),Rs(this._callState,this._isPreparingToJoin,"preAuth()"),xs(this._testCallInProgress,"preAuth()"),this.needsLoad()&&(yield this.load(t)),!t.url)throw new Error("preAuth() requires at least a url to be provided");return this.validateProperties(t),this.properties=ms(ms({},this.properties),t),new Promise((function(t,n){e.sendMessageToCallMachine({action:"daily-method-preauth",properties:Ds(e.properties),preloadCache:Ds(e._preloadCache)},(function(r){return r.error?n(r.error):r.access?(e._didPreAuth=!0,void t({access:r.access})):n(new Error("unknown error in preAuth()"))}))}))})),function(){return D.apply(this,arguments)})},{key:"load",value:(P=o((function*(e){var t=this;if(this.needsLoad()){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");if(e&&(this.validateProperties(e),this.properties=ms(ms({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");this._updateCallState(pr);try{this.emit(Xr,{action:Xr})}catch(e){}return this._callObjectMode?new Promise((function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t._callFrameId,t.properties.dailyConfig&&t.properties.dailyConfig.avoidEval,(function(n){t._bundleLoadTime=n?"no-op":Date.now()-r,t._updateCallState(fr),n&&t.emit(ei,{action:ei}),e()}),(function(e,r){if(t.emit(Zr,{action:Zr,errorMsg:e}),!r){t._updateCallState(gr),t.resetMeetingDependentVars();var i={action:Xi,errorMsg:e,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:new Error(e),bundleUrl:te()}}};t._maybeSendToSentry(i),t.emit(Xi,i),n(e)}}))})):(this._iframe.src=ee(this.assembleMeetingUrl()),new Promise((function(e,n){t._loadedCallback=function(r){if(t._callState!==gr){for(var i in t._updateCallState(fr),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),t._inputEventsOn)t.sendMessageToCallMachine({action:no,on:i});e()}else n(r)}})))}})),function(e){return P.apply(this,arguments)})},{key:"join",value:(L=o((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};xs(this._testCallInProgress,"join()");var n=!1;if(this.needsLoad()){this.updateIsPreparingToJoin(!0);try{yield this.load(t)}catch(e){return this.updateIsPreparingToJoin(!1),Promise.reject(e)}}else{if(n=!(!this.properties.cssFile&&!this.properties.cssText),this._didPreAuth){if(t.url&&t.url!==this.properties.url)return this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=ms(ms({},this.properties),t)}if(void 0!==t.showLocalVideo&&(this._callObjectMode||(this._showLocalVideo=!!t.showLocalVideo)),void 0!==t.showParticipantsBar&&(this._callObjectMode||(this._showParticipantsBar=!!t.showParticipantsBar)),this._callState!==_r&&this._callState!==mr){this._updateCallState(mr,!1);try{this.emit(ri,{action:ri})}catch(e){}return this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),t.inputSettings&&t.inputSettings.audio&&(this._preloadCache.inputSettings.audio=t.inputSettings.audio),t.inputSettings&&t.inputSettings.video&&(this._preloadCache.inputSettings.video=t.inputSettings.video),this.sendMessageToCallMachine({action:"join-meeting",properties:Ds(this.properties),preloadCache:Ds(this._preloadCache)}),new Promise((function(t,r){e._joinedCallback=function(i,o){if(e._callState!==gr){if(e._updateCallState(_r),i)for(var s in i)e._callObjectMode&&(Qo(i[s]),Xo(i[s]),es(i[s],e._participants[s])),e._participants[s]=ms({},i[s]),e.toggleParticipantAudioBasedOnNativeAudioFocus();n&&e.loadCss(e.properties),t(i)}else r(o)}}))}this.updateIsPreparingToJoin(!1)})),function(){return L.apply(this,arguments)})},{key:"leave",value:(O=o((function*(){var e=this;return xs(this._testCallInProgress,"leave()"),new Promise((function(t){if(e._callState===vr||e._callState===gr)t();else if(e._callObjectLoader&&!e._callObjectLoader.loaded){e._callObjectLoader.cancel(),e._updateCallState(vr),e.resetMeetingDependentVars();try{e.emit(vr,{action:vr})}catch(e){}t()}else e._resolveLeave=t,e.sendMessageToCallMachine({action:"leave-meeting"})}))})),function(){return O.apply(this,arguments)})},{key:"startScreenShare",value:(A=o((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(js(this._dailyMainExecuted,"startScreenShare()"),t.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",t.screenVideoSendSettings),t.mediaStream&&(this._preloadCache.screenMediaStream=t.mediaStream,t.mediaStream=oo),"undefined"!=typeof DailyNativeUtils&&void 0!==DailyNativeUtils.isIOS&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emit(Qi,{action:Qi,type:"screen-share-error",errorMsg:"Could not start the screen sharing. The screen is already been captured!"});n.setSystemScreenCaptureStartCallback((function(){n.setSystemScreenCaptureStartCallback(null),e.sendMessageToCallMachine({action:to,captureOptions:t})})),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:to,captureOptions:t})})),function(){return A.apply(this,arguments)})},{key:"stopScreenShare",value:function(){js(this._dailyMainExecuted,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(ms({action:"local-recording-start"},e))}},{key:"updateRecording",value:function(e){var t=e.layout,n=void 0===t?{preset:"default"}:t,r=e.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-recording",layout:n,instanceId:r})}},{key:"stopRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(ms({action:"local-recording-stop"},e))}},{key:"startLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(ms({action:"daily-method-start-live-streaming"},e))}},{key:"updateLiveStreaming",value:function(e){var t=e.layout,n=void 0===t?{preset:"default"}:t,r=e.instanceId;this.sendMessageToCallMachine({action:"daily-method-update-live-streaming",layout:n,instanceId:r})}},{key:"addLiveStreamingEndpoints",value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:ro,endpointsOp:"add-endpoints",endpoints:t,instanceId:n})}},{key:"removeLiveStreamingEndpoints",value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:ro,endpointsOp:"remove-endpoints",endpoints:t,instanceId:n})}},{key:"stopLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(ms({action:"daily-method-stop-live-streaming"},e))}},{key:"validateDailyConfig",value:function(e){e.camSimulcastEncodings&&this.validateSimulcastEncodings(e.camSimulcastEncodings),e.screenSimulcastEncodings}},{key:"validateSimulcastEncodings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(!(e instanceof Array))throw new Error("encodings must be an Array");if(!Xs(e.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var r=0;r<e.length;r++){var i=e[r];for(var o in this._validateEncodingLayerHasValidProperties(i),i){if(!ks.includes(o))throw new Error("Invalid key ".concat(o,", valid keys are:")+Object.values(ks));if("number"!=typeof i[o])throw new Error("".concat(o," must be a number"));if(t){var s=t[o],a=s.min,c=s.max;if(!Xs(i[o],a,c))throw new Error("".concat(o," value not in range. valid range: ").concat(a," to ").concat(c))}}if(n&&!i.hasOwnProperty("maxBitrate"))throw new Error("maxBitrate is not specified")}}}},{key:"startRemoteMediaPlayer",value:(M=o((function*(e){var t=this,n=e.url,r=e.settings,i=void 0===r?{state:co.PLAY}:r;try{!function(e){if("string"!=typeof e)throw new Error('url parameter must be "string" type')}(n),Qs(i),function(e){for(var t in e)if(!Ts.includes(t))throw new Error("Invalid key ".concat(t,", valid keys are: ").concat(Ts));e.simulcastEncodings&&this.validateSimulcastEncodings(e.simulcastEncodings,ws,!0)}(i)}catch(e){throw e}return new Promise((function(e,r){t.sendMessageToCallMachine({action:"daily-method-start-remote-media-player",url:n,settings:i},(function(t){t.error?r({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return M.apply(this,arguments)})},{key:"stopRemoteMediaPlayer",value:(C=o((function*(e){var t=this;if("string"!=typeof e)throw new Error(" remotePlayerID must be of type string");return new Promise((function(n,r){t.sendMessageToCallMachine({action:"daily-method-stop-remote-media-player",session_id:e},(function(e){e.error?r({error:e.error,errorMsg:e.errorMsg}):n()}))}))})),function(e){return C.apply(this,arguments)})},{key:"updateRemoteMediaPlayer",value:(T=o((function*(e){var t=this,n=e.session_id,r=e.settings;try{Qs(r)}catch(e){throw e}return new Promise((function(e,i){t.sendMessageToCallMachine({action:"daily-method-update-remote-media-player",session_id:n,settings:r},(function(t){t.error?i({error:t.error,errorMsg:t.errorMsg}):e({session_id:t.session_id,remoteMediaPlayerState:{state:t.state,settings:t.settings}})}))}))})),function(e){return T.apply(this,arguments)})},{key:"startTranscription",value:function(e){this.sendMessageToCallMachine(ms({action:"daily-method-start-transcription"},e))}},{key:"stopTranscription",value:function(){this.sendMessageToCallMachine({action:"daily-method-stop-transcription"})}},{key:"startDialOut",value:(k=o((function*(e){var t=this;Ns(this._callState,"startDialOut()");var n=function(e){if(e){if(!Array.isArray(e))throw new Error("Error starting dial out: audio codec must be an array");if(e.length<=0)throw new Error("Error starting dial out: audio codec array specified but empty");e.forEach((function(e){if("string"!=typeof e)throw new Error("Error starting dial out: audio codec must be a string");if("OPUS"!==e&&"PCMU"!==e&&"PCMA"!==e&&"G722"!==e)throw new Error("Error starting dial out: audio codec must be one of OPUS, PCMU, PCMA, G722")}))}};if(!e.sipUri&&!e.phoneNumber)throw new Error("Error starting dial out: either a sip uri or phone number must be provided");if(e.sipUri&&e.phoneNumber)throw new 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 new Error("Error starting dial out: sipUri must be a string");if(!e.sipUri.startsWith("sip:"))throw new Error("Error starting dial out: Invalid SIP URI, must start with 'sip:'");if(e.video&&"boolean"!=typeof e.video)throw new Error("Error starting dial out: video must be a boolean value");!function(e){if(e&&(n(e.audio),e.video)){if(!Array.isArray(e.video))throw new Error("Error starting dial out: video codec must be an array");if(e.video.length<=0)throw new Error("Error starting dial out: video codec array specified but empty");e.video.forEach((function(e){if("string"!=typeof e)throw new Error("Error starting dial out: video codec must be a string");if("H264"!==e&&"VP8"!==e)throw new Error("Error starting dial out: video codec must be H264 or VP8")}))}}(e.codecs)}if(e.phoneNumber){if("string"!=typeof e.phoneNumber)throw new Error("Error starting dial out: phoneNumber must be a string");if(!/^\+\d{1,}$/.test(e.phoneNumber))throw new Error("Error starting dial out: Invalid phone number, must be valid phone number as per E.164");e.codecs&&n(e.codecs.audio)}return new Promise((function(n,r){t.sendMessageToCallMachine(ms({action:"dialout-start"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return k.apply(this,arguments)})},{key:"stopDialOut",value:function(e){var t=this;return Ns(this._callState,"stopDialOut()"),new Promise((function(n,r){t.sendMessageToCallMachine(ms({action:"dialout-stop"},e),(function(e){e.error?r(e.error):n(e)}))}))}},{key:"sendDTMF",value:(w=o((function*(e){var t=this;return Ns(this._callState,"sendDTMF()"),function(e){var t=e.sessionId,n=e.tones;if(!t||!n)throw new Error("sessionId and tones are mandatory parameter");if("string"!=typeof t||"string"!=typeof n)throw new Error("sessionId and tones should be of string type");if(n.length>20)throw new Error("tones string must be upto 20 characters");var r=n.match(/[^0-9A-D*#]/g);if(r&&r[0])throw new Error("".concat(r[0]," is not valid DTMF tone"))}(e),new Promise((function(n,r){t.sendMessageToCallMachine(ms({action:"send-dtmf"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return w.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var e=this;return this._callState!==_r?{stats:{latest:{}}}:new Promise((function(t){e.sendMessageToCallMachine({action:"get-calc-stats"},(function(n){t(ms({stats:n.stats},e._network))}))}))}},{key:"testWebsocketConnectivity",value:(E=o((function*(){var e=this;if(xs(this._testCallInProgress,"testWebsocketConnectivity()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}return new Promise((function(t,n){e.sendMessageToCallMachine({action:"test-websocket-connectivity"},(function(e){e.error?n(e.error):t(e.results)}))}))})),function(){return E.apply(this,arguments)})},{key:"abortTestWebsocketConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-websocket-connectivity"})}},{key:"_validateVideoTrackForNetworkTests",value:function(e){return e&&e instanceof MediaStreamTrack&&!!function(e,t){var n=t.isLocalScreenVideo;return e&&"live"===e.readyState&&!function(e,t){return(!t.isLocalScreenVideo||"Chrome"!==So())&&e.muted&&!ls.has(e.id)}(e,{isLocalScreenVideo:n})}(e,{isLocalScreenVideo:!1})||!1}},{key:"testCallQuality",value:(S=o((function*(e){var t=this;if(function(e){var t=arguments.length>2?arguments[2]:void 0;if(e){var n="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," can not be called after preAuth(), startCamera(), or join() and call state has been initialized.");throw t&&(n+=" ".concat(t)),new Error(n)}}(this._dailyMainExecuted,"testCallQuality()"),e.videoTrack&&!this._validateVideoTrackForNetworkTests(e.videoTrack))throw new Error("Video track error");var n=this._testCallAlreadyInProgress,i=function(e){n||(t._testCallInProgress=e)};i(!0);var o=e.videoTrack,s=r(e,ds);if(this._preloadCache.videoTrackForConnectionQualityTest=o,this.needsLoad())try{var a=this._callState;yield this.load(),this._callState=a}catch(e){return i(!1),Promise.reject(e)}return new Promise((function(e){t.sendMessageToCallMachine(ms(ms({action:"test-call-quality"},s),{},{dailyJsVersion:t.properties.dailyJsVersion}),(function(n){var o=n.results,s=o.result,a=r(o,hs);if("failed"===s){var c,l=ms({},a);null!==(c=a.error)&&void 0!==c&&c.details?(a.error.details=JSON.parse(a.error.details),l.error=ms(ms({},l.error),{},{details:ms({},l.error.details)}),l.error.details.duringTest="testCallQuality"):(l.error=l.error?ms({},l.error):{},l.error.details={duringTest:"testCallQuality"}),t._maybeSendToSentry(l)}i(!1),e(ms({result:s},a))}))}))})),function(e){return S.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(y=o((function*(e){var t=yield this.testPeerToPeerCallQuality(e),n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n})),function(e){return y.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(v=o((function*(e){var t=this;if(xs(this._testCallInProgress,"testConnectionQuality()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw new Error("Video track error");return this._preloadCache.videoTrackForConnectionQualityTest=n,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:r},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return v.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){this.stopTestPeerToPeerCallQuality()}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(m=o((function*(e){var t=this;if(xs(this._testCallInProgress,"testNetworkConnectivity()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}if(!this._validateVideoTrackForNetworkTests(e))throw new Error("Video track error");return this._preloadCache.videoTrackForNetworkConnectivityTest=e,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-network-connectivity"},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return m.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,n){e._callState===_r?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?void 0:t.length)>0))throw new Error("Empty encoding is not allowed. At least one of these valid keys should be specified:"+Object.values(ks))}},{key:"_validateVideoSendSettings",value:function(e,t){var n="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"],r="Video send settings should be either an object or one of the supported presets: ".concat(n.join());if("string"==typeof t){if(!n.includes(t))throw new Error(r)}else{if("object"!==a(t))throw new Error(r);if(!t.maxQuality&&!t.encodings&&void 0===t.allowAdaptiveLayers)throw new Error("Video send settings must contain at least maxQuality, allowAdaptiveLayers or encodings attribute");if(t.maxQuality&&-1===["low","medium","high"].indexOf(t.maxQuality))throw new 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 new 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 new Error("Send settings must contain at least information for one track!");Object.entries(e).forEach((function(e){var n=g(e,2),r=n[0],i=n[1];t._validateVideoSendSettings(r,i)}))}},{key:"updateSendSettings",value:function(e){var t=this;return this.validateUpdateSendSettings(e),this.needsLoad()?(this._preloadCache.sendSettings=e,{sendSettings:this._preloadCache.sendSettings}):new Promise((function(n,r){t.sendMessageToCallMachine({action:"update-send-settings",sendSettings:e},(function(e){e.error?r(e.error):n(e.sendSettings)}))}))}},{key:"getSendSettings",value:function(){return this._sendSettings||this._preloadCache.sendSettings}},{key:"getLocalAudioLevel",value:function(){return this._localAudioLevel}},{key:"getRemoteParticipantsAudioLevel",value:function(){return this._remoteParticipantsAudioLevel}},{key:"getActiveSpeaker",value:function(){return Bs(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return Bs(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return Bs(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){return Ns(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:(f=o((function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===So()&&Eo().major>115&&(t=t.filter((function(e){return"audiooutput"!==e.kind}))),{devices:t.map((function(e){return JSON.parse(JSON.stringify(e))}))}}return new Promise((function(t){e.sendMessageToCallMachine({action:"enumerate-devices"},(function(e){t({devices:e.devices})}))}))})),function(){return f.apply(this,arguments)})},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(Ns(this._callState,"sendAppMessage()"),JSON.stringify(e).length>4096)throw new Error("Message data too large. Max size is 4096");return this.sendMessageToCallMachine({action:"app-msg",data:e,to:t}),this}},{key:"addFakeParticipant",value:function(e){return Bs(),Ns(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(ms({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return Us(this._callObjectMode,"setShowNamesMode()"),Bs(),e&&"always"!==e&&"never"!==e||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 Us(this._callObjectMode,"setShowLocalVideo()"),Bs(),Ns(this._callState,"setShowLocalVideo()"),"boolean"!=typeof e||(this.sendMessageToCallMachine({action:"set-show-local-video",show:e}),this._showLocalVideo=e),this}},{key:"showLocalVideo",value:function(){return Us(this._callObjectMode,"showLocalVideo()"),Bs(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Us(this._callObjectMode,"setShowParticipantsBar()"),Bs(),Ns(this._callState,"setShowParticipantsBar()"),"boolean"!=typeof e||(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:e}),this._showParticipantsBar=e),this}},{key:"showParticipantsBar",value:function(){return Us(this._callObjectMode,"showParticipantsBar()"),Bs(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return Bs(),Us(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(e){return Bs(),Us(this._callObjectMode,"setCustomIntegrations()"),Ns(this._callState,"setCustomIntegrations()"),zs(e)?(this.sendMessageToCallMachine({action:"set-custom-integrations",integrations:e}),this._customIntegrations=e,this):this}},{key:"startCustomIntegrations",value:function(e){var t=this;if(Bs(),Us(this._callObjectMode,"startCustomIntegrations()"),Ns(this._callState,"startCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length||this.sendMessageToCallMachine({action:"start-custom-integrations",ids:n}),this}},{key:"stopCustomIntegrations",value:function(e){var t=this;if(Bs(),Us(this._callObjectMode,"stopCustomIntegrations()"),Ns(this._callState,"stopCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length||this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:n}),this}},{key:"customTrayButtons",value:function(){return Us(this._callObjectMode,"customTrayButtons()"),Bs(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(e){return Us(this._callObjectMode,"updateCustomTrayButtons()"),Bs(),Ns(this._callState,"updateCustomTrayButtons()"),Hs(e)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:e}),this._customTrayButtons=e,this):this}},{key:"theme",value:function(){return Us(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(e){var t=this;return Us(this._callObjectMode,"setTheme()"),new Promise((function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=ms({},e),t.sendMessageToCallMachine({action:"set-theme",theme:t.properties.theme});try{t.emit(Qr,{action:Qr,theme:t.properties.theme})}catch(e){}n(t.properties.theme)}catch(e){r(e)}}))}},{key:"requestFullscreen",value:(h=o((function*(){if(Bs(),this._iframe&&!document.fullscreenElement&&mo())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){}})),function(){return h.apply(this,arguments)})},{key:"exitFullscreen",value:function(){Bs(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(l=o((function*(){var e=this;return this._callObjectMode?Promise.resolve(null):new Promise((function(t){e.sendMessageToCallMachine({action:"get-sidebar-view"},(function(e){t(e.view)}))}))})),function(){return l.apply(this,arguments)})},{key:"setSidebarView",value:function(e){return this._callObjectMode||this.sendMessageToCallMachine({action:"set-sidebar-view",view:e}),this}},{key:"room",value:(c=o((function*(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeRoomConfigDefaults,n=void 0===t||t;return this._accessState.access===Tr||this.needsLoad()?this.properties.url?{roomUrlPendingJoin:this.properties.url}:null:new Promise((function(t){e.sendMessageToCallMachine({action:"lib-room-info",includeRoomConfigDefaults:n},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return c.apply(this,arguments)})},{key:"geo",value:(i=o((function*(){try{var e=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield e.json()).geo}}catch(e){return{current:""}}})),function(){return i.apply(this,arguments)})},{key:"setNetworkTopology",value:(n=o((function*(e){var t=this;return Bs(),Ns(this._callState,"setNetworkTopology()"),new Promise((function(n,r){t.sendMessageToCallMachine({action:"set-network-topology",opts:e},(function(e){e.error?r({error:e.error}):n({workerId:e.workerId})}))}))})),function(e){return n.apply(this,arguments)})},{key:"getNetworkTopology",value:(t=o((function*(){var e=this;return new Promise((function(t,n){e.needsLoad()&&t({topology:"none"}),e.sendMessageToCallMachine({action:"get-network-topology"},(function(e){e.error?n({error:e.error}):t({topology:e.topology})}))}))})),function(){return t.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(e){if(Bs(),"number"!=typeof e&&!0!==e&&!1!==e)throw new 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 this._inputEventsOn[e]={},this.sendMessageToCallMachine({action:no,on:e}),b.prototype.on.call(this,e,t)}},{key:"once",value:function(e,t){return this._inputEventsOn[e]={},this.sendMessageToCallMachine({action:no,on:e}),b.prototype.once.call(this,e,t)}},{key:"off",value:function(e,t){return delete this._inputEventsOn[e],this.isDestroyed()||this.sendMessageToCallMachine({action:no,off:e}),b.prototype.off.call(this,e,t)}},{key:"validateProperties",value:function(e){for(var t in e){if(!Os[t])throw new Error("unrecognized property '".concat(t,"'"));if(Os[t].validate&&!Os[t].validate(e[t],this))throw new Error("property '".concat(t,"': ").concat(Os[t].help))}}},{key:"assembleMeetingUrl",value:function(){var e,t,n=ms(ms({},this.properties),{},{emb:this._callFrameId,embHref:encodeURIComponent(window.location.href),proxy:null!==(e=window._dailyConfig)&&void 0!==e&&e.proxyUrl?encodeURIComponent(null===(t=window._dailyConfig)||void 0===t?void 0:t.proxyUrl):void 0}),r=n.url.match(/\?/)?"&":"?";return n.url+r+Object.keys(Os).filter((function(e){return Os[e].queryString&&void 0!==n[e]})).map((function(e){return"".concat(Os[e].queryString,"=").concat(n[e])})).join("&")}},{key:"needsLoad",value:function(){return[hr,pr,vr,gr].includes(this._callState)}},{key:"sendMessageToCallMachine",value:function(e,t){if(this._destroyed&&(this._logUseAfterDestroy(),this.strictMode))throw new Error("Use after destroy");this._messageChannel.sendMessageToCallMachine(e,t,this._iframe,this._callFrameId)}},{key:"forwardPackagedMessageToCallMachine",value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this._callFrameId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this._callFrameId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:"handleMessageFromCallMachine",value:function(e){switch(e.action){case zr:this.sendMessageToCallMachine(ms({action:Kr},this.properties));break;case"daily-main-executed":this._dailyMainExecuted=!0;var t={action:io,level:"log",code:1011,stats:{event:"bundle load",time:"no-op"===this._bundleLoadTime?0:this._bundleLoadTime,preLoaded:"no-op"===this._bundleLoadTime,url:te()}};this.sendMessageToCallMachine(t),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case ei:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null);try{this.emit(e.action,e)}catch(e){}break;case ii:this._joinedCallback&&(this._joinedCallback(e.participants),this._joinedCallback=null);try{this.emit(e.action,e)}catch(e){}break;case ai:case ci:if(this._callState===vr)return;if(e.participant&&e.participant.session_id){var n=e.participant.local?"local":e.participant.session_id;this._callObjectMode&&(Qo(e.participant),Xo(e.participant),es(e.participant,this._participants[n]));try{this.maybeParticipantTracksStopped(this._participants[n],e.participant),this.maybeParticipantTracksStarted(this._participants[n],e.participant),this.maybeEventRecordingStopped(this._participants[n],e.participant),this.maybeEventRecordingStarted(this._participants[n],e.participant)}catch(e){}if(!this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[n])){this._participants[n]=ms({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus();try{this.emit(e.action,e)}catch(e){}}}break;case li:if(e.participant&&e.participant.session_id){var i=this._participants[e.participant.session_id];i&&this.maybeParticipantTracksStopped(i,null),delete this._participants[e.participant.session_id];try{this.emit(e.action,e)}catch(e){}}break;case ui:if(!F(this._participantCounts,e.participantCounts)){this._participantCounts=e.participantCounts;try{this.emit(e.action,e)}catch(e){}}break;case di:var o={access:e.access};if(e.awaitingAccess&&(o.awaitingAccess=e.awaitingAccess),!F(this._accessState,o)){this._accessState=o;try{this.emit(e.action,e)}catch(e){}}break;case hi:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession;try{delete e.callFrameId,this.emit(e.action,e);var s=ms(ms({},e),{},{action:"meeting-session-updated"});this.emit(s.action,s)}catch(e){}}break;case Xi:var a;this._iframe&&!e.preserveIframe&&(this._iframe.src=""),this._updateCallState(gr),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(e.errorMsg),this._loadedCallback=null),e.preserveIframe;var c=r(e,ps);null!=c&&null!==(a=c.error)&&void 0!==a&&a.details&&(c.error.details=JSON.parse(c.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&(this._joinedCallback(null,c),this._joinedCallback=null);try{this.emit(e.action,c)}catch(e){}break;case oi:this._callState!==gr&&this._updateCallState(vr),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null);try{this.emit(e.action,e)}catch(e){}break;case"selected-devices-updated":if(e.devices)try{this.emit(e.action,e)}catch(e){}break;case Ui:var l=e.threshold,u=e.quality;if(l!==this._network.threshold||u!==this._network.quality){this._network.quality=u,this._network.threshold=l;try{this.emit(e.action,e)}catch(e){}}break;case Vi:if(e&&e.cpuLoadState)try{this.emit(e.action,e)}catch(e){}break;case xi:var d=e.activeSpeaker;if(this._activeSpeaker.peerId!==d.peerId){this._activeSpeaker.peerId=d.peerId;try{this.emit(e.action,{action:e.action,activeSpeaker:this._activeSpeaker})}catch(e){}}break;case"show-local-video-changed":if(this._callObjectMode)return;var h=e.show;this._showLocalVideo=h;try{this.emit(e.action,{action:e.action,show:h})}catch(e){}break;case Fi:var p=e.enabled;if(this._activeSpeakerMode!==p){this._activeSpeakerMode=p;try{this.emit(e.action,{action:e.action,enabled:this._activeSpeakerMode})}catch(e){}}break;case mi:case _i:case vi:this._waitingParticipants=e.allWaitingParticipants;try{this.emit(e.action,{action:e.action,participant:e.participant})}catch(e){}break;case zi:if(!F(this._receiveSettings,e.receiveSettings)){this._receiveSettings=e.receiveSettings;try{this.emit(e.action,{action:e.action,receiveSettings:e.receiveSettings})}catch(e){}}break;case Ki:if(!F(this._inputSettings,e.inputSettings)){var f=this._getInputSettings();if(this._inputSettings=e.inputSettings,this._preloadCache.inputSettings={},!F(f,this._getInputSettings()))try{this.emit(e.action,{action:e.action,inputSettings:this._getInputSettings()})}catch(e){}}break;case"send-settings-updated":if(!F(this._sendSettings,e.sendSettings)){this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null;try{this.emit(e.action,{action:e.action,sendSettings:e.sendSettings})}catch(e){}}break;case"local-audio-level":this._localAudioLevel=e.audioLevel,this.emitDailyJSEvent(e);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this.emitDailyJSEvent(e);break;case Pi:var m=e.session_id;this._rmpPlayerState[m]=e.playerState,this.emitDailyJSEvent(e);break;case Ni:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case Di:var _=e.session_id,v=this._rmpPlayerState[_];v&&this.compareEqualForRMPUpdateEvent(v,e.remoteMediaPlayerState)||(this._rmpPlayerState[_]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(e);break;case pi:var g=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=Zs(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||g)&&this.emitDailyJSEvent(e);break;case wi:case ki:case Ti:case Ci:case Mi:case bi:case Si:case Ei:case ti:case ni:case Oi:case Li:case Ii:case Ri:case ji:case Bi:case Ai:case $i:case qi:case Ji:case Wi:case Qi:case Hi:case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-error":case"dialout-stopped":case"dialout-warning":try{this.emit(e.action,e)}catch(e){}break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(e,t){var n="record";if(e&&!t.local&&!1===t[n]&&e[n]!==t[n])try{this.emit(ki,{action:ki})}catch(e){}}},{key:"maybeEventRecordingStarted",value:function(e,t){var n="record";if(e&&!t.local&&!0===t[n]&&e[n]!==t[n])try{this.emit(wi,{action:wi})}catch(e){}}},{key:"maybeEventTrackStopped",value:function(e,t,n,r){if(e&&("ended"===e.readyState||!t||e.id!==t.id))try{this.emit(yi,{action:yi,track:e,participant:n,type:r})}catch(e){}}},{key:"maybeEventTrackStarted",value:function(e,t,n,r){if(t&&(!e||"ended"===e.readyState||t.id!==e.id))try{this.emit(gi,{action:gi,track:t,participant:n,type:r})}catch(e){}}},{key:"maybeParticipantTracksStopped",value:function(e,t){if(e)for(var n in e.tracks)this.maybeEventTrackStopped(e.tracks[n].track,t&&t.tracks[n]?t.tracks[n].track:null,t,n)}},{key:"maybeParticipantTracksStarted",value:function(e,t){if(t)for(var n in t.tracks)this.maybeEventTrackStarted(e&&e.tracks[n]?e.tracks[n].track:null,t.tracks[n].track,t,n)}},{key:"compareEqualForRMPUpdateEvent",value:function(e,t){var n,r;return e.state===t.state&&(null===(n=e.settings)||void 0===n?void 0:n.volume)===(null===(r=t.settings)||void 0===r?void 0:r.volume)}},{key:"emitDailyJSEvent",value:function(e){try{this.emit(e.action,e)}catch(e){}}},{key:"compareEqualForParticipantUpdateEvent",value:function(e,t){return!(!F(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 ho()?"undefined"==typeof DailyNativeUtils?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 n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=Is(n,r),o=Is(this._callState,this._isPreparingToJoin);i!==o&&(this.updateKeepDeviceAwake(o),this.updateDeviceAudioMode(o),this.updateShowAndroidOngoingMeetingNotification(o),this.updateNoOpRecordingEnsuringBackgroundContinuity(o))}}},{key:"resetMeetingDependentVars",value:function(){this._participants={},this._participantCounts=Es,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Tr},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Zs(Ss,this._callObjectMode),this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._remoteParticipantsAudioLevel={},this._dailyMainExecuted=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(e){ho()&&this.nativeUtils().setKeepDeviceAwake(e,this._callFrameId)}},{key:"updateDeviceAudioMode",value:function(e){if(ho()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(ho()&&this.nativeUtils().setShowOngoingMeetingNotification){var t,n,r,i;if(this.properties.reactNativeConfig&&this.properties.reactNativeConfig.androidInCallNotification){var o=this.properties.reactNativeConfig.androidInCallNotification;t=o.title,n=o.subtitle,r=o.iconName,i=o.disableForCustomOverride}i&&(e=!1),this.nativeUtils().setShowOngoingMeetingNotification(e,t,n,r,this._callFrameId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(e){ho()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){if(ho()){var e=window.store.getState();for(var t in e.streams){var n=e.streams[t];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(){return"hello, world."}},{key:"_logCallQualityTestResults",value:function(e){if(this._dailyMainExecuted){var t={action:io,level:"info",code:1012,results:e};this.sendMessageToCallMachine(t)}}},{key:"_logUseAfterDestroy",value:function(){if(this.needsLoad())if(us&&!us.needsLoad()){var e={action:io,level:"error",code:this.strictMode?9995:9997};us.sendMessageToCallMachine(e)}else this.strictMode;else{var t={action:io,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(t,null,this._iframe,this._callFrameId)}}},{key:"_logDuplicateInstanceAttempt",value:function(){var e=us._dailyMainExecuted?us:this._dailyMainExecuted?this:void 0;e?e.sendMessageToCallMachine({action:io,level:"error",code:this.strictMode?9990:9992}):(this._delayDuplicateInstanceLog=!0,us._delayDuplicateInstanceLog=!0)}},{key:"_maybeSendToSentry",value:function(e){var t,n,r,i,o,s;if(null===(t=e.error)||void 0===t||!t.type||["connection-error","end-of-life","no-room"].includes(e.error.type)){var a=null!==(n=this.properties)&&void 0!==n&&n.url?new URL(this.properties.url):void 0,c="production";a&&a.host.includes(".staging.daily")&&(c="staging");var l,u,d,h,p,f=new Vn({dsn:"https://[email protected]/168844",transport:Gn,integrations:[new dr.GlobalHandlers({onunhandledrejection:!1})],environment:c}),m=new Xt(f,void 0,Z.version());if(this.session_id&&m.setExtra("sessionId",this.session_id),this.properties){var _=ms({},this.properties);_.userName=_.userName?"[Filtered]":void 0,_.userData=_.userData?"[Filtered]":void 0,_.token=_.token?"[Filtered]":void 0,m.setExtra("properties",_)}if(a){var v=a.searchParams.get("domain");if(!v){var g=a.host.match(/(.*?)\./);v=g&&g[1]||""}v&&m.setTag("domain",v)}e.error&&(m.setTag("fatalErrorType",e.error.type),m.setExtra("errorDetails",e.error.details),(null===(l=e.error.details)||void 0===l?void 0:l.uri)&&m.setTag("serverAddress",e.error.details.uri),(null===(u=e.error.details)||void 0===u?void 0:u.workerGroup)&&m.setTag("workerGroup",e.error.details.workerGroup),(null===(d=e.error.details)||void 0===d?void 0:d.geoGroup)&&m.setTag("geoGroup",e.error.details.geoGroup),(null===(h=e.error.details)||void 0===h?void 0:h.bundleUrl)&&m.setTag("bundleUrl",e.error.details.bundleUrl),(null===(p=e.error.details)||void 0===p?void 0:p.on)&&m.setTag("connectionAttempt",e.error.details.on)),m.setTags({callMode:this._callObjectMode?ho()?"reactNative":null!==(r=this.properties)&&void 0!==r&&null!==(i=r.dailyConfig)&&void 0!==i&&null!==(o=i.callMode)&&void 0!==o&&o.includes("prebuilt")?this.properties.dailyConfig.callMode:"custom":"prebuilt-frame",version:Z.version()});var y=(null===(s=e.error)||void 0===s?void 0:s.msg)||e.errorMsg;m.run((function(e){e.captureException(new Error(y))}))}}}],[{key:"supportedBrowser",value:function(){if(ho())return{supported:!0,mobile:!0,name:"React Native",version:null,supportsScreenShare:!0,supportsSfu:!0,supportsVideoProcessing:!1,supportsAudioProcessing:!1};var e=Q.getParser(uo());return{supported:!!yo(),mobile:"mobile"===e.getPlatformType(),name:e.getBrowserName(),version:e.getBrowserVersion(),supportsFullscreen:!!mo(),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}(So(),Eo())||ho())),supportsSfu:!!yo(),supportsVideoProcessing:_o(),supportsAudioProcessing:go()}}},{key:"version",value:function(){return"0.58.0"}},{key:"createCallObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.layout="none",new Z(null,e)}},{key:"wrap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Bs(),!e||!e.contentWindow||"string"!=typeof e.src)throw new Error("DailyIframe::Wrap needs an iframe-like first argument");return t.layout||(t.customLayout?t.layout="custom-v1":t.layout="browser"),new Z(e,t)}},{key:"createFrame",value:function(e,t){var n,r;Bs(),e&&t?(n=e,r=t):e&&e.append?(n=e,r={}):(n=document.body,r=e||{});var i=r.iframeStyle;i||(i=n===document.body?{position:"fixed",border:"1px solid black",backgroundColor:"white",width:"375px",height:"450px",right:"1em",bottom:"1em"}:{border:0,width:"100%",height:"100%"});var o=document.createElement("iframe");window.navigator&&window.navigator.userAgent.match(/Chrome\/61\./)?o.allow="microphone, camera":o.allow="microphone; camera; autoplay; display-capture; screen-wake-lock",o.style.visibility="hidden",n.appendChild(o),o.style.visibility=null,Object.keys(i).forEach((function(e){return o.style[e]=i[e]})),r.layout||(r.customLayout?r.layout="custom-v1":r.layout="browser");try{return new Z(o,r)}catch(e){throw n.removeChild(o),e}}},{key:"createTransparentFrame",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Bs();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"),Z.wrap(t,e)}},{key:"getCallInstance",value:function(){return us}}]),Z}();function Ds(e){var t={};for(var n in e)e[n]instanceof MediaStreamTrack?t[n]=oo:"dailyConfig"===n?(e[n].modifyLocalSdpHook&&(window._dailyConfig&&(window._dailyConfig.modifyLocalSdpHook=e[n].modifyLocalSdpHook),delete e[n].modifyLocalSdpHook),e[n].modifyRemoteSdpHook&&(window._dailyConfig&&(window._dailyConfig.modifyRemoteSdpHook=e[n].modifyRemoteSdpHook),delete e[n].modifyRemoteSdpHook),t[n]=e[n]):t[n]=e[n];return t}function Ns(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==_r){var n="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," only supported after join.");throw t&&(n+=" ".concat(t)),new Error(n)}}function Is(e,t){return[mr,_r].includes(e)||t}function Rs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"This daily-js method",r=arguments.length>3?arguments[3]:void 0;if(Is(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),new Error(i)}}function js(e){var t=arguments.length>2?arguments[2]:void 0;if(!e){var n="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," requires preAuth(), startCamera(), or join() to initialize call state.");throw t&&(n+=" ".concat(t)),new Error(n)}}function xs(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 new Error(t)}}function Fs(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 new Error(t)}}function Us(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 new Error(t)}}function Bs(){if(ho())throw new Error("This daily-js method is not currently supported in React Native")}function Vs(){if(!ho())throw new Error("This daily-js method is only supported in React Native")}function Ys(e){if(void 0===e)return!0;var t;if("string"==typeof e)t=e;else try{t=JSON.stringify(e),F(JSON.parse(t),e)}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 Gs(e,t){for(var n=t.allowAllParticipantsKey,r=function(e){var t=["local"];return n||t.push("*"),e&&!t.includes(e)},i=function(e){return!!(void 0===e.layer||Number.isInteger(e.layer)&&e.layer>=0||"inherit"===e.layer)},o=function(e){return!(!e||e.video&&!i(e.video)||e.screenVideo&&!i(e.screenVideo))},s=0,a=Object.entries(e);s<a.length;s++){var c=g(a[s],2),l=c[0],u=c[1];if(!r(l)||!o(u))return!1}return!0}function $s(e){return!("object"!==a(e)||!(e.video&&"object"===a(e.video)||e.audio&&"object"===a(e.audio))||e.video&&!function(e){var t=["type","config"];if(!e)return!1;if("object"!==a(e))return!1;if(!function(e){return"string"==typeof e&&!!Object.values(so).includes(e)}(e.type))return!1;if(e.config){if("object"!==a(e.config))return!1;if(!function(e,t){var n=Object.keys(t);if(0===n.length)return!0;switch(e){case so.BGBLUR:return!(n.length>1||"strength"!==n[0])&&(!("number"!=typeof t.strength||t.strength<=0||t.strength>1||isNaN(t.strength))||!1);case so.BGIMAGE:return!(void 0!==t.source&&!function(e){return"default"===e.source?(e.type="default",!0):e.source instanceof ArrayBuffer||(ne(e.source)?(e.type="url",!!function(e){var t=new URL(e),n=t.pathname;if("data:"===t.protocol)try{var r=n.substring(n.indexOf(":")+1,n.indexOf(";")).split("/")[1];return lo.includes(r)}catch(e){return!1}var i=n.split(".").at(-1).toLowerCase().trim();return lo.includes(i)}(e.source)||!1):(t=e.source,n=Number(t),!(isNaN(n)||!Number.isInteger(n)||n<=0||n>10)&&(e.type="daily-preselect",!0)));var t,n}(t));default:return!0}}(e.type,e.config))return!1}return Object.keys(e).filter((function(e){return!t.includes(e)})).forEach((function(t){delete e[t]})),!0}(e.video.processor)||e.audio&&(n=e.audio.processor,r=["type"],!n||"object"!==a(n)||(Object.keys(n).filter((function(e){return!r.includes(e)})).forEach((function(e){delete n[e]})),t=n.type,"string"!=typeof t||!Object.values(ao).includes(t))));var t,n,r}function qs(e){var t,n,r=[];e.video&&!_o(null!==(t=null===(n=window._dailyConfig)||void 0===n?void 0:n.useLegacyVideoProcessor)&&void 0!==t&&t)&&(delete e.video,r.push("video")),e.audio&&!go()&&(delete e.audio,r.push("audio")),r.length}function Js(){var e=Object.values(so).join(" | "),t=Object.values(ao).join(" | ");return"inputSettings must be of the form: { video?: { processor: { type: [ ".concat(e," ], config?: {} } }, audio?: { processor: {type: [ ").concat(t," ] } } }")}function Ws(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [<remote participant id> | ".concat(Or).concat(t?' | "'.concat(Lr,'"'):"","]: ")+'{ [video: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [<non-negative integer> | "inherit"] } | "inherit"]] }}}'}function Hs(e){if(e&&"object"!==a(e)||Array.isArray(e))return!1;if(e)for(var t=0,n=Object.entries(e);t<n.length;t++)for(var r=g(n[t],1)[0],i=0,o=Object.entries(e[r]);i<o.length;i++){var s=g(o[i],2),c=s[0],l=s[1];if("iconPath"===c&&!ne(l))return!1;if("iconPathDarkMode"===c&&!ne(l))return!1;var u=Ms.id[c];if(!u)return!1;if(a(l)!==u)return!1}return!0}function zs(e){if(!e||e&&"object"!==a(e)||Array.isArray(e))return!1;for(var t=function(e){return"".concat(e," should be ").concat(As.id[e])},n=0,r=Object.entries(e);n<r.length;n++){var i=g(r[n],1)[0];if(!("label"in e[i]))return!1;if(!("location"in e[i]))return!1;if(!("src"in e[i])&&!("srcdoc"in e[i]))return!1;for(var o=0,s=Object.entries(e[i]);o<s.length;o++){var c=g(s[o],2),l=c[0],u=c[1];switch(l){case"allow":case"csp":case"name":case"referrerPolicy":case"sandbox":if("string"!=typeof u)return t(l),!1;break;case"iconURL":if(!ne(u))return"".concat(l," should be a url"),!1;break;case"src":if("srcdoc"in e[i])return!1;if(!ne(u))return'src "'.concat(u,'" is not a valid URL'),!1;break;case"srcdoc":if("src"in e[i])return!1;if("string"!=typeof u)return t(l),!1;break;case"location":if(!["main","sidebar"].includes(u))return t(l),!1;break;case"controlledBy":if("*"!==u&&"owners"!==u&&(!Array.isArray(u)||u.some((function(e){return"string"!=typeof e}))))return t(l),!1;break;case"shared":if((!Array.isArray(u)||u.some((function(e){return"string"!=typeof e})))&&"owners"!==u&&"boolean"!=typeof u)return t(l),!1;break;default:if(!As.id[l])return!1}}}return!0}function Ks(e,t){if(void 0===t)return!1;switch(a(t)){case"string":return a(e)===t;case"object":if("object"!==a(e))return!1;for(var n in e)if(!Ks(e[n],t[n]))return!1;return!0;default:return!1}}function Qs(e){if("object"!==a(e))throw new Error('RemoteMediaPlayerSettings: must be "object" type');if(e.state&&!Object.values(co).includes(e.state))throw new Error("Invalid value for RemoteMediaPlayerSettings.state, valid values are: "+JSON.stringify(co));if(e.volume){if("number"!=typeof e.volume)throw new Error('RemoteMediaPlayerSettings.volume: must be "number" type');if(e.volume<0||e.volume>2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function Xs(e,t,n){return!("number"!=typeof e||e<t||e>n)}function Zs(e,t){return e&&!t&&delete e.data,e}},5492:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Api=t.HttpClient=t.ContentType=t.CreateWebCallDTO=void 0;var n;t.CreateWebCallDTO=class{assistantId;assistantOverrides;assistant;sipEnabled;metadata},function(e){e.Json="application/json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(n||(t.ContentType=n={}));class r{baseUrl="https://api.vapi.ai";securityData=null;securityWorker;abortControllers=new Map;customFetch=(...e)=>fetch(...e);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(e={}){Object.assign(this,e)}setSecurityData=e=>{this.securityData=e};encodeQueryParam(e,t){return`${encodeURIComponent(e)}=${encodeURIComponent("number"==typeof t?t:`${t}`)}`}addQueryParam(e,t){return this.encodeQueryParam(t,e[t])}addArrayQueryParam(e,t){return e[t].map((e=>this.encodeQueryParam(t,e))).join("&")}toQueryString(e){const t=e||{};return Object.keys(t).filter((e=>void 0!==t[e])).map((e=>Array.isArray(t[e])?this.addArrayQueryParam(t,e):this.addQueryParam(t,e))).join("&")}addQueryParams(e){const t=this.toQueryString(e);return t?`?${t}`:""}contentFormatters={[n.Json]:e=>null===e||"object"!=typeof e&&"string"!=typeof e?e:JSON.stringify(e),[n.Text]:e=>null!==e&&"string"!=typeof e?JSON.stringify(e):e,[n.FormData]:e=>Object.keys(e||{}).reduce(((t,n)=>{const r=e[n];return t.append(n,r instanceof Blob?r:"object"==typeof r&&null!==r?JSON.stringify(r):`${r}`),t}),new FormData),[n.UrlEncoded]:e=>this.toQueryString(e)};mergeRequestParams(e,t){return{...this.baseApiParams,...e,...t||{},headers:{...this.baseApiParams.headers||{},...e.headers||{},...t&&t.headers||{}}}}createAbortSignal=e=>{if(this.abortControllers.has(e)){const t=this.abortControllers.get(e);return t?t.signal:void 0}const t=new AbortController;return this.abortControllers.set(e,t),t.signal};abortRequest=e=>{const t=this.abortControllers.get(e);t&&(t.abort(),this.abortControllers.delete(e))};request=async({body:e,secure:t,path:r,type:i,query:o,format:s,baseUrl:a,cancelToken:c,...l})=>{const u=("boolean"==typeof t?t:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},d=this.mergeRequestParams(l,u),h=o&&this.toQueryString(o),p=this.contentFormatters[i||n.Json],f=s||d.format;return this.customFetch(`${a||this.baseUrl||""}${r}${h?`?${h}`:""}`,{...d,headers:{...d.headers||{},...i&&i!==n.FormData?{"Content-Type":i}:{}},signal:(c?this.createAbortSignal(c):d.signal)||null,body:null==e?null:p(e)}).then((async e=>{const t=e;t.data=null,t.error=null;const n=f?await e[f]().then((e=>(t.ok?t.data=e:t.error=e,t))).catch((e=>(t.error=e,t))):t;if(c&&this.abortControllers.delete(c),!e.ok)throw n;return n}))}}t.HttpClient=r;t.Api=class extends r{assistant={assistantControllerCreate:(e,t={})=>this.request({path:"/assistant",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),assistantControllerFindAll:(e,t={})=>this.request({path:"/assistant",method:"GET",query:e,secure:!0,format:"json",...t}),assistantControllerFindOne:(e,t={})=>this.request({path:`/assistant/${e}`,method:"GET",secure:!0,format:"json",...t}),assistantControllerUpdate:(e,t,r={})=>this.request({path:`/assistant/${e}`,method:"PATCH",body:t,secure:!0,type:n.Json,format:"json",...r}),assistantControllerReplace:(e,t,r={})=>this.request({path:`/assistant/${e}`,method:"PUT",body:t,secure:!0,type:n.Json,format:"json",...r}),assistantControllerRemove:(e,t={})=>this.request({path:`/assistant/${e}`,method:"DELETE",secure:!0,format:"json",...t})};call={callControllerFindAll:(e,t={})=>this.request({path:"/call",method:"GET",query:e,secure:!0,format:"json",...t}),callControllerFindOne:(e,t={})=>this.request({path:`/call/${e}`,method:"GET",secure:!0,format:"json",...t}),callControllerCreatePhoneCall:(e,t={})=>this.request({path:"/call/phone",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),callControllerCreateWebCall:(e,t={})=>this.request({path:"/call/web",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t})};credential={credentialControllerCreate:(e,t={})=>this.request({path:"/credential",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),credentialControllerFindAll:(e,t={})=>this.request({path:"/credential",method:"GET",query:e,secure:!0,format:"json",...t}),credentialControllerFindOne:(e,t={})=>this.request({path:`/credential/${e}`,method:"GET",secure:!0,format:"json",...t}),credentialControllerUpdate:(e,t,r={})=>this.request({path:`/credential/${e}`,method:"PUT",body:t,secure:!0,type:n.Json,format:"json",...r}),credentialControllerRemove:(e,t={})=>this.request({path:`/credential/${e}`,method:"DELETE",secure:!0,format:"json",...t})};phoneNumber={phoneNumberControllerBuy:(e,t={})=>this.request({path:"/phone-number/buy",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),phoneNumberControllerImportTwilio:(e,t={})=>this.request({path:"/phone-number/import/twilio",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),phoneNumberControllerImportVonage:(e,t={})=>this.request({path:"/phone-number/import/vonage",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),phoneNumberControllerFindAll:(e,t={})=>this.request({path:"/phone-number",method:"GET",query:e,secure:!0,format:"json",...t}),phoneNumberControllerFindOne:(e,t={})=>this.request({path:`/phone-number/${e}`,method:"GET",secure:!0,format:"json",...t}),phoneNumberControllerUpdate:(e,t,r={})=>this.request({path:`/phone-number/${e}`,method:"PATCH",body:t,secure:!0,type:n.Json,format:"json",...r}),phoneNumberControllerRemove:(e,t={})=>this.request({path:`/phone-number/${e}`,method:"DELETE",secure:!0,format:"json",...t})};metrics={metricsControllerFindAll:(e,t={})=>this.request({path:"/metrics",method:"GET",query:e,secure:!0,format:"json",...t})};voiceLibrary={voiceLibraryControllerVoiceGetByProvider:(e,t={})=>this.request({path:`/voice-library/${e}`,method:"GET",secure:!0,format:"json",...t}),voiceLibraryControllerVoiceLibrarySyncByProvider:(e,t={})=>this.request({path:`/voice-library/sync/${e}`,method:"POST",secure:!0,format:"json",...t})};logging={loggingControllerGetLogs:(e,t={})=>this.request({path:"/logging",method:"GET",query:e,secure:!0,format:"json",...t})}}},3851:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.client=void 0;const r=new(n(5492).Api)({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async e=>{if(e)return{headers:{Authorization:`Bearer ${e}`}}}});t.client=r},1721:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(4190)),o=r(n(3887)),s=n(3851);async function a(e,t){const n=document.createElement("audio");return n.dataset.participantId=t,document.body.appendChild(n),await async function(e,t){e.muted=!1,e.autoplay=!0,null!=t&&(e.srcObject=new MediaStream([t]),await e.play())}(n,e),n}class c extends o.default{on(e,t){return super.on(e,t),this}once(e,t){return super.once(e,t),this}emit(e,...t){return super.emit(e,...t)}removeListener(e,t){return super.removeListener(e,t),this}removeAllListeners(e){return super.removeAllListeners(e),this}}t.default=class extends c{started=!1;call=null;speakingTimeout=null;averageSpeechLevel=0;constructor(e,t){super(),s.client.baseUrl=t??"https://api.vapi.ai",s.client.setSecurityData(e)}cleanup(){this.started=!1,this.call?.destroy(),this.call=null,this.speakingTimeout=null}async start(e,t){if(this.started)return null;this.started=!0;try{const n=(await s.client.call.callControllerCreateWebCall({assistant:"string"==typeof e?void 0:e,assistantId:"string"==typeof e?e:void 0,assistantOverrides:t})).data;return this.call&&this.cleanup(),this.call=i.default.createCallObject({audioSource:!0,videoSource:!1}),this.call.iframe()?.style.setProperty("display","none"),this.call.on("left-meeting",(()=>{this.emit("call-end"),this.cleanup()})),this.call.on("participant-left",(e=>{e&&function(e){const t=document.querySelector(`audio[data-participant-id="${e}"]`);t?.remove()}(e.participant.session_id)})),this.call.on("error",(e=>{this.emit("error",e)})),this.call.on("camera-error",(e=>{this.emit("error",e)})),this.call.on("track-started",(async e=>{e&&e.participant&&(e.participant?.local||"audio"===e.track.kind&&(await a(e.track,e.participant.session_id),"Vapi Speaker"===e?.participant?.user_name&&this.call?.sendAppMessage("playable")))})),this.call.on("participant-joined",(e=>{e&&this.call&&function(e,t){e.participant.local||t.updateParticipant(e.participant.session_id,{setSubscribedTracks:{audio:!0,video:!1}})}(e,this.call)})),await this.call.join({url:n.webCallUrl,subscribeToTracksAutomatically:!1}),this.call.startRemoteParticipantsAudioLevelObserver(100),this.call.on("remote-participants-audio-level",(e=>{e&&this.handleRemoteParticipantsAudioLevel(e)})),this.call.on("app-message",(e=>this.onAppMessage(e))),this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}}),n}catch(e){return this.emit("error",e),this.cleanup(),null}}onAppMessage(e){if(e)try{if("listening"===e.data)return this.emit("call-start");try{const t=JSON.parse(e.data);this.emit("message",t)}catch(e){}}catch(e){}}handleRemoteParticipantsAudioLevel(e){const t=Object.values(e.participantsAudioLevel).reduce(((e,t)=>e+t),0);this.emit("volume-level",Math.min(1,t/.15));t>.01&&(this.speakingTimeout?(clearTimeout(this.speakingTimeout),this.speakingTimeout=null):this.emit("speech-start"),this.speakingTimeout=setTimeout((()=>{this.emit("speech-end"),this.speakingTimeout=null}),1e3))}stop(){this.started=!1,this.call?.destroy(),this.call=null}send(e){this.call?.sendAppMessage(JSON.stringify(e))}setMuted(e){try{if(!this.call)throw new Error("Call object is not available.");this.call.setLocalAudio(!e)}catch(e){throw e}}isMuted(){try{return!!this.call&&!1===this.call.localAudio()}catch(e){throw e}}say(e,t){this.send({type:"say",message:e,endCallAfterSpoken:t})}}},3887:e=>{var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,o,s;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,console&&console.warn}return e}function u(){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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):f(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function f(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.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},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,u=f(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}}]);