UNPKG

@zoom/videosdk

Version:
1 lines 1.83 MB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).WebBroadcastStreaming={})}(this,(function(e){"use strict";function t(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var i=0;function r(e){return"__private_"+i+++"_"+e}function s(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,r)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){s(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var l=0;function d(e){return"__private_"+l+++"_"+e}const c="5.1.4",h=`https://dmogdx0jrul3u.cloudfront.net/${c}/lib/av`,u=`https://source.zoom.us/${c}/lib/av`,f=`https://jssdk.zoomus.cn/${c}/lib/av`,p="function"==typeof Buffer,g="function"==typeof TextDecoder?new TextDecoder:void 0,m="function"==typeof TextEncoder?new TextEncoder:void 0,v=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),S=(()=>{let e={};return v.forEach(((t,i)=>e[t]=i)),e})(),y=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,A=String.fromCharCode.bind(String),E="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),b=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),T="function"==typeof btoa?e=>btoa(e):p?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,i,r,s,n="";const a=e.length%3;for(let a=0;a<e.length;){if((i=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(s=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=i<<16|r<<8|s,n+=v[t>>18&63]+v[t>>12&63]+v[t>>6&63]+v[63&t]}return a?n.slice(0,a-3)+"===".substring(a):n},C=p?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let i=0,r=e.length;i<r;i+=4096)t.push(A.apply(null,e.subarray(i,i+4096)));return T(t.join(""))},w=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?A(192|t>>>6)+A(128|63&t):A(224|t>>>12&15)+A(128|t>>>6&63)+A(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return A(240|t>>>18&7)+A(128|t>>>12&63)+A(128|t>>>6&63)+A(128|63&t)},R=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,I=p?e=>Buffer.from(e,"utf8").toString("base64"):m?e=>C(m.encode(e)):e=>T((e=>e.replace(R,w))(e)),D=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,k=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return A((t>>>10)+55296)+A(56320+(1023&t));case 3:return A((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return A((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},M="function"==typeof atob?e=>atob(b(e)):p?e=>Buffer.from(e,"base64").toString("binary"):e=>{if(e=e.replace(/\s+/g,""),!y.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,i,r,s="";for(let n=0;n<e.length;)t=S[e.charAt(n++)]<<18|S[e.charAt(n++)]<<12|(i=S[e.charAt(n++)])<<6|(r=S[e.charAt(n++)]),s+=64===i?A(t>>16&255):64===r?A(t>>16&255,t>>8&255):A(t>>16&255,t>>8&255,255&t);return s},P=p?e=>E(Buffer.from(e,"base64")):e=>E(M(e).split("").map((e=>e.charCodeAt(0)))),O=p?e=>Buffer.from(e,"base64").toString("utf8"):g?e=>g.decode(P(e)):e=>(e=>e.replace(D,k))(M(e)),L=(e,t=!1)=>t?(e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")))(I(e)):I(e),x=e=>O((e=>b(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))))(e));function N(e){return L(e,!0)}function V(e){return x(e)}const U=e=>{try{const t=new URL(e);return!("data:"===t.protocol&&"null"===t.origin)&&t.origin!==location.origin}catch(e){return!0}};[h,f,u].map((e=>function(e,t){let i=e;/^https?:\/\//.test(i)||(i=`https://${e}`);try{const e=new URL(i);if(!t)return e.href;if(t.hostname)return e.hostname}catch(e){return""}return""}(e,{hostname:!0})));var B="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var F,W={exports:{}},G=(F||(F=1,function(e){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},t(e,i)};function i(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}function r(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]])}return i}function s(e,t,i,r){return new(i||(i=Promise))((function(t,s){function n(e){try{o(r.next(e))}catch(e){s(e)}}function a(e){try{o(r.throw(e))}catch(e){s(e)}}function o(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(e){e(r)}))).then(n,a)}o((r=r.apply(e,[])).next())}))}function n(e,t){var i,r,s,n={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(l){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(n=0)),n;)try{if(i=1,r&&(s=2&o[0]?r.return:o[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,o[1])).done)return s;switch(r=0,s&&(o=[2&o[0],s.value]),o[0]){case 0:case 1:s=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,r=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(!((s=(s=n.trys).length>0&&s[s.length-1])||6!==o[0]&&2!==o[0])){n=0;continue}if(3===o[0]&&(!s||o[1]>s[0]&&o[1]<s[3])){n.label=o[1];break}if(6===o[0]&&n.label<s[1]){n.label=s[1],s=o;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(o);break}s[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],r=0}finally{i=s=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}function a(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],r=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var r,s,n=i.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=n.next()).done;)a.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(s)throw s.error}}return a}function l(e,t,i){if(2===arguments.length)for(var r,s=0,n=t.length;s<n;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))}function d(e){return this instanceof d?(this.v=e,this):new d(e)}function c(e){this.message=e}c.prototype=new Error,c.prototype.name="InvalidCharacterError";var h,u,f="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new c("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,r,s=0,n=0,a="";r=t.charAt(n++);~r&&(i=s%4?64*i+r:r,s++%4)?a+=String.fromCharCode(255&i>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function p(e){this.message=e}function g(e,t){if("string"!=typeof e)throw new p("Invalid token specified");var i=!0===(t=t||{}).header?0:1;try{return JSON.parse(function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(f(e).replace(/(.)/g,(function(e,t){var i=t.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i})))}(t)}catch(e){return f(t)}}(e.split(".")[i]))}catch(e){throw new p("Invalid token specified: "+e.message)}}p.prototype=new Error,p.prototype.name="InvalidTokenError",function(e){e[e.START_MEDIA=0]="START_MEDIA",e[e.ADD_RENDER_VIDEO=1]="ADD_RENDER_VIDEO",e[e.STOP_RENDER_VIDEO=2]="STOP_RENDER_VIDEO",e[e.START_CAPTURE_VIDEO=3]="START_CAPTURE_VIDEO",e[e.STOP_CAPTURE_VIDEO=4]="STOP_CAPTURE_VIDEO",e[e.ADD_RENDER_AUDIO=5]="ADD_RENDER_AUDIO",e[e.STOP_RENDER_AUDIO=6]="STOP_RENDER_AUDIO",e[e.UNMUTE_AUDIO=7]="UNMUTE_AUDIO",e[e.MUTE_AUDIO=8]="MUTE_AUDIO",e[e.CHANGE_FRAME_RATE=9]="CHANGE_FRAME_RATE",e[e.CHANGE_VIDEO_RESOLUTION=10]="CHANGE_VIDEO_RESOLUTION",e[e.CHANGE_AUDIO_SPEAKER=11]="CHANGE_AUDIO_SPEAKER",e[e.CHANGE_VIDEO_CAPTURE_DEVICE=12]="CHANGE_VIDEO_CAPTURE_DEVICE",e[e.CHANGE_CURRENT_ACTIVE_SSRC=13]="CHANGE_CURRENT_ACTIVE_SSRC",e[e.REMOVE_AUDIO_CAPTURE=14]="REMOVE_AUDIO_CAPTURE",e[e.LEAVE_MEETING=15]="LEAVE_MEETING",e[e.MEETING_FAIL_OVER=16]="MEETING_FAIL_OVER",e[e.END_MEDIA=17]="END_MEDIA",e[e.CHANGE_AUDIO_MIC=18]="CHANGE_AUDIO_MIC",e[e.WEBRTC_RESTART=19]="WEBRTC_RESTART",e[e.REMOVE_RENDER_AUDIO=20]="REMOVE_RENDER_AUDIO",e[e.LEAVE_COMPUTER_AUDIO=21]="LEAVE_COMPUTER_AUDIO",e[e.JOIN_COMPUTER_AUDIO=22]="JOIN_COMPUTER_AUDIO",e[e.START_SHARING=23]="START_SHARING",e[e.STOP_SHARING=24]="STOP_SHARING",e[e.SWITCH_CANVAS_FOR_VIDEO_CAPTURE=25]="SWITCH_CANVAS_FOR_VIDEO_CAPTURE",e[e.START_REMOTE_CONTROL=26]="START_REMOTE_CONTROL",e[e.UPDATE_REMOTE_CONTROL_PROPERTIES=27]="UPDATE_REMOTE_CONTROL_PROPERTIES",e[e.CANCEL_REMOTE_CONTROL=28]="CANCEL_REMOTE_CONTROL",e[e.UPDATE_SUBSCRIBE_VIDEO=29]="UPDATE_SUBSCRIBE_VIDEO",e[e.START_DESKTOP_SHARING=30]="START_DESKTOP_SHARING",e[e.STOP_DESKTOP_SHARING=31]="STOP_DESKTOP_SHARING",e[e.PAUSE_DESKTOP_SHARING=32]="PAUSE_DESKTOP_SHARING",e[e.RESUME_DESKTOP_SHARING=33]="RESUME_DESKTOP_SHARING",e[e.CHECK_CHROME_SHARING_EXTENSION=34]="CHECK_CHROME_SHARING_EXTENSION",e[e.SWITCH_CANVAS_FOR_SHARING_CAPTURE=35]="SWITCH_CANVAS_FOR_SHARING_CAPTURE",e[e.CHANGE_CURRENT_SHARING_ACTIVE_SSRC=36]="CHANGE_CURRENT_SHARING_ACTIVE_SSRC",e[e.COMMAND_SOCKET_MESSAGE_NOTIFY=40]="COMMAND_SOCKET_MESSAGE_NOTIFY",e[e.RESEND_REMOTE_CONTROL_POSITION_PDU=41]="RESEND_REMOTE_CONTROL_POSITION_PDU",e[e.AES_GCM_IV_VALUE=42]="AES_GCM_IV_VALUE",e[e.USER_NODE_LIST=43]="USER_NODE_LIST",e[e.UPDATE_SHARING_DECODE_PARAM=44]="UPDATE_SHARING_DECODE_PARAM",e[e.PAUSE_OR_RESUME_AUDIO_DECODE=45]="PAUSE_OR_RESUME_AUDIO_DECODE",e[e.UPDATE_CANVAS_SIZE=46]="UPDATE_CANVAS_SIZE",e[e.CLEAR_CANVAS=47]="CLEAR_CANVAS",e[e.ZOOM_RENDER=48]="ZOOM_RENDER",e[e.SET_OTHER_AUDIO_VOLUME_LEVEL=50]="SET_OTHER_AUDIO_VOLUME_LEVEL",e[e.AUIOD_INTERPRETATION_MUTE=58]="AUIOD_INTERPRETATION_MUTE",e[e.AUDIO_INTERPRETATION_SELECT_LANGUAGE=59]="AUDIO_INTERPRETATION_SELECT_LANGUAGE",e[e.AUDIO_INTERPRETATION_LIST_INFO=60]="AUDIO_INTERPRETATION_LIST_INFO",e[e.AUDIO_INTERPRETATION_ENABLE=61]="AUDIO_INTERPRETATION_ENABLE",e[e.VIDEO_MASK_SETTING=62]="VIDEO_MASK_SETTING",e[e.UPDATE_BG_IMAGE=63]="UPDATE_BG_IMAGE",e[e.UPDATE_MASK_INFO=64]="UPDATE_MASK_INFO",e[e.FINISH_MASK_SETTING=65]="FINISH_MASK_SETTING",e[e.START_VIDEO_STREAM_IN_MASK_SETTING_SUCCESS=66]="START_VIDEO_STREAM_IN_MASK_SETTING_SUCCESS",e[e.VIDEO_ENABLE_DECODE_HW=70]="VIDEO_ENABLE_DECODE_HW",e[e.VIDEO_ENABLE_ENCODE_HW=71]="VIDEO_ENABLE_ENCODE_HW",e[e.JOIN_DESKTOP_AUDIO=72]="JOIN_DESKTOP_AUDIO",e[e.LEAVE_DESKTOP_AUDIO=73]="LEAVE_DESKTOP_AUDIO",e[e.SET_DESKTOP_VOLUME=74]="SET_DESKTOP_VOLUME",e[e.MIRROR_MY_VIDEO=75]="MIRROR_MY_VIDEO",e[e.QOS_SENDER_REPORT=1176]="QOS_SENDER_REPORT",e[e.CHANGE_AUDIO_VOLUME=1177]="CHANGE_AUDIO_VOLUME",e[e.UPDATE_COOK=1178]="UPDATE_COOK",e[e.ENABLE_VIDEO_OBSERVER=99]="ENABLE_VIDEO_OBSERVER",e[e.NOTIFY_SDK_JOIN_RWG_SUCCESS=113]="NOTIFY_SDK_JOIN_RWG_SUCCESS",e[e.SWITCH_WATER_MARK_FLAG=90]="SWITCH_WATER_MARK_FLAG"}(h||(h={})),function(e){e[e.INIT_SUCCESS_VIDEO=1.1]="INIT_SUCCESS_VIDEO",e[e.INIT_SUCCESS_VIDEO_ENCODE=1]="INIT_SUCCESS_VIDEO_ENCODE",e[e.INIT_SUCCESS_VIDEO_DECODE=2]="INIT_SUCCESS_VIDEO_DECODE",e[e.INIT_SUCCESS_AUDIO=1.2]="INIT_SUCCESS_AUDIO",e[e.INIT_SUCCESS_AUDIO_ENCODE=1]="INIT_SUCCESS_AUDIO_ENCODE",e[e.INIT_SUCCESS_AUDIO_DECODE=2]="INIT_SUCCESS_AUDIO_DECODE",e[e.INIT_SUCCESS_SHARING=1.3]="INIT_SUCCESS_SHARING",e[e.INIT_SUCCESS_SHARING_ENCODE=1]="INIT_SUCCESS_SHARING_ENCODE",e[e.INIT_SUCCESS_SHARING_DECODE=2]="INIT_SUCCESS_SHARING_DECODE",e[e.USER_GRANT_AUDIO_CAPTURE=2]="USER_GRANT_AUDIO_CAPTURE",e[e.CURRENT_VIDEO_RESOLUTION=3]="CURRENT_VIDEO_RESOLUTION",e[e.JPEG_DEC_THREAD_OK=4]="JPEG_DEC_THREAD_OK",e[e.JPEG_DATA=5]="JPEG_DATA",e[e.SHARING_PARA=6]="SHARING_PARA",e[e.SHARING_MORE_INFO=6.1]="SHARING_MORE_INFO",e[e.VIDEO_DECODE_MAX_SIZE=7]="VIDEO_DECODE_MAX_SIZE",e[e.CURRENT_CAPTURE_VIDEO_WIDTH_HEIGHT=8]="CURRENT_CAPTURE_VIDEO_WIDTH_HEIGHT",e[e.START_VIDEO_CAPTURE_SUCCESS=9]="START_VIDEO_CAPTURE_SUCCESS",e[e.STOP_VIDEO_CAPTURE_SUCCESS=10]="STOP_VIDEO_CAPTURE_SUCCESS",e[e.START_REMOTE_CONTROL_SUCCESS=11]="START_REMOTE_CONTROL_SUCCESS",e[e.CANCEL_REMOTE_CONTROL_SUCCESS=12]="CANCEL_REMOTE_CONTROL_SUCCESS",e[e.REMOTE_CONTROL_COPIED_TEXT_NOTIFY=13]="REMOTE_CONTROL_COPIED_TEXT_NOTIFY",e[e.MONITOR_LOG=14]="MONITOR_LOG",e[e.SHARING_DECODE_MAX_SIZE=18]="SHARING_DECODE_MAX_SIZE",e[e.SEND_MESSAGE_TO_RWG=20]="SEND_MESSAGE_TO_RWG",e[e.AES_GCM_IV_RESPONSE=21]="AES_GCM_IV_RESPONSE",e[e.SHARING_DESKTOP_STREAM_HAVE_AUDIO=23]="SHARING_DESKTOP_STREAM_HAVE_AUDIO",e[e.JOIN_COMPUTER_AUDIO_COMPLETE=24]="JOIN_COMPUTER_AUDIO_COMPLETE",e[e.JOIN_DESKTOP_AUDIO_COMPLETE=25]="JOIN_DESKTOP_AUDIO_COMPLETE",e[e.LEAVE_COMPUTER_AUDIO_COMPLETE=26]="LEAVE_COMPUTER_AUDIO_COMPLETE",e[e.LEAVE_DESKTOP_AUDIO_COMPLETE=27]="LEAVE_DESKTOP_AUDIO_COMPLETE",e[e.QOS_RECEIVER_CMD=1128]="QOS_RECEIVER_CMD",e[e.VIDEO_REQUEST_IDR=1128.5]="VIDEO_REQUEST_IDR",e[e.FIRST_FRAME=1190]="FIRST_FRAME",e[e.DATACHANNEL_OPEN=1128]="DATACHANNEL_OPEN",e[e.DATACHANNEL_CLOSE=1130]="DATACHANNEL_CLOSE",e[e.DATACHANNEL_RECOVER=1140]="DATACHANNEL_RECOVER",e[e.START_VIDEO_STREAM_IN_MASK_SETTING_SUCCESS=66]="START_VIDEO_STREAM_IN_MASK_SETTING_SUCCESS",e[e.CURRENT_DECODE_VIDEO_QUALITY=66.5]="CURRENT_DECODE_VIDEO_QUALITY",e[e.SHARING_FIRST_DECODE_FRAME_RECEIVED_SSRC=70]="SHARING_FIRST_DECODE_FRAME_RECEIVED_SSRC",e[e.INIT_FAILED=-1]="INIT_FAILED",e[e.INIT_FAILED_VIDEO=-1.1]="INIT_FAILED_VIDEO",e[e.INIT_FAILED_VIDEO_ENCODE=-1]="INIT_FAILED_VIDEO_ENCODE",e[e.INIT_FAILED_VIDEO_DECODE=-2]="INIT_FAILED_VIDEO_DECODE",e[e.INIT_FAILED_AUDIO=-1.2]="INIT_FAILED_AUDIO",e[e.INIT_FAILED_AUDIO_ENCODE=-1]="INIT_FAILED_AUDIO_ENCODE",e[e.INIT_FAILED_AUDIO_DECODE=-2]="INIT_FAILED_AUDIO_DECODE",e[e.INIT_FAILED_SHARING=-1.3]="INIT_FAILED_SHARING",e[e.USER_FORBIDDED_CAPTURE_AUDIO=-2]="USER_FORBIDDED_CAPTURE_AUDIO",e[e.AUDIO_WEBSOCKET_BROKEN=-3]="AUDIO_WEBSOCKET_BROKEN",e[e.VIDEO_WEBSOCKET_BROKEN=-4]="VIDEO_WEBSOCKET_BROKEN",e[e.JPEG_DEC_THREAD_FAILED=-5]="JPEG_DEC_THREAD_FAILED",e[e.AUDIO_ZERO_DATA=-6]="AUDIO_ZERO_DATA",e[e.USER_FORBIDDED_CAPTURE_VIDEO=-8]="USER_FORBIDDED_CAPTURE_VIDEO",e[e.USER_CAMERA_IS_TAKEN_BY_OTHER_PROGRAMS=-9]="USER_CAMERA_IS_TAKEN_BY_OTHER_PROGRAMS",e[e.START_REMOTE_CONTROL_FAILED=-11]="START_REMOTE_CONTROL_FAILED",e[e.AUDIO_SPEAKER_SET_ERROR=-12]="AUDIO_SPEAKER_SET_ERROR",e[e.DATA_CHANNEL_OFFER=20]="DATA_CHANNEL_OFFER",e[e.AUDIO_AUTO_PLAY_FAILED=-24]="AUDIO_AUTO_PLAY_FAILED",e[e.SHARING_DESKTOP_STREAM_HAVE_NO_AUDIO=-27]="SHARING_DESKTOP_STREAM_HAVE_NO_AUDIO",e[e.WEBGL_LOST_IN_MULTI_VIEW=-32]="WEBGL_LOST_IN_MULTI_VIEW",e[e.FAIL_OVER_RESULT_TO_OUTSIDE_SDK=21]="FAIL_OVER_RESULT_TO_OUTSIDE_SDK",e[e.MASK_SETTING_PARA_ERROR=-33]="MASK_SETTING_PARA_ERROR"}(u||(u={}));const m="VIDEO_QOS_DATA";var v,S,y,A,E,b,T={exports:{}},C=(v||(v=1,function(e){!function(t,i){e.exports=i({})}(self,(e=>(()=>{var t,i,r={8935:(e,t,i)=>{function r(){return/\bCrOS\b/.test(navigator.userAgent)}function s(){var e,t;if(r())return!1;const i=((null==navigator?void 0:navigator.userAgent)||"").toLowerCase();if(/ipad|android(?!.*mobile)|tablet/i.test(i))return!0;const s=Math.min((null==(e=null==window?void 0:window.screen)?void 0:e.width)||0,(null==(t=null==window?void 0:window.screen)?void 0:t.height)||0),n="ontouchstart"in window||navigator.maxTouchPoints>0;return s>=600&&s<=1280&&n&&"orientation"in window}function n(){return!!(navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/webOS/i)||navigator.userAgent.match(/iPhone/i)||/iPad/i.test(navigator.userAgent)||/Macintosh/i.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||navigator.userAgent.match(/iPod/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/Windows Phone/i))}i.d(t,{Cd:()=>$e,D:()=>je,D$:()=>He,GN:()=>Ve,GQ:()=>xe,GY:()=>d,HR:()=>Ge,Pg:()=>s,Qf:()=>Ye,R_:()=>g,U0:()=>qe,U4:()=>Ce,UP:()=>ke,Xb:()=>n,Y9:()=>Fe,Z_:()=>Be,Zs:()=>r,_J:()=>Oe,bw:()=>c,cX:()=>f,gG:()=>be,gi:()=>Xe,gm:()=>Le,j4:()=>Qe,j9:()=>Ze,lT:()=>De,n_:()=>u,nr:()=>Ne,pb:()=>l,uF:()=>p,uw:()=>h,vb:()=>o,vk:()=>Ue,w_:()=>Ke,zG:()=>a,zQ:()=>Je,zX:()=>We});const a=()=>!!(navigator.maxTouchPoints&&navigator.maxTouchPoints>2)&&(/iPad/.test(navigator.platform)||/MacIntel/.test(navigator.platform)),o=()=>/MSFT Teams Android Room/i.test(navigator.userAgent),l=()=>{const e=null==window?void 0:window.meetingHost;return!!e&&"MSFT"===e.getHostState().vendorId&&!o()},d=()=>/GoogleMeetRoomDeviceWebViewApp/.test(navigator.userAgent),c=()=>/TESLA/.test(navigator.userAgent),h=()=>/(iPhone)/.test(navigator.userAgent),u=()=>/(iPad|iPhone)/g.test(navigator.userAgent),f=()=>navigator.platform.indexOf("Mac")>-1,p=()=>navigator.platform.indexOf("Win")>-1,g=async()=>{var e,t;if(-1!=navigator.userAgent.indexOf("WOW64"))return!0;if(null!=(e=null==navigator?void 0:navigator.userAgentData)&&e.getHighEntropyValues){const e=await(null==(t=null==navigator?void 0:navigator.userAgentData)?void 0:t.getHighEntropyValues(["wow64"]));return!(null==e||!e.wow64)}return!1},m=e=>"string"==typeof e,v=(e,t)=>{if(m(e))return e=A(/^\s\s*/,e),void 0===t?e:e.substring(0,500)},S=e=>m(e)?e.toLowerCase():e,_=(e,t)=>{if("object"==typeof e&&e.length>0){for(var i in e)if(S(e[i])==S(t))return!0;return!1}return!!m(e)&&-1!==S(t).indexOf(S(e))},y=(e,t)=>{for(let i in t)if("object"==typeof t[i]&&t[i].length>0){for(let r=0;r<t[i].length;r++)if(_(t[i][r],e))return"?"===i?void 0:i}else if(_(t[i],e))return"?"===i?void 0:i;return"*"in t?t["*"]:e},A=(e,t)=>m(t)?t.replace(e,""):t,E=e=>m(e)&&A(/[^\d\.]/g,e).split(".")[0]||"",b=e=>m(e)&&A(/[^\d\.]/g,e).split(".")[1]||"",T=e=>/^\d/.test(String(e)),C=(e,t)=>{let i={};if(!e||!t)return{};let r,s,n,a,o,l,d=0;for(;d<t.length&&!o;){const c=t[d],h=t[d+1];for(r=0,s=0;r<c.length&&!o&&c[r];)if(o=c[r++].exec(e),o)for(i.matchRegex=String(c[r-1]),n=0;n<h.length;n++)l=o[++s],a=h[n],"object"==typeof a&&a.length>0?2===a.length?"function"==typeof a[1]?i[a[0]]=a[1](l):i[a[0]]=a[1]:3===a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?i[a[0]]=l?l.replace(a[1],a[2]):void 0:i[a[0]]=l?a[1](l,a[2]):void 0:4===a.length&&(i[a[0]]=l?a[3](l.replace(a[1],a[2])):void 0):i[a]=l||void 0;d+=2}return i||{}},w=e=>{const t=e.split(".");for(;t.length>1&&0===parseInt(t[t.length-1],10);)t.pop();return t.join(".")},R="version",I="name",D="type",k="inapp",M="model",P="vendor",O="architecture",L="console",x="mobile",N="tablet",V="smarttv",U="wearable",B="xr",F="embedded",W="Amazon",G="Apple",H="ASUS",j="BlackBerry",$="Google",K="Huawei",z="Lenovo",q="Honor",Y="LG",X="Microsoft",Q="Motorola",J="Nvidia",Z="OnePlus",ee="OPPO",te="Samsung",ie="Sharp",re="Sony",se="Xiaomi",ne="Zebra",ae="Chrome",oe="Chromecast",le="Firefox",de="Opera",ce="Facebook",he="Sogou",ue="Mobile Safari",fe=" Browser",pe="Chromium OS",ge="Mac OS",me={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ve=[[/\b(?:crmo|crios)\/([\w\.]+)/i],[R,[I,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[R,[I,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[I,R],[/opios[\/ ]+([\w\.]+)/i],[R,[I,de+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[R,[I,de+" GX"]],[/\bopr\/([\w\.]+)/i],[R,[I,de]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[R,[I,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[R,[I,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[I,R],[/quark(?:pc)?\/([-\w\.]+)/i],[R,[I,"Quark"]],[/\bddg\/([\w\.]+)/i],[R,[I,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[R,[I,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[R,[I,"WeChat"]],[/konqueror\/([\w\.]+)/i],[R,[I,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[R,[I,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[R,[I,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[R,[I,"Smart "+z+fe]],[/(avast|avg)\/([\w\.]+)/i],[[I,/(.+)/,"$1 Secure"+fe],R],[/\bfocus\/([\w\.]+)/i],[R,[I,le+" Focus"]],[/\bopt\/([\w\.]+)/i],[R,[I,de+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[R,[I,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[R,[I,"Dolphin"]],[/coast\/([\w\.]+)/i],[R,[I,de+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[R,[I,"MIUI"+fe]],[/fxios\/([\w\.-]+)/i],[R,[I,""+le]],[/\bqihoobrowser\/?([\w\.]*)/i],[R,[I,"360"]],[/\b(qq)\/([\w\.]+)/i],[[I,/(.+)/,"$1Browser"],R],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[I,/(.+)/,"$1"+fe],R],[/samsungbrowser\/([\w\.]+)/i],[R,[I,te+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[R,[I,he+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[I,he+" Mobile"],R],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[I,R],[/(lbbrowser|rekonq)/i],[I],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[R,I],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[I,ce],R,[D,k]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[I,R,[D,k]],[/\bgsa\/([\w\.]+) .*safari\//i],[R,[I,"GSA"],[D,k]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[R,[I,"TikTok"],[D,k]],[/\[(linkedin)app\]/i],[I,[D,k]],[/(chromium)[\/ ]([-\w\.]+)/i],[I,R],[/headlesschrome(?:\/([\w\.]+)| )/i],[R,[I,ae+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[I,ae+" WebView"],R],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[R,[I,"Android"+fe]],[/chrome\/([\w\.]+) mobile/i],[R,[I,"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[I,R],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[R,[I,ue]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[I,ue]],[/version\/([\w\.\,]+) .*(safari)/i],[R,I],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[I,[R,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[I,R],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[I,""+le],R],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[I,"Netscape"],R],[/(wolvic|librewolf)\/([\w\.]+)/i],[I,R],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[R,[I,le+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[I,[R,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[I,[R,/[^\d\.]+./,""]]],Se=[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[M,[P,te],[D,N]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[M,[P,te],[D,x]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[M,[P,G],[D,x]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[M,[P,G],[D,N]],[/(macintosh);/i],[M,[P,G]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[M,[P,ie],[D,x]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[M,[P,q],[D,N]],[/honor([-\w ]+)[;\)]/i],[M,[P,q],[D,x]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[M,[P,K],[D,N]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[M,[P,K],[D,x]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[M,/_/g," "],[P,se],[D,N]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[M,/_/g," "],[P,se],[D,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[M,[P,ee],[D,x]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[M,[P,y,{OnePlus:["304","403","203"],"*":ee}],[D,N]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[M,[P,"Vivo"],[D,x]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[M,[P,"Realme"],[D,x]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[M,[P,Q],[D,x]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[M,[P,Q],[D,N]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[M,[P,Y],[D,N]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[M,[P,Y],[D,x]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[M,[P,z],[D,N]],[/(nokia) (t[12][01])/i],[P,M,[D,N]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?(([-\w\.]*))/i],[[M,/_/g," "],[D,x],[P,"Nokia"]],[/(pixel (c|tablet))\b/i],[M,[P,$],[D,N]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[M,[P,$],[D,x]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[M,[P,re],[D,x]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[M,"Xperia Tablet"],[P,re],[D,N]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[M,[P,Z],[D,x]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[M,[P,W],[D,N]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[M,/(.+)/g,"Fire Phone $1"],[P,W],[D,x]],[/(playbook);[-\w\),; ]+(rim)/i],[M,P,[D,N]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[M,[P,j],[D,x]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[M,[P,H],[D,N]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[M,[P,H],[D,x]],[/(nexus 9)/i],[M,[P,"HTC"],[D,N]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[P,[M,/_/g," "],[D,x]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[M,[P,"TCL"],[D,N]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[M,[P,"TCL"],[D,x]],[/(itel) ((\w+))/i],[[P,S],M,[D,y,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[M,[P,"Acer"],[D,N]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[M,[P,"Meizu"],[D,x]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[M,[P,"Ulefone"],[D,x]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[M,[P,"Energizer"],[D,x]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[M,[P,"Cat"],[D,x]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[M,[P,"Smartfren"],[D,x]],[/droid.+; (a(?:015|06[35]|142p?))/i],[M,[P,"Nothing"],[D,x]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[P,M,[D,N]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[P,M,[D,x]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[P,M,[D,N]],[/(surface duo)/i],[M,[P,X],[D,N]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[M,[P,"Fairphone"],[D,x]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[M,[P,J],[D,N]],[/(sprint) (\w+)/i],[P,M,[D,x]],[/(kin\.[onetw]{3})/i],[[M,/\./g," "],[P,X],[D,x]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[M,[P,ne],[D,N]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[M,[P,ne],[D,x]],[/smart-tv.+(samsung)/i],[P,[D,V]],[/hbbtv.+maple;(\d+)/i],[[M,/^/,"SmartTV"],[P,te],[D,V]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[P,Y],[D,V]],[/(apple) ?tv/i],[P,[M,G+" TV"],[D,V]],[/crkey.*devicetype\/chromecast/i],[[M,oe+" Third Generation"],[P,$],[D,V]],[/crkey.*devicetype\/([^/]*)/i],[[M,/^/,"Chromecast "],[P,$],[D,V]],[/fuchsia.*crkey/i],[[M,oe+" Nest Hub"],[P,$],[D,V]],[/crkey/i],[[M,oe],[P,$],[D,V]],[/droid.+aft(\w+)( bui|\))/i],[M,[P,W],[D,V]],[/(shield \w+ tv)/i],[M,[P,J],[D,V]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[M,[P,ie],[D,V]],[/(bravia[\w ]+)( bui|\))/i],[M,[P,re],[D,V]],[/(mi(tv|box)-?\w+) bui/i],[M,[P,se],[D,V]],[/Hbbtv.*(technisat) (.*);/i],[P,M,[D,V]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[P,v],[M,v],[D,V]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[M,[D,V]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[D,V]],[/(ouya)/i,/(nintendo) (\w+)/i],[P,M,[D,L]],[/droid.+; (shield)( bui|\))/i],[M,[P,J],[D,L]],[/(playstation \w+)/i],[M,[P,re],[D,L]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[M,[P,X],[D,L]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[M,[P,te],[D,U]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[P,M,[D,U]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[M,[P,ee],[D,U]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[M,[P,G],[D,U]],[/(opwwe\d{3})/i],[M,[P,Z],[D,U]],[/(moto 360)/i],[M,[P,Q],[D,U]],[/(smartwatch 3)/i],[M,[P,re],[D,U]],[/(g watch r)/i],[M,[P,Y],[D,U]],[/droid.+; (wt63?0{2,3})\)/i],[M,[P,ne],[D,U]],[/droid.+; (glass) \d/i],[M,[P,$],[D,B]],[/(pico) (4|neo3(?: link|pro)?)/i],[P,M,[D,B]],[/; (quest( \d| pro)?)/i],[M,[P,ce],[D,B]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[P,[D,F]],[/(aeobc)\b/i],[M,[P,W],[D,F]],[/(homepod).+mac os/i],[M,[P,G],[D,F]],[/windows iot/i],[[D,F]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[M,[D,y,{mobile:"Mobile",xr:"VR","*":N}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[D,N]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[D,x]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[M,[P,"Generic"]]],_e=[[/microsoft (windows) (vista|xp)/i],[I,R],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[I,[R,y,me]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[R,y,me],[I,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[R,/_/g,"."],[I,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[I,ge],[R,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[R,[I,oe+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[R,[I,oe+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[R,[I,oe+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[R,[I,oe+" Linux"]],[/crkey\/([\d\.]+)/i],[R,[I,oe]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[R,I],[/(ubuntu) ([\w\.]+) like android/i],[[I,/(.+)/,"$1 Touch"],R],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[I,R],[/\(bb(10);/i],[R,[I,j]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[R,[I,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[R,[I,le+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[R,[I,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[R,[I,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[I,pe],R],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[I,R],[/(sunos) ?([\w\.\d]*)/i],[[I,"Solaris"],R],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[I,R]],ye=[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[O,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)\b/i],[[O,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[O,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[O,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[O,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[O,/ower/,"",S]],[/ sun4\w[;\)]/i],[[O,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[O,S]]],Ae=[[/windows.+ edge\/([\w\.]+)/i],[R,[I,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[I,R],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[R,[I,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[I,R],[/ladybird\//i],[[I,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[R,I]],Ee=new class{constructor(){this.ua=navigator.userAgent}removeMatchRegex(e){if(!e.matchRegex)return e;const{matchRegex:t,...i}=e;return i}getDefaultResult(e){const t=(e=>{const t=C(e,ve);return null!=t&&t.version&&(t.major=E(String(t.version))||"",t.minor=b(String(t.version))||""),t})(e||this.ua),i=(a=e||this.ua,C(a,Ae)),r=(e=>{var t,i;const r=C(e,Se);return!r.type&&null!=navigator&&navigator.userAgentData&&null!=(t=null==navigator?void 0:navigator.userAgentData)&&t.mobile&&(r.type=null==(i=null==navigator?void 0:navigator.userAgentData)?void 0:i.mobile),"Macintosh"==r.model&&navigator&&void 0!==(null==navigator?void 0:navigator.standalone)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&(r.model="iPad",r.type="tablet"),r})(e||this.ua),s=(e=>{var t,i;const r=C(e,_e);return!r.name&&null!=navigator&&navigator.userAgentData&&null!=(t=null==navigator?void 0:navigator.userAgentData)&&t.platform&&(r.name=null==(i=null==navigator?void 0:navigator.userAgentData)?void 0:i.platform),null!=r&&r.version&&T(null==r?void 0:r.version)&&(r.major=E(String(r.version))||"",r.minor=b(String(r.version))||""),r})(e||this.ua),n=(e=>{const t=C(e,ye);return t.architecture||(t.architecture=""),t})(e||this.ua);var a;return{ua:e||this.ua,browser:this.removeMatchRegex(t),device:this.removeMatchRegex(r),os:this.removeMatchRegex(s),cpu:this.removeMatchRegex(n),engine:this.removeMatchRegex(i)}}async getResult(e){const t=this.getDefaultResult(e);if(e||!this.isSupportUserAgentData())return t;let i={};try{i=await this.getHighEntropyValues()}catch(e){return{...t,error:e}}const r=this.handleBrowser(i,t.browser),s=this.handleDevice(i,t.device),n=this.handleOs(i,t.os),a=this.handleCpu(i,t.cpu),o=this.handleEngine(i,t.engine);return{ua:this.ua,browser:this.removeMatchRegex(r),device:this.removeMatchRegex(s),os:this.removeMatchRegex(n),cpu:this.removeMatchRegex(a),engine:this.removeMatchRegex(o),originHighEntropyValues:i}}isSupportUserAgentData(){return"object"==typeof navigator&&"userAgentData"in navigator}async getHighEntropyValues(){return this.isSupportUserAgentData()?await navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness"]):{}}handleBrowser(e,t){let i=t||{};const r=e.fullVersionList||e.brands;let s="";if(r)for(let e in r){let t=r[e].brand,n=r[e].version;/not.a.brand/i.test(t)||s&&(!/chrom/i.test(s)||"Chromium"==t)||(t=y(t,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome"}),s=t,i={name:t,version:n,major:n?E(n):"",minor:n?b(n):""})}return i}handleEngine(e,t){let i=t||{};const r=e.fullVersionList||e.brands;if(r)for(let e in r){let t=r[e].brand,s=r[e].version;"Chromium"===t&&(i.version=s)}return i}handleDevice(e,t){const i=t;if(e.mobile&&(i.type="mobile"),e.model&&(i.model=e.model,!i.type||!i.vendor)){let t=C("droid 9; "+e.model+")",Se);!i.type&&t.type&&(i.type=t.type),!i.vendor&&t.vendor&&(i.vendor=t.vendor)}"Macintosh"==i.model&&navigator&&void 0!==(null==navigator?void 0:navigator.standalone)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&(i.model="iPad",i.type="tablet");const r={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0};if(e.formFactors){let t;if("string"!=typeof e.formFactors)for(var s=0;!t&&s<e.formFactors.length;)t=y(e.formFactors[s++],r);else t=y(e.formFactors,r);t&&(i.type=t)}return i}handleOs(e,t){var i,r;const s=t||{};!s.name&&navigator.userAgentData&&null!=(i=navigator.userAgentData)&&i.platform&&(s.name=null==(r=navigator.userAgentData)?void 0:r.platform);const n=e.platform;if(n){let t=e.platformVersion;if(n.includes("win")&&t){const e=parseInt(E(t),10)||0;t=e>=13?"11":e>0?"10":"7"}s.name=n,s.version=t,t&&T(t)?(s.major=E(t)||"",s.minor=b(t)||""):(s.major="",s.minor="")}return s.name&&(s.name=s.name.replace(/chrome os/i,pe).replace(/macos/i,ge)),s}handleCpu(e,t){let i=t||{},r=e.architecture;return r&&(r&&"64"==e.bitness&&(r+="64"),i=C(r+";",ye)),i}};let be=Ee.getDefaultResult(),Te=!1;const Ce=async()=>{if(Te)return be;try{if(Ee.isSupportUserAgentData()){const e=await Ee.getResult();be=Object.assign({},e),Te=!0}}catch(e){return Te=!1,Promise.reject(e)}return be},we=()=>(null==be?void 0:be.os)||{},Re=()=>{var e;return(null==(e=null==be?void 0:be.browser)?void 0:e.name)||""},Ie=()=>{var e;return(null==(e=null==be?void 0:be.os)?void 0:e.name)||""},De=()=>{const e=Re();return["IE","IEMobile"].includes(e)},ke=()=>"Edge"===Re(),Me=()=>{const e=Re();return["Chrome","Chrome Headless","Chrome WebView"].includes(e)},Pe=()=>"Chromium"===Re(),Oe=()=>Me()||Pe(),Le=()=>{const e=Re();return["Firefox","Firefox Focus","Firefox Reality","Iceweasel"].includes(e)},xe=()=>{const e=Re();return["Opera","Opera Coast","Opera GX","Opera Mini","Opera Mobi","Opera Tablet","Opera Touch"].includes(e)},Ne=()=>{var e;return null==(e=Re().toLocaleLowerCase())?void 0:e.includes("safari")},Ve=()=>{var e;const t=Ie();return/android/i.test(navigator.userAgent)||(null==(e=t.toLocaleLowerCase())?void 0:e.includes("android"))},Ue=()=>"webos"===Ie().toLowerCase(),Be=()=>"Oculus Browser"===Re(),Fe=()=>Me()&&/windows/i.test(navigator.userAgent),We=()=>"OpenHarmony"===Ie(),Ge=()=>"HarmonyOS"===Ie()||We(),He=(e,t)=>{if((e=e.toString())===(t=t.toString()))return!0;const i=w(e),r=w(t),s=i.split("."),n=r.split("."),a=s.length,o=n.length,l=Math.min(o,a);for(let e=0;e<l;e++){const t=parseInt(s[e],10),i=parseInt(n[e],10);if(t!==i)return t>i}return a>=o},je=(e,t="")=>{if(!t){const{version:e}=(null==be?void 0:be.browser)||{};t=e||""}return He(t||"",e)},$e=()=>{const{major:e}=we();return e?parseInt(e,10):0},Ke=()=>{const{minor:e}=we();return e?parseInt(e,10):0},ze=(()=>{let e={vendor:"",renderInfo:"",isAstcSupported:!1,isWebGLContextInvalid:!0};const t={noCanvas:"",noContext:"",contextLost:"",noVendor:"",catchError:""};try{const i=document.createElement("canvas");if(!i)return t.noCanvas="Error: document.createElement return a null canvas!",{attrs:e,errorMsg:t};let r=i.getContext("webgl")||i.getContext("moz-webgl")||i.getContext("webkit-3d")||i.getContext("experimental-webgl");if(!r)return t.noContext=`Error: canvas.getContext fail, context:${r}, size:(${i.width},${i.height})`,{attrs:e,errorMsg:t};if(r){let s,n,a;e.isWebGLContextInvalid=!1,null!=r&&r.isContextLost()&&(t.contextLost=`Error: webgl context is lost, canvas(${i.width},${i.height})!`),Le()?(s=r.getParameter(r.RENDERER),n=r.getParameter(r.VENDOR)):(a=r.getExtension("WEBGL_debug_renderer_info"),s=r.getParameter(a.UNMASKED_RENDERER_WEBGL),n=r.getParameter(a.UNMASKED_VENDOR_WEBGL)),e.renderInfo=null==s?void 0:s.toLowerCase(),e.vendor=null==n?void 0:n.toLowerCase(),e.isAstcSupported=-1!==r.getSupportedExtensions().indexOf("WEBGL_compressed_texture_astc"),""==n&&(t.noVendor=`Error: vendor is null, debug:${a}, render:${a.UNMASKED_RENDERER_WEBGL}, vendor:${a.UNMASKED_VENDOR_WEBGL}, contextLost:${r.isContextLost()}!`)}}catch(e){t.catchError=e}return{attrs:e,errorMsg:t}})(),qe=()=>"Mac OS"===Ie()&&!a(),Ye=()=>{try{return!(!Ne()||navigator.maxTouchPoints&&!(navigator.maxTouchPoints<=2)||ze.attrs.isAstcSupported||!f())}catch{return!1}},Xe=()=>{var e;try{return!!((Me()||Pe())&&(!navigator.maxTouchPoints||navigator.maxTouchPoints<=2)&&(null==(e=ze.attrs.vendor)?void 0:e.indexOf("intel"))>-1&&f())}catch{return!1}},Qe=()=>Ye()||Xe(),Je=()=>{const e=f()||qe();return Ne()&&e},Ze=()=>{var e;return(null==(e=null==navigator?void 0:navigator.platform)?void 0:e.indexOf("Linux"))>-1&&!r()&&!Ve()}},1241:(e,t,i)=>{i.d(t,{_:()=>r});const r=!1},3750:(e,t,i)=>{i.d(t,{p:()=>o,E:()=>l});var r=i(2754),s=i(9415);class n{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._unusedIds=[],this._nextId=e}generateNextId(){let e;return this._unusedIds.length>0?e=this._unusedIds.shift():(e=this._nextId,this._nextId+=1),e}release(e){this._unusedIds.push(e)}}class a{constructor(e){this._onmessage=null,this._messager=e}set onmessage(e){var t,i;null!==this._onmessage&&this._messager.removeEventListener("message",this._onmessage),this._messager.addEventListener("message",e),null===this._onmessage&&(null===(i=(t=this._messager).start)||void 0===i||i.call(t)),this._onmessage=e}postMessage(e,t){this._messager.postMessage(e,t)}close(){var e,t;null!==this._onmessage&&(this._messager.removeEventListener("message",this._onmessage),this._onmessage=null),null===(t=(e=this._messager).close)||void 0===t||t.call(e)}}class o{constructor(){this._connection=null}set connection(e){this._connection=e}get connection(){return(0,r.vA)(null!==this._connection),this._connection}}class l{constructor(e,t,i,r){this._idGenerator=new n(2),this._invokeHandlers={},this._invokeResults=new Set,this._resolveInvokeResultsSended=null,this._responseHandlers=new Map,this._notifyHandlers={},this._transferObjs=[],this._closed=!1,this._onClose=null,this._messager=new a(e),this._messager.onmessage=this._handleMessage.bind(this),this._logErrorFn=r,t&&(this.localPeerObject=t),i&&(this._proxyFuncs=i);const s=new Promise((e=>{this._resolveCloseSent=e})),o=new Promise((e=>{this._resolveCloseReceived=e}));Promise.all([s,o]).then((()=>{this._messager.close(),this._messager=null}))}set localPeerObject(e){let t;if(this._invokeHandlers={},e instanceof o){const i=Object.getPrototypeOf(e);t=Object.getOwnPropertyNames(i)}else t=Object.getOwnPropertyNames(e);const i=t.filter((t=>"function"==typeof e[t]&&"constructor"!==t&&!t.startsWith("_")));for(const t of i)this.expose(t,(function(){return e[t](...arguments)}));this._localPeerObject=e,e instanceof o&&(e.connection=this)}get localPeerObject(){return this._localPeerObject}get remotePeerProxy(){var e=this;if(this._remotePeerProxy)return this._remotePeerProxy;const t=new Map;return this._remotePeerProxy=new Proxy({},{get:(i,r,s)=>{var n;let a=null===(n=this._proxyFuncs)||void 0===n?void 0:n[r];return a||(a=t.get(r),a||(a=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return e.invoke(r,...i)},t.set(r,a),a))}}),this._remotePeerProxy}_logError(e,t){var i;null===(i=this._logErrorFn)||void 0===i||i.call(this,e,t)}transfer(e){return this._transferObjs.push(e),e}expose(e,t){this._invokeHandlers[e]=t}on(e,t){this._notifyHandlers[e]=t}notify(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];this._postRequest(1,e,i)}invoke(e){const t=this._idGenerator.generateNextId(),i=new Promise(((e,i)=>{this._responseHandlers.set(t,{resolve:e,reject:i})}));for(var r=arguments.length,s=new Array(r>1?r-1:0),n=1;n<r;n++)s[n-1]=arguments[n];return this._postRequest(t,e,s),i}_postRequest(e,t,i){if(this._closed)throw new Error("Can not postRequest after closed!!");try{this._messager.postMessage({id:e,name:t,args:i},this._transferObjs)}catch(e){(0,s.B)().tracing.Log_Error("[rpc] Error in postRequest",e)}this._transferObjs=[]}_postReponse(e,t){if(this._closed)throw new Error("Can not postReponse after closed!!");this._messager.postMessage({id:0,resId:e,response:t},this._transferObjs),this._transferObjs=[]}_serializeError(e){return e instanceof Error?{message:e.message,name:e.name,stack:e.stack}:e}_handleMessage(e){const t=e.data;if("id"in t)try{if(t.id<0)-1===t.id?(this._closePeerIfNeeded(t.reason),this._resolveCloseReceived()):(0,r.Yu)();else{if(0===t.id){const e=this._responseHandlers.get(t.resId);if(!e)return void this._logError("DualRPC.handleMessage: ".concat(t.resId," not found!"));const i=t.response;return"ret"in i?e.resolve(i.ret):"err"in i?(e.reject(i.err),this._logError("DualRPC.handleMessage err: ".concat(i.err))):(0,r.Yu)("Invalid Response"),this._responseHandlers.delete(t.resId),void this._idGenerator.release(t.resId)}if(1===t.id){try{const e=this._notifyHandlers[t.name];e&&e(...t.args)}catch(e){}return}{if((0,r.vA)(t.id>1),!(t.name in this._invokeHandlers))return void this._logError("DualRPC.handleMessage: ".concat(t.name," not registered!"));let i,s;try{const e=this._invokeHandlers[t.name];i=e(...t.args)}catch(e){s=e}if(s)return void this._postReponse(t.id,{err:this._serializeError(s)});if(!(i instanceof Promise)){try{this._postReponse(t.id,{ret:i})}catch(e){this._postReponse(t.id,{err:this._serializeError(e)})}return}this._invokeResults.add(i),i.then((e=>{this._postReponse(t.id,{ret:e})})).catch((e=>{this._postReponse(t.id,{err:this._serializeError(e)})})).finally((()=>{this._invokeResults.delete(i),this._resolveInvokeResultsSended&&0===this._invokeResults.size&&this._resolveInvokeResultsSended()}))}}}catch(e){this._logError("DualRPC.handleMessage err!!",e)}}_closePeerIfNeeded(e){this._closed||(this._closed=!0,this._onClose&&this._onClose(e),0===this._invokeResults.size?(this._messager.postMessage({id:-1,reason:e},[]),setTimeout((()=>{this._resolveCloseSent()}),10)):new Promise((e=>{this._resolveInvokeResultsSended=e})).then((()=>{this._messager.postMessage({id:-1,reason:e},[])})).then((()=>{setTimeout((()=>{this._resolveCloseSent()}),10)})))}close(e){this._closePeerIfNeeded(e)}set onClose(e){this._onClose=e}}},2484:(e,t,i)=>{i.d(t,{n:()=>r});const r={AUDIO_BRIDGE_1:{index:1,default:15},AUDIO_BRIDGE_2:{index:2,default:1},HW_ENCODER_FOR_360P:{index:3,default:0},WEBGL_CONTEXT_LOST_OPT:{index:4,default:0},RECEIVE_720P_ON_SAFARI:{index:5,default:0},MULTI_VIEW_ON_MOBILE:{index:8,default:0},CHROMEOS_AEC:{index:10,default:1},AUDIO_DENOISE:{index:11,default:1,candidates:{NO_CONFIG:0,SHOW_IN_PROFILE:1,DEFAULT_VALUE_GREATER_THAN_4_CORES:2}},VB_ON_FIREFOX:{index:12,default:0},ENABLE_DECODE_720P_ON_IOS:{index:15,default:1},UNIFIED_RENDER:{index:20,default:0},WEBGPU_RENDERER:{index:21,default:0},ORIGINAL