diff --git a/dist/2.2.0/vapi-web-bundle-2.2.0.js b/dist/2.2.0/vapi-web-bundle-2.2.0.js new file mode 100644 index 0000000..4bd7f2d --- /dev/null +++ b/dist/2.2.0/vapi-web-bundle-2.2.0.js @@ -0,0 +1,201 @@ +/* + * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["Vapi"] = factory(); + else + root["Vapi"] = factory(); +})(this, () => { +return /******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./node_modules/@daily-co/daily-js/dist/daily-esm.js": +/*!***********************************************************!*\ + !*** ./node_modules/@daily-co/daily-js/dist/daily-esm.js ***! + \***********************************************************/ +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DAILY_ACCESS_LEVEL_FULL: () => (/* binding */ Lr),\n/* harmony export */ DAILY_ACCESS_LEVEL_LOBBY: () => (/* binding */ Ir),\n/* harmony export */ DAILY_ACCESS_LEVEL_NONE: () => (/* binding */ Nr),\n/* harmony export */ DAILY_ACCESS_UNKNOWN: () => (/* binding */ xr),\n/* harmony export */ DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE: () => (/* binding */ Kr),\n/* harmony export */ DAILY_CAMERA_ERROR_CAM_IN_USE: () => (/* binding */ Hr),\n/* harmony export */ DAILY_CAMERA_ERROR_CONSTRAINTS: () => (/* binding */ ti),\n/* harmony export */ DAILY_CAMERA_ERROR_MIC_IN_USE: () => (/* binding */ Qr),\n/* harmony export */ DAILY_CAMERA_ERROR_NOT_FOUND: () => (/* binding */ ei),\n/* harmony export */ DAILY_CAMERA_ERROR_PERMISSIONS: () => (/* binding */ Xr),\n/* harmony export */ DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES: () => (/* binding */ Zr),\n/* harmony export */ DAILY_CAMERA_ERROR_UNKNOWN: () => (/* binding */ ni),\n/* harmony export */ DAILY_EVENT_ACCESS_STATE_UPDATED: () => (/* binding */ yi),\n/* harmony export */ DAILY_EVENT_ACTIVE_SPEAKER_CHANGE: () => (/* binding */ Gi),\n/* harmony export */ DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE: () => (/* binding */ qi),\n/* harmony export */ DAILY_EVENT_APP_MSG: () => (/* binding */ Ni),\n/* harmony export */ DAILY_EVENT_CAMERA_ERROR: () => (/* binding */ ui),\n/* harmony export */ DAILY_EVENT_CPU_LOAD_CHANGE: () => (/* binding */ Wi),\n/* harmony export */ DAILY_EVENT_ERROR: () => (/* binding */ ao),\n/* harmony export */ DAILY_EVENT_EXIT_FULLSCREEN: () => (/* binding */ Ki),\n/* harmony export */ DAILY_EVENT_FACE_COUNTS_UPDATED: () => (/* binding */ Hi),\n/* harmony export */ DAILY_EVENT_FULLSCREEN: () => (/* binding */ Qi),\n/* harmony export */ DAILY_EVENT_IFRAME_LAUNCH_CONFIG: () => (/* binding */ ii),\n/* harmony export */ DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG: () => (/* binding */ ri),\n/* harmony export */ DAILY_EVENT_INPUT_SETTINGS_UPDATED: () => (/* binding */ io),\n/* harmony export */ DAILY_EVENT_JOINED_MEETING: () => (/* binding */ hi),\n/* harmony export */ DAILY_EVENT_JOINING_MEETING: () => (/* binding */ di),\n/* harmony export */ DAILY_EVENT_LANG_UPDATED: () => (/* binding */ no),\n/* harmony export */ DAILY_EVENT_LEFT_MEETING: () => (/* binding */ pi),\n/* harmony export */ DAILY_EVENT_LIVE_STREAMING_ERROR: () => (/* binding */ to),\n/* harmony export */ DAILY_EVENT_LIVE_STREAMING_STARTED: () => (/* binding */ Xi),\n/* harmony export */ DAILY_EVENT_LIVE_STREAMING_STOPPED: () => (/* binding */ eo),\n/* harmony export */ DAILY_EVENT_LIVE_STREAMING_UPDATED: () => (/* binding */ Zi),\n/* harmony export */ DAILY_EVENT_LOADED: () => (/* binding */ ci),\n/* harmony export */ DAILY_EVENT_LOADING: () => (/* binding */ ai),\n/* harmony export */ DAILY_EVENT_LOAD_ATTEMPT_FAILED: () => (/* binding */ si),\n/* harmony export */ DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED: () => (/* binding */ $i),\n/* harmony export */ DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED: () => (/* binding */ Vi),\n/* harmony export */ DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED: () => (/* binding */ Ji),\n/* harmony export */ DAILY_EVENT_MEETING_SESSION_DATA_ERROR: () => (/* binding */ wi),\n/* harmony export */ DAILY_EVENT_MEETING_SESSION_STATE_UPDATED: () => (/* binding */ bi),\n/* harmony export */ DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED: () => (/* binding */ _i),\n/* harmony export */ DAILY_EVENT_NETWORK_CONNECTION: () => (/* binding */ zi),\n/* harmony export */ DAILY_EVENT_NETWORK_QUALITY_CHANGE: () => (/* binding */ Yi),\n/* harmony export */ DAILY_EVENT_NONFATAL_ERROR: () => (/* binding */ oo),\n/* harmony export */ DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED: () => (/* binding */ mi),\n/* harmony export */ DAILY_EVENT_PARTICIPANT_JOINED: () => (/* binding */ fi),\n/* harmony export */ DAILY_EVENT_PARTICIPANT_LEFT: () => (/* binding */ vi),\n/* harmony export */ DAILY_EVENT_PARTICIPANT_UPDATED: () => (/* binding */ gi),\n/* harmony export */ DAILY_EVENT_RECEIVE_SETTINGS_UPDATED: () => (/* binding */ ro),\n/* harmony export */ DAILY_EVENT_RECORDING_DATA: () => (/* binding */ Ii),\n/* harmony export */ DAILY_EVENT_RECORDING_ERROR: () => (/* binding */ xi),\n/* harmony export */ DAILY_EVENT_RECORDING_STARTED: () => (/* binding */ Ai),\n/* harmony export */ DAILY_EVENT_RECORDING_STATS: () => (/* binding */ ji),\n/* harmony export */ DAILY_EVENT_RECORDING_STOPPED: () => (/* binding */ Di),\n/* harmony export */ DAILY_EVENT_RECORDING_UPLOAD_COMPLETED: () => (/* binding */ Li),\n/* harmony export */ DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED: () => (/* binding */ Bi),\n/* harmony export */ DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED: () => (/* binding */ Ui),\n/* harmony export */ DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED: () => (/* binding */ Fi),\n/* harmony export */ DAILY_EVENT_STARTED_CAMERA: () => (/* binding */ li),\n/* harmony export */ DAILY_EVENT_THEME_UPDATED: () => (/* binding */ oi),\n/* harmony export */ DAILY_EVENT_TRACK_STARTED: () => (/* binding */ Ci),\n/* harmony export */ DAILY_EVENT_TRACK_STOPPED: () => (/* binding */ Mi),\n/* harmony export */ DAILY_EVENT_TRANSCRIPTION_ERROR: () => (/* binding */ Pi),\n/* harmony export */ DAILY_EVENT_TRANSCRIPTION_MSG: () => (/* binding */ Ri),\n/* harmony export */ DAILY_EVENT_TRANSCRIPTION_STARTED: () => (/* binding */ Ti),\n/* harmony export */ DAILY_EVENT_TRANSCRIPTION_STOPPED: () => (/* binding */ Oi),\n/* harmony export */ DAILY_EVENT_WAITING_PARTICIPANT_ADDED: () => (/* binding */ Si),\n/* harmony export */ DAILY_EVENT_WAITING_PARTICIPANT_REMOVED: () => (/* binding */ Ei),\n/* harmony export */ DAILY_EVENT_WAITING_PARTICIPANT_UPDATED: () => (/* binding */ ki),\n/* harmony export */ DAILY_FATAL_ERROR_CONNECTION: () => (/* binding */ Wr),\n/* harmony export */ DAILY_FATAL_ERROR_EJECTED: () => (/* binding */ Fr),\n/* harmony export */ DAILY_FATAL_ERROR_EOL: () => (/* binding */ Yr),\n/* harmony export */ DAILY_FATAL_ERROR_EXP_ROOM: () => (/* binding */ Jr),\n/* harmony export */ DAILY_FATAL_ERROR_EXP_TOKEN: () => (/* binding */ $r),\n/* harmony export */ DAILY_FATAL_ERROR_MEETING_FULL: () => (/* binding */ qr),\n/* harmony export */ DAILY_FATAL_ERROR_NBF_ROOM: () => (/* binding */ Ur),\n/* harmony export */ DAILY_FATAL_ERROR_NBF_TOKEN: () => (/* binding */ Vr),\n/* harmony export */ DAILY_FATAL_ERROR_NOT_ALLOWED: () => (/* binding */ zr),\n/* harmony export */ DAILY_FATAL_ERROR_NO_ROOM: () => (/* binding */ Gr),\n/* harmony export */ DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY: () => (/* binding */ Br),\n/* harmony export */ DAILY_RECEIVE_SETTINGS_BASE_KEY: () => (/* binding */ Rr),\n/* harmony export */ DAILY_STATE_ERROR: () => (/* binding */ Mr),\n/* harmony export */ DAILY_STATE_JOINED: () => (/* binding */ Er),\n/* harmony export */ DAILY_STATE_JOINING: () => (/* binding */ kr),\n/* harmony export */ DAILY_STATE_LEFT: () => (/* binding */ Cr),\n/* harmony export */ DAILY_STATE_NEW: () => (/* binding */ br),\n/* harmony export */ DAILY_TRACK_STATE_BLOCKED: () => (/* binding */ Tr),\n/* harmony export */ DAILY_TRACK_STATE_INTERRUPTED: () => (/* binding */ Dr),\n/* harmony export */ DAILY_TRACK_STATE_LOADING: () => (/* binding */ Ar),\n/* harmony export */ DAILY_TRACK_STATE_OFF: () => (/* binding */ Or),\n/* harmony export */ DAILY_TRACK_STATE_PLAYABLE: () => (/* binding */ jr),\n/* harmony export */ DAILY_TRACK_STATE_SENDABLE: () => (/* binding */ Pr),\n/* harmony export */ \"default\": () => (/* binding */ es)\n/* harmony export */ });\n/* module decorator */ module = __webpack_require__.hmd(module);\nfunction e(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=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function t(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function n(e){return n=\"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},n(e)}function r(e){var t=function(e,t){if(\"object\"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||\"default\");if(\"object\"!==n(i))return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}(e,\"string\");return\"symbol\"===n(t)?t:String(t)}function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error(\"Possible EventEmitter memory leak detected. \"+a.length+\" \"+String(t)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");c.name=\"MaxListenersExceededWarning\",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function T(){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 O(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=T.bind(r);return i.listener=n,r.wrapFn=i,i}function P(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;n0&&(o=t[0]),o instanceof Error)throw o;var a=new Error(\"Unhandled error.\"+(o?\" (\"+o.message+\")\":\"\"));throw a.context=o,a}var s=i[e];if(void 0===s)return!1;if(\"function\"==typeof s)b(s,this,t);else{var c=s.length,l=D(s,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},S.prototype.listeners=function(e){return P(this,e,!0)},S.prototype.rawListeners=function(e){return P(this,e,!1)},S.listenerCount=function(e,t){return\"function\"==typeof e.listenerCount?e.listenerCount(t):A.call(e,t)},S.prototype.listenerCount=A,S.prototype.eventNames=function(){return this._eventsCount>0?v(this._events):[]};var x=Object.prototype.hasOwnProperty;function L(e,t,n){for(n of e.keys())if(I(n,t))return n}function I(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--&&I(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=L(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=L(t,i)))return!1;if(!I(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(x.call(e,n)&&++r&&!x.call(t,n))return!1;if(!(n in t)||!I(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}const N={\"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\"},R={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\"},B={tablet:\"tablet\",mobile:\"mobile\",desktop:\"desktop\",tv:\"tv\"},F={WindowsPhone:\"Windows Phone\",Windows:\"Windows\",MacOS:\"macOS\",iOS:\"iOS\",Android:\"Android\",WebOS:\"WebOS\",BlackBerry:\"BlackBerry\",Bada:\"Bada\",Tizen:\"Tizen\",Linux:\"Linux\",ChromeOS:\"Chrome OS\",PlayStation4:\"PlayStation 4\",Roku:\"Roku\"},U={EdgeHTML:\"EdgeHTML\",Blink:\"Blink\",Trident:\"Trident\",Presto:\"Presto\",Gecko:\"Gecko\",WebKit:\"WebKit\"};class V{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=V.getVersionPrecision(e),i=V.getVersionPrecision(t);let o=Math.max(r,i),a=0;const s=V.map([e,t],(e=>{const t=o-V.getVersionPrecision(e),n=e+new Array(t+1).join(\".0\");return V.map(n.split(\".\"),(e=>new Array(20-e.length).join(\"0\")+e)).reverse()}));for(n&&(a=o-Math.min(r,i)),o-=1;o>=a;){if(s[0][o]>s[1][o])return 1;if(s[0][o]===s[1][o]){if(o===a)return 0;o-=1}else if(s[0][o]{n[t]=e[t]}))}}return e}static getBrowserAlias(e){return N[e]}static getBrowserTypeByAlias(e){return R[e]||\"\"}}const J=/version\\/(\\d+(\\.?_?\\d+)+)/i,$=[{test:[/googlebot/i],describe(e){const t={name:\"Googlebot\"},n=V.getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:\"Opera\"},n=V.getFirstMatch(J,e)||V.getFirstMatch(/(?:opera)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\\/|opios/i],describe(e){const t={name:\"Opera\"},n=V.getFirstMatch(/(?:opr|opios)[\\s/](\\S+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:\"Samsung Internet for Android\"},n=V.getFirstMatch(J,e)||V.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=V.getFirstMatch(J,e)||V.getFirstMatch(/(?:whale)[\\s/](\\d+(?:\\.\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:\"MZ Browser\"},n=V.getFirstMatch(/(?:MZBrowser)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:\"Focus\"},n=V.getFirstMatch(/(?:focus)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:\"Swing\"},n=V.getFirstMatch(/(?:swing)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:\"Opera Coast\"},n=V.getFirstMatch(J,e)||V.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=V.getFirstMatch(/(?:opt)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:\"Yandex Browser\"},n=V.getFirstMatch(/(?:yabrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:\"UC Browser\"},n=V.getFirstMatch(J,e)||V.getFirstMatch(/(?:ucbrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:\"Maxthon\"},n=V.getFirstMatch(J,e)||V.getFirstMatch(/(?:Maxthon|mxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:\"Epiphany\"},n=V.getFirstMatch(J,e)||V.getFirstMatch(/(?:epiphany)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:\"Puffin\"},n=V.getFirstMatch(J,e)||V.getFirstMatch(/(?:puffin)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:\"Sleipnir\"},n=V.getFirstMatch(J,e)||V.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=V.getFirstMatch(J,e)||V.getFirstMatch(/(?:k-meleon)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:\"WeChat\"},n=V.getFirstMatch(/(?:micromessenger)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||V.getFirstMatch(J,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=V.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\\d+(\\.?_?\\d+)+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:\"Internet Explorer\"},n=V.getFirstMatch(/(?:msie |rv:)(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\\sedg\\//i],describe(e){const t={name:\"Microsoft Edge\"},n=V.getFirstMatch(/\\sedg\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:\"Microsoft Edge\"},n=V.getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:\"Vivaldi\"},n=V.getFirstMatch(/vivaldi\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:\"SeaMonkey\"},n=V.getFirstMatch(/seamonkey\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:\"Sailfish\"},n=V.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=V.getFirstMatch(/silk\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:\"PhantomJS\"},n=V.getFirstMatch(/phantomjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:\"SlimerJS\"},n=V.getFirstMatch(/slimerjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe(e){const t={name:\"BlackBerry\"},n=V.getFirstMatch(J,e)||V.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=V.getFirstMatch(J,e)||V.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=V.getFirstMatch(/dolfin\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:\"Tizen\"},n=V.getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.?_?\\d+)+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:\"QupZilla\"},n=V.getFirstMatch(/(?:qupzilla)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:\"Firefox\"},n=V.getFirstMatch(/(?:firefox|iceweasel|fxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:\"Electron\"},n=V.getFirstMatch(/(?:electron)\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:\"Miui\"},n=V.getFirstMatch(/(?:MiuiBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:\"Chromium\"},n=V.getFirstMatch(/(?:chromium)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:\"Chrome\"},n=V.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=V.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=V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:\"PlayStation 4\"},n=V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:\"Safari\"},n=V.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search(\"\\\\(\")?/^(.*)\\/(.*)[ \\t]\\((.*)/:/^(.*)\\/(.*) /;return{name:V.getFirstMatch(t,e),version:V.getSecondMatch(t,e)}}}];var G=[{test:[/Roku\\/DVP/],describe(e){const t=V.getFirstMatch(/Roku\\/DVP-(\\d+\\.\\d+)/i,e);return{name:F.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=V.getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i,e);return{name:F.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=V.getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i,e),n=V.getWindowsVersionName(t);return{name:F.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\\//],describe(e){const t={name:F.iOS},n=V.getSecondMatch(/(Version\\/)(\\d[\\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=V.getFirstMatch(/mac os x (\\d+(\\.?_?\\d+)+)/i,e).replace(/[_\\s]/g,\".\"),n=V.getMacOSVersionName(t),r={name:F.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=V.getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i,e).replace(/[_\\s]/g,\".\");return{name:F.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=V.getFirstMatch(/android[\\s/-](\\d+(\\.\\d+)*)/i,e),n=V.getAndroidVersionName(t),r={name:F.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=V.getFirstMatch(/(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i,e),n={name:F.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe(e){const t=V.getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i,e)||V.getFirstMatch(/blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i,e)||V.getFirstMatch(/\\bbb(\\d+)/i,e);return{name:F.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=V.getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i,e);return{name:F.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=V.getFirstMatch(/tizen[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:F.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:F.Linux})},{test:[/CrOS/],describe:()=>({name:F.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=V.getFirstMatch(/PlayStation 4[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:F.PlayStation4,version:t}}}],q=[{test:[/googlebot/i],describe:()=>({type:\"bot\",vendor:\"Google\"})},{test:[/huawei/i],describe(e){const t=V.getFirstMatch(/(can-l01)/i,e)&&\"Nova\",n={type:B.mobile,vendor:\"Huawei\"};return t&&(n.model=t),n}},{test:[/nexus\\s*(?:7|8|9|10).*/i],describe:()=>({type:B.tablet,vendor:\"Nexus\"})},{test:[/ipad/i],describe:()=>({type:B.tablet,vendor:\"Apple\",model:\"iPad\"})},{test:[/Macintosh(.*?) FxiOS(.*?)\\//],describe:()=>({type:B.tablet,vendor:\"Apple\",model:\"iPad\"})},{test:[/kftt build/i],describe:()=>({type:B.tablet,vendor:\"Amazon\",model:\"Kindle Fire HD 7\"})},{test:[/silk/i],describe:()=>({type:B.tablet,vendor:\"Amazon\"})},{test:[/tablet(?! pc)/i],describe:()=>({type:B.tablet})},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=V.getFirstMatch(/(ipod|iphone)/i,e);return{type:B.mobile,vendor:\"Apple\",model:t}}},{test:[/nexus\\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:B.mobile,vendor:\"Nexus\"})},{test:[/[^-]mobi/i],describe:()=>({type:B.mobile})},{test:e=>\"blackberry\"===e.getBrowserName(!0),describe:()=>({type:B.mobile,vendor:\"BlackBerry\"})},{test:e=>\"bada\"===e.getBrowserName(!0),describe:()=>({type:B.mobile})},{test:e=>\"windows phone\"===e.getBrowserName(),describe:()=>({type:B.mobile,vendor:\"Microsoft\"})},{test(e){const t=Number(String(e.getOSVersion()).split(\".\")[0]);return\"android\"===e.getOSName(!0)&&t>=3},describe:()=>({type:B.tablet})},{test:e=>\"android\"===e.getOSName(!0),describe:()=>({type:B.mobile})},{test:e=>\"macos\"===e.getOSName(!0),describe:()=>({type:B.desktop,vendor:\"Apple\"})},{test:e=>\"windows\"===e.getOSName(!0),describe:()=>({type:B.desktop})},{test:e=>\"linux\"===e.getOSName(!0),describe:()=>({type:B.desktop})},{test:e=>\"playstation 4\"===e.getOSName(!0),describe:()=>({type:B.tv})},{test:e=>\"roku\"===e.getOSName(!0),describe:()=>({type:B.tv})}],Y=[{test:e=>\"microsoft edge\"===e.getBrowserName(!0),describe(e){if(/\\sedg\\//i.test(e))return{name:U.Blink};const t=V.getFirstMatch(/edge\\/(\\d+(\\.?_?\\d+)+)/i,e);return{name:U.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:U.Trident},n=V.getFirstMatch(/trident\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:U.Presto},n=V.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:U.Gecko},n=V.getFirstMatch(/gecko\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\\/537\\.36/i],describe:()=>({name:U.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:U.WebKit},n=V.getFirstMatch(/webkit\\/(\\d+(\\.?_?\\d+)+)/i,e);return n&&(t.version=n),t}}];class z{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=V.find($,(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=V.find(G,(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=V.find(q,(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=V.find(Y,(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 V.assign({},this.parsedResult)}satisfies(e){const t={};let n=0;const r={};let i=0;if(Object.keys(e).forEach((o=>{const a=e[o];\"string\"==typeof a?(r[o]=a,i+=1):\"object\"==typeof a&&(t[o]=a,n+=1)})),n>0){const e=Object.keys(t),n=V.find(e,(e=>this.isOS(e)));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const r=V.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=V.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=V.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(V.compareVersions(i,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some((e=>this.is(e)))}}\n/*!\n * Bowser - a browser detector\n * /~https://github.com/lancedikson/bowser\n * MIT License | (c) Dustin Diaz 2012-2015\n * MIT License | (c) Denis Demchenko 2015-2019\n */class W{static getParser(e,t=!1){if(\"string\"!=typeof e)throw new Error(\"UserAgent should be a string\");return new z(e,t)}static parse(e){return new z(e).getResult()}static get BROWSER_MAP(){return R}static get ENGINE_MAP(){return U}static get OS_MAP(){return F}static get PLATFORMS_MAP(){return B}}function H(){return Date.now()+Math.random().toString()}function Q(){throw new Error(\"Method must be implemented in subclass\")}function K(e,t){return null!=t&&t.proxyUrl?t.proxyUrl+(\"/\"===t.proxyUrl.slice(-1)?\"\":\"/\")+e.substring(8):e}function X(e){return null!=e&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:K(\"https://c.daily.co/call-machine/versioned/\".concat(\"0.72.2\",\"/static/call-machine-object-bundle.js\"),e)}function Z(e){try{new URL(e)}catch(e){return!1}return!0}const ee=Object.prototype.toString;function te(e){switch(ee.call(e)){case\"[object Error]\":case\"[object Exception]\":case\"[object DOMException]\":return!0;default:return ue(e,Error)}}function ne(e,t){return ee.call(e)===`[object ${t}]`}function re(e){return ne(e,\"ErrorEvent\")}function ie(e){return ne(e,\"DOMError\")}function oe(e){return ne(e,\"String\")}function ae(e){return null===e||\"object\"!=typeof e&&\"function\"!=typeof e}function se(e){return ne(e,\"Object\")}function ce(e){return\"undefined\"!=typeof Event&&ue(e,Event)}function le(e){return Boolean(e&&e.then&&\"function\"==typeof e.then)}function ue(e,t){try{return e instanceof t}catch(e){return!1}}function de(e,t=0){return\"string\"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function he(e,t){if(!Array.isArray(e))return\"\";const n=[];for(let t=0;tpe(e,t,n)))}function ge(e,t,n=250,r,i,o,a){if(!(o.exception&&o.exception.values&&a&&ue(a.originalException,Error)))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var c,l;s&&(o.exception.values=(c=ve(e,t,i,a.originalException,r,o.exception.values,s,0),l=n,c.map((e=>(e.value&&(e.value=de(e.value,l)),e)))))}function ve(e,t,n,r,i,o,a,s){if(o.length>=n+1)return o;let c=[...o];if(ue(r[i],Error)){me(a,s);const o=e(t,r[i]),l=c.length;ye(o,i,l,s),c=ve(e,t,n,r[i],i,[o,...c],o,l)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(ue(r,Error)){me(a,s);const l=e(t,r),u=c.length;ye(l,`errors[${o}]`,u,s),c=ve(e,t,n,r,i,[l,...c],l,u)}})),c}function me(e,t){e.mechanism=e.mechanism||{type:\"generic\",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function ye(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 _e(e){return e&&e.Math==Math?e:void 0}const be=\"object\"==typeof globalThis&&_e(globalThis)||\"object\"==typeof window&&_e(window)||\"object\"==typeof self&&_e(self)||\"object\"==typeof __webpack_require__.g&&_e(__webpack_require__.g)||function(){return this}()||{};function we(){return be}function Se(e,t,n){const r=n||be,i=r.__SENTRY__=r.__SENTRY__||{};return i[e]||(i[e]=t())}const ke=we(),Ee=80;function Ce(e,t={}){try{let n=e;const r=5,i=[];let o=0,a=0;const s=\" > \",c=s.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||Ee;for(;n&&o++1&&a+i.length*c+l.length>=d));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(s)}catch(e){return\"\"}}function Me(e,t){const n=e,r=[];let i,o,a,s,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&&oe(i))for(o=i.split(/\\s+/),c=0;c{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__?Te.forEach((n=>{t[n]=(...t)=>{e&&Oe((()=>{be.console[n](`Sentry Logger [${n}]:`,...t)}))}})):Te.forEach((e=>{t[e]=()=>{}})),t}let Ae;Ae=\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Se(\"logger\",Pe):Pe();const De=/^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;function je(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:\"\"}@${n}${o?`:${o}`:\"\"}/${r?`${r}/`:r}${a}`}function xe(e){return{protocol:e.protocol,publicKey:e.publicKey||\"\",pass:e.pass||\"\",host:e.host,port:e.port||\"\",path:e.path||\"\",projectId:e.projectId}}function Le(e){const t=\"string\"==typeof e?function(e){const t=De.exec(e);if(!t)return void console.error(`Invalid Sentry Dsn: ${e}`);const[n,r,i=\"\",o,a=\"\",s]=t.slice(1);let c=\"\",l=s;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 xe({host:o,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:r})}(e):xe(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]&&(Ae.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\\d+$/)?function(e){return\"http\"===e||\"https\"===e}(r)?t&&isNaN(parseInt(t,10))&&(Ae.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(Ae.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Ae.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}class Ie 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 Ne(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);if(\"function\"==typeof i)try{Be(i,r)}catch(e){}e[t]=i}function Re(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function Be(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,Re(e,\"__sentry_original__\",t)}function Fe(e){return e.__sentry_original__}function Ue(e){if(te(e))return{message:e.message,name:e.name,stack:e.stack,...Je(e)};if(ce(e)){const t={type:e.type,target:Ve(e.target),currentTarget:Ve(e.currentTarget),...Je(e)};return\"undefined\"!=typeof CustomEvent&&ue(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ve(e){try{return t=e,\"undefined\"!=typeof Element&&ue(t,Element)?Ce(e):Object.prototype.toString.call(e)}catch(e){return\"\"}var t}function Je(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 Ge(e,new Map)}function Ge(e,t){if(se(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]=Ge(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(Ge(e,t))})),r}return e}const qe=\"\";function Ye(e){try{return e&&\"function\"==typeof e&&e.name||qe}catch(e){return qe}}const ze=we();function We(e){return e&&/^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(e.toString())}function He(){if(!function(){if(!(\"fetch\"in ze))return!1;try{return new Headers,new Request(\"http://www.example.com\"),new Response,!0}catch(e){return!1}}())return!1;if(We(ze.fetch))return!0;let e=!1;const t=ze.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=We(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.warn(\"Could not create sandbox iframe for pure fetch check, bailing to window.fetch: \",e)}return e}const Qe=we();const Ke=we(),Xe=\"__sentry_xhr_v2__\",Ze={},et={};function tt(e){if(!et[e])switch(et[e]=!0,e){case\"console\":!function(){if(!(\"console\"in Ke))return;Te.forEach((function(e){e in Ke.console&&Ne(Ke.console,e,(function(t){return function(...n){rt(\"console\",{args:n,level:e}),t&&t.apply(Ke.console,n)}}))}))}();break;case\"dom\":!function(){if(!(\"document\"in Ke))return;const e=rt.bind(null,\"dom\"),t=ut(e,!0);Ke.document.addEventListener(\"click\",t,!1),Ke.document.addEventListener(\"keypress\",t,!1),[\"EventTarget\",\"Node\"].forEach((t=>{const n=Ke[t]&&Ke[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty(\"addEventListener\")&&(Ne(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__||{},a=o[n]=o[n]||{refCount:0};if(!a.handler){const r=ut(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch(e){}return t.call(this,n,r,i)}})),Ne(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 Ke))return;const e=XMLHttpRequest.prototype;Ne(e,\"open\",(function(e){return function(...t){const n=t[1],r=this[Xe]={method:oe(t[0])?t[0].toUpperCase():t[0],url:t[1],request_headers:{}};oe(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?Ne(this,\"onreadystatechange\",(function(e){return function(...t){return i(),e.apply(this,t)}})):this.addEventListener(\"readystatechange\",i),Ne(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)}})),Ne(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(!He())return;Ne(Ke,\"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(Ke,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=Qe.chrome,t=e&&e.app&&e.app.runtime,n=\"history\"in Qe&&!!Qe.history.pushState&&!!Qe.history.replaceState;return!t&&n}())return;const e=Ke.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=at,t=String(n);at=t,rt(\"history\",{from:e,to:t})}return e.apply(this,t)}}Ke.onpopstate=function(...t){const n=Ke.location.href,r=at;if(at=n,rt(\"history\",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},Ne(Ke.history,\"pushState\",t),Ne(Ke.history,\"replaceState\",t)}();break;case\"error\":dt=Ke.onerror,Ke.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)},Ke.onerror.__SENTRY_INSTRUMENTED__=!0;break;case\"unhandledrejection\":ht=Ke.onunhandledrejection,Ke.onunhandledrejection=function(e){return rt(\"unhandledrejection\",e),!(ht&&!ht.__SENTRY_LOADER__)||ht.apply(this,arguments)},Ke.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void((\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.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__)&&Ae.error(`Error while triggering instrumentation handler.\\nType: ${e}\\nName: ${Ye(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 at;const st=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=Ke.setTimeout((()=>{ct=void 0}),st)}}let dt=null;let ht=null;function pt(){const e=be,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 gt(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||\"\":n||\"\"}function vt(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 mt(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 yt(e){if(e&&e.__sentry_captured__)return!0;try{Re(e,\"__sentry_captured__\",!0)}catch(e){}return!1}function _t(e,t=100,n=1/0){try{return wt(\"\",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function bt(e,t=3,n=102400){const r=_t(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 wt(e,t,n=1/0,r=1/0,i=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=r){d[e]=\"[MaxProperties ~]\";break}const t=p[e];d[e]=wt(e,t,l-1,r,i),h++}return a(t),d}var St;function kt(e){return new Ct((t=>{t(e)}))}function Et(e){return new Ct(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]=\"PENDING\";e[e.RESOLVED=1]=\"RESOLVED\";e[e.REJECTED=2]=\"REJECTED\"}(St||(St={}));class Ct{__init(){this._state=St.PENDING}__init2(){this._handlers=[]}constructor(e){Ct.prototype.__init.call(this),Ct.prototype.__init2.call(this),Ct.prototype.__init3.call(this),Ct.prototype.__init4.call(this),Ct.prototype.__init5.call(this),Ct.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Ct(((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 Ct(((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(St.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(St.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===St.PENDING&&(le(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===St.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===St.RESOLVED&&e[1](this._value),this._state===St.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function Mt(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(i))).then(null,(()=>n(i).then(null,(()=>{})))),i},drain:function(e){return new Ct(((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{kt(e).then((()=>{--i||(clearTimeout(o),n(!0))}),r)}))}))}}}function Tt(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 Ot=[\"fatal\",\"error\",\"warning\",\"log\",\"info\",\"debug\"];const Pt=we(),At={nowSeconds:()=>Date.now()/1e3};const Dt=\"undefined\"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__||\"[object process]\"!==Object.prototype.toString.call(\"undefined\"!=typeof process?process:0)?function(){const{performance:e}=Pt;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}():function(){try{return(e=module,t=\"perf_hooks\",e.require(t)).performance}catch(e){return}var e,t}(),jt=void 0===Dt?At:{nowSeconds:()=>(Dt.timeOrigin+Dt.now())/1e3},xt=At.nowSeconds.bind(At),Lt=jt.nowSeconds.bind(jt);function It(e,t=[]){return[e,t]}function Nt(e,t){const[n,r]=e;return[n,[...r,t]]}function Rt(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function Bt(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:[Bt(i,t),e]:i.push(\"string\"==typeof e?Bt(e,t):e)}for(const e of r){const[t,n]=e;if(o(`\\n${JSON.stringify(t)}\\n`),\"string\"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(_t(n))}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?Bt(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}=Pt;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=ifunction(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&&Wt(n,e),n}function Wt(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||Lt(),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 Ht{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Xt()}static clone(e){const t=new Ht;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&&Wt(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 Ht?t:this}return e instanceof Ht?(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)):se(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=Xt(),this}addBreadcrumb(e,t){const n=\"number\"==typeof t?t:100;if(n<=0)return this;const r={timestamp:xt(),...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([...Qt(),...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 Ct(((i,o)=>{const a=e[r];if(null===t||\"function\"!=typeof a)i(t);else{const s=a({...t},n);(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===s&&Ae.log(`Event processor \"${a.id}\" dropped event`),le(s)?s.then((t=>this._notifyEventProcessors(e,t,n,r+1).then(i))).then(null,o):this._notifyEventProcessors(e,s,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 Qt(){return Se(\"globalEventProcessors\",(()=>[]))}function Kt(e){Qt().push(e)}function Xt(){return{traceId:pt(),spanId:pt().substring(16),sampled:!1}}const Zt=4,en=100;class tn{constructor(e,t=new Ht,n=Zt){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version{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,a)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},a)})),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=en}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const a={timestamp:xt(),...e},s=i?Oe((()=>i(a,t))):a;null!==s&&(r.emit&&r.emit(\"beforeAddBreadcrumb\",s,t),n.addBreadcrumb(s,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=rn(this);try{e(this)}finally{rn(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__)&&Ae.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||console.warn(\"Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\\nSentry.addTracingExtensions();\\nSentry.init({...});\\n\"),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={};t?n={status:t}:\"ok\"===e.status&&(n={status:\"exited\"}),Wt(e,n)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=Yt}=n&&n.getOptions()||{},{userAgent:o}=be.navigator||{},a=zt({release:r,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),s=t.getSession&&t.getSession();return s&&\"ok\"===s.status&&Wt(s,{status:\"exited\"}),this.endSession(),t.setSession(a),a}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=nn().__SENTRY__;if(n&&n.extensions&&\"function\"==typeof n.extensions[e])return n.extensions[e].apply(this,t);(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function nn(){return be.__SENTRY__=be.__SENTRY__||{extensions:{},hub:void 0},be}function rn(e){const t=nn(),n=an(t);return sn(t,e),n}function on(){const e=nn();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=nn()){t=e,t&&t.__SENTRY__&&t.__SENTRY__.hub&&!an(e).isOlderThan(Zt)||sn(e,new tn);var t;return an(e)}(e)}function an(e){return Se(\"hub\",(()=>new tn),e)}function sn(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}const cn=\"7\";function ln(e,t){return n={sentry_key:e.publicKey,sentry_version:cn,...t&&{sentry_client:`${t.name}/${t.version}`}},Object.keys(n).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`)).join(\"&\");var n}function un(e,t,n,r){const i=$t(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 a=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:je(r)},...i&&{trace:$e({...i})}}}(e,i,r,t);delete e.sdkProcessingMetadata;return It(a,[[{type:o},e]])}const dn=[];function hn(e,t){t[e.name]=e,-1===dn.indexOf(e.name)&&(e.setupOnce(Kt,on),dn.push(e.name),(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.log(`Integration installed: ${e.name}`))}function pn(e,t,n,r){const{normalizeDepth:i=3,normalizeMaxBreadth:o=1e3}=e,a={...t,event_id:t.event_id||n.event_id||pt(),timestamp:t.timestamp||xt()},s=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:Yt);void 0===e.release&&void 0!==r&&(e.release=r);void 0===e.dist&&void 0!==i&&(e.dist=i);e.message&&(e.message=de(e.message,o));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=de(a.value,o));const s=e.request;s&&s.url&&(s.url=de(s.url,o))}(a,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(a,s),void 0===t.type&&function(e,t){const n=be._sentryDebugIds;if(!n)return;let r;const i=fn.get(t);i?r=i:(r=new Map,fn.set(t,r));const o=Object.keys(n).reduce(((e,i)=>{let o;const a=r.get(i);a?o=a:(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){}}(a,e.stackParser);let c=r;n.captureContext&&(c=Ht.clone(c).update(n.captureContext));let l=kt(a);if(c){if(c.getAttachments){const e=[...n.attachments||[],...c.getAttachments()];e.length&&(n.attachments=e)}l=c.applyToEvent(a,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:_t(e.data,t,n)}})))},...e.user&&{user:_t(e.user,t,n)},...e.contexts&&{contexts:_t(e.contexts,t,n)},...e.extra&&{extra:_t(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=_t(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>(e.data&&(e.data=_t(e.data,t,n)),e))));return r}(e,i,o):e)))}const fn=new WeakMap;const gn=\"Not capturing exception because it's already been captured.\";class vn{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(e){if(vn.prototype.__init.call(this),vn.prototype.__init2.call(this),vn.prototype.__init3.call(this),vn.prototype.__init4.call(this),vn.prototype.__init5.call(this),this._options=e,e.dsn?this._dsn=Le(e.dsn):(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.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)}?${ln(e,r)}`}(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(yt(e))return void((\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.log(gn));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=ae(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&&yt(t.originalException))return void((\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.log(gn));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__)&&Ae.warn(\"Discarded session because of missing or non-string release\"):(this.sendSession(e),Wt(e,{init:!1})):(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.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)))):kt(!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&&hn(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__)&&Ae.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){hn(e,this._integrations)}sendEvent(e,t={}){if(this._dsn){let n=un(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Nt(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=$t(n);return It({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:je(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__)&&Ae.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)&&(Wt(e,{...n&&{status:\"crashed\"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Ct((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),pn(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:a}=t;e.contexts={trace:{trace_id:r,span_id:i,parent_span_id:o},...e.contexts};const s=a||function(e,t,n){const r=t.getOptions(),{publicKey:i}=t.getDsn()||{},{segment:o}=n&&n.getUser()||{},a=$e({environment:r.environment||Yt,release:r.release,user_segment:o,public_key:i,trace_id:e});return t.emit&&t.emit(\"createDsc\",a),a}(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:s,...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?Ae.log(t.message):Ae.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return Et(new Ie(\"SDK not enabled, will not capture event.\",\"log\"));const o=yn(e),a=mn(e),s=e.type||\"error\",c=`before send for type \\`${s}\\``;if(a&&\"number\"==typeof i&&Math.random()>i)return this.recordDroppedEvent(\"sample_rate\",\"error\",e),Et(new Ie(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,\"log\"));const l=\"replay_event\"===s?\"replay\":s;return this._prepareEvent(e,t,n).then((n=>{if(null===n)throw this.recordDroppedEvent(\"event_processor\",l,e),new Ie(\"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;if(mn(t)&&r)return r(t,n);if(yn(t)&&i)return i(t,n);return t}(r,n,t);return function(e,t){const n=`${t} must return \\`null\\` or a valid event.`;if(le(e))return e.then((e=>{if(!se(e)&&null!==e)throw new Ie(n);return e}),(e=>{throw new Ie(`${t} rejected with ${e}`)}));if(!se(e)&&null!==e)throw new Ie(n);return e}(i,c)})).then((r=>{if(null===r)throw this.recordDroppedEvent(\"before_send\",l,e),new Ie(`${c} returned \\`null\\`, will not send event.`,\"log\");const i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);const a=r.transaction_info;if(o&&a&&r.transaction!==e.transaction){const e=\"custom\";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof Ie)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Ie(`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__)&&Ae.error(\"Error while sending event:\",e)}));(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.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 mn(e){return void 0===e.type}function yn(e){return\"transaction\"===e.type}const _n=30;function bn(e,t,n=Mt(e.bufferSize||_n)){let r={};function i(i){const o=[];if(Rt(i,((t,n)=>{const i=Jt(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=wn(t,n);e.recordDroppedEvent(\"ratelimit_backoff\",i,r)}else o.push(t)})),0===o.length)return kt();const a=It(i[0],o),s=t=>{Rt(a,((n,r)=>{const i=wn(n,r);e.recordDroppedEvent(t,Jt(r),i)}))};return n.add((()=>t({body:Ft(a,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=qt(r,e),e)),(e=>{throw s(\"network_error\"),e})))).then((e=>e),(e=>{if(e instanceof Ie)return(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.error(\"Skipped sending event because buffer is full.\"),s(\"queue_overflow\"),kt();throw e}))}return i.__sentry__baseTransport__=!0,{send:i,flush:e=>n.drain(e)}}function wn(e,t){if(\"event\"===t||\"transaction\"===t)return Array.isArray(e)?e[1]:void 0}const Sn=\"7.60.1\";let kn;class En{constructor(){En.prototype.__init.call(this)}static __initStatic(){this.id=\"FunctionToString\"}__init(){this.name=En.id}setupOnce(){kn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Fe(this)||this;return kn.apply(t,e)}}catch(e){}}}En.__initStatic();const Cn=[/^Script error\\.?$/,/^Javascript error: Script error\\.? on line 0$/],Mn=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\\/health$/,/^.*\\/healthz$/];class Tn{static __initStatic(){this.id=\"InboundFilters\"}__init(){this.name=Tn.id}constructor(e={}){this._options=e,Tn.prototype.__init.call(this)}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(Tn);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?[]:Cn],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:Mn],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t._options,i);return function(e,t){if(t.ignoreInternal&&function(e){try{return\"SentryError\"===e.exception.values[0].type}catch(e){}return!1}(e))return(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${gt(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return 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__)&&Ae.error(`Cannot extract message for event ${gt(e)}`),[]}}return[]}(e).some((e=>fe(e,t)))}(e,t.ignoreErrors))return(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.warn(`Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${gt(e)}`),!0;if(function(e,t){if(\"transaction\"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&fe(n,t)}(e,t.ignoreTransactions))return(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.warn(`Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${gt(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=On(e);return!!n&&fe(n,t)}(e,t.denyUrls))return(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.warn(`Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${gt(e)}.\\nUrl: ${On(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=On(e);return!n||fe(n,t)}(e,t.allowUrls))return(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.warn(`Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${gt(e)}.\\nUrl: ${On(e)}`),!0;return!1}(e,o)?null:e}}return e};n.id=this.name,e(n)}}function On(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&&\"\"!==n.filename&&\"[native code]\"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.error(`Cannot extract url for event ${gt(e)}`),null}}Tn.__initStatic();var Pn=Object.freeze({__proto__:null,FunctionToString:En,InboundFilters:Tn});const An=be;let Dn=0;function jn(){return Dn>0}function xn(e,t={},n){if(\"function\"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(Fe(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=>xn(e,t)));return e.apply(this,i)}catch(e){throw Dn++,setTimeout((()=>{Dn--})),i=n=>{var i,o;n.addEventProcessor((e=>(t.mechanism&&(vt(e,void 0,void 0),mt(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),i=e,on().captureException(i,{captureContext:o})},on().withScope(i),e}var i};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}Be(r,e),Re(e,\"__sentry_wrapped__\",r);try{Object.getOwnPropertyDescriptor(r,\"name\").configurable&&Object.defineProperty(r,\"name\",{get:()=>e.name})}catch(e){}return r}function Ln(e,t){const n=Nn(e,t),r={type:t&&t.name,value:Bn(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&\"\"===r.value&&(r.value=\"Unrecoverable error caught\"),r}function In(e,t){return{exception:{values:[Ln(e,t)]}}}function Nn(e,t){const n=t.stacktrace||t.stack||\"\",r=function(e){if(e){if(\"number\"==typeof e.framesToPop)return e.framesToPop;if(Rn.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const Rn=/Minified React error #\\d+;/i;function Bn(e){const t=e&&e.message;return t?t.error&&\"string\"==typeof t.error.message?t.error.message:t:\"No error message\"}function Fn(e,t,n,r,i){let o;if(re(t)&&t.error){return In(e,t.error)}if(ie(t)||ne(t,\"DOMException\")){const i=t;if(\"stack\"in t)o=In(e,t);else{const t=i.name||(ie(i)?\"DOMError\":\"DOMException\"),a=i.message?`${t}: ${i.message}`:t;o=Un(e,a,n,r),vt(o,a)}return\"code\"in i&&(o.tags={...o.tags,\"DOMException.code\":`${i.code}`}),o}if(te(t))return In(e,t);if(se(t)||ce(t)){return o=function(e,t,n,r){const i=on().getClient(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:ce(t)?t.constructor.name:r?\"UnhandledRejection\":\"Error\",value:Vn(t,{isUnhandledRejection:r})}]},extra:{__serialized__:bt(t,o)}};if(n){const t=Nn(e,n);t.length&&(a.exception.values[0].stacktrace={frames:t})}return a}(e,t,n,i),mt(o,{synthetic:!0}),o}return o=Un(e,t,n,r),vt(o,`${t}`,void 0),mt(o,{synthetic:!0}),o}function Un(e,t,n,r){const i={message:t};if(r&&n){const r=Nn(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}return i}function Vn(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(Ue(e));if(n.sort(),!n.length)return\"[object has no keys]\";if(n[0].length>=t)return de(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:de(r,t)}return\"\"}(e),r=t?\"promise rejection\":\"exception\";if(re(e))return`Event \\`ErrorEvent\\` captured as ${r} with message \\`${e.message}\\``;if(ce(e)){return`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}`}return`Object captured as ${r} with keys: ${n}`}const Jn=1024,$n=\"Breadcrumbs\";class Gn{static __initStatic(){this.id=$n}__init(){this.name=Gn.id}constructor(e){Gn.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\",qn),this.options.dom&&nt(\"dom\",function(e){function t(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>Jn&&((\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.warn(`\\`dom.maxStringLength\\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Jn),\"string\"==typeof r&&(r=[r]);try{const e=t.event;n=function(e){return!!e&&!!e.target}(e)?Ce(e.target,{keyAttrs:r,maxStringLength:i}):Ce(e,{keyAttrs:r,maxStringLength:i})}catch(e){n=\"\"}0!==n.length&&on().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&nt(\"xhr\",Yn),this.options.fetch&&nt(\"fetch\",zn),this.options.history&&nt(\"history\",Wn)}addSentryBreadcrumb(e){this.options.sentry&&on().addBreadcrumb({category:\"sentry.\"+(\"transaction\"===e.type?\"transaction\":\"event\"),event_id:e.event_id,level:e.level,message:gt(e)},{event:e})}}function qn(e){for(let t=0;t{\"hidden\"===An.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=Fn(e,t,n&&n.syntheticException||void 0,r);return mt(i),i.level=\"error\",n&&n.event_id&&(i.event_id=n.event_id),kt(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=\"info\",n){return function(e,t,n=\"info\",r,i){const o=Un(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),kt(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){const n=this.getIntegrationById($n);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(e),super.sendEvent(e,t)}captureUserFeedback(e){if(!this._isEnabled())return void((\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.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:je(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__)&&Ae.log(\"No outcomes to send\"));if(!this._dsn)return void((\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.log(\"No dsn provided, will not send outcomes\"));(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.log(\"Sending outcomes:\",e);const t=(n=e,It((r=this._options.tunnel&&je(this._dsn))?{dsn:r}:{},[[{type:\"client_report\"},{timestamp:i||xt(),discarded_events:n}]]));var n,r,i;this._sendEnvelope(t)}}let Qn;function Kn(e,t=function(){if(Qn)return Qn;if(We(An.fetch))return Qn=An.fetch.bind(An);const e=An.document;let t=An.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__)&&Ae.warn(\"Could not create sandbox iframe for pure fetch check, bailing to window.fetch: \",e)}return Qn=t.bind(An)}()){let n=0,r=0;return bn(e,(function(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:\"POST\",referrerPolicy:\"origin\",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).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 Qn=void 0,n-=o,r--,Et(e)}}))}class Xn{static __initStatic(){this.id=\"GlobalHandlers\"}__init(){this.name=Xn.id}__init2(){this._installFunc={onerror:Zn,onunhandledrejection:er}}constructor(e){Xn.prototype.__init.call(this),Xn.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__)&&Ae.log(`Global Handler attached: ${t}`),r(),this._installFunc[n]=void 0)}var t}}function Zn(){nt(\"error\",(e=>{const[t,n,r]=rr();if(!t.getIntegration(Xn))return;const{msg:i,url:o,line:a,column:s,error:c}=e;if(jn()||c&&c.__sentry_own_request__)return;const l=void 0===c&&oe(i)?function(e,t,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=re(e)?e.message:e,a=\"Error\";const s=o.match(i);s&&(a=s[1],o=s[2]);const c={exception:{values:[{type:a,value:o}]}};return tr(c,t,n,r)}(i,o,a,s):tr(Fn(n,c||i,void 0,r,!1),o,a,s);l.level=\"error\",nr(t,c,l,\"onerror\")}))}function er(){nt(\"unhandledrejection\",(e=>{const[t,n,r]=rr();if(!t.getIntegration(Xn))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(jn()||i&&i.__sentry_own_request__)return!0;const o=ae(i)?{exception:{values:[{type:\"UnhandledRejection\",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Fn(n,i,void 0,r,!0);o.level=\"error\",nr(t,i,o,\"onunhandledrejection\")}))}function tr(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=oe(t)&&t.length>0?t:function(){try{return ke.document.location.href}catch(e){return\"\"}}();return 0===c.length&&c.push({colno:l,filename:d,function:\"?\",in_app:!0,lineno:u}),e}function nr(e,t,n,r){mt(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function rr(){const e=on(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}Xn.__initStatic();const ir=[\"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 or{static __initStatic(){this.id=\"TryCatch\"}__init(){this.name=or.id}constructor(e){or.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&Ne(An,\"setTimeout\",ar),this._options.setInterval&&Ne(An,\"setInterval\",ar),this._options.requestAnimationFrame&&Ne(An,\"requestAnimationFrame\",sr),this._options.XMLHttpRequest&&\"XMLHttpRequest\"in An&&Ne(XMLHttpRequest.prototype,\"send\",cr);const e=this._options.eventTarget;if(e){(Array.isArray(e)?e:ir).forEach(lr)}}}function ar(e){return function(...t){const n=t[0];return t[0]=xn(n,{mechanism:{data:{function:Ye(e)},handled:!0,type:\"instrument\"}}),e.apply(this,t)}}function sr(e){return function(t){return e.apply(this,[xn(t,{mechanism:{data:{function:\"requestAnimationFrame\",handler:Ye(e)},handled:!0,type:\"instrument\"}})])}}function cr(e){return function(...t){const n=this;return[\"onload\",\"onerror\",\"onprogress\",\"onreadystatechange\"].forEach((e=>{e in n&&\"function\"==typeof n[e]&&Ne(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Ye(t)},handled:!0,type:\"instrument\"}},r=Fe(t);return r&&(n.mechanism.data.handler=Ye(r)),xn(t,n)}))})),e.apply(this,t)}}function lr(e){const t=An,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty(\"addEventListener\")&&(Ne(n,\"addEventListener\",(function(t){return function(n,r,i){try{\"function\"==typeof r.handleEvent&&(r.handleEvent=xn(r.handleEvent,{mechanism:{data:{function:\"handleEvent\",handler:Ye(r),target:e},handled:!0,type:\"instrument\"}}))}catch(e){}return t.apply(this,[n,xn(r,{mechanism:{data:{function:\"addEventListener\",handler:Ye(r),target:e},handled:!0,type:\"instrument\"}}),i])}})),Ne(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)}})))}or.__initStatic();class ur{static __initStatic(){this.id=\"LinkedErrors\"}__init(){this.name=ur.id}constructor(e={}){ur.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(ur);if(!i||!o)return e;const a=i.getOptions();return ge(Ln,a.stackParser,a.maxValueLength,o._key,o._limit,e,n),e}))}}ur.__initStatic();class dr{constructor(){dr.prototype.__init.call(this)}static __initStatic(){this.id=\"HttpContext\"}__init(){this.name=dr.id}setupOnce(){Kt((e=>{if(on().getIntegration(dr)){if(!An.navigator&&!An.location&&!An.document)return e;const t=e.request&&e.request.url||An.location&&An.location.href,{referrer:n}=An.document||{},{userAgent:r}=An.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}))}}dr.__initStatic();class hr{constructor(){hr.prototype.__init.call(this)}static __initStatic(){this.id=\"Dedupe\"}__init(){this.name=hr.id}setupOnce(e,t){const n=e=>{if(e.type)return e;const n=t().getIntegration(hr);if(n){try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!fr(e,t))return!1;if(!pr(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=gr(t),r=gr(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!fr(e,t))return!1;if(!pr(e,t))return!1;return!0}(e,t))return!0;return!1}(e,n._previousEvent))return(\"undefined\"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ae.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 pr(e,t){let n=vr(e),r=vr(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=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}(Lo(),Io())||Eo())}function To(){if(Eo())return!1;if(!document)return!1;var e=document.createElement(\"iframe\");return!!e.requestFullscreen||!!e.webkitRequestFullscreen}var Oo=function(){try{var e=document.createElement(\"canvas\"),t=null!=e.getContext(\"webgl2\");return e.remove(),t}catch(e){return!1}}();function Po(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!Eo()&&(!!Oo&&(e?function(){if(xo())return!1;return[\"Chrome\",\"Firefox\"].includes(Lo())}():function(){if(xo())return!1;var e=Lo();if(\"Safari\"===e){var t=Fo();if(t.major<15||15===t.major&&t.minor<4)return!1}if(\"Chrome\"===e){return No().major>=77}if(\"Firefox\"===e){return Uo().major>=97}return[\"Chrome\",\"Firefox\",\"Safari\"].includes(e)}()))}function Ao(){if(Eo())return!1;if(jo())return!1;if(\"undefined\"==typeof AudioWorkletNode)return!1;switch(Lo()){case\"Chrome\":case\"Firefox\":return!0;case\"Safari\":return Io().major>=17}return!1}function Do(){return Co()&&!function(){var e,t=Lo();if(!ko())return!0;switch(t){case\"Chrome\":return(e=No()).major&&e.major>0&&e.major<75;case\"Firefox\":return(e=Uo()).major<91;case\"Safari\":return(e=Fo()).major<13||13===e.major&&e.minor<1;default:return!0}}()}function jo(){return ko().match(/Linux; Android/)}function xo(){var e,t,n=ko(),r=n.match(/Mac/)&&(!Eo()&&\"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)||(!!ko().match(/DailyAnd\\//)||void 0)}function Lo(){if(\"undefined\"!=typeof window){var e=ko();return Ro()?\"Safari\":e.indexOf(\"Edge\")>-1?\"Edge\":e.match(/Chrome\\//)?\"Chrome\":e.indexOf(\"Safari\")>-1||Bo()?\"Safari\":e.indexOf(\"Firefox\")>-1?\"Firefox\":e.indexOf(\"MSIE\")>-1||e.indexOf(\".NET\")>-1?\"IE\":\"Unknown Browser\"}}function Io(){switch(Lo()){case\"Chrome\":return No();case\"Safari\":return Fo();case\"Firefox\":return Uo();case\"Edge\":return function(){var e=0,t=0;if(\"undefined\"!=typeof window){var n=ko().match(/Edge\\/(\\d+).(\\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}()}}function No(){var e=0,t=0,n=0,r=0,i=!1;if(\"undefined\"!=typeof window){var o=ko(),a=o.match(/Chrome\\/(\\d+).(\\d+).(\\d+).(\\d+)/);if(a)try{e=parseInt(a[1]),t=parseInt(a[2]),n=parseInt(a[3]),r=parseInt(a[4]),i=o.indexOf(\"OPR/\")>-1}catch(e){}}return{major:e,minor:t,build:n,patch:r,opera:i}}function Ro(){return!!ko().match(/iPad|iPhone|iPod/i)&&Co()}function Bo(){return ko().indexOf(\"AppleWebKit/605.1.15\")>-1}function Fo(){var e=0,t=0,n=0;if(\"undefined\"!=typeof window){var r=ko().match(/Version\\/(\\d+).(\\d+)(.(\\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch(e){}else(Ro()||Bo())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Uo(){var e=0,t=0;if(\"undefined\"!=typeof window){var n=ko().match(/Firefox\\/(\\d+).(\\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}var Vo=function(){function e(){t(this,e)}return o(e,[{key:\"addListenerForMessagesFromCallMachine\",value:function(e,t,n){Q()}},{key:\"addListenerForMessagesFromDailyJs\",value:function(e,t,n){Q()}},{key:\"sendMessageToCallMachine\",value:function(e,t,n,r){Q()}},{key:\"sendMessageToDailyJs\",value:function(e,t){Q()}},{key:\"removeListener\",value:function(e){Q()}}]),e}();function Jo(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 $o(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},r=n.data,i=n.mergeStrategy,o=void 0===i?Ho:i;t(this,e),e._validateMergeStrategy(o),e._validateData(r,o),this.mergeStrategy=o,this.data=r}return o(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===Qo}},{key:\"_validateMergeStrategy\",value:function(e){if(!Ko.includes(e))throw Error(\"Unrecognized mergeStrategy provided. Options are: [\".concat(Ko,\"]\"))}},{key:\"_validateData\",value:function(e,t){if(!function(e){if(null==e||\"object\"!==n(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 r;try{if(r=JSON.stringify(e),t===Ho){var i=JSON.parse(r);I(i,e)||console.warn(\"The meeting session data provided will be modified when serialized.\",i,e)}else if(t===Qo)for(var o in e)if(Object.hasOwnProperty.call(e,o)&&void 0!==e[o]){var a=JSON.parse(JSON.stringify(e[o]));I(e[o],a)||console.warn(\"At least one key in the meeting session data provided will be modified when serialized.\",a,e[o])}}catch(e){throw Error(\"Meeting session data must be serializable to JSON: \".concat(e))}if(r.length>co)throw Error(\"Meeting session data is too large (\".concat(r.length,\" characters). Maximum size suppported is \").concat(co,\".\"))}}]),e}();function Zo(e,t,n){return Zo=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&&s(i,n.prototype),i},Zo.apply(null,arguments)}function ea(e){var t=\"function\"==typeof Map?new Map:void 0;return ea=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 Zo(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)},ea(e)}function ta(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=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function na(e){var t,n=null===(t=window._daily)||void 0===t?void 0:t.pendings;if(n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}var ra=function(){function e(n){t(this,e),this._currentLoad=null,this._callClientId=n}return o(e,[{key:\"load\",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new ia(n,(function(){r(!1)}),(function(e,n){n||na(t._callClientId),i(e,n)})),this._currentLoad.start()}},{key:\"cancel\",value:function(){this._currentLoad&&this._currentLoad.cancel(),na(this._callClientId)}},{key:\"loaded\",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),e}(),ia=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;t(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=n,this._successCallback=r,this._failureCallback=i}return o(e,[{key:\"start\",value:function(){var e=this;if(!this._currentAttempt){this._currentAttempt=new sa(this._dailyConfig,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 sa(e._dailyConfig,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}(),oa=function(e){c(r,ea(Error));var n=ta(r);function r(){return t(this,r),n.apply(this,arguments)}return o(r)}(),aa=2e4,sa=function(){function e(n,r,i){t(this,e),this._loadAttemptImpl=Eo()||!n.avoidEval?new ca(n,r,i):new la(n,r,i)}var n;return o(e,[{key:\"start\",value:(n=p((function*(){return this._loadAttemptImpl.start()})),function(){return n.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}(),ca=function(){function e(n,r,i){t(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache=\"undefined\"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=n,this._successCallback=r,this._failureCallback=i}var n,r,i,a;return o(e,[{key:\"start\",value:(a=p((function*(){var e=X(this._dailyConfig);!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)})),function(){return a.apply(this,arguments)})},{key:\"cancel\",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:\"_tryLoadFromIOSCache\",value:(i=p((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 i.apply(this,arguments)})},{key:\"_loadFromNetwork\",value:(r=p((function*(e){var t=this;this._networkTimeout=setTimeout((function(){t._networkTimedOut=!0,t._failureCallback({msg:\"Timed out (>\".concat(aa,\" ms) when loading call object bundle \").concat(e),type:\"timeout\"})}),aa);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new oa;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new oa;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 oa||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:\"Failed to load call object bundle \".concat(e,\": \").concat(t),type:t.message})}})),function(e){return r.apply(this,arguments)})},{key:\"_getBundleCodeFromResponse\",value:(n=p((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,t){return n.apply(this,arguments)})}]),e}(),la=function(){function e(n,r,i){t(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=n,this._successCallback=r,this._failureCallback=i,this._attemptId=H(),this._networkTimeout=null,this._scriptElement=null}return o(e,[{key:\"start\",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=X(this._dailyConfig);\"object\"===(\"undefined\"==typeof document?\"undefined\":n(document))?this._startLoading(e):this._failureCallback({msg:\"Call object bundle must be loaded in a DOM/web context\",type:\"missing context\"})}},{key:\"cancel\",value:function(){this._stopLoading(),this.cancelled=!0}},{key:\"_startLoading\",value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){t._stopLoading(),t._failureCallback({msg:\"Timed out (>\".concat(aa,\" ms) when loading call object bundle \").concat(e),type:\"timeout\"})}),aa);var n=document.getElementsByTagName(\"head\")[0],r=document.createElement(\"script\");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:\"Failed to load call object bundle \".concat(e.target.src),type:e.message})},r.src=e,n.appendChild(r)}},{key:\"_stopLoading\",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:\"_signUpForCallMachineLoadWaitlist\",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:\"_withdrawFromCallMachineLoadWaitlist\",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}]),e}(),ua=function(e,t,n){return!0===pa(e.local,t,n)},da=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]},ha=function(e,t,n,r){var i=fa(e,t,n,r);return i&&i.pendingTrack},pa=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)},fa=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]},ga=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function va(e,t){for(var n=t.getState(),r=0,i=[\"cam\",\"screen\"];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,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function wa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ca(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n49)return console.error(\"grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case.\"),!1}if(\"minTilesPerPage\"in t){if(!Number.isInteger(t.minTilesPerPage))return console.error(\"grid.minTilesPerPage should be an integer. You passed \".concat(t.minTilesPerPage,\".\")),!1;if(t.minTilesPerPage<1)return console.error(\"grid.minTilesPerPage can't be lower than 1.\"),!1;if(\"maxTilesPerPage\"in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error(\"grid.minTilesPerPage can't be higher than grid.maxTilesPerPage.\"),!1}}return!0},help:\"unsupported layoutConfig. Check error logs for detailed info.\"},receiveSettings:{validate:function(e){return hs(e,{allowAllParticipantsKey:!1})},help:vs({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error(\"Failed to validate send settings\",e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:\"Invalid sendSettings provided. Check error logs for detailed info.\"},inputSettings:{validate:function(e,t){var n;return!!ps(e)&&(t._preloadCache.inputSettings||(t._preloadCache.inputSettings={}),fs(e,null===(n=t.properties)||void 0===n?void 0:n.dailyConfig),e.audio&&(t._preloadCache.inputSettings.audio=e.audio),e.video&&(t._preloadCache.inputSettings.video=e.video),!0)},help:gs()},layout:{validate:function(e){return\"custom-v1\"===e||\"browser\"===e||\"none\"===e},help:'layout may only be set to \"custom-v1\"',queryString:\"layout\"},emb:{queryString:\"emb\"},embHref:{queryString:\"embHref\"},dailyJsVersion:{queryString:\"dailyJsVersion\"},proxy:{queryString:\"proxy\"},strictMode:!0,allowMultipleCallInstances:!0},Za={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)||!Eo()&&\"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 a=!i&&!r.includes(o),s=!n.includes(t[o]);if(a||s)return!1}return!0}(e)},help:\"setSubscribedTracks cannot be used when setSubscribeToTracksAutomatically is enabled, and should be of the form: \"+\"true\".concat(Eo()?\"\":\" | '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);t1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,te),d(a(r=ee.call(this)),\"startListeningForDeviceChanges\",(function(){Pa(r.handleDeviceChange)})),d(a(r),\"stopListeningForDeviceChanges\",(function(){Aa(r.handleDeviceChange)})),d(a(r),\"handleDeviceChange\",(function(e){e=e.map((function(e){return JSON.parse(JSON.stringify(e))})),r.emitDailyJSEvent({action:\"available-devices-updated\",availableDevices:e})})),d(a(r),\"handleNativeAppStateChange\",function(){var e=p((function*(e){if(\"destroyed\"===e)return console.warn(\"App has been destroyed before leaving the meeting. Cleaning up all the resources!\"),void(yield r.destroy());var t=\"active\"===e;r.disableReactNativeAutoDeviceManagement(\"video\")||(t?r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!0):(r.camUnmutedBeforeLosingNativeActiveState=r.localVideo(),r.camUnmutedBeforeLosingNativeActiveState&&r.setLocalVideo(!1)))}));return function(t){return e.apply(this,arguments)}}()),d(a(r),\"handleNativeAudioFocusChange\",(function(e){r.disableReactNativeAutoDeviceManagement(\"audio\")||(r._hasNativeAudioFocus=e,r.toggleParticipantAudioBasedOnNativeAudioFocus(),r._hasNativeAudioFocus?r.micUnmutedBeforeLosingNativeAudioFocus&&r.setLocalAudio(!0):(r.micUnmutedBeforeLosingNativeAudioFocus=r.localAudio(),r.setLocalAudio(!1)))})),d(a(r),\"handleNativeSystemScreenCaptureStop\",(function(){r.stopScreenShare()})),r.strictMode=void 0===o.strictMode||o.strictMode,r.allowMultipleCallInstances=null!==(n=o.allowMultipleCallInstances)&&void 0!==n&&n,Object.keys(Va).length&&(r._logDuplicateInstanceAttempt(),!r.allowMultipleCallInstances)){if(r.strictMode)throw new Error(\"Duplicate DailyIframe instances are not allowed\");console.warn(\"Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`\")}if(window._daily||(window._daily={pendings:[],instances:{}}),r.callClientId=H(),i=a(r),Va[i.callClientId]=i,window._daily.instances[r.callClientId]={},r._sharedTracks={},window._daily.instances[r.callClientId].tracks=r._sharedTracks,o.dailyJsVersion=te.version(),r._iframe=e,r._callObjectMode=\"none\"===o.layout&&!r._iframe,r._preloadCache={subscribeToTracksAutomatically:!0,audioDeviceId:null,videoDeviceId:null,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==o.showLocalVideo?r._callObjectMode?console.error(\"showLocalVideo is not available in call object mode\"):r._showLocalVideo=!!o.showLocalVideo:r._showLocalVideo=!0,void 0!==o.showParticipantsBar?r._callObjectMode?console.error(\"showParticipantsBar is not available in call object mode\"):r._showParticipantsBar=!!o.showParticipantsBar:r._showParticipantsBar=!0,void 0!==o.customIntegrations?r._callObjectMode?console.error(\"customIntegrations is not available in call object mode\"):r._customIntegrations=o.customIntegrations:r._customIntegrations={},void 0!==o.customTrayButtons?r._callObjectMode?console.error(\"customTrayButtons is not available in call object mode\"):r._customTrayButtons=o.customTrayButtons:r._customTrayButtons={},void 0!==o.activeSpeakerMode?r._callObjectMode?console.error(\"activeSpeakerMode is not available in call object mode\"):r._activeSpeakerMode=!!o.activeSpeakerMode:r._activeSpeakerMode=!1,o.receiveSettings?r._callObjectMode?r._receiveSettings=o.receiveSettings:console.error(\"receiveSettings is only available in call object mode\"):r._receiveSettings={},r.validateProperties(o),r.properties=Ra({},o),r._preloadCache.inputSettings||(r._preloadCache.inputSettings={}),o.inputSettings&&o.inputSettings.audio&&(r._preloadCache.inputSettings.audio=o.inputSettings.audio),o.inputSettings&&o.inputSettings.video&&(r._preloadCache.inputSettings.video=o.inputSettings.video),r._callObjectLoader=r._callObjectMode?new ra(r.callClientId):null,r._callState=br,r._isPreparingToJoin=!1,r._accessState={access:xr},r._meetingSessionSummary={},r._finalSummaryOfPrevSession={},r._meetingSessionState=Es(Ga,r._callObjectMode),r._nativeInCallAudioMode=Ja,r._participants={},r._isScreenSharing=!1,r._participantCounts=qa,r._rmpPlayerState={},r._waitingParticipants={},r._network={threshold:\"good\",quality:100},r._activeSpeaker={},r._localAudioLevel=0,r._isLocalAudioLevelObserverRunning=!1,r._remoteParticipantsAudioLevel={},r._isRemoteParticipantsAudioLevelObserverRunning=!1,r._maxAppMessageSize=so,r._messageChannel=Eo()?new Wo:new qo,r._iframe&&(r._iframe.requestFullscreen?r._iframe.addEventListener(\"fullscreenchange\",(function(){document.fullscreenElement===r._iframe?(r.emitDailyJSEvent({action:Qi}),r.sendMessageToCallMachine({action:Qi})):(r.emitDailyJSEvent({action:Ki}),r.sendMessageToCallMachine({action:Ki}))})):r._iframe.webkitRequestFullscreen&&r._iframe.addEventListener(\"webkitfullscreenchange\",(function(){document.webkitFullscreenElement===r._iframe?(r.emitDailyJSEvent({action:Qi}),r.sendMessageToCallMachine({action:Qi})):(r.emitDailyJSEvent({action:Ki}),r.sendMessageToCallMachine({action:Ki}))}))),Eo()){var s=r.nativeUtils();s.addAudioFocusChangeListener&&s.removeAudioFocusChangeListener&&s.addAppStateChangeListener&&s.removeAppStateChangeListener&&s.addSystemScreenCaptureStopListener&&s.removeSystemScreenCaptureStopListener||console.warn(\"expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native\"),r._hasNativeAudioFocus=!0,s.addAudioFocusChangeListener(r.handleNativeAudioFocusChange),s.addAppStateChangeListener(r.handleNativeAppStateChange),s.addSystemScreenCaptureStopListener(r.handleNativeSystemScreenCaptureStop)}return r._callObjectMode&&r.startListeningForDeviceChanges(),r._messageChannel.addListenerForMessagesFromCallMachine(r.handleMessageFromCallMachine,r.callClientId,a(r)),r}return o(te,[{key:\"destroy\",value:(Z=p((function*(){var e,t;try{yield this.leave()}catch(e){}var n=this._iframe;if(n){var r=n.parentElement;r&&r.removeChild(n)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),Eo()){var i=this.nativeUtils();i.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),i.removeAppStateChangeListener(this.handleNativeAppStateChange),i.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:\"call-instance-destroyed\"}),delete Va[this.callClientId],(null===(e=window)||void 0===e||null===(t=e._daily)||void 0===t?void 0:t.instances)&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=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 ls(),this.sendMessageToCallMachine({action:\"load-css\",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:\"iframe\",value:function(){return ls(),this._iframe}},{key:\"meetingState\",value:function(){return this._callState}},{key:\"accessState\",value:function(){return ss(this._callObjectMode,\"accessState()\"),this._accessState}},{key:\"participants\",value:function(){return this._participants}},{key:\"participantCounts\",value:function(){return this._participantCounts}},{key:\"waitingParticipants\",value:function(){return ss(this._callObjectMode,\"waitingParticipants()\"),this._waitingParticipants}},{key:\"validateParticipantProperties\",value:function(e,t){for(var n in t){if(!Za[n])throw new Error(\"unrecognized updateParticipant property \".concat(n));if(Za[n].validate&&!Za[n].validate(t[n],this,this._participants[e]))throw new Error(Za[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:(Q=p((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ss(this._callObjectMode,\"updateWaitingParticipant()\"),ns(this._callState,\"updateWaitingParticipant()\"),\"string\"!=typeof t||\"object\"!==n(r))throw new Error(\"updateWaitingParticipant() must take an id string and a updates object\");return new Promise((function(n,i){e.sendMessageToCallMachine({action:\"daily-method-update-waiting-participant\",id:t,updates:r},(function(e){e.error&&i(e.error),e.id||i(new Error(\"unknown error in updateWaitingParticipant()\")),n({id:e.id})}))}))})),function(){return Q.apply(this,arguments)})},{key:\"updateWaitingParticipants\",value:(z=p((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ss(this._callObjectMode,\"updateWaitingParticipants()\"),ns(this._callState,\"updateWaitingParticipants()\"),\"object\"!==n(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 z.apply(this,arguments)})},{key:\"requestAccess\",value:(Y=p((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.access,r=void 0===n?{level:Lr}:n,i=t.name,o=void 0===i?\"\":i;return ss(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 Y.apply(this,arguments)})},{key:\"localAudio\",value:function(){return this._participants.local?![\"blocked\",\"off\"].includes(this._participants.local.tracks.audio.state):null}},{key:\"localVideo\",value:function(){return this._participants.local?![\"blocked\",\"off\"].includes(this._participants.local.tracks.video.state):null}},{key:\"setLocalAudio\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return\"forceDiscardTrack\"in t&&(Eo()?(console.warn(\"forceDiscardTrack option not supported in React Native; ignoring\"),t={}):e&&(console.warn(\"forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring\"),t={})),this.sendMessageToCallMachine({action:\"local-audio\",state:e,options:t}),this}},{key:\"localScreenAudio\",value:function(){return this._participants.local?![\"blocked\",\"off\"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:\"localScreenVideo\",value:function(){return this._participants.local?![\"blocked\",\"off\"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:\"updateScreenShare\",value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:\"local-screen-update\",options:e}),this;console.warn(\"There is no screen share in progress. Try calling startScreenShare first.\")}},{key:\"setLocalVideo\",value:function(e){return this.sendMessageToCallMachine({action:\"local-video\",state:e}),this}},{key:\"getReceiveSettings\",value:(q=p((function*(e){var t=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,i=void 0!==r&&r;if(ss(this._callObjectMode,\"getReceiveSettings()\"),!this._callMachineInitialized)return this._receiveSettings;switch(n(e)){case\"string\":return new Promise((function(n){t.sendMessageToCallMachine({action:\"get-single-participant-receive-settings\",id:e,showInheritedValues:i},(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:(G=p((function*(e){var t=this;if(ss(this._callObjectMode,\"updateReceiveSettings()\"),!hs(e,{allowAllParticipantsKey:!0}))throw new Error(vs({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 G.apply(this,arguments)})},{key:\"_prepInputSettingsToPresentToUser\",value:function(e){var t,n,r,i,o,a,s,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=Ra({},e.audio.processor);delete d._isDefaultWhenNone,l.audio=Ra(Ra({},e.audio),{},{processor:d})}var h=\"none\"===(null===(o=e.video)||void 0===o||null===(a=o.processor)||void 0===a?void 0:a.type)&&(null===(s=e.video)||void 0===s||null===(c=s.processor)||void 0===c?void 0:c._isDefaultWhenNone);if(e.video&&!h){var p=Ra({},e.video.processor);delete p._isDefaultWhenNone,l.video=Ra(Ra({},e.video),{},{processor:p})}return l}}},{key:\"getInputSettings\",value:function(){var e=this;return ls(),new Promise((function(t){t(e._getInputSettings())}))}},{key:\"_getInputSettings\",value:function(){var e,t,n,r,i,o,a,s,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===(a=this._preloadCache)||void 0===a||null===(s=a.inputSettings)||void 0===s?void 0:s.audio)||c);var l={audio:t,video:e};return this._prepInputSettingsToPresentToUser(l)}},{key:\"updateInputSettings\",value:($=p((function*(e){var t=this;return ls(),ps(e)?(e&&(this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),fs(e,this.properties.dailyConfig),e.audio&&(this._preloadCache.inputSettings.audio=e.audio),e.video&&(this._preloadCache.inputSettings.video=e.video)),e.video||e.audio?this._callObjectMode&&!this._callMachineInitialized?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()):(console.error(gs()),Promise.reject(gs()))})),function(e){return $.apply(this,arguments)})},{key:\"setBandwidth\",value:function(e){var t=e.kbs,n=e.trackConstraints;if(ls(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:\"set-bandwidth\",kbs:t,trackConstraints:n}),this}},{key:\"getDailyLang\",value:function(){var e=this;if(ls(),this._callMachineInitialized)return new Promise((function(t){e.sendMessageToCallMachine({action:\"get-daily-lang\"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:\"setDailyLang\",value:function(e){return ls(),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[Cr,Mr].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:\"getMeetingSession\",value:(J=p((function*(){var e=this;return console.warn(\"getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately\"),ns(this._callState,\"getMeetingSession()\"),new Promise((function(t){e.sendMessageToCallMachine({action:\"get-meeting-session\"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return J.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\";ss(this._callObjectMode,\"setMeetingSessionData()\"),ns(this._callState,\"setMeetingSessionData\");try{!function(e,t){new Xo({data:e,mergeStrategy:t})}(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:\"set-session-data\",data:e,mergeStrategy:t})}catch(e){throw 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:Eo()||!!t&&!!t.thisMeetingOnly},(function(e){delete e.action,delete e.callbackStamp,r(e)}))}))}},{key:\"setUserData\",value:(V=p((function*(e){var t=this;try{ds(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise((function(n){try{t.sendMessageToCallMachine({action:\"set-user-data\",userData:e},(function(e){delete e.action,delete e.callbackStamp,n(e)}))}catch(e){throw 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(\"undefined\"==typeof AudioWorkletNode&&!Eo())throw new Error(\"startLocalAudioLevelObserver() is not supported on this browser\");if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:\"start-local-audio-level-observer\",interval:e},(function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:\"isLocalAudioLevelObserverRunning\",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:\"stopLocalAudioLevelObserver\",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:\"stop-local-audio-level-observer\"})}},{key:\"startRemoteParticipantsAudioLevelObserver\",value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:\"start-remote-participants-audio-level-observer\",interval:e},(function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:\"isRemoteParticipantsAudioLevelObserverRunning\",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:\"stopRemoteParticipantsAudioLevelObserver\",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:\"stop-remote-participants-audio-level-observer\"})}},{key:\"startCamera\",value:(U=p((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ss(this._callObjectMode,\"startCamera()\"),is(this._callState,this._isPreparingToJoin,\"startCamera()\",\"Did you mean to use setLocalAudio() and/or setLocalVideo() instead?\"),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error(\"url in startCamera() is different than the one used in preAuth()\"),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(\"token in startCamera() is different than the one used in preAuth()\"),Promise.reject()}this.validateProperties(t),this.properties=Ra(Ra({},this.properties),t)}return new Promise((function(t){e.sendMessageToCallMachine({action:\"start-camera\",properties:ts(e.properties,e.callClientId),preloadCache:ts(e._preloadCache,e.callClientId)},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return U.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:track,mode:mode,trackName:trackName};return ls(),ns(this._callState,\"startCustomTrack()\"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise((function(n,r){e._sharedTracks.customTrack=t.track,t.track=fo,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 ls(),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 us(),os(this._callMachineInitialized,\"setCamera()\"),new Promise((function(n){t.sendMessageToCallMachine({action:\"set-camera\",cameraDeviceId:e},(function(e){n({device:e.device})}))}))}},{key:\"setAudioDevice\",value:(F=p((function*(e){return us(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(e){return F.apply(this,arguments)})},{key:\"cycleCamera\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(n){e.sendMessageToCallMachine({action:\"cycle-camera\",properties:t},(function(e){n({device:e.device})}))}))}},{key:\"cycleMic\",value:function(){var e=this;return ls(),new Promise((function(t){e.sendMessageToCallMachine({action:\"cycle-mic\"},(function(e){t({device:e.device})}))}))}},{key:\"getCameraFacingMode\",value:function(){var e=this;return us(),new Promise((function(t){e.sendMessageToCallMachine({action:\"get-camera-facing-mode\"},(function(e){t(e.facingMode)}))}))}},{key:\"setInputDevicesAsync\",value:(B=p((function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,o=e.videoSource;return ls(),void 0!==i&&(n=i),void 0!==o&&(r=o),n&&(this._preloadCache.audioDeviceId=n,this._sharedTracks.audioDeviceId=n),r&&(this._preloadCache.videoDeviceId=r,this._sharedTracks.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=fo),r instanceof MediaStreamTrack&&(r=fo),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 B.apply(this,arguments)})},{key:\"setOutputDeviceAsync\",value:(R=p((function*(e){var t=this,n=e.outputDeviceId;return ls(),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 R.apply(this,arguments)})},{key:\"getInputDevices\",value:(N=p((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 us(),this._nativeInCallAudioMode}},{key:\"setNativeInCallAudioMode\",value:function(e){if(us(),[Ja,$a].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement(\"audio\")&&rs(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error(\"invalid in-call audio mode specified: \",e)}},{key:\"preAuth\",value:(L=p((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(ss(this._callObjectMode,\"preAuth()\"),is(this._callState,this._isPreparingToJoin,\"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=Ra(Ra({},this.properties),t),new Promise((function(t,n){e.sendMessageToCallMachine({action:\"daily-method-preauth\",properties:ts(e.properties,e.callClientId),preloadCache:ts(e._preloadCache,e.callClientId)},(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 L.apply(this,arguments)})},{key:\"load\",value:(x=p((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=Ra(Ra({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw new Error(\"can't load iframe meeting because url property isn't set\");return this._updateCallState(wr),this.emitDailyJSEvent({action:ai}),this._callObjectMode?new Promise((function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,(function(n){t._bundleLoadTime=n?\"no-op\":Date.now()-r,t._updateCallState(Sr),n&&t.emitDailyJSEvent({action:ci}),e()}),(function(e,r){if(t.emitDailyJSEvent({action:si}),!r){t._updateCallState(Mr),t.resetMeetingDependentVars();var i={action:ao,errorMsg:e.msg,error:{type:\"connection-error\",msg:\"Failed to load call object bundle.\",details:{on:\"load\",sourceError:e,bundleUrl:X(t.properties.dailyConfig)}}};t._maybeSendToSentry(i),t.emitDailyJSEvent(i),n(e.msg)}}))})):(this._iframe.src=K(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(e,n){t._loadedCallback=function(r){t._callState!==Mr?(t._updateCallState(Sr),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e()):n(r)}})))}})),function(e){return x.apply(this,arguments)})},{key:\"join\",value:(j=p((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();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 console.error(\"url in join() is different than the one used in preAuth()\"),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error(\"token in join() is different than the one used in preAuth()\"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error(\"url in join() is different than the one used in load() (\".concat(this.properties.url,\" -> \").concat(t.url,\")\")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=Ra(Ra({},this.properties),t)}return void 0!==t.showLocalVideo&&(this._callObjectMode?console.error(\"showLocalVideo is not available in callObject mode\"):this._showLocalVideo=!!t.showLocalVideo),void 0!==t.showParticipantsBar&&(this._callObjectMode?console.error(\"showParticipantsBar is not available in callObject mode\"):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===Er||this._callState===kr?(console.warn(\"already joined meeting, call leave() before joining again\"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(kr,!1),this.emitDailyJSEvent({action:di}),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:ts(this.properties,this.callClientId),preloadCache:ts(this._preloadCache,this.callClientId)}),new Promise((function(t,r){e._joinedCallback=function(i,o){if(e._callState!==Mr){if(e._updateCallState(Er),i)for(var a in i){if(e._callObjectMode){var s=e._callMachine().store;va(i[a],s),ma(i[a],s),_a(i[a],e._participants[a],s)}e._participants[a]=Ra({},i[a]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}n&&e.loadCss(e.properties),t(i)}else r(o)}})))})),function(){return j.apply(this,arguments)})},{key:\"leave\",value:(D=p((function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(t){e._callState===Cr||e._callState===Mr?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(Cr),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:Cr}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:\"leave-meeting\"}))}))})),function(){return D.apply(this,arguments)})},{key:\"startScreenShare\",value:(A=p((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(os(this._callMachineInitialized,\"startScreenShare()\"),t.screenVideoSendSettings&&this._validateVideoSendSettings(\"screenVideo\",t.screenVideoSendSettings),t.mediaStream&&(this._sharedTracks.screenMediaStream=t.mediaStream,t.mediaStream=fo),\"undefined\"!=typeof DailyNativeUtils&&void 0!==DailyNativeUtils.isIOS&&DailyNativeUtils.isIOS){var n=this.nativeUtils();if(yield n.isScreenBeingCaptured())return void this.emitDailyJSEvent({action:oo,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:uo,captureOptions:t})})),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:uo,captureOptions:t})})),function(){return A.apply(this,arguments)})},{key:\"stopScreenShare\",value:function(){os(this._callMachineInitialized,\"stopScreenShare()\"),this.sendMessageToCallMachine({action:\"local-screen-stop\"})}},{key:\"startRecording\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(Ra({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(Ra({action:\"local-recording-stop\"},e))}},{key:\"startLiveStreaming\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(Ra({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:ho,endpointsOp:bo,endpoints:t,instanceId:n})}},{key:\"removeLiveStreamingEndpoints\",value:function(e){var t=e.endpoints,n=e.instanceId;this.sendMessageToCallMachine({action:ho,endpointsOp:wo,endpoints:t,instanceId:n})}},{key:\"stopLiveStreaming\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(Ra({action:\"daily-method-stop-live-streaming\"},e))}},{key:\"validateDailyConfig\",value:function(e){e.camSimulcastEncodings&&(console.warn(\"camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings.\"),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn(\"screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings.\"),jo()&&e.noAutoDefaultDeviceChange&&console.warn(\"noAutoDefaultDeviceChange is not supported on Android, and will be ignored.\")}},{key:\"validateSimulcastEncodings\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw new Error(\"encodings must be an Array\");if(!ks(e.length,1,3))throw new Error(\"encodings must be an Array with between 1 to \".concat(3,\" layers\"));for(var r=0;r=200)throw new Error(\"Error starting dial out: displayName length must be less than 200\")}if(e.userId){if(\"string\"!=typeof e.userId)throw new Error(\"Error starting dial out: userId must be a string\");if(e.userId.length>36)throw new Error(\"Error starting dial out: userId length must be less than or equal to 36\")}return new Promise((function(n,r){t.sendMessageToCallMachine(Ra({action:\"dialout-start\"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return M.apply(this,arguments)})},{key:\"stopDialOut\",value:function(e){var t=this;return ns(this._callState,\"stopDialOut()\"),new Promise((function(n,r){t.sendMessageToCallMachine(Ra({action:\"dialout-stop\"},e),(function(e){e.error?r(e.error):n(e)}))}))}},{key:\"sipCallTransfer\",value:(C=p((function*(e){var t=this;if(ns(this._callState,\"sipCallTransfer()\"),!e)throw new Error(\"sipCallTransfer() requires a sessionId and toEndPoint\");return e.useSipRefer=!1,ws(e,\"sipCallTransfer\"),new Promise((function(n,r){t.sendMessageToCallMachine(Ra({action:So},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return C.apply(this,arguments)})},{key:\"sipRefer\",value:(E=p((function*(e){var t=this;if(ns(this._callState,\"sipRefer()\"),!e)throw new Error(\"sessionId and toEndPoint are mandatory parameter\");return e.useSipRefer=!0,ws(e,\"sipRefer\"),new Promise((function(n,r){t.sendMessageToCallMachine(Ra({action:So},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return E.apply(this,arguments)})},{key:\"sendDTMF\",value:(k=p((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=/[^0-9A-D*#]/g,i=n.match(r);if(i&&i[0])throw new Error(\"\".concat(i[0],\" is not valid DTMF tone\"))}(e),new Promise((function(n,r){t.sendMessageToCallMachine(Ra({action:\"send-dtmf\"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return k.apply(this,arguments)})},{key:\"getNetworkStats\",value:function(){var e=this;if(this._callState!==Er){return{stats:{latest:{}}}}return new Promise((function(t){e.sendMessageToCallMachine({action:\"get-calc-stats\"},(function(n){t(Ra({stats:n.stats},e._network))}))}))}},{key:\"testWebsocketConnectivity\",value:(S=p((function*(){var e=this;if(as(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 S.apply(this,arguments)})},{key:\"abortTestWebsocketConnectivity\",value:function(){this.sendMessageToCallMachine({action:\"abort-test-websocket-connectivity\"})}},{key:\"_validateVideoTrackForNetworkTests\",value:function(e){return e?e instanceof MediaStreamTrack?!!xa(e,{isLocalScreenVideo:!1})||(console.error(\"Video track is not playable. This test needs a live video track.\"),!1):(console.error(\"Video track needs to be of type `MediaStreamTrack`.\"),!1):(console.error(\"Missing video track. You must provide a video track in order to run this test.\"),!1)}},{key:\"testCallQuality\",value:(w=p((function*(){var t=this;ls(),ss(this._callObjectMode,\"testCallQuality()\"),os(this._callMachineInitialized,\"testCallQuality()\",null,!0),is(this._callState,this._isPreparingToJoin,\"testCallQuality()\");var n=this._testCallAlreadyInProgress,r=function(e){n||(t._testCallInProgress=e)};if(r(!0),this.needsLoad())try{var i=this._callState;yield this.load(),this._callState=i}catch(e){return r(!1),Promise.reject(e)}return new Promise((function(n){t.sendMessageToCallMachine({action:\"test-call-quality\",dailyJsVersion:t.properties.dailyJsVersion},(function(i){var o=i.results,a=o.result,s=e(o,La);if(\"failed\"===a){var c,l=Ra({},s);null!==(c=s.error)&&void 0!==c&&c.details?(s.error.details=JSON.parse(s.error.details),l.error=Ra(Ra({},l.error),{},{details:Ra({},l.error.details)}),l.error.details.duringTest=\"testCallQuality\"):(l.error=l.error?Ra({},l.error):{},l.error.details={duringTest:\"testCallQuality\"}),t._maybeSendToSentry(l)}r(!1),n(Ra({result:a},s))}))}))})),function(){return w.apply(this,arguments)})},{key:\"stopTestCallQuality\",value:function(){this.sendMessageToCallMachine({action:\"stop-test-call-quality\"})}},{key:\"testConnectionQuality\",value:(b=p((function*(e){var t;Eo()?(console.warn(\"testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead\"),t=yield this.testPeerToPeerCallQuality(e)):(console.warn(\"testConnectionQuality() is deprecated: use testCallQuality() instead\"),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n})),function(e){return b.apply(this,arguments)})},{key:\"testPeerToPeerCallQuality\",value:(_=p((function*(e){var t=this;if(as(this._testCallInProgress,\"testPeerToPeerCallQuality()\"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw new Error(\"Video track error\");return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise((function(e,n){t.sendMessageToCallMachine({action:\"test-p2p-call-quality\",duration:r},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return _.apply(this,arguments)})},{key:\"stopTestConnectionQuality\",value:function(){Eo()?(console.warn(\"stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead\"),this.stopTestPeerToPeerCallQuality()):(console.warn(\"stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead\"),this.stopTestCallQuality())}},{key:\"stopTestPeerToPeerCallQuality\",value:function(){this.sendMessageToCallMachine({action:\"stop-test-p2p-call-quality\"})}},{key:\"testNetworkConnectivity\",value:(y=p((function*(e){var t=this;if(as(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._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise((function(e,n){t.sendMessageToCallMachine({action:\"test-network-connectivity\"},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return y.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){if(e._callState===Er){e.sendMessageToCallMachine({action:\"get-cpu-load-stats\"},(function(e){t(e.cpuStats)}))}else 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(za))}},{key:\"_validateVideoSendSettings\",value:function(e,t){var r=\"screenVideo\"===e?[\"default-screen-video\",\"detail-optimized\",\"motion-optimized\",\"motion-and-detail-balanced\"]:[\"default-video\",\"bandwidth-optimized\",\"bandwidth-and-quality-balanced\",\"quality-optimized\",\"adaptive-2-layers\",\"adaptive-3-layers\"],i=\"Video send settings should be either an object or one of the supported presets: \".concat(r.join());if(\"string\"==typeof t){if(!r.includes(t))throw new Error(i)}else{if(\"object\"!==n(t))throw new Error(i);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 o=!1;switch(Object.keys(t.encodings).length){case 1:o=!t.encodings.low;break;case 2:o=!t.encodings.low||!t.encodings.medium;break;case 3:o=!t.encodings.low||!t.encodings.medium||!t.encodings.high;break;default:o=!0}if(o)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 ls(),this._activeSpeaker}},{key:\"setActiveSpeakerMode\",value:function(e){return ls(),this.sendMessageToCallMachine({action:\"set-active-speaker-mode\",enabled:e}),this}},{key:\"activeSpeakerMode\",value:function(){return ls(),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:(v=p((function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return\"Firefox\"===Lo()&&Io().major>115&&Io().major<123&&(t=t.filter((function(e){return\"audiooutput\"!==e.kind}))),{devices:t.map((function(e){var t=JSON.parse(JSON.stringify(e));if(!Eo()&&\"videoinput\"===e.kind&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(null==r||null===(n=r.facingMode)||void 0===n?void 0:n.length)>=1?r.facingMode[0]:void 0}return t}))}}return new Promise((function(t){e.sendMessageToCallMachine({action:\"enumerate-devices\"},(function(e){t({devices:e.devices})}))}))})),function(){return v.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>this._maxAppMessageSize)throw new Error(\"Message data too large. Max size is \"+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:\"app-msg\",data:e,to:t}),this}},{key:\"addFakeParticipant\",value:function(e){return ls(),ns(this._callState,\"addFakeParticipant()\"),this.sendMessageToCallMachine(Ra({action:\"add-fake-participant\"},e)),this}},{key:\"setShowNamesMode\",value:function(e){return cs(this._callObjectMode,\"setShowNamesMode()\"),ls(),e&&\"always\"!==e&&\"never\"!==e?(console.error('setShowNamesMode argument should be \"always\", \"never\", or false'),this):(this.sendMessageToCallMachine({action:\"set-show-names\",mode:e}),this)}},{key:\"setShowLocalVideo\",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return cs(this._callObjectMode,\"setShowLocalVideo()\"),ls(),ns(this._callState,\"setShowLocalVideo()\"),\"boolean\"!=typeof e?(console.error(\"setShowLocalVideo only accepts a boolean value\"),this):(this.sendMessageToCallMachine({action:\"set-show-local-video\",show:e}),this._showLocalVideo=e,this)}},{key:\"showLocalVideo\",value:function(){return cs(this._callObjectMode,\"showLocalVideo()\"),ls(),this._showLocalVideo}},{key:\"setShowParticipantsBar\",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return cs(this._callObjectMode,\"setShowParticipantsBar()\"),ls(),ns(this._callState,\"setShowParticipantsBar()\"),\"boolean\"!=typeof e?(console.error(\"setShowParticipantsBar only accepts a boolean value\"),this):(this.sendMessageToCallMachine({action:\"set-show-participants-bar\",show:e}),this._showParticipantsBar=e,this)}},{key:\"showParticipantsBar\",value:function(){return cs(this._callObjectMode,\"showParticipantsBar()\"),ls(),this._showParticipantsBar}},{key:\"customIntegrations\",value:function(){return ls(),cs(this._callObjectMode,\"customIntegrations()\"),this._customIntegrations}},{key:\"setCustomIntegrations\",value:function(e){return ls(),cs(this._callObjectMode,\"setCustomIntegrations()\"),ns(this._callState,\"setCustomIntegrations()\"),_s(e)?(this.sendMessageToCallMachine({action:\"set-custom-integrations\",integrations:e}),this._customIntegrations=e,this):this}},{key:\"startCustomIntegrations\",value:function(e){var t=this;if(ls(),cs(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 console.error(\"startCustomIntegrations() only accepts string | string[]\"),this;var n=\"string\"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error(\"Can't find custom integration(s): \\\"\".concat(r.join(\", \"),'\"')),this):(this.sendMessageToCallMachine({action:\"start-custom-integrations\",ids:n}),this)}},{key:\"stopCustomIntegrations\",value:function(e){var t=this;if(ls(),cs(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 console.error(\"stopCustomIntegrations() only accepts string | string[]\"),this;var n=\"string\"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error(\"Can't find custom integration(s): \\\"\".concat(r.join(\", \"),'\"')),this):(this.sendMessageToCallMachine({action:\"stop-custom-integrations\",ids:n}),this)}},{key:\"customTrayButtons\",value:function(){return cs(this._callObjectMode,\"customTrayButtons()\"),ls(),this._customTrayButtons}},{key:\"updateCustomTrayButtons\",value:function(e){return cs(this._callObjectMode,\"updateCustomTrayButtons()\"),ls(),ns(this._callState,\"updateCustomTrayButtons()\"),ys(e)?(this.sendMessageToCallMachine({action:\"update-custom-tray-buttons\",btns:e}),this._customTrayButtons=e,this):(console.error(\"updateCustomTrayButtons only accepts a dictionary of the type \".concat(JSON.stringify(Qa))),this)}},{key:\"theme\",value:function(){return cs(this._callObjectMode,\"theme()\"),this.properties.theme}},{key:\"setTheme\",value:function(e){var t=this;return cs(this._callObjectMode,\"setTheme()\"),new Promise((function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=Ra({},e),t.sendMessageToCallMachine({action:\"set-theme\",theme:t.properties.theme});try{t.emitDailyJSEvent({action:oi,theme:t.properties.theme})}catch(e){console.log(\"could not emit 'theme-updated'\",e)}n(t.properties.theme)}catch(e){r(e)}}))}},{key:\"requestFullscreen\",value:(f=p((function*(){if(ls(),this._iframe&&!document.fullscreenElement&&To())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log(\"could not make video call fullscreen\",e)}})),function(){return f.apply(this,arguments)})},{key:\"exitFullscreen\",value:function(){ls(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:\"getSidebarView\",value:(h=p((function*(){var e=this;return this._callObjectMode?(console.error(\"getSidebarView is not available in callObject mode\"),Promise.resolve(null)):new Promise((function(t){e.sendMessageToCallMachine({action:\"get-sidebar-view\"},(function(e){t(e.view)}))}))})),function(){return h.apply(this,arguments)})},{key:\"setSidebarView\",value:function(e){return this._callObjectMode?(console.error(\"setSidebarView is not available in callObject mode\"),this):(this.sendMessageToCallMachine({action:\"set-sidebar-view\",view:e}),this)}},{key:\"room\",value:(u=p((function*(){var e=this,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).includeRoomConfigDefaults,n=void 0===t||t;return this._accessState.access===xr||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 u.apply(this,arguments)})},{key:\"geo\",value:(l=p((function*(){try{var e=yield fetch(\"https://gs.daily.co/_ks_/x-swsl/:\");return{current:(yield e.json()).geo}}catch(e){return console.error(\"geo lookup failed\",e),{current:\"\"}}})),function(){return l.apply(this,arguments)})},{key:\"setNetworkTopology\",value:(s=p((function*(e){var t=this;return ls(),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 s.apply(this,arguments)})},{key:\"getNetworkTopology\",value:(i=p((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 i.apply(this,arguments)})},{key:\"setPlayNewParticipantSound\",value:function(e){if(ls(),\"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 m.prototype.on.call(this,e,t)}},{key:\"once\",value:function(e,t){return m.prototype.once.call(this,e,t)}},{key:\"off\",value:function(e,t){return m.prototype.off.call(this,e,t)}},{key:\"validateProperties\",value:function(e){for(var t in e){if(!Xa[t])throw new Error(\"unrecognized property '\".concat(t,\"'\"));if(Xa[t].validate&&!Xa[t].validate(e[t],this))throw new Error(\"property '\".concat(t,\"': \").concat(Xa[t].help))}}},{key:\"assembleMeetingUrl\",value:function(){var e,t,n=Ra(Ra({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:null!==(e=this.properties.dailyConfig)&&void 0!==e&&e.proxyUrl?encodeURIComponent(null===(t=this.properties.dailyConfig)||void 0===t?void 0:t.proxyUrl):void 0}),r=n.url.match(/\\?/)?\"&\":\"?\";return n.url+r+Object.keys(Xa).filter((function(e){return Xa[e].queryString&&void 0!==n[e]})).map((function(e){return\"\".concat(Xa[e].queryString,\"=\").concat(n[e])})).join(\"&\")}},{key:\"needsLoad\",value:function(){return[br,wr,Cr,Mr].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.callClientId,this._iframe)}},{key:\"forwardPackagedMessageToCallMachine\",value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:\"addListenerForPackagedMessagesFromCallMachine\",value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:\"removeListenerForPackagedMessagesFromCallMachine\",value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:\"handleMessageFromCallMachine\",value:function(t){switch(t.action){case ri:this.sendMessageToCallMachine(Ra({action:ii},this.properties));break;case\"call-machine-initialized\":this._callMachineInitialized=!0;var n={action:po,level:\"log\",code:1011,stats:{event:\"bundle load\",time:\"no-op\"===this._bundleLoadTime?0:this._bundleLoadTime,preLoaded:\"no-op\"===this._bundleLoadTime,url:X(this.properties.dailyConfig)}};this.sendMessageToCallMachine(n),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case ci:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(t);break;case hi:var r,i=Ra({},t);delete i.internal,this._maxAppMessageSize=(null===(r=t.internal)||void 0===r?void 0:r._maxAppMessageSize)||so,this._joinedCallback&&(this._joinedCallback(t.participants),this._joinedCallback=null),this.emitDailyJSEvent(i);break;case fi:case gi:if(this._callState===Cr)return;if(t.participant&&t.participant.session_id){var o=t.participant.local?\"local\":t.participant.session_id;if(this._callObjectMode){var a=this._callMachine().store;va(t.participant,a),ma(t.participant,a),_a(t.participant,this._participants[o],a)}try{this.maybeParticipantTracksStopped(this._participants[o],t.participant),this.maybeParticipantTracksStarted(this._participants[o],t.participant),this.maybeEventRecordingStopped(this._participants[o],t.participant),this.maybeEventRecordingStarted(this._participants[o],t.participant)}catch(e){console.error(\"track events error\",e)}this.compareEqualForParticipantUpdateEvent(t.participant,this._participants[o])||(this._participants[o]=Ra({},t.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(t))}break;case vi:if(t.participant&&t.participant.session_id){var s=this._participants[t.participant.session_id];s&&this.maybeParticipantTracksStopped(s,null),delete this._participants[t.participant.session_id],this.emitDailyJSEvent(t)}break;case mi:I(this._participantCounts,t.participantCounts)||(this._participantCounts=t.participantCounts,this.emitDailyJSEvent(t));break;case yi:var c={access:t.access};t.awaitingAccess&&(c.awaitingAccess=t.awaitingAccess),I(this._accessState,c)||(this._accessState=c,this.emitDailyJSEvent(t));break;case _i:if(t.meetingSession){this._meetingSessionSummary=t.meetingSession,this.emitDailyJSEvent(t);var l=Ra(Ra({},t),{},{action:\"meeting-session-updated\"});this.emitDailyJSEvent(l)}break;case ao:var u;this._iframe&&!t.preserveIframe&&(this._iframe.src=\"\"),this._updateCallState(Mr),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(t.errorMsg),this._loadedCallback=null),t.preserveIframe;var d=e(t,Ia);null!=d&&null!==(u=d.error)&&void 0!==u&&u.details&&(d.error.details=JSON.parse(d.error.details)),this._maybeSendToSentry(t),this._joinedCallback&&(this._joinedCallback(null,d),this._joinedCallback=null),this.emitDailyJSEvent(d);break;case pi:this._callState!==Mr&&this._updateCallState(Cr),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(t);break;case\"selected-devices-updated\":t.devices&&this.emitDailyJSEvent(t);break;case Yi:var h=t.threshold,p=t.quality;h===this._network.threshold&&p===this._network.quality||(this._network.quality=p,this._network.threshold=h,this.emitDailyJSEvent(t));break;case Wi:t&&t.cpuLoadState&&this.emitDailyJSEvent(t);break;case Hi:t&&void 0!==t.faceCounts&&this.emitDailyJSEvent(t);break;case Gi:var f=t.activeSpeaker;this._activeSpeaker.peerId!==f.peerId&&(this._activeSpeaker.peerId=f.peerId,this.emitDailyJSEvent({action:t.action,activeSpeaker:this._activeSpeaker}));break;case\"show-local-video-changed\":if(this._callObjectMode)return;var g=t.show;this._showLocalVideo=g,this.emitDailyJSEvent({action:t.action,show:g});break;case qi:var v=t.enabled;this._activeSpeakerMode!==v&&(this._activeSpeakerMode=v,this.emitDailyJSEvent({action:t.action,enabled:this._activeSpeakerMode}));break;case Si:case ki:case Ei:this._waitingParticipants=t.allWaitingParticipants,this.emitDailyJSEvent({action:t.action,participant:t.participant});break;case ro:I(this._receiveSettings,t.receiveSettings)||(this._receiveSettings=t.receiveSettings,this.emitDailyJSEvent({action:t.action,receiveSettings:t.receiveSettings}));break;case io:if(!I(this._inputSettings,t.inputSettings)){var m=this._getInputSettings();this._inputSettings=t.inputSettings,this._preloadCache.inputSettings={},I(m,this._getInputSettings())||this.emitDailyJSEvent({action:t.action,inputSettings:this._getInputSettings()})}break;case\"send-settings-updated\":I(this._sendSettings,t.sendSettings)||(this._sendSettings=t.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:t.action,sendSettings:t.sendSettings}));break;case\"local-audio-level\":this._localAudioLevel=t.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(t);break;case\"remote-participants-audio-level\":this._remoteParticipantsAudioLevel=t.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(t);break;case Bi:var y=t.session_id;this._rmpPlayerState[y]=t.playerState,this.emitDailyJSEvent(t);break;case Ui:delete this._rmpPlayerState[t.session_id],this.emitDailyJSEvent(t);break;case Fi:var _=t.session_id,b=this._rmpPlayerState[_];b&&this.compareEqualForRMPUpdateEvent(b,t.remoteMediaPlayerState)||(this._rmpPlayerState[_]=t.remoteMediaPlayerState,this.emitDailyJSEvent(t));break;case\"custom-button-click\":case\"sidebar-view-changed\":this.emitDailyJSEvent(t);break;case bi:var w=this._meetingSessionState.topology!==(t.meetingSessionState&&t.meetingSessionState.topology);this._meetingSessionState=Es(t.meetingSessionState,this._callObjectMode),(this._callObjectMode||w)&&this.emitDailyJSEvent(t);break;case Vi:this._isScreenSharing=!0,this.emitDailyJSEvent(t);break;case Ji:case $i:this._isScreenSharing=!1,this.emitDailyJSEvent(t);break;case Ai:case Di:case ji:case xi:case Li:case Ti:case Oi:case Pi:case li:case ui:case Ni:case Ri:case\"test-completed\":case zi:case Ii:case Xi:case Zi:case eo:case to:case oo:case no:case\"dialin-ready\":case\"dialin-connected\":case\"dialin-error\":case\"dialin-stopped\":case\"dialin-warning\":case\"dialout-connected\":case\"dialout-answered\":case\"dialout-error\":case\"dialout-stopped\":case\"dialout-warning\":this.emitDailyJSEvent(t);break;case\"request-fullscreen\":this.requestFullscreen();break;case\"request-exit-fullscreen\":this.exitFullscreen()}}},{key:\"maybeEventRecordingStopped\",value:function(e,t){var n=\"record\";e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:Di}))}},{key:\"maybeEventRecordingStarted\",value:function(e,t){var n=\"record\";e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:Ai}))}},{key:\"maybeEventTrackStopped\",value:function(e,t,n,r){e&&(\"ended\"!==e.readyState&&t&&e.id===t.id||this.emitDailyJSEvent({action:Mi,track:e,participant:n,type:r}))}},{key:\"maybeEventTrackStarted\",value:function(e,t,n,r){t&&(e&&\"ended\"!==e.readyState&&t.id===e.id||this.emitDailyJSEvent({action:Ci,track:t,participant:n,type:r}))}},{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{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log(\"could not emit\",e,t)}}},{key:\"compareEqualForParticipantUpdateEvent\",value:function(e,t){return!!I(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 Eo()?\"undefined\"==typeof DailyNativeUtils?(console.warn(\"in React Native, DailyNativeUtils is expected to be available\"),null):DailyNativeUtils:null}},{key:\"updateIsPreparingToJoin\",value:function(e){this._updateCallState(this._callState,e)}},{key:\"_updateCallState\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=rs(n,r),o=rs(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=qa,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:xr},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=Es(Ga,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=so,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:\"updateKeepDeviceAwake\",value:function(e){Eo()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:\"updateDeviceAudioMode\",value:function(e){if(Eo()&&!this.disableReactNativeAutoDeviceManagement(\"audio\")){var t=e?this._nativeInCallAudioMode:\"idle\";this.nativeUtils().setAudioMode(t)}}},{key:\"updateShowAndroidOngoingMeetingNotification\",value:function(e){if(Eo()&&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.callClientId)}}},{key:\"updateNoOpRecordingEnsuringBackgroundContinuity\",value:function(e){Eo()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:\"toggleParticipantAudioBasedOnNativeAudioFocus\",value:function(){var e,t;if(Eo()){var n=null===(e=this._callMachine())||void 0===e||null===(t=e.store)||void 0===t?void 0:t.getState();for(var r in null==n?void 0:n.streams){var i=n.streams[r];i&&i.pendingTrack&&\"audio\"===i.pendingTrack.kind&&(i.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:\"disableReactNativeAutoDeviceManagement\",value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:\"absoluteUrl\",value:function(e){if(void 0!==e){var t=document.createElement(\"a\");return t.href=e,t.href}}},{key:\"sayHello\",value:function(){var e=\"hello, world.\";return console.log(e),e}},{key:\"_logUseAfterDestroy\",value:function(){var e=Object.values(Va)[0];if(this.needsLoad()){if(e&&!e.needsLoad()){var t={action:po,level:\"error\",code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else if(!this.strictMode){console.error(\"You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.\")}}else{var n={action:po,level:\"error\",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:\"_logDuplicateInstanceAttempt\",value:function(){for(var e=0,t=Object.values(Va);e0&&void 0!==arguments[0]?arguments[0]:{};return e.layout=\"none\",new te(null,e)}},{key:\"wrap\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ls(),!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 te(e,t)}},{key:\"createFrame\",value:function(e,t){var n,r;ls(),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 te(o,r)}catch(e){throw n.removeChild(o),e}}},{key:\"createTransparentFrame\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ls();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\"),te.wrap(t,e)}},{key:\"getCallInstance\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?Va[e]:Object.values(Va)[0]}}]),te}();function ts(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)n[r]=fo;else if(\"dailyConfig\"===r){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function ns(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==Er){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)),console.error(n),new Error(n)}}function rs(e,t){return[kr,Er].includes(e)||t}function is(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(rs(e,t)){var i=\"\".concat(n,\" not supported after joining a meeting.\");throw r&&(i+=\" \".concat(r)),console.error(i),new Error(i)}}function os(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"This daily-js method\",n=arguments.length>2?arguments[2]:void 0;if(!e){var r=\"\".concat(t,arguments.length>3&&void 0!==arguments[3]&&arguments[3]?\" requires preAuth() or startCamera() to initialize call state.\":\" requires preAuth(), startCamera(), or join() to initialize call state.\");throw n&&(r+=\" \".concat(n)),console.error(r),new Error(r)}}function as(e){if(e){var t=\"A pre-call quality test is in progress. Please try \".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"This daily-js method\",\" again once testing has completed. Use stopTestCallQuality() to end it early.\");throw console.error(t),new Error(t)}}function ss(e){if(!e){var t=\"\".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"This daily-js method\",\" is only supported on custom callObject instances\");throw console.error(t),new Error(t)}}function cs(e){if(e){var t=\"\".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"This daily-js method\",\" is only supported as part of Daily's Prebuilt\");throw console.error(t),new Error(t)}}function ls(){if(Eo())throw new Error(\"This daily-js method is not currently supported in React Native\")}function us(){if(!Eo())throw new Error(\"This daily-js method is only supported in React Native\")}function ds(e){if(void 0===e)return!0;var t;if(\"string\"==typeof e)t=e;else try{t=JSON.stringify(e),I(JSON.parse(t),e)||console.warn(\"The userData provided will be modified when serialized.\")}catch(e){throw Error(\"userData must be serializable to JSON: \".concat(e))}if(t.length>4096)throw Error(\"userData is too large (\".concat(t.length,\" characters). Maximum size suppported is \").concat(4096,\".\"));return!0}function hs(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)))},a=0,s=Object.entries(e);a video -> processor -> config\";switch(e){case go.BGBLUR:return n.length>1||\"strength\"!==n[0]?(console.error(r),!1):!(\"number\"!=typeof t.strength||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error(\"\".concat(r,\"; expected: {0 < strength <= 1}, got: \").concat(t.strength)),!1);case go.BGIMAGE:return!(void 0!==t.source&&!function(e){if(\"default\"===e.source)return e.type=\"default\",!0;if(e.source instanceof ArrayBuffer)return!0;if(Z(e.source))return 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 _o.includes(r)}catch(e){return console.error(\"failed to deduce blob content type\",e),!1}var i=n.split(\".\").at(-1).toLowerCase().trim();return _o.includes(i)}(e.source)||(console.error(\"invalid image type; supported types: [\".concat(_o.join(\", \"),\"]\")),!1);return t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>yo?(console.error(\"invalid image selection; must be an int, > 0, <= \".concat(yo)),!1):(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){console.warn(\"invalid key inputSettings -> video -> processor : \".concat(t)),delete e[t]})),!0}(e.video.processor)))&&!(e.audio&&(\"object\"!==n(e.audio)||(r=e.audio.processor,i=[\"type\"],!r||\"object\"!==n(r)||(Object.keys(r).filter((function(e){return!i.includes(e)})).forEach((function(e){console.warn(\"invalid key inputSettings -> audio -> processor : \".concat(e)),delete r[e]})),t=r.type,\"string\"!=typeof t||!Object.values(vo).includes(t)&&(console.error(\"inputSettings audio processor type invalid\"),1))))));var t,r,i}function fs(e,t){var n,r=[];e.video&&!Po(null!==(n=null==t?void 0:t.useLegacyVideoProcessor)&&void 0!==n&&n)&&(delete e.video,r.push(\"video\")),e.audio&&!Ao()&&(delete e.audio,r.push(\"audio\")),r.length>0&&console.error(\"Ignoring settings for browser- or platform-unsupported input processor(s): \".concat(r.join(\", \")))}function gs(){var e=Object.values(go).join(\" | \"),t=Object.values(vo).join(\" | \");return\"inputSettings must be of the form: { video?: { processor: { type: [ \".concat(e,\" ], config?: {} } }, audio?: { processor: {type: [ \").concat(t,\" ] } } }\")}function vs(e){var t=e.allowAllParticipantsKey;return\"receiveSettings must be of the form { [ | \".concat(Rr).concat(t?' | \"'.concat(Br,'\"'):\"\",\"]: \")+'{ [video: [{ layer: [ | \"inherit\"] } | \"inherit\"]], [screenVideo: [{ layer: [ | \"inherit\"] } | \"inherit\"]] }}}'}function ms(){return\"customIntegrations should be an object of type \".concat(JSON.stringify(Ka),\".\")}function ys(e){if(e&&\"object\"!==n(e)||Array.isArray(e))return console.error(\"customTrayButtons should be an Object of the type \".concat(JSON.stringify(Qa),\".\")),!1;if(e)for(var t=0,r=Object.entries(e);t2)throw new Error(\"RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0\")}}function ks(e,t,n){return!(\"number\"!=typeof e||en)}function Es(e,t){return e&&!t&&delete e.data,e}\n\n\n//# sourceURL=webpack://Vapi/./node_modules/@daily-co/daily-js/dist/daily-esm.js?"); + +/***/ }), + +/***/ "./node_modules/@vapi-ai/web/dist/api.js": +/*!***********************************************!*\ + !*** ./node_modules/@vapi-ai/web/dist/api.js ***! + \***********************************************/ +/***/ ((__unused_webpack_module, exports) => { + +eval("\n/* eslint-disable */\n/* tslint:disable */\n/*\n * ---------------------------------------------------------------\n * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##\n * ## ##\n * ## AUTHOR: acacode ##\n * ## SOURCE: /~https://github.com/acacode/swagger-typescript-api ##\n * ---------------------------------------------------------------\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Api = exports.HttpClient = exports.ContentType = exports.AuthenticationType = void 0;\nvar AuthenticationType;\n(function (AuthenticationType) {\n AuthenticationType[\"OAUTH2\"] = \"oauth2\";\n})(AuthenticationType || (exports.AuthenticationType = AuthenticationType = {}));\nvar ContentType;\n(function (ContentType) {\n ContentType[\"Json\"] = \"application/json\";\n ContentType[\"FormData\"] = \"multipart/form-data\";\n ContentType[\"UrlEncoded\"] = \"application/x-www-form-urlencoded\";\n ContentType[\"Text\"] = \"text/plain\";\n})(ContentType || (exports.ContentType = ContentType = {}));\nclass HttpClient {\n baseUrl = '';\n securityData = null;\n securityWorker;\n abortControllers = new Map();\n customFetch = (...fetchParams) => fetch(...fetchParams);\n baseApiParams = {\n credentials: 'same-origin',\n headers: {},\n redirect: 'follow',\n referrerPolicy: 'no-referrer',\n };\n constructor(apiConfig = {}) {\n Object.assign(this, apiConfig);\n }\n setSecurityData = (data) => {\n this.securityData = data;\n };\n encodeQueryParam(key, value) {\n const encodedKey = encodeURIComponent(key);\n return `${encodedKey}=${encodeURIComponent(typeof value === 'number' ? value : `${value}`)}`;\n }\n addQueryParam(query, key) {\n return this.encodeQueryParam(key, query[key]);\n }\n addArrayQueryParam(query, key) {\n const value = query[key];\n return value.map((v) => this.encodeQueryParam(key, v)).join('&');\n }\n toQueryString(rawQuery) {\n const query = rawQuery || {};\n const keys = Object.keys(query).filter((key) => 'undefined' !== typeof query[key]);\n return keys\n .map((key) => Array.isArray(query[key])\n ? this.addArrayQueryParam(query, key)\n : this.addQueryParam(query, key))\n .join('&');\n }\n addQueryParams(rawQuery) {\n const queryString = this.toQueryString(rawQuery);\n return queryString ? `?${queryString}` : '';\n }\n contentFormatters = {\n [ContentType.Json]: (input) => input !== null && (typeof input === 'object' || typeof input === 'string')\n ? JSON.stringify(input)\n : input,\n [ContentType.Text]: (input) => input !== null && typeof input !== 'string'\n ? JSON.stringify(input)\n : input,\n [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {\n const property = input[key];\n formData.append(key, property instanceof Blob\n ? property\n : typeof property === 'object' && property !== null\n ? JSON.stringify(property)\n : `${property}`);\n return formData;\n }, new FormData()),\n [ContentType.UrlEncoded]: (input) => this.toQueryString(input),\n };\n mergeRequestParams(params1, params2) {\n return {\n ...this.baseApiParams,\n ...params1,\n ...(params2 || {}),\n headers: {\n ...(this.baseApiParams.headers || {}),\n ...(params1.headers || {}),\n ...((params2 && params2.headers) || {}),\n },\n };\n }\n createAbortSignal = (cancelToken) => {\n if (this.abortControllers.has(cancelToken)) {\n const abortController = this.abortControllers.get(cancelToken);\n if (abortController) {\n return abortController.signal;\n }\n return void 0;\n }\n const abortController = new AbortController();\n this.abortControllers.set(cancelToken, abortController);\n return abortController.signal;\n };\n abortRequest = (cancelToken) => {\n const abortController = this.abortControllers.get(cancelToken);\n if (abortController) {\n abortController.abort();\n this.abortControllers.delete(cancelToken);\n }\n };\n request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {\n const secureParams = ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) &&\n this.securityWorker &&\n (await this.securityWorker(this.securityData))) ||\n {};\n const requestParams = this.mergeRequestParams(params, secureParams);\n const queryString = query && this.toQueryString(query);\n const payloadFormatter = this.contentFormatters[type || ContentType.Json];\n const responseFormat = format || requestParams.format;\n return this.customFetch(`${baseUrl || this.baseUrl || ''}${path}${queryString ? `?${queryString}` : ''}`, {\n ...requestParams,\n headers: {\n ...(requestParams.headers || {}),\n ...(type && type !== ContentType.FormData\n ? { 'Content-Type': type }\n : {}),\n },\n signal: (cancelToken\n ? this.createAbortSignal(cancelToken)\n : requestParams.signal) || null,\n body: typeof body === 'undefined' || body === null\n ? null\n : payloadFormatter(body),\n }).then(async (response) => {\n const r = response.clone();\n r.data = null;\n r.error = null;\n const data = !responseFormat\n ? r\n : await response[responseFormat]()\n .then((data) => {\n if (r.ok) {\n r.data = data;\n }\n else {\n r.error = data;\n }\n return r;\n })\n .catch((e) => {\n r.error = e;\n return r;\n });\n if (cancelToken) {\n this.abortControllers.delete(cancelToken);\n }\n if (!response.ok)\n throw data;\n return data;\n });\n };\n}\nexports.HttpClient = HttpClient;\n/**\n * @title Vapi API\n * @version 1.0\n * @contact\n *\n * API for building voice assistants\n */\nclass Api extends HttpClient {\n call = {\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerCreate\n * @summary Create Call\n * @request POST:/call\n * @secure\n */\n callControllerCreate: (data, params = {}) => this.request({\n path: `/call`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerFindAll\n * @summary List Calls\n * @request GET:/call\n * @secure\n */\n callControllerFindAll: (query, params = {}) => this.request({\n path: `/call`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerFindOne\n * @summary Get Call\n * @request GET:/call/{id}\n * @secure\n */\n callControllerFindOne: (id, params = {}) => this.request({\n path: `/call/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerUpdate\n * @summary Update Call\n * @request PATCH:/call/{id}\n * @secure\n */\n callControllerUpdate: (id, data, params = {}) => this.request({\n path: `/call/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerDeleteCallData\n * @summary Delete Call Data\n * @request DELETE:/call/{id}\n * @secure\n */\n callControllerDeleteCallData: (id, params = {}) => this.request({\n path: `/call/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerCreatePhoneCall\n * @summary Create Phone Call\n * @request POST:/call/phone\n * @secure\n */\n callControllerCreatePhoneCall: (data, params = {}) => this.request({\n path: `/call/phone`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerCreateWebCall\n * @summary Create Web Call\n * @request POST:/call/web\n * @secure\n */\n callControllerCreateWebCall: (data, params = {}) => this.request({\n path: `/call/web`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n v2 = {\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerFindAllPaginated\n * @summary List Calls\n * @request GET:/v2/call\n * @secure\n */\n callControllerFindAllPaginated: (query, params = {}) => this.request({\n path: `/v2/call`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerFindAllMetadataPaginated\n * @summary List Call Metadata\n * @request GET:/v2/call/metadata\n * @secure\n */\n callControllerFindAllMetadataPaginated: (query, params = {}) => this.request({\n path: `/v2/call/metadata`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerFindAllPaginated\n * @summary List Phone Numbers\n * @request GET:/v2/phone-number\n * @secure\n */\n phoneNumberControllerFindAllPaginated: (query, params = {}) => this.request({\n path: `/v2/phone-number`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n assistant = {\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerCreate\n * @summary Create Assistant\n * @request POST:/assistant\n * @secure\n */\n assistantControllerCreate: (data, params = {}) => this.request({\n path: `/assistant`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerFindAll\n * @summary List Assistants\n * @request GET:/assistant\n * @secure\n */\n assistantControllerFindAll: (query, params = {}) => this.request({\n path: `/assistant`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerFindOne\n * @summary Get Assistant\n * @request GET:/assistant/{id}\n * @secure\n */\n assistantControllerFindOne: (id, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerUpdate\n * @summary Update Assistant\n * @request PATCH:/assistant/{id}\n * @secure\n */\n assistantControllerUpdate: (id, data, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants, extended\n * @name AssistantControllerReplace\n * @summary Replace Assistant\n * @request PUT:/assistant/{id}\n * @secure\n */\n assistantControllerReplace: (id, data, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'PUT',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerRemove\n * @summary Delete Assistant\n * @request DELETE:/assistant/{id}\n * @secure\n */\n assistantControllerRemove: (id, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n phoneNumber = {\n /**\n * No description\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerBuy\n * @summary Buy Phone Number\n * @request POST:/phone-number/buy\n * @secure\n */\n phoneNumberControllerBuy: (data, params = {}) => this.request({\n path: `/phone-number/buy`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * @description Use POST /phone-number instead.\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerImportTwilio\n * @summary Import Twilio Number\n * @request POST:/phone-number/import/twilio\n * @deprecated\n * @secure\n */\n phoneNumberControllerImportTwilio: (data, params = {}) => this.request({\n path: `/phone-number/import/twilio`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * @description Use POST /phone-number instead.\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerImportVonage\n * @summary Import Vonage Number\n * @request POST:/phone-number/import/vonage\n * @deprecated\n * @secure\n */\n phoneNumberControllerImportVonage: (data, params = {}) => this.request({\n path: `/phone-number/import/vonage`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerCreate\n * @summary Create Phone Number\n * @request POST:/phone-number\n * @secure\n */\n phoneNumberControllerCreate: (data, params = {}) => this.request({\n path: `/phone-number`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerFindAll\n * @summary List Phone Numbers\n * @request GET:/phone-number\n * @secure\n */\n phoneNumberControllerFindAll: (query, params = {}) => this.request({\n path: `/phone-number`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerFindOne\n * @summary Get Phone Number\n * @request GET:/phone-number/{id}\n * @secure\n */\n phoneNumberControllerFindOne: (id, params = {}) => this.request({\n path: `/phone-number/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerUpdate\n * @summary Update Phone Number\n * @request PATCH:/phone-number/{id}\n * @secure\n */\n phoneNumberControllerUpdate: (id, data, params = {}) => this.request({\n path: `/phone-number/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerRemove\n * @summary Delete Phone Number\n * @request DELETE:/phone-number/{id}\n * @secure\n */\n phoneNumberControllerRemove: (id, params = {}) => this.request({\n path: `/phone-number/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n squad = {\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerCreate\n * @summary Create Squad\n * @request POST:/squad\n * @secure\n */\n squadControllerCreate: (data, params = {}) => this.request({\n path: `/squad`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerFindAll\n * @summary List Squads\n * @request GET:/squad\n * @secure\n */\n squadControllerFindAll: (query, params = {}) => this.request({\n path: `/squad`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerFindOne\n * @summary Get Squad\n * @request GET:/squad/{id}\n * @secure\n */\n squadControllerFindOne: (id, params = {}) => this.request({\n path: `/squad/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerUpdate\n * @summary Update Squad\n * @request PATCH:/squad/{id}\n * @secure\n */\n squadControllerUpdate: (id, data, params = {}) => this.request({\n path: `/squad/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerRemove\n * @summary Delete Squad\n * @request DELETE:/squad/{id}\n * @secure\n */\n squadControllerRemove: (id, params = {}) => this.request({\n path: `/squad/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n knowledgeBase = {\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerCreate\n * @summary Create Knowledge Base\n * @request POST:/knowledge-base\n * @secure\n */\n knowledgeBaseControllerCreate: (data, params = {}) => this.request({\n path: `/knowledge-base`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerFindAll\n * @summary List Knowledge Bases\n * @request GET:/knowledge-base\n * @secure\n */\n knowledgeBaseControllerFindAll: (query, params = {}) => this.request({\n path: `/knowledge-base`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerFindOne\n * @summary Get Knowledge Base\n * @request GET:/knowledge-base/{id}\n * @secure\n */\n knowledgeBaseControllerFindOne: (id, params = {}) => this.request({\n path: `/knowledge-base/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerUpdate\n * @summary Update Knowledge Base\n * @request PATCH:/knowledge-base/{id}\n * @secure\n */\n knowledgeBaseControllerUpdate: (id, params = {}) => this.request({\n path: `/knowledge-base/${id}`,\n method: 'PATCH',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerRemove\n * @summary Delete Knowledge Base\n * @request DELETE:/knowledge-base/{id}\n * @secure\n */\n knowledgeBaseControllerRemove: (id, params = {}) => this.request({\n path: `/knowledge-base/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n block = {\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerCreate\n * @summary Create Block\n * @request POST:/block\n * @secure\n */\n blockControllerCreate: (data, params = {}) => this.request({\n path: `/block`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerFindAll\n * @summary List Blocks\n * @request GET:/block\n * @secure\n */\n blockControllerFindAll: (query, params = {}) => this.request({\n path: `/block`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerFindOne\n * @summary Get Block\n * @request GET:/block/{id}\n * @secure\n */\n blockControllerFindOne: (id, params = {}) => this.request({\n path: `/block/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerUpdate\n * @summary Update Block\n * @request PATCH:/block/{id}\n * @secure\n */\n blockControllerUpdate: (id, data, params = {}) => this.request({\n path: `/block/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerRemove\n * @summary Delete Block\n * @request DELETE:/block/{id}\n * @secure\n */\n blockControllerRemove: (id, params = {}) => this.request({\n path: `/block/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n tool = {\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerCreate\n * @summary Create Tool\n * @request POST:/tool\n * @secure\n */\n toolControllerCreate: (data, params = {}) => this.request({\n path: `/tool`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerFindAll\n * @summary List Tools\n * @request GET:/tool\n * @secure\n */\n toolControllerFindAll: (query, params = {}) => this.request({\n path: `/tool`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerFindOne\n * @summary Get Tool\n * @request GET:/tool/{id}\n * @secure\n */\n toolControllerFindOne: (id, params = {}) => this.request({\n path: `/tool/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerUpdate\n * @summary Update Tool\n * @request PATCH:/tool/{id}\n * @secure\n */\n toolControllerUpdate: (id, data, params = {}) => this.request({\n path: `/tool/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerRemove\n * @summary Delete Tool\n * @request DELETE:/tool/{id}\n * @secure\n */\n toolControllerRemove: (id, params = {}) => this.request({\n path: `/tool/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n file = {\n /**\n * @description Use POST /file instead.\n *\n * @tags Files, extended\n * @name FileControllerCreateDeprecated\n * @summary Upload File\n * @request POST:/file/upload\n * @deprecated\n * @secure\n */\n fileControllerCreateDeprecated: (data, params = {}) => this.request({\n path: `/file/upload`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.FormData,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerCreate\n * @summary Upload File\n * @request POST:/file\n * @secure\n */\n fileControllerCreate: (data, params = {}) => this.request({\n path: `/file`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.FormData,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerFindAll\n * @summary List Files\n * @request GET:/file\n * @secure\n */\n fileControllerFindAll: (params = {}) => this.request({\n path: `/file`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerFindOne\n * @summary Get File\n * @request GET:/file/{id}\n * @secure\n */\n fileControllerFindOne: (id, params = {}) => this.request({\n path: `/file/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerUpdate\n * @summary Update File\n * @request PATCH:/file/{id}\n * @secure\n */\n fileControllerUpdate: (id, data, params = {}) => this.request({\n path: `/file/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerRemove\n * @summary Delete File\n * @request DELETE:/file/{id}\n * @secure\n */\n fileControllerRemove: (id, params = {}) => this.request({\n path: `/file/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n metrics = {\n /**\n * @description Use GET /metric instead\n *\n * @tags Analytics, extended\n * @name AnalyticsControllerFindAllDeprecated\n * @summary List Billing Metrics\n * @request GET:/metrics\n * @deprecated\n * @secure\n */\n analyticsControllerFindAllDeprecated: (query, params = {}) => this.request({\n path: `/metrics`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n analytics = {\n /**\n * No description\n *\n * @tags Analytics, extended\n * @name AnalyticsControllerQuery\n * @summary Create Analytics Queries\n * @request POST:/analytics\n * @secure\n */\n analyticsControllerQuery: (data, params = {}) => this.request({\n path: `/analytics`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Analytics\n * @name AnalyticsControllerGetQuery\n * @summary Get Analytics\n * @request GET:/analytics\n * @secure\n */\n analyticsControllerGetQuery: (data, params = {}) => this.request({\n path: `/analytics`,\n method: 'GET',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n log = {\n /**\n * No description\n *\n * @tags Logs, extended\n * @name LoggingControllerGetCallLogs\n * @request GET:/log\n * @secure\n */\n loggingControllerGetCallLogs: (query, params = {}) => this.request({\n path: `/log`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n logs = {\n /**\n * No description\n *\n * @tags Logs\n * @name LoggingControllerQueryLogs\n * @summary Get Logs\n * @request GET:/logs\n * @secure\n */\n loggingControllerQueryLogs: (query, params = {}) => this.request({\n path: `/logs`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n chat = {\n /**\n * No description\n *\n * @tags Chat, extended\n * @name ChatControllerChat\n * @summary Chat with Assistant\n * @request POST:/chat\n * @secure\n */\n chatControllerChat: (data, params = {}) => this.request({\n path: `/chat`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n credential = {\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerCreate\n * @summary Create Credential\n * @request POST:/credential\n * @secure\n */\n credentialControllerCreate: (data, params = {}) => this.request({\n path: `/credential`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerFindAll\n * @summary List Credentials\n * @request GET:/credential\n * @secure\n */\n credentialControllerFindAll: (query, params = {}) => this.request({\n path: `/credential`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerFindOne\n * @summary Get Credential\n * @request GET:/credential/{id}\n * @secure\n */\n credentialControllerFindOne: (id, params = {}) => this.request({\n path: `/credential/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerRemove\n * @summary Delete Credential\n * @request DELETE:/credential/{id}\n * @secure\n */\n credentialControllerRemove: (id, params = {}) => this.request({\n path: `/credential/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n provider = {\n /**\n * No description\n *\n * @tags Providers, extended\n * @name ProviderControllerGetWorkflows\n * @request GET:/{provider}/workflows\n * @secure\n */\n providerControllerGetWorkflows: (provider, query, params = {}) => this.request({\n path: `/${provider}/workflows`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended\n * @name ProviderControllerGetWorkflowTriggerHook\n * @request GET:/{provider}/workflows/{workflowId}/hooks\n * @secure\n */\n providerControllerGetWorkflowTriggerHook: (provider, workflowId, params = {}) => this.request({\n path: `/${provider}/workflows/${workflowId}/hooks`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended\n * @name ProviderControllerGetLocations\n * @request GET:/{provider}/locations\n * @secure\n */\n providerControllerGetLocations: (provider, params = {}) => this.request({\n path: `/${provider}/locations`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerSearchVoices\n * @summary Search Voice from Provider Voice Library.\n * @request GET:/{provider}/voices/search\n * @deprecated\n * @secure\n */\n voiceProviderControllerSearchVoices: (provider, query, params = {}) => this.request({\n path: `/${provider}/voices/search`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerSearchVoice\n * @summary Search Voice from Provider Voice Library.\n * @request GET:/{provider}/voice/search\n * @secure\n */\n voiceProviderControllerSearchVoice: (provider, query, params = {}) => this.request({\n path: `/${provider}/voice/search`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerAddVoices\n * @summary Add Shared Voice to your Provider Account.\n * @request POST:/{provider}/voices/add\n * @deprecated\n * @secure\n */\n voiceProviderControllerAddVoices: (provider, data, params = {}) => this.request({\n path: `/${provider}/voices/add`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerAddVoice\n * @summary Add Shared Voice to your Provider Account.\n * @request POST:/{provider}/voice/add\n * @secure\n */\n voiceProviderControllerAddVoice: (provider, data, params = {}) => this.request({\n path: `/${provider}/voice/add`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n v11Labs = {\n /**\n * No description\n *\n * @tags Providers, extended\n * @name VoiceProviderControllerCloneVoices\n * @summary Clone a voice to the provider account and add to Vapi Voice Library.\n * @request POST:/11labs/voice/clone\n * @secure\n */\n voiceProviderControllerCloneVoices: (data, params = {}) => this.request({\n path: `/11labs/voice/clone`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.FormData,\n ...params,\n }),\n };\n token = {\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerCreate\n * @summary Create Token\n * @request POST:/token\n * @secure\n */\n tokenControllerCreate: (data, params = {}) => this.request({\n path: `/token`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerFindAll\n * @summary List Tokens\n * @request GET:/token\n * @secure\n */\n tokenControllerFindAll: (query, params = {}) => this.request({\n path: `/token`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerFindOne\n * @summary Get Token\n * @request GET:/token/{id}\n * @secure\n */\n tokenControllerFindOne: (id, params = {}) => this.request({\n path: `/token/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerUpdate\n * @summary Update Token\n * @request PATCH:/token/{id}\n * @secure\n */\n tokenControllerUpdate: (id, data, params = {}) => this.request({\n path: `/token/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerRemove\n * @summary Delete Token\n * @request DELETE:/token/{id}\n * @secure\n */\n tokenControllerRemove: (id, params = {}) => this.request({\n path: `/token/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n voiceLibrary = {\n /**\n * No description\n *\n * @tags Voice Library, extended\n * @name VoiceLibraryControllerVoiceGetByProvider\n * @summary Get voices in Voice Library by Provider\n * @request GET:/voice-library/{provider}\n * @secure\n */\n voiceLibraryControllerVoiceGetByProvider: (provider, query, params = {}) => this.request({\n path: `/voice-library/${provider}`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Voice Library, extended\n * @name VoiceLibraryControllerVoiceGetAccentsByProvider\n * @summary Get accents in Voice Library by Provider\n * @request GET:/voice-library/{provider}/accents\n * @secure\n */\n voiceLibraryControllerVoiceGetAccentsByProvider: (provider, params = {}) => this.request({\n path: `/voice-library/${provider}/accents`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Voice Library, extended\n * @name VoiceLibraryControllerVoiceLibrarySyncByProvider\n * @summary Sync Private voices in Voice Library by Provider\n * @request POST:/voice-library/sync/{provider}\n * @secure\n */\n voiceLibraryControllerVoiceLibrarySyncByProvider: (provider, params = {}) => this.request({\n path: `/voice-library/sync/${provider}`,\n method: 'POST',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Voice Library, extended, extended\n * @name VoiceLibraryControllerVoiceLibrarySyncDefaultVoices\n * @summary Sync Default voices in Voice Library by Providers\n * @request POST:/voice-library/sync\n * @secure\n */\n voiceLibraryControllerVoiceLibrarySyncDefaultVoices: (data, params = {}) => this.request({\n path: `/voice-library/sync`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n}\nexports.Api = Api;\n\n\n//# sourceURL=webpack://Vapi/./node_modules/@vapi-ai/web/dist/api.js?"); + +/***/ }), + +/***/ "./node_modules/@vapi-ai/web/dist/client.js": +/*!**************************************************!*\ + !*** ./node_modules/@vapi-ai/web/dist/client.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.client = void 0;\nconst api_1 = __webpack_require__(/*! ./api */ \"./node_modules/@vapi-ai/web/dist/api.js\");\nconst api = new api_1.Api({\n baseUrl: \"https://api.vapi.ai\",\n baseApiParams: {\n secure: true,\n },\n securityWorker: async (securityData) => {\n if (securityData) {\n return {\n headers: {\n Authorization: `Bearer ${securityData}`,\n },\n };\n }\n },\n});\nexports.client = api;\n\n\n//# sourceURL=webpack://Vapi/./node_modules/@vapi-ai/web/dist/client.js?"); + +/***/ }), + +/***/ "./node_modules/@vapi-ai/web/dist/vapi.js": +/*!************************************************!*\ + !*** ./node_modules/@vapi-ai/web/dist/vapi.js ***! + \************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst daily_js_1 = __importDefault(__webpack_require__(/*! @daily-co/daily-js */ \"./node_modules/@daily-co/daily-js/dist/daily-esm.js\"));\nconst events_1 = __importDefault(__webpack_require__(/*! events */ \"./node_modules/events/events.js\"));\nconst client_1 = __webpack_require__(/*! ./client */ \"./node_modules/@vapi-ai/web/dist/client.js\");\nasync function startAudioPlayer(player, track) {\n player.muted = false;\n player.autoplay = true;\n if (track != null) {\n player.srcObject = new MediaStream([track]);\n await player.play();\n }\n}\nasync function buildAudioPlayer(track, participantId) {\n const player = document.createElement('audio');\n player.dataset.participantId = participantId;\n document.body.appendChild(player);\n await startAudioPlayer(player, track);\n return player;\n}\nfunction destroyAudioPlayer(participantId) {\n const player = document.querySelector(`audio[data-participant-id=\"${participantId}\"]`);\n player?.remove();\n}\nfunction subscribeToTracks(e, call, isVideoRecordingEnabled, isVideoEnabled) {\n if (e.participant.local)\n return;\n call.updateParticipant(e.participant.session_id, {\n setSubscribedTracks: {\n audio: true,\n video: isVideoRecordingEnabled || isVideoEnabled,\n },\n });\n}\nclass VapiEventEmitter extends events_1.default {\n on(event, listener) {\n super.on(event, listener);\n return this;\n }\n once(event, listener) {\n super.once(event, listener);\n return this;\n }\n emit(event, ...args) {\n return super.emit(event, ...args);\n }\n removeListener(event, listener) {\n super.removeListener(event, listener);\n return this;\n }\n removeAllListeners(event) {\n super.removeAllListeners(event);\n return this;\n }\n}\nclass Vapi extends VapiEventEmitter {\n started = false;\n call = null;\n speakingTimeout = null;\n dailyCallConfig = {};\n dailyCallObject = {};\n constructor(apiToken, apiBaseUrl, dailyCallConfig, dailyCallObject) {\n super();\n client_1.client.baseUrl = apiBaseUrl ?? 'https://api.vapi.ai';\n client_1.client.setSecurityData(apiToken);\n this.dailyCallConfig = dailyCallConfig ?? {};\n this.dailyCallObject = dailyCallObject ?? {};\n }\n cleanup() {\n this.started = false;\n this.call?.destroy();\n this.call = null;\n this.speakingTimeout = null;\n }\n isMobileDevice() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n const userAgent = navigator.userAgent;\n return /android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(userAgent.toLowerCase());\n }\n async sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n async start(assistant, assistantOverrides, squad) {\n if (!assistant && !squad) {\n throw new Error('Assistant or Squad must be provided.');\n }\n if (this.started) {\n return null;\n }\n this.started = true;\n try {\n const webCall = (await client_1.client.call.callControllerCreateWebCall({\n assistant: typeof assistant === 'string' ? undefined : assistant,\n assistantId: typeof assistant === 'string' ? assistant : undefined,\n assistantOverrides,\n squad: typeof squad === 'string' ? undefined : squad,\n squadId: typeof squad === 'string' ? squad : undefined,\n })).data;\n if (this.call) {\n this.cleanup();\n }\n const isVideoRecordingEnabled = webCall?.artifactPlan?.videoRecordingEnabled ?? false;\n const isVideoEnabled = webCall.transport?.assistantVideoEnabled ?? false;\n this.call = daily_js_1.default.createCallObject({\n audioSource: this.dailyCallObject.audioSource ?? true,\n videoSource: this.dailyCallObject.videoSource ?? isVideoRecordingEnabled,\n dailyConfig: this.dailyCallConfig,\n });\n this.call.iframe()?.style.setProperty('display', 'none');\n this.call.on('left-meeting', () => {\n this.emit('call-end');\n if (isVideoRecordingEnabled) {\n this.call?.stopRecording();\n }\n this.cleanup();\n });\n this.call.on('error', (error) => {\n this.emit('error', error);\n if (isVideoRecordingEnabled) {\n this.call?.stopRecording();\n }\n });\n this.call.on('camera-error', (error) => {\n this.emit('error', error);\n });\n this.call.on('track-started', async (e) => {\n if (!e || !e.participant) {\n return;\n }\n if (e.participant?.local) {\n return;\n }\n if (e.participant?.user_name !== 'Vapi Speaker') {\n return;\n }\n if (e.track.kind === 'video') {\n this.emit('video', e.track);\n }\n if (e.track.kind === 'audio') {\n await buildAudioPlayer(e.track, e.participant.session_id);\n }\n this.call?.sendAppMessage('playable');\n });\n this.call.on('participant-joined', (e) => {\n if (!e || !this.call)\n return;\n subscribeToTracks(e, this.call, isVideoRecordingEnabled, isVideoEnabled);\n });\n this.call.on('participant-updated', (e) => {\n if (!e) {\n return;\n }\n this.emit('daily-participant-updated', e.participant);\n });\n this.call.on('participant-left', (e) => {\n if (!e) {\n return;\n }\n destroyAudioPlayer(e.participant.session_id);\n });\n // Allow mobile devices to finish processing the microphone permissions\n // request before joining the call and playing the assistant's audio\n if (this.isMobileDevice()) {\n await this.sleep(1000);\n }\n await this.call.join({\n // @ts-expect-error This exists\n url: webCall.webCallUrl,\n subscribeToTracksAutomatically: false,\n });\n if (isVideoRecordingEnabled) {\n const recordingRequestedTime = new Date().getTime();\n this.call.startRecording({\n width: 1280,\n height: 720,\n backgroundColor: '#FF1F2D3D',\n layout: {\n preset: 'default',\n },\n });\n this.call.on('recording-started', () => {\n this.send({\n type: 'control',\n control: 'say-first-message',\n videoRecordingStartDelaySeconds: (new Date().getTime() - recordingRequestedTime) / 1000,\n });\n });\n }\n this.call.startRemoteParticipantsAudioLevelObserver(100);\n this.call.on('remote-participants-audio-level', (e) => {\n if (e)\n this.handleRemoteParticipantsAudioLevel(e);\n });\n this.call.on('app-message', (e) => this.onAppMessage(e));\n this.call.on('nonfatal-error', (e) => {\n // https://docs.daily.co/reference/daily-js/events/meeting-events#type-audio-processor-error\n if (e?.type === 'audio-processor-error') {\n this.call\n ?.updateInputSettings({\n audio: {\n processor: {\n type: 'none',\n },\n },\n })\n .then(() => {\n this.call?.setLocalAudio(true);\n });\n }\n });\n this.call.updateInputSettings({\n audio: {\n processor: {\n type: 'noise-cancellation',\n },\n },\n });\n return webCall;\n }\n catch (e) {\n console.error(e);\n this.emit('error', e);\n this.cleanup();\n return null;\n }\n }\n onAppMessage(e) {\n if (!e) {\n return;\n }\n try {\n if (e.data === 'listening') {\n return this.emit('call-start');\n }\n else {\n try {\n const parsedMessage = JSON.parse(e.data);\n this.emit('message', parsedMessage);\n }\n catch (parseError) {\n console.log('Error parsing message data: ', parseError);\n }\n }\n }\n catch (e) {\n console.error(e);\n }\n }\n handleRemoteParticipantsAudioLevel(e) {\n const speechLevel = Object.values(e.participantsAudioLevel).reduce((a, b) => a + b, 0);\n this.emit('volume-level', Math.min(1, speechLevel / 0.15));\n const isSpeaking = speechLevel > 0.01;\n if (!isSpeaking) {\n return;\n }\n if (this.speakingTimeout) {\n clearTimeout(this.speakingTimeout);\n this.speakingTimeout = null;\n }\n else {\n this.emit('speech-start');\n }\n this.speakingTimeout = setTimeout(() => {\n this.emit('speech-end');\n this.speakingTimeout = null;\n }, 1000);\n }\n stop() {\n this.started = false;\n this.call?.destroy();\n this.call = null;\n }\n send(message) {\n this.call?.sendAppMessage(JSON.stringify(message));\n }\n setMuted(mute) {\n if (!this.call) {\n throw new Error('Call object is not available.');\n }\n this.call.setLocalAudio(!mute);\n }\n isMuted() {\n if (!this.call) {\n return false;\n }\n return this.call.localAudio() === false;\n }\n say(message, endCallAfterSpoken) {\n this.send({\n type: 'say',\n message,\n endCallAfterSpoken,\n });\n }\n setInputDevicesAsync(options) {\n this.call?.setInputDevicesAsync(options);\n }\n setOutputDeviceAsync(options) {\n this.call?.setOutputDeviceAsync(options);\n }\n getDailyCallObject() {\n return this.call;\n }\n startScreenSharing(displayMediaOptions, screenVideoSendSettings) {\n this.call?.startScreenShare({\n displayMediaOptions,\n screenVideoSendSettings,\n });\n }\n stopScreenSharing() {\n this.call?.stopScreenShare();\n }\n}\nexports[\"default\"] = Vapi;\n\n\n//# sourceURL=webpack://Vapi/./node_modules/@vapi-ai/web/dist/vapi.js?"); + +/***/ }), + +/***/ "./src/index.js": +/*!**********************!*\ + !*** ./src/index.js ***! + \**********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _vapi_wrapper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vapi-wrapper */ \"./src/vapi-wrapper.js\");\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_vapi_wrapper__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n\n//# sourceURL=webpack://Vapi/./src/index.js?"); + +/***/ }), + +/***/ "./src/vapi-wrapper.js": +/*!*****************************!*\ + !*** ./src/vapi-wrapper.js ***! + \*****************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _vapi_ai_web__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vapi-ai/web */ \"./node_modules/@vapi-ai/web/dist/vapi.js\");\n/* harmony import */ var _vapi_ai_web__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vapi_ai_web__WEBPACK_IMPORTED_MODULE_0__);\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((_vapi_ai_web__WEBPACK_IMPORTED_MODULE_0___default()));\n\n//# sourceURL=webpack://Vapi/./src/vapi-wrapper.js?"); + +/***/ }), + +/***/ "./node_modules/events/events.js": +/*!***************************************!*\ + !*** ./node_modules/events/events.js ***! + \***************************************/ +/***/ ((module) => { + +eval("// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n\n\n//# sourceURL=webpack://Vapi/./node_modules/events/events.js?"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ loaded: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/harmony module decorator */ +/******/ (() => { +/******/ __webpack_require__.hmd = (module) => { +/******/ module = Object.create(module); +/******/ if (!module.children) module.children = []; +/******/ Object.defineProperty(module, 'exports', { +/******/ enumerable: true, +/******/ set: () => { +/******/ throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id); +/******/ } +/******/ }); +/******/ return module; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module can't be inlined because the eval devtool is used. +/******/ var __webpack_exports__ = __webpack_require__("./src/index.js"); +/******/ __webpack_exports__ = __webpack_exports__["default"]; +/******/ +/******/ return __webpack_exports__; +/******/ })() +; +}); \ No newline at end of file diff --git a/dist/2.2.0/vapi-web-bundle-2.2.0.min.js b/dist/2.2.0/vapi-web-bundle-2.2.0.min.js new file mode 100644 index 0000000..0e2b229 --- /dev/null +++ b/dist/2.2.0/vapi-web-bundle-2.2.0.min.js @@ -0,0 +1,2 @@ +/*! For license information please see vapi-web-bundle-2.2.0.min.js.LICENSE.txt */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Vapi=t():e.Vapi=t()}(this,(()=>(()=>{"use strict";var e={473:(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=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return o="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},o(e)}function s(e){var t=function(e){if("object"!==o(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===o(t)?t:String(t)}function a(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nCr,DAILY_ACCESS_LEVEL_LOBBY:()=>Mr,DAILY_ACCESS_LEVEL_NONE:()=>Ar,DAILY_ACCESS_UNKNOWN:()=>Tr,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:()=>Yr,DAILY_CAMERA_ERROR_CAM_IN_USE:()=>Vr,DAILY_CAMERA_ERROR_CONSTRAINTS:()=>Wr,DAILY_CAMERA_ERROR_MIC_IN_USE:()=>qr,DAILY_CAMERA_ERROR_NOT_FOUND:()=>$r,DAILY_CAMERA_ERROR_PERMISSIONS:()=>Gr,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:()=>Jr,DAILY_CAMERA_ERROR_UNKNOWN:()=>zr,DAILY_EVENT_ACCESS_STATE_UPDATED:()=>ui,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:()=>Ri,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:()=>xi,DAILY_EVENT_APP_MSG:()=>Ai,DAILY_EVENT_CAMERA_ERROR:()=>ni,DAILY_EVENT_CPU_LOAD_CHANGE:()=>Ui,DAILY_EVENT_ERROR:()=>Xi,DAILY_EVENT_EXIT_FULLSCREEN:()=>Yi,DAILY_EVENT_FACE_COUNTS_UPDATED:()=>Vi,DAILY_EVENT_FULLSCREEN:()=>qi,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:()=>Qr,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:()=>Hr,DAILY_EVENT_INPUT_SETTINGS_UPDATED:()=>Qi,DAILY_EVENT_JOINED_MEETING:()=>ii,DAILY_EVENT_JOINING_MEETING:()=>ri,DAILY_EVENT_LANG_UPDATED:()=>zi,DAILY_EVENT_LEFT_MEETING:()=>oi,DAILY_EVENT_LIVE_STREAMING_ERROR:()=>Wi,DAILY_EVENT_LIVE_STREAMING_STARTED:()=>Gi,DAILY_EVENT_LIVE_STREAMING_STOPPED:()=>$i,DAILY_EVENT_LIVE_STREAMING_UPDATED:()=>Ji,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:()=>Ni,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:()=>pi,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:()=>hi,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:()=>di,DAILY_EVENT_NETWORK_CONNECTION:()=>Bi,DAILY_EVENT_NETWORK_QUALITY_CHANGE:()=>Fi,DAILY_EVENT_NONFATAL_ERROR:()=>Ki,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:()=>li,DAILY_EVENT_PARTICIPANT_JOINED:()=>si,DAILY_EVENT_PARTICIPANT_LEFT:()=>ci,DAILY_EVENT_PARTICIPANT_UPDATED:()=>ai,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:()=>Hi,DAILY_EVENT_RECORDING_DATA:()=>Mi,DAILY_EVENT_RECORDING_ERROR:()=>Ti,DAILY_EVENT_RECORDING_STARTED:()=>Ei,DAILY_EVENT_RECORDING_STATS:()=>ki,DAILY_EVENT_RECORDING_STOPPED:()=>wi,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:()=>Ci,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:()=>Pi,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:()=>Li,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:()=>Di,DAILY_EVENT_STARTED_CAMERA:()=>ti,DAILY_EVENT_THEME_UPDATED:()=>Kr,DAILY_EVENT_TRACK_STARTED:()=>gi,DAILY_EVENT_TRACK_STOPPED:()=>_i,DAILY_EVENT_TRANSCRIPTION_ERROR:()=>Si,DAILY_EVENT_TRANSCRIPTION_MSG:()=>Oi,DAILY_EVENT_TRANSCRIPTION_STARTED:()=>yi,DAILY_EVENT_TRANSCRIPTION_STOPPED:()=>bi,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:()=>fi,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:()=>vi,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:()=>mi,DAILY_FATAL_ERROR_CONNECTION:()=>Ur,DAILY_FATAL_ERROR_EJECTED:()=>Dr,DAILY_FATAL_ERROR_EOL:()=>Fr,DAILY_FATAL_ERROR_EXP_ROOM:()=>Nr,DAILY_FATAL_ERROR_EXP_TOKEN:()=>jr,DAILY_FATAL_ERROR_MEETING_FULL:()=>xr,DAILY_FATAL_ERROR_NBF_ROOM:()=>Lr,DAILY_FATAL_ERROR_NBF_TOKEN:()=>Ir,DAILY_FATAL_ERROR_NOT_ALLOWED:()=>Br,DAILY_FATAL_ERROR_NO_ROOM:()=>Rr,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:()=>Pr,DAILY_RECEIVE_SETTINGS_BASE_KEY:()=>Or,DAILY_STATE_ERROR:()=>_r,DAILY_STATE_JOINED:()=>vr,DAILY_STATE_JOINING:()=>mr,DAILY_STATE_LEFT:()=>gr,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:()=>Ns}),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))}j(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&j(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,a;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 c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function P(){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=P.bind(r);return i.listener=n,r.wrapFn=i,i}function L(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;n0&&(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=N(a,c);for(n=0;n=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=0;r--)this.removeListener(e,t[r]);return this},T.prototype.listeners=function(e){return L(this,e,!0)},T.prototype.rawListeners=function(e){return L(this,e,!1)},T.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):I.call(e,t)},T.prototype.listenerCount=I,T.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]};var R=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(R.call(e,n)&&++r&&!R.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 B={"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"},U={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"},q={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"},Y={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class G{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=G.getVersionPrecision(e),i=G.getVersionPrecision(t);let o=Math.max(r,i),s=0;const a=G.map([e,t],(e=>{const t=o-G.getVersionPrecision(e),n=e+new Array(t+1).join(".0");return G.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]{n[t]=e[t]}))}return e}static getBrowserAlias(e){return B[e]}static getBrowserTypeByAlias(e){return U[e]||""}}const J=/version\/(\d+(\.?_?\d+)+)/i,$=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,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=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=G.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=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=G.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=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=G.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=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=G.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=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=G.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=G.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=G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:G.getFirstMatch(t,e),version:G.getSecondMatch(t,e)}}}];var W=[{test:[/Roku\/DVP/],describe(e){const t=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:q.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:q.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=G.getWindowsVersionName(t);return{name:q.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:q.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(t),r={name:q.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:q.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=G.getAndroidVersionName(t),r={name:q.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:q.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||G.getFirstMatch(/\bbb(\d+)/i,e);return{name:q.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:q.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:q.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:q.Linux})},{test:[/CrOS/],describe:()=>({name:q.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:q.PlayStation4,version:t}}}],z=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=G.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=G.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})}],H=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:Y.Blink};const t=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Y.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Y.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:Y.Presto},n=G.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:Y.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Y.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:Y.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Q{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=G.find($,(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=G.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=G.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.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=G.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.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.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=G.find(e,(e=>this.isOS(e)));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const r=G.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=G.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=G.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(G.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 K{static getParser(e,t=!1){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new Q(e,t)}static parse(e){return new Q(e).getResult()}static get BROWSER_MAP(){return U}static get ENGINE_MAP(){return Y}static get OS_MAP(){return q}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,t){return null!=t&&t.proxyUrl?t.proxyUrl+("/"===t.proxyUrl.slice(-1)?"":"/")+e.substring(8):e}function te(e){return null!=e&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:ee("https://c.daily.co/call-machine/versioned/".concat("0.72.2","/static/call-machine-object-bundle.js"),e)}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;tfunction(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 ge(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=_e(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 _e(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=_e(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=_e(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++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""}}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{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 De(){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&&Pe((()=>{Ee.console[n](`Sentry Logger [${n}]:`,...t)}))}})):Oe.forEach((e=>{t[e]=()=>{}})),t}let Le;Le="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?ke("logger",De):De();const Ie=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ne(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 je(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}class Re 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{Be(i,r)}catch(e){}e[t]=i}function Fe(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function Be(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,Fe(e,"__sentry_original__",t)}function Ue(e){return e.__sentry_original__}function Ve(e){if(ie(e))return{message:e.message,name:e.name,stack:e.stack,...Ye(e)};if(de(e)){const t={type:e.type,target:qe(e.target),currentTarget:qe(e.currentTarget),...Ye(e)};return"undefined"!=typeof CustomEvent&&pe(e,CustomEvent)&&(t.detail=e.detail),t}return e}function qe(e){try{return"undefined"!=typeof Element&&pe(e,Element)?Me(e):Object.prototype.toString.call(e)}catch(e){return""}}function Ye(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 Ge(e){return Je(e,new Map)}function Je(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]=Je(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(Je(e,t))})),r}return e}const $e="";function We(e){try{return e&&"function"==typeof e&&e.name||$e}catch(e){return $e}}const ze=we();function He(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const Qe=we(),Ke=we(),Xe="__sentry_xhr_v2__",Ze={},et={};function tt(e){if(!et[e])switch(et[e]=!0,e){case"console":"console"in Ke&&Oe.forEach((function(e){e in Ke.console&&xe(Ke.console,e,(function(t){return function(...n){rt("console",{args:n,level:e}),t&&t.apply(Ke.console,n)}}))}));break;case"dom":!function(){if(!("document"in Ke))return;const e=rt.bind(null,"dom"),t=ut(e,!0);Ke.document.addEventListener("click",t,!1),Ke.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=Ke[t]&&Ke[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 Ke))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 ze))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(He(ze.fetch))return!0;let e=!1;const t=ze.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=He(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&xe(Ke,"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(Ke,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=Qe.chrome,t=e&&e.app&&e.app.runtime,n="history"in Qe&&!!Qe.history.pushState&&!!Qe.history.replaceState;return!t&&n}())return;const e=Ke.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)}}Ke.onpopstate=function(...t){const n=Ke.location.href,r=st;if(st=n,rt("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},xe(Ke.history,"pushState",t),xe(Ke.history,"replaceState",t)}();break;case"error":dt=Ke.onerror,Ke.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)},Ke.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":ht=Ke.onunhandledrejection,Ke.onunhandledrejection=function(e){return rt("unhandledrejection",e),!(ht&&!ht.__SENTRY_LOADER__)||ht.apply(this,arguments)},Ke.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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__)&&Le.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=Ke.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||"":n||""}function vt(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 gt(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 _t(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=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},Pt="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,t.require("perf_hooks")).performance}catch(t){return}var t}(),Dt=void 0===Pt?Ot:{nowSeconds:()=>(Pt.timeOrigin+Pt.now())/1e3},Lt=Ot.nowSeconds.bind(Ot),It=Dt.nowSeconds.bind(Dt);function Nt(e,t=[]){return[e,t]}function jt(e,t){const[n,r]=e;return[n,[...r,t]]}function Rt(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 Bt(e,t){const n="string"==typeof e.data?xt(e.data,t):e.data;return[Ge({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=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 $t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Ht()}static clone(e){const t=new $t;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&&Jt(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 $t?t:this}return e instanceof $t?(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=Ht(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Lt(),...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&&Le.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 zt(e){Wt().push(e)}function Ht(){return{traceId:pt(),spanId:pt().substring(16),sampled:!1}}const Qt=4,Kt=100;class Xt{constructor(e,t=new $t,n=Qt){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version{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=Kt}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const s={timestamp:Lt(),...e},a=i?Pe((()=>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__)&&Le.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||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),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){let t={};"ok"===e.status&&(t={status:"exited"}),Jt(e,t)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=Gt}=n&&n.getOptions()||{},{userAgent:o}=Ee.navigator||{},s=function(e){const t=It(),n={sid:pt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Ge({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&&Jt(n,e),n}({release:r,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),a=t.getSession&&t.getSession();return a&&"ok"===a.status&&Jt(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__)&&Le.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(Qt)||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(zt,tn),on.push(e.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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=Ie.exec(e);if(!t)return void console.error(`Invalid Sentry Dsn: ${e}`);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 je({host:o,pass:i,path:c,projectId:l,port:s,protocol:n,publicKey:r})}(e):je(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]&&(Le.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(Le.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(Le.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Le.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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(_t(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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(t.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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__)&&Le.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Jt(e,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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__)&&Le.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=qt(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:Ne(r)},...i&&{trace:Ge({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Nt(s,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=jt(n,Bt(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=qt(n);return Nt({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Ne(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__)&&Le.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)&&(Jt(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||Lt()},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:Gt),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=$t.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=Ge({environment:r.environment||Gt,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?Le.log(t.message):Le.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return kt(new Re("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 Re(`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 Re("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 Re(n);return e}),(e=>{throw new Re(`${t} rejected with ${e}`)}));if(!ue(e)&&null!==e)throw new Re(n);return e}(i,c)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,e),new Re(`${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 Re)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Re(`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__)&&Le.error("Error while sending event:",e)}));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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.lengthn(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(Rt(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=Nt(i[0],o),a=t=>{Rt(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__)&&Le.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)?Yt: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 Re)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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 vn;class gn{constructor(){gn.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=gn.id}setupOnce(){vn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ue(this)||this;return vn.apply(t,e)}}catch(e){}}}gn.__initStatic();const _n=[/^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?[]:_n],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__)&&Le.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__)&&Le.error(`Cannot extract message for event ${mt(e)}`),[]}}return[]}(e).some((e=>ve(e,t)))}(e,t.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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&&ve(n,t)}(e,t.ignoreTransactions)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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&&ve(n,t)}(e,t.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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||ve(n,t)}(e,t.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.error(`Cannot extract url for event ${mt(e)}`),null}}bn.__initStatic();var En=Object.freeze({__proto__:null,FunctionToString:gn,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(Ue(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&&(vt(e,void 0,void 0),gt(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){}Be(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:Dn(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(Pn.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const Pn=/Minified React error #\d+;/i;function Dn(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Ln(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=In(e,s,n,r),vt(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:Nn(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),gt(o,{synthetic:!0}),o):(o=In(e,t,n,r),vt(o,`${t}`,void 0),gt(o,{synthetic:!0}),o)}function In(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 Nn(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 jn="Breadcrumbs";class Rn{static __initStatic(){this.id=jn}__init(){this.name=Rn.id}constructor(e){Rn.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__)&&Le.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=""}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",Bn),this.options.history&&nt("history",Un)}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{"hidden"===wn.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=Ln(e,t,n&&n.syntheticException||void 0,r);return gt(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=In(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(jn);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(e),super.sendEvent(e,t)}captureUserFeedback(e){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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:Ne(r)}},o=function(e){return[{type:"user_report"},e]}(e);return Nt(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__)&&Le.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.log("Sending outcomes:",e);const t=(n=e,Nt((r=this._options.tunnel&&Ne(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:Lt(),discarded_events:n}]]));var n,r;this._sendEnvelope(t)}}let qn;function Yn(e,t=function(){if(qn)return qn;if(He(wn.fetch))return qn=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__)&&Le.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return qn=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 qn=void 0,n-=o,r--,kt(e)}}))}class Gn{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Gn.id}__init2(){this._installFunc={onerror:Jn,onunhandledrejection:$n}}constructor(e){Gn.prototype.__init.call(this),Gn.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__)&&Le.log(`Global Handler attached: ${t}`),r(),this._installFunc[n]=void 0)}var t}}function Jn(){nt("error",(e=>{const[t,n,r]=Hn();if(!t.getIntegration(Gn))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(Ln(n,c||i,void 0,r,!1),o,s,a);l.level="error",zn(t,c,l,"onerror")}))}function $n(){nt("unhandledrejection",(e=>{const[t,n,r]=Hn();if(!t.getIntegration(Gn))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)}`}]}}:Ln(n,i,void 0,r,!0);o.level="error",zn(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 zn(e,t,n,r){gt(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Hn(){const e=tn(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}Gn.__initStatic();const Qn=["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 Kn{static __initStatic(){this.id="TryCatch"}__init(){this.name=Kn.id}constructor(e){Kn.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:Qn).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=Ue(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)}})))}Kn.__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 ge(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(){zt((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__)&&Le.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;e0&&void 0!==arguments[0]&&arguments[0];return!po()&&!!vo&&(e?!So()&&["Chrome","Firefox"].includes(Eo()):function(){if(So())return!1;var e=Eo();if("Safari"===e){var t=Mo();if(t.major<15||15===t.major&&t.minor<4)return!1}return"Chrome"===e?ko().major>=77:"Firefox"===e?Ao().major>=97:["Chrome","Firefox","Safari"].includes(e)}())}function _o(){if(po())return!1;if(bo())return!1;if("undefined"==typeof AudioWorkletNode)return!1;switch(Eo()){case"Chrome":case"Firefox":return!0;case"Safari":return wo().major>=17}return!1}function yo(){return fo()&&!function(){var e,t=Eo();if(!ho())return!0;switch(t){case"Chrome":return(e=ko()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Ao()).major<91;case"Safari":return(e=Mo()).major<13||13===e.major&&e.minor<1;default:return!0}}()}function bo(){return ho().match(/Linux; Android/)}function So(){var e,t,n=ho(),r=n.match(/Mac/)&&(!po()&&"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)||!!ho().match(/DailyAnd\//)||void 0}function Eo(){if("undefined"!=typeof window){var e=ho();return To()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||Co()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function wo(){switch(Eo()){case"Chrome":return ko();case"Safari":return Mo();case"Firefox":return Ao();case"Edge":return function(){var e=0,t=0;if("undefined"!=typeof window){var n=ho().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}()}}function ko(){var e=0,t=0,n=0,r=0,i=!1;if("undefined"!=typeof window){var o=ho(),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 To(){return!!ho().match(/iPad|iPhone|iPod/i)&&fo()}function Co(){return ho().indexOf("AppleWebKit/605.1.15")>-1}function Mo(){var e=0,t=0,n=0;if("undefined"!=typeof window){var r=ho().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch(e){}else(To()||Co())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Ao(){var e=0,t=0;if("undefined"!=typeof window){var n=ho().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}var Oo=function(){function e(){i(this,e)}return c(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 Po(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 Do(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=t.data,r=t.mergeStrategy,o=void 0===r?jo:r;i(this,e),e._validateMergeStrategy(o),e._validateData(n,o),this.mergeStrategy=o,this.data=n}return c(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===Ro}},{key:"_validateMergeStrategy",value:function(e){if(!xo.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(xo,"]"))}},{key:"_validateData",value:function(e,t){if(!function(e){if(null==e||"object"!==o(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===jo){var r=JSON.parse(n);F(r,e)||console.warn("The meeting session data provided will be modified when serialized.",r,e)}else if(t===Ro)for(var i in e)if(Object.hasOwnProperty.call(e,i)&&void 0!==e[i]){var s=JSON.parse(JSON.stringify(e[i]));F(e[i],s)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",s,e[i])}}catch(e){throw Error("Meeting session data must be serializable to JSON: ".concat(e))}if(n.length>eo)throw Error("Meeting session data is too large (".concat(n.length," characters). Maximum size suppported is ").concat(eo,"."))}}]),e}();function Bo(e,t,n){return Bo=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&&u(i,n.prototype),i},Bo.apply(null,arguments)}function Uo(e){var t="function"==typeof Map?new Map:void 0;return Uo=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 Bo(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},Uo(e)}function Vo(e){var t,n=null===(t=window._daily)||void 0===t?void 0:t.pendings;if(n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}var qo=function(){function e(t){i(this,e),this._currentLoad=null,this._callClientId=t}return c(e,[{key:"load",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Yo(n,(function(){r(!1)}),(function(e,n){n||Vo(t._callClientId),i(e,n)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),Vo(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),e}(),Yo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;i(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}return c(e,[{key:"start",value:function(){var e=this;this._currentAttempt||(this._currentAttempt=new $o(this._dailyConfig,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 $o(e._dailyConfig,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}(),Go=function(){d(t,Uo(Error));var e=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=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}(t);function t(){return i(this,t),e.apply(this,arguments)}return c(t)}(),Jo=2e4,$o=function(){function e(t,n,r){i(this,e),this._loadAttemptImpl=po()||!t.avoidEval?new Wo(t,n,r):new zo(t,n,r)}var t;return c(e,[{key:"start",value:(t=v((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}(),Wo=function(){function e(t,n,r){i(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}var t,n,r,o;return c(e,[{key:"start",value:(o=v((function*(){var e=te(this._dailyConfig);!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)})),function(){return o.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=v((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=v((function*(e){var t=this;this._networkTimeout=setTimeout((function(){t._networkTimedOut=!0,t._failureCallback({msg:"Timed out (>".concat(Jo," ms) when loading call object bundle ").concat(e),type:"timeout"})}),Jo);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Go;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new Go;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 Go||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(e,": ").concat(t),type:t.message})}})),function(e){return n.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(t=v((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}(),zo=function(){function e(t,n,r){i(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=X(),this._networkTimeout=null,this._scriptElement=null}return c(e,[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=te(this._dailyConfig);"object"===("undefined"==typeof document?"undefined":o(document))?this._startLoading(e):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){t._stopLoading(),t._failureCallback({msg:"Timed out (>".concat(Jo," ms) when loading call object bundle ").concat(e),type:"timeout"})}),Jo);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(e.target.src),type:e.message})},r.src=e,n.appendChild(r)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}]),e}(),Ho=function(e,t,n){return!0===Xo(e.local,t,n)},Qo=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]},Ko=function(e,t,n,r){var i=Zo(e,t,n,r);return i&&i.pendingTrack},Xo=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]},es=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function ts(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];re.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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}}}}(ss.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ss.get(r).lastDevicesString&&(ss.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",as)))})).catch((function(){})))}(e):function(e){ls.has(e)||(ls.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){ls.has(e)&&(ls.get(e).lastDevicesString=JSON.stringify(t),us||(us=setInterval(v((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 cs(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)?cs(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}}}}(ls.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ls.get(r).lastDevicesString&&(ls.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}})),3e3)))})))}(e)}function hs(){return po()||void 0!==navigator.mediaDevices.ondevicechange}var ps=new Set;var fs=["result"],ms=["preserveIframe"];function vs(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 gs(e){for(var t=1;t=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 bs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in t){if(!Number.isInteger(t.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(t.minTilesPerPage,".")),!1;if(t.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(e){return $s(e,{allowAllParticipantsKey:!1})},help:Qs({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error("Failed to validate send settings",e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var n;return!!Ws(e)&&(t._preloadCache.inputSettings||(t._preloadCache.inputSettings={}),zs(e,null===(n=t.properties)||void 0===n?void 0:n.dailyConfig),e.audio&&(t._preloadCache.inputSettings.audio=e.audio),e.video&&(t._preloadCache.inputSettings.video=e.video),!0)},help:Hs()},layout:{validate:function(e){return"custom-v1"===e||"browser"===e||"none"===e},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},Is={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)||!po()&&"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(po()?"":" | '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);t1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,Q),f(l(n=H.call(this)),"startListeningForDeviceChanges",(function(){ds(n.handleDeviceChange)})),f(l(n),"stopListeningForDeviceChanges",(function(){!function(e){hs()?function(e){ss.has(e)&&(ss.delete(e),0===ss.size&&as&&(navigator.mediaDevices.removeEventListener("devicechange",as),as=null))}(e):function(e){ls.has(e)&&(ls.delete(e),0===ls.size&&us&&(clearInterval(us),us=null))}(e)}(n.handleDeviceChange)})),f(l(n),"handleDeviceChange",(function(e){e=e.map((function(e){return JSON.parse(JSON.stringify(e))})),n.emitDailyJSEvent({action:"available-devices-updated",availableDevices:e})})),f(l(n),"handleNativeAppStateChange",function(){var e=v((function*(e){if("destroyed"===e)return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield n.destroy());var t="active"===e;n.disableReactNativeAutoDeviceManagement("video")||(t?n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!0):(n.camUnmutedBeforeLosingNativeActiveState=n.localVideo(),n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!1)))}));return function(t){return e.apply(this,arguments)}}()),f(l(n),"handleNativeAudioFocusChange",(function(e){n.disableReactNativeAutoDeviceManagement("audio")||(n._hasNativeAudioFocus=e,n.toggleParticipantAudioBasedOnNativeAudioFocus(),n._hasNativeAudioFocus?n.micUnmutedBeforeLosingNativeAudioFocus&&n.setLocalAudio(!0):(n.micUnmutedBeforeLosingNativeAudioFocus=n.localAudio(),n.setLocalAudio(!1)))})),f(l(n),"handleNativeSystemScreenCaptureStop",(function(){n.stopScreenShare()})),n.strictMode=void 0===o.strictMode||o.strictMode,n.allowMultipleCallInstances=null!==(t=o.allowMultipleCallInstances)&&void 0!==t&&t,Object.keys(Ss).length&&(n._logDuplicateInstanceAttempt(),!n.allowMultipleCallInstances)){if(n.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),n.callClientId=X(),r=l(n),Ss[r.callClientId]=r,window._daily.instances[n.callClientId]={},n._sharedTracks={},window._daily.instances[n.callClientId].tracks=n._sharedTracks,o.dailyJsVersion=Q.version(),n._iframe=e,n._callObjectMode="none"===o.layout&&!n._iframe,n._preloadCache={subscribeToTracksAutomatically:!0,audioDeviceId:null,videoDeviceId:null,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==o.showLocalVideo?n._callObjectMode?console.error("showLocalVideo is not available in call object mode"):n._showLocalVideo=!!o.showLocalVideo:n._showLocalVideo=!0,void 0!==o.showParticipantsBar?n._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):n._showParticipantsBar=!!o.showParticipantsBar:n._showParticipantsBar=!0,void 0!==o.customIntegrations?n._callObjectMode?console.error("customIntegrations is not available in call object mode"):n._customIntegrations=o.customIntegrations:n._customIntegrations={},void 0!==o.customTrayButtons?n._callObjectMode?console.error("customTrayButtons is not available in call object mode"):n._customTrayButtons=o.customTrayButtons:n._customTrayButtons={},void 0!==o.activeSpeakerMode?n._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):n._activeSpeakerMode=!!o.activeSpeakerMode:n._activeSpeakerMode=!1,o.receiveSettings?n._callObjectMode?n._receiveSettings=o.receiveSettings:console.error("receiveSettings is only available in call object mode"):n._receiveSettings={},n.validateProperties(o),n.properties=gs({},o),n._preloadCache.inputSettings||(n._preloadCache.inputSettings={}),o.inputSettings&&o.inputSettings.audio&&(n._preloadCache.inputSettings.audio=o.inputSettings.audio),o.inputSettings&&o.inputSettings.video&&(n._preloadCache.inputSettings.video=o.inputSettings.video),n._callObjectLoader=n._callObjectMode?new qo(n.callClientId):null,n._callState=hr,n._isPreparingToJoin=!1,n._accessState={access:Tr},n._meetingSessionSummary={},n._finalSummaryOfPrevSession={},n._meetingSessionState=ia(ks,n._callObjectMode),n._nativeInCallAudioMode=Es,n._participants={},n._isScreenSharing=!1,n._participantCounts=Ts,n._rmpPlayerState={},n._waitingParticipants={},n._network={threshold:"good",quality:100},n._activeSpeaker={},n._localAudioLevel=0,n._isLocalAudioLevelObserverRunning=!1,n._remoteParticipantsAudioLevel={},n._isRemoteParticipantsAudioLevelObserverRunning=!1,n._maxAppMessageSize=Zi,n._messageChannel=po()?new No:new Lo,n._iframe&&(n._iframe.requestFullscreen?n._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===n._iframe?(n.emitDailyJSEvent({action:qi}),n.sendMessageToCallMachine({action:qi})):(n.emitDailyJSEvent({action:Yi}),n.sendMessageToCallMachine({action:Yi}))})):n._iframe.webkitRequestFullscreen&&n._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===n._iframe?(n.emitDailyJSEvent({action:qi}),n.sendMessageToCallMachine({action:qi})):(n.emitDailyJSEvent({action:Yi}),n.sendMessageToCallMachine({action:Yi}))}))),po()){var s=n.nativeUtils();s.addAudioFocusChangeListener&&s.removeAudioFocusChangeListener&&s.addAppStateChangeListener&&s.removeAppStateChangeListener&&s.addSystemScreenCaptureStopListener&&s.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),n._hasNativeAudioFocus=!0,s.addAudioFocusChangeListener(n.handleNativeAudioFocusChange),s.addAppStateChangeListener(n.handleNativeAppStateChange),s.addSystemScreenCaptureStopListener(n.handleNativeSystemScreenCaptureStop)}return n._callObjectMode&&n.startListeningForDeviceChanges(),n._messageChannel.addListenerForMessagesFromCallMachine(n.handleMessageFromCallMachine,n.callClientId,l(n)),n}return c(Q,[{key:"destroy",value:(z=v((function*(){var e,t;try{yield this.leave()}catch(e){}var n=this._iframe;if(n){var r=n.parentElement;r&&r.removeChild(n)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),po()){var i=this.nativeUtils();i.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),i.removeAppStateChangeListener(this.handleNativeAppStateChange),i.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete Ss[this.callClientId],(null===(e=window)||void 0===e||null===(t=e._daily)||void 0===t?void 0:t.instances)&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=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 Ys(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:"iframe",value:function(){return Ys(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return Vs(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return Vs(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(e,t){for(var n in t){if(!Is[n])throw new Error("unrecognized updateParticipant property ".concat(n));if(Is[n].validate&&!Is[n].validate(t[n],this,this._participants[e]))throw new Error(Is[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:(W=v((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(Vs(this._callObjectMode,"updateWaitingParticipant()"),Rs(this._callState,"updateWaitingParticipant()"),"string"!=typeof t||"object"!==o(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 W.apply(this,arguments)})},{key:"updateWaitingParticipants",value:($=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vs(this._callObjectMode,"updateWaitingParticipants()"),Rs(this._callState,"updateWaitingParticipants()"),"object"!==o(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 $.apply(this,arguments)})},{key:"requestAccess",value:(J=v((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 Vs(this._callObjectMode,"requestAccess()"),Rs(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){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"forceDiscardTrack"in t&&(po()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),t={}):e&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),t={})),this.sendMessageToCallMachine({action:"local-audio",state:e,options:t}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:e}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(e){return this.sendMessageToCallMachine({action:"local-video",state:e}),this}},{key:"getReceiveSettings",value:(G=v((function*(e){var t=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,r=void 0!==n&&n;if(Vs(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(o(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 G.apply(this,arguments)})},{key:"updateReceiveSettings",value:(Y=v((function*(e){var t=this;if(Vs(this._callObjectMode,"updateReceiveSettings()"),!$s(e,{allowAllParticipantsKey:!0}))throw new Error(Qs({allowAllParticipantsKey:!0}));return Rs(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 Y.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=gs({},e.audio.processor);delete d._isDefaultWhenNone,l.audio=gs(gs({},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=gs({},e.video.processor);delete p._isDefaultWhenNone,l.video=gs(gs({},e.video),{},{processor:p})}return l}}},{key:"getInputSettings",value:function(){var e=this;return Ys(),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:(q=v((function*(e){var t=this;return Ys(),Ws(e)?(e&&(this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),zs(e,this.properties.dailyConfig),e.audio&&(this._preloadCache.inputSettings.audio=e.audio),e.video&&(this._preloadCache.inputSettings.video=e.video)),e.video||e.audio?this._callObjectMode&&!this._callMachineInitialized?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()):(console.error(Hs()),Promise.reject(Hs()))})),function(e){return q.apply(this,arguments)})},{key:"setBandwidth",value:function(e){var t=e.kbs,n=e.trackConstraints;if(Ys(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:n}),this}},{key:"getDailyLang",value:function(){var e=this;if(Ys(),this._callMachineInitialized)return new Promise((function(t){e.sendMessageToCallMachine({action:"get-daily-lang"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:"setDailyLang",value:function(e){return Ys(),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[gr,_r].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(V=v((function*(){var e=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),Rs(this._callState,"getMeetingSession()"),new Promise((function(t){e.sendMessageToCallMachine({action:"get-meeting-session"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return V.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return Rs(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";Vs(this._callObjectMode,"setMeetingSessionData()"),Rs(this._callState,"setMeetingSessionData");try{!function(e,t){new Fo({data:e,mergeStrategy:t})}(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:"set-session-data",data:e,mergeStrategy:t})}catch(e){throw 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:po()||!!t&&!!t.thisMeetingOnly},(function(e){delete e.action,delete e.callbackStamp,r(e)}))}))}},{key:"setUserData",value:(U=v((function*(e){var t=this;try{Js(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise((function(n){try{t.sendMessageToCallMachine({action:"set-user-data",userData:e},(function(e){delete e.action,delete e.callbackStamp,n(e)}))}catch(e){throw new Error("Error setting user data: ".concat(e))}}))})),function(e){return U.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("undefined"==typeof AudioWorkletNode&&!po())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:e},(function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:e},(function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(B=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vs(this._callObjectMode,"startCamera()"),Fs(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(t),this.properties=gs(gs({},this.properties),t)}return new Promise((function(t){e.sendMessageToCallMachine({action:"start-camera",properties:js(e.properties,e.callClientId),preloadCache:js(e._preloadCache,e.callClientId)},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return B.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 Ys(),Rs(this._callState,"startCustomTrack()"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise((function(n,r){e._sharedTracks.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 Ys(),Rs(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 Gs(),Bs(this._callMachineInitialized,"setCamera()"),new Promise((function(n){t.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:e},(function(e){n({device:e.device})}))}))}},{key:"setAudioDevice",value:(x=v((function*(e){return Gs(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(e){return x.apply(this,arguments)})},{key:"cycleCamera",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(n){e.sendMessageToCallMachine({action:"cycle-camera",properties:t},(function(e){n({device:e.device})}))}))}},{key:"cycleMic",value:function(){var e=this;return Ys(),new Promise((function(t){e.sendMessageToCallMachine({action:"cycle-mic"},(function(e){t({device:e.device})}))}))}},{key:"getCameraFacingMode",value:function(){var e=this;return Gs(),new Promise((function(t){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(e){t(e.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(R=v((function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,o=e.videoSource;return Ys(),void 0!==i&&(n=i),void 0!==o&&(r=o),n&&(this._preloadCache.audioDeviceId=n,this._sharedTracks.audioDeviceId=n),r&&(this._preloadCache.videoDeviceId=r,this._sharedTracks.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:(j=v((function*(e){var t=this,n=e.outputDeviceId;return Ys(),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 j.apply(this,arguments)})},{key:"getInputDevices",value:(N=v((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 Gs(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(Gs(),[Es,ws].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&xs(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",e)}},{key:"preAuth",value:(I=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vs(this._callObjectMode,"preAuth()"),Fs(this._callState,this._isPreparingToJoin,"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=gs(gs({},this.properties),t),new Promise((function(t,n){e.sendMessageToCallMachine({action:"daily-method-preauth",properties:js(e.properties,e.callClientId),preloadCache:js(e._preloadCache,e.callClientId)},(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 I.apply(this,arguments)})},{key:"load",value:(L=v((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=gs(gs({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(pr),this.emitDailyJSEvent({action:Xr}),this._callObjectMode?new Promise((function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,(function(n){t._bundleLoadTime=n?"no-op":Date.now()-r,t._updateCallState(fr),n&&t.emitDailyJSEvent({action:ei}),e()}),(function(e,r){if(t.emitDailyJSEvent({action:Zr}),!r){t._updateCallState(_r),t.resetMeetingDependentVars();var i={action:Xi,errorMsg:e.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:e,bundleUrl:te(t.properties.dailyConfig)}}};t._maybeSendToSentry(i),t.emitDailyJSEvent(i),n(e.msg)}}))})):(this._iframe.src=ee(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(e,n){t._loadedCallback=function(r){t._callState!==_r?(t._updateCallState(fr),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e()):n(r)}})))}})),function(e){return L.apply(this,arguments)})},{key:"join",value:(D=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();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 console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(t.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=gs(gs({},this.properties),t)}return void 0!==t.showLocalVideo&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!t.showLocalVideo),void 0!==t.showParticipantsBar&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===vr||this._callState===mr?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(mr,!1),this.emitDailyJSEvent({action:ri}),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:js(this.properties,this.callClientId),preloadCache:js(this._preloadCache,this.callClientId)}),new Promise((function(t,r){e._joinedCallback=function(i,o){if(e._callState!==_r){if(e._updateCallState(vr),i)for(var s in i){if(e._callObjectMode){var a=e._callMachine().store;ts(i[s],a),ns(i[s],a),is(i[s],e._participants[s],a)}e._participants[s]=gs({},i[s]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}n&&e.loadCss(e.properties),t(i)}else r(o)}})))})),function(){return D.apply(this,arguments)})},{key:"leave",value:(P=v((function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(t){e._callState===gr||e._callState===_r?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(gr),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:gr}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return P.apply(this,arguments)})},{key:"startScreenShare",value:(O=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Bs(this._callMachineInitialized,"startScreenShare()"),t.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",t.screenVideoSendSettings),t.mediaStream&&(this._sharedTracks.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.emitDailyJSEvent({action:Ki,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:no,captureOptions:t})})),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:no,captureOptions:t})})),function(){return O.apply(this,arguments)})},{key:"stopScreenShare",value:function(){Bs(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(gs({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(gs({action:"local-recording-stop"},e))}},{key:"startLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(gs({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(gs({action:"daily-method-stop-live-streaming"},e))}},{key:"validateDailyConfig",value:function(e){e.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),bo()&&e.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw new Error("encodings must be an Array");if(!ra(e.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var r=0;r=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(e.userId){if("string"!=typeof e.userId)throw new Error("Error starting dial out: userId must be a string");if(e.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}return new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:"dialout-start"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return T.apply(this,arguments)})},{key:"stopDialOut",value:function(e){var t=this;return Rs(this._callState,"stopDialOut()"),new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:"dialout-stop"},e),(function(e){e.error?r(e.error):n(e)}))}))}},{key:"sipCallTransfer",value:(k=v((function*(e){var t=this;if(Rs(this._callState,"sipCallTransfer()"),!e)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return e.useSipRefer=!1,ta(e,"sipCallTransfer"),new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:uo},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return k.apply(this,arguments)})},{key:"sipRefer",value:(w=v((function*(e){var t=this;if(Rs(this._callState,"sipRefer()"),!e)throw new Error("sessionId and toEndPoint are mandatory parameter");return e.useSipRefer=!0,ta(e,"sipRefer"),new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:uo},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return w.apply(this,arguments)})},{key:"sendDTMF",value:(E=v((function*(e){var t=this;return Rs(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(gs({action:"send-dtmf"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return E.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var e=this;return this._callState!==vr?{stats:{latest:{}}}:new Promise((function(t){e.sendMessageToCallMachine({action:"get-calc-stats"},(function(n){t(gs({stats:n.stats},e._network))}))}))}},{key:"testWebsocketConnectivity",value:(S=v((function*(){var e=this;if(Us(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 S.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"!==Eo())&&e.muted&&!ps.has(e.id)}(e,{isLocalScreenVideo:n})}(e,{isLocalScreenVideo:!1})||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(y=v((function*(){var e=this;Ys(),Vs(this._callObjectMode,"testCallQuality()"),Bs(this._callMachineInitialized,"testCallQuality()",null,!0),Fs(this._callState,this._isPreparingToJoin,"testCallQuality()");var t=this._testCallAlreadyInProgress,n=function(n){t||(e._testCallInProgress=n)};if(n(!0),this.needsLoad())try{var i=this._callState;yield this.load(),this._callState=i}catch(e){return n(!1),Promise.reject(e)}return new Promise((function(t){e.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:e.properties.dailyJsVersion},(function(i){var o=i.results,s=o.result,a=r(o,fs);if("failed"===s){var c,l=gs({},a);null!==(c=a.error)&&void 0!==c&&c.details?(a.error.details=JSON.parse(a.error.details),l.error=gs(gs({},l.error),{},{details:gs({},l.error.details)}),l.error.details.duringTest="testCallQuality"):(l.error=l.error?gs({},l.error):{},l.error.details={duringTest:"testCallQuality"}),e._maybeSendToSentry(l)}n(!1),t(gs({result:s},a))}))}))})),function(){return y.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(g=v((function*(e){var t;po()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),t=yield this.testPeerToPeerCallQuality(e)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n})),function(e){return g.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(m=v((function*(e){var t=this;if(Us(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:r},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return m.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){po()?(console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()):(console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"),this.stopTestCallQuality())}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(p=v((function*(e){var t=this;if(Us(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._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-network-connectivity"},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return p.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var e=this;return new Promise((function(t){e._callState===vr?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(Ms))}},{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"!==o(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=_(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 Ys(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return Ys(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return Ys(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){return Rs(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:(h=v((function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===Eo()&&wo().major>115&&wo().major<123&&(t=t.filter((function(e){return"audiooutput"!==e.kind}))),{devices:t.map((function(e){var t=JSON.parse(JSON.stringify(e));if(!po()&&"videoinput"===e.kind&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(null==r||null===(n=r.facingMode)||void 0===n?void 0:n.length)>=1?r.facingMode[0]:void 0}return t}))}}return new Promise((function(t){e.sendMessageToCallMachine({action:"enumerate-devices"},(function(e){t({devices:e.devices})}))}))})),function(){return h.apply(this,arguments)})},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(Rs(this._callState,"sendAppMessage()"),JSON.stringify(e).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:e,to:t}),this}},{key:"addFakeParticipant",value:function(e){return Ys(),Rs(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(gs({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return qs(this._callObjectMode,"setShowNamesMode()"),Ys(),e&&"always"!==e&&"never"!==e?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:e}),this)}},{key:"setShowLocalVideo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return qs(this._callObjectMode,"setShowLocalVideo()"),Ys(),Rs(this._callState,"setShowLocalVideo()"),"boolean"!=typeof e?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:e}),this._showLocalVideo=e,this)}},{key:"showLocalVideo",value:function(){return qs(this._callObjectMode,"showLocalVideo()"),Ys(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return qs(this._callObjectMode,"setShowParticipantsBar()"),Ys(),Rs(this._callState,"setShowParticipantsBar()"),"boolean"!=typeof e?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:e}),this._showParticipantsBar=e,this)}},{key:"showParticipantsBar",value:function(){return qs(this._callObjectMode,"showParticipantsBar()"),Ys(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return Ys(),qs(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(e){return Ys(),qs(this._callObjectMode,"setCustomIntegrations()"),Rs(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(Ys(),qs(this._callObjectMode,"startCustomIntegrations()"),Rs(this._callState,"startCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("startCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:n}),this)}},{key:"stopCustomIntegrations",value:function(e){var t=this;if(Ys(),qs(this._callObjectMode,"stopCustomIntegrations()"),Rs(this._callState,"stopCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:n}),this)}},{key:"customTrayButtons",value:function(){return qs(this._callObjectMode,"customTrayButtons()"),Ys(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(e){return qs(this._callObjectMode,"updateCustomTrayButtons()"),Ys(),Rs(this._callState,"updateCustomTrayButtons()"),Xs(e)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:e}),this._customTrayButtons=e,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(Ps))),this)}},{key:"theme",value:function(){return qs(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(e){var t=this;return qs(this._callObjectMode,"setTheme()"),new Promise((function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=gs({},e),t.sendMessageToCallMachine({action:"set-theme",theme:t.properties.theme});try{t.emitDailyJSEvent({action:Kr,theme:t.properties.theme})}catch(e){console.log("could not emit 'theme-updated'",e)}n(t.properties.theme)}catch(e){r(e)}}))}},{key:"requestFullscreen",value:(u=v((function*(){if(Ys(),this._iframe&&!document.fullscreenElement&&mo())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log("could not make video call fullscreen",e)}})),function(){return u.apply(this,arguments)})},{key:"exitFullscreen",value:function(){Ys(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(a=v((function*(){var e=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(t){e.sendMessageToCallMachine({action:"get-sidebar-view"},(function(e){t(e.view)}))}))})),function(){return a.apply(this,arguments)})},{key:"setSidebarView",value:function(e){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:e}),this)}},{key:"room",value:(s=v((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 s.apply(this,arguments)})},{key:"geo",value:(n=v((function*(){try{var e=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield e.json()).geo}}catch(e){return console.error("geo lookup failed",e),{current:""}}})),function(){return n.apply(this,arguments)})},{key:"setNetworkTopology",value:(t=v((function*(e){var t=this;return Ys(),Rs(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 t.apply(this,arguments)})},{key:"getNetworkTopology",value:(e=v((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 e.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(e){if(Ys(),"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 b.prototype.on.call(this,e,t)}},{key:"once",value:function(e,t){return b.prototype.once.call(this,e,t)}},{key:"off",value:function(e,t){return b.prototype.off.call(this,e,t)}},{key:"validateProperties",value:function(e){for(var t in e){if(!Ls[t])throw new Error("unrecognized property '".concat(t,"'"));if(Ls[t].validate&&!Ls[t].validate(e[t],this))throw new Error("property '".concat(t,"': ").concat(Ls[t].help))}}},{key:"assembleMeetingUrl",value:function(){var e,t,n=gs(gs({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:null!==(e=this.properties.dailyConfig)&&void 0!==e&&e.proxyUrl?encodeURIComponent(null===(t=this.properties.dailyConfig)||void 0===t?void 0:t.proxyUrl):void 0}),r=n.url.match(/\?/)?"&":"?";return n.url+r+Object.keys(Ls).filter((function(e){return Ls[e].queryString&&void 0!==n[e]})).map((function(e){return"".concat(Ls[e].queryString,"=").concat(n[e])})).join("&")}},{key:"needsLoad",value:function(){return[hr,pr,gr,_r].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.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:"handleMessageFromCallMachine",value:function(e){switch(e.action){case Hr:this.sendMessageToCallMachine(gs({action:Qr},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!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.properties.dailyConfig)}};this.sendMessageToCallMachine(t),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case ei:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(e);break;case ii:var n,i=gs({},e);delete i.internal,this._maxAppMessageSize=(null===(n=e.internal)||void 0===n?void 0:n._maxAppMessageSize)||Zi,this._joinedCallback&&(this._joinedCallback(e.participants),this._joinedCallback=null),this.emitDailyJSEvent(i);break;case si:case ai:if(this._callState===gr)return;if(e.participant&&e.participant.session_id){var o=e.participant.local?"local":e.participant.session_id;if(this._callObjectMode){var s=this._callMachine().store;ts(e.participant,s),ns(e.participant,s),is(e.participant,this._participants[o],s)}try{this.maybeParticipantTracksStopped(this._participants[o],e.participant),this.maybeParticipantTracksStarted(this._participants[o],e.participant),this.maybeEventRecordingStopped(this._participants[o],e.participant),this.maybeEventRecordingStarted(this._participants[o],e.participant)}catch(e){console.error("track events error",e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[o])||(this._participants[o]=gs({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case ci:if(e.participant&&e.participant.session_id){var a=this._participants[e.participant.session_id];a&&this.maybeParticipantTracksStopped(a,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case li:F(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case ui:var c={access:e.access};e.awaitingAccess&&(c.awaitingAccess=e.awaitingAccess),F(this._accessState,c)||(this._accessState=c,this.emitDailyJSEvent(e));break;case di:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var l=gs(gs({},e),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(l)}break;case Xi:var u;this._iframe&&!e.preserveIframe&&(this._iframe.src=""),this._updateCallState(_r),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(e.errorMsg),this._loadedCallback=null),e.preserveIframe;var d=r(e,ms);null!=d&&null!==(u=d.error)&&void 0!==u&&u.details&&(d.error.details=JSON.parse(d.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&(this._joinedCallback(null,d),this._joinedCallback=null),this.emitDailyJSEvent(d);break;case oi:this._callState!==_r&&this._updateCallState(gr),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(e);break;case"selected-devices-updated":e.devices&&this.emitDailyJSEvent(e);break;case Fi:var h=e.threshold,p=e.quality;h===this._network.threshold&&p===this._network.quality||(this._network.quality=p,this._network.threshold=h,this.emitDailyJSEvent(e));break;case Ui:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case Vi:e&&void 0!==e.faceCounts&&this.emitDailyJSEvent(e);break;case Ri:var f=e.activeSpeaker;this._activeSpeaker.peerId!==f.peerId&&(this._activeSpeaker.peerId=f.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var m=e.show;this._showLocalVideo=m,this.emitDailyJSEvent({action:e.action,show:m});break;case xi:var v=e.enabled;this._activeSpeakerMode!==v&&(this._activeSpeakerMode=v,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case fi:case mi:case vi:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case Hi:F(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case Qi:if(!F(this._inputSettings,e.inputSettings)){var g=this._getInputSettings();this._inputSettings=e.inputSettings,this._preloadCache.inputSettings={},F(g,this._getInputSettings())||this.emitDailyJSEvent({action:e.action,inputSettings:this._getInputSettings()})}break;case"send-settings-updated":F(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case"local-audio-level":this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case Pi:var _=e.session_id;this._rmpPlayerState[_]=e.playerState,this.emitDailyJSEvent(e);break;case Li:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case Di:var y=e.session_id,b=this._rmpPlayerState[y];b&&this.compareEqualForRMPUpdateEvent(b,e.remoteMediaPlayerState)||(this._rmpPlayerState[y]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(e);break;case hi:var S=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=ia(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||S)&&this.emitDailyJSEvent(e);break;case Ii:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case Ni:case ji:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case Ei:case wi:case ki:case Ti:case Ci:case yi:case bi:case Si:case ti:case ni:case Ai:case Oi:case"test-completed":case Bi:case Mi:case Gi:case Ji:case $i:case Wi:case Ki:case zi:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(e);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(e,t){var n="record";e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:wi}))}},{key:"maybeEventRecordingStarted",value:function(e,t){var n="record";e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:Ei}))}},{key:"maybeEventTrackStopped",value:function(e,t,n,r){e&&("ended"!==e.readyState&&t&&e.id===t.id||this.emitDailyJSEvent({action:_i,track:e,participant:n,type:r}))}},{key:"maybeEventTrackStarted",value:function(e,t,n,r){t&&(e&&"ended"!==e.readyState&&t.id===e.id||this.emitDailyJSEvent({action:gi,track:t,participant:n,type:r}))}},{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{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log("could not emit",e,t)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(e,t){return!(!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 po()?"undefined"==typeof DailyNativeUtils?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(e){this._updateCallState(this._callState,e)}},{key:"_updateCallState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=xs(n,r),o=xs(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=Ts,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Tr},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=ia(ks,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=Zi,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(e){po()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(e){if(po()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(po()&&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.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(e){po()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var e,t;if(po()){var n=null===(e=this._callMachine())||void 0===e||null===(t=e.store)||void 0===t?void 0:t.getState();for(var r in null==n?void 0:n.streams){var i=n.streams[r];i&&i.pendingTrack&&"audio"===i.pendingTrack.kind&&(i.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:"absoluteUrl",value:function(e){if(void 0!==e){var t=document.createElement("a");return t.href=e,t.href}}},{key:"sayHello",value:function(){var e="hello, world.";return console.log(e),e}},{key:"_logUseAfterDestroy",value:function(){var e=Object.values(Ss)[0];if(this.needsLoad())if(e&&!e.needsLoad()){var t={action:io,level:"error",code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var n={action:io,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var e=0,t=Object.values(Ss);e=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}(Eo(),wo())||po())),supportsSfu:!!yo(),supportsVideoProcessing:go(),supportsAudioProcessing:_o()}}},{key:"version",value:function(){return"0.72.2"}},{key:"createCallObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.layout="none",new Q(null,e)}},{key:"wrap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ys(),!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 Q(e,t)}},{key:"createFrame",value:function(e,t){var n,r;Ys(),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 Q(o,r)}catch(e){throw n.removeChild(o),e}}},{key:"createTransparentFrame",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ys();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"),Q.wrap(t,e)}},{key:"getCallInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?Ss[e]:Object.values(Ss)[0]}}]),Q}();function js(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)n[r]=oo;else if("dailyConfig"===r){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function Rs(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==vr){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)),console.error(n),new Error(n)}}function xs(e,t){return[mr,vr].includes(e)||t}function Fs(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(xs(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function Bs(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",arguments.length>3&&void 0!==arguments[3]&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function Us(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(t),new Error(t)}}function Vs(e){if(!e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function qs(e){if(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(t),new Error(t)}}function Ys(){if(po())throw new Error("This daily-js method is not currently supported in React Native")}function Gs(){if(!po())throw new Error("This daily-js method is only supported in React Native")}function Js(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)||console.warn("The userData provided will be modified when serialized.")}catch(e){throw Error("userData must be serializable to JSON: ".concat(e))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function $s(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);s1||"strength"!==n[0]?(console.error(r),!1):!("number"!=typeof t.strength||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error("".concat(r,"; expected: {0 < strength <= 1}, got: ").concat(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 console.error("failed to deduce blob content type",e),!1}var i=n.split(".").at(-1).toLowerCase().trim();return lo.includes(i)}(e.source)||(console.error("invalid image type; supported types: [".concat(lo.join(", "),"]")),!1)):(t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(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){console.warn("invalid key inputSettings -> video -> processor : ".concat(t)),delete e[t]})),!0}(e.video.processor))||e.audio&&("object"!==o(e.audio)||(n=e.audio.processor,r=["type"],!n||"object"!==o(n)||(Object.keys(n).filter((function(e){return!r.includes(e)})).forEach((function(e){console.warn("invalid key inputSettings -> audio -> processor : ".concat(e)),delete n[e]})),t=n.type,"string"!=typeof t||!Object.values(ao).includes(t)&&(console.error("inputSettings audio processor type invalid"),1)))));var t,n,r}function zs(e,t){var n,r=[];e.video&&!go(null!==(n=null==t?void 0:t.useLegacyVideoProcessor)&&void 0!==n&&n)&&(delete e.video,r.push("video")),e.audio&&!_o()&&(delete e.audio,r.push("audio")),r.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(r.join(", ")))}function Hs(){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 Qs(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [ | ".concat(Or).concat(t?' | "'.concat(Pr,'"'):"","]: ")+'{ [video: [{ layer: [ | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [ | "inherit"] } | "inherit"]] }}}'}function Ks(){return"customIntegrations should be an object of type ".concat(JSON.stringify(Ds),".")}function Xs(e){if(e&&"object"!==o(e)||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Ps),".")),!1;if(e)for(var t=0,n=Object.entries(e);t2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function ra(e,t,n){return!("number"!=typeof e||en)}function ia(e,t){return e&&!t&&delete e.data,e}},980:(e,t)=>{var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.Api=t.HttpClient=t.ContentType=t.AuthenticationType=void 0,function(e){e.OAUTH2="oauth2"}(n||(t.AuthenticationType=n={})),function(e){e.Json="application/json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(r||(t.ContentType=r={}));class i{baseUrl="";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={[r.Json]:e=>null===e||"object"!=typeof e&&"string"!=typeof e?e:JSON.stringify(e),[r.Text]:e=>null!==e&&"string"!=typeof e?JSON.stringify(e):e,[r.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),[r.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:n,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||r.Json],f=s||d.format;return this.customFetch(`${a||this.baseUrl||""}${n}${h?`?${h}`:""}`,{...d,headers:{...d.headers||{},...i&&i!==r.FormData?{"Content-Type":i}:{}},signal:(c?this.createAbortSignal(c):d.signal)||null,body:null==e?null:p(e)}).then((async e=>{const t=e.clone();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=i;t.Api=class extends i{call={callControllerCreate:(e,t={})=>this.request({path:"/call",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),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}),callControllerUpdate:(e,t,n={})=>this.request({path:`/call/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),callControllerDeleteCallData:(e,t={})=>this.request({path:`/call/${e}`,method:"DELETE",secure:!0,format:"json",...t}),callControllerCreatePhoneCall:(e,t={})=>this.request({path:"/call/phone",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),callControllerCreateWebCall:(e,t={})=>this.request({path:"/call/web",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t})};v2={callControllerFindAllPaginated:(e,t={})=>this.request({path:"/v2/call",method:"GET",query:e,secure:!0,format:"json",...t}),callControllerFindAllMetadataPaginated:(e,t={})=>this.request({path:"/v2/call/metadata",method:"GET",query:e,secure:!0,format:"json",...t}),phoneNumberControllerFindAllPaginated:(e,t={})=>this.request({path:"/v2/phone-number",method:"GET",query:e,secure:!0,format:"json",...t})};assistant={assistantControllerCreate:(e,t={})=>this.request({path:"/assistant",method:"POST",body:e,secure:!0,type:r.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,n={})=>this.request({path:`/assistant/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),assistantControllerReplace:(e,t,n={})=>this.request({path:`/assistant/${e}`,method:"PUT",body:t,secure:!0,type:r.Json,format:"json",...n}),assistantControllerRemove:(e,t={})=>this.request({path:`/assistant/${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:r.Json,format:"json",...t}),phoneNumberControllerImportTwilio:(e,t={})=>this.request({path:"/phone-number/import/twilio",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),phoneNumberControllerImportVonage:(e,t={})=>this.request({path:"/phone-number/import/vonage",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),phoneNumberControllerCreate:(e,t={})=>this.request({path:"/phone-number",method:"POST",body:e,secure:!0,type:r.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,n={})=>this.request({path:`/phone-number/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),phoneNumberControllerRemove:(e,t={})=>this.request({path:`/phone-number/${e}`,method:"DELETE",secure:!0,format:"json",...t})};squad={squadControllerCreate:(e,t={})=>this.request({path:"/squad",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),squadControllerFindAll:(e,t={})=>this.request({path:"/squad",method:"GET",query:e,secure:!0,format:"json",...t}),squadControllerFindOne:(e,t={})=>this.request({path:`/squad/${e}`,method:"GET",secure:!0,format:"json",...t}),squadControllerUpdate:(e,t,n={})=>this.request({path:`/squad/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),squadControllerRemove:(e,t={})=>this.request({path:`/squad/${e}`,method:"DELETE",secure:!0,format:"json",...t})};knowledgeBase={knowledgeBaseControllerCreate:(e,t={})=>this.request({path:"/knowledge-base",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),knowledgeBaseControllerFindAll:(e,t={})=>this.request({path:"/knowledge-base",method:"GET",query:e,secure:!0,format:"json",...t}),knowledgeBaseControllerFindOne:(e,t={})=>this.request({path:`/knowledge-base/${e}`,method:"GET",secure:!0,format:"json",...t}),knowledgeBaseControllerUpdate:(e,t={})=>this.request({path:`/knowledge-base/${e}`,method:"PATCH",secure:!0,format:"json",...t}),knowledgeBaseControllerRemove:(e,t={})=>this.request({path:`/knowledge-base/${e}`,method:"DELETE",secure:!0,format:"json",...t})};block={blockControllerCreate:(e,t={})=>this.request({path:"/block",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),blockControllerFindAll:(e,t={})=>this.request({path:"/block",method:"GET",query:e,secure:!0,format:"json",...t}),blockControllerFindOne:(e,t={})=>this.request({path:`/block/${e}`,method:"GET",secure:!0,format:"json",...t}),blockControllerUpdate:(e,t,n={})=>this.request({path:`/block/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),blockControllerRemove:(e,t={})=>this.request({path:`/block/${e}`,method:"DELETE",secure:!0,format:"json",...t})};tool={toolControllerCreate:(e,t={})=>this.request({path:"/tool",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),toolControllerFindAll:(e,t={})=>this.request({path:"/tool",method:"GET",query:e,secure:!0,format:"json",...t}),toolControllerFindOne:(e,t={})=>this.request({path:`/tool/${e}`,method:"GET",secure:!0,format:"json",...t}),toolControllerUpdate:(e,t,n={})=>this.request({path:`/tool/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),toolControllerRemove:(e,t={})=>this.request({path:`/tool/${e}`,method:"DELETE",secure:!0,format:"json",...t})};file={fileControllerCreateDeprecated:(e,t={})=>this.request({path:"/file/upload",method:"POST",body:e,secure:!0,type:r.FormData,format:"json",...t}),fileControllerCreate:(e,t={})=>this.request({path:"/file",method:"POST",body:e,secure:!0,type:r.FormData,format:"json",...t}),fileControllerFindAll:(e={})=>this.request({path:"/file",method:"GET",secure:!0,format:"json",...e}),fileControllerFindOne:(e,t={})=>this.request({path:`/file/${e}`,method:"GET",secure:!0,format:"json",...t}),fileControllerUpdate:(e,t,n={})=>this.request({path:`/file/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),fileControllerRemove:(e,t={})=>this.request({path:`/file/${e}`,method:"DELETE",secure:!0,format:"json",...t})};metrics={analyticsControllerFindAllDeprecated:(e,t={})=>this.request({path:"/metrics",method:"GET",query:e,secure:!0,format:"json",...t})};analytics={analyticsControllerQuery:(e,t={})=>this.request({path:"/analytics",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),analyticsControllerGetQuery:(e,t={})=>this.request({path:"/analytics",method:"GET",body:e,secure:!0,type:r.Json,format:"json",...t})};log={loggingControllerGetCallLogs:(e,t={})=>this.request({path:"/log",method:"GET",query:e,secure:!0,format:"json",...t})};logs={loggingControllerQueryLogs:(e,t={})=>this.request({path:"/logs",method:"GET",query:e,secure:!0,format:"json",...t})};chat={chatControllerChat:(e,t={})=>this.request({path:"/chat",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t})};credential={credentialControllerCreate:(e,t={})=>this.request({path:"/credential",method:"POST",body:e,secure:!0,type:r.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}),credentialControllerRemove:(e,t={})=>this.request({path:`/credential/${e}`,method:"DELETE",secure:!0,format:"json",...t})};provider={providerControllerGetWorkflows:(e,t,n={})=>this.request({path:`/${e}/workflows`,method:"GET",query:t,secure:!0,format:"json",...n}),providerControllerGetWorkflowTriggerHook:(e,t,n={})=>this.request({path:`/${e}/workflows/${t}/hooks`,method:"GET",secure:!0,format:"json",...n}),providerControllerGetLocations:(e,t={})=>this.request({path:`/${e}/locations`,method:"GET",secure:!0,format:"json",...t}),voiceProviderControllerSearchVoices:(e,t,n={})=>this.request({path:`/${e}/voices/search`,method:"GET",query:t,secure:!0,format:"json",...n}),voiceProviderControllerSearchVoice:(e,t,n={})=>this.request({path:`/${e}/voice/search`,method:"GET",query:t,secure:!0,format:"json",...n}),voiceProviderControllerAddVoices:(e,t,n={})=>this.request({path:`/${e}/voices/add`,method:"POST",body:t,secure:!0,type:r.Json,format:"json",...n}),voiceProviderControllerAddVoice:(e,t,n={})=>this.request({path:`/${e}/voice/add`,method:"POST",body:t,secure:!0,type:r.Json,format:"json",...n})};v11Labs={voiceProviderControllerCloneVoices:(e,t={})=>this.request({path:"/11labs/voice/clone",method:"POST",body:e,secure:!0,type:r.FormData,...t})};token={tokenControllerCreate:(e,t={})=>this.request({path:"/token",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),tokenControllerFindAll:(e,t={})=>this.request({path:"/token",method:"GET",query:e,secure:!0,format:"json",...t}),tokenControllerFindOne:(e,t={})=>this.request({path:`/token/${e}`,method:"GET",secure:!0,format:"json",...t}),tokenControllerUpdate:(e,t,n={})=>this.request({path:`/token/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),tokenControllerRemove:(e,t={})=>this.request({path:`/token/${e}`,method:"DELETE",secure:!0,format:"json",...t})};voiceLibrary={voiceLibraryControllerVoiceGetByProvider:(e,t,n={})=>this.request({path:`/voice-library/${e}`,method:"GET",query:t,secure:!0,format:"json",...n}),voiceLibraryControllerVoiceGetAccentsByProvider:(e,t={})=>this.request({path:`/voice-library/${e}/accents`,method:"GET",secure:!0,format:"json",...t}),voiceLibraryControllerVoiceLibrarySyncByProvider:(e,t={})=>this.request({path:`/voice-library/sync/${e}`,method:"POST",secure:!0,format:"json",...t}),voiceLibraryControllerVoiceLibrarySyncDefaultVoices:(e,t={})=>this.request({path:"/voice-library/sync",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t})}}},145:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.client=void 0;const r=new(n(980).Api)({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async e=>{if(e)return{headers:{Authorization:`Bearer ${e}`}}}});t.client=r},112: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(473)),o=r(n(7)),s=n(145);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;dailyCallConfig={};dailyCallObject={};constructor(e,t,n,r){super(),s.client.baseUrl=t??"https://api.vapi.ai",s.client.setSecurityData(e),this.dailyCallConfig=n??{},this.dailyCallObject=r??{}}cleanup(){this.started=!1,this.call?.destroy(),this.call=null,this.speakingTimeout=null}isMobileDevice(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent;return/android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(e.toLowerCase())}async sleep(e){return new Promise((t=>setTimeout(t,e)))}async start(e,t,n){if(!e&&!n)throw new Error("Assistant or Squad must be provided.");if(this.started)return null;this.started=!0;try{const r=(await s.client.call.callControllerCreateWebCall({assistant:"string"==typeof e?void 0:e,assistantId:"string"==typeof e?e:void 0,assistantOverrides:t,squad:"string"==typeof n?void 0:n,squadId:"string"==typeof n?n:void 0})).data;this.call&&this.cleanup();const o=r?.artifactPlan?.videoRecordingEnabled??!1,c=r.transport?.assistantVideoEnabled??!1;if(this.call=i.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??o,dailyConfig:this.dailyCallConfig}),this.call.iframe()?.style.setProperty("display","none"),this.call.on("left-meeting",(()=>{this.emit("call-end"),o&&this.call?.stopRecording(),this.cleanup()})),this.call.on("error",(e=>{this.emit("error",e),o&&this.call?.stopRecording()})),this.call.on("camera-error",(e=>{this.emit("error",e)})),this.call.on("track-started",(async e=>{e&&e.participant&&(e.participant?.local||"Vapi Speaker"===e.participant?.user_name&&("video"===e.track.kind&&this.emit("video",e.track),"audio"===e.track.kind&&await a(e.track,e.participant.session_id),this.call?.sendAppMessage("playable")))})),this.call.on("participant-joined",(e=>{e&&this.call&&function(e,t,n,r){e.participant.local||t.updateParticipant(e.participant.session_id,{setSubscribedTracks:{audio:!0,video:n||r}})}(e,this.call,o,c)})),this.call.on("participant-updated",(e=>{e&&this.emit("daily-participant-updated",e.participant)})),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.isMobileDevice()&&await this.sleep(1e3),await this.call.join({url:r.webCallUrl,subscribeToTracksAutomatically:!1}),o){const e=(new Date).getTime();this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}}),this.call.on("recording-started",(()=>{this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:((new Date).getTime()-e)/1e3})}))}return 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.on("nonfatal-error",(e=>{"audio-processor-error"===e?.type&&this.call?.updateInputSettings({audio:{processor:{type:"none"}}}).then((()=>{this.call?.setLocalAudio(!0)}))})),this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}}),r}catch(e){return console.error(e),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){console.log("Error parsing message data: ",e)}}catch(e){console.error(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){if(!this.call)throw new Error("Call object is not available.");this.call.setLocalAudio(!e)}isMuted(){return!!this.call&&!1===this.call.localAudio()}say(e,t){this.send({type:"say",message:e,endCallAfterSpoken:t})}setInputDevicesAsync(e){this.call?.setInputDevicesAsync(e)}setOutputDeviceAsync(e){this.call?.setOutputDeviceAsync(e)}getDailyCallObject(){return this.call}startScreenSharing(e,t){this.call?.startScreenShare({displayMediaOptions:e,screenVideoSendSettings:t})}stopScreenSharing(){this.call?.stopScreenShare()}}},7: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,l;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 u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}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;n0&&(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=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=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):[]}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.d(r,{default:()=>o});var i=n(112);const o=n.n(i)();return r=r.default})())); \ No newline at end of file diff --git a/dist/2.2.0/vapi-web-bundle-2.2.0.min.js.LICENSE.txt b/dist/2.2.0/vapi-web-bundle-2.2.0.min.js.LICENSE.txt new file mode 100644 index 0000000..d243640 --- /dev/null +++ b/dist/2.2.0/vapi-web-bundle-2.2.0.min.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*! + * Bowser - a browser detector + * /~https://github.com/lancedikson/bowser + * MIT License | (c) Dustin Diaz 2012-2015 + * MIT License | (c) Denis Demchenko 2015-2019 + */ diff --git a/dist/latest/vapi-web-bundle.js b/dist/latest/vapi-web-bundle.js index a5f8d37..4bd7f2d 100644 --- a/dist/latest/vapi-web-bundle.js +++ b/dist/latest/vapi-web-bundle.js @@ -36,7 +36,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac \***********************************************/ /***/ ((__unused_webpack_module, exports) => { -eval("\n/* eslint-disable */\n/* tslint:disable */\n/*\n * ---------------------------------------------------------------\n * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##\n * ## ##\n * ## AUTHOR: acacode ##\n * ## SOURCE: /~https://github.com/acacode/swagger-typescript-api ##\n * ---------------------------------------------------------------\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Api = exports.HttpClient = exports.ContentType = void 0;\nvar ContentType;\n(function (ContentType) {\n ContentType[\"Json\"] = \"application/json\";\n ContentType[\"FormData\"] = \"multipart/form-data\";\n ContentType[\"UrlEncoded\"] = \"application/x-www-form-urlencoded\";\n ContentType[\"Text\"] = \"text/plain\";\n})(ContentType || (exports.ContentType = ContentType = {}));\nclass HttpClient {\n baseUrl = '';\n securityData = null;\n securityWorker;\n abortControllers = new Map();\n customFetch = (...fetchParams) => fetch(...fetchParams);\n baseApiParams = {\n credentials: 'same-origin',\n headers: {},\n redirect: 'follow',\n referrerPolicy: 'no-referrer',\n };\n constructor(apiConfig = {}) {\n Object.assign(this, apiConfig);\n }\n setSecurityData = (data) => {\n this.securityData = data;\n };\n encodeQueryParam(key, value) {\n const encodedKey = encodeURIComponent(key);\n return `${encodedKey}=${encodeURIComponent(typeof value === 'number' ? value : `${value}`)}`;\n }\n addQueryParam(query, key) {\n return this.encodeQueryParam(key, query[key]);\n }\n addArrayQueryParam(query, key) {\n const value = query[key];\n return value.map((v) => this.encodeQueryParam(key, v)).join('&');\n }\n toQueryString(rawQuery) {\n const query = rawQuery || {};\n const keys = Object.keys(query).filter((key) => 'undefined' !== typeof query[key]);\n return keys\n .map((key) => Array.isArray(query[key])\n ? this.addArrayQueryParam(query, key)\n : this.addQueryParam(query, key))\n .join('&');\n }\n addQueryParams(rawQuery) {\n const queryString = this.toQueryString(rawQuery);\n return queryString ? `?${queryString}` : '';\n }\n contentFormatters = {\n [ContentType.Json]: (input) => input !== null && (typeof input === 'object' || typeof input === 'string')\n ? JSON.stringify(input)\n : input,\n [ContentType.Text]: (input) => input !== null && typeof input !== 'string'\n ? JSON.stringify(input)\n : input,\n [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {\n const property = input[key];\n if (Array.isArray(property)) {\n property.forEach((item) => {\n formData.append(key, item instanceof Blob || item instanceof File\n ? item\n : typeof item === 'object' && item !== null\n ? JSON.stringify(item)\n : `${item}`);\n });\n }\n else {\n formData.append(key, property instanceof Blob || property instanceof File\n ? property\n : typeof property === 'object' && property !== null\n ? JSON.stringify(property)\n : `${property}`);\n }\n return formData;\n }, new FormData()),\n [ContentType.UrlEncoded]: (input) => this.toQueryString(input),\n };\n mergeRequestParams(params1, params2) {\n return {\n ...this.baseApiParams,\n ...params1,\n ...(params2 || {}),\n headers: {\n ...(this.baseApiParams.headers || {}),\n ...(params1.headers || {}),\n ...((params2 && params2.headers) || {}),\n },\n };\n }\n createAbortSignal = (cancelToken) => {\n if (this.abortControllers.has(cancelToken)) {\n const abortController = this.abortControllers.get(cancelToken);\n if (abortController) {\n return abortController.signal;\n }\n return void 0;\n }\n const abortController = new AbortController();\n this.abortControllers.set(cancelToken, abortController);\n return abortController.signal;\n };\n abortRequest = (cancelToken) => {\n const abortController = this.abortControllers.get(cancelToken);\n if (abortController) {\n abortController.abort();\n this.abortControllers.delete(cancelToken);\n }\n };\n request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {\n const secureParams = ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) &&\n this.securityWorker &&\n (await this.securityWorker(this.securityData))) ||\n {};\n const requestParams = this.mergeRequestParams(params, secureParams);\n const queryString = query && this.toQueryString(query);\n const payloadFormatter = this.contentFormatters[type || ContentType.Json];\n const responseFormat = format || requestParams.format;\n return this.customFetch(`${baseUrl || this.baseUrl || ''}${path}${queryString ? `?${queryString}` : ''}`, {\n ...requestParams,\n headers: {\n ...(requestParams.headers || {}),\n ...(type && type !== ContentType.FormData\n ? { 'Content-Type': type }\n : {}),\n },\n signal: (cancelToken\n ? this.createAbortSignal(cancelToken)\n : requestParams.signal) || null,\n body: typeof body === 'undefined' || body === null\n ? null\n : payloadFormatter(body),\n }).then(async (response) => {\n const r = response.clone();\n r.data = null;\n r.error = null;\n const data = !responseFormat\n ? r\n : await response[responseFormat]()\n .then((data) => {\n if (r.ok) {\n r.data = data;\n }\n else {\n r.error = data;\n }\n return r;\n })\n .catch((e) => {\n r.error = e;\n return r;\n });\n if (cancelToken) {\n this.abortControllers.delete(cancelToken);\n }\n if (!response.ok)\n throw data;\n return data;\n });\n };\n}\nexports.HttpClient = HttpClient;\n/**\n * @title Vapi API\n * @version 1.0\n * @contact\n *\n * API for building voice assistants\n */\nclass Api extends HttpClient {\n call = {\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerCreate\n * @summary Create Call\n * @request POST:/call\n * @secure\n */\n callControllerCreate: (data, params = {}) => this.request({\n path: `/call`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerFindAll\n * @summary List Calls\n * @request GET:/call\n * @secure\n */\n callControllerFindAll: (query, params = {}) => this.request({\n path: `/call`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerFindOne\n * @summary Get Call\n * @request GET:/call/{id}\n * @secure\n */\n callControllerFindOne: (id, params = {}) => this.request({\n path: `/call/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerUpdate\n * @summary Update Call\n * @request PATCH:/call/{id}\n * @secure\n */\n callControllerUpdate: (id, data, params = {}) => this.request({\n path: `/call/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerDeleteCallData\n * @summary Delete Call Data\n * @request DELETE:/call/{id}\n * @secure\n */\n callControllerDeleteCallData: (id, params = {}) => this.request({\n path: `/call/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerCreatePhoneCall\n * @summary Create Phone Call\n * @request POST:/call/phone\n * @secure\n */\n callControllerCreatePhoneCall: (data, params = {}) => this.request({\n path: `/call/phone`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerCreateWebCall\n * @summary Create Web Call\n * @request POST:/call/web\n * @secure\n */\n callControllerCreateWebCall: (data, params = {}) => this.request({\n path: `/call/web`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n v2 = {\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerFindAllPaginated\n * @summary List Calls\n * @request GET:/v2/call\n * @secure\n */\n callControllerFindAllPaginated: (query, params = {}) => this.request({\n path: `/v2/call`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n assistant = {\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerCreate\n * @summary Create Assistant\n * @request POST:/assistant\n * @secure\n */\n assistantControllerCreate: (data, params = {}) => this.request({\n path: `/assistant`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerFindAll\n * @summary List Assistants\n * @request GET:/assistant\n * @secure\n */\n assistantControllerFindAll: (query, params = {}) => this.request({\n path: `/assistant`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerFindOne\n * @summary Get Assistant\n * @request GET:/assistant/{id}\n * @secure\n */\n assistantControllerFindOne: (id, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerUpdate\n * @summary Update Assistant\n * @request PATCH:/assistant/{id}\n * @secure\n */\n assistantControllerUpdate: (id, data, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants, extended\n * @name AssistantControllerReplace\n * @summary Replace Assistant\n * @request PUT:/assistant/{id}\n * @secure\n */\n assistantControllerReplace: (id, data, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'PUT',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerRemove\n * @summary Delete Assistant\n * @request DELETE:/assistant/{id}\n * @secure\n */\n assistantControllerRemove: (id, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n phoneNumber = {\n /**\n * No description\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerBuy\n * @summary Buy Phone Number\n * @request POST:/phone-number/buy\n * @secure\n */\n phoneNumberControllerBuy: (data, params = {}) => this.request({\n path: `/phone-number/buy`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * @description Use POST /phone-number instead.\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerImportTwilio\n * @summary Import Twilio Number\n * @request POST:/phone-number/import/twilio\n * @deprecated\n * @secure\n */\n phoneNumberControllerImportTwilio: (data, params = {}) => this.request({\n path: `/phone-number/import/twilio`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * @description Use POST /phone-number instead.\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerImportVonage\n * @summary Import Vonage Number\n * @request POST:/phone-number/import/vonage\n * @deprecated\n * @secure\n */\n phoneNumberControllerImportVonage: (data, params = {}) => this.request({\n path: `/phone-number/import/vonage`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerCreate\n * @summary Create Phone Number\n * @request POST:/phone-number\n * @secure\n */\n phoneNumberControllerCreate: (data, params = {}) => this.request({\n path: `/phone-number`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerFindAll\n * @summary List Phone Numbers\n * @request GET:/phone-number\n * @secure\n */\n phoneNumberControllerFindAll: (query, params = {}) => this.request({\n path: `/phone-number`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerFindOne\n * @summary Get Phone Number\n * @request GET:/phone-number/{id}\n * @secure\n */\n phoneNumberControllerFindOne: (id, params = {}) => this.request({\n path: `/phone-number/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerUpdate\n * @summary Update Phone Number\n * @request PATCH:/phone-number/{id}\n * @secure\n */\n phoneNumberControllerUpdate: (id, data, params = {}) => this.request({\n path: `/phone-number/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerRemove\n * @summary Delete Phone Number\n * @request DELETE:/phone-number/{id}\n * @secure\n */\n phoneNumberControllerRemove: (id, params = {}) => this.request({\n path: `/phone-number/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n file = {\n /**\n * @description Use POST /file instead.\n *\n * @tags Files, extended\n * @name FileControllerCreateDeprecated\n * @summary Upload File\n * @request POST:/file/upload\n * @deprecated\n * @secure\n */\n fileControllerCreateDeprecated: (data, params = {}) => this.request({\n path: `/file/upload`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.FormData,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerCreate\n * @summary Upload File\n * @request POST:/file\n * @secure\n */\n fileControllerCreate: (data, params = {}) => this.request({\n path: `/file`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.FormData,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerFindAll\n * @summary List Files\n * @request GET:/file\n * @secure\n */\n fileControllerFindAll: (params = {}) => this.request({\n path: `/file`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerFindOne\n * @summary Get File\n * @request GET:/file/{id}\n * @secure\n */\n fileControllerFindOne: (id, params = {}) => this.request({\n path: `/file/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerUpdate\n * @summary Update File\n * @request PATCH:/file/{id}\n * @secure\n */\n fileControllerUpdate: (id, data, params = {}) => this.request({\n path: `/file/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerRemove\n * @summary Delete File\n * @request DELETE:/file/{id}\n * @secure\n */\n fileControllerRemove: (id, params = {}) => this.request({\n path: `/file/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n squad = {\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerCreate\n * @summary Create Squad\n * @request POST:/squad\n * @secure\n */\n squadControllerCreate: (data, params = {}) => this.request({\n path: `/squad`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerFindAll\n * @summary List Squads\n * @request GET:/squad\n * @secure\n */\n squadControllerFindAll: (query, params = {}) => this.request({\n path: `/squad`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerFindOne\n * @summary Get Squad\n * @request GET:/squad/{id}\n * @secure\n */\n squadControllerFindOne: (id, params = {}) => this.request({\n path: `/squad/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerUpdate\n * @summary Update Squad\n * @request PATCH:/squad/{id}\n * @secure\n */\n squadControllerUpdate: (id, data, params = {}) => this.request({\n path: `/squad/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerRemove\n * @summary Delete Squad\n * @request DELETE:/squad/{id}\n * @secure\n */\n squadControllerRemove: (id, params = {}) => this.request({\n path: `/squad/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n tool = {\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerCreate\n * @summary Create Tool\n * @request POST:/tool\n * @secure\n */\n toolControllerCreate: (data, params = {}) => this.request({\n path: `/tool`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerFindAll\n * @summary List Tools\n * @request GET:/tool\n * @secure\n */\n toolControllerFindAll: (query, params = {}) => this.request({\n path: `/tool`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerFindOne\n * @summary Get Tool\n * @request GET:/tool/{id}\n * @secure\n */\n toolControllerFindOne: (id, params = {}) => this.request({\n path: `/tool/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerUpdate\n * @summary Update Tool\n * @request PATCH:/tool/{id}\n * @secure\n */\n toolControllerUpdate: (id, data, params = {}) => this.request({\n path: `/tool/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerRemove\n * @summary Delete Tool\n * @request DELETE:/tool/{id}\n * @secure\n */\n toolControllerRemove: (id, params = {}) => this.request({\n path: `/tool/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n metrics = {\n /**\n * @description Use GET /metric instead\n *\n * @tags Analytics, extended\n * @name MetricsControllerFindAllDeprecated\n * @summary List Billing Metrics\n * @request GET:/metrics\n * @deprecated\n * @secure\n */\n metricsControllerFindAllDeprecated: (query, params = {}) => this.request({\n path: `/metrics`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n analytics = {\n /**\n * No description\n *\n * @tags Analytics\n * @name MetricsControllerQuery\n * @summary Create Analytics Queries\n * @request POST:/analytics\n * @secure\n */\n metricsControllerQuery: (data, params = {}) => this.request({\n path: `/analytics`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n log = {\n /**\n * No description\n *\n * @tags Call Logs, extended\n * @name LoggingControllerGetLogs\n * @summary List Call Logs\n * @request GET:/log\n * @secure\n */\n loggingControllerGetLogs: (query, params = {}) => this.request({\n path: `/log`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n credential = {\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerCreate\n * @summary Create Credential\n * @request POST:/credential\n * @secure\n */\n credentialControllerCreate: (data, params = {}) => this.request({\n path: `/credential`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerFindAll\n * @summary List Credentials\n * @request GET:/credential\n * @secure\n */\n credentialControllerFindAll: (query, params = {}) => this.request({\n path: `/credential`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerFindOne\n * @summary Get Credential\n * @request GET:/credential/{id}\n * @secure\n */\n credentialControllerFindOne: (id, params = {}) => this.request({\n path: `/credential/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerUpdate\n * @summary Update Credential\n * @request PUT:/credential/{id}\n * @secure\n */\n credentialControllerUpdate: (id, data, params = {}) => this.request({\n path: `/credential/${id}`,\n method: 'PUT',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerRemove\n * @summary Delete Credential\n * @request DELETE:/credential/{id}\n * @secure\n */\n credentialControllerRemove: (id, params = {}) => this.request({\n path: `/credential/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n org = {\n /**\n * No description\n *\n * @tags Orgs, extended\n * @name OrgControllerCreate\n * @summary Create Org\n * @request POST:/org\n * @secure\n */\n orgControllerCreate: (data, params = {}) => this.request({\n path: `/org`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Orgs, extended\n * @name OrgControllerFindAll\n * @summary List Orgs\n * @request GET:/org\n * @secure\n */\n orgControllerFindAll: (params = {}) => this.request({\n path: `/org`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Orgs, extended\n * @name OrgControllerFindOne\n * @summary Get Org\n * @request GET:/org/{id}\n * @secure\n */\n orgControllerFindOne: (id, params = {}) => this.request({\n path: `/org/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Orgs, extended\n * @name OrgControllerUpdate\n * @summary Update Org\n * @request PATCH:/org/{id}\n * @secure\n */\n orgControllerUpdate: (id, data, params = {}) => this.request({\n path: `/org/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Orgs, extended\n * @name OrgControllerFindAllUsers\n * @summary List Users\n * @request GET:/org/{id}/user\n * @secure\n */\n orgControllerFindAllUsers: (id, params = {}) => this.request({\n path: `/org/${id}/user`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Orgs, extended\n * @name OrgControllerOrgLeave\n * @summary Leave Org\n * @request DELETE:/org/{id}/leave\n * @secure\n */\n orgControllerOrgLeave: (id, params = {}) => this.request({\n path: `/org/${id}/leave`,\n method: 'DELETE',\n secure: true,\n ...params,\n }),\n /**\n * No description\n *\n * @tags Orgs, extended\n * @name OrgControllerUserInvite\n * @summary Invite User\n * @request POST:/org/{id}/invite\n * @secure\n */\n orgControllerUserInvite: (id, data, params = {}) => this.request({\n path: `/org/${id}/invite`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n ...params,\n }),\n };\n provider = {\n /**\n * No description\n *\n * @tags Providers, extended\n * @name ProviderControllerGetWorkflows\n * @request GET:/{provider}/workflows\n * @secure\n */\n providerControllerGetWorkflows: (provider, query, params = {}) => this.request({\n path: `/${provider}/workflows`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended\n * @name ProviderControllerGetWorkflowTriggerHook\n * @request GET:/{provider}/workflows/{workflowId}/hooks\n * @secure\n */\n providerControllerGetWorkflowTriggerHook: (provider, workflowId, params = {}) => this.request({\n path: `/${provider}/workflows/${workflowId}/hooks`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended\n * @name ProviderControllerGetLocations\n * @request GET:/{provider}/locations\n * @secure\n */\n providerControllerGetLocations: (provider, params = {}) => this.request({\n path: `/${provider}/locations`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerSearchVoices\n * @summary Search Voice from Provider Voice Library.\n * @request GET:/{provider}/voices/search\n * @deprecated\n * @secure\n */\n voiceProviderControllerSearchVoices: (provider, query, params = {}) => this.request({\n path: `/${provider}/voices/search`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerSearchVoice\n * @summary Search Voice from Provider Voice Library.\n * @request GET:/{provider}/voice/search\n * @secure\n */\n voiceProviderControllerSearchVoice: (provider, query, params = {}) => this.request({\n path: `/${provider}/voice/search`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerAddVoices\n * @summary Add Shared Voice to your Provider Account.\n * @request POST:/{provider}/voices/add\n * @deprecated\n * @secure\n */\n voiceProviderControllerAddVoices: (provider, data, params = {}) => this.request({\n path: `/${provider}/voices/add`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerAddVoice\n * @summary Add Shared Voice to your Provider Account.\n * @request POST:/{provider}/voice/add\n * @secure\n */\n voiceProviderControllerAddVoice: (provider, data, params = {}) => this.request({\n path: `/${provider}/voice/add`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n v11Labs = {\n /**\n * No description\n *\n * @tags Providers, extended\n * @name VoiceProviderControllerCloneVoices\n * @summary Clone a voice to the provider account and add to Vapi Voice Library.\n * @request POST:/11labs/voice/clone\n * @secure\n */\n voiceProviderControllerCloneVoices: (data, params = {}) => this.request({\n path: `/11labs/voice/clone`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.FormData,\n ...params,\n }),\n };\n template = {\n /**\n * No description\n *\n * @tags Templates, extended\n * @name TemplateControllerCreate\n * @summary Create Template\n * @request POST:/template\n * @secure\n */\n templateControllerCreate: (data, params = {}) => this.request({\n path: `/template`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Templates, extended\n * @name TemplateControllerFindAll\n * @summary List Templates\n * @request GET:/template\n * @secure\n */\n templateControllerFindAll: (query, params = {}) => this.request({\n path: `/template`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Templates, extended\n * @name TemplateControllerFindAllPinned\n * @summary List Templates\n * @request GET:/template/pinned\n * @secure\n */\n templateControllerFindAllPinned: (params = {}) => this.request({\n path: `/template/pinned`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Templates, extended\n * @name TemplateControllerFindOne\n * @summary Get Template\n * @request GET:/template/{id}\n * @secure\n */\n templateControllerFindOne: (id, params = {}) => this.request({\n path: `/template/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Templates, extended\n * @name TemplateControllerUpdate\n * @summary Update Template\n * @request PATCH:/template/{id}\n * @secure\n */\n templateControllerUpdate: (id, data, params = {}) => this.request({\n path: `/template/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Templates, extended\n * @name TemplateControllerRemove\n * @summary Delete Template\n * @request DELETE:/template/{id}\n * @secure\n */\n templateControllerRemove: (id, params = {}) => this.request({\n path: `/template/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n token = {\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerCreate\n * @summary Create Token\n * @request POST:/token\n * @secure\n */\n tokenControllerCreate: (data, params = {}) => this.request({\n path: `/token`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerFindAll\n * @summary List Tokens\n * @request GET:/token\n * @secure\n */\n tokenControllerFindAll: (query, params = {}) => this.request({\n path: `/token`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerFindOne\n * @summary Get Token\n * @request GET:/token/{id}\n * @secure\n */\n tokenControllerFindOne: (id, params = {}) => this.request({\n path: `/token/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerUpdate\n * @summary Update Token\n * @request PATCH:/token/{id}\n * @secure\n */\n tokenControllerUpdate: (id, data, params = {}) => this.request({\n path: `/token/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerRemove\n * @summary Delete Token\n * @request DELETE:/token/{id}\n * @secure\n */\n tokenControllerRemove: (id, params = {}) => this.request({\n path: `/token/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n voiceLibrary = {\n /**\n * No description\n *\n * @tags Voice Library, extended\n * @name VoiceLibraryControllerVoiceGetByProvider\n * @summary Get voices in Voice Library by Provider\n * @request GET:/voice-library/{provider}\n * @secure\n */\n voiceLibraryControllerVoiceGetByProvider: (provider, params = {}) => this.request({\n path: `/voice-library/${provider}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Voice Library, extended\n * @name VoiceLibraryControllerVoiceLibrarySyncByProvider\n * @summary Sync Private voices in Voice Library by Provider\n * @request POST:/voice-library/sync/{provider}\n * @secure\n */\n voiceLibraryControllerVoiceLibrarySyncByProvider: (provider, params = {}) => this.request({\n path: `/voice-library/sync/${provider}`,\n method: 'POST',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Voice Library, extended, extended\n * @name VoiceLibraryControllerVoiceLibrarySyncDefaultVoices\n * @summary Sync Default voices in Voice Library by Providers\n * @request POST:/voice-library/sync\n * @secure\n */\n voiceLibraryControllerVoiceLibrarySyncDefaultVoices: (data, params = {}) => this.request({\n path: `/voice-library/sync`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n}\nexports.Api = Api;\n\n\n//# sourceURL=webpack://Vapi/./node_modules/@vapi-ai/web/dist/api.js?"); +eval("\n/* eslint-disable */\n/* tslint:disable */\n/*\n * ---------------------------------------------------------------\n * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##\n * ## ##\n * ## AUTHOR: acacode ##\n * ## SOURCE: /~https://github.com/acacode/swagger-typescript-api ##\n * ---------------------------------------------------------------\n */\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Api = exports.HttpClient = exports.ContentType = exports.AuthenticationType = void 0;\nvar AuthenticationType;\n(function (AuthenticationType) {\n AuthenticationType[\"OAUTH2\"] = \"oauth2\";\n})(AuthenticationType || (exports.AuthenticationType = AuthenticationType = {}));\nvar ContentType;\n(function (ContentType) {\n ContentType[\"Json\"] = \"application/json\";\n ContentType[\"FormData\"] = \"multipart/form-data\";\n ContentType[\"UrlEncoded\"] = \"application/x-www-form-urlencoded\";\n ContentType[\"Text\"] = \"text/plain\";\n})(ContentType || (exports.ContentType = ContentType = {}));\nclass HttpClient {\n baseUrl = '';\n securityData = null;\n securityWorker;\n abortControllers = new Map();\n customFetch = (...fetchParams) => fetch(...fetchParams);\n baseApiParams = {\n credentials: 'same-origin',\n headers: {},\n redirect: 'follow',\n referrerPolicy: 'no-referrer',\n };\n constructor(apiConfig = {}) {\n Object.assign(this, apiConfig);\n }\n setSecurityData = (data) => {\n this.securityData = data;\n };\n encodeQueryParam(key, value) {\n const encodedKey = encodeURIComponent(key);\n return `${encodedKey}=${encodeURIComponent(typeof value === 'number' ? value : `${value}`)}`;\n }\n addQueryParam(query, key) {\n return this.encodeQueryParam(key, query[key]);\n }\n addArrayQueryParam(query, key) {\n const value = query[key];\n return value.map((v) => this.encodeQueryParam(key, v)).join('&');\n }\n toQueryString(rawQuery) {\n const query = rawQuery || {};\n const keys = Object.keys(query).filter((key) => 'undefined' !== typeof query[key]);\n return keys\n .map((key) => Array.isArray(query[key])\n ? this.addArrayQueryParam(query, key)\n : this.addQueryParam(query, key))\n .join('&');\n }\n addQueryParams(rawQuery) {\n const queryString = this.toQueryString(rawQuery);\n return queryString ? `?${queryString}` : '';\n }\n contentFormatters = {\n [ContentType.Json]: (input) => input !== null && (typeof input === 'object' || typeof input === 'string')\n ? JSON.stringify(input)\n : input,\n [ContentType.Text]: (input) => input !== null && typeof input !== 'string'\n ? JSON.stringify(input)\n : input,\n [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {\n const property = input[key];\n formData.append(key, property instanceof Blob\n ? property\n : typeof property === 'object' && property !== null\n ? JSON.stringify(property)\n : `${property}`);\n return formData;\n }, new FormData()),\n [ContentType.UrlEncoded]: (input) => this.toQueryString(input),\n };\n mergeRequestParams(params1, params2) {\n return {\n ...this.baseApiParams,\n ...params1,\n ...(params2 || {}),\n headers: {\n ...(this.baseApiParams.headers || {}),\n ...(params1.headers || {}),\n ...((params2 && params2.headers) || {}),\n },\n };\n }\n createAbortSignal = (cancelToken) => {\n if (this.abortControllers.has(cancelToken)) {\n const abortController = this.abortControllers.get(cancelToken);\n if (abortController) {\n return abortController.signal;\n }\n return void 0;\n }\n const abortController = new AbortController();\n this.abortControllers.set(cancelToken, abortController);\n return abortController.signal;\n };\n abortRequest = (cancelToken) => {\n const abortController = this.abortControllers.get(cancelToken);\n if (abortController) {\n abortController.abort();\n this.abortControllers.delete(cancelToken);\n }\n };\n request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {\n const secureParams = ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) &&\n this.securityWorker &&\n (await this.securityWorker(this.securityData))) ||\n {};\n const requestParams = this.mergeRequestParams(params, secureParams);\n const queryString = query && this.toQueryString(query);\n const payloadFormatter = this.contentFormatters[type || ContentType.Json];\n const responseFormat = format || requestParams.format;\n return this.customFetch(`${baseUrl || this.baseUrl || ''}${path}${queryString ? `?${queryString}` : ''}`, {\n ...requestParams,\n headers: {\n ...(requestParams.headers || {}),\n ...(type && type !== ContentType.FormData\n ? { 'Content-Type': type }\n : {}),\n },\n signal: (cancelToken\n ? this.createAbortSignal(cancelToken)\n : requestParams.signal) || null,\n body: typeof body === 'undefined' || body === null\n ? null\n : payloadFormatter(body),\n }).then(async (response) => {\n const r = response.clone();\n r.data = null;\n r.error = null;\n const data = !responseFormat\n ? r\n : await response[responseFormat]()\n .then((data) => {\n if (r.ok) {\n r.data = data;\n }\n else {\n r.error = data;\n }\n return r;\n })\n .catch((e) => {\n r.error = e;\n return r;\n });\n if (cancelToken) {\n this.abortControllers.delete(cancelToken);\n }\n if (!response.ok)\n throw data;\n return data;\n });\n };\n}\nexports.HttpClient = HttpClient;\n/**\n * @title Vapi API\n * @version 1.0\n * @contact\n *\n * API for building voice assistants\n */\nclass Api extends HttpClient {\n call = {\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerCreate\n * @summary Create Call\n * @request POST:/call\n * @secure\n */\n callControllerCreate: (data, params = {}) => this.request({\n path: `/call`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerFindAll\n * @summary List Calls\n * @request GET:/call\n * @secure\n */\n callControllerFindAll: (query, params = {}) => this.request({\n path: `/call`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerFindOne\n * @summary Get Call\n * @request GET:/call/{id}\n * @secure\n */\n callControllerFindOne: (id, params = {}) => this.request({\n path: `/call/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerUpdate\n * @summary Update Call\n * @request PATCH:/call/{id}\n * @secure\n */\n callControllerUpdate: (id, data, params = {}) => this.request({\n path: `/call/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls\n * @name CallControllerDeleteCallData\n * @summary Delete Call Data\n * @request DELETE:/call/{id}\n * @secure\n */\n callControllerDeleteCallData: (id, params = {}) => this.request({\n path: `/call/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerCreatePhoneCall\n * @summary Create Phone Call\n * @request POST:/call/phone\n * @secure\n */\n callControllerCreatePhoneCall: (data, params = {}) => this.request({\n path: `/call/phone`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerCreateWebCall\n * @summary Create Web Call\n * @request POST:/call/web\n * @secure\n */\n callControllerCreateWebCall: (data, params = {}) => this.request({\n path: `/call/web`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n v2 = {\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerFindAllPaginated\n * @summary List Calls\n * @request GET:/v2/call\n * @secure\n */\n callControllerFindAllPaginated: (query, params = {}) => this.request({\n path: `/v2/call`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Calls, extended\n * @name CallControllerFindAllMetadataPaginated\n * @summary List Call Metadata\n * @request GET:/v2/call/metadata\n * @secure\n */\n callControllerFindAllMetadataPaginated: (query, params = {}) => this.request({\n path: `/v2/call/metadata`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerFindAllPaginated\n * @summary List Phone Numbers\n * @request GET:/v2/phone-number\n * @secure\n */\n phoneNumberControllerFindAllPaginated: (query, params = {}) => this.request({\n path: `/v2/phone-number`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n assistant = {\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerCreate\n * @summary Create Assistant\n * @request POST:/assistant\n * @secure\n */\n assistantControllerCreate: (data, params = {}) => this.request({\n path: `/assistant`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerFindAll\n * @summary List Assistants\n * @request GET:/assistant\n * @secure\n */\n assistantControllerFindAll: (query, params = {}) => this.request({\n path: `/assistant`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerFindOne\n * @summary Get Assistant\n * @request GET:/assistant/{id}\n * @secure\n */\n assistantControllerFindOne: (id, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerUpdate\n * @summary Update Assistant\n * @request PATCH:/assistant/{id}\n * @secure\n */\n assistantControllerUpdate: (id, data, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants, extended\n * @name AssistantControllerReplace\n * @summary Replace Assistant\n * @request PUT:/assistant/{id}\n * @secure\n */\n assistantControllerReplace: (id, data, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'PUT',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Assistants\n * @name AssistantControllerRemove\n * @summary Delete Assistant\n * @request DELETE:/assistant/{id}\n * @secure\n */\n assistantControllerRemove: (id, params = {}) => this.request({\n path: `/assistant/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n phoneNumber = {\n /**\n * No description\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerBuy\n * @summary Buy Phone Number\n * @request POST:/phone-number/buy\n * @secure\n */\n phoneNumberControllerBuy: (data, params = {}) => this.request({\n path: `/phone-number/buy`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * @description Use POST /phone-number instead.\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerImportTwilio\n * @summary Import Twilio Number\n * @request POST:/phone-number/import/twilio\n * @deprecated\n * @secure\n */\n phoneNumberControllerImportTwilio: (data, params = {}) => this.request({\n path: `/phone-number/import/twilio`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * @description Use POST /phone-number instead.\n *\n * @tags Phone Numbers, extended\n * @name PhoneNumberControllerImportVonage\n * @summary Import Vonage Number\n * @request POST:/phone-number/import/vonage\n * @deprecated\n * @secure\n */\n phoneNumberControllerImportVonage: (data, params = {}) => this.request({\n path: `/phone-number/import/vonage`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerCreate\n * @summary Create Phone Number\n * @request POST:/phone-number\n * @secure\n */\n phoneNumberControllerCreate: (data, params = {}) => this.request({\n path: `/phone-number`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerFindAll\n * @summary List Phone Numbers\n * @request GET:/phone-number\n * @secure\n */\n phoneNumberControllerFindAll: (query, params = {}) => this.request({\n path: `/phone-number`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerFindOne\n * @summary Get Phone Number\n * @request GET:/phone-number/{id}\n * @secure\n */\n phoneNumberControllerFindOne: (id, params = {}) => this.request({\n path: `/phone-number/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerUpdate\n * @summary Update Phone Number\n * @request PATCH:/phone-number/{id}\n * @secure\n */\n phoneNumberControllerUpdate: (id, data, params = {}) => this.request({\n path: `/phone-number/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Phone Numbers\n * @name PhoneNumberControllerRemove\n * @summary Delete Phone Number\n * @request DELETE:/phone-number/{id}\n * @secure\n */\n phoneNumberControllerRemove: (id, params = {}) => this.request({\n path: `/phone-number/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n squad = {\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerCreate\n * @summary Create Squad\n * @request POST:/squad\n * @secure\n */\n squadControllerCreate: (data, params = {}) => this.request({\n path: `/squad`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerFindAll\n * @summary List Squads\n * @request GET:/squad\n * @secure\n */\n squadControllerFindAll: (query, params = {}) => this.request({\n path: `/squad`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerFindOne\n * @summary Get Squad\n * @request GET:/squad/{id}\n * @secure\n */\n squadControllerFindOne: (id, params = {}) => this.request({\n path: `/squad/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerUpdate\n * @summary Update Squad\n * @request PATCH:/squad/{id}\n * @secure\n */\n squadControllerUpdate: (id, data, params = {}) => this.request({\n path: `/squad/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Squads\n * @name SquadControllerRemove\n * @summary Delete Squad\n * @request DELETE:/squad/{id}\n * @secure\n */\n squadControllerRemove: (id, params = {}) => this.request({\n path: `/squad/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n knowledgeBase = {\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerCreate\n * @summary Create Knowledge Base\n * @request POST:/knowledge-base\n * @secure\n */\n knowledgeBaseControllerCreate: (data, params = {}) => this.request({\n path: `/knowledge-base`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerFindAll\n * @summary List Knowledge Bases\n * @request GET:/knowledge-base\n * @secure\n */\n knowledgeBaseControllerFindAll: (query, params = {}) => this.request({\n path: `/knowledge-base`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerFindOne\n * @summary Get Knowledge Base\n * @request GET:/knowledge-base/{id}\n * @secure\n */\n knowledgeBaseControllerFindOne: (id, params = {}) => this.request({\n path: `/knowledge-base/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerUpdate\n * @summary Update Knowledge Base\n * @request PATCH:/knowledge-base/{id}\n * @secure\n */\n knowledgeBaseControllerUpdate: (id, params = {}) => this.request({\n path: `/knowledge-base/${id}`,\n method: 'PATCH',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Knowledge Base\n * @name KnowledgeBaseControllerRemove\n * @summary Delete Knowledge Base\n * @request DELETE:/knowledge-base/{id}\n * @secure\n */\n knowledgeBaseControllerRemove: (id, params = {}) => this.request({\n path: `/knowledge-base/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n block = {\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerCreate\n * @summary Create Block\n * @request POST:/block\n * @secure\n */\n blockControllerCreate: (data, params = {}) => this.request({\n path: `/block`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerFindAll\n * @summary List Blocks\n * @request GET:/block\n * @secure\n */\n blockControllerFindAll: (query, params = {}) => this.request({\n path: `/block`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerFindOne\n * @summary Get Block\n * @request GET:/block/{id}\n * @secure\n */\n blockControllerFindOne: (id, params = {}) => this.request({\n path: `/block/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerUpdate\n * @summary Update Block\n * @request PATCH:/block/{id}\n * @secure\n */\n blockControllerUpdate: (id, data, params = {}) => this.request({\n path: `/block/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Blocks\n * @name BlockControllerRemove\n * @summary Delete Block\n * @request DELETE:/block/{id}\n * @secure\n */\n blockControllerRemove: (id, params = {}) => this.request({\n path: `/block/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n tool = {\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerCreate\n * @summary Create Tool\n * @request POST:/tool\n * @secure\n */\n toolControllerCreate: (data, params = {}) => this.request({\n path: `/tool`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerFindAll\n * @summary List Tools\n * @request GET:/tool\n * @secure\n */\n toolControllerFindAll: (query, params = {}) => this.request({\n path: `/tool`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerFindOne\n * @summary Get Tool\n * @request GET:/tool/{id}\n * @secure\n */\n toolControllerFindOne: (id, params = {}) => this.request({\n path: `/tool/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerUpdate\n * @summary Update Tool\n * @request PATCH:/tool/{id}\n * @secure\n */\n toolControllerUpdate: (id, data, params = {}) => this.request({\n path: `/tool/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tools\n * @name ToolControllerRemove\n * @summary Delete Tool\n * @request DELETE:/tool/{id}\n * @secure\n */\n toolControllerRemove: (id, params = {}) => this.request({\n path: `/tool/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n file = {\n /**\n * @description Use POST /file instead.\n *\n * @tags Files, extended\n * @name FileControllerCreateDeprecated\n * @summary Upload File\n * @request POST:/file/upload\n * @deprecated\n * @secure\n */\n fileControllerCreateDeprecated: (data, params = {}) => this.request({\n path: `/file/upload`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.FormData,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerCreate\n * @summary Upload File\n * @request POST:/file\n * @secure\n */\n fileControllerCreate: (data, params = {}) => this.request({\n path: `/file`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.FormData,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerFindAll\n * @summary List Files\n * @request GET:/file\n * @secure\n */\n fileControllerFindAll: (params = {}) => this.request({\n path: `/file`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerFindOne\n * @summary Get File\n * @request GET:/file/{id}\n * @secure\n */\n fileControllerFindOne: (id, params = {}) => this.request({\n path: `/file/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerUpdate\n * @summary Update File\n * @request PATCH:/file/{id}\n * @secure\n */\n fileControllerUpdate: (id, data, params = {}) => this.request({\n path: `/file/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Files\n * @name FileControllerRemove\n * @summary Delete File\n * @request DELETE:/file/{id}\n * @secure\n */\n fileControllerRemove: (id, params = {}) => this.request({\n path: `/file/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n metrics = {\n /**\n * @description Use GET /metric instead\n *\n * @tags Analytics, extended\n * @name AnalyticsControllerFindAllDeprecated\n * @summary List Billing Metrics\n * @request GET:/metrics\n * @deprecated\n * @secure\n */\n analyticsControllerFindAllDeprecated: (query, params = {}) => this.request({\n path: `/metrics`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n analytics = {\n /**\n * No description\n *\n * @tags Analytics, extended\n * @name AnalyticsControllerQuery\n * @summary Create Analytics Queries\n * @request POST:/analytics\n * @secure\n */\n analyticsControllerQuery: (data, params = {}) => this.request({\n path: `/analytics`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Analytics\n * @name AnalyticsControllerGetQuery\n * @summary Get Analytics\n * @request GET:/analytics\n * @secure\n */\n analyticsControllerGetQuery: (data, params = {}) => this.request({\n path: `/analytics`,\n method: 'GET',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n log = {\n /**\n * No description\n *\n * @tags Logs, extended\n * @name LoggingControllerGetCallLogs\n * @request GET:/log\n * @secure\n */\n loggingControllerGetCallLogs: (query, params = {}) => this.request({\n path: `/log`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n logs = {\n /**\n * No description\n *\n * @tags Logs\n * @name LoggingControllerQueryLogs\n * @summary Get Logs\n * @request GET:/logs\n * @secure\n */\n loggingControllerQueryLogs: (query, params = {}) => this.request({\n path: `/logs`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n chat = {\n /**\n * No description\n *\n * @tags Chat, extended\n * @name ChatControllerChat\n * @summary Chat with Assistant\n * @request POST:/chat\n * @secure\n */\n chatControllerChat: (data, params = {}) => this.request({\n path: `/chat`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n credential = {\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerCreate\n * @summary Create Credential\n * @request POST:/credential\n * @secure\n */\n credentialControllerCreate: (data, params = {}) => this.request({\n path: `/credential`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerFindAll\n * @summary List Credentials\n * @request GET:/credential\n * @secure\n */\n credentialControllerFindAll: (query, params = {}) => this.request({\n path: `/credential`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerFindOne\n * @summary Get Credential\n * @request GET:/credential/{id}\n * @secure\n */\n credentialControllerFindOne: (id, params = {}) => this.request({\n path: `/credential/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Credentials, extended\n * @name CredentialControllerRemove\n * @summary Delete Credential\n * @request DELETE:/credential/{id}\n * @secure\n */\n credentialControllerRemove: (id, params = {}) => this.request({\n path: `/credential/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n provider = {\n /**\n * No description\n *\n * @tags Providers, extended\n * @name ProviderControllerGetWorkflows\n * @request GET:/{provider}/workflows\n * @secure\n */\n providerControllerGetWorkflows: (provider, query, params = {}) => this.request({\n path: `/${provider}/workflows`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended\n * @name ProviderControllerGetWorkflowTriggerHook\n * @request GET:/{provider}/workflows/{workflowId}/hooks\n * @secure\n */\n providerControllerGetWorkflowTriggerHook: (provider, workflowId, params = {}) => this.request({\n path: `/${provider}/workflows/${workflowId}/hooks`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended\n * @name ProviderControllerGetLocations\n * @request GET:/{provider}/locations\n * @secure\n */\n providerControllerGetLocations: (provider, params = {}) => this.request({\n path: `/${provider}/locations`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerSearchVoices\n * @summary Search Voice from Provider Voice Library.\n * @request GET:/{provider}/voices/search\n * @deprecated\n * @secure\n */\n voiceProviderControllerSearchVoices: (provider, query, params = {}) => this.request({\n path: `/${provider}/voices/search`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerSearchVoice\n * @summary Search Voice from Provider Voice Library.\n * @request GET:/{provider}/voice/search\n * @secure\n */\n voiceProviderControllerSearchVoice: (provider, query, params = {}) => this.request({\n path: `/${provider}/voice/search`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerAddVoices\n * @summary Add Shared Voice to your Provider Account.\n * @request POST:/{provider}/voices/add\n * @deprecated\n * @secure\n */\n voiceProviderControllerAddVoices: (provider, data, params = {}) => this.request({\n path: `/${provider}/voices/add`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Providers, extended, extended\n * @name VoiceProviderControllerAddVoice\n * @summary Add Shared Voice to your Provider Account.\n * @request POST:/{provider}/voice/add\n * @secure\n */\n voiceProviderControllerAddVoice: (provider, data, params = {}) => this.request({\n path: `/${provider}/voice/add`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n v11Labs = {\n /**\n * No description\n *\n * @tags Providers, extended\n * @name VoiceProviderControllerCloneVoices\n * @summary Clone a voice to the provider account and add to Vapi Voice Library.\n * @request POST:/11labs/voice/clone\n * @secure\n */\n voiceProviderControllerCloneVoices: (data, params = {}) => this.request({\n path: `/11labs/voice/clone`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.FormData,\n ...params,\n }),\n };\n token = {\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerCreate\n * @summary Create Token\n * @request POST:/token\n * @secure\n */\n tokenControllerCreate: (data, params = {}) => this.request({\n path: `/token`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerFindAll\n * @summary List Tokens\n * @request GET:/token\n * @secure\n */\n tokenControllerFindAll: (query, params = {}) => this.request({\n path: `/token`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerFindOne\n * @summary Get Token\n * @request GET:/token/{id}\n * @secure\n */\n tokenControllerFindOne: (id, params = {}) => this.request({\n path: `/token/${id}`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerUpdate\n * @summary Update Token\n * @request PATCH:/token/{id}\n * @secure\n */\n tokenControllerUpdate: (id, data, params = {}) => this.request({\n path: `/token/${id}`,\n method: 'PATCH',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Tokens, extended\n * @name TokenControllerRemove\n * @summary Delete Token\n * @request DELETE:/token/{id}\n * @secure\n */\n tokenControllerRemove: (id, params = {}) => this.request({\n path: `/token/${id}`,\n method: 'DELETE',\n secure: true,\n format: 'json',\n ...params,\n }),\n };\n voiceLibrary = {\n /**\n * No description\n *\n * @tags Voice Library, extended\n * @name VoiceLibraryControllerVoiceGetByProvider\n * @summary Get voices in Voice Library by Provider\n * @request GET:/voice-library/{provider}\n * @secure\n */\n voiceLibraryControllerVoiceGetByProvider: (provider, query, params = {}) => this.request({\n path: `/voice-library/${provider}`,\n method: 'GET',\n query: query,\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Voice Library, extended\n * @name VoiceLibraryControllerVoiceGetAccentsByProvider\n * @summary Get accents in Voice Library by Provider\n * @request GET:/voice-library/{provider}/accents\n * @secure\n */\n voiceLibraryControllerVoiceGetAccentsByProvider: (provider, params = {}) => this.request({\n path: `/voice-library/${provider}/accents`,\n method: 'GET',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Voice Library, extended\n * @name VoiceLibraryControllerVoiceLibrarySyncByProvider\n * @summary Sync Private voices in Voice Library by Provider\n * @request POST:/voice-library/sync/{provider}\n * @secure\n */\n voiceLibraryControllerVoiceLibrarySyncByProvider: (provider, params = {}) => this.request({\n path: `/voice-library/sync/${provider}`,\n method: 'POST',\n secure: true,\n format: 'json',\n ...params,\n }),\n /**\n * No description\n *\n * @tags Voice Library, extended, extended\n * @name VoiceLibraryControllerVoiceLibrarySyncDefaultVoices\n * @summary Sync Default voices in Voice Library by Providers\n * @request POST:/voice-library/sync\n * @secure\n */\n voiceLibraryControllerVoiceLibrarySyncDefaultVoices: (data, params = {}) => this.request({\n path: `/voice-library/sync`,\n method: 'POST',\n body: data,\n secure: true,\n type: ContentType.Json,\n format: 'json',\n ...params,\n }),\n };\n}\nexports.Api = Api;\n\n\n//# sourceURL=webpack://Vapi/./node_modules/@vapi-ai/web/dist/api.js?"); /***/ }), @@ -56,7 +56,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo \************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst daily_js_1 = __importDefault(__webpack_require__(/*! @daily-co/daily-js */ \"./node_modules/@daily-co/daily-js/dist/daily-esm.js\"));\nconst events_1 = __importDefault(__webpack_require__(/*! events */ \"./node_modules/events/events.js\"));\nconst client_1 = __webpack_require__(/*! ./client */ \"./node_modules/@vapi-ai/web/dist/client.js\");\nasync function startAudioPlayer(player, track) {\n player.muted = false;\n player.autoplay = true;\n if (track != null) {\n player.srcObject = new MediaStream([track]);\n await player.play();\n }\n}\nasync function buildAudioPlayer(track, participantId) {\n const player = document.createElement('audio');\n player.dataset.participantId = participantId;\n document.body.appendChild(player);\n await startAudioPlayer(player, track);\n return player;\n}\nfunction destroyAudioPlayer(participantId) {\n const player = document.querySelector(`audio[data-participant-id=\"${participantId}\"]`);\n player?.remove();\n}\nfunction subscribeToTracks(e, call, isVideoRecordingEnabled, isVideoEnabled) {\n if (e.participant.local)\n return;\n call.updateParticipant(e.participant.session_id, {\n setSubscribedTracks: {\n audio: true,\n video: isVideoRecordingEnabled || isVideoEnabled,\n },\n });\n}\nclass VapiEventEmitter extends events_1.default {\n on(event, listener) {\n super.on(event, listener);\n return this;\n }\n once(event, listener) {\n super.once(event, listener);\n return this;\n }\n emit(event, ...args) {\n return super.emit(event, ...args);\n }\n removeListener(event, listener) {\n super.removeListener(event, listener);\n return this;\n }\n removeAllListeners(event) {\n super.removeAllListeners(event);\n return this;\n }\n}\nclass Vapi extends VapiEventEmitter {\n started = false;\n call = null;\n speakingTimeout = null;\n dailyCallConfig = {};\n dailyCallObject = {};\n constructor(apiToken, apiBaseUrl, dailyCallConfig, dailyCallObject) {\n super();\n client_1.client.baseUrl = apiBaseUrl ?? 'https://api.vapi.ai';\n client_1.client.setSecurityData(apiToken);\n this.dailyCallConfig = dailyCallConfig ?? {};\n this.dailyCallObject = dailyCallObject ?? {};\n }\n cleanup() {\n this.started = false;\n this.call?.destroy();\n this.call = null;\n this.speakingTimeout = null;\n }\n isMobileDevice() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n const userAgent = navigator.userAgent;\n return /android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(userAgent.toLowerCase());\n }\n async sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n async start(assistant, assistantOverrides, squad) {\n if (!assistant && !squad) {\n throw new Error('Assistant or Squad must be provided.');\n }\n if (this.started) {\n return null;\n }\n this.started = true;\n try {\n const webCall = (await client_1.client.call.callControllerCreateWebCall({\n assistant: typeof assistant === 'string' ? undefined : assistant,\n assistantId: typeof assistant === 'string' ? assistant : undefined,\n assistantOverrides,\n squad: typeof squad === 'string' ? undefined : squad,\n squadId: typeof squad === 'string' ? squad : undefined,\n })).data;\n if (this.call) {\n this.cleanup();\n }\n const isVideoRecordingEnabled = webCall?.artifactPlan?.videoRecordingEnabled ?? false;\n // @ts-expect-error This exists\n const isVideoEnabled = webCall.transport?.assistantVideoEnabled ?? false;\n this.call = daily_js_1.default.createCallObject({\n audioSource: this.dailyCallObject.audioSource ?? true,\n videoSource: this.dailyCallObject.videoSource ?? isVideoRecordingEnabled,\n dailyConfig: this.dailyCallConfig,\n });\n this.call.iframe()?.style.setProperty('display', 'none');\n this.call.on('left-meeting', () => {\n this.emit('call-end');\n if (isVideoRecordingEnabled) {\n this.call?.stopRecording();\n }\n this.cleanup();\n });\n this.call.on('participant-left', (e) => {\n if (!e)\n return;\n destroyAudioPlayer(e.participant.session_id);\n });\n this.call.on('error', (error) => {\n this.emit('error', error);\n if (isVideoRecordingEnabled) {\n this.call?.stopRecording();\n }\n });\n this.call.on('camera-error', (error) => {\n this.emit('error', error);\n });\n this.call.on('track-started', async (e) => {\n if (!e || !e.participant)\n return;\n if (e.participant?.local)\n return;\n if (e.participant?.user_name !== 'Vapi Speaker')\n return;\n if (e.track.kind === 'video') {\n this.emit('video', e.track);\n }\n if (e.track.kind === 'audio') {\n await buildAudioPlayer(e.track, e.participant.session_id);\n }\n this.call?.sendAppMessage('playable');\n });\n this.call.on('participant-joined', (e) => {\n if (!e || !this.call)\n return;\n subscribeToTracks(e, this.call, isVideoRecordingEnabled, isVideoEnabled);\n });\n // Allow mobile devices to finish processing the microphone permissions\n // request before joining the call and playing the assistant's audio\n if (this.isMobileDevice()) {\n await this.sleep(1000);\n }\n await this.call.join({\n url: webCall.webCallUrl,\n subscribeToTracksAutomatically: false,\n });\n if (isVideoRecordingEnabled) {\n const recordingRequestedTime = new Date().getTime();\n this.call.startRecording({\n width: 1280,\n height: 720,\n backgroundColor: '#FF1F2D3D',\n layout: {\n preset: 'default',\n },\n });\n this.call.on('recording-started', () => {\n this.send({\n type: 'control',\n control: 'say-first-message',\n videoRecordingStartDelaySeconds: (new Date().getTime() - recordingRequestedTime) / 1000,\n });\n });\n }\n this.call.startRemoteParticipantsAudioLevelObserver(100);\n this.call.on('remote-participants-audio-level', (e) => {\n if (e)\n this.handleRemoteParticipantsAudioLevel(e);\n });\n this.call.on('app-message', (e) => this.onAppMessage(e));\n this.call.on('nonfatal-error', (e) => {\n // https://docs.daily.co/reference/daily-js/events/meeting-events#type-audio-processor-error\n if (e?.type === 'audio-processor-error') {\n this.call\n ?.updateInputSettings({\n audio: {\n processor: {\n type: 'none',\n },\n },\n })\n .then(() => {\n this.call?.setLocalAudio(true);\n });\n }\n });\n this.call.updateInputSettings({\n audio: {\n processor: {\n type: 'noise-cancellation',\n },\n },\n });\n return webCall;\n }\n catch (e) {\n console.error(e);\n this.emit('error', e);\n this.cleanup();\n return null;\n }\n }\n onAppMessage(e) {\n if (!e)\n return;\n try {\n if (e.data === 'listening') {\n return this.emit('call-start');\n }\n else {\n try {\n const parsedMessage = JSON.parse(e.data);\n this.emit('message', parsedMessage);\n }\n catch (parseError) {\n console.log('Error parsing message data: ', parseError);\n }\n }\n }\n catch (e) {\n console.error(e);\n }\n }\n handleRemoteParticipantsAudioLevel(e) {\n const speechLevel = Object.values(e.participantsAudioLevel).reduce((a, b) => a + b, 0);\n this.emit('volume-level', Math.min(1, speechLevel / 0.15));\n const isSpeaking = speechLevel > 0.01;\n if (!isSpeaking)\n return;\n if (this.speakingTimeout) {\n clearTimeout(this.speakingTimeout);\n this.speakingTimeout = null;\n }\n else {\n this.emit('speech-start');\n }\n this.speakingTimeout = setTimeout(() => {\n this.emit('speech-end');\n this.speakingTimeout = null;\n }, 1000);\n }\n stop() {\n this.started = false;\n this.call?.destroy();\n this.call = null;\n }\n send(message) {\n this.call?.sendAppMessage(JSON.stringify(message));\n }\n setMuted(mute) {\n if (!this.call) {\n throw new Error('Call object is not available.');\n }\n this.call.setLocalAudio(!mute);\n }\n isMuted() {\n if (!this.call) {\n return false;\n }\n return this.call.localAudio() === false;\n }\n say(message, endCallAfterSpoken) {\n this.send({\n type: 'say',\n message,\n endCallAfterSpoken,\n });\n }\n setInputDevicesAsync(options) {\n this.call?.setInputDevicesAsync(options);\n }\n setOutputDeviceAsync(options) {\n this.call?.setOutputDeviceAsync(options);\n }\n getDailyCallObject() {\n return this.call;\n }\n}\nexports[\"default\"] = Vapi;\n\n\n//# sourceURL=webpack://Vapi/./node_modules/@vapi-ai/web/dist/vapi.js?"); +eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst daily_js_1 = __importDefault(__webpack_require__(/*! @daily-co/daily-js */ \"./node_modules/@daily-co/daily-js/dist/daily-esm.js\"));\nconst events_1 = __importDefault(__webpack_require__(/*! events */ \"./node_modules/events/events.js\"));\nconst client_1 = __webpack_require__(/*! ./client */ \"./node_modules/@vapi-ai/web/dist/client.js\");\nasync function startAudioPlayer(player, track) {\n player.muted = false;\n player.autoplay = true;\n if (track != null) {\n player.srcObject = new MediaStream([track]);\n await player.play();\n }\n}\nasync function buildAudioPlayer(track, participantId) {\n const player = document.createElement('audio');\n player.dataset.participantId = participantId;\n document.body.appendChild(player);\n await startAudioPlayer(player, track);\n return player;\n}\nfunction destroyAudioPlayer(participantId) {\n const player = document.querySelector(`audio[data-participant-id=\"${participantId}\"]`);\n player?.remove();\n}\nfunction subscribeToTracks(e, call, isVideoRecordingEnabled, isVideoEnabled) {\n if (e.participant.local)\n return;\n call.updateParticipant(e.participant.session_id, {\n setSubscribedTracks: {\n audio: true,\n video: isVideoRecordingEnabled || isVideoEnabled,\n },\n });\n}\nclass VapiEventEmitter extends events_1.default {\n on(event, listener) {\n super.on(event, listener);\n return this;\n }\n once(event, listener) {\n super.once(event, listener);\n return this;\n }\n emit(event, ...args) {\n return super.emit(event, ...args);\n }\n removeListener(event, listener) {\n super.removeListener(event, listener);\n return this;\n }\n removeAllListeners(event) {\n super.removeAllListeners(event);\n return this;\n }\n}\nclass Vapi extends VapiEventEmitter {\n started = false;\n call = null;\n speakingTimeout = null;\n dailyCallConfig = {};\n dailyCallObject = {};\n constructor(apiToken, apiBaseUrl, dailyCallConfig, dailyCallObject) {\n super();\n client_1.client.baseUrl = apiBaseUrl ?? 'https://api.vapi.ai';\n client_1.client.setSecurityData(apiToken);\n this.dailyCallConfig = dailyCallConfig ?? {};\n this.dailyCallObject = dailyCallObject ?? {};\n }\n cleanup() {\n this.started = false;\n this.call?.destroy();\n this.call = null;\n this.speakingTimeout = null;\n }\n isMobileDevice() {\n if (typeof navigator === 'undefined') {\n return false;\n }\n const userAgent = navigator.userAgent;\n return /android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(userAgent.toLowerCase());\n }\n async sleep(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n }\n async start(assistant, assistantOverrides, squad) {\n if (!assistant && !squad) {\n throw new Error('Assistant or Squad must be provided.');\n }\n if (this.started) {\n return null;\n }\n this.started = true;\n try {\n const webCall = (await client_1.client.call.callControllerCreateWebCall({\n assistant: typeof assistant === 'string' ? undefined : assistant,\n assistantId: typeof assistant === 'string' ? assistant : undefined,\n assistantOverrides,\n squad: typeof squad === 'string' ? undefined : squad,\n squadId: typeof squad === 'string' ? squad : undefined,\n })).data;\n if (this.call) {\n this.cleanup();\n }\n const isVideoRecordingEnabled = webCall?.artifactPlan?.videoRecordingEnabled ?? false;\n const isVideoEnabled = webCall.transport?.assistantVideoEnabled ?? false;\n this.call = daily_js_1.default.createCallObject({\n audioSource: this.dailyCallObject.audioSource ?? true,\n videoSource: this.dailyCallObject.videoSource ?? isVideoRecordingEnabled,\n dailyConfig: this.dailyCallConfig,\n });\n this.call.iframe()?.style.setProperty('display', 'none');\n this.call.on('left-meeting', () => {\n this.emit('call-end');\n if (isVideoRecordingEnabled) {\n this.call?.stopRecording();\n }\n this.cleanup();\n });\n this.call.on('error', (error) => {\n this.emit('error', error);\n if (isVideoRecordingEnabled) {\n this.call?.stopRecording();\n }\n });\n this.call.on('camera-error', (error) => {\n this.emit('error', error);\n });\n this.call.on('track-started', async (e) => {\n if (!e || !e.participant) {\n return;\n }\n if (e.participant?.local) {\n return;\n }\n if (e.participant?.user_name !== 'Vapi Speaker') {\n return;\n }\n if (e.track.kind === 'video') {\n this.emit('video', e.track);\n }\n if (e.track.kind === 'audio') {\n await buildAudioPlayer(e.track, e.participant.session_id);\n }\n this.call?.sendAppMessage('playable');\n });\n this.call.on('participant-joined', (e) => {\n if (!e || !this.call)\n return;\n subscribeToTracks(e, this.call, isVideoRecordingEnabled, isVideoEnabled);\n });\n this.call.on('participant-updated', (e) => {\n if (!e) {\n return;\n }\n this.emit('daily-participant-updated', e.participant);\n });\n this.call.on('participant-left', (e) => {\n if (!e) {\n return;\n }\n destroyAudioPlayer(e.participant.session_id);\n });\n // Allow mobile devices to finish processing the microphone permissions\n // request before joining the call and playing the assistant's audio\n if (this.isMobileDevice()) {\n await this.sleep(1000);\n }\n await this.call.join({\n // @ts-expect-error This exists\n url: webCall.webCallUrl,\n subscribeToTracksAutomatically: false,\n });\n if (isVideoRecordingEnabled) {\n const recordingRequestedTime = new Date().getTime();\n this.call.startRecording({\n width: 1280,\n height: 720,\n backgroundColor: '#FF1F2D3D',\n layout: {\n preset: 'default',\n },\n });\n this.call.on('recording-started', () => {\n this.send({\n type: 'control',\n control: 'say-first-message',\n videoRecordingStartDelaySeconds: (new Date().getTime() - recordingRequestedTime) / 1000,\n });\n });\n }\n this.call.startRemoteParticipantsAudioLevelObserver(100);\n this.call.on('remote-participants-audio-level', (e) => {\n if (e)\n this.handleRemoteParticipantsAudioLevel(e);\n });\n this.call.on('app-message', (e) => this.onAppMessage(e));\n this.call.on('nonfatal-error', (e) => {\n // https://docs.daily.co/reference/daily-js/events/meeting-events#type-audio-processor-error\n if (e?.type === 'audio-processor-error') {\n this.call\n ?.updateInputSettings({\n audio: {\n processor: {\n type: 'none',\n },\n },\n })\n .then(() => {\n this.call?.setLocalAudio(true);\n });\n }\n });\n this.call.updateInputSettings({\n audio: {\n processor: {\n type: 'noise-cancellation',\n },\n },\n });\n return webCall;\n }\n catch (e) {\n console.error(e);\n this.emit('error', e);\n this.cleanup();\n return null;\n }\n }\n onAppMessage(e) {\n if (!e) {\n return;\n }\n try {\n if (e.data === 'listening') {\n return this.emit('call-start');\n }\n else {\n try {\n const parsedMessage = JSON.parse(e.data);\n this.emit('message', parsedMessage);\n }\n catch (parseError) {\n console.log('Error parsing message data: ', parseError);\n }\n }\n }\n catch (e) {\n console.error(e);\n }\n }\n handleRemoteParticipantsAudioLevel(e) {\n const speechLevel = Object.values(e.participantsAudioLevel).reduce((a, b) => a + b, 0);\n this.emit('volume-level', Math.min(1, speechLevel / 0.15));\n const isSpeaking = speechLevel > 0.01;\n if (!isSpeaking) {\n return;\n }\n if (this.speakingTimeout) {\n clearTimeout(this.speakingTimeout);\n this.speakingTimeout = null;\n }\n else {\n this.emit('speech-start');\n }\n this.speakingTimeout = setTimeout(() => {\n this.emit('speech-end');\n this.speakingTimeout = null;\n }, 1000);\n }\n stop() {\n this.started = false;\n this.call?.destroy();\n this.call = null;\n }\n send(message) {\n this.call?.sendAppMessage(JSON.stringify(message));\n }\n setMuted(mute) {\n if (!this.call) {\n throw new Error('Call object is not available.');\n }\n this.call.setLocalAudio(!mute);\n }\n isMuted() {\n if (!this.call) {\n return false;\n }\n return this.call.localAudio() === false;\n }\n say(message, endCallAfterSpoken) {\n this.send({\n type: 'say',\n message,\n endCallAfterSpoken,\n });\n }\n setInputDevicesAsync(options) {\n this.call?.setInputDevicesAsync(options);\n }\n setOutputDeviceAsync(options) {\n this.call?.setOutputDeviceAsync(options);\n }\n getDailyCallObject() {\n return this.call;\n }\n startScreenSharing(displayMediaOptions, screenVideoSendSettings) {\n this.call?.startScreenShare({\n displayMediaOptions,\n screenVideoSendSettings,\n });\n }\n stopScreenSharing() {\n this.call?.stopScreenShare();\n }\n}\nexports[\"default\"] = Vapi;\n\n\n//# sourceURL=webpack://Vapi/./node_modules/@vapi-ai/web/dist/vapi.js?"); /***/ }), diff --git a/dist/latest/vapi-web-bundle.min.js b/dist/latest/vapi-web-bundle.min.js index 7b2eecb..0e2b229 100644 --- a/dist/latest/vapi-web-bundle.min.js +++ b/dist/latest/vapi-web-bundle.min.js @@ -1,2 +1,2 @@ -/*! For license information please see vapi-web-bundle-2.1.8.min.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Vapi=t():e.Vapi=t()}(this,(()=>(()=>{"use strict";var e={473:(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=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return o="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},o(e)}function s(e){var t=function(e){if("object"!==o(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===o(t)?t:String(t)}function a(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nCr,DAILY_ACCESS_LEVEL_LOBBY:()=>Mr,DAILY_ACCESS_LEVEL_NONE:()=>Ar,DAILY_ACCESS_UNKNOWN:()=>Tr,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:()=>Yr,DAILY_CAMERA_ERROR_CAM_IN_USE:()=>Vr,DAILY_CAMERA_ERROR_CONSTRAINTS:()=>Wr,DAILY_CAMERA_ERROR_MIC_IN_USE:()=>qr,DAILY_CAMERA_ERROR_NOT_FOUND:()=>$r,DAILY_CAMERA_ERROR_PERMISSIONS:()=>Gr,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:()=>Jr,DAILY_CAMERA_ERROR_UNKNOWN:()=>zr,DAILY_EVENT_ACCESS_STATE_UPDATED:()=>ui,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:()=>ji,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:()=>xi,DAILY_EVENT_APP_MSG:()=>Ai,DAILY_EVENT_CAMERA_ERROR:()=>ni,DAILY_EVENT_CPU_LOAD_CHANGE:()=>Bi,DAILY_EVENT_ERROR:()=>Xi,DAILY_EVENT_EXIT_FULLSCREEN:()=>Yi,DAILY_EVENT_FACE_COUNTS_UPDATED:()=>Vi,DAILY_EVENT_FULLSCREEN:()=>qi,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:()=>Qr,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:()=>Hr,DAILY_EVENT_INPUT_SETTINGS_UPDATED:()=>Qi,DAILY_EVENT_JOINED_MEETING:()=>ii,DAILY_EVENT_JOINING_MEETING:()=>ri,DAILY_EVENT_LANG_UPDATED:()=>zi,DAILY_EVENT_LEFT_MEETING:()=>oi,DAILY_EVENT_LIVE_STREAMING_ERROR:()=>Wi,DAILY_EVENT_LIVE_STREAMING_STARTED:()=>Gi,DAILY_EVENT_LIVE_STREAMING_STOPPED:()=>$i,DAILY_EVENT_LIVE_STREAMING_UPDATED:()=>Ji,DAILY_EVENT_LOADED:()=>ei,DAILY_EVENT_LOADING:()=>Xr,DAILY_EVENT_LOAD_ATTEMPT_FAILED:()=>Zr,DAILY_EVENT_LOCAL_SCREEN_SHARE_CANCELED:()=>Ri,DAILY_EVENT_LOCAL_SCREEN_SHARE_STARTED:()=>Ii,DAILY_EVENT_LOCAL_SCREEN_SHARE_STOPPED:()=>Ni,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:()=>pi,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:()=>hi,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:()=>di,DAILY_EVENT_NETWORK_CONNECTION:()=>Ui,DAILY_EVENT_NETWORK_QUALITY_CHANGE:()=>Fi,DAILY_EVENT_NONFATAL_ERROR:()=>Ki,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:()=>li,DAILY_EVENT_PARTICIPANT_JOINED:()=>si,DAILY_EVENT_PARTICIPANT_LEFT:()=>ci,DAILY_EVENT_PARTICIPANT_UPDATED:()=>ai,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:()=>Hi,DAILY_EVENT_RECORDING_DATA:()=>Mi,DAILY_EVENT_RECORDING_ERROR:()=>Ti,DAILY_EVENT_RECORDING_STARTED:()=>Ei,DAILY_EVENT_RECORDING_STATS:()=>ki,DAILY_EVENT_RECORDING_STOPPED:()=>wi,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:()=>Ci,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:()=>Pi,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:()=>Li,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:()=>Di,DAILY_EVENT_STARTED_CAMERA:()=>ti,DAILY_EVENT_THEME_UPDATED:()=>Kr,DAILY_EVENT_TRACK_STARTED:()=>gi,DAILY_EVENT_TRACK_STOPPED:()=>_i,DAILY_EVENT_TRANSCRIPTION_ERROR:()=>Si,DAILY_EVENT_TRANSCRIPTION_MSG:()=>Oi,DAILY_EVENT_TRANSCRIPTION_STARTED:()=>yi,DAILY_EVENT_TRANSCRIPTION_STOPPED:()=>bi,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:()=>fi,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:()=>vi,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:()=>mi,DAILY_FATAL_ERROR_CONNECTION:()=>Br,DAILY_FATAL_ERROR_EJECTED:()=>Dr,DAILY_FATAL_ERROR_EOL:()=>Fr,DAILY_FATAL_ERROR_EXP_ROOM:()=>Nr,DAILY_FATAL_ERROR_EXP_TOKEN:()=>Rr,DAILY_FATAL_ERROR_MEETING_FULL:()=>xr,DAILY_FATAL_ERROR_NBF_ROOM:()=>Lr,DAILY_FATAL_ERROR_NBF_TOKEN:()=>Ir,DAILY_FATAL_ERROR_NOT_ALLOWED:()=>Ur,DAILY_FATAL_ERROR_NO_ROOM:()=>jr,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:()=>Pr,DAILY_RECEIVE_SETTINGS_BASE_KEY:()=>Or,DAILY_STATE_ERROR:()=>_r,DAILY_STATE_JOINED:()=>vr,DAILY_STATE_JOINING:()=>mr,DAILY_STATE_LEFT:()=>gr,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:()=>Ns}),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){"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,a;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 c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function P(){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=P.bind(r);return i.listener=n,r.wrapFn=i,i}function L(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;n0&&(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=N(a,c);for(n=0;n=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=0;r--)this.removeListener(e,t[r]);return this},T.prototype.listeners=function(e){return L(this,e,!0)},T.prototype.rawListeners=function(e){return L(this,e,!1)},T.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):I.call(e,t)},T.prototype.listenerCount=I,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"},q={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"},Y={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class G{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=G.getVersionPrecision(e),i=G.getVersionPrecision(t);let o=Math.max(r,i),s=0;const a=G.map([e,t],(e=>{const t=o-G.getVersionPrecision(e),n=e+new Array(t+1).join(".0");return G.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]{n[t]=e[t]}))}return e}static getBrowserAlias(e){return U[e]}static getBrowserTypeByAlias(e){return B[e]||""}}const J=/version\/(\d+(\.?_?\d+)+)/i,$=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,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=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=G.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=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=G.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=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=G.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=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=G.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=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=G.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=G.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=G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:G.getFirstMatch(t,e),version:G.getSecondMatch(t,e)}}}];var W=[{test:[/Roku\/DVP/],describe(e){const t=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:q.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:q.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=G.getWindowsVersionName(t);return{name:q.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:q.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(t),r={name:q.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:q.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=G.getAndroidVersionName(t),r={name:q.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:q.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||G.getFirstMatch(/\bbb(\d+)/i,e);return{name:q.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:q.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:q.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:q.Linux})},{test:[/CrOS/],describe:()=>({name:q.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:q.PlayStation4,version:t}}}],z=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=G.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=G.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})}],H=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:Y.Blink};const t=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Y.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Y.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:Y.Presto},n=G.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:Y.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Y.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:Y.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Q{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=G.find($,(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=G.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=G.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.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=G.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.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.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=G.find(e,(e=>this.isOS(e)));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const r=G.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=G.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=G.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(G.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 K{static getParser(e,t=!1){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new Q(e,t)}static parse(e){return new Q(e).getResult()}static get BROWSER_MAP(){return B}static get ENGINE_MAP(){return Y}static get OS_MAP(){return q}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,t){return null!=t&&t.proxyUrl?t.proxyUrl+("/"===t.proxyUrl.slice(-1)?"":"/")+e.substring(8):e}function te(e){return null!=e&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:ee("https://c.daily.co/call-machine/versioned/".concat("0.72.2","/static/call-machine-object-bundle.js"),e)}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;tfunction(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 ge(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=_e(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 _e(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=_e(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=_e(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++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""}}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{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 De(){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&&Pe((()=>{Ee.console[n](`Sentry Logger [${n}]:`,...t)}))}})):Oe.forEach((e=>{t[e]=()=>{}})),t}let Le;Le="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?ke("logger",De):De();const Ie=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ne(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,...Ye(e)};if(de(e)){const t={type:e.type,target:qe(e.target),currentTarget:qe(e.currentTarget),...Ye(e)};return"undefined"!=typeof CustomEvent&&pe(e,CustomEvent)&&(t.detail=e.detail),t}return e}function qe(e){try{return"undefined"!=typeof Element&&pe(e,Element)?Me(e):Object.prototype.toString.call(e)}catch(e){return""}}function Ye(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 Ge(e){return Je(e,new Map)}function Je(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]=Je(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(Je(e,t))})),r}return e}const $e="";function We(e){try{return e&&"function"==typeof e&&e.name||$e}catch(e){return $e}}const ze=we();function He(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const Qe=we(),Ke=we(),Xe="__sentry_xhr_v2__",Ze={},et={};function tt(e){if(!et[e])switch(et[e]=!0,e){case"console":"console"in Ke&&Oe.forEach((function(e){e in Ke.console&&xe(Ke.console,e,(function(t){return function(...n){rt("console",{args:n,level:e}),t&&t.apply(Ke.console,n)}}))}));break;case"dom":!function(){if(!("document"in Ke))return;const e=rt.bind(null,"dom"),t=ut(e,!0);Ke.document.addEventListener("click",t,!1),Ke.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=Ke[t]&&Ke[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 Ke))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 ze))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(He(ze.fetch))return!0;let e=!1;const t=ze.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=He(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&xe(Ke,"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(Ke,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=Qe.chrome,t=e&&e.app&&e.app.runtime,n="history"in Qe&&!!Qe.history.pushState&&!!Qe.history.replaceState;return!t&&n}())return;const e=Ke.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)}}Ke.onpopstate=function(...t){const n=Ke.location.href,r=st;if(st=n,rt("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},xe(Ke.history,"pushState",t),xe(Ke.history,"replaceState",t)}();break;case"error":dt=Ke.onerror,Ke.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)},Ke.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":ht=Ke.onunhandledrejection,Ke.onunhandledrejection=function(e){return rt("unhandledrejection",e),!(ht&&!ht.__SENTRY_LOADER__)||ht.apply(this,arguments)},Ke.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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__)&&Le.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=Ke.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||"":n||""}function vt(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 gt(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 _t(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=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},Pt="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,t.require("perf_hooks")).performance}catch(t){return}var t}(),Dt=void 0===Pt?Ot:{nowSeconds:()=>(Pt.timeOrigin+Pt.now())/1e3},Lt=Ot.nowSeconds.bind(Ot),It=Dt.nowSeconds.bind(Dt);function Nt(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[Ge({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=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 $t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Ht()}static clone(e){const t=new $t;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&&Jt(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 $t?t:this}return e instanceof $t?(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=Ht(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Lt(),...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&&Le.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 zt(e){Wt().push(e)}function Ht(){return{traceId:pt(),spanId:pt().substring(16),sampled:!1}}const Qt=4,Kt=100;class Xt{constructor(e,t=new $t,n=Qt){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version{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=Kt}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const s={timestamp:Lt(),...e},a=i?Pe((()=>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__)&&Le.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||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),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){let t={};"ok"===e.status&&(t={status:"exited"}),Jt(e,t)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=Gt}=n&&n.getOptions()||{},{userAgent:o}=Ee.navigator||{},s=function(e){const t=It(),n={sid:pt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Ge({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&&Jt(n,e),n}({release:r,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),a=t.getSession&&t.getSession();return a&&"ok"===a.status&&Jt(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__)&&Le.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(Qt)||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(zt,tn),on.push(e.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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=Ie.exec(e);if(!t)return void console.error(`Invalid Sentry Dsn: ${e}`);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]&&(Le.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(Le.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(Le.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Le.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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(_t(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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(t.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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__)&&Le.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Jt(e,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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__)&&Le.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=qt(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:Ne(r)},...i&&{trace:Ge({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Nt(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=qt(n);return Nt({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Ne(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__)&&Le.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)&&(Jt(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||Lt()},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:Gt),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=$t.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=Ge({environment:r.environment||Gt,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?Le.log(t.message):Le.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__)&&Le.error("Error while sending event:",e)}));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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.lengthn(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=Nt(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__)&&Le.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)?Yt: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__)&&Le.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 vn;class gn{constructor(){gn.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=gn.id}setupOnce(){vn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Be(this)||this;return vn.apply(t,e)}}catch(e){}}}gn.__initStatic();const _n=[/^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?[]:_n],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__)&&Le.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__)&&Le.error(`Cannot extract message for event ${mt(e)}`),[]}}return[]}(e).some((e=>ve(e,t)))}(e,t.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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&&ve(n,t)}(e,t.ignoreTransactions)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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&&ve(n,t)}(e,t.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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||ve(n,t)}(e,t.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.error(`Cannot extract url for event ${mt(e)}`),null}}bn.__initStatic();var En=Object.freeze({__proto__:null,FunctionToString:gn,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&&(vt(e,void 0,void 0),gt(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:Dn(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(Pn.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const Pn=/Minified React error #\d+;/i;function Dn(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Ln(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=In(e,s,n,r),vt(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:Nn(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),gt(o,{synthetic:!0}),o):(o=In(e,t,n,r),vt(o,`${t}`,void 0),gt(o,{synthetic:!0}),o)}function In(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 Nn(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__)&&Le.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=""}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{"hidden"===wn.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=Ln(e,t,n&&n.syntheticException||void 0,r);return gt(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=In(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__)&&Le.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:Ne(r)}},o=function(e){return[{type:"user_report"},e]}(e);return Nt(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__)&&Le.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.log("Sending outcomes:",e);const t=(n=e,Nt((r=this._options.tunnel&&Ne(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:Lt(),discarded_events:n}]]));var n,r;this._sendEnvelope(t)}}let qn;function Yn(e,t=function(){if(qn)return qn;if(He(wn.fetch))return qn=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__)&&Le.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return qn=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 qn=void 0,n-=o,r--,kt(e)}}))}class Gn{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Gn.id}__init2(){this._installFunc={onerror:Jn,onunhandledrejection:$n}}constructor(e){Gn.prototype.__init.call(this),Gn.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__)&&Le.log(`Global Handler attached: ${t}`),r(),this._installFunc[n]=void 0)}var t}}function Jn(){nt("error",(e=>{const[t,n,r]=Hn();if(!t.getIntegration(Gn))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(Ln(n,c||i,void 0,r,!1),o,s,a);l.level="error",zn(t,c,l,"onerror")}))}function $n(){nt("unhandledrejection",(e=>{const[t,n,r]=Hn();if(!t.getIntegration(Gn))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)}`}]}}:Ln(n,i,void 0,r,!0);o.level="error",zn(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 zn(e,t,n,r){gt(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Hn(){const e=tn(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}Gn.__initStatic();const Qn=["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 Kn{static __initStatic(){this.id="TryCatch"}__init(){this.name=Kn.id}constructor(e){Kn.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:Qn).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)}})))}Kn.__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 ge(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(){zt((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__)&&Le.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;e0&&void 0!==arguments[0]&&arguments[0];return!po()&&!!vo&&(e?!So()&&["Chrome","Firefox"].includes(Eo()):function(){if(So())return!1;var e=Eo();if("Safari"===e){var t=Mo();if(t.major<15||15===t.major&&t.minor<4)return!1}return"Chrome"===e?ko().major>=77:"Firefox"===e?Ao().major>=97:["Chrome","Firefox","Safari"].includes(e)}())}function _o(){if(po())return!1;if(bo())return!1;if("undefined"==typeof AudioWorkletNode)return!1;switch(Eo()){case"Chrome":case"Firefox":return!0;case"Safari":return wo().major>=17}return!1}function yo(){return fo()&&!function(){var e,t=Eo();if(!ho())return!0;switch(t){case"Chrome":return(e=ko()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Ao()).major<91;case"Safari":return(e=Mo()).major<13||13===e.major&&e.minor<1;default:return!0}}()}function bo(){return ho().match(/Linux; Android/)}function So(){var e,t,n=ho(),r=n.match(/Mac/)&&(!po()&&"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)||!!ho().match(/DailyAnd\//)||void 0}function Eo(){if("undefined"!=typeof window){var e=ho();return To()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||Co()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function wo(){switch(Eo()){case"Chrome":return ko();case"Safari":return Mo();case"Firefox":return Ao();case"Edge":return function(){var e=0,t=0;if("undefined"!=typeof window){var n=ho().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}()}}function ko(){var e=0,t=0,n=0,r=0,i=!1;if("undefined"!=typeof window){var o=ho(),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 To(){return!!ho().match(/iPad|iPhone|iPod/i)&&fo()}function Co(){return ho().indexOf("AppleWebKit/605.1.15")>-1}function Mo(){var e=0,t=0,n=0;if("undefined"!=typeof window){var r=ho().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch(e){}else(To()||Co())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Ao(){var e=0,t=0;if("undefined"!=typeof window){var n=ho().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}var Oo=function(){function e(){i(this,e)}return c(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 Po(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 Do(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=t.data,r=t.mergeStrategy,o=void 0===r?Ro:r;i(this,e),e._validateMergeStrategy(o),e._validateData(n,o),this.mergeStrategy=o,this.data=n}return c(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===jo}},{key:"_validateMergeStrategy",value:function(e){if(!xo.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(xo,"]"))}},{key:"_validateData",value:function(e,t){if(!function(e){if(null==e||"object"!==o(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===Ro){var r=JSON.parse(n);F(r,e)||console.warn("The meeting session data provided will be modified when serialized.",r,e)}else if(t===jo)for(var i in e)if(Object.hasOwnProperty.call(e,i)&&void 0!==e[i]){var s=JSON.parse(JSON.stringify(e[i]));F(e[i],s)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",s,e[i])}}catch(e){throw Error("Meeting session data must be serializable to JSON: ".concat(e))}if(n.length>eo)throw Error("Meeting session data is too large (".concat(n.length," characters). Maximum size suppported is ").concat(eo,"."))}}]),e}();function Uo(e,t,n){return Uo=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&&u(i,n.prototype),i},Uo.apply(null,arguments)}function Bo(e){var t="function"==typeof Map?new Map:void 0;return Bo=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 Uo(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},Bo(e)}function Vo(e){var t,n=null===(t=window._daily)||void 0===t?void 0:t.pendings;if(n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}var qo=function(){function e(t){i(this,e),this._currentLoad=null,this._callClientId=t}return c(e,[{key:"load",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Yo(n,(function(){r(!1)}),(function(e,n){n||Vo(t._callClientId),i(e,n)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),Vo(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),e}(),Yo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;i(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}return c(e,[{key:"start",value:function(){var e=this;this._currentAttempt||(this._currentAttempt=new $o(this._dailyConfig,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 $o(e._dailyConfig,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}(),Go=function(){d(t,Bo(Error));var e=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=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}(t);function t(){return i(this,t),e.apply(this,arguments)}return c(t)}(),Jo=2e4,$o=function(){function e(t,n,r){i(this,e),this._loadAttemptImpl=po()||!t.avoidEval?new Wo(t,n,r):new zo(t,n,r)}var t;return c(e,[{key:"start",value:(t=v((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}(),Wo=function(){function e(t,n,r){i(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}var t,n,r,o;return c(e,[{key:"start",value:(o=v((function*(){var e=te(this._dailyConfig);!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)})),function(){return o.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=v((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=v((function*(e){var t=this;this._networkTimeout=setTimeout((function(){t._networkTimedOut=!0,t._failureCallback({msg:"Timed out (>".concat(Jo," ms) when loading call object bundle ").concat(e),type:"timeout"})}),Jo);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Go;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new Go;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 Go||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(e,": ").concat(t),type:t.message})}})),function(e){return n.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(t=v((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}(),zo=function(){function e(t,n,r){i(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=X(),this._networkTimeout=null,this._scriptElement=null}return c(e,[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=te(this._dailyConfig);"object"===("undefined"==typeof document?"undefined":o(document))?this._startLoading(e):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){t._stopLoading(),t._failureCallback({msg:"Timed out (>".concat(Jo," ms) when loading call object bundle ").concat(e),type:"timeout"})}),Jo);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(e.target.src),type:e.message})},r.src=e,n.appendChild(r)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}]),e}(),Ho=function(e,t,n){return!0===Xo(e.local,t,n)},Qo=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]},Ko=function(e,t,n,r){var i=Zo(e,t,n,r);return i&&i.pendingTrack},Xo=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]},es=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function ts(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];re.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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}}}}(ss.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ss.get(r).lastDevicesString&&(ss.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",as)))})).catch((function(){})))}(e):function(e){ls.has(e)||(ls.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){ls.has(e)&&(ls.get(e).lastDevicesString=JSON.stringify(t),us||(us=setInterval(v((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 cs(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)?cs(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}}}}(ls.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ls.get(r).lastDevicesString&&(ls.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}})),3e3)))})))}(e)}function hs(){return po()||void 0!==navigator.mediaDevices.ondevicechange}var ps=new Set;var fs=["result"],ms=["preserveIframe"];function vs(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 gs(e){for(var t=1;t=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 bs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in t){if(!Number.isInteger(t.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(t.minTilesPerPage,".")),!1;if(t.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(e){return $s(e,{allowAllParticipantsKey:!1})},help:Qs({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error("Failed to validate send settings",e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var n;return!!Ws(e)&&(t._preloadCache.inputSettings||(t._preloadCache.inputSettings={}),zs(e,null===(n=t.properties)||void 0===n?void 0:n.dailyConfig),e.audio&&(t._preloadCache.inputSettings.audio=e.audio),e.video&&(t._preloadCache.inputSettings.video=e.video),!0)},help:Hs()},layout:{validate:function(e){return"custom-v1"===e||"browser"===e||"none"===e},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},Is={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)||!po()&&"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(po()?"":" | '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);t1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,Q),f(l(n=H.call(this)),"startListeningForDeviceChanges",(function(){ds(n.handleDeviceChange)})),f(l(n),"stopListeningForDeviceChanges",(function(){!function(e){hs()?function(e){ss.has(e)&&(ss.delete(e),0===ss.size&&as&&(navigator.mediaDevices.removeEventListener("devicechange",as),as=null))}(e):function(e){ls.has(e)&&(ls.delete(e),0===ls.size&&us&&(clearInterval(us),us=null))}(e)}(n.handleDeviceChange)})),f(l(n),"handleDeviceChange",(function(e){e=e.map((function(e){return JSON.parse(JSON.stringify(e))})),n.emitDailyJSEvent({action:"available-devices-updated",availableDevices:e})})),f(l(n),"handleNativeAppStateChange",function(){var e=v((function*(e){if("destroyed"===e)return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield n.destroy());var t="active"===e;n.disableReactNativeAutoDeviceManagement("video")||(t?n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!0):(n.camUnmutedBeforeLosingNativeActiveState=n.localVideo(),n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!1)))}));return function(t){return e.apply(this,arguments)}}()),f(l(n),"handleNativeAudioFocusChange",(function(e){n.disableReactNativeAutoDeviceManagement("audio")||(n._hasNativeAudioFocus=e,n.toggleParticipantAudioBasedOnNativeAudioFocus(),n._hasNativeAudioFocus?n.micUnmutedBeforeLosingNativeAudioFocus&&n.setLocalAudio(!0):(n.micUnmutedBeforeLosingNativeAudioFocus=n.localAudio(),n.setLocalAudio(!1)))})),f(l(n),"handleNativeSystemScreenCaptureStop",(function(){n.stopScreenShare()})),n.strictMode=void 0===o.strictMode||o.strictMode,n.allowMultipleCallInstances=null!==(t=o.allowMultipleCallInstances)&&void 0!==t&&t,Object.keys(Ss).length&&(n._logDuplicateInstanceAttempt(),!n.allowMultipleCallInstances)){if(n.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),n.callClientId=X(),r=l(n),Ss[r.callClientId]=r,window._daily.instances[n.callClientId]={},n._sharedTracks={},window._daily.instances[n.callClientId].tracks=n._sharedTracks,o.dailyJsVersion=Q.version(),n._iframe=e,n._callObjectMode="none"===o.layout&&!n._iframe,n._preloadCache={subscribeToTracksAutomatically:!0,audioDeviceId:null,videoDeviceId:null,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==o.showLocalVideo?n._callObjectMode?console.error("showLocalVideo is not available in call object mode"):n._showLocalVideo=!!o.showLocalVideo:n._showLocalVideo=!0,void 0!==o.showParticipantsBar?n._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):n._showParticipantsBar=!!o.showParticipantsBar:n._showParticipantsBar=!0,void 0!==o.customIntegrations?n._callObjectMode?console.error("customIntegrations is not available in call object mode"):n._customIntegrations=o.customIntegrations:n._customIntegrations={},void 0!==o.customTrayButtons?n._callObjectMode?console.error("customTrayButtons is not available in call object mode"):n._customTrayButtons=o.customTrayButtons:n._customTrayButtons={},void 0!==o.activeSpeakerMode?n._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):n._activeSpeakerMode=!!o.activeSpeakerMode:n._activeSpeakerMode=!1,o.receiveSettings?n._callObjectMode?n._receiveSettings=o.receiveSettings:console.error("receiveSettings is only available in call object mode"):n._receiveSettings={},n.validateProperties(o),n.properties=gs({},o),n._preloadCache.inputSettings||(n._preloadCache.inputSettings={}),o.inputSettings&&o.inputSettings.audio&&(n._preloadCache.inputSettings.audio=o.inputSettings.audio),o.inputSettings&&o.inputSettings.video&&(n._preloadCache.inputSettings.video=o.inputSettings.video),n._callObjectLoader=n._callObjectMode?new qo(n.callClientId):null,n._callState=hr,n._isPreparingToJoin=!1,n._accessState={access:Tr},n._meetingSessionSummary={},n._finalSummaryOfPrevSession={},n._meetingSessionState=ia(ks,n._callObjectMode),n._nativeInCallAudioMode=Es,n._participants={},n._isScreenSharing=!1,n._participantCounts=Ts,n._rmpPlayerState={},n._waitingParticipants={},n._network={threshold:"good",quality:100},n._activeSpeaker={},n._localAudioLevel=0,n._isLocalAudioLevelObserverRunning=!1,n._remoteParticipantsAudioLevel={},n._isRemoteParticipantsAudioLevelObserverRunning=!1,n._maxAppMessageSize=Zi,n._messageChannel=po()?new No:new Lo,n._iframe&&(n._iframe.requestFullscreen?n._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===n._iframe?(n.emitDailyJSEvent({action:qi}),n.sendMessageToCallMachine({action:qi})):(n.emitDailyJSEvent({action:Yi}),n.sendMessageToCallMachine({action:Yi}))})):n._iframe.webkitRequestFullscreen&&n._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===n._iframe?(n.emitDailyJSEvent({action:qi}),n.sendMessageToCallMachine({action:qi})):(n.emitDailyJSEvent({action:Yi}),n.sendMessageToCallMachine({action:Yi}))}))),po()){var s=n.nativeUtils();s.addAudioFocusChangeListener&&s.removeAudioFocusChangeListener&&s.addAppStateChangeListener&&s.removeAppStateChangeListener&&s.addSystemScreenCaptureStopListener&&s.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),n._hasNativeAudioFocus=!0,s.addAudioFocusChangeListener(n.handleNativeAudioFocusChange),s.addAppStateChangeListener(n.handleNativeAppStateChange),s.addSystemScreenCaptureStopListener(n.handleNativeSystemScreenCaptureStop)}return n._callObjectMode&&n.startListeningForDeviceChanges(),n._messageChannel.addListenerForMessagesFromCallMachine(n.handleMessageFromCallMachine,n.callClientId,l(n)),n}return c(Q,[{key:"destroy",value:(z=v((function*(){var e,t;try{yield this.leave()}catch(e){}var n=this._iframe;if(n){var r=n.parentElement;r&&r.removeChild(n)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),po()){var i=this.nativeUtils();i.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),i.removeAppStateChangeListener(this.handleNativeAppStateChange),i.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete Ss[this.callClientId],(null===(e=window)||void 0===e||null===(t=e._daily)||void 0===t?void 0:t.instances)&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=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 Ys(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:"iframe",value:function(){return Ys(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return Vs(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return Vs(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(e,t){for(var n in t){if(!Is[n])throw new Error("unrecognized updateParticipant property ".concat(n));if(Is[n].validate&&!Is[n].validate(t[n],this,this._participants[e]))throw new Error(Is[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:(W=v((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(Vs(this._callObjectMode,"updateWaitingParticipant()"),js(this._callState,"updateWaitingParticipant()"),"string"!=typeof t||"object"!==o(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 W.apply(this,arguments)})},{key:"updateWaitingParticipants",value:($=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vs(this._callObjectMode,"updateWaitingParticipants()"),js(this._callState,"updateWaitingParticipants()"),"object"!==o(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 $.apply(this,arguments)})},{key:"requestAccess",value:(J=v((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 Vs(this._callObjectMode,"requestAccess()"),js(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){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"forceDiscardTrack"in t&&(po()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),t={}):e&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),t={})),this.sendMessageToCallMachine({action:"local-audio",state:e,options:t}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:e}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(e){return this.sendMessageToCallMachine({action:"local-video",state:e}),this}},{key:"getReceiveSettings",value:(G=v((function*(e){var t=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,r=void 0!==n&&n;if(Vs(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(o(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 G.apply(this,arguments)})},{key:"updateReceiveSettings",value:(Y=v((function*(e){var t=this;if(Vs(this._callObjectMode,"updateReceiveSettings()"),!$s(e,{allowAllParticipantsKey:!0}))throw new Error(Qs({allowAllParticipantsKey:!0}));return js(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 Y.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=gs({},e.audio.processor);delete d._isDefaultWhenNone,l.audio=gs(gs({},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=gs({},e.video.processor);delete p._isDefaultWhenNone,l.video=gs(gs({},e.video),{},{processor:p})}return l}}},{key:"getInputSettings",value:function(){var e=this;return Ys(),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:(q=v((function*(e){var t=this;return Ys(),Ws(e)?(e&&(this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),zs(e,this.properties.dailyConfig),e.audio&&(this._preloadCache.inputSettings.audio=e.audio),e.video&&(this._preloadCache.inputSettings.video=e.video)),e.video||e.audio?this._callObjectMode&&!this._callMachineInitialized?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()):(console.error(Hs()),Promise.reject(Hs()))})),function(e){return q.apply(this,arguments)})},{key:"setBandwidth",value:function(e){var t=e.kbs,n=e.trackConstraints;if(Ys(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:n}),this}},{key:"getDailyLang",value:function(){var e=this;if(Ys(),this._callMachineInitialized)return new Promise((function(t){e.sendMessageToCallMachine({action:"get-daily-lang"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:"setDailyLang",value:function(e){return Ys(),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[gr,_r].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(V=v((function*(){var e=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),js(this._callState,"getMeetingSession()"),new Promise((function(t){e.sendMessageToCallMachine({action:"get-meeting-session"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return V.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return js(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";Vs(this._callObjectMode,"setMeetingSessionData()"),js(this._callState,"setMeetingSessionData");try{!function(e,t){new Fo({data:e,mergeStrategy:t})}(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:"set-session-data",data:e,mergeStrategy:t})}catch(e){throw 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:po()||!!t&&!!t.thisMeetingOnly},(function(e){delete e.action,delete e.callbackStamp,r(e)}))}))}},{key:"setUserData",value:(B=v((function*(e){var t=this;try{Js(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise((function(n){try{t.sendMessageToCallMachine({action:"set-user-data",userData:e},(function(e){delete e.action,delete e.callbackStamp,n(e)}))}catch(e){throw new Error("Error setting user data: ".concat(e))}}))})),function(e){return B.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("undefined"==typeof AudioWorkletNode&&!po())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:e},(function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:e},(function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(U=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vs(this._callObjectMode,"startCamera()"),Fs(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(t),this.properties=gs(gs({},this.properties),t)}return new Promise((function(t){e.sendMessageToCallMachine({action:"start-camera",properties:Rs(e.properties,e.callClientId),preloadCache:Rs(e._preloadCache,e.callClientId)},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return U.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 Ys(),js(this._callState,"startCustomTrack()"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise((function(n,r){e._sharedTracks.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 Ys(),js(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 Gs(),Us(this._callMachineInitialized,"setCamera()"),new Promise((function(n){t.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:e},(function(e){n({device:e.device})}))}))}},{key:"setAudioDevice",value:(x=v((function*(e){return Gs(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(e){return x.apply(this,arguments)})},{key:"cycleCamera",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(n){e.sendMessageToCallMachine({action:"cycle-camera",properties:t},(function(e){n({device:e.device})}))}))}},{key:"cycleMic",value:function(){var e=this;return Ys(),new Promise((function(t){e.sendMessageToCallMachine({action:"cycle-mic"},(function(e){t({device:e.device})}))}))}},{key:"getCameraFacingMode",value:function(){var e=this;return Gs(),new Promise((function(t){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(e){t(e.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(j=v((function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,o=e.videoSource;return Ys(),void 0!==i&&(n=i),void 0!==o&&(r=o),n&&(this._preloadCache.audioDeviceId=n,this._sharedTracks.audioDeviceId=n),r&&(this._preloadCache.videoDeviceId=r,this._sharedTracks.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 j.apply(this,arguments)})},{key:"setOutputDeviceAsync",value:(R=v((function*(e){var t=this,n=e.outputDeviceId;return Ys(),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 R.apply(this,arguments)})},{key:"getInputDevices",value:(N=v((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 Gs(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(Gs(),[Es,ws].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&xs(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",e)}},{key:"preAuth",value:(I=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vs(this._callObjectMode,"preAuth()"),Fs(this._callState,this._isPreparingToJoin,"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=gs(gs({},this.properties),t),new Promise((function(t,n){e.sendMessageToCallMachine({action:"daily-method-preauth",properties:Rs(e.properties,e.callClientId),preloadCache:Rs(e._preloadCache,e.callClientId)},(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 I.apply(this,arguments)})},{key:"load",value:(L=v((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=gs(gs({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(pr),this.emitDailyJSEvent({action:Xr}),this._callObjectMode?new Promise((function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,(function(n){t._bundleLoadTime=n?"no-op":Date.now()-r,t._updateCallState(fr),n&&t.emitDailyJSEvent({action:ei}),e()}),(function(e,r){if(t.emitDailyJSEvent({action:Zr}),!r){t._updateCallState(_r),t.resetMeetingDependentVars();var i={action:Xi,errorMsg:e.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:e,bundleUrl:te(t.properties.dailyConfig)}}};t._maybeSendToSentry(i),t.emitDailyJSEvent(i),n(e.msg)}}))})):(this._iframe.src=ee(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(e,n){t._loadedCallback=function(r){t._callState!==_r?(t._updateCallState(fr),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e()):n(r)}})))}})),function(e){return L.apply(this,arguments)})},{key:"join",value:(D=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();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 console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(t.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=gs(gs({},this.properties),t)}return void 0!==t.showLocalVideo&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!t.showLocalVideo),void 0!==t.showParticipantsBar&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===vr||this._callState===mr?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(mr,!1),this.emitDailyJSEvent({action:ri}),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:Rs(this.properties,this.callClientId),preloadCache:Rs(this._preloadCache,this.callClientId)}),new Promise((function(t,r){e._joinedCallback=function(i,o){if(e._callState!==_r){if(e._updateCallState(vr),i)for(var s in i){if(e._callObjectMode){var a=e._callMachine().store;ts(i[s],a),ns(i[s],a),is(i[s],e._participants[s],a)}e._participants[s]=gs({},i[s]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}n&&e.loadCss(e.properties),t(i)}else r(o)}})))})),function(){return D.apply(this,arguments)})},{key:"leave",value:(P=v((function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(t){e._callState===gr||e._callState===_r?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(gr),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:gr}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return P.apply(this,arguments)})},{key:"startScreenShare",value:(O=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Us(this._callMachineInitialized,"startScreenShare()"),t.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",t.screenVideoSendSettings),t.mediaStream&&(this._sharedTracks.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.emitDailyJSEvent({action:Ki,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:no,captureOptions:t})})),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:no,captureOptions:t})})),function(){return O.apply(this,arguments)})},{key:"stopScreenShare",value:function(){Us(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(gs({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(gs({action:"local-recording-stop"},e))}},{key:"startLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(gs({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(gs({action:"daily-method-stop-live-streaming"},e))}},{key:"validateDailyConfig",value:function(e){e.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),bo()&&e.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw new Error("encodings must be an Array");if(!ra(e.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var r=0;r=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(e.userId){if("string"!=typeof e.userId)throw new Error("Error starting dial out: userId must be a string");if(e.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}return new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:"dialout-start"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return T.apply(this,arguments)})},{key:"stopDialOut",value:function(e){var t=this;return js(this._callState,"stopDialOut()"),new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:"dialout-stop"},e),(function(e){e.error?r(e.error):n(e)}))}))}},{key:"sipCallTransfer",value:(k=v((function*(e){var t=this;if(js(this._callState,"sipCallTransfer()"),!e)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return e.useSipRefer=!1,ta(e,"sipCallTransfer"),new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:uo},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return k.apply(this,arguments)})},{key:"sipRefer",value:(w=v((function*(e){var t=this;if(js(this._callState,"sipRefer()"),!e)throw new Error("sessionId and toEndPoint are mandatory parameter");return e.useSipRefer=!0,ta(e,"sipRefer"),new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:uo},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return w.apply(this,arguments)})},{key:"sendDTMF",value:(E=v((function*(e){var t=this;return js(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(gs({action:"send-dtmf"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return E.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var e=this;return this._callState!==vr?{stats:{latest:{}}}:new Promise((function(t){e.sendMessageToCallMachine({action:"get-calc-stats"},(function(n){t(gs({stats:n.stats},e._network))}))}))}},{key:"testWebsocketConnectivity",value:(S=v((function*(){var e=this;if(Bs(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 S.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"!==Eo())&&e.muted&&!ps.has(e.id)}(e,{isLocalScreenVideo:n})}(e,{isLocalScreenVideo:!1})||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(y=v((function*(){var e=this;Ys(),Vs(this._callObjectMode,"testCallQuality()"),Us(this._callMachineInitialized,"testCallQuality()",null,!0),Fs(this._callState,this._isPreparingToJoin,"testCallQuality()");var t=this._testCallAlreadyInProgress,n=function(n){t||(e._testCallInProgress=n)};if(n(!0),this.needsLoad())try{var i=this._callState;yield this.load(),this._callState=i}catch(e){return n(!1),Promise.reject(e)}return new Promise((function(t){e.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:e.properties.dailyJsVersion},(function(i){var o=i.results,s=o.result,a=r(o,fs);if("failed"===s){var c,l=gs({},a);null!==(c=a.error)&&void 0!==c&&c.details?(a.error.details=JSON.parse(a.error.details),l.error=gs(gs({},l.error),{},{details:gs({},l.error.details)}),l.error.details.duringTest="testCallQuality"):(l.error=l.error?gs({},l.error):{},l.error.details={duringTest:"testCallQuality"}),e._maybeSendToSentry(l)}n(!1),t(gs({result:s},a))}))}))})),function(){return y.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(g=v((function*(e){var t;po()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),t=yield this.testPeerToPeerCallQuality(e)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n})),function(e){return g.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(m=v((function*(e){var t=this;if(Bs(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:r},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return m.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){po()?(console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()):(console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"),this.stopTestCallQuality())}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(p=v((function*(e){var t=this;if(Bs(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._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-network-connectivity"},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return p.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var e=this;return new Promise((function(t){e._callState===vr?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(Ms))}},{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"!==o(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=_(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 Ys(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return Ys(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return Ys(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){return js(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:(h=v((function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===Eo()&&wo().major>115&&wo().major<123&&(t=t.filter((function(e){return"audiooutput"!==e.kind}))),{devices:t.map((function(e){var t=JSON.parse(JSON.stringify(e));if(!po()&&"videoinput"===e.kind&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(null==r||null===(n=r.facingMode)||void 0===n?void 0:n.length)>=1?r.facingMode[0]:void 0}return t}))}}return new Promise((function(t){e.sendMessageToCallMachine({action:"enumerate-devices"},(function(e){t({devices:e.devices})}))}))})),function(){return h.apply(this,arguments)})},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(js(this._callState,"sendAppMessage()"),JSON.stringify(e).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:e,to:t}),this}},{key:"addFakeParticipant",value:function(e){return Ys(),js(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(gs({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return qs(this._callObjectMode,"setShowNamesMode()"),Ys(),e&&"always"!==e&&"never"!==e?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:e}),this)}},{key:"setShowLocalVideo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return qs(this._callObjectMode,"setShowLocalVideo()"),Ys(),js(this._callState,"setShowLocalVideo()"),"boolean"!=typeof e?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:e}),this._showLocalVideo=e,this)}},{key:"showLocalVideo",value:function(){return qs(this._callObjectMode,"showLocalVideo()"),Ys(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return qs(this._callObjectMode,"setShowParticipantsBar()"),Ys(),js(this._callState,"setShowParticipantsBar()"),"boolean"!=typeof e?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:e}),this._showParticipantsBar=e,this)}},{key:"showParticipantsBar",value:function(){return qs(this._callObjectMode,"showParticipantsBar()"),Ys(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return Ys(),qs(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(e){return Ys(),qs(this._callObjectMode,"setCustomIntegrations()"),js(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(Ys(),qs(this._callObjectMode,"startCustomIntegrations()"),js(this._callState,"startCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("startCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:n}),this)}},{key:"stopCustomIntegrations",value:function(e){var t=this;if(Ys(),qs(this._callObjectMode,"stopCustomIntegrations()"),js(this._callState,"stopCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:n}),this)}},{key:"customTrayButtons",value:function(){return qs(this._callObjectMode,"customTrayButtons()"),Ys(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(e){return qs(this._callObjectMode,"updateCustomTrayButtons()"),Ys(),js(this._callState,"updateCustomTrayButtons()"),Xs(e)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:e}),this._customTrayButtons=e,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(Ps))),this)}},{key:"theme",value:function(){return qs(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(e){var t=this;return qs(this._callObjectMode,"setTheme()"),new Promise((function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=gs({},e),t.sendMessageToCallMachine({action:"set-theme",theme:t.properties.theme});try{t.emitDailyJSEvent({action:Kr,theme:t.properties.theme})}catch(e){console.log("could not emit 'theme-updated'",e)}n(t.properties.theme)}catch(e){r(e)}}))}},{key:"requestFullscreen",value:(u=v((function*(){if(Ys(),this._iframe&&!document.fullscreenElement&&mo())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log("could not make video call fullscreen",e)}})),function(){return u.apply(this,arguments)})},{key:"exitFullscreen",value:function(){Ys(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(a=v((function*(){var e=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(t){e.sendMessageToCallMachine({action:"get-sidebar-view"},(function(e){t(e.view)}))}))})),function(){return a.apply(this,arguments)})},{key:"setSidebarView",value:function(e){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:e}),this)}},{key:"room",value:(s=v((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 s.apply(this,arguments)})},{key:"geo",value:(n=v((function*(){try{var e=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield e.json()).geo}}catch(e){return console.error("geo lookup failed",e),{current:""}}})),function(){return n.apply(this,arguments)})},{key:"setNetworkTopology",value:(t=v((function*(e){var t=this;return Ys(),js(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 t.apply(this,arguments)})},{key:"getNetworkTopology",value:(e=v((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 e.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(e){if(Ys(),"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 b.prototype.on.call(this,e,t)}},{key:"once",value:function(e,t){return b.prototype.once.call(this,e,t)}},{key:"off",value:function(e,t){return b.prototype.off.call(this,e,t)}},{key:"validateProperties",value:function(e){for(var t in e){if(!Ls[t])throw new Error("unrecognized property '".concat(t,"'"));if(Ls[t].validate&&!Ls[t].validate(e[t],this))throw new Error("property '".concat(t,"': ").concat(Ls[t].help))}}},{key:"assembleMeetingUrl",value:function(){var e,t,n=gs(gs({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:null!==(e=this.properties.dailyConfig)&&void 0!==e&&e.proxyUrl?encodeURIComponent(null===(t=this.properties.dailyConfig)||void 0===t?void 0:t.proxyUrl):void 0}),r=n.url.match(/\?/)?"&":"?";return n.url+r+Object.keys(Ls).filter((function(e){return Ls[e].queryString&&void 0!==n[e]})).map((function(e){return"".concat(Ls[e].queryString,"=").concat(n[e])})).join("&")}},{key:"needsLoad",value:function(){return[hr,pr,gr,_r].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.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:"handleMessageFromCallMachine",value:function(e){switch(e.action){case Hr:this.sendMessageToCallMachine(gs({action:Qr},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!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.properties.dailyConfig)}};this.sendMessageToCallMachine(t),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case ei:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(e);break;case ii:var n,i=gs({},e);delete i.internal,this._maxAppMessageSize=(null===(n=e.internal)||void 0===n?void 0:n._maxAppMessageSize)||Zi,this._joinedCallback&&(this._joinedCallback(e.participants),this._joinedCallback=null),this.emitDailyJSEvent(i);break;case si:case ai:if(this._callState===gr)return;if(e.participant&&e.participant.session_id){var o=e.participant.local?"local":e.participant.session_id;if(this._callObjectMode){var s=this._callMachine().store;ts(e.participant,s),ns(e.participant,s),is(e.participant,this._participants[o],s)}try{this.maybeParticipantTracksStopped(this._participants[o],e.participant),this.maybeParticipantTracksStarted(this._participants[o],e.participant),this.maybeEventRecordingStopped(this._participants[o],e.participant),this.maybeEventRecordingStarted(this._participants[o],e.participant)}catch(e){console.error("track events error",e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[o])||(this._participants[o]=gs({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case ci:if(e.participant&&e.participant.session_id){var a=this._participants[e.participant.session_id];a&&this.maybeParticipantTracksStopped(a,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case li:F(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case ui:var c={access:e.access};e.awaitingAccess&&(c.awaitingAccess=e.awaitingAccess),F(this._accessState,c)||(this._accessState=c,this.emitDailyJSEvent(e));break;case di:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var l=gs(gs({},e),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(l)}break;case Xi:var u;this._iframe&&!e.preserveIframe&&(this._iframe.src=""),this._updateCallState(_r),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(e.errorMsg),this._loadedCallback=null),e.preserveIframe;var d=r(e,ms);null!=d&&null!==(u=d.error)&&void 0!==u&&u.details&&(d.error.details=JSON.parse(d.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&(this._joinedCallback(null,d),this._joinedCallback=null),this.emitDailyJSEvent(d);break;case oi:this._callState!==_r&&this._updateCallState(gr),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(e);break;case"selected-devices-updated":e.devices&&this.emitDailyJSEvent(e);break;case Fi:var h=e.threshold,p=e.quality;h===this._network.threshold&&p===this._network.quality||(this._network.quality=p,this._network.threshold=h,this.emitDailyJSEvent(e));break;case Bi:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case Vi:e&&void 0!==e.faceCounts&&this.emitDailyJSEvent(e);break;case ji:var f=e.activeSpeaker;this._activeSpeaker.peerId!==f.peerId&&(this._activeSpeaker.peerId=f.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var m=e.show;this._showLocalVideo=m,this.emitDailyJSEvent({action:e.action,show:m});break;case xi:var v=e.enabled;this._activeSpeakerMode!==v&&(this._activeSpeakerMode=v,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case fi:case mi:case vi:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case Hi:F(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case Qi:if(!F(this._inputSettings,e.inputSettings)){var g=this._getInputSettings();this._inputSettings=e.inputSettings,this._preloadCache.inputSettings={},F(g,this._getInputSettings())||this.emitDailyJSEvent({action:e.action,inputSettings:this._getInputSettings()})}break;case"send-settings-updated":F(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case"local-audio-level":this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case Pi:var _=e.session_id;this._rmpPlayerState[_]=e.playerState,this.emitDailyJSEvent(e);break;case Li:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case Di:var y=e.session_id,b=this._rmpPlayerState[y];b&&this.compareEqualForRMPUpdateEvent(b,e.remoteMediaPlayerState)||(this._rmpPlayerState[y]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(e);break;case hi:var S=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=ia(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||S)&&this.emitDailyJSEvent(e);break;case Ii:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case Ni:case Ri:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case Ei:case wi:case ki:case Ti:case Ci:case yi:case bi:case Si:case ti:case ni:case Ai:case Oi:case"test-completed":case Ui:case Mi:case Gi:case Ji:case $i:case Wi:case Ki:case zi:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(e);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(e,t){var n="record";e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:wi}))}},{key:"maybeEventRecordingStarted",value:function(e,t){var n="record";e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:Ei}))}},{key:"maybeEventTrackStopped",value:function(e,t,n,r){e&&("ended"!==e.readyState&&t&&e.id===t.id||this.emitDailyJSEvent({action:_i,track:e,participant:n,type:r}))}},{key:"maybeEventTrackStarted",value:function(e,t,n,r){t&&(e&&"ended"!==e.readyState&&t.id===e.id||this.emitDailyJSEvent({action:gi,track:t,participant:n,type:r}))}},{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{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log("could not emit",e,t)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(e,t){return!(!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 po()?"undefined"==typeof DailyNativeUtils?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(e){this._updateCallState(this._callState,e)}},{key:"_updateCallState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=xs(n,r),o=xs(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=Ts,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Tr},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=ia(ks,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=Zi,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(e){po()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(e){if(po()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(po()&&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.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(e){po()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var e,t;if(po()){var n=null===(e=this._callMachine())||void 0===e||null===(t=e.store)||void 0===t?void 0:t.getState();for(var r in null==n?void 0:n.streams){var i=n.streams[r];i&&i.pendingTrack&&"audio"===i.pendingTrack.kind&&(i.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:"absoluteUrl",value:function(e){if(void 0!==e){var t=document.createElement("a");return t.href=e,t.href}}},{key:"sayHello",value:function(){var e="hello, world.";return console.log(e),e}},{key:"_logUseAfterDestroy",value:function(){var e=Object.values(Ss)[0];if(this.needsLoad())if(e&&!e.needsLoad()){var t={action:io,level:"error",code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var n={action:io,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var e=0,t=Object.values(Ss);e=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}(Eo(),wo())||po())),supportsSfu:!!yo(),supportsVideoProcessing:go(),supportsAudioProcessing:_o()}}},{key:"version",value:function(){return"0.72.2"}},{key:"createCallObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.layout="none",new Q(null,e)}},{key:"wrap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ys(),!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 Q(e,t)}},{key:"createFrame",value:function(e,t){var n,r;Ys(),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 Q(o,r)}catch(e){throw n.removeChild(o),e}}},{key:"createTransparentFrame",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ys();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"),Q.wrap(t,e)}},{key:"getCallInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?Ss[e]:Object.values(Ss)[0]}}]),Q}();function Rs(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)n[r]=oo;else if("dailyConfig"===r){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function js(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==vr){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)),console.error(n),new Error(n)}}function xs(e,t){return[mr,vr].includes(e)||t}function Fs(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(xs(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function Us(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",arguments.length>3&&void 0!==arguments[3]&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function Bs(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(t),new Error(t)}}function Vs(e){if(!e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function qs(e){if(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(t),new Error(t)}}function Ys(){if(po())throw new Error("This daily-js method is not currently supported in React Native")}function Gs(){if(!po())throw new Error("This daily-js method is only supported in React Native")}function Js(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)||console.warn("The userData provided will be modified when serialized.")}catch(e){throw Error("userData must be serializable to JSON: ".concat(e))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function $s(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);s1||"strength"!==n[0]?(console.error(r),!1):!("number"!=typeof t.strength||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error("".concat(r,"; expected: {0 < strength <= 1}, got: ").concat(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 console.error("failed to deduce blob content type",e),!1}var i=n.split(".").at(-1).toLowerCase().trim();return lo.includes(i)}(e.source)||(console.error("invalid image type; supported types: [".concat(lo.join(", "),"]")),!1)):(t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(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){console.warn("invalid key inputSettings -> video -> processor : ".concat(t)),delete e[t]})),!0}(e.video.processor))||e.audio&&("object"!==o(e.audio)||(n=e.audio.processor,r=["type"],!n||"object"!==o(n)||(Object.keys(n).filter((function(e){return!r.includes(e)})).forEach((function(e){console.warn("invalid key inputSettings -> audio -> processor : ".concat(e)),delete n[e]})),t=n.type,"string"!=typeof t||!Object.values(ao).includes(t)&&(console.error("inputSettings audio processor type invalid"),1)))));var t,n,r}function zs(e,t){var n,r=[];e.video&&!go(null!==(n=null==t?void 0:t.useLegacyVideoProcessor)&&void 0!==n&&n)&&(delete e.video,r.push("video")),e.audio&&!_o()&&(delete e.audio,r.push("audio")),r.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(r.join(", ")))}function Hs(){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 Qs(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [ | ".concat(Or).concat(t?' | "'.concat(Pr,'"'):"","]: ")+'{ [video: [{ layer: [ | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [ | "inherit"] } | "inherit"]] }}}'}function Ks(){return"customIntegrations should be an object of type ".concat(JSON.stringify(Ds),".")}function Xs(e){if(e&&"object"!==o(e)||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Ps),".")),!1;if(e)for(var t=0,n=Object.entries(e);t2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function ra(e,t,n){return!("number"!=typeof e||en)}function ia(e,t){return e&&!t&&delete e.data,e}},980:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Api=t.HttpClient=t.ContentType=void 0,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="";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 Array.isArray(r)?r.forEach((e=>{t.append(n,e instanceof Blob||e instanceof File?e:"object"==typeof e&&null!==e?JSON.stringify(e):`${e}`)})):t.append(n,r instanceof Blob||r instanceof File?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.clone();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{call={callControllerCreate:(e,t={})=>this.request({path:"/call",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),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}),callControllerUpdate:(e,t,r={})=>this.request({path:`/call/${e}`,method:"PATCH",body:t,secure:!0,type:n.Json,format:"json",...r}),callControllerDeleteCallData:(e,t={})=>this.request({path:`/call/${e}`,method:"DELETE",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})};v2={callControllerFindAllPaginated:(e,t={})=>this.request({path:"/v2/call",method:"GET",query:e,secure:!0,format:"json",...t})};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})};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}),phoneNumberControllerCreate:(e,t={})=>this.request({path:"/phone-number",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})};file={fileControllerCreateDeprecated:(e,t={})=>this.request({path:"/file/upload",method:"POST",body:e,secure:!0,type:n.FormData,format:"json",...t}),fileControllerCreate:(e,t={})=>this.request({path:"/file",method:"POST",body:e,secure:!0,type:n.FormData,format:"json",...t}),fileControllerFindAll:(e={})=>this.request({path:"/file",method:"GET",secure:!0,format:"json",...e}),fileControllerFindOne:(e,t={})=>this.request({path:`/file/${e}`,method:"GET",secure:!0,format:"json",...t}),fileControllerUpdate:(e,t,r={})=>this.request({path:`/file/${e}`,method:"PATCH",body:t,secure:!0,type:n.Json,format:"json",...r}),fileControllerRemove:(e,t={})=>this.request({path:`/file/${e}`,method:"DELETE",secure:!0,format:"json",...t})};squad={squadControllerCreate:(e,t={})=>this.request({path:"/squad",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),squadControllerFindAll:(e,t={})=>this.request({path:"/squad",method:"GET",query:e,secure:!0,format:"json",...t}),squadControllerFindOne:(e,t={})=>this.request({path:`/squad/${e}`,method:"GET",secure:!0,format:"json",...t}),squadControllerUpdate:(e,t,r={})=>this.request({path:`/squad/${e}`,method:"PATCH",body:t,secure:!0,type:n.Json,format:"json",...r}),squadControllerRemove:(e,t={})=>this.request({path:`/squad/${e}`,method:"DELETE",secure:!0,format:"json",...t})};tool={toolControllerCreate:(e,t={})=>this.request({path:"/tool",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),toolControllerFindAll:(e,t={})=>this.request({path:"/tool",method:"GET",query:e,secure:!0,format:"json",...t}),toolControllerFindOne:(e,t={})=>this.request({path:`/tool/${e}`,method:"GET",secure:!0,format:"json",...t}),toolControllerUpdate:(e,t,r={})=>this.request({path:`/tool/${e}`,method:"PATCH",body:t,secure:!0,type:n.Json,format:"json",...r}),toolControllerRemove:(e,t={})=>this.request({path:`/tool/${e}`,method:"DELETE",secure:!0,format:"json",...t})};metrics={metricsControllerFindAllDeprecated:(e,t={})=>this.request({path:"/metrics",method:"GET",query:e,secure:!0,format:"json",...t})};analytics={metricsControllerQuery:(e,t={})=>this.request({path:"/analytics",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t})};log={loggingControllerGetLogs:(e,t={})=>this.request({path:"/log",method:"GET",query:e,secure:!0,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})};org={orgControllerCreate:(e,t={})=>this.request({path:"/org",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),orgControllerFindAll:(e={})=>this.request({path:"/org",method:"GET",secure:!0,format:"json",...e}),orgControllerFindOne:(e,t={})=>this.request({path:`/org/${e}`,method:"GET",secure:!0,format:"json",...t}),orgControllerUpdate:(e,t,r={})=>this.request({path:`/org/${e}`,method:"PATCH",body:t,secure:!0,type:n.Json,format:"json",...r}),orgControllerFindAllUsers:(e,t={})=>this.request({path:`/org/${e}/user`,method:"GET",secure:!0,format:"json",...t}),orgControllerOrgLeave:(e,t={})=>this.request({path:`/org/${e}/leave`,method:"DELETE",secure:!0,...t}),orgControllerUserInvite:(e,t,r={})=>this.request({path:`/org/${e}/invite`,method:"POST",body:t,secure:!0,type:n.Json,...r})};provider={providerControllerGetWorkflows:(e,t,n={})=>this.request({path:`/${e}/workflows`,method:"GET",query:t,secure:!0,format:"json",...n}),providerControllerGetWorkflowTriggerHook:(e,t,n={})=>this.request({path:`/${e}/workflows/${t}/hooks`,method:"GET",secure:!0,format:"json",...n}),providerControllerGetLocations:(e,t={})=>this.request({path:`/${e}/locations`,method:"GET",secure:!0,format:"json",...t}),voiceProviderControllerSearchVoices:(e,t,n={})=>this.request({path:`/${e}/voices/search`,method:"GET",query:t,secure:!0,format:"json",...n}),voiceProviderControllerSearchVoice:(e,t,n={})=>this.request({path:`/${e}/voice/search`,method:"GET",query:t,secure:!0,format:"json",...n}),voiceProviderControllerAddVoices:(e,t,r={})=>this.request({path:`/${e}/voices/add`,method:"POST",body:t,secure:!0,type:n.Json,format:"json",...r}),voiceProviderControllerAddVoice:(e,t,r={})=>this.request({path:`/${e}/voice/add`,method:"POST",body:t,secure:!0,type:n.Json,format:"json",...r})};v11Labs={voiceProviderControllerCloneVoices:(e,t={})=>this.request({path:"/11labs/voice/clone",method:"POST",body:e,secure:!0,type:n.FormData,...t})};template={templateControllerCreate:(e,t={})=>this.request({path:"/template",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),templateControllerFindAll:(e,t={})=>this.request({path:"/template",method:"GET",query:e,secure:!0,format:"json",...t}),templateControllerFindAllPinned:(e={})=>this.request({path:"/template/pinned",method:"GET",secure:!0,format:"json",...e}),templateControllerFindOne:(e,t={})=>this.request({path:`/template/${e}`,method:"GET",secure:!0,format:"json",...t}),templateControllerUpdate:(e,t,r={})=>this.request({path:`/template/${e}`,method:"PATCH",body:t,secure:!0,type:n.Json,format:"json",...r}),templateControllerRemove:(e,t={})=>this.request({path:`/template/${e}`,method:"DELETE",secure:!0,format:"json",...t})};token={tokenControllerCreate:(e,t={})=>this.request({path:"/token",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t}),tokenControllerFindAll:(e,t={})=>this.request({path:"/token",method:"GET",query:e,secure:!0,format:"json",...t}),tokenControllerFindOne:(e,t={})=>this.request({path:`/token/${e}`,method:"GET",secure:!0,format:"json",...t}),tokenControllerUpdate:(e,t,r={})=>this.request({path:`/token/${e}`,method:"PATCH",body:t,secure:!0,type:n.Json,format:"json",...r}),tokenControllerRemove:(e,t={})=>this.request({path:`/token/${e}`,method:"DELETE",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}),voiceLibraryControllerVoiceLibrarySyncDefaultVoices:(e,t={})=>this.request({path:"/voice-library/sync",method:"POST",body:e,secure:!0,type:n.Json,format:"json",...t})}}},145:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.client=void 0;const r=new(n(980).Api)({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async e=>{if(e)return{headers:{Authorization:`Bearer ${e}`}}}});t.client=r},112: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(473)),o=r(n(7)),s=n(145);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;dailyCallConfig={};dailyCallObject={};constructor(e,t,n,r){super(),s.client.baseUrl=t??"https://api.vapi.ai",s.client.setSecurityData(e),this.dailyCallConfig=n??{},this.dailyCallObject=r??{}}cleanup(){this.started=!1,this.call?.destroy(),this.call=null,this.speakingTimeout=null}isMobileDevice(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent;return/android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(e.toLowerCase())}async sleep(e){return new Promise((t=>setTimeout(t,e)))}async start(e,t,n){if(!e&&!n)throw new Error("Assistant or Squad must be provided.");if(this.started)return null;this.started=!0;try{const r=(await s.client.call.callControllerCreateWebCall({assistant:"string"==typeof e?void 0:e,assistantId:"string"==typeof e?e:void 0,assistantOverrides:t,squad:"string"==typeof n?void 0:n,squadId:"string"==typeof n?n:void 0})).data;this.call&&this.cleanup();const o=r?.artifactPlan?.videoRecordingEnabled??!1,c=r.transport?.assistantVideoEnabled??!1;if(this.call=i.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??o,dailyConfig:this.dailyCallConfig}),this.call.iframe()?.style.setProperty("display","none"),this.call.on("left-meeting",(()=>{this.emit("call-end"),o&&this.call?.stopRecording(),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),o&&this.call?.stopRecording()})),this.call.on("camera-error",(e=>{this.emit("error",e)})),this.call.on("track-started",(async e=>{e&&e.participant&&(e.participant?.local||"Vapi Speaker"===e.participant?.user_name&&("video"===e.track.kind&&this.emit("video",e.track),"audio"===e.track.kind&&await a(e.track,e.participant.session_id),this.call?.sendAppMessage("playable")))})),this.call.on("participant-joined",(e=>{e&&this.call&&function(e,t,n,r){e.participant.local||t.updateParticipant(e.participant.session_id,{setSubscribedTracks:{audio:!0,video:n||r}})}(e,this.call,o,c)})),this.isMobileDevice()&&await this.sleep(1e3),await this.call.join({url:r.webCallUrl,subscribeToTracksAutomatically:!1}),o){const e=(new Date).getTime();this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}}),this.call.on("recording-started",(()=>{this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:((new Date).getTime()-e)/1e3})}))}return 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.on("nonfatal-error",(e=>{"audio-processor-error"===e?.type&&this.call?.updateInputSettings({audio:{processor:{type:"none"}}}).then((()=>{this.call?.setLocalAudio(!0)}))})),this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}}),r}catch(e){return console.error(e),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){console.log("Error parsing message data: ",e)}}catch(e){console.error(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){if(!this.call)throw new Error("Call object is not available.");this.call.setLocalAudio(!e)}isMuted(){return!!this.call&&!1===this.call.localAudio()}say(e,t){this.send({type:"say",message:e,endCallAfterSpoken:t})}setInputDevicesAsync(e){this.call?.setInputDevicesAsync(e)}setOutputDeviceAsync(e){this.call?.setOutputDeviceAsync(e)}getDailyCallObject(){return this.call}}},7: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,l;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 u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}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;n0&&(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=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=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):[]}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.d(r,{default:()=>o});var i=n(112);const o=n.n(i)();return r=r.default})())); \ No newline at end of file +/*! For license information please see vapi-web-bundle-2.2.0.min.js.LICENSE.txt */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Vapi=t():e.Vapi=t()}(this,(()=>(()=>{"use strict";var e={473:(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=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){return o="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},o(e)}function s(e){var t=function(e){if("object"!==o(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===o(t)?t:String(t)}function a(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nCr,DAILY_ACCESS_LEVEL_LOBBY:()=>Mr,DAILY_ACCESS_LEVEL_NONE:()=>Ar,DAILY_ACCESS_UNKNOWN:()=>Tr,DAILY_CAMERA_ERROR_CAM_AND_MIC_IN_USE:()=>Yr,DAILY_CAMERA_ERROR_CAM_IN_USE:()=>Vr,DAILY_CAMERA_ERROR_CONSTRAINTS:()=>Wr,DAILY_CAMERA_ERROR_MIC_IN_USE:()=>qr,DAILY_CAMERA_ERROR_NOT_FOUND:()=>$r,DAILY_CAMERA_ERROR_PERMISSIONS:()=>Gr,DAILY_CAMERA_ERROR_UNDEF_MEDIADEVICES:()=>Jr,DAILY_CAMERA_ERROR_UNKNOWN:()=>zr,DAILY_EVENT_ACCESS_STATE_UPDATED:()=>ui,DAILY_EVENT_ACTIVE_SPEAKER_CHANGE:()=>Ri,DAILY_EVENT_ACTIVE_SPEAKER_MODE_CHANGE:()=>xi,DAILY_EVENT_APP_MSG:()=>Ai,DAILY_EVENT_CAMERA_ERROR:()=>ni,DAILY_EVENT_CPU_LOAD_CHANGE:()=>Ui,DAILY_EVENT_ERROR:()=>Xi,DAILY_EVENT_EXIT_FULLSCREEN:()=>Yi,DAILY_EVENT_FACE_COUNTS_UPDATED:()=>Vi,DAILY_EVENT_FULLSCREEN:()=>qi,DAILY_EVENT_IFRAME_LAUNCH_CONFIG:()=>Qr,DAILY_EVENT_IFRAME_READY_FOR_LAUNCH_CONFIG:()=>Hr,DAILY_EVENT_INPUT_SETTINGS_UPDATED:()=>Qi,DAILY_EVENT_JOINED_MEETING:()=>ii,DAILY_EVENT_JOINING_MEETING:()=>ri,DAILY_EVENT_LANG_UPDATED:()=>zi,DAILY_EVENT_LEFT_MEETING:()=>oi,DAILY_EVENT_LIVE_STREAMING_ERROR:()=>Wi,DAILY_EVENT_LIVE_STREAMING_STARTED:()=>Gi,DAILY_EVENT_LIVE_STREAMING_STOPPED:()=>$i,DAILY_EVENT_LIVE_STREAMING_UPDATED:()=>Ji,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:()=>Ni,DAILY_EVENT_MEETING_SESSION_DATA_ERROR:()=>pi,DAILY_EVENT_MEETING_SESSION_STATE_UPDATED:()=>hi,DAILY_EVENT_MEETING_SESSION_SUMMARY_UPDATED:()=>di,DAILY_EVENT_NETWORK_CONNECTION:()=>Bi,DAILY_EVENT_NETWORK_QUALITY_CHANGE:()=>Fi,DAILY_EVENT_NONFATAL_ERROR:()=>Ki,DAILY_EVENT_PARTICIPANT_COUNTS_UPDATED:()=>li,DAILY_EVENT_PARTICIPANT_JOINED:()=>si,DAILY_EVENT_PARTICIPANT_LEFT:()=>ci,DAILY_EVENT_PARTICIPANT_UPDATED:()=>ai,DAILY_EVENT_RECEIVE_SETTINGS_UPDATED:()=>Hi,DAILY_EVENT_RECORDING_DATA:()=>Mi,DAILY_EVENT_RECORDING_ERROR:()=>Ti,DAILY_EVENT_RECORDING_STARTED:()=>Ei,DAILY_EVENT_RECORDING_STATS:()=>ki,DAILY_EVENT_RECORDING_STOPPED:()=>wi,DAILY_EVENT_RECORDING_UPLOAD_COMPLETED:()=>Ci,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STARTED:()=>Pi,DAILY_EVENT_REMOTE_MEDIA_PLAYER_STOPPED:()=>Li,DAILY_EVENT_REMOTE_MEDIA_PLAYER_UPDATED:()=>Di,DAILY_EVENT_STARTED_CAMERA:()=>ti,DAILY_EVENT_THEME_UPDATED:()=>Kr,DAILY_EVENT_TRACK_STARTED:()=>gi,DAILY_EVENT_TRACK_STOPPED:()=>_i,DAILY_EVENT_TRANSCRIPTION_ERROR:()=>Si,DAILY_EVENT_TRANSCRIPTION_MSG:()=>Oi,DAILY_EVENT_TRANSCRIPTION_STARTED:()=>yi,DAILY_EVENT_TRANSCRIPTION_STOPPED:()=>bi,DAILY_EVENT_WAITING_PARTICIPANT_ADDED:()=>fi,DAILY_EVENT_WAITING_PARTICIPANT_REMOVED:()=>vi,DAILY_EVENT_WAITING_PARTICIPANT_UPDATED:()=>mi,DAILY_FATAL_ERROR_CONNECTION:()=>Ur,DAILY_FATAL_ERROR_EJECTED:()=>Dr,DAILY_FATAL_ERROR_EOL:()=>Fr,DAILY_FATAL_ERROR_EXP_ROOM:()=>Nr,DAILY_FATAL_ERROR_EXP_TOKEN:()=>jr,DAILY_FATAL_ERROR_MEETING_FULL:()=>xr,DAILY_FATAL_ERROR_NBF_ROOM:()=>Lr,DAILY_FATAL_ERROR_NBF_TOKEN:()=>Ir,DAILY_FATAL_ERROR_NOT_ALLOWED:()=>Br,DAILY_FATAL_ERROR_NO_ROOM:()=>Rr,DAILY_RECEIVE_SETTINGS_ALL_PARTICIPANTS_KEY:()=>Pr,DAILY_RECEIVE_SETTINGS_BASE_KEY:()=>Or,DAILY_STATE_ERROR:()=>_r,DAILY_STATE_JOINED:()=>vr,DAILY_STATE_JOINING:()=>mr,DAILY_STATE_LEFT:()=>gr,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:()=>Ns}),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))}j(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&j(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,a;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 c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function P(){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=P.bind(r);return i.listener=n,r.wrapFn=i,i}function L(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;n0&&(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=N(a,c);for(n=0;n=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=0;r--)this.removeListener(e,t[r]);return this},T.prototype.listeners=function(e){return L(this,e,!0)},T.prototype.rawListeners=function(e){return L(this,e,!1)},T.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):I.call(e,t)},T.prototype.listenerCount=I,T.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]};var R=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(R.call(e,n)&&++r&&!R.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 B={"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"},U={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"},q={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"},Y={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class G{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=G.getVersionPrecision(e),i=G.getVersionPrecision(t);let o=Math.max(r,i),s=0;const a=G.map([e,t],(e=>{const t=o-G.getVersionPrecision(e),n=e+new Array(t+1).join(".0");return G.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]{n[t]=e[t]}))}return e}static getBrowserAlias(e){return B[e]}static getBrowserTypeByAlias(e){return U[e]||""}}const J=/version\/(\d+(\.?_?\d+)+)/i,$=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(J,e)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,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=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=G.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=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=G.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=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=G.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=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(J,e)||G.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=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=G.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=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=G.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=G.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=G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=G.getFirstMatch(J,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:G.getFirstMatch(t,e),version:G.getSecondMatch(t,e)}}}];var W=[{test:[/Roku\/DVP/],describe(e){const t=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:q.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:q.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=G.getWindowsVersionName(t);return{name:q.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:q.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(t),r={name:q.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:q.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=G.getAndroidVersionName(t),r={name:q.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:q.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||G.getFirstMatch(/\bbb(\d+)/i,e);return{name:q.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:q.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:q.Tizen,version:t}}},{test:[/linux/i],describe:()=>({name:q.Linux})},{test:[/CrOS/],describe:()=>({name:q.ChromeOS})},{test:[/PlayStation 4/],describe(e){const t=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:q.PlayStation4,version:t}}}],z=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(e){const t=G.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=G.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})}],H=[{test:e=>"microsoft edge"===e.getBrowserName(!0),describe(e){if(/\sedg\//i.test(e))return{name:Y.Blink};const t=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Y.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){const t={name:Y.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:e=>e.test(/presto/i),describe(e){const t={name:Y.Presto},n=G.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:Y.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:Y.Blink})},{test:[/(apple)?webkit/i],describe(e){const t={name:Y.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Q{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=G.find($,(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=G.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=G.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.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=G.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.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.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=G.find(e,(e=>this.isOS(e)));if(n){const e=this.satisfies(t[n]);if(void 0!==e)return e}const r=G.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=G.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=G.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(G.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 K{static getParser(e,t=!1){if("string"!=typeof e)throw new Error("UserAgent should be a string");return new Q(e,t)}static parse(e){return new Q(e).getResult()}static get BROWSER_MAP(){return U}static get ENGINE_MAP(){return Y}static get OS_MAP(){return q}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,t){return null!=t&&t.proxyUrl?t.proxyUrl+("/"===t.proxyUrl.slice(-1)?"":"/")+e.substring(8):e}function te(e){return null!=e&&e.callObjectBundleUrlOverride?e.callObjectBundleUrlOverride:ee("https://c.daily.co/call-machine/versioned/".concat("0.72.2","/static/call-machine-object-bundle.js"),e)}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;tfunction(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 ge(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=_e(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 _e(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=_e(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=_e(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++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""}}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{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 De(){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&&Pe((()=>{Ee.console[n](`Sentry Logger [${n}]:`,...t)}))}})):Oe.forEach((e=>{t[e]=()=>{}})),t}let Le;Le="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?ke("logger",De):De();const Ie=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Ne(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 je(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}class Re 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{Be(i,r)}catch(e){}e[t]=i}function Fe(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function Be(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,Fe(e,"__sentry_original__",t)}function Ue(e){return e.__sentry_original__}function Ve(e){if(ie(e))return{message:e.message,name:e.name,stack:e.stack,...Ye(e)};if(de(e)){const t={type:e.type,target:qe(e.target),currentTarget:qe(e.currentTarget),...Ye(e)};return"undefined"!=typeof CustomEvent&&pe(e,CustomEvent)&&(t.detail=e.detail),t}return e}function qe(e){try{return"undefined"!=typeof Element&&pe(e,Element)?Me(e):Object.prototype.toString.call(e)}catch(e){return""}}function Ye(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 Ge(e){return Je(e,new Map)}function Je(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]=Je(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(Je(e,t))})),r}return e}const $e="";function We(e){try{return e&&"function"==typeof e&&e.name||$e}catch(e){return $e}}const ze=we();function He(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const Qe=we(),Ke=we(),Xe="__sentry_xhr_v2__",Ze={},et={};function tt(e){if(!et[e])switch(et[e]=!0,e){case"console":"console"in Ke&&Oe.forEach((function(e){e in Ke.console&&xe(Ke.console,e,(function(t){return function(...n){rt("console",{args:n,level:e}),t&&t.apply(Ke.console,n)}}))}));break;case"dom":!function(){if(!("document"in Ke))return;const e=rt.bind(null,"dom"),t=ut(e,!0);Ke.document.addEventListener("click",t,!1),Ke.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=Ke[t]&&Ke[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 Ke))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 ze))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}())return!1;if(He(ze.fetch))return!0;let e=!1;const t=ze.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=He(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&xe(Ke,"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(Ke,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=Qe.chrome,t=e&&e.app&&e.app.runtime,n="history"in Qe&&!!Qe.history.pushState&&!!Qe.history.replaceState;return!t&&n}())return;const e=Ke.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)}}Ke.onpopstate=function(...t){const n=Ke.location.href,r=st;if(st=n,rt("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},xe(Ke.history,"pushState",t),xe(Ke.history,"replaceState",t)}();break;case"error":dt=Ke.onerror,Ke.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)},Ke.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":ht=Ke.onunhandledrejection,Ke.onunhandledrejection=function(e){return rt("unhandledrejection",e),!(ht&&!ht.__SENTRY_LOADER__)||ht.apply(this,arguments)},Ke.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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__)&&Le.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=Ke.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||"":n||""}function vt(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 gt(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 _t(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=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},Pt="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,t.require("perf_hooks")).performance}catch(t){return}var t}(),Dt=void 0===Pt?Ot:{nowSeconds:()=>(Pt.timeOrigin+Pt.now())/1e3},Lt=Ot.nowSeconds.bind(Ot),It=Dt.nowSeconds.bind(Dt);function Nt(e,t=[]){return[e,t]}function jt(e,t){const[n,r]=e;return[n,[...r,t]]}function Rt(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 Bt(e,t){const n="string"==typeof e.data?xt(e.data,t):e.data;return[Ge({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=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 $t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Ht()}static clone(e){const t=new $t;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&&Jt(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 $t?t:this}return e instanceof $t?(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=Ht(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Lt(),...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&&Le.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 zt(e){Wt().push(e)}function Ht(){return{traceId:pt(),spanId:pt().substring(16),sampled:!1}}const Qt=4,Kt=100;class Xt{constructor(e,t=new $t,n=Qt){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version{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=Kt}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const s={timestamp:Lt(),...e},a=i?Pe((()=>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__)&&Le.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||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),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){let t={};"ok"===e.status&&(t={status:"exited"}),Jt(e,t)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=Gt}=n&&n.getOptions()||{},{userAgent:o}=Ee.navigator||{},s=function(e){const t=It(),n={sid:pt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Ge({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&&Jt(n,e),n}({release:r,environment:i,user:t.getUser(),...o&&{userAgent:o},...e}),a=t.getSession&&t.getSession();return a&&"ok"===a.status&&Jt(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__)&&Le.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(Qt)||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(zt,tn),on.push(e.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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=Ie.exec(e);if(!t)return void console.error(`Invalid Sentry Dsn: ${e}`);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 je({host:o,pass:i,path:c,projectId:l,port:s,protocol:n,publicKey:r})}(e):je(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]&&(Le.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(Le.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(Le.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(Le.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}(e.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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(_t(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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(t.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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__)&&Le.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Jt(e,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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__)&&Le.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=qt(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:Ne(r)},...i&&{trace:Ge({...i})}}}(e,i,r,t);return delete e.sdkProcessingMetadata,Nt(s,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=jt(n,Bt(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=qt(n);return Nt({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:Ne(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__)&&Le.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)&&(Jt(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||Lt()},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:Gt),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=$t.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=Ge({environment:r.environment||Gt,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?Le.log(t.message):Le.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return kt(new Re("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 Re(`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 Re("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 Re(n);return e}),(e=>{throw new Re(`${t} rejected with ${e}`)}));if(!ue(e)&&null!==e)throw new Re(n);return e}(i,c)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,e),new Re(`${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 Re)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Re(`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__)&&Le.error("Error while sending event:",e)}));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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.lengthn(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(Rt(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=Nt(i[0],o),a=t=>{Rt(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__)&&Le.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)?Yt: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 Re)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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 vn;class gn{constructor(){gn.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=gn.id}setupOnce(){vn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Ue(this)||this;return vn.apply(t,e)}}catch(e){}}}gn.__initStatic();const _n=[/^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?[]:_n],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__)&&Le.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__)&&Le.error(`Cannot extract message for event ${mt(e)}`),[]}}return[]}(e).some((e=>ve(e,t)))}(e,t.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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&&ve(n,t)}(e,t.ignoreTransactions)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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&&ve(n,t)}(e,t.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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||ve(n,t)}(e,t.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.error(`Cannot extract url for event ${mt(e)}`),null}}bn.__initStatic();var En=Object.freeze({__proto__:null,FunctionToString:gn,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(Ue(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&&(vt(e,void 0,void 0),gt(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){}Be(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:Dn(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(Pn.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const Pn=/Minified React error #\d+;/i;function Dn(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Ln(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=In(e,s,n,r),vt(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:Nn(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),gt(o,{synthetic:!0}),o):(o=In(e,t,n,r),vt(o,`${t}`,void 0),gt(o,{synthetic:!0}),o)}function In(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 Nn(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 jn="Breadcrumbs";class Rn{static __initStatic(){this.id=jn}__init(){this.name=Rn.id}constructor(e){Rn.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__)&&Le.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=""}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",Bn),this.options.history&&nt("history",Un)}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{"hidden"===wn.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const i=Ln(e,t,n&&n.syntheticException||void 0,r);return gt(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=In(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(jn);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(e),super.sendEvent(e,t)}captureUserFeedback(e){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.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:Ne(r)}},o=function(e){return[{type:"user_report"},e]}(e);return Nt(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__)&&Le.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Le.log("Sending outcomes:",e);const t=(n=e,Nt((r=this._options.tunnel&&Ne(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:Lt(),discarded_events:n}]]));var n,r;this._sendEnvelope(t)}}let qn;function Yn(e,t=function(){if(qn)return qn;if(He(wn.fetch))return qn=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__)&&Le.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return qn=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 qn=void 0,n-=o,r--,kt(e)}}))}class Gn{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=Gn.id}__init2(){this._installFunc={onerror:Jn,onunhandledrejection:$n}}constructor(e){Gn.prototype.__init.call(this),Gn.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__)&&Le.log(`Global Handler attached: ${t}`),r(),this._installFunc[n]=void 0)}var t}}function Jn(){nt("error",(e=>{const[t,n,r]=Hn();if(!t.getIntegration(Gn))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(Ln(n,c||i,void 0,r,!1),o,s,a);l.level="error",zn(t,c,l,"onerror")}))}function $n(){nt("unhandledrejection",(e=>{const[t,n,r]=Hn();if(!t.getIntegration(Gn))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)}`}]}}:Ln(n,i,void 0,r,!0);o.level="error",zn(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 zn(e,t,n,r){gt(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Hn(){const e=tn(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}Gn.__initStatic();const Qn=["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 Kn{static __initStatic(){this.id="TryCatch"}__init(){this.name=Kn.id}constructor(e){Kn.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:Qn).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=Ue(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)}})))}Kn.__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 ge(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(){zt((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__)&&Le.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;e0&&void 0!==arguments[0]&&arguments[0];return!po()&&!!vo&&(e?!So()&&["Chrome","Firefox"].includes(Eo()):function(){if(So())return!1;var e=Eo();if("Safari"===e){var t=Mo();if(t.major<15||15===t.major&&t.minor<4)return!1}return"Chrome"===e?ko().major>=77:"Firefox"===e?Ao().major>=97:["Chrome","Firefox","Safari"].includes(e)}())}function _o(){if(po())return!1;if(bo())return!1;if("undefined"==typeof AudioWorkletNode)return!1;switch(Eo()){case"Chrome":case"Firefox":return!0;case"Safari":return wo().major>=17}return!1}function yo(){return fo()&&!function(){var e,t=Eo();if(!ho())return!0;switch(t){case"Chrome":return(e=ko()).major&&e.major>0&&e.major<75;case"Firefox":return(e=Ao()).major<91;case"Safari":return(e=Mo()).major<13||13===e.major&&e.minor<1;default:return!0}}()}function bo(){return ho().match(/Linux; Android/)}function So(){var e,t,n=ho(),r=n.match(/Mac/)&&(!po()&&"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)||!!ho().match(/DailyAnd\//)||void 0}function Eo(){if("undefined"!=typeof window){var e=ho();return To()?"Safari":e.indexOf("Edge")>-1?"Edge":e.match(/Chrome\//)?"Chrome":e.indexOf("Safari")>-1||Co()?"Safari":e.indexOf("Firefox")>-1?"Firefox":e.indexOf("MSIE")>-1||e.indexOf(".NET")>-1?"IE":"Unknown Browser"}}function wo(){switch(Eo()){case"Chrome":return ko();case"Safari":return Mo();case"Firefox":return Ao();case"Edge":return function(){var e=0,t=0;if("undefined"!=typeof window){var n=ho().match(/Edge\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}()}}function ko(){var e=0,t=0,n=0,r=0,i=!1;if("undefined"!=typeof window){var o=ho(),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 To(){return!!ho().match(/iPad|iPhone|iPod/i)&&fo()}function Co(){return ho().indexOf("AppleWebKit/605.1.15")>-1}function Mo(){var e=0,t=0,n=0;if("undefined"!=typeof window){var r=ho().match(/Version\/(\d+).(\d+)(.(\d+))?/);if(r)try{e=parseInt(r[1]),t=parseInt(r[2]),n=parseInt(r[4])}catch(e){}else(To()||Co())&&(e=14,t=0,n=3)}return{major:e,minor:t,point:n}}function Ao(){var e=0,t=0;if("undefined"!=typeof window){var n=ho().match(/Firefox\/(\d+).(\d+)/);if(n)try{e=parseInt(n[1]),t=parseInt(n[2])}catch(e){}}return{major:e,minor:t}}var Oo=function(){function e(){i(this,e)}return c(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 Po(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 Do(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=t.data,r=t.mergeStrategy,o=void 0===r?jo:r;i(this,e),e._validateMergeStrategy(o),e._validateData(n,o),this.mergeStrategy=o,this.data=n}return c(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===Ro}},{key:"_validateMergeStrategy",value:function(e){if(!xo.includes(e))throw Error("Unrecognized mergeStrategy provided. Options are: [".concat(xo,"]"))}},{key:"_validateData",value:function(e,t){if(!function(e){if(null==e||"object"!==o(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===jo){var r=JSON.parse(n);F(r,e)||console.warn("The meeting session data provided will be modified when serialized.",r,e)}else if(t===Ro)for(var i in e)if(Object.hasOwnProperty.call(e,i)&&void 0!==e[i]){var s=JSON.parse(JSON.stringify(e[i]));F(e[i],s)||console.warn("At least one key in the meeting session data provided will be modified when serialized.",s,e[i])}}catch(e){throw Error("Meeting session data must be serializable to JSON: ".concat(e))}if(n.length>eo)throw Error("Meeting session data is too large (".concat(n.length," characters). Maximum size suppported is ").concat(eo,"."))}}]),e}();function Bo(e,t,n){return Bo=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&&u(i,n.prototype),i},Bo.apply(null,arguments)}function Uo(e){var t="function"==typeof Map?new Map:void 0;return Uo=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 Bo(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},Uo(e)}function Vo(e){var t,n=null===(t=window._daily)||void 0===t?void 0:t.pendings;if(n){var r=n.indexOf(e);-1!==r&&n.splice(r,1)}}var qo=function(){function e(t){i(this,e),this._currentLoad=null,this._callClientId=t}return c(e,[{key:"load",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;if(this.loaded)return window._daily.instances[this._callClientId].callMachine.reset(),void r(!0);e=this._callClientId,window._daily.pendings.push(e),this._currentLoad&&this._currentLoad.cancel(),this._currentLoad=new Yo(n,(function(){r(!1)}),(function(e,n){n||Vo(t._callClientId),i(e,n)})),this._currentLoad.start()}},{key:"cancel",value:function(){this._currentLoad&&this._currentLoad.cancel(),Vo(this._callClientId)}},{key:"loaded",get:function(){return this._currentLoad&&this._currentLoad.succeeded}}]),e}(),Yo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;i(this,e),this._attemptsRemaining=3,this._currentAttempt=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}return c(e,[{key:"start",value:function(){var e=this;this._currentAttempt||(this._currentAttempt=new $o(this._dailyConfig,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 $o(e._dailyConfig,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}(),Go=function(){d(t,Uo(Error));var e=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=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}(t);function t(){return i(this,t),e.apply(this,arguments)}return c(t)}(),Jo=2e4,$o=function(){function e(t,n,r){i(this,e),this._loadAttemptImpl=po()||!t.avoidEval?new Wo(t,n,r):new zo(t,n,r)}var t;return c(e,[{key:"start",value:(t=v((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}(),Wo=function(){function e(t,n,r){i(this,e),this.cancelled=!1,this.succeeded=!1,this._networkTimedOut=!1,this._networkTimeout=null,this._iosCache="undefined"!=typeof iOSCallObjectBundleCache&&iOSCallObjectBundleCache,this._refetchHeaders=null,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r}var t,n,r,o;return c(e,[{key:"start",value:(o=v((function*(){var e=te(this._dailyConfig);!(yield this._tryLoadFromIOSCache(e))&&this._loadFromNetwork(e)})),function(){return o.apply(this,arguments)})},{key:"cancel",value:function(){clearTimeout(this._networkTimeout),this.cancelled=!0}},{key:"_tryLoadFromIOSCache",value:(r=v((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=v((function*(e){var t=this;this._networkTimeout=setTimeout((function(){t._networkTimedOut=!0,t._failureCallback({msg:"Timed out (>".concat(Jo," ms) when loading call object bundle ").concat(e),type:"timeout"})}),Jo);try{var n=this._refetchHeaders?{headers:this._refetchHeaders}:{},r=yield fetch(e,n);if(clearTimeout(this._networkTimeout),this.cancelled||this._networkTimedOut)throw new Go;var i=yield this._getBundleCodeFromResponse(e,r);if(this.cancelled)throw new Go;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 Go||this.cancelled||this._networkTimedOut)return;this._failureCallback({msg:"Failed to load call object bundle ".concat(e,": ").concat(t),type:t.message})}})),function(e){return n.apply(this,arguments)})},{key:"_getBundleCodeFromResponse",value:(t=v((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}(),zo=function(){function e(t,n,r){i(this,e),this.cancelled=!1,this.succeeded=!1,this._dailyConfig=t,this._successCallback=n,this._failureCallback=r,this._attemptId=X(),this._networkTimeout=null,this._scriptElement=null}return c(e,[{key:"start",value:function(){window._dailyCallMachineLoadWaitlist||(window._dailyCallMachineLoadWaitlist=new Set);var e=te(this._dailyConfig);"object"===("undefined"==typeof document?"undefined":o(document))?this._startLoading(e):this._failureCallback({msg:"Call object bundle must be loaded in a DOM/web context",type:"missing context"})}},{key:"cancel",value:function(){this._stopLoading(),this.cancelled=!0}},{key:"_startLoading",value:function(e){var t=this;this._signUpForCallMachineLoadWaitlist(),this._networkTimeout=setTimeout((function(){t._stopLoading(),t._failureCallback({msg:"Timed out (>".concat(Jo," ms) when loading call object bundle ").concat(e),type:"timeout"})}),Jo);var n=document.getElementsByTagName("head")[0],r=document.createElement("script");this._scriptElement=r,r.onload=function(){t._stopLoading(),t.succeeded=!0,t._successCallback()},r.onerror=function(e){t._stopLoading(),t._failureCallback({msg:"Failed to load call object bundle ".concat(e.target.src),type:e.message})},r.src=e,n.appendChild(r)}},{key:"_stopLoading",value:function(){this._withdrawFromCallMachineLoadWaitlist(),clearTimeout(this._networkTimeout),this._scriptElement&&(this._scriptElement.onload=null,this._scriptElement.onerror=null)}},{key:"_signUpForCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.add(this._attemptId)}},{key:"_withdrawFromCallMachineLoadWaitlist",value:function(){window._dailyCallMachineLoadWaitlist.delete(this._attemptId)}}]),e}(),Ho=function(e,t,n){return!0===Xo(e.local,t,n)},Qo=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]},Ko=function(e,t,n,r){var i=Zo(e,t,n,r);return i&&i.pendingTrack},Xo=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]},es=function(e,t){var n=e.local.public.customTracks;if(n&&n[t])return n[t].track};function ts(e,t){for(var n=t.getState(),r=0,i=["cam","screen"];re.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=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}}}}(ss.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ss.get(r).lastDevicesString&&(ss.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",as)))})).catch((function(){})))}(e):function(e){ls.has(e)||(ls.set(e,{}),navigator.mediaDevices.enumerateDevices().then((function(t){ls.has(e)&&(ls.get(e).lastDevicesString=JSON.stringify(t),us||(us=setInterval(v((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 cs(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)?cs(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}}}}(ls.keys());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=JSON.stringify(t);i!==ls.get(r).lastDevicesString&&(ls.get(r).lastDevicesString=i,r(t))}}catch(e){n.e(e)}finally{n.f()}})),3e3)))})))}(e)}function hs(){return po()||void 0!==navigator.mediaDevices.ondevicechange}var ps=new Set;var fs=["result"],ms=["preserveIframe"];function vs(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 gs(e){for(var t=1;t=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 bs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n49)return console.error("grid.maxTilesPerPage can't be larger than 49 without sacrificing browser performance. Please contact us at https://www.daily.co/contact to talk about your use case."),!1}if("minTilesPerPage"in t){if(!Number.isInteger(t.minTilesPerPage))return console.error("grid.minTilesPerPage should be an integer. You passed ".concat(t.minTilesPerPage,".")),!1;if(t.minTilesPerPage<1)return console.error("grid.minTilesPerPage can't be lower than 1."),!1;if("maxTilesPerPage"in t&&t.minTilesPerPage>t.maxTilesPerPage)return console.error("grid.minTilesPerPage can't be higher than grid.maxTilesPerPage."),!1}}return!0},help:"unsupported layoutConfig. Check error logs for detailed info."},receiveSettings:{validate:function(e){return $s(e,{allowAllParticipantsKey:!1})},help:Qs({allowAllParticipantsKey:!1})},sendSettings:{validate:function(e,t){return!!function(e,t){try{return t.validateUpdateSendSettings(e),!0}catch(e){return console.error("Failed to validate send settings",e),!1}}(e,t)&&(t._preloadCache.sendSettings=e,!0)},help:"Invalid sendSettings provided. Check error logs for detailed info."},inputSettings:{validate:function(e,t){var n;return!!Ws(e)&&(t._preloadCache.inputSettings||(t._preloadCache.inputSettings={}),zs(e,null===(n=t.properties)||void 0===n?void 0:n.dailyConfig),e.audio&&(t._preloadCache.inputSettings.audio=e.audio),e.video&&(t._preloadCache.inputSettings.video=e.video),!0)},help:Hs()},layout:{validate:function(e){return"custom-v1"===e||"browser"===e||"none"===e},help:'layout may only be set to "custom-v1"',queryString:"layout"},emb:{queryString:"emb"},embHref:{queryString:"embHref"},dailyJsVersion:{queryString:"dailyJsVersion"},proxy:{queryString:"proxy"},strictMode:!0,allowMultipleCallInstances:!0},Is={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)||!po()&&"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(po()?"":" | '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);t1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,Q),f(l(n=H.call(this)),"startListeningForDeviceChanges",(function(){ds(n.handleDeviceChange)})),f(l(n),"stopListeningForDeviceChanges",(function(){!function(e){hs()?function(e){ss.has(e)&&(ss.delete(e),0===ss.size&&as&&(navigator.mediaDevices.removeEventListener("devicechange",as),as=null))}(e):function(e){ls.has(e)&&(ls.delete(e),0===ls.size&&us&&(clearInterval(us),us=null))}(e)}(n.handleDeviceChange)})),f(l(n),"handleDeviceChange",(function(e){e=e.map((function(e){return JSON.parse(JSON.stringify(e))})),n.emitDailyJSEvent({action:"available-devices-updated",availableDevices:e})})),f(l(n),"handleNativeAppStateChange",function(){var e=v((function*(e){if("destroyed"===e)return console.warn("App has been destroyed before leaving the meeting. Cleaning up all the resources!"),void(yield n.destroy());var t="active"===e;n.disableReactNativeAutoDeviceManagement("video")||(t?n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!0):(n.camUnmutedBeforeLosingNativeActiveState=n.localVideo(),n.camUnmutedBeforeLosingNativeActiveState&&n.setLocalVideo(!1)))}));return function(t){return e.apply(this,arguments)}}()),f(l(n),"handleNativeAudioFocusChange",(function(e){n.disableReactNativeAutoDeviceManagement("audio")||(n._hasNativeAudioFocus=e,n.toggleParticipantAudioBasedOnNativeAudioFocus(),n._hasNativeAudioFocus?n.micUnmutedBeforeLosingNativeAudioFocus&&n.setLocalAudio(!0):(n.micUnmutedBeforeLosingNativeAudioFocus=n.localAudio(),n.setLocalAudio(!1)))})),f(l(n),"handleNativeSystemScreenCaptureStop",(function(){n.stopScreenShare()})),n.strictMode=void 0===o.strictMode||o.strictMode,n.allowMultipleCallInstances=null!==(t=o.allowMultipleCallInstances)&&void 0!==t&&t,Object.keys(Ss).length&&(n._logDuplicateInstanceAttempt(),!n.allowMultipleCallInstances)){if(n.strictMode)throw new Error("Duplicate DailyIframe instances are not allowed");console.warn("Using strictMode: false to allow multiple call instances is now deprecated. Set `allowMultipleCallInstances: true`")}if(window._daily||(window._daily={pendings:[],instances:{}}),n.callClientId=X(),r=l(n),Ss[r.callClientId]=r,window._daily.instances[n.callClientId]={},n._sharedTracks={},window._daily.instances[n.callClientId].tracks=n._sharedTracks,o.dailyJsVersion=Q.version(),n._iframe=e,n._callObjectMode="none"===o.layout&&!n._iframe,n._preloadCache={subscribeToTracksAutomatically:!0,audioDeviceId:null,videoDeviceId:null,outputDeviceId:null,inputSettings:null,sendSettings:null,videoTrackForNetworkConnectivityTest:null,videoTrackForConnectionQualityTest:null},void 0!==o.showLocalVideo?n._callObjectMode?console.error("showLocalVideo is not available in call object mode"):n._showLocalVideo=!!o.showLocalVideo:n._showLocalVideo=!0,void 0!==o.showParticipantsBar?n._callObjectMode?console.error("showParticipantsBar is not available in call object mode"):n._showParticipantsBar=!!o.showParticipantsBar:n._showParticipantsBar=!0,void 0!==o.customIntegrations?n._callObjectMode?console.error("customIntegrations is not available in call object mode"):n._customIntegrations=o.customIntegrations:n._customIntegrations={},void 0!==o.customTrayButtons?n._callObjectMode?console.error("customTrayButtons is not available in call object mode"):n._customTrayButtons=o.customTrayButtons:n._customTrayButtons={},void 0!==o.activeSpeakerMode?n._callObjectMode?console.error("activeSpeakerMode is not available in call object mode"):n._activeSpeakerMode=!!o.activeSpeakerMode:n._activeSpeakerMode=!1,o.receiveSettings?n._callObjectMode?n._receiveSettings=o.receiveSettings:console.error("receiveSettings is only available in call object mode"):n._receiveSettings={},n.validateProperties(o),n.properties=gs({},o),n._preloadCache.inputSettings||(n._preloadCache.inputSettings={}),o.inputSettings&&o.inputSettings.audio&&(n._preloadCache.inputSettings.audio=o.inputSettings.audio),o.inputSettings&&o.inputSettings.video&&(n._preloadCache.inputSettings.video=o.inputSettings.video),n._callObjectLoader=n._callObjectMode?new qo(n.callClientId):null,n._callState=hr,n._isPreparingToJoin=!1,n._accessState={access:Tr},n._meetingSessionSummary={},n._finalSummaryOfPrevSession={},n._meetingSessionState=ia(ks,n._callObjectMode),n._nativeInCallAudioMode=Es,n._participants={},n._isScreenSharing=!1,n._participantCounts=Ts,n._rmpPlayerState={},n._waitingParticipants={},n._network={threshold:"good",quality:100},n._activeSpeaker={},n._localAudioLevel=0,n._isLocalAudioLevelObserverRunning=!1,n._remoteParticipantsAudioLevel={},n._isRemoteParticipantsAudioLevelObserverRunning=!1,n._maxAppMessageSize=Zi,n._messageChannel=po()?new No:new Lo,n._iframe&&(n._iframe.requestFullscreen?n._iframe.addEventListener("fullscreenchange",(function(){document.fullscreenElement===n._iframe?(n.emitDailyJSEvent({action:qi}),n.sendMessageToCallMachine({action:qi})):(n.emitDailyJSEvent({action:Yi}),n.sendMessageToCallMachine({action:Yi}))})):n._iframe.webkitRequestFullscreen&&n._iframe.addEventListener("webkitfullscreenchange",(function(){document.webkitFullscreenElement===n._iframe?(n.emitDailyJSEvent({action:qi}),n.sendMessageToCallMachine({action:qi})):(n.emitDailyJSEvent({action:Yi}),n.sendMessageToCallMachine({action:Yi}))}))),po()){var s=n.nativeUtils();s.addAudioFocusChangeListener&&s.removeAudioFocusChangeListener&&s.addAppStateChangeListener&&s.removeAppStateChangeListener&&s.addSystemScreenCaptureStopListener&&s.removeSystemScreenCaptureStopListener||console.warn("expected (add|remove)(AudioFocusChange|AppActiveStateChange|SystemScreenCaptureStop)Listener to be available in React Native"),n._hasNativeAudioFocus=!0,s.addAudioFocusChangeListener(n.handleNativeAudioFocusChange),s.addAppStateChangeListener(n.handleNativeAppStateChange),s.addSystemScreenCaptureStopListener(n.handleNativeSystemScreenCaptureStop)}return n._callObjectMode&&n.startListeningForDeviceChanges(),n._messageChannel.addListenerForMessagesFromCallMachine(n.handleMessageFromCallMachine,n.callClientId,l(n)),n}return c(Q,[{key:"destroy",value:(z=v((function*(){var e,t;try{yield this.leave()}catch(e){}var n=this._iframe;if(n){var r=n.parentElement;r&&r.removeChild(n)}if(this._messageChannel.removeListener(this.handleMessageFromCallMachine),po()){var i=this.nativeUtils();i.removeAudioFocusChangeListener(this.handleNativeAudioFocusChange),i.removeAppStateChangeListener(this.handleNativeAppStateChange),i.removeSystemScreenCaptureStopListener(this.handleNativeSystemScreenCaptureStop)}this._callObjectMode&&this.stopListeningForDeviceChanges(),this.resetMeetingDependentVars(),this._destroyed=!0,this.emitDailyJSEvent({action:"call-instance-destroyed"}),delete Ss[this.callClientId],(null===(e=window)||void 0===e||null===(t=e._daily)||void 0===t?void 0:t.instances)&&delete window._daily.instances[this.callClientId],this.strictMode&&(this.callClientId=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 Ys(),this.sendMessageToCallMachine({action:"load-css",cssFile:this.absoluteUrl(n),bodyClass:t,cssText:r}),this}},{key:"iframe",value:function(){return Ys(),this._iframe}},{key:"meetingState",value:function(){return this._callState}},{key:"accessState",value:function(){return Vs(this._callObjectMode,"accessState()"),this._accessState}},{key:"participants",value:function(){return this._participants}},{key:"participantCounts",value:function(){return this._participantCounts}},{key:"waitingParticipants",value:function(){return Vs(this._callObjectMode,"waitingParticipants()"),this._waitingParticipants}},{key:"validateParticipantProperties",value:function(e,t){for(var n in t){if(!Is[n])throw new Error("unrecognized updateParticipant property ".concat(n));if(Is[n].validate&&!Is[n].validate(t[n],this,this._participants[e]))throw new Error(Is[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:(W=v((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(Vs(this._callObjectMode,"updateWaitingParticipant()"),Rs(this._callState,"updateWaitingParticipant()"),"string"!=typeof t||"object"!==o(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 W.apply(this,arguments)})},{key:"updateWaitingParticipants",value:($=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vs(this._callObjectMode,"updateWaitingParticipants()"),Rs(this._callState,"updateWaitingParticipants()"),"object"!==o(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 $.apply(this,arguments)})},{key:"requestAccess",value:(J=v((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 Vs(this._callObjectMode,"requestAccess()"),Rs(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){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"forceDiscardTrack"in t&&(po()?(console.warn("forceDiscardTrack option not supported in React Native; ignoring"),t={}):e&&(console.warn("forceDiscardTrack option only supported when calling setLocalAudio(false); ignoring"),t={})),this.sendMessageToCallMachine({action:"local-audio",state:e,options:t}),this}},{key:"localScreenAudio",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenAudio.state):null}},{key:"localScreenVideo",value:function(){return this._participants.local?!["blocked","off"].includes(this._participants.local.tracks.screenVideo.state):null}},{key:"updateScreenShare",value:function(e){if(this._isScreenSharing)return this.sendMessageToCallMachine({action:"local-screen-update",options:e}),this;console.warn("There is no screen share in progress. Try calling startScreenShare first.")}},{key:"setLocalVideo",value:function(e){return this.sendMessageToCallMachine({action:"local-video",state:e}),this}},{key:"getReceiveSettings",value:(G=v((function*(e){var t=this,n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).showInheritedValues,r=void 0!==n&&n;if(Vs(this._callObjectMode,"getReceiveSettings()"),!this._callMachineInitialized)return this._receiveSettings;switch(o(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 G.apply(this,arguments)})},{key:"updateReceiveSettings",value:(Y=v((function*(e){var t=this;if(Vs(this._callObjectMode,"updateReceiveSettings()"),!$s(e,{allowAllParticipantsKey:!0}))throw new Error(Qs({allowAllParticipantsKey:!0}));return Rs(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 Y.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=gs({},e.audio.processor);delete d._isDefaultWhenNone,l.audio=gs(gs({},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=gs({},e.video.processor);delete p._isDefaultWhenNone,l.video=gs(gs({},e.video),{},{processor:p})}return l}}},{key:"getInputSettings",value:function(){var e=this;return Ys(),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:(q=v((function*(e){var t=this;return Ys(),Ws(e)?(e&&(this._preloadCache.inputSettings||(this._preloadCache.inputSettings={}),zs(e,this.properties.dailyConfig),e.audio&&(this._preloadCache.inputSettings.audio=e.audio),e.video&&(this._preloadCache.inputSettings.video=e.video)),e.video||e.audio?this._callObjectMode&&!this._callMachineInitialized?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()):(console.error(Hs()),Promise.reject(Hs()))})),function(e){return q.apply(this,arguments)})},{key:"setBandwidth",value:function(e){var t=e.kbs,n=e.trackConstraints;if(Ys(),this._callMachineInitialized)return this.sendMessageToCallMachine({action:"set-bandwidth",kbs:t,trackConstraints:n}),this}},{key:"getDailyLang",value:function(){var e=this;if(Ys(),this._callMachineInitialized)return new Promise((function(t){e.sendMessageToCallMachine({action:"get-daily-lang"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))}},{key:"setDailyLang",value:function(e){return Ys(),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[gr,_r].includes(this._callState)?this._finalSummaryOfPrevSession:this._meetingSessionSummary}},{key:"getMeetingSession",value:(V=v((function*(){var e=this;return console.warn("getMeetingSession() is deprecated: use meetingSessionSummary(), which will return immediately"),Rs(this._callState,"getMeetingSession()"),new Promise((function(t){e.sendMessageToCallMachine({action:"get-meeting-session"},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return V.apply(this,arguments)})},{key:"meetingSessionState",value:function(){return Rs(this._callState,"meetingSessionState"),this._meetingSessionState}},{key:"setMeetingSessionData",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace";Vs(this._callObjectMode,"setMeetingSessionData()"),Rs(this._callState,"setMeetingSessionData");try{!function(e,t){new Fo({data:e,mergeStrategy:t})}(e,t)}catch(e){throw console.error(e),e}try{this.sendMessageToCallMachine({action:"set-session-data",data:e,mergeStrategy:t})}catch(e){throw 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:po()||!!t&&!!t.thisMeetingOnly},(function(e){delete e.action,delete e.callbackStamp,r(e)}))}))}},{key:"setUserData",value:(U=v((function*(e){var t=this;try{Js(e)}catch(e){throw console.error(e),e}if(this.properties.userData=e,this._callMachineInitialized)return new Promise((function(n){try{t.sendMessageToCallMachine({action:"set-user-data",userData:e},(function(e){delete e.action,delete e.callbackStamp,n(e)}))}catch(e){throw new Error("Error setting user data: ".concat(e))}}))})),function(e){return U.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("undefined"==typeof AudioWorkletNode&&!po())throw new Error("startLocalAudioLevelObserver() is not supported on this browser");if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isLocalAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-local-audio-level-observer",interval:e},(function(e){t._isLocalAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.localAudioLevelObserver={enabled:!0,interval:e}}},{key:"isLocalAudioLevelObserverRunning",value:function(){return this._isLocalAudioLevelObserverRunning}},{key:"stopLocalAudioLevelObserver",value:function(){this._preloadCache.localAudioLevelObserver=null,this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-local-audio-level-observer"})}},{key:"startRemoteParticipantsAudioLevelObserver",value:function(e){var t=this;if(this.validateAudioLevelInterval(e),this._callMachineInitialized)return this._isRemoteParticipantsAudioLevelObserverRunning=!0,new Promise((function(n,r){t.sendMessageToCallMachine({action:"start-remote-participants-audio-level-observer",interval:e},(function(e){t._isRemoteParticipantsAudioLevelObserverRunning=!e.error,e.error?r({error:e.error}):n()}))}));this._preloadCache.remoteParticipantsAudioLevelObserver={enabled:!0,interval:e}}},{key:"isRemoteParticipantsAudioLevelObserverRunning",value:function(){return this._isRemoteParticipantsAudioLevelObserverRunning}},{key:"stopRemoteParticipantsAudioLevelObserver",value:function(){this._preloadCache.remoteParticipantsAudioLevelObserver=null,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this.sendMessageToCallMachine({action:"stop-remote-participants-audio-level-observer"})}},{key:"startCamera",value:(B=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vs(this._callObjectMode,"startCamera()"),Fs(this._callState,this._isPreparingToJoin,"startCamera()","Did you mean to use setLocalAudio() and/or setLocalVideo() instead?"),this.needsLoad())try{yield this.load(t)}catch(e){return Promise.reject(e)}else{if(this._didPreAuth){if(t.url&&t.url!==this.properties.url)return console.error("url in startCamera() is different than the one used in preAuth()"),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in startCamera() is different than the one used in preAuth()"),Promise.reject()}this.validateProperties(t),this.properties=gs(gs({},this.properties),t)}return new Promise((function(t){e.sendMessageToCallMachine({action:"start-camera",properties:js(e.properties,e.callClientId),preloadCache:js(e._preloadCache,e.callClientId)},(function(e){delete e.action,delete e.callbackStamp,t(e)}))}))})),function(){return B.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 Ys(),Rs(this._callState,"startCustomTrack()"),this.validateCustomTrack(t.track,t.mode,t.trackName),new Promise((function(n,r){e._sharedTracks.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 Ys(),Rs(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 Gs(),Bs(this._callMachineInitialized,"setCamera()"),new Promise((function(n){t.sendMessageToCallMachine({action:"set-camera",cameraDeviceId:e},(function(e){n({device:e.device})}))}))}},{key:"setAudioDevice",value:(x=v((function*(e){return Gs(),this.nativeUtils().setAudioDevice(e),{deviceId:yield this.nativeUtils().getAudioDevice()}})),function(e){return x.apply(this,arguments)})},{key:"cycleCamera",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((function(n){e.sendMessageToCallMachine({action:"cycle-camera",properties:t},(function(e){n({device:e.device})}))}))}},{key:"cycleMic",value:function(){var e=this;return Ys(),new Promise((function(t){e.sendMessageToCallMachine({action:"cycle-mic"},(function(e){t({device:e.device})}))}))}},{key:"getCameraFacingMode",value:function(){var e=this;return Gs(),new Promise((function(t){e.sendMessageToCallMachine({action:"get-camera-facing-mode"},(function(e){t(e.facingMode)}))}))}},{key:"setInputDevicesAsync",value:(R=v((function*(e){var t=this,n=e.audioDeviceId,r=e.videoDeviceId,i=e.audioSource,o=e.videoSource;return Ys(),void 0!==i&&(n=i),void 0!==o&&(r=o),n&&(this._preloadCache.audioDeviceId=n,this._sharedTracks.audioDeviceId=n),r&&(this._preloadCache.videoDeviceId=r,this._sharedTracks.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:(j=v((function*(e){var t=this,n=e.outputDeviceId;return Ys(),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 j.apply(this,arguments)})},{key:"getInputDevices",value:(N=v((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 Gs(),this._nativeInCallAudioMode}},{key:"setNativeInCallAudioMode",value:function(e){if(Gs(),[Es,ws].includes(e)){if(e!==this._nativeInCallAudioMode)return this._nativeInCallAudioMode=e,!this.disableReactNativeAutoDeviceManagement("audio")&&xs(this._callState,this._isPreparingToJoin)&&this.nativeUtils().setAudioMode(this._nativeInCallAudioMode),this}else console.error("invalid in-call audio mode specified: ",e)}},{key:"preAuth",value:(I=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Vs(this._callObjectMode,"preAuth()"),Fs(this._callState,this._isPreparingToJoin,"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=gs(gs({},this.properties),t),new Promise((function(t,n){e.sendMessageToCallMachine({action:"daily-method-preauth",properties:js(e.properties,e.callClientId),preloadCache:js(e._preloadCache,e.callClientId)},(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 I.apply(this,arguments)})},{key:"load",value:(L=v((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=gs(gs({},this.properties),e)),!this._callObjectMode&&!this.properties.url)throw new Error("can't load iframe meeting because url property isn't set");return this._updateCallState(pr),this.emitDailyJSEvent({action:Xr}),this._callObjectMode?new Promise((function(e,n){t._callObjectLoader.cancel();var r=Date.now();t._callObjectLoader.load(t.properties.dailyConfig,(function(n){t._bundleLoadTime=n?"no-op":Date.now()-r,t._updateCallState(fr),n&&t.emitDailyJSEvent({action:ei}),e()}),(function(e,r){if(t.emitDailyJSEvent({action:Zr}),!r){t._updateCallState(_r),t.resetMeetingDependentVars();var i={action:Xi,errorMsg:e.msg,error:{type:"connection-error",msg:"Failed to load call object bundle.",details:{on:"load",sourceError:e,bundleUrl:te(t.properties.dailyConfig)}}};t._maybeSendToSentry(i),t.emitDailyJSEvent(i),n(e.msg)}}))})):(this._iframe.src=ee(this.assembleMeetingUrl(),this.properties.dailyConfig),new Promise((function(e,n){t._loadedCallback=function(r){t._callState!==_r?(t._updateCallState(fr),(t.properties.cssFile||t.properties.cssText)&&t.loadCss(t.properties),e()):n(r)}})))}})),function(e){return L.apply(this,arguments)})},{key:"join",value:(D=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._testCallInProgress&&this.stopTestCallQuality();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 console.error("url in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject();if(t.token&&t.token!==this.properties.token)return console.error("token in join() is different than the one used in preAuth()"),this.updateIsPreparingToJoin(!1),Promise.reject()}if(t.url&&!this._callObjectMode&&t.url&&t.url!==this.properties.url)return console.error("url in join() is different than the one used in load() (".concat(this.properties.url," -> ").concat(t.url,")")),this.updateIsPreparingToJoin(!1),Promise.reject();this.validateProperties(t),this.properties=gs(gs({},this.properties),t)}return void 0!==t.showLocalVideo&&(this._callObjectMode?console.error("showLocalVideo is not available in callObject mode"):this._showLocalVideo=!!t.showLocalVideo),void 0!==t.showParticipantsBar&&(this._callObjectMode?console.error("showParticipantsBar is not available in callObject mode"):this._showParticipantsBar=!!t.showParticipantsBar),this._callState===vr||this._callState===mr?(console.warn("already joined meeting, call leave() before joining again"),void this.updateIsPreparingToJoin(!1)):(this._updateCallState(mr,!1),this.emitDailyJSEvent({action:ri}),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:js(this.properties,this.callClientId),preloadCache:js(this._preloadCache,this.callClientId)}),new Promise((function(t,r){e._joinedCallback=function(i,o){if(e._callState!==_r){if(e._updateCallState(vr),i)for(var s in i){if(e._callObjectMode){var a=e._callMachine().store;ts(i[s],a),ns(i[s],a),is(i[s],e._participants[s],a)}e._participants[s]=gs({},i[s]),e.toggleParticipantAudioBasedOnNativeAudioFocus()}n&&e.loadCss(e.properties),t(i)}else r(o)}})))})),function(){return D.apply(this,arguments)})},{key:"leave",value:(P=v((function*(){var e=this;return this._testCallInProgress&&this.stopTestCallQuality(),new Promise((function(t){e._callState===gr||e._callState===_r?t():e._callObjectLoader&&!e._callObjectLoader.loaded?(e._callObjectLoader.cancel(),e._updateCallState(gr),e.resetMeetingDependentVars(),e.emitDailyJSEvent({action:gr}),t()):(e._resolveLeave=t,e.sendMessageToCallMachine({action:"leave-meeting"}))}))})),function(){return P.apply(this,arguments)})},{key:"startScreenShare",value:(O=v((function*(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Bs(this._callMachineInitialized,"startScreenShare()"),t.screenVideoSendSettings&&this._validateVideoSendSettings("screenVideo",t.screenVideoSendSettings),t.mediaStream&&(this._sharedTracks.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.emitDailyJSEvent({action:Ki,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:no,captureOptions:t})})),n.presentSystemScreenCapturePrompt()}else this.sendMessageToCallMachine({action:no,captureOptions:t})})),function(){return O.apply(this,arguments)})},{key:"stopScreenShare",value:function(){Bs(this._callMachineInitialized,"stopScreenShare()"),this.sendMessageToCallMachine({action:"local-screen-stop"})}},{key:"startRecording",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(gs({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(gs({action:"local-recording-stop"},e))}},{key:"startLiveStreaming",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToCallMachine(gs({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(gs({action:"daily-method-stop-live-streaming"},e))}},{key:"validateDailyConfig",value:function(e){e.camSimulcastEncodings&&(console.warn("camSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide camera simulcast settings."),this.validateSimulcastEncodings(e.camSimulcastEncodings)),e.screenSimulcastEncodings&&console.warn("screenSimulcastEncodings is deprecated. Use sendSettings, found in DailyCallOptions, to provide screen simulcast settings."),bo()&&e.noAutoDefaultDeviceChange&&console.warn("noAutoDefaultDeviceChange is not supported on Android, and will be ignored.")}},{key:"validateSimulcastEncodings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){if(!(e instanceof Array||Array.isArray(e)))throw new Error("encodings must be an Array");if(!ra(e.length,1,3))throw new Error("encodings must be an Array with between 1 to ".concat(3," layers"));for(var r=0;r=200)throw new Error("Error starting dial out: displayName length must be less than 200")}if(e.userId){if("string"!=typeof e.userId)throw new Error("Error starting dial out: userId must be a string");if(e.userId.length>36)throw new Error("Error starting dial out: userId length must be less than or equal to 36")}return new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:"dialout-start"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return T.apply(this,arguments)})},{key:"stopDialOut",value:function(e){var t=this;return Rs(this._callState,"stopDialOut()"),new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:"dialout-stop"},e),(function(e){e.error?r(e.error):n(e)}))}))}},{key:"sipCallTransfer",value:(k=v((function*(e){var t=this;if(Rs(this._callState,"sipCallTransfer()"),!e)throw new Error("sipCallTransfer() requires a sessionId and toEndPoint");return e.useSipRefer=!1,ta(e,"sipCallTransfer"),new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:uo},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return k.apply(this,arguments)})},{key:"sipRefer",value:(w=v((function*(e){var t=this;if(Rs(this._callState,"sipRefer()"),!e)throw new Error("sessionId and toEndPoint are mandatory parameter");return e.useSipRefer=!0,ta(e,"sipRefer"),new Promise((function(n,r){t.sendMessageToCallMachine(gs({action:uo},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return w.apply(this,arguments)})},{key:"sendDTMF",value:(E=v((function*(e){var t=this;return Rs(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(gs({action:"send-dtmf"},e),(function(e){e.error?r(e.error):n(e)}))}))})),function(e){return E.apply(this,arguments)})},{key:"getNetworkStats",value:function(){var e=this;return this._callState!==vr?{stats:{latest:{}}}:new Promise((function(t){e.sendMessageToCallMachine({action:"get-calc-stats"},(function(n){t(gs({stats:n.stats},e._network))}))}))}},{key:"testWebsocketConnectivity",value:(S=v((function*(){var e=this;if(Us(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 S.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"!==Eo())&&e.muted&&!ps.has(e.id)}(e,{isLocalScreenVideo:n})}(e,{isLocalScreenVideo:!1})||(console.error("Video track is not playable. This test needs a live video track."),!1):(console.error("Video track needs to be of type `MediaStreamTrack`."),!1):(console.error("Missing video track. You must provide a video track in order to run this test."),!1)}},{key:"testCallQuality",value:(y=v((function*(){var e=this;Ys(),Vs(this._callObjectMode,"testCallQuality()"),Bs(this._callMachineInitialized,"testCallQuality()",null,!0),Fs(this._callState,this._isPreparingToJoin,"testCallQuality()");var t=this._testCallAlreadyInProgress,n=function(n){t||(e._testCallInProgress=n)};if(n(!0),this.needsLoad())try{var i=this._callState;yield this.load(),this._callState=i}catch(e){return n(!1),Promise.reject(e)}return new Promise((function(t){e.sendMessageToCallMachine({action:"test-call-quality",dailyJsVersion:e.properties.dailyJsVersion},(function(i){var o=i.results,s=o.result,a=r(o,fs);if("failed"===s){var c,l=gs({},a);null!==(c=a.error)&&void 0!==c&&c.details?(a.error.details=JSON.parse(a.error.details),l.error=gs(gs({},l.error),{},{details:gs({},l.error.details)}),l.error.details.duringTest="testCallQuality"):(l.error=l.error?gs({},l.error):{},l.error.details={duringTest:"testCallQuality"}),e._maybeSendToSentry(l)}n(!1),t(gs({result:s},a))}))}))})),function(){return y.apply(this,arguments)})},{key:"stopTestCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-call-quality"})}},{key:"testConnectionQuality",value:(g=v((function*(e){var t;po()?(console.warn("testConnectionQuality() is deprecated: use testPeerToPeerCallQuality() instead"),t=yield this.testPeerToPeerCallQuality(e)):(console.warn("testConnectionQuality() is deprecated: use testCallQuality() instead"),t=yield this.testCallQuality());var n={result:t.result,secondsElapsed:t.secondsElapsed};return t.data&&(n.data={maxRTT:t.data.maxRoundTripTime,packetLoss:t.data.avgRecvPacketLoss}),n})),function(e){return g.apply(this,arguments)})},{key:"testPeerToPeerCallQuality",value:(m=v((function*(e){var t=this;if(Us(this._testCallInProgress,"testPeerToPeerCallQuality()"),this.needsLoad())try{yield this.load()}catch(e){return Promise.reject(e)}var n=e.videoTrack,r=e.duration;if(!this._validateVideoTrackForNetworkTests(n))throw new Error("Video track error");return this._sharedTracks.videoTrackForConnectionQualityTest=n,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-p2p-call-quality",duration:r},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return m.apply(this,arguments)})},{key:"stopTestConnectionQuality",value:function(){po()?(console.warn("stopTestConnectionQuality() is deprecated: use testPeerToPeerCallQuality() and stopTestPeerToPeerCallQuality() instead"),this.stopTestPeerToPeerCallQuality()):(console.warn("stopTestConnectionQuality() is deprecated: use testCallQuality() and stopTestCallQuality() instead"),this.stopTestCallQuality())}},{key:"stopTestPeerToPeerCallQuality",value:function(){this.sendMessageToCallMachine({action:"stop-test-p2p-call-quality"})}},{key:"testNetworkConnectivity",value:(p=v((function*(e){var t=this;if(Us(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._sharedTracks.videoTrackForNetworkConnectivityTest=e,new Promise((function(e,n){t.sendMessageToCallMachine({action:"test-network-connectivity"},(function(t){t.error?n(t.error):e(t.results)}))}))})),function(e){return p.apply(this,arguments)})},{key:"abortTestNetworkConnectivity",value:function(){this.sendMessageToCallMachine({action:"abort-test-network-connectivity"})}},{key:"getCpuLoadStats",value:function(){var e=this;return new Promise((function(t){e._callState===vr?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(Ms))}},{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"!==o(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=_(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 Ys(),this._activeSpeaker}},{key:"setActiveSpeakerMode",value:function(e){return Ys(),this.sendMessageToCallMachine({action:"set-active-speaker-mode",enabled:e}),this}},{key:"activeSpeakerMode",value:function(){return Ys(),this._activeSpeakerMode}},{key:"subscribeToTracksAutomatically",value:function(){return this._preloadCache.subscribeToTracksAutomatically}},{key:"setSubscribeToTracksAutomatically",value:function(e){return Rs(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:(h=v((function*(){var e=this;if(this._callObjectMode){var t=yield navigator.mediaDevices.enumerateDevices();return"Firefox"===Eo()&&wo().major>115&&wo().major<123&&(t=t.filter((function(e){return"audiooutput"!==e.kind}))),{devices:t.map((function(e){var t=JSON.parse(JSON.stringify(e));if(!po()&&"videoinput"===e.kind&&e.getCapabilities){var n,r=e.getCapabilities();t.facing=(null==r||null===(n=r.facingMode)||void 0===n?void 0:n.length)>=1?r.facingMode[0]:void 0}return t}))}}return new Promise((function(t){e.sendMessageToCallMachine({action:"enumerate-devices"},(function(e){t({devices:e.devices})}))}))})),function(){return h.apply(this,arguments)})},{key:"sendAppMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*";if(Rs(this._callState,"sendAppMessage()"),JSON.stringify(e).length>this._maxAppMessageSize)throw new Error("Message data too large. Max size is "+this._maxAppMessageSize);return this.sendMessageToCallMachine({action:"app-msg",data:e,to:t}),this}},{key:"addFakeParticipant",value:function(e){return Ys(),Rs(this._callState,"addFakeParticipant()"),this.sendMessageToCallMachine(gs({action:"add-fake-participant"},e)),this}},{key:"setShowNamesMode",value:function(e){return qs(this._callObjectMode,"setShowNamesMode()"),Ys(),e&&"always"!==e&&"never"!==e?(console.error('setShowNamesMode argument should be "always", "never", or false'),this):(this.sendMessageToCallMachine({action:"set-show-names",mode:e}),this)}},{key:"setShowLocalVideo",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return qs(this._callObjectMode,"setShowLocalVideo()"),Ys(),Rs(this._callState,"setShowLocalVideo()"),"boolean"!=typeof e?(console.error("setShowLocalVideo only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-local-video",show:e}),this._showLocalVideo=e,this)}},{key:"showLocalVideo",value:function(){return qs(this._callObjectMode,"showLocalVideo()"),Ys(),this._showLocalVideo}},{key:"setShowParticipantsBar",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return qs(this._callObjectMode,"setShowParticipantsBar()"),Ys(),Rs(this._callState,"setShowParticipantsBar()"),"boolean"!=typeof e?(console.error("setShowParticipantsBar only accepts a boolean value"),this):(this.sendMessageToCallMachine({action:"set-show-participants-bar",show:e}),this._showParticipantsBar=e,this)}},{key:"showParticipantsBar",value:function(){return qs(this._callObjectMode,"showParticipantsBar()"),Ys(),this._showParticipantsBar}},{key:"customIntegrations",value:function(){return Ys(),qs(this._callObjectMode,"customIntegrations()"),this._customIntegrations}},{key:"setCustomIntegrations",value:function(e){return Ys(),qs(this._callObjectMode,"setCustomIntegrations()"),Rs(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(Ys(),qs(this._callObjectMode,"startCustomIntegrations()"),Rs(this._callState,"startCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("startCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"start-custom-integrations",ids:n}),this)}},{key:"stopCustomIntegrations",value:function(e){var t=this;if(Ys(),qs(this._callObjectMode,"stopCustomIntegrations()"),Rs(this._callState,"stopCustomIntegrations()"),Array.isArray(e)&&e.some((function(e){return"string"!=typeof e}))||!Array.isArray(e)&&"string"!=typeof e)return console.error("stopCustomIntegrations() only accepts string | string[]"),this;var n="string"==typeof e?[e]:e,r=n.filter((function(e){return!(e in t._customIntegrations)}));return r.length?(console.error("Can't find custom integration(s): \"".concat(r.join(", "),'"')),this):(this.sendMessageToCallMachine({action:"stop-custom-integrations",ids:n}),this)}},{key:"customTrayButtons",value:function(){return qs(this._callObjectMode,"customTrayButtons()"),Ys(),this._customTrayButtons}},{key:"updateCustomTrayButtons",value:function(e){return qs(this._callObjectMode,"updateCustomTrayButtons()"),Ys(),Rs(this._callState,"updateCustomTrayButtons()"),Xs(e)?(this.sendMessageToCallMachine({action:"update-custom-tray-buttons",btns:e}),this._customTrayButtons=e,this):(console.error("updateCustomTrayButtons only accepts a dictionary of the type ".concat(JSON.stringify(Ps))),this)}},{key:"theme",value:function(){return qs(this._callObjectMode,"theme()"),this.properties.theme}},{key:"setTheme",value:function(e){var t=this;return qs(this._callObjectMode,"setTheme()"),new Promise((function(n,r){try{t.validateProperties({theme:e}),t.properties.theme=gs({},e),t.sendMessageToCallMachine({action:"set-theme",theme:t.properties.theme});try{t.emitDailyJSEvent({action:Kr,theme:t.properties.theme})}catch(e){console.log("could not emit 'theme-updated'",e)}n(t.properties.theme)}catch(e){r(e)}}))}},{key:"requestFullscreen",value:(u=v((function*(){if(Ys(),this._iframe&&!document.fullscreenElement&&mo())try{(yield this._iframe.requestFullscreen)?this._iframe.requestFullscreen():this._iframe.webkitRequestFullscreen()}catch(e){console.log("could not make video call fullscreen",e)}})),function(){return u.apply(this,arguments)})},{key:"exitFullscreen",value:function(){Ys(),document.fullscreenElement?document.exitFullscreen():document.webkitFullscreenElement&&document.webkitExitFullscreen()}},{key:"getSidebarView",value:(a=v((function*(){var e=this;return this._callObjectMode?(console.error("getSidebarView is not available in callObject mode"),Promise.resolve(null)):new Promise((function(t){e.sendMessageToCallMachine({action:"get-sidebar-view"},(function(e){t(e.view)}))}))})),function(){return a.apply(this,arguments)})},{key:"setSidebarView",value:function(e){return this._callObjectMode?(console.error("setSidebarView is not available in callObject mode"),this):(this.sendMessageToCallMachine({action:"set-sidebar-view",view:e}),this)}},{key:"room",value:(s=v((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 s.apply(this,arguments)})},{key:"geo",value:(n=v((function*(){try{var e=yield fetch("https://gs.daily.co/_ks_/x-swsl/:");return{current:(yield e.json()).geo}}catch(e){return console.error("geo lookup failed",e),{current:""}}})),function(){return n.apply(this,arguments)})},{key:"setNetworkTopology",value:(t=v((function*(e){var t=this;return Ys(),Rs(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 t.apply(this,arguments)})},{key:"getNetworkTopology",value:(e=v((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 e.apply(this,arguments)})},{key:"setPlayNewParticipantSound",value:function(e){if(Ys(),"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 b.prototype.on.call(this,e,t)}},{key:"once",value:function(e,t){return b.prototype.once.call(this,e,t)}},{key:"off",value:function(e,t){return b.prototype.off.call(this,e,t)}},{key:"validateProperties",value:function(e){for(var t in e){if(!Ls[t])throw new Error("unrecognized property '".concat(t,"'"));if(Ls[t].validate&&!Ls[t].validate(e[t],this))throw new Error("property '".concat(t,"': ").concat(Ls[t].help))}}},{key:"assembleMeetingUrl",value:function(){var e,t,n=gs(gs({},this.properties),{},{emb:this.callClientId,embHref:encodeURIComponent(window.location.href),proxy:null!==(e=this.properties.dailyConfig)&&void 0!==e&&e.proxyUrl?encodeURIComponent(null===(t=this.properties.dailyConfig)||void 0===t?void 0:t.proxyUrl):void 0}),r=n.url.match(/\?/)?"&":"?";return n.url+r+Object.keys(Ls).filter((function(e){return Ls[e].queryString&&void 0!==n[e]})).map((function(e){return"".concat(Ls[e].queryString,"=").concat(n[e])})).join("&")}},{key:"needsLoad",value:function(){return[hr,pr,gr,_r].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.callClientId,this._iframe)}},{key:"forwardPackagedMessageToCallMachine",value:function(e){this._messageChannel.forwardPackagedMessageToCallMachine(e,this._iframe,this.callClientId)}},{key:"addListenerForPackagedMessagesFromCallMachine",value:function(e){return this._messageChannel.addListenerForPackagedMessagesFromCallMachine(e,this.callClientId)}},{key:"removeListenerForPackagedMessagesFromCallMachine",value:function(e){this._messageChannel.removeListenerForPackagedMessagesFromCallMachine(e)}},{key:"handleMessageFromCallMachine",value:function(e){switch(e.action){case Hr:this.sendMessageToCallMachine(gs({action:Qr},this.properties));break;case"call-machine-initialized":this._callMachineInitialized=!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.properties.dailyConfig)}};this.sendMessageToCallMachine(t),this._delayDuplicateInstanceLog&&this._logDuplicateInstanceAttempt();break;case ei:this._loadedCallback&&(this._loadedCallback(),this._loadedCallback=null),this.emitDailyJSEvent(e);break;case ii:var n,i=gs({},e);delete i.internal,this._maxAppMessageSize=(null===(n=e.internal)||void 0===n?void 0:n._maxAppMessageSize)||Zi,this._joinedCallback&&(this._joinedCallback(e.participants),this._joinedCallback=null),this.emitDailyJSEvent(i);break;case si:case ai:if(this._callState===gr)return;if(e.participant&&e.participant.session_id){var o=e.participant.local?"local":e.participant.session_id;if(this._callObjectMode){var s=this._callMachine().store;ts(e.participant,s),ns(e.participant,s),is(e.participant,this._participants[o],s)}try{this.maybeParticipantTracksStopped(this._participants[o],e.participant),this.maybeParticipantTracksStarted(this._participants[o],e.participant),this.maybeEventRecordingStopped(this._participants[o],e.participant),this.maybeEventRecordingStarted(this._participants[o],e.participant)}catch(e){console.error("track events error",e)}this.compareEqualForParticipantUpdateEvent(e.participant,this._participants[o])||(this._participants[o]=gs({},e.participant),this.toggleParticipantAudioBasedOnNativeAudioFocus(),this.emitDailyJSEvent(e))}break;case ci:if(e.participant&&e.participant.session_id){var a=this._participants[e.participant.session_id];a&&this.maybeParticipantTracksStopped(a,null),delete this._participants[e.participant.session_id],this.emitDailyJSEvent(e)}break;case li:F(this._participantCounts,e.participantCounts)||(this._participantCounts=e.participantCounts,this.emitDailyJSEvent(e));break;case ui:var c={access:e.access};e.awaitingAccess&&(c.awaitingAccess=e.awaitingAccess),F(this._accessState,c)||(this._accessState=c,this.emitDailyJSEvent(e));break;case di:if(e.meetingSession){this._meetingSessionSummary=e.meetingSession,this.emitDailyJSEvent(e);var l=gs(gs({},e),{},{action:"meeting-session-updated"});this.emitDailyJSEvent(l)}break;case Xi:var u;this._iframe&&!e.preserveIframe&&(this._iframe.src=""),this._updateCallState(_r),this.resetMeetingDependentVars(),this._loadedCallback&&(this._loadedCallback(e.errorMsg),this._loadedCallback=null),e.preserveIframe;var d=r(e,ms);null!=d&&null!==(u=d.error)&&void 0!==u&&u.details&&(d.error.details=JSON.parse(d.error.details)),this._maybeSendToSentry(e),this._joinedCallback&&(this._joinedCallback(null,d),this._joinedCallback=null),this.emitDailyJSEvent(d);break;case oi:this._callState!==_r&&this._updateCallState(gr),this.resetMeetingDependentVars(),this._resolveLeave&&(this._resolveLeave(),this._resolveLeave=null),this.emitDailyJSEvent(e);break;case"selected-devices-updated":e.devices&&this.emitDailyJSEvent(e);break;case Fi:var h=e.threshold,p=e.quality;h===this._network.threshold&&p===this._network.quality||(this._network.quality=p,this._network.threshold=h,this.emitDailyJSEvent(e));break;case Ui:e&&e.cpuLoadState&&this.emitDailyJSEvent(e);break;case Vi:e&&void 0!==e.faceCounts&&this.emitDailyJSEvent(e);break;case Ri:var f=e.activeSpeaker;this._activeSpeaker.peerId!==f.peerId&&(this._activeSpeaker.peerId=f.peerId,this.emitDailyJSEvent({action:e.action,activeSpeaker:this._activeSpeaker}));break;case"show-local-video-changed":if(this._callObjectMode)return;var m=e.show;this._showLocalVideo=m,this.emitDailyJSEvent({action:e.action,show:m});break;case xi:var v=e.enabled;this._activeSpeakerMode!==v&&(this._activeSpeakerMode=v,this.emitDailyJSEvent({action:e.action,enabled:this._activeSpeakerMode}));break;case fi:case mi:case vi:this._waitingParticipants=e.allWaitingParticipants,this.emitDailyJSEvent({action:e.action,participant:e.participant});break;case Hi:F(this._receiveSettings,e.receiveSettings)||(this._receiveSettings=e.receiveSettings,this.emitDailyJSEvent({action:e.action,receiveSettings:e.receiveSettings}));break;case Qi:if(!F(this._inputSettings,e.inputSettings)){var g=this._getInputSettings();this._inputSettings=e.inputSettings,this._preloadCache.inputSettings={},F(g,this._getInputSettings())||this.emitDailyJSEvent({action:e.action,inputSettings:this._getInputSettings()})}break;case"send-settings-updated":F(this._sendSettings,e.sendSettings)||(this._sendSettings=e.sendSettings,this._preloadCache.sendSettings=null,this.emitDailyJSEvent({action:e.action,sendSettings:e.sendSettings}));break;case"local-audio-level":this._localAudioLevel=e.audioLevel,this._preloadCache.localAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case"remote-participants-audio-level":this._remoteParticipantsAudioLevel=e.participantsAudioLevel,this._preloadCache.remoteParticipantsAudioLevelObserver=null,this.emitDailyJSEvent(e);break;case Pi:var _=e.session_id;this._rmpPlayerState[_]=e.playerState,this.emitDailyJSEvent(e);break;case Li:delete this._rmpPlayerState[e.session_id],this.emitDailyJSEvent(e);break;case Di:var y=e.session_id,b=this._rmpPlayerState[y];b&&this.compareEqualForRMPUpdateEvent(b,e.remoteMediaPlayerState)||(this._rmpPlayerState[y]=e.remoteMediaPlayerState,this.emitDailyJSEvent(e));break;case"custom-button-click":case"sidebar-view-changed":this.emitDailyJSEvent(e);break;case hi:var S=this._meetingSessionState.topology!==(e.meetingSessionState&&e.meetingSessionState.topology);this._meetingSessionState=ia(e.meetingSessionState,this._callObjectMode),(this._callObjectMode||S)&&this.emitDailyJSEvent(e);break;case Ii:this._isScreenSharing=!0,this.emitDailyJSEvent(e);break;case Ni:case ji:this._isScreenSharing=!1,this.emitDailyJSEvent(e);break;case Ei:case wi:case ki:case Ti:case Ci:case yi:case bi:case Si:case ti:case ni:case Ai:case Oi:case"test-completed":case Bi:case Mi:case Gi:case Ji:case $i:case Wi:case Ki:case zi:case"dialin-ready":case"dialin-connected":case"dialin-error":case"dialin-stopped":case"dialin-warning":case"dialout-connected":case"dialout-answered":case"dialout-error":case"dialout-stopped":case"dialout-warning":this.emitDailyJSEvent(e);break;case"request-fullscreen":this.requestFullscreen();break;case"request-exit-fullscreen":this.exitFullscreen()}}},{key:"maybeEventRecordingStopped",value:function(e,t){var n="record";e&&(t.local||!1!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:wi}))}},{key:"maybeEventRecordingStarted",value:function(e,t){var n="record";e&&(t.local||!0!==t[n]||e[n]===t[n]||this.emitDailyJSEvent({action:Ei}))}},{key:"maybeEventTrackStopped",value:function(e,t,n,r){e&&("ended"!==e.readyState&&t&&e.id===t.id||this.emitDailyJSEvent({action:_i,track:e,participant:n,type:r}))}},{key:"maybeEventTrackStarted",value:function(e,t,n,r){t&&(e&&"ended"!==e.readyState&&t.id===e.id||this.emitDailyJSEvent({action:gi,track:t,participant:n,type:r}))}},{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{e.callClientId=this.callClientId,this.emit(e.action,e)}catch(t){console.log("could not emit",e,t)}}},{key:"compareEqualForParticipantUpdateEvent",value:function(e,t){return!(!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 po()?"undefined"==typeof DailyNativeUtils?(console.warn("in React Native, DailyNativeUtils is expected to be available"),null):DailyNativeUtils:null}},{key:"updateIsPreparingToJoin",value:function(e){this._updateCallState(this._callState,e)}},{key:"_updateCallState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._isPreparingToJoin;if(e!==this._callState||t!==this._isPreparingToJoin){var n=this._callState,r=this._isPreparingToJoin;this._callState=e,this._isPreparingToJoin=t;var i=xs(n,r),o=xs(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=Ts,this._waitingParticipants={},this._activeSpeaker={},this._activeSpeakerMode=!1,this._didPreAuth=!1,this._accessState={access:Tr},this._finalSummaryOfPrevSession=this._meetingSessionSummary,this._meetingSessionSummary={},this._meetingSessionState=ia(ks,this._callObjectMode),this._isScreenSharing=!1,this._receiveSettings={},this._inputSettings=void 0,this._sendSettings={},this._localAudioLevel=0,this._isLocalAudioLevelObserverRunning=!1,this._remoteParticipantsAudioLevel={},this._isRemoteParticipantsAudioLevelObserverRunning=!1,this._maxAppMessageSize=Zi,this._callMachineInitialized=!1,this._bundleLoadTime=void 0,this._preloadCache}},{key:"updateKeepDeviceAwake",value:function(e){po()&&this.nativeUtils().setKeepDeviceAwake(e,this.callClientId)}},{key:"updateDeviceAudioMode",value:function(e){if(po()&&!this.disableReactNativeAutoDeviceManagement("audio")){var t=e?this._nativeInCallAudioMode:"idle";this.nativeUtils().setAudioMode(t)}}},{key:"updateShowAndroidOngoingMeetingNotification",value:function(e){if(po()&&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.callClientId)}}},{key:"updateNoOpRecordingEnsuringBackgroundContinuity",value:function(e){po()&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity&&this.nativeUtils().enableNoOpRecordingEnsuringBackgroundContinuity(e)}},{key:"toggleParticipantAudioBasedOnNativeAudioFocus",value:function(){var e,t;if(po()){var n=null===(e=this._callMachine())||void 0===e||null===(t=e.store)||void 0===t?void 0:t.getState();for(var r in null==n?void 0:n.streams){var i=n.streams[r];i&&i.pendingTrack&&"audio"===i.pendingTrack.kind&&(i.pendingTrack.enabled=this._hasNativeAudioFocus)}}}},{key:"disableReactNativeAutoDeviceManagement",value:function(e){return this.properties.reactNativeConfig&&this.properties.reactNativeConfig.disableAutoDeviceManagement&&this.properties.reactNativeConfig.disableAutoDeviceManagement[e]}},{key:"absoluteUrl",value:function(e){if(void 0!==e){var t=document.createElement("a");return t.href=e,t.href}}},{key:"sayHello",value:function(){var e="hello, world.";return console.log(e),e}},{key:"_logUseAfterDestroy",value:function(){var e=Object.values(Ss)[0];if(this.needsLoad())if(e&&!e.needsLoad()){var t={action:io,level:"error",code:this.strictMode?9995:9997};e.sendMessageToCallMachine(t)}else this.strictMode||console.error("You are are attempting to use a call instance that was previously destroyed, which is unsupported. Please remove `strictMode: false` from your constructor properties to enable strict mode to track down and fix this unsupported usage.");else{var n={action:io,level:"error",code:this.strictMode?9995:9997};this._messageChannel.sendMessageToCallMachine(n,null,this.callClientId,this._iframe)}}},{key:"_logDuplicateInstanceAttempt",value:function(){for(var e=0,t=Object.values(Ss);e=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}(Eo(),wo())||po())),supportsSfu:!!yo(),supportsVideoProcessing:go(),supportsAudioProcessing:_o()}}},{key:"version",value:function(){return"0.72.2"}},{key:"createCallObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.layout="none",new Q(null,e)}},{key:"wrap",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ys(),!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 Q(e,t)}},{key:"createFrame",value:function(e,t){var n,r;Ys(),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 Q(o,r)}catch(e){throw n.removeChild(o),e}}},{key:"createTransparentFrame",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ys();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"),Q.wrap(t,e)}},{key:"getCallInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return e?Ss[e]:Object.values(Ss)[0]}}]),Q}();function js(e,t){var n={};for(var r in e)if(e[r]instanceof MediaStreamTrack)n[r]=oo;else if("dailyConfig"===r){if(e[r].modifyLocalSdpHook){var i=window._daily.instances[t].customCallbacks||{};i.modifyLocalSdpHook=e[r].modifyLocalSdpHook,window._daily.instances[t].customCallbacks=i,delete e[r].modifyLocalSdpHook}if(e[r].modifyRemoteSdpHook){var o=window._daily.instances[t].customCallbacks||{};o.modifyRemoteSdpHook=e[r].modifyRemoteSdpHook,window._daily.instances[t].customCallbacks=o,delete e[r].modifyRemoteSdpHook}n[r]=e[r]}else n[r]=e[r];return n}function Rs(e){var t=arguments.length>2?arguments[2]:void 0;if(e!==vr){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)),console.error(n),new Error(n)}}function xs(e,t){return[mr,vr].includes(e)||t}function Fs(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(xs(e,t)){var i="".concat(n," not supported after joining a meeting.");throw r&&(i+=" ".concat(r)),console.error(i),new Error(i)}}function Bs(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",arguments.length>3&&void 0!==arguments[3]&&arguments[3]?" requires preAuth() or startCamera() to initialize call state.":" requires preAuth(), startCamera(), or join() to initialize call state.");throw t&&(n+=" ".concat(t)),console.error(n),new Error(n)}}function Us(e){if(e){var t="A pre-call quality test is in progress. Please try ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," again once testing has completed. Use stopTestCallQuality() to end it early.");throw console.error(t),new Error(t)}}function Vs(e){if(!e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported on custom callObject instances");throw console.error(t),new Error(t)}}function qs(e){if(e){var t="".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"This daily-js method"," is only supported as part of Daily's Prebuilt");throw console.error(t),new Error(t)}}function Ys(){if(po())throw new Error("This daily-js method is not currently supported in React Native")}function Gs(){if(!po())throw new Error("This daily-js method is only supported in React Native")}function Js(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)||console.warn("The userData provided will be modified when serialized.")}catch(e){throw Error("userData must be serializable to JSON: ".concat(e))}if(t.length>4096)throw Error("userData is too large (".concat(t.length," characters). Maximum size suppported is ").concat(4096,"."));return!0}function $s(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);s1||"strength"!==n[0]?(console.error(r),!1):!("number"!=typeof t.strength||t.strength<=0||t.strength>1||isNaN(t.strength))||(console.error("".concat(r,"; expected: {0 < strength <= 1}, got: ").concat(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 console.error("failed to deduce blob content type",e),!1}var i=n.split(".").at(-1).toLowerCase().trim();return lo.includes(i)}(e.source)||(console.error("invalid image type; supported types: [".concat(lo.join(", "),"]")),!1)):(t=e.source,n=Number(t),isNaN(n)||!Number.isInteger(n)||n<=0||n>10?(console.error("invalid image selection; must be an int, > 0, <= ".concat(10)),!1):(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){console.warn("invalid key inputSettings -> video -> processor : ".concat(t)),delete e[t]})),!0}(e.video.processor))||e.audio&&("object"!==o(e.audio)||(n=e.audio.processor,r=["type"],!n||"object"!==o(n)||(Object.keys(n).filter((function(e){return!r.includes(e)})).forEach((function(e){console.warn("invalid key inputSettings -> audio -> processor : ".concat(e)),delete n[e]})),t=n.type,"string"!=typeof t||!Object.values(ao).includes(t)&&(console.error("inputSettings audio processor type invalid"),1)))));var t,n,r}function zs(e,t){var n,r=[];e.video&&!go(null!==(n=null==t?void 0:t.useLegacyVideoProcessor)&&void 0!==n&&n)&&(delete e.video,r.push("video")),e.audio&&!_o()&&(delete e.audio,r.push("audio")),r.length>0&&console.error("Ignoring settings for browser- or platform-unsupported input processor(s): ".concat(r.join(", ")))}function Hs(){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 Qs(e){var t=e.allowAllParticipantsKey;return"receiveSettings must be of the form { [ | ".concat(Or).concat(t?' | "'.concat(Pr,'"'):"","]: ")+'{ [video: [{ layer: [ | "inherit"] } | "inherit"]], [screenVideo: [{ layer: [ | "inherit"] } | "inherit"]] }}}'}function Ks(){return"customIntegrations should be an object of type ".concat(JSON.stringify(Ds),".")}function Xs(e){if(e&&"object"!==o(e)||Array.isArray(e))return console.error("customTrayButtons should be an Object of the type ".concat(JSON.stringify(Ps),".")),!1;if(e)for(var t=0,n=Object.entries(e);t2)throw new Error("RemoteMediaPlayerSettings.volume: must be between 0.0 - 2.0")}}function ra(e,t,n){return!("number"!=typeof e||en)}function ia(e,t){return e&&!t&&delete e.data,e}},980:(e,t)=>{var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.Api=t.HttpClient=t.ContentType=t.AuthenticationType=void 0,function(e){e.OAUTH2="oauth2"}(n||(t.AuthenticationType=n={})),function(e){e.Json="application/json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"}(r||(t.ContentType=r={}));class i{baseUrl="";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={[r.Json]:e=>null===e||"object"!=typeof e&&"string"!=typeof e?e:JSON.stringify(e),[r.Text]:e=>null!==e&&"string"!=typeof e?JSON.stringify(e):e,[r.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),[r.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:n,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||r.Json],f=s||d.format;return this.customFetch(`${a||this.baseUrl||""}${n}${h?`?${h}`:""}`,{...d,headers:{...d.headers||{},...i&&i!==r.FormData?{"Content-Type":i}:{}},signal:(c?this.createAbortSignal(c):d.signal)||null,body:null==e?null:p(e)}).then((async e=>{const t=e.clone();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=i;t.Api=class extends i{call={callControllerCreate:(e,t={})=>this.request({path:"/call",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),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}),callControllerUpdate:(e,t,n={})=>this.request({path:`/call/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),callControllerDeleteCallData:(e,t={})=>this.request({path:`/call/${e}`,method:"DELETE",secure:!0,format:"json",...t}),callControllerCreatePhoneCall:(e,t={})=>this.request({path:"/call/phone",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),callControllerCreateWebCall:(e,t={})=>this.request({path:"/call/web",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t})};v2={callControllerFindAllPaginated:(e,t={})=>this.request({path:"/v2/call",method:"GET",query:e,secure:!0,format:"json",...t}),callControllerFindAllMetadataPaginated:(e,t={})=>this.request({path:"/v2/call/metadata",method:"GET",query:e,secure:!0,format:"json",...t}),phoneNumberControllerFindAllPaginated:(e,t={})=>this.request({path:"/v2/phone-number",method:"GET",query:e,secure:!0,format:"json",...t})};assistant={assistantControllerCreate:(e,t={})=>this.request({path:"/assistant",method:"POST",body:e,secure:!0,type:r.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,n={})=>this.request({path:`/assistant/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),assistantControllerReplace:(e,t,n={})=>this.request({path:`/assistant/${e}`,method:"PUT",body:t,secure:!0,type:r.Json,format:"json",...n}),assistantControllerRemove:(e,t={})=>this.request({path:`/assistant/${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:r.Json,format:"json",...t}),phoneNumberControllerImportTwilio:(e,t={})=>this.request({path:"/phone-number/import/twilio",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),phoneNumberControllerImportVonage:(e,t={})=>this.request({path:"/phone-number/import/vonage",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),phoneNumberControllerCreate:(e,t={})=>this.request({path:"/phone-number",method:"POST",body:e,secure:!0,type:r.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,n={})=>this.request({path:`/phone-number/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),phoneNumberControllerRemove:(e,t={})=>this.request({path:`/phone-number/${e}`,method:"DELETE",secure:!0,format:"json",...t})};squad={squadControllerCreate:(e,t={})=>this.request({path:"/squad",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),squadControllerFindAll:(e,t={})=>this.request({path:"/squad",method:"GET",query:e,secure:!0,format:"json",...t}),squadControllerFindOne:(e,t={})=>this.request({path:`/squad/${e}`,method:"GET",secure:!0,format:"json",...t}),squadControllerUpdate:(e,t,n={})=>this.request({path:`/squad/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),squadControllerRemove:(e,t={})=>this.request({path:`/squad/${e}`,method:"DELETE",secure:!0,format:"json",...t})};knowledgeBase={knowledgeBaseControllerCreate:(e,t={})=>this.request({path:"/knowledge-base",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),knowledgeBaseControllerFindAll:(e,t={})=>this.request({path:"/knowledge-base",method:"GET",query:e,secure:!0,format:"json",...t}),knowledgeBaseControllerFindOne:(e,t={})=>this.request({path:`/knowledge-base/${e}`,method:"GET",secure:!0,format:"json",...t}),knowledgeBaseControllerUpdate:(e,t={})=>this.request({path:`/knowledge-base/${e}`,method:"PATCH",secure:!0,format:"json",...t}),knowledgeBaseControllerRemove:(e,t={})=>this.request({path:`/knowledge-base/${e}`,method:"DELETE",secure:!0,format:"json",...t})};block={blockControllerCreate:(e,t={})=>this.request({path:"/block",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),blockControllerFindAll:(e,t={})=>this.request({path:"/block",method:"GET",query:e,secure:!0,format:"json",...t}),blockControllerFindOne:(e,t={})=>this.request({path:`/block/${e}`,method:"GET",secure:!0,format:"json",...t}),blockControllerUpdate:(e,t,n={})=>this.request({path:`/block/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),blockControllerRemove:(e,t={})=>this.request({path:`/block/${e}`,method:"DELETE",secure:!0,format:"json",...t})};tool={toolControllerCreate:(e,t={})=>this.request({path:"/tool",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),toolControllerFindAll:(e,t={})=>this.request({path:"/tool",method:"GET",query:e,secure:!0,format:"json",...t}),toolControllerFindOne:(e,t={})=>this.request({path:`/tool/${e}`,method:"GET",secure:!0,format:"json",...t}),toolControllerUpdate:(e,t,n={})=>this.request({path:`/tool/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),toolControllerRemove:(e,t={})=>this.request({path:`/tool/${e}`,method:"DELETE",secure:!0,format:"json",...t})};file={fileControllerCreateDeprecated:(e,t={})=>this.request({path:"/file/upload",method:"POST",body:e,secure:!0,type:r.FormData,format:"json",...t}),fileControllerCreate:(e,t={})=>this.request({path:"/file",method:"POST",body:e,secure:!0,type:r.FormData,format:"json",...t}),fileControllerFindAll:(e={})=>this.request({path:"/file",method:"GET",secure:!0,format:"json",...e}),fileControllerFindOne:(e,t={})=>this.request({path:`/file/${e}`,method:"GET",secure:!0,format:"json",...t}),fileControllerUpdate:(e,t,n={})=>this.request({path:`/file/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),fileControllerRemove:(e,t={})=>this.request({path:`/file/${e}`,method:"DELETE",secure:!0,format:"json",...t})};metrics={analyticsControllerFindAllDeprecated:(e,t={})=>this.request({path:"/metrics",method:"GET",query:e,secure:!0,format:"json",...t})};analytics={analyticsControllerQuery:(e,t={})=>this.request({path:"/analytics",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),analyticsControllerGetQuery:(e,t={})=>this.request({path:"/analytics",method:"GET",body:e,secure:!0,type:r.Json,format:"json",...t})};log={loggingControllerGetCallLogs:(e,t={})=>this.request({path:"/log",method:"GET",query:e,secure:!0,format:"json",...t})};logs={loggingControllerQueryLogs:(e,t={})=>this.request({path:"/logs",method:"GET",query:e,secure:!0,format:"json",...t})};chat={chatControllerChat:(e,t={})=>this.request({path:"/chat",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t})};credential={credentialControllerCreate:(e,t={})=>this.request({path:"/credential",method:"POST",body:e,secure:!0,type:r.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}),credentialControllerRemove:(e,t={})=>this.request({path:`/credential/${e}`,method:"DELETE",secure:!0,format:"json",...t})};provider={providerControllerGetWorkflows:(e,t,n={})=>this.request({path:`/${e}/workflows`,method:"GET",query:t,secure:!0,format:"json",...n}),providerControllerGetWorkflowTriggerHook:(e,t,n={})=>this.request({path:`/${e}/workflows/${t}/hooks`,method:"GET",secure:!0,format:"json",...n}),providerControllerGetLocations:(e,t={})=>this.request({path:`/${e}/locations`,method:"GET",secure:!0,format:"json",...t}),voiceProviderControllerSearchVoices:(e,t,n={})=>this.request({path:`/${e}/voices/search`,method:"GET",query:t,secure:!0,format:"json",...n}),voiceProviderControllerSearchVoice:(e,t,n={})=>this.request({path:`/${e}/voice/search`,method:"GET",query:t,secure:!0,format:"json",...n}),voiceProviderControllerAddVoices:(e,t,n={})=>this.request({path:`/${e}/voices/add`,method:"POST",body:t,secure:!0,type:r.Json,format:"json",...n}),voiceProviderControllerAddVoice:(e,t,n={})=>this.request({path:`/${e}/voice/add`,method:"POST",body:t,secure:!0,type:r.Json,format:"json",...n})};v11Labs={voiceProviderControllerCloneVoices:(e,t={})=>this.request({path:"/11labs/voice/clone",method:"POST",body:e,secure:!0,type:r.FormData,...t})};token={tokenControllerCreate:(e,t={})=>this.request({path:"/token",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t}),tokenControllerFindAll:(e,t={})=>this.request({path:"/token",method:"GET",query:e,secure:!0,format:"json",...t}),tokenControllerFindOne:(e,t={})=>this.request({path:`/token/${e}`,method:"GET",secure:!0,format:"json",...t}),tokenControllerUpdate:(e,t,n={})=>this.request({path:`/token/${e}`,method:"PATCH",body:t,secure:!0,type:r.Json,format:"json",...n}),tokenControllerRemove:(e,t={})=>this.request({path:`/token/${e}`,method:"DELETE",secure:!0,format:"json",...t})};voiceLibrary={voiceLibraryControllerVoiceGetByProvider:(e,t,n={})=>this.request({path:`/voice-library/${e}`,method:"GET",query:t,secure:!0,format:"json",...n}),voiceLibraryControllerVoiceGetAccentsByProvider:(e,t={})=>this.request({path:`/voice-library/${e}/accents`,method:"GET",secure:!0,format:"json",...t}),voiceLibraryControllerVoiceLibrarySyncByProvider:(e,t={})=>this.request({path:`/voice-library/sync/${e}`,method:"POST",secure:!0,format:"json",...t}),voiceLibraryControllerVoiceLibrarySyncDefaultVoices:(e,t={})=>this.request({path:"/voice-library/sync",method:"POST",body:e,secure:!0,type:r.Json,format:"json",...t})}}},145:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.client=void 0;const r=new(n(980).Api)({baseUrl:"https://api.vapi.ai",baseApiParams:{secure:!0},securityWorker:async e=>{if(e)return{headers:{Authorization:`Bearer ${e}`}}}});t.client=r},112: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(473)),o=r(n(7)),s=n(145);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;dailyCallConfig={};dailyCallObject={};constructor(e,t,n,r){super(),s.client.baseUrl=t??"https://api.vapi.ai",s.client.setSecurityData(e),this.dailyCallConfig=n??{},this.dailyCallObject=r??{}}cleanup(){this.started=!1,this.call?.destroy(),this.call=null,this.speakingTimeout=null}isMobileDevice(){if("undefined"==typeof navigator)return!1;const e=navigator.userAgent;return/android|iphone|ipad|ipod|iemobile|blackberry|bada/i.test(e.toLowerCase())}async sleep(e){return new Promise((t=>setTimeout(t,e)))}async start(e,t,n){if(!e&&!n)throw new Error("Assistant or Squad must be provided.");if(this.started)return null;this.started=!0;try{const r=(await s.client.call.callControllerCreateWebCall({assistant:"string"==typeof e?void 0:e,assistantId:"string"==typeof e?e:void 0,assistantOverrides:t,squad:"string"==typeof n?void 0:n,squadId:"string"==typeof n?n:void 0})).data;this.call&&this.cleanup();const o=r?.artifactPlan?.videoRecordingEnabled??!1,c=r.transport?.assistantVideoEnabled??!1;if(this.call=i.default.createCallObject({audioSource:this.dailyCallObject.audioSource??!0,videoSource:this.dailyCallObject.videoSource??o,dailyConfig:this.dailyCallConfig}),this.call.iframe()?.style.setProperty("display","none"),this.call.on("left-meeting",(()=>{this.emit("call-end"),o&&this.call?.stopRecording(),this.cleanup()})),this.call.on("error",(e=>{this.emit("error",e),o&&this.call?.stopRecording()})),this.call.on("camera-error",(e=>{this.emit("error",e)})),this.call.on("track-started",(async e=>{e&&e.participant&&(e.participant?.local||"Vapi Speaker"===e.participant?.user_name&&("video"===e.track.kind&&this.emit("video",e.track),"audio"===e.track.kind&&await a(e.track,e.participant.session_id),this.call?.sendAppMessage("playable")))})),this.call.on("participant-joined",(e=>{e&&this.call&&function(e,t,n,r){e.participant.local||t.updateParticipant(e.participant.session_id,{setSubscribedTracks:{audio:!0,video:n||r}})}(e,this.call,o,c)})),this.call.on("participant-updated",(e=>{e&&this.emit("daily-participant-updated",e.participant)})),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.isMobileDevice()&&await this.sleep(1e3),await this.call.join({url:r.webCallUrl,subscribeToTracksAutomatically:!1}),o){const e=(new Date).getTime();this.call.startRecording({width:1280,height:720,backgroundColor:"#FF1F2D3D",layout:{preset:"default"}}),this.call.on("recording-started",(()=>{this.send({type:"control",control:"say-first-message",videoRecordingStartDelaySeconds:((new Date).getTime()-e)/1e3})}))}return 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.on("nonfatal-error",(e=>{"audio-processor-error"===e?.type&&this.call?.updateInputSettings({audio:{processor:{type:"none"}}}).then((()=>{this.call?.setLocalAudio(!0)}))})),this.call.updateInputSettings({audio:{processor:{type:"noise-cancellation"}}}),r}catch(e){return console.error(e),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){console.log("Error parsing message data: ",e)}}catch(e){console.error(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){if(!this.call)throw new Error("Call object is not available.");this.call.setLocalAudio(!e)}isMuted(){return!!this.call&&!1===this.call.localAudio()}say(e,t){this.send({type:"say",message:e,endCallAfterSpoken:t})}setInputDevicesAsync(e){this.call?.setInputDevicesAsync(e)}setOutputDeviceAsync(e){this.call?.setOutputDeviceAsync(e)}getDailyCallObject(){return this.call}startScreenSharing(e,t){this.call?.startScreenShare({displayMediaOptions:e,screenVideoSendSettings:t})}stopScreenSharing(){this.call?.stopScreenShare()}}},7: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,l;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 u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}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;n0&&(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=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=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):[]}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.d(r,{default:()=>o});var i=n(112);const o=n.n(i)();return r=r.default})())); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3dd2eba..6ab40ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.1.0", "license": "ISC", "dependencies": { - "@vapi-ai/web": "^2.1.8" + "@vapi-ai/web": "^2.2.0" }, "devDependencies": { "@babel/core": "^7.24.9", @@ -2469,9 +2469,9 @@ "dev": true }, "node_modules/@vapi-ai/web": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vapi-ai/web/-/web-2.1.8.tgz", - "integrity": "sha512-2/P2WWW0OOWms7UDyVF5VUR2M/gIVSWxygORyWnHbZ90Olaib3wt3rEEZvJIJkef7I0IHbbrBaUk3x0x33+Grg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@vapi-ai/web/-/web-2.2.0.tgz", + "integrity": "sha512-gP9piFBgSxcI6l/p4/RszPTzJ887SgP1dDKLScNWGAbhmbbW3ZRRLpJjD8kCmLD3Vw6wIdENFwFyncdhonUOLA==", "license": "MIT", "dependencies": { "@daily-co/daily-js": "^0.72.1", @@ -9761,9 +9761,9 @@ "dev": true }, "@vapi-ai/web": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@vapi-ai/web/-/web-2.1.8.tgz", - "integrity": "sha512-2/P2WWW0OOWms7UDyVF5VUR2M/gIVSWxygORyWnHbZ90Olaib3wt3rEEZvJIJkef7I0IHbbrBaUk3x0x33+Grg==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@vapi-ai/web/-/web-2.2.0.tgz", + "integrity": "sha512-gP9piFBgSxcI6l/p4/RszPTzJ887SgP1dDKLScNWGAbhmbbW3ZRRLpJjD8kCmLD3Vw6wIdENFwFyncdhonUOLA==", "requires": { "@daily-co/daily-js": "^0.72.1", "events": "^3.3.0" diff --git a/package.json b/package.json index 0e23943..49d7f1a 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,6 @@ "webpack-cli": "^5.1.4" }, "dependencies": { - "@vapi-ai/web": "^2.1.8" + "@vapi-ai/web": "^2.2.0" } }