1 |
- (self.webpackChunkwhiteboard_bridge=self.webpackChunkwhiteboard_bridge||[]).push([[179],{80782:function(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=function(){return[]},t.resolve=t,t.id=80782,e.exports=t},89734:function(e,t,n){"use strict";n.r(t)},6167:function(e,t,n){"use strict";function r(e){return r="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},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=void 0,t=void 0;function n(e){if(W){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];$.apply(void 0,[e].concat(n))}}function r(){window.manager?(window.manager.destroy(),window.manager=void 0,e=void 0,t=void 0):e?(e.bindHtmlElement(null),e=void 0):t&&(t.bindHtmlElement(null),t=void 0)}function k(e){var t=e.enableInterrupterAPI?function(e){var t=a.default.call("sdk.urlInterrupter",e);return t.length>0?t:e}:void 0,r=e.log,o=e.__nativeTags,c=e.__platform,v=(e.initializeOriginsStates,e.useMultiViews),b=e.userCursor,w=(e.enableInterrupterAPI,e.routeBackup,e.enableRtcIntercept),P=e.enableImgErrorCallback,O=e.enableIFramePlugin,k=e.enableSyncedStore,M=R(e,["log","__nativeTags","__platform","initializeOriginsStates","useMultiViews","userCursor","enableInterrupterAPI","routeBackup","enableRtcIntercept","enableImgErrorCallback","enableIFramePlugin","enableSyncedStore"]);W=!!r,D=e,n("newWhiteSdk",e),c&&(window.__platform=c),P&&(0,S.hookCreateElement)(),U=b?new h.CursorTool:void 0,o&&(window.__nativeTags=T(T({},window.__nativeTags),o));var C=M.pptParams||{};w&&(C.rtcClient=V);var E,A=[],x=I(window.pluginParams||[]);try{for(x.s();!(E=x.n()).done;){var F=E.value,B=N({},F.name,window[F.variable]);A.push(B)}}catch(e){x.e(e)}finally{x.f()}var J=(0,s.createPlugins)(T({video:u.videoPlugin,audio:l.audioPlugin,video2:f.videoPlugin2,audio2:d.audioPlugin2,"video.js":(0,p.videoJsPlugin)({log:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];$.apply(void 0,["videoJsPlugin",e].concat(n))}})},A));J.setPluginContext("video.js",{enable:!1,verbose:!0});var z,H=I(window.pluginContext||[]);try{for(H.s();!(z=H.n()).done;){var G=z.value;J.setPluginContext(G.name,G.params)}}catch(e){H.e(e)}finally{H.f()}window.plugins=J;var q;y.WindowManager.register({kind:"Slide",appOptions:{debug:!1},addHooks:m.addHooks,src:(q=_(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",m.default);case 1:case"end":return e.stop()}}),e)}))),function(){return q.apply(this,arguments)})});var X,Z=I(window.AppRegisterParams||[]);try{for(Z.s();!(X=Z.n()).done;){var K=X.value;y.WindowManager.register({kind:K.kind,appOptions:K.appOptions,src:window[K.src]})}}catch(e){Z.e(e)}finally{Z.f()}var Y=[].concat(j(O?[i.IframeBridge]:[]),j(k?[g.SyncedStore]:[]));try{L=new s.WhiteWebSdk(T(T({},M),{},{invisiblePlugins:Y,wrappedComponents:O?[i.IframeWrapper]:void 0,plugins:J,urlInterrupter:t,onWhiteSetupFailed:function(e){n("onWhiteSetupFailed",e),a.default.call("sdk.setupFail",{message:e.message,jsStack:e.stack})},pptParams:C,useMobXState:v})),window.sdk=L}catch(e){n("onWhiteSetupFailed",e),a.default.call("sdk.setupFail",{message:e.message,jsStack:e.stack})}}function M(t,o){if(L){r(),n("joinRoom",t);var i=t.timeout,u=void 0===i?45e3:i,l=t.cameraBound,f=t.windowParams,d=t.disableCameraTransform,p=t.nativeWebSocket,m=R(t,["timeout","cameraBound","windowParams","disableCameraTransform","nativeWebSocket"]),b=D.useMultiViews,h=j(b?[y.WindowManager]:[]);window.nativeWebSocket=p,L.joinRoom(T(T({useMultiViews:b,disableCameraTransform:d},m),{},{invisiblePlugins:h,cursorAdapter:b?void 0:U,cameraBound:(0,v.convertBound)(l),disableMagixEventDispatchLimit:b}),{onPhaseChanged:function(t){return function(t,n){a.default.call("room.firePhaseChanged",t),setTimeout((function(){e&&e.phase===s.RoomPhase.Reconnecting&&e.disconnect().then((function(){a.default.call("room.fireDisconnectWithError","Reconnect time exceeds ".concat(n," milliseconds, sdk call disconnect automatically"))}))}),n)}(t,u)},onRoomStateChanged:G,onDisconnectWithError:q,onKickedWithReason:X,onCatchErrorWhenAppendFrame:ee,onCatchErrorWhenRender:te,onCanRedoStepsUpdate:F,onCanUndoStepsUpdate:x,onPPTLoadProgress:ne,onPPTMediaPlay:re,onPPTMediaPause:oe}).then(function(){var t=_(regeneratorRuntime.mark((function t(a){var i,s,u,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r(),u=(e=a).state,!b){t.next=16;break}return t.prev=4,t.next=7,E(e,f);case 7:l=t.sent,u=T(T(T({},u),{windowBoxState:l.boxState}),{},{cameraState:l.cameraState}),t.next=14;break;case 11:return t.prev=11,t.t0=t.catch(4),t.abrupt("return",o(JSON.stringify({__error:{message:t.t0.message,jsStack:t.t0.stack}})));case 14:t.next=18;break;case 16:e.bindHtmlElement(ae.current),U&&U.setRoom(e);case 18:if(!(null===(i=D)||void 0===i?void 0:i.enableSyncedStore)){t.next=23;break}return t.next=21,g.SyncedStore.create(e);case 21:window.syncedStore=t.sent,window.syncedStore.emitter.on("attributesUpdate",(function(e){n("attributesUpdate",e),Z(e)}));case 23:return(0,c.registerRoom)(e,n),t.abrupt("return",o(JSON.stringify({state:u,observerId:e.observerId,isWritable:e.isWritable,syncedStore:null===(s=window.syncedStore)||void 0===s?void 0:s.attributes})));case 25:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(e){return t.apply(this,arguments)}}()).catch((function(e){return o(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}))}else o(JSON.stringify({__error:{message:"sdk init failed"}}))}function C(e,o){if(J=e,L){var i=e.step,u=void 0===i?500:i,l=e.cameraBound,f=e.mediaURL,d=(e.windowParams,R(e,["step","cameraBound","mediaURL","windowParams"]));r(),n("replayRoom",e);var p,m=D.useMultiViews;L.replayRoom(T(T({},d),{},{cursorAdapter:U,cameraBound:(0,v.convertBound)(l),invisiblePlugins:m?[y.WindowManager]:[],useMultiViews:m}),{onPhaseChanged:(p=!!f,function(e){var r,o;if((e===s.PlayerPhase.Pause||e===s.PlayerPhase.Playing)&&(null===(r=D)||void 0===r?void 0:r.useMultiViews)&&null===(null===(o=t)||void 0===o?void 0:o.getInvisiblePlugin(y.WindowManager.kind))&&!window.manager){var i=t,c=J,u=c.windowParams;setTimeout((function(){E(i,u).catch((function(e){console.error("mount error",e)}))}),0)}var l=function(e){var t;B.time=0,n("onPhaseChanged:",e),a.default.call("player.onPhaseChanged",e),(null===(t=D)||void 0===t?void 0:t.enableIFramePlugin)&&(0,P.postIframeMessage)({eventName:"onPhaseChanged",params:[e]},n)};p&&e!==s.PlayerPhase.WaitingFirstFrame&&e!==s.PlayerPhase.Stopped||l(e)}),onLoadFirstFrame:K,onPlayerStateChanged:Y,onStoppedWithError:Q,onProgressTimeChanged:function(e){return function(e,r){var o;(function(e,n,r){n>=B.time?(e(),B.time=Math.ceil(n/r)*r):t&&n+r>t.timeDuration&&(e(),B.time=n)})((function(){a.default.call("player.onScheduleTimeChanged",e)}),e,r),(null===(o=D)||void 0===o?void 0:o.enableIFramePlugin)&&(0,P.postIframeMessage)({eventName:"onProgressTimeChanged",params:[e]},n)}(e,u)},onCatchErrorWhenAppendFrame:ee,onCatchErrorWhenRender:te,onPPTLoadProgress:ne,onPPTMediaPlay:re,onPPTMediaPause:oe}).then(function(){var e=_(regeneratorRuntime.mark((function e(a){var i,s,u,l,d,p,y,g;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(),t=a,m||(a.bindHtmlElement(ae.current),U&&(null===(i=U)||void 0===i||i.setPlayer(t))),f?((s=document.createElement("video")).setAttribute("x5-video-player-type","h5-page"),s.setAttribute("playsInline",""),s.setAttribute("style","display:none;"),s.setAttribute("class","video-js"),document.body.appendChild(s),u=new w.default(t,{url:f,videoDOM:s}),l=u.create(),(0,c.registerPlayer)(a,l,B,n)):(0,c.registerPlayer)(a,void 0,B,n),d=a.progressTime,p=a.timeDuration,y=a.framesCount,g=a.beginTimestamp,e.abrupt("return",o(JSON.stringify({timeInfo:{scheduleTime:d,timeDuration:p,framesCount:y,beginTimestamp:g}})));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){return o(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}))}else o(JSON.stringify({__error:{message:"sdk init failed"}}))}function E(e,t){return A.apply(this,arguments)}function A(){return A=_(regeneratorRuntime.mark((function e(t,r){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y.WindowManager.mount(T(T({containerSizeRatio:9/16,chessboard:!0,cursor:!!U},r),{},{container:ae.current,room:t}));case 2:return o=e.sent,(0,O.registerManager)(o,n),e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)}))),A.apply(this,arguments)}window.testRoom=function(){W=!0,k(D={log:!0,userCursor:!0,__platform:"ios",appIdentifier:"",useMultiViews:!0}),M({uuid:"",uid:"0",roomToken:"",userPayload:{avatar:"https://white-pan.oss-cn-shanghai.aliyuncs.com/40/image/mask.jpg"}},(function(){}))},window.testReplay=function(){W=!0,k(D={log:!0,userCursor:!0,__platform:"ios",appIdentifier:"",useMultiViews:!0}),C({room:"",roomToken:""},(function(){}))};function x(e){a.default.call("room.fireCanUndoStepsUpdate",e)}function F(e){a.default.call("room.fireCanRedoStepsUpdate",e)}function G(e){a.default.call("room.fireRoomStateChanged",JSON.stringify(e))}function q(e){a.default.call("room.fireDisconnectWithError",e.message)}function X(e){a.default.call("room.fireKickedWithReason",e)}function Z(e){a.default.call("room.fireAttributesUpdate",JSON.stringify(e))}function K(){var e;n("onLoadFirstFrame"),a.default.call("player.onPlayerStateChanged",JSON.stringify(t.state)),a.default.call("player.onLoadFirstFrame"),(null===(e=D)||void 0===e?void 0:e.enableIFramePlugin)&&(0,P.postIframeMessage)({eventName:"onLoadFirstFrame",params:[]},n)}function Y(e){var t;a.default.call("player.onPlayerStateChanged",JSON.stringify(e)),(null===(t=D)||void 0===t?void 0:t.enableIFramePlugin)&&(0,P.postIframeMessage)({eventName:"onPlayerStateChanged",params:[e]},n)}function Q(e){var t;a.default.call("player.onStoppedWithError",JSON.stringify({error:e.message,jsStack:e.stack})),(null===(t=D)||void 0===t?void 0:t.enableIFramePlugin)&&(0,P.postIframeMessage)({eventName:"onStoppedWithError",params:[e]},n)}function ee(t,r){n("onCatchErrorWhenAppendFrame",[t,r.message]),e&&a.default.call("room.fireCatchErrorWhenAppendFrame",{userId:t,error:r.message})}function te(t){e||a.default.call("player.onCatchErrorWhenRender",{error:t.message})}function ne(e,t){}function re(e,t){n("onPPTMediaPlay",e,t),a.default.call("sdk.onPPTMediaPlay",{shapeId:e,type:t})}function oe(e,t){n("onPPTMediaPause",e,t),a.default.call("sdk.onPPTMediaPause",{shapeId:e,type:t})}(0,o.useEffect)((function(){return function(){window.removeEventListener("error",b.globalErrorEvent),window.removeEventListener("message",b.postCustomMessage)}}),[]),(0,s.setAsyncModuleLoadMode)(s.AsyncModuleLoadMode.StoreAsBase64),window.addEventListener("error",b.globalErrorEvent),window.addEventListener("message",b.postCustomMessage),a.default.registerAsyn("sdk",{newWhiteSdk:k,joinRoom:M,replayRoom:C,isPlayable:function(e,t){if(L){e.step,e.cameraBound;var n=R(e,["step","cameraBound"]);L.isPlayable(T({},n)).then((function(e){t(e)}))}else t(!1)},asyncInsertFontFaces:function(e,t){n("asyncInsertFontFaces",e);var r,o=I(e);try{var a=function(){var e=r.value,o=e["font-weight"],a=e["font-style"],i=e["unicode-range"],s=JSON.parse(JSON.stringify({weight:o,style:a,unicodeRange:i})),c=new FontFace(e["font-family"],e.src,s);c.load().then((function(r){n("asyncInsertFontFaces load font success",e),document.fonts.add(c),t({success:!0,fontFace:e})})).catch((function(r){n("asyncInsertFontFaces load font failed",e),t({success:!1,fontFace:e,error:r})}))};for(o.s();!(r=o.n()).done;)a()}catch(e){o.e(e)}finally{o.f()}},updateNativeFontFaceCSS:function(e){n("insertFontFaces",e);var t=document.getElementById(H);t||((t=document.createElement("style")).id=H,document.body.appendChild(t));var r=e.map((function(e){var t=Object.keys(e).reduce((function(t,n){return e[n].includes(" ")?"".concat(t,"\n").concat(n,': "').concat(e[n],'";'):"".concat(t,"\n").concat(n,": ").concat(e[n],";")}),"");return"@font-face {\n ".concat(t,"\n }")}));t.innerHTML=r.join("\n")},updateNativeTextareaFont:function(e){n("updateTextFont",e);var t=document.getElementById(z);t||((t=document.createElement("style")).id=z,document.body.appendChild(t));var r=e.map((function(e){return'"'.concat(e,'"')})).join(",");t.innerHTML=".netless-whiteboard textarea {\n font-family: ".concat(r,"; \n }")}});var ae=(0,o.useRef)(null);(0,b.registerBridge)(["sdk"],n);return o.default.createElement("div",{id:"whiteboard-container",ref:ae,style:{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:1}})},n(18808);var o=C(n(17328)),a=k(n(64037)),i=n(24645),s=n(71895),c=n(70396),u=n(44112),l=n(87980),f=n(56868),d=n(25275),p=n(11559),m=C(n(17562)),y=n(7703);n(19418);var g=n(39860),v=n(51126),b=n(28388),h=n(20597),w=k(n(92710));n(89734),n(75735);var S=n(54505),P=n(89774),O=n(15581);function k(e){return e&&e.__esModule?e:{default:e}}function M(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return M=function(){return e},e}function C(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=M();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}function j(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function _(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){E(a,r,o,i,s,"next",e)}function s(e){E(a,r,o,i,s,"throw",e)}i(void 0)}))}}function I(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=A(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function A(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F(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 T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var W=!1,B={time:0},D=void 0,J=void 0,L=void 0,U=void 0,V=new c.Rtc,z="whiteboard-native-css",H="whiteboard-native-font-face",G="whiteboard-container";function $(e){for(var t,n,r,o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];((t=console).log.apply(t,[e].concat(i)),window.room)&&(n=window.room.logger).info.apply(n,[e].concat(i));r=0===i.length?void 0:1===i.length?i[0]:i.every((function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}))?i.join(" "):i,a.default.call("sdk.logger",{funName:e,params:r})}window.setBackgroundColor=function(e,t,n,r){var o=document.getElementById(G);if(o){var a="rgb(".concat(e,", ").concat(t,", ").concat(n,")");o.style.background=a}else console.log(G,"not exist")}},23878:function(e,t,n){"use strict";var r=n(51013);window.ResizeObserver||(window.ResizeObserver=r.ResizeObserver)},16139:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDisplayer=function(e,t){var n=function(t,n){s(t,e.scenePreview.bind(e),n)},s=function(e,t,n){var r=document.createElement("div");r.setAttribute("class","shadow");var o,i=document.getElementById("whiteboard-container");if(i){var s=window.getComputedStyle(i).backgroundColor;r.style.background=s}document.body.appendChild(r),t(e,r,r.clientWidth,r.clientHeight),(0,a.default)(r,{useCORS:!0,onclone:(o=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){c(a,r,o,i,s,"next",e)}function s(e){c(a,r,o,i,s,"throw",e)}i(void 0)}))}}(regeneratorRuntime.mark((function e(t){var n,r,o,a,i,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=Array.from(t.getElementsByTagName("image")),r=0,o=n;case 2:if(!(r<o.length)){e.next=13;break}return a=o[r],s=(i=a).href.baseVal,e.next=8,u(s);case 8:c=e.sent,i.href.baseVal=c;case 10:r++,e.next=2;break;case 13:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}).then((function(e){var t=e.toDataURL();document.body.removeChild(r),n(t)}))};r.default.register(l,{postMessage:function(e){var n={name:"parentWindow",payload:e},r=document.getElementsByTagName("iframe");r.length>0&&r[0].contentWindow?r[0].contentWindow.postMessage(n,"*"):0==r.length?t("postmessage","no frames exist"):t("postmessage","no content Window")},scaleIframeToFit:function(){var t=e.getInvisiblePlugin("IframeBridge");t&&t.scaleIframeToFit()},setDisableCameraTransform:function(t){e.disableCameraTransform=t},getDisableCameraTransform:function(){return e.disableCameraTransform},setCameraBound:function(n){var r=(0,o.convertBound)(n);t("setCameraBound bound",r),e.setCameraBound(r)},getMemberState:function(t){return JSON.stringify(e.memberState(t))},scenePathType:function(t){return e.scenePathType(t)},entireScenes:function(){return e.entireScenes()},moveCamera:function(n){t("moveCamera: ",n),e.moveCamera(n)},moveCameraToContain:function(n){t("moveCameraToContain: ",n),e.moveCameraToContain(n)},refreshViewSize:function(){t("refreshViewSize"),e.refreshViewSize()},scalePptToFit:function(n){t("scalePptToFit",n),e.scalePptToFit(n)},convertToPointInWorld:function(n,r){return t("convertToPointInWorld",n,r),e.convertToPointInWorld({x:n,y:r})},setBackgroundColor:function(e,n,r,o){var a=document.getElementById("whiteboard-container");t("setBackgroundColor native",e,n,r,o);var i="rgb(".concat(e,", ").concat(n,", ").concat(r,")");t("setBackgroundColor color",i),a.style.background=i},addHighFrequencyEventListener:function(n,o){t("addHighFrequencyEventListener",n,o),e.addMagixEventListener(n,(function(t){var n=e.uuid||e.roomUUID,o=t.map((function(e){return{uuid:n,eventName:e.event,payload:e.payload,scope:e.scope,authorId:e.authorId}}));(0,i.isRoom)(e)?r.default.call("room.fireHighFrequencyEvent",JSON.stringify(o)):r.default.call("player.fireHighFrequencyEvent",JSON.stringify(o))}),o)},addMagixEventListener:function(n){t("addMagixEventListener",n),e.addMagixEventListener(n,(function(n){t("fireMagixEvent",n);var o={uuid:e.uuid||e.roomUUID,eventName:n.event,payload:n.payload,scope:n.scope,authorId:n.authorId};(0,i.isRoom)(e)?r.default.call("room.fireMagixEvent",JSON.stringify(o)):r.default.call("player.fireMagixEvent",JSON.stringify(o))}))},removeMagixEventListener:function(n){t("removeMagixEventListener",n),e.removeMagixEventListener(n)}}),r.default.registerAsyn(f,{scenePreview:n,sceneSnapshot:function(t,n){s(t,e.fillSceneSnapshot.bind(e),n)}}),window.html2canvas=a.default,window.pagePreview=n,(0,i.registerBridge)([l,f],t)};var r=s(n(64037)),o=n(51126),a=s(n(90945)),i=n(28388);function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function u(e){return fetch(e).then((function(e){return e.blob()})).then((function(e){return new Promise((function(t){var n=new FileReader;n.onload=function(){t(this.result)},n.readAsDataURL(e)}))}))}var l="displayer",f="displayerAsync"},74172:function(){"use strict";"undefined"==typeof Proxy&&(window.__netlessMobXUseProxies="ifavailable")},15581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerManager=function(e,t){window.manager=e,e.mainView.callbacks.on("onCameraUpdated",(function(t){var n={cameraState:i(i({},e.mainView.size),t)};window.room?o.default.call("room.fireRoomStateChanged",JSON.stringify(n)):window.player&&o.default.call("player.onPlayerStateChanged",JSON.stringify(n))})),e.mainView.callbacks.on("onSizeUpdated",(function(t){var n=e.mainView.camera,r={cameraState:i(i({},t),n)};window.room?o.default.call("room.fireRoomStateChanged",JSON.stringify(r)):window.player&&o.default.call("player.onPlayerStateChanged",JSON.stringify(r))})),e.emitter.on("boxStateChange",(function(e){var t={windowBoxState:e};window.room?o.default.call("room.fireRoomStateChanged",JSON.stringify(t)):window.player&&o.default.call("player.onPlayerStateChanged",JSON.stringify(t))})),window.manager=e},n(71897);var r,o=(r=n(64037))&&r.__esModule?r:{default:r};function a(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 i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},82969:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerPlayer=function(e,t,n,r){window.player=e,window.combinePlayer=t,(0,i.registerDisplayer)(e,r),t&&t.setOnStatusChange((function(e,t){switch(n.time=0,e){case s.PublicCombinedStatus.Pause:o.default.call("player.onPhaseChanged",a.PlayerPhase.Pause);break;case s.PublicCombinedStatus.PauseBuffering:case s.PublicCombinedStatus.PauseSeeking:case s.PublicCombinedStatus.PlayingBuffering:case s.PublicCombinedStatus.PlayingSeeking:o.default.call("player.onPhaseChanged",a.PlayerPhase.Buffering);break;case s.PublicCombinedStatus.Ended:o.default.call("player.onPhaseChanged",a.PlayerPhase.Ended);break;case s.PublicCombinedStatus.Playing:o.default.call("player.onPhaseChanged",a.PlayerPhase.Playing);break;case s.PublicCombinedStatus.Disabled:o.default.call("player.onStoppedWithError",JSON.stringify({error:t}))}}));o.default.registerAsyn("player",{play:function(){r("play"),t?t.play():e.play()},pause:function(){r("pause"),t?t.pause():e.pause()},stop:function(){try{r("stop"),e.stop()}catch(e){console.log("stop:",e.message)}},seekToScheduleTime:function(n){r("seekToScheduleTime",n),t?t.seek(n):e.seekToProgressTime(n)},setObserverMode:function(t){r("setObserverMode",t),e.setObserverMode(t)},setPlaybackSpeed:function(n){r("playbackSpeed",n),t?t.playbackRate=n:e.playbackSpeed=n}}),o.default.register("player.state",{roomUUID:function(){return e.roomUUID},phase:function(){return r("phase",e.phase),e.phase},playerState:function(){try{r("playerState",e.state);var t=e.state;return window.manager&&(t=u(u(u({},t),{windowBoxState:window.manager.boxState}),{},{cameraState:window.manager.cameraState})),t}catch(e){return{}}},isPlayable:function(){return e.isPlayable},playbackSpeed:function(){return t?t.playbackRate:(r("playbackSpeed",e.playbackSpeed),e.playbackSpeed)},timeInfo:function(){var t={scheduleTime:e.progressTime,timeDuration:e.timeDuration,framesCount:e.framesCount,beginTimestamp:e.beginTimestamp};return r("timeInfo",t),t}})};var r,o=(r=n(64037))&&r.__esModule?r:{default:r},a=n(71895),i=n(16139),s=n(92710);function c(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 u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},33739:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerRoom=function(e,t){function n(){e.getInvisiblePlugin("IframeBridge")&&e.getInvisiblePlugin("IframeBridge").computedZindex(),e.getInvisiblePlugin("IframeBridge")&&e.getInvisiblePlugin("IframeBridge").updateStyle()}window.room=e,(0,i.registerDisplayer)(e,t),o.default.register("ppt",{nextStep:function(){e.pptNextStep()},previousStep:function(){e.pptPreviousStep()}}),o.default.register(S,{syncBlockTimestamp:function(t){e.syncBlockTimestamp(t)},disableSerialization:function(t){e.disableSerialization=t},copy:function(){e.copy()},paste:function(){e.paste()},duplicate:function(){e.duplicate()},delete:function(){e.delete()},disableEraseImage:function(t){e.disableEraseImage=t}}),o.default.registerAsyn(P,{redo:function(t){t(e.redo())},undo:function(t){t(e.undo())},canRedoSteps:function(t){t(e.canRedoSteps)},canUndoSteps:function(t){t(e.canUndoSteps)},setGlobalState:function(t){e.setGlobalState(t)},setScenePath:function(t,n){try{window.manager?window.manager.setMainViewScenePath(t):e.setScenePath(t),n(JSON.stringify({}))}catch(e){return n(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}},setMemberState:function(t){e.setMemberState(t)},setViewMode:function(t){var n=a.ViewMode[t];void 0===n&&(n=a.ViewMode.Freedom),window.manager?window.manager.setViewMode(n):e.setViewMode(n)},setWritable:function(t,n){e.setWritable(t).then((function(){n(JSON.stringify({isWritable:e.isWritable,observerId:e.observerId}))})).catch((function(e){n(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}))},getMemberState:function(t){return t(JSON.stringify(e.state.memberState))},getGlobalState:function(t){return t(JSON.stringify(e.state.globalState))},getSceneState:function(t){return t(JSON.stringify(e.state.sceneState))},getRoomMembers:function(t){return t(JSON.stringify(e.state.roomMembers))},getPptImages:function(t){var n=e.state.sceneState.scenes.map((function(e){return e.ppt?e.ppt.src:""}));return t(JSON.stringify(n))},setSceneIndex:function(t,n){try{window.manager?window.manager.setMainViewSceneIndex(t):e.setSceneIndex(t),n(JSON.stringify({}))}catch(e){n(JSON.stringify({__error:{message:e.message,jsStack:e.stack}}))}},getScenes:function(t){return t(JSON.stringify(e.state.sceneState.scenes))},getZoomScale:function(t){var n=1;return n=window.manager?window.manager.mainView.camera.scale:e.state.cameraState.scale,t(JSON.stringify(n))},getBroadcastState:function(t){return t(JSON.stringify(e.state.broadcastState))},getRoomPhase:function(t){return t(e.phase)},disconnect:function(t){e.disconnect().then((function(){t()}))},zoomChange:function(t){e.moveCamera({scale:t})},disableCameraTransform:function(t){e.disableCameraTransform=t},disableDeviceInputs:function(t){window.manager&&window.manager.setReadonly(t),e.disableDeviceInputs=t,n()},disableOperations:function(t){e.disableCameraTransform=t,e.disableDeviceInputs=t,n()},disableWindowOperation:function(e){var t;null===(t=window.manager)||void 0===t||t.setReadonly(e)},putScenes:function(t,n,r,o){e.putScenes(t,n,r),o(JSON.stringify(e.state.sceneState))},removeScenes:function(t){e.removeScenes(t)},moveScene:function(t,n){e.moveScene(t,n)},insertText:function(t,n,r,o){window.manager?o(window.manager.mainView.insertText(t,n,r)):o(e.insertText(t,n,r))},cleanScene:function(t){e.cleanCurrentScene(t)},insertImage:function(t){e.insertImage(t)},insertVideo:function(e){},completeImageUpload:function(t,n){e.completeImageUpload(t,n)},dispatchMagixEvent:function(t){e.dispatchMagixEvent(t.eventName,t.payload)},setTimeDelay:function(t){e.timeDelay=t},addApp:function(e,t,n,r){if(window.manager)if("Slide"===e){var o=t;(function(e,t,n){var r=function(e){var t,n=[],r="",o="",a=m(/^pptx?(:\/\/[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uFEFE\uFF00-\uFFFF]+?dynamicConvert)\/([0-9A-Z_a-z]+)\//,{prefix:1,taskId:2}),i=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}(e);try{for(i.s();!(t=i.n()).done;){var s=t.value,c=s.name,u=s.ppt;if(n.push({name:c}),u&&u.src.startsWith("ppt")){var l=a.exec(u.src);if(l&&l.groups){r=l.groups.taskId,o="https"+l.groups.prefix;break}}}}catch(e){i.e(e)}finally{i.f()}return{scenesWithoutPPT:n,taskId:r,url:o}}(n),o=r.scenesWithoutPPT,a=r.taskId,i=r.url;try{return a&&i?window.manager.addApp({kind:"Slide",options:{scenePath:e,title:t,scenes:o},attributes:{taskId:a,url:i}}):window.manager.addApp({kind:s.BuiltinApps.DocsViewer,options:{scenePath:e,title:t,scenes:n}})}catch(e){return console.log(e),Promise.reject()}})(o.scenePath,o.title,o.scenes).then((function(e){r(e)}))}else window.manager.addApp({kind:e,options:t,attributes:n}).then((function(e){r(e)}))},getSyncedState:function(e){var t=window.syncedStore?window.syncedStore.attributes:{};e(JSON.stringify(t))},safeSetAttributes:function(e){var t;null===(t=window.syncedStore)||void 0===t||t.safeSetAttributes(e)},safeUpdateAttributes:function(e,t){var n;null===(n=window.syncedStore)||void 0===n||n.safeUpdateAttributes(e,t)}}),o.default.register(O,{getRoomState:function(){var t=e.state;return window.manager?f(f(f({},t),{windowBoxState:window.manager.boxState}),{},{cameraState:window.manager.cameraState}):e.state},getTimeDelay:function(){return e.timeDelay},getPhase:function(){return e.phase},isWritable:function(){return e.isWritable},debugInfo:function(){try{var t=e.screen,n=t.camera,r=t.visionRectangle,o=t.adaptedRectangle,a=t.divElement;return{camera:n,visionRectangle:r,adaptedRectangle:o,divWidth:a.clientWidth,divHeight:a.clientHeight}}catch(e){return{error:e.message}}}}),(0,c.registerBridge)(["ppt",P,O,S],t)};var r,o=(r=n(64037))&&r.__esModule?r:{default:r},a=n(71895),i=n(16139),s=n(7703),c=n(28388);function u(e){return u="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},u(e)}function l(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){m=function(e,t){return new a(e,void 0,t)};var n=g(RegExp),r=RegExp.prototype,o=new WeakMap;function a(e,t,r){var a=n.call(this,e,t);return o.set(a,r||o.get(e)),a}function i(e,t){var n=o.get(t);return Object.keys(n).reduce((function(t,r){return t[r]=e[n[r]],t}),Object.create(null))}return y(a,n),a.prototype.exec=function(e){var t=r.exec.call(this,e);return t&&(t.groups=i(t,this)),t},a.prototype[Symbol.replace]=function(e,t){if("string"==typeof t){var n=o.get(this);return r[Symbol.replace].call(this,e,t.replace(/\$<([^>]+)>/g,(function(e,t){return"$"+n[t]})))}if("function"==typeof t){var a=this;return r[Symbol.replace].call(this,e,(function(){var e=[];return e.push.apply(e,arguments),"object"!==u(e[e.length-1])&&e.push(i(e,a)),t.apply(this,e)}))}return r[Symbol.replace].call(this,e,t)},m.apply(this,arguments)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}function g(e){var t="function"==typeof Map?new Map:void 0;return g=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 v(e,arguments,w(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)},g(e)}function v(e,t,n){return v=b()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&h(o,n.prototype),o},v.apply(null,arguments)}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var S="room.sync",P="room",O="room.state"},24666:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rtc=void 0;var r,o=(r=n(64037))&&r.__esModule?r:{default:r};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"startCallback",void 0),i(this,"stopCallback",void 0),i(this,"startAudioMixing",(function(e,n,r,a,i){return t.startCallback=i,o.default.call("rtc.startAudioMixing",{filePath:e,loopback:n,replace:r,cycle:a})})),i(this,"stopAudioMixing",(function(e){return t.stopCallback=e,o.default.call("rtc.stopAudioMixing")})),o.default.register("rtc",{callback:function(n,r){switch(n){case e.kStopAudioMixing:t.stopCallback&&t.stopCallback(n,r);break;case e.kStartAudioMixing:t.startCallback&&t.startCallback(n,r);break;default:t.startCallback?t.startCallback(n,r):t.stopCallback&&t.stopCallback(n,r)}}})}var t,n,r;return t=e,(n=[{key:"pauseAudioMixing",value:function(){return o.default.call("rtc.pauseAudioMixing")}},{key:"resumeAudioMixing",value:function(){return o.default.call("rtc.resumeAudioMixing")}},{key:"setAudioMixingPosition",value:function(e){return o.default.call("rtc.setAudioMixingPosition",e)}}])&&a(t.prototype,n),r&&a(t,r),e}();t.Rtc=s,i(s,"kStartAudioMixing",710),i(s,"kStopAudioMixing",713),i(s,"kAudioError",714)},44920:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketBridge=void 0;var r,o,a,i=(r=n(64037))&&r.__esModule?r:{default:r};function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){for(var t=window.atob(e),n=t.length,r=new Uint8Array(n),o=0;o<n;o++)r[o]=t.charCodeAt(o);return r.buffer}!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"}(o||(o={})),a=WebSocket,WebSocket=function(e,t){return window.nativeWebSocket?new f(e):new a(e,t)};var l=0,f=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c(this,"binaryType","blob"),c(this,"key",void 0),c(this,"_readyState",o.CONNECTING),c(this,"_bufferedAmount",0),c(this,"listeners",{}),c(this,"onceListeners",{}),c(this,"_onError",(function(e){n.key===e.key&&(console.log("_onError: ",e),n.dispatchEvent("error",e))})),c(this,"_onMessage",(function(e){n.key===e.key&&(console.log("_onMessage: ",e),"arraybuffer"===e.type?n.dispatchEvent("message",{data:u(e.data),key:n.key}):n.dispatchEvent("message",{data:e.data,key:n.key}))})),c(this,"_onClose",(function(e){n.key===e.key&&(console.log("_onClose: ",e),n._readyState=o.CLOSED,n.dispatchEvent("close",e))})),c(this,"_onOpen",(function(e){n.key===e.key&&(console.log("_onOpen"),n._readyState=o.OPEN,n.dispatchEvent("open",{}))})),this.key=l,l+=1,this.registerBridge(),i.default.call("ws.setup",{url:t,key:this.key})}var t,n,r;return t=e,(n=[{key:"send",value:function(e){if(e instanceof ArrayBuffer){var t=function(e){for(var t=new Uint8Array(e),n="",r=t.length,o=0;o<r;o++)n+=String.fromCharCode(t[o]);return window.btoa(n)}(e);console.log("send data: ",e," str: ",t),i.default.call("ws.send",{data:t,type:"arraybuffer",key:this.key})}else i.default.call("ws.send",{data:e,type:"string",key:this.key})}},{key:"close",value:function(e,t){console.log("close: ",{code:e,reason:t}),this._readyState=o.CLOSING,i.default.call("ws.close",{code:e,reason:t,key:this.key})}},{key:"addEventListener",value:function(e,t,n){this.listeners[e]=this.listeners[e]||[],this.onceListeners[e]=this.onceListeners[e]||[],n&&!0!==n&&n.once?this.onceListeners[e].push(t):this.listeners[e].push(t)}},{key:"removeEventListener",value:function(e,t,n){if(e in this.listeners){for(var r=this.listeners[e],o=0,a=r.length;o<a;o++)if(r[o]===t){r.splice(o,1);break}for(var i=this.onceListeners[e],s=0,c=i.length;s<c;s++)if(i[s]===t){i.splice(s,1);break}}}},{key:"dispatchEvent",value:function(e,t){if(!(e in this.listeners))return!0;for(var n=this.listeners[e].slice(),r=0,o=n.length;r<o;r++)n[r].call(this,t);for(var a=this.onceListeners[e].slice(),i=0,s=a.length;i<s;i++)a[i].call(this,t),a.splice(i,1);return!0}},{key:"registerBridge",value:function(){i.default.register("ws",{onError:this._onError,onMessage:this._onMessage,onClose:this._onClose,onOpen:this._onOpen})}},{key:"readyState",get:function(){return this._readyState}},{key:"bufferedAmount",get:function(){return this._bufferedAmount}}])&&s(t.prototype,n),r&&s(t,r),e}();t.WebSocketBridge=f},70396:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"registerRoom",{enumerable:!0,get:function(){return r.registerRoom}}),Object.defineProperty(t,"registerPlayer",{enumerable:!0,get:function(){return o.registerPlayer}}),Object.defineProperty(t,"Rtc",{enumerable:!0,get:function(){return a.Rtc}});var r=n(33739),o=n(82969),a=n(24666)},36037:function(e,t,n){"use strict";function r(e){return r="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},r(e)}n(67867),n(36470),n(76866),n(49320),n(70076),n(65427),n(38094),n(87272),n(20899),n(34062),n(89730),n(21175),n(81083),n(35749),n(27542),n(82203),n(19908),n(83909),n(54961),n(20628),n(97059),n(95377),n(3476),n(60188),n(22683),n(18059),n(29851),n(54196),n(87506),n(874),n(64925),n(12599),n(13764),n(81474),n(5371),n(45044),n(7125),n(79566),n(3317),n(64929),n(76542),n(51886),n(77804),n(6746),n(85640),n(80684),n(83836),n(78898),n(52792),n(51482),n(22199),n(89209),n(90777),n(38794),n(13292),n(66024),n(59078),n(10356),n(9805),n(92071),n(38347),n(40680),n(90750),n(62122),n(19460),n(21373),n(61590),n(32718),n(54003),n(48943),n(86157),n(22188),n(23870),n(77061),n(69325),n(81305),n(21191),n(52193),n(35123),n(76643),n(4715),n(36509),n(93134),n(47706),n(40022),n(29160),n(22646),n(18021),n(87956),n(97663),n(91622),n(13809),n(79474),n(99508),n(48018),n(46264),n(98132),n(47128),n(77878),n(94744),n(85463),n(31084),n(30947),n(85618),n(15482),n(31482),n(57050),n(5680),n(79484),n(74944),n(21731),n(32222),n(69907),n(41607),n(531),n(20298),n(6442),n(6205),n(39765),n(20825),n(34825),n(78482),n(86470),n(942),n(93885),n(64850),n(95976),n(22748),n(74743),n(47303),n(51401),n(87160),n(62971),n(88393),n(13641),n(82476),n(47659),n(19668),n(53650),n(50192),n(82580),n(96333),n(2650),n(18758),n(87853),n(78844),n(84289),n(97026),n(54829),n(40572),n(35401),n(85566),n(47779),n(22990),n(77054),n(46820),n(6253),n(31904),n(44043),n(72544),n(2517),n(40366),n(31144),n(69526),n(77716),n(24062),n(44006),n(42671),n(44786),n(24179),n(10733),n(31008),n(72019),n(27846),n(13987),n(74172),n(44920),n(66763),n(51678);var o,a=u(n(17328)),i=u(n(29640)),s=(o=n(6167))&&o.__esModule?o:{default:o};function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function u(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}n(23878),i.render(a.createElement(s.default,null),document.getElementById("root"))},51126:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertBound=function(e){if(!e)return;return{centerX:e.centerX,centerY:e.centerY,width:e.width,height:e.height,maxContentMode:a(e.maxContentMode),minContentMode:a(e.minContentMode)}};var r=n(71895),o=n(71897);function a(e){if(e){var t=void 0===e.scale?1:e.scale,n=void 0===e.space?0:e.space;o.ScaleMode.Scale;switch("string"==typeof e.mode?parseInt(o.ScaleMode[e.mode]):e.mode){case o.ScaleMode.Scale:return(0,r.contentModeScale)(t);case o.ScaleMode.AspectFill:return(0,r.contentModeAspectFill)();case o.ScaleMode.AspectFillScale:return(0,r.contentModeAspectFillScale)(t);case o.ScaleMode.AspectFit:return(0,r.contentModeAspectFit)();case o.ScaleMode.AspectFitScale:return(0,r.contentModeAspectFitScale)(t);case o.ScaleMode.AspectFitSpace:return(0,r.contentModeAspectFitSpace)(n);default:return}}}},28388:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerBridge=function(e,t){var n,r=window._dsaf,o=s(Object.getOwnPropertyNames(r));try{for(o.s();!(n=o.n()).done;){var a=n.value;if("_obs"===a){var c,u=r[a],l=s(Object.getOwnPropertyNames(u));try{for(l.s();!(c=l.n()).done;){var f=c.value;if(e.includes(f)){var d,p=u[f],m=s(Object.getOwnPropertyNames(p));try{var y=function(){var e=d.value,n=p[e];p[e]=function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t.apply(void 0,[e].concat(i(o.slice(0,-1)))),n.apply(void 0,o)}};for(m.s();!(d=m.n()).done;)y()}catch(e){m.e(e)}finally{m.f()}}}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){o.e(e)}finally{o.f()}var g,v=window._dsf,b=s(Object.getOwnPropertyNames(v));try{for(b.s();!(g=b.n()).done;){var h=g.value;if("_obs"===h){var w,S=v[h],P=s(Object.getOwnPropertyNames(S));try{for(P.s();!(w=P.n()).done;){var O=w.value;if(e.includes(O)){var k,M=S[O],C=s(Object.getOwnPropertyNames(M));try{var j=function(){var e=k.value,n=M[e];M[e]=function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t.apply(void 0,[e].concat(o)),n.apply(void 0,o)}};for(C.s();!(k=C.n()).done;)j()}catch(e){C.e(e)}finally{C.f()}}}}catch(e){P.e(e)}finally{P.f()}}}}catch(e){b.e(e)}finally{b.f()}},t.isRoom=function(e){return void 0===e.roomUUID},t.globalErrorEvent=function(e){t={message:e.message,error:e.error},console.log(JSON.stringify(t)),o.default.call("sdk.throwError",t);var t},t.postCustomMessage=function(e){var t=e.data;"pptImageLoadError"===t.name&&o.default.call("sdk.postMessage",JSON.stringify(t));"iframe"===t.name&&o.default.call("sdk.postMessage",JSON.stringify(t));t.shapeId&&t.mediaType&&t.action&&o.default.call("sdk.postMessage",JSON.stringify(t));t.customMessage&&o.default.call("sdk.postMessage",JSON.stringify(t))},t.usePrevious=function(e){var t=(0,a.useRef)();return(0,a.useEffect)((function(){t.current=e})),t.current};var r,o=(r=n(64037))&&r.__esModule?r:{default:r},a=n(17328);function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=c(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}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 r,o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},54505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hookCreateElement=function(){var e=document.createElement;if(e.toString().includes('addEventListener("error"'))return;console.log("interrupt document.createElement success"),document.createElement=function(t,n){var r=e.call(this,t,n);return"IMG"===r.nodeName&&r.addEventListener("error",o,{once:!0}),r}};var r=n(28388);function o(e){var t={error:e,message:e.message,src:this.currentSrc,customMessage:!0,name:"imageLoadError"};(0,r.postCustomMessage)({data:t})}},71897:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ScaleMode=void 0,t.ScaleMode=n,function(e){e[e.Scale=0]="Scale",e[e.AspectFit=1]="AspectFit",e[e.AspectFitScale=2]="AspectFitScale",e[e.AspectFitSpace=3]="AspectFitSpace",e[e.AspectFill=4]="AspectFill",e[e.AspectFillScale=5]="AspectFillScale"}(n||(t.ScaleMode=n={}))},89774:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.postIframeMessage=function(e,t){var n={name:"parentWindow",payload:e},r=document.getElementsByTagName("iframe");if(r.length>0&&r[0].contentWindow){var o=r[0];null==t||t("postmessage",n),o.contentWindow.postMessage(n,"*")}else 0==r.length?null==t||t("postmessage","no frames exist"):null==t||t("postmessage","no conentWindow")}},25893:function(){},65586:function(){}},function(e){e.O(0,[378,83,791,736],(function(){return t=36037,e(e.s=t);var t}));e.O()}]);
|