@playkit-js/unisphere 0.0.19-canary.0-7e412b7 → 0.0.19-canary.0-dcfb586
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see playkit-unisphere.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("KalturaPlayer",[],t):"object"==typeof exports?exports.KalturaPlayer=t():(e.KalturaPlayer=e.KalturaPlayer||{},e.KalturaPlayer.plugins=e.KalturaPlayer.plugins||{},e.KalturaPlayer.plugins.unisphere=t())}(self,(()=>(()=>{var e={51:(e,t,r)=>{var n=r(564).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof w?t:w,i=Object.create(o.prototype),a=new R(n||[]);return u(i,"_invoke",{value:k(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="suspendedYield",g="executing",m="completed",b={};function w(){}function E(){}function S(){}var P={};p(P,s,(function(){return this}));var O=Object.getPrototypeOf,I=O&&O(O(L([])));I&&I!==i&&a.call(I,s)&&(P=I);var x=S.prototype=w.prototype=Object.create(P);function _(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(e,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:y,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return E.prototype=S,u(x,"constructor",{value:S,configurable:!0}),u(S,"constructor",{value:E,configurable:!0}),E.displayName=p(S,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,p(e,f,"GeneratorFunction")),e.prototype=Object.create(x),e},r.awrap=function(e){return{__await:e}},_(j.prototype),p(j.prototype,l,(function(){return this})),r.AsyncIterator=j,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new j(d(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(x),p(x,f,"Generator"),p(x,s,(function(){return this})),p(x,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=L,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},564:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},790:(e,t,r)=>{var n=r(51)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=KalturaPlayer;function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function n(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return i="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},i(e)}function a(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function d(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=r(790),v=r.n(h);const y=KalturaPlayer.ui.preact,g=KalturaPlayer.core;var m=function(e){return e.UPPER_BAR_ICON_SHOW="unisphere.event.player.upper-bar-icon.show",e.UPPER_BAR_ICON_CLICK="unisphere.event.player.upper-bar-icon.click",e.SIDE_PANEL_OPEN="unisphere.event.player.side-panel.open",e.SIDE_PANEL_CLOSE="unisphere.event.player.side-panel.close",e.SIDE_PANEL_TOGGLE="unisphere.event.player.side-panel.toggle",e.SET_VALUE_CURRENT_TIME="unisphere.event.player.set-value.current-time",e.CHAPTERS_ADD="unisphere.event.player.chapters.add",e.PLAYER_RESIZE="unisphere.event.player.resize",e.DISPATCH_EVENT="unisphere.event.player.dispatch-event",e.SIDE_PANEL_CLOSED="unisphere.event.player.side-panel.closed",e.SIDE_PANEL_OPENED="unisphere.event.player.side-panel.opened",e}({}),b=function(e){return e.SELECTED_CHAPTER="selectedChapter",e.CURRENT_TIME="currentTime",e.IS_PAUSED="isPaused",e.PLAYER_SESSION="player-session",e.IS_SMALL_SIZE="isSmallSize",e}(b||{}),w=function(e){var t;return(0,y.h)("div",{style:null!==(t=e.style)&&void 0!==t?t:{},id:e.id})},E=e.ui.components,S=E.Tooltip,P=E.Icon,O=function(t){var r=t.id,n=t.label,o=t.iconPath;return(0,y.h)(S,{label:n,type:"bottom"},(0,y.h)("button",{type:"button","data-testid":"playlist_pluginButton","aria-label":n,className:e.ui.style.upperBarIcon},(0,y.h)(P,{id:"unisphere-icon-".concat(r),height:32,width:32,viewBox:"0 0 32 32",path:o})))},I=function(){function e(){o(this,e)}return c(e,null,[{key:"set",value:function(t){e.workspaceInstance=t}},{key:"get",value:function(){return e.workspaceInstance}},{key:"destroy",value:function(){try{this.workspaceInstance.kill()}catch(e){}e.workspaceInstance=null}}])}();function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}d(I,"workspaceInstance",null);var k=function(){function e(){o(this,e)}return c(e,null,[{key:"addToUnsubscribeMap",value:function(t){return e.unsubscribeMap.set(e.sequence,t),++e.sequence,e.sequence}},{key:"unsubscribeAll",value:function(){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return j(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.unsubscribeMap);try{for(r.s();!(t=r.n()).done;){var n=_(t.value,2),o=n[0];(0,n[1])(),e.unsubscribeMap.delete(o)}}catch(e){r.e(e)}finally{r.f()}}},{key:"unsubscribe",value:function(t){var r=e.unsubscribeMap.get(t);r&&(r(),e.unsubscribeMap.delete(t))}}])}();function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}d(k,"unsubscribeMap",new Map),d(k,"sequence",-1);var A,M=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,T()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t)}(k);function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}d(M,"get",function(){var e=n(v().mark((function e(t){var r,n,o,i,a;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.widgetId,n=t.context,o=t.settings,i=I.get(),e.prev=2,e.next=5,null==i?void 0:i.loadRuntime(r,n,o||{});case 5:return a=e.sent,e.abrupt("return",a?null==a?void 0:a.runtime:null);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}());var L,C="unisphere.service.pub-sub",N=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,R()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(k);function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}A=N,d(N,"subscribe",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(C);if(n){var o=n.subscribe(e,t);return A.addToUnsubscribeMap(o)}return-1})),d(N,"emit",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(C);null==n||n.emit({id:e,version:"1.0.0",payload:t})}));var U="player",$="unisphere.service.storage",B=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,D()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(k);function F(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0;t<5;++t)e+=g.Utils.Generator.uniqueId();return e}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}L=B,d(B,"update",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService($);null==n||n.update(U,e,t)})),d(B,"get",(function(e){var t=I.get(),r=null==t?void 0:t.getService($);return r?r.get(U,e):null})),d(B,"subscribe",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService($);if(n){var o=n.subscribe(t,{namespace:U,property:e,emitLastValue:!0});L.addToUnsubscribeMap(o)}}));var G=function(){return c((function e(){o(this,e),d(this,"_disposers",new Map)}),[{key:"generateId",value:function(e){return F("".concat(e.containerType,"_container_"))}},{key:"getSidePanelsManager",value:function(e){return e.getService("sidePanelsManager")}},{key:"addDisposer",value:function(e,t){this._disposers.set(e,t)}},{key:"dispose",value:function(e){var t=this._disposers.get(e);t&&(t(),this._disposers.delete(e))}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return W(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this._disposers);try{for(t.s();!(e=t.n()).done;){var r=_(e.value,1)[0];this.dispose(r)}}catch(e){t.e(e)}finally{t.f()}}}])}();function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(K=function(){return!!e})()}var z=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,K()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,[{key:"createContainer",value:function(e,t){var r,n=this,o=this.generateId(t),i=t.unisphereArea,a=t.position,u=t.expandMode,c=t.presets,s=null===(r=this.getSidePanelsManager(e))||void 0===r?void 0:r.add({label:o,panelComponent:function(){return(0,y.h)(w,{style:{height:"100%"},id:o})},presets:c,position:a,expandMode:u});return"number"==typeof s?(this.addDisposer(o,(function(){var t;null===(t=n.getSidePanelsManager(e))||void 0===t||t.remove(s)})),B.update(i,{upperBarIcon:{panelId:s}}),o):null}}])}(G);function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(V=function(){return!!e})()}var H=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,V()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,[{key:"createContainer",value:function(e,t){var r=this.generateId(t),n=t.playerArea,o=t.presets,i=e.ui.addComponent({label:r,presets:o,area:n,get:function(){return(0,y.h)(w,{style:{width:"inherit"},id:r})}});return this.addDisposer(r,i),r}}])}(G);function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Y=function(){return c((function e(t){o(this,e),d(this,"containerProducers",new Map([["sidepanel",new z],["simple",new H]])),this.player=t}),[{key:"createContainer",value:function(e){var t=this.containerProducers.get(e.containerType);return t?t.createContainer(this.player,e):null}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return q(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this.containerProducers);try{for(t.s();!(e=t.n()).done;){var r,n=_(e.value,1)[0];null===(r=this.containerProducers.get(n))||void 0===r||r.destroy()}}catch(e){t.e(e)}finally{t.f()}}}])}();function Z(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return J(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var X=e.ui.reducers.shell,Q=function(){return c((function e(t,r,n){o(this,e),d(this,"iconIds",new Map),d(this,"panelIds",new Set),d(this,"persistentIconIds",new Map),this.player=t,this.eventManager=r,this.logger=n,this.containerManager=new Y(t),this.currentIsSmallSize=void 0}),[{key:"upperBarManager",get:function(){return this.player.getService("upperBarManager")}},{key:"sidePanelsManager",get:function(){return this.player.getService("sidePanelsManager")}},{key:"timelineManager",get:function(){return this.player.getService("timeline")}},{key:"cuePointManager",get:function(){return this.player.getService("kalturaCuepoints")}},{key:"addEventHandlers",value:function(){var t=this,r=e.ui.redux.useStore();this.unsubscribeStore=r.subscribe((function(){var e=r.getState().shell.isSmallSize;e!==t.currentIsSmallSize&&(t.currentIsSmallSize=e,B.update(b.IS_SMALL_SIZE,e))})),N.subscribe(m.UPPER_BAR_ICON_SHOW,(function(e){var r=e.payload,n=r.id,o=r.label,i=r.order,a=r.iconPath,u=r.panelId,c=r.isPersistent;t.addUpperBarIcon(n,o,i,a,u,c)})),N.subscribe(m.SIDE_PANEL_OPEN,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.activateItem(o),N.emit(m.SIDE_PANEL_OPENED,n)})),N.subscribe(m.SIDE_PANEL_CLOSE,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.deactivateItem(o),N.emit(m.SIDE_PANEL_CLOSED,n)})),N.subscribe(m.SIDE_PANEL_TOGGLE,(function(e){var r,n,o,i=e.payload,a=i.panelId;null!==(r=t.sidePanelsManager)&&void 0!==r&&r.isItemActive(a)?(null===(n=t.sidePanelsManager)||void 0===n||n.deactivateItem(a),N.emit(m.SIDE_PANEL_CLOSED,i)):(null===(o=t.sidePanelsManager)||void 0===o||o.activateItem(a),N.emit(m.SIDE_PANEL_OPENED,i))})),N.subscribe(m.SET_VALUE_CURRENT_TIME,(function(e){var r=e.payload.currentTime;r>=0&&(t.player.currentTime=r)})),N.subscribe(m.CHAPTERS_ADD,(function(e){var r=e.payload,n=r.chapters;if(n&&n.length){var o;null===(o=t.timelineManager)||void 0===o||o.disableChapters();for(var i=0;i<n.length;++i){var a,u=n[i],c=u.title,s=+u.time;null===(a=t.timelineManager)||void 0===a||a.addKalturaCuePoint(s,"SummaryAndChapters",i,c,{onClick:function(e){var t=e.cuePoint;B.update(b.SELECTED_CHAPTER,t.id)}})}t.player.ui.store.dispatch(X.actions.updateTimeDisplayIsMinimized(!0)),t.player.dispatchEvent(new g.FakeEvent("UNISPHERE_CHAPTERS_ADDED",r))}})),N.subscribe(m.DISPATCH_EVENT,(function(e){var r=e.payload,n=r.eventName,o=r.data;t.player.dispatchEvent(new g.FakeEvent(n,o))})),this.eventManager.listen(this.player,e.core.EventType.TIME_UPDATE,(function(){B.update(b.CURRENT_TIME,"".concat(t.player.currentTime))})),this.eventManager.listen(this.player,e.ui.EventType.GUI_RESIZE,(function(){N.emit(m.PLAYER_RESIZE,{}),setTimeout((function(){N.emit(m.PLAYER_RESIZE,{})}),1e3)})),this.eventManager.listen(this.player,e.core.EventType.PAUSE,(function(){B.update(b.IS_PAUSED,!0)})),this.eventManager.listen(this.player,e.core.EventType.PLAY,(function(){B.update(b.IS_PAUSED,!1)}))}},{key:"addUpperBarIcon",value:function(e,t,r,n,o,i){var a;if(!this.iconIds.has(e)&&!this.persistentIconIds.has(e)){this.panelIds.add(o);var u=null===(a=this.upperBarManager)||void 0===a?void 0:a.add({displayName:t,ariaLabel:t,order:r,component:function(){return(0,y.h)(O,{id:e,label:t,iconPath:n})},svgIcon:{path:n},onClick:function(){N.emit(m.UPPER_BAR_ICON_CLICK,{id:e,panelId:o})}});i?this.persistentIconIds.set(e,u):this.iconIds.set(e,u)}}},{key:"isVideoClipped",value:function(){var e=this.player.config.sources,t=e.seekFrom,r=e.clipTo,n=e.duration;return"number"==typeof t&&t>0||"number"==typeof r&&r<n}},{key:"shouldLoadWidget",value:function(e){var t=e.widgetId,r=e.context;return!(t.includes("video-summary")&&"kaltura-player-list"===r&&this.isVideoClipped())}},{key:"loadWidgets",value:function(e){var t,r=this,n=Z(e);try{var o=function(){var e=t.value,n=e.widgetId,o=e.context;if(!n||!o||!r.shouldLoadWidget(e))return 1;var i,a=Z(e.containers);try{var u=function(){var t=i.value;if(!t.unisphereArea)return 1;var a=r.containerManager.createContainer(t);a&&M.get(e).then((function(e){null==e||e.assignAreaByName(t.unisphereArea,a)})).catch((function(e){r.logger.warn("Failed to load unisphere widget ".concat(n," with context ").concat(o," "),e)}))};for(a.s();!(i=a.n()).done;)u()}catch(e){a.e(e)}finally{a.f()}};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}}},{key:"init",value:function(e,t){I.set(e),this.addEventHandlers(),this.loadWidgets(t)}},{key:"updateSessionData",value:function(){var e,t;B.update(b.PLAYER_SESSION,{entryId:this.player.sources.id,ks:null===(e=this.player.config.session)||void 0===e?void 0:e.ks,entryName:null===(t=this.player.sources.metadata)||void 0===t?void 0:t.name})}},{key:"reset",value:function(){var e,t=Z(this.panelIds);try{for(t.s();!(e=t.n()).done;){var r,n=e.value;if(null!==(r=this.sidePanelsManager)&&void 0!==r&&r.isItemActive(n)){this.sidePanelsManager.deactivateItem(n);break}}}catch(e){t.e(e)}finally{t.f()}var o,i=Z(this.iconIds.values());try{for(i.s();!(o=i.n()).done;){var a,u=o.value;null===(a=this.upperBarManager)||void 0===a||a.remove(u)}}catch(e){i.e(e)}finally{i.f()}this.iconIds.clear(),this.containerManager.destroy(),this.player.ui.store.dispatch(X.actions.updateTimeDisplayIsMinimized(!1))}},{key:"destroy",value:function(){this.reset(),this.containerManager.destroy();var e,t=Z(this.persistentIconIds.values());try{for(t.s();!(e=t.n()).done;){var r,n=e.value;null===(r=this.upperBarManager)||void 0===r||r.remove(n)}}catch(e){t.e(e)}finally{t.f()}N.destroy(),B.destroy(),I.destroy(),this.unsubscribeStore&&this.unsubscribeStore()}}])}(),ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},te=function(e){return e&&e.Math===Math&&e},re=te("object"==typeof globalThis&&globalThis)||te("object"==typeof window&&window)||te("object"==typeof self&&self)||te("object"==typeof ee&&ee)||te("object"==typeof ee&&ee)||function(){return this}()||Function("return this")(),ne={},oe=function(e){try{return!!e()}catch(e){return!0}},ie=!oe((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ae=!oe((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ue=ae,ce=Function.prototype.call,se=ue?ce.bind(ce):function(){return ce.apply(ce,arguments)},le={},fe={}.propertyIsEnumerable,pe=Object.getOwnPropertyDescriptor,de=pe&&!fe.call({1:2},1);le.f=de?function(e){var t=pe(this,e);return!!t&&t.enumerable}:fe;var he,ve,ye=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ge=ae,me=Function.prototype,be=me.call,we=ge&&me.bind.bind(be,be),Ee=ge?we:function(e){return function(){return be.apply(e,arguments)}},Se=Ee,Pe=Se({}.toString),Oe=Se("".slice),Ie=function(e){return Oe(Pe(e),8,-1)},xe=oe,_e=Ie,je=Object,ke=Ee("".split),Te=xe((function(){return!je("z").propertyIsEnumerable(0)}))?function(e){return"String"===_e(e)?ke(e,""):je(e)}:je,Ae=function(e){return null==e},Me=Ae,Re=TypeError,Le=function(e){if(Me(e))throw new Re("Can't call method on "+e);return e},Ce=Te,Ne=Le,De=function(e){return Ce(Ne(e))},Ue="object"==typeof document&&document.all,$e=void 0===Ue&&void 0!==Ue?function(e){return"function"==typeof e||e===Ue}:function(e){return"function"==typeof e},Be=$e,Fe=function(e){return"object"==typeof e?null!==e:Be(e)},We=re,Ge=$e,Ke=function(e,t){return arguments.length<2?(r=We[e],Ge(r)?r:void 0):We[e]&&We[e][t];var r},ze=Ee({}.isPrototypeOf),Ve="undefined"!=typeof navigator&&String(navigator.userAgent)||"",He=re,qe=Ve,Ye=He.process,Ze=He.Deno,Je=Ye&&Ye.versions||Ze&&Ze.version,Xe=Je&&Je.v8;Xe&&(ve=(he=Xe.split("."))[0]>0&&he[0]<4?1:+(he[0]+he[1])),!ve&&qe&&(!(he=qe.match(/Edge\/(\d+)/))||he[1]>=74)&&(he=qe.match(/Chrome\/(\d+)/))&&(ve=+he[1]);var Qe=ve,et=Qe,tt=oe,rt=re.String,nt=!!Object.getOwnPropertySymbols&&!tt((function(){var e=Symbol("symbol detection");return!rt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&et&&et<41})),ot=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,it=Ke,at=$e,ut=ze,ct=Object,st=ot?function(e){return"symbol"==typeof e}:function(e){var t=it("Symbol");return at(t)&&ut(t.prototype,ct(e))},lt=String,ft=function(e){try{return lt(e)}catch(e){return"Object"}},pt=$e,dt=ft,ht=TypeError,vt=function(e){if(pt(e))return e;throw new ht(dt(e)+" is not a function")},yt=vt,gt=Ae,mt=function(e,t){var r=e[t];return gt(r)?void 0:yt(r)},bt=se,wt=$e,Et=Fe,St=TypeError,Pt={exports:{}},Ot=re,It=Object.defineProperty,xt=function(e,t){try{It(Ot,e,{value:t,configurable:!0,writable:!0})}catch(r){Ot[e]=t}return t},_t=re,jt=xt,kt="__core-js_shared__",Tt=Pt.exports=_t[kt]||jt(kt,{});(Tt.versions||(Tt.versions=[])).push({version:"3.36.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"});var At=Pt.exports,Mt=At,Rt=function(e,t){return Mt[e]||(Mt[e]=t||{})},Lt=Le,Ct=Object,Nt=function(e){return Ct(Lt(e))},Dt=Nt,Ut=Ee({}.hasOwnProperty),$t=Object.hasOwn||function(e,t){return Ut(Dt(e),t)},Bt=Ee,Ft=0,Wt=Math.random(),Gt=Bt(1..toString),Kt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Gt(++Ft+Wt,36)},zt=Rt,Vt=$t,Ht=Kt,qt=nt,Yt=ot,Zt=re.Symbol,Jt=zt("wks"),Xt=Yt?Zt.for||Zt:Zt&&Zt.withoutSetter||Ht,Qt=function(e){return Vt(Jt,e)||(Jt[e]=qt&&Vt(Zt,e)?Zt[e]:Xt("Symbol."+e)),Jt[e]},er=se,tr=Fe,rr=st,nr=mt,or=TypeError,ir=Qt("toPrimitive"),ar=function(e,t){if(!tr(e)||rr(e))return e;var r,n=nr(e,ir);if(n){if(void 0===t&&(t="default"),r=er(n,e,t),!tr(r)||rr(r))return r;throw new or("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&wt(r=e.toString)&&!Et(n=bt(r,e)))return n;if(wt(r=e.valueOf)&&!Et(n=bt(r,e)))return n;if("string"!==t&&wt(r=e.toString)&&!Et(n=bt(r,e)))return n;throw new St("Can't convert object to primitive value")}(e,t)},ur=st,cr=function(e){var t=ar(e,"string");return ur(t)?t:t+""},sr=Fe,lr=re.document,fr=sr(lr)&&sr(lr.createElement),pr=function(e){return fr?lr.createElement(e):{}},dr=pr,hr=!ie&&!oe((function(){return 7!==Object.defineProperty(dr("div"),"a",{get:function(){return 7}}).a})),vr=ie,yr=se,gr=le,mr=ye,br=De,wr=cr,Er=$t,Sr=hr,Pr=Object.getOwnPropertyDescriptor;ne.f=vr?Pr:function(e,t){if(e=br(e),t=wr(t),Sr)try{return Pr(e,t)}catch(e){}if(Er(e,t))return mr(!yr(gr.f,e,t),e[t])};var Or={},Ir=ie&&oe((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xr=Fe,_r=String,jr=TypeError,kr=function(e){if(xr(e))return e;throw new jr(_r(e)+" is not an object")},Tr=ie,Ar=hr,Mr=Ir,Rr=kr,Lr=cr,Cr=TypeError,Nr=Object.defineProperty,Dr=Object.getOwnPropertyDescriptor,Ur="enumerable",$r="configurable",Br="writable";Or.f=Tr?Mr?function(e,t,r){if(Rr(e),t=Lr(t),Rr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Br in r&&!r[Br]){var n=Dr(e,t);n&&n[Br]&&(e[t]=r.value,r={configurable:$r in r?r[$r]:n[$r],enumerable:Ur in r?r[Ur]:n[Ur],writable:!1})}return Nr(e,t,r)}:Nr:function(e,t,r){if(Rr(e),t=Lr(t),Rr(r),Ar)try{return Nr(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Cr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Fr=Or,Wr=ye,Gr=ie?function(e,t,r){return Fr.f(e,t,Wr(1,r))}:function(e,t,r){return e[t]=r,e},Kr={exports:{}},zr=ie,Vr=$t,Hr=Function.prototype,qr=zr&&Object.getOwnPropertyDescriptor,Yr=Vr(Hr,"name"),Zr={EXISTS:Yr,PROPER:Yr&&"something"===function(){}.name,CONFIGURABLE:Yr&&(!zr||zr&&qr(Hr,"name").configurable)},Jr=$e,Xr=At,Qr=Ee(Function.toString);Jr(Xr.inspectSource)||(Xr.inspectSource=function(e){return Qr(e)});var en,tn,rn,nn=Xr.inspectSource,on=$e,an=re.WeakMap,un=on(an)&&/native code/.test(String(an)),cn=Kt,sn=Rt("keys"),ln=function(e){return sn[e]||(sn[e]=cn(e))},fn={},pn=un,dn=re,hn=Fe,vn=Gr,yn=$t,gn=At,mn=ln,bn=fn,wn="Object already initialized",En=dn.TypeError,Sn=dn.WeakMap;if(pn||gn.state){var Pn=gn.state||(gn.state=new Sn);Pn.get=Pn.get,Pn.has=Pn.has,Pn.set=Pn.set,en=function(e,t){if(Pn.has(e))throw new En(wn);return t.facade=e,Pn.set(e,t),t},tn=function(e){return Pn.get(e)||{}},rn=function(e){return Pn.has(e)}}else{var On=mn("state");bn[On]=!0,en=function(e,t){if(yn(e,On))throw new En(wn);return t.facade=e,vn(e,On,t),t},tn=function(e){return yn(e,On)?e[On]:{}},rn=function(e){return yn(e,On)}}var In={set:en,get:tn,has:rn,enforce:function(e){return rn(e)?tn(e):en(e,{})},getterFor:function(e){return function(t){var r;if(!hn(t)||(r=tn(t)).type!==e)throw new En("Incompatible receiver, "+e+" required");return r}}},xn=Ee,_n=oe,jn=$e,kn=$t,Tn=ie,An=Zr.CONFIGURABLE,Mn=nn,Rn=In.enforce,Ln=In.get,Cn=String,Nn=Object.defineProperty,Dn=xn("".slice),Un=xn("".replace),$n=xn([].join),Bn=Tn&&!_n((function(){return 8!==Nn((function(){}),"length",{value:8}).length})),Fn=String(String).split("String"),Wn=Kr.exports=function(e,t,r){"Symbol("===Dn(Cn(t),0,7)&&(t="["+Un(Cn(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!kn(e,"name")||An&&e.name!==t)&&(Tn?Nn(e,"name",{value:t,configurable:!0}):e.name=t),Bn&&r&&kn(r,"arity")&&e.length!==r.arity&&Nn(e,"length",{value:r.arity});try{r&&kn(r,"constructor")&&r.constructor?Tn&&Nn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Rn(e);return kn(n,"source")||(n.source=$n(Fn,"string"==typeof t?t:"")),e};Function.prototype.toString=Wn((function(){return jn(this)&&Ln(this).source||Mn(this)}),"toString");var Gn=Kr.exports,Kn=$e,zn=Or,Vn=Gn,Hn=xt,qn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Kn(r)&&Vn(r,i,n),n.global)o?e[t]=r:Hn(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:zn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Yn={},Zn=Math.ceil,Jn=Math.floor,Xn=Math.trunc||function(e){var t=+e;return(t>0?Jn:Zn)(t)},Qn=function(e){var t=+e;return t!=t||0===t?0:Xn(t)},eo=Qn,to=Math.max,ro=Math.min,no=Qn,oo=Math.min,io=function(e){var t=no(e);return t>0?oo(t,9007199254740991):0},ao=io,uo=function(e){return ao(e.length)},co=De,so=uo,lo=function(e){return function(t,r,n){var o=co(t),i=so(o);if(0===i)return!e&&-1;var a,u=function(e,t){var r=eo(e);return r<0?to(r+t,0):ro(r,t)}(n,i);if(e&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((e||u in o)&&o[u]===r)return e||u||0;return!e&&-1}},fo={includes:lo(!0),indexOf:lo(!1)},po=$t,ho=De,vo=fo.indexOf,yo=fn,go=Ee([].push),mo=function(e,t){var r,n=ho(e),o=0,i=[];for(r in n)!po(yo,r)&&po(n,r)&&go(i,r);for(;t.length>o;)po(n,r=t[o++])&&(~vo(i,r)||go(i,r));return i},bo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wo=mo,Eo=bo.concat("length","prototype");Yn.f=Object.getOwnPropertyNames||function(e){return wo(e,Eo)};var So={};So.f=Object.getOwnPropertySymbols;var Po=Ke,Oo=Yn,Io=So,xo=kr,_o=Ee([].concat),jo=Po("Reflect","ownKeys")||function(e){var t=Oo.f(xo(e)),r=Io.f;return r?_o(t,r(e)):t},ko=$t,To=jo,Ao=ne,Mo=Or,Ro=function(e,t,r){for(var n=To(t),o=Mo.f,i=Ao.f,a=0;a<n.length;a++){var u=n[a];ko(e,u)||r&&ko(r,u)||o(e,u,i(t,u))}},Lo=oe,Co=$e,No=/#|\.prototype\./,Do=function(e,t){var r=$o[Uo(e)];return r===Fo||r!==Bo&&(Co(t)?Lo(t):!!t)},Uo=Do.normalize=function(e){return String(e).replace(No,".").toLowerCase()},$o=Do.data={},Bo=Do.NATIVE="N",Fo=Do.POLYFILL="P",Wo=Do,Go=re,Ko=ne.f,zo=Gr,Vo=qn,Ho=xt,qo=Ro,Yo=Wo,Zo=function(e,t){var r,n,o,i,a,u=e.target,c=e.global,s=e.stat;if(r=c?Go:s?Go[u]||Ho(u,{}):Go[u]&&Go[u].prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=Ko(r,n))&&a.value:r[n],!Yo(c?n:u+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;qo(i,o)}(e.sham||o&&o.sham)&&zo(i,"sham",!0),Vo(r,n,i,e)}},Jo=ae,Xo=Function.prototype,Qo=Xo.apply,ei=Xo.call,ti="object"==typeof Reflect&&Reflect.apply||(Jo?ei.bind(Qo):function(){return ei.apply(Qo,arguments)}),ri=Ee,ni=vt,oi=Fe,ii=String,ai=TypeError,ui=Fe,ci=Le,si=function(e){if(function(e){return oi(e)||null===e}(e))return e;throw new ai("Can't set "+ii(e)+" as a prototype")},li=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=function(e,t,r){try{return ri(ni(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return ci(r),si(n),ui(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),fi=Or.f,pi=$e,di=Fe,hi=li,vi={};vi[Qt("toStringTag")]="z";var yi="[object z]"===String(vi),gi=$e,mi=Ie,bi=Qt("toStringTag"),wi=Object,Ei="Arguments"===mi(function(){return arguments}()),Si=yi?mi:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=wi(e),bi))?r:Ei?mi(t):"Object"===(n=mi(t))&&gi(t.callee)?"Arguments":n},Pi=Si,Oi=String,Ii=function(e){if("Symbol"===Pi(e))throw new TypeError("Cannot convert a Symbol value to a string");return Oi(e)},xi=Ii,_i=Fe,ji=Gr,ki=Error,Ti=Ee("".replace),Ai=String(new ki("zxcasd").stack),Mi=/\n\s*at [^:]*:[^\n]*/,Ri=Mi.test(Ai),Li=ye,Ci=!oe((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Li(1,7)),7!==e.stack)})),Ni=Gr,Di=Ci,Ui=Error.captureStackTrace,$i=Ke,Bi=$t,Fi=Gr,Wi=ze,Gi=li,Ki=Ro,zi=function(e,t,r){r in e||fi(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},Vi=function(e,t,r,n){Di&&(Ui?Ui(e,t):Ni(e,"stack",function(e,t){if(Ri&&"string"==typeof e&&!ki.prepareStackTrace)for(;t--;)e=Ti(e,Mi,"");return e}(r,n)))},Hi=ie,qi=Zo,Yi=ti,Zi=function(e,t,r,n){var o="stackTraceLimit",i=n?2:1,a=e.split("."),u=a[a.length-1],c=$i.apply(null,a);if(c){var s=c.prototype;if(Bi(s,"cause")&&delete s.cause,!r)return c;var l=$i("Error"),f=t((function(e,t){var r,o,a,u,l,p,d,h=function(e,t){return void 0===e?arguments.length<2?"":t:xi(e)}(n?t:e,void 0),v=n?new c(e):new c;return void 0!==h&&Fi(v,"message",h),Vi(v,f,v.stack,2),this&&Wi(s,this)&&(a=v,u=this,l=f,hi&&pi(p=u.constructor)&&p!==l&&di(d=p.prototype)&&d!==l.prototype&&hi(a,d)),arguments.length>i&&(r=v,_i(o=arguments[i])&&"cause"in o&&ji(r,"cause",o.cause)),v}));f.prototype=s,"Error"!==u?Gi?Gi(f,l):Ki(f,l,{name:!0}):Hi&&o in c&&(zi(f,c,o),zi(f,c,"prepareStackTrace")),Ki(f,c);try{s.name!==u&&Fi(s,"name",u),s.constructor=f}catch(e){}return f}},Ji="WebAssembly",Xi=re[Ji],Qi=7!==new Error("e",{cause:7}).cause,ea=function(e,t){var r={};r[e]=Zi(e,t,Qi),qi({global:!0,constructor:!0,arity:1,forced:Qi},r)},ta=function(e,t){if(Xi&&Xi[e]){var r={};r[e]=Zi(Ji+"."+e,t,Qi),qi({target:Ji,stat:!0,constructor:!0,arity:1,forced:Qi},r)}};ea("Error",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("EvalError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("RangeError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("ReferenceError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("SyntaxError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("TypeError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("URIError",(function(e){return function(t){return Yi(e,this,arguments)}})),ta("CompileError",(function(e){return function(t){return Yi(e,this,arguments)}})),ta("LinkError",(function(e){return function(t){return Yi(e,this,arguments)}})),ta("RuntimeError",(function(e){return function(t){return Yi(e,this,arguments)}})),Error;var ra=Ie,na=ie,oa=Array.isArray||function(e){return"Array"===ra(e)},ia=TypeError,aa=Object.getOwnPropertyDescriptor,ua=na&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),ca=TypeError,sa=Nt,la=uo,fa=ua?function(e,t){if(oa(e)&&!aa(e,"length").writable)throw new ia("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t};Zo({target:"Array",proto:!0,arity:1,forced:oe((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=sa(this),r=la(t),n=arguments.length;!function(e){if(e>9007199254740991)throw ca("Maximum allowed index exceeded")}(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return fa(t,r),r}});var pa=mo,da=bo,ha=Object.keys||function(e){return pa(e,da)},va=ie,ya=Ee,ga=se,ma=oe,ba=ha,wa=So,Ea=le,Sa=Nt,Pa=Te,Oa=Object.assign,Ia=Object.defineProperty,xa=ya([].concat),_a=!Oa||ma((function(){if(va&&1!==Oa({b:1},Oa(Ia({},"a",{enumerable:!0,get:function(){Ia(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==Oa({},e)[r]||ba(Oa({},t)).join("")!==n}))?function(e,t){for(var r=Sa(e),n=arguments.length,o=1,i=wa.f,a=Ea.f;n>o;)for(var u,c=Pa(arguments[o++]),s=i?xa(ba(c),i(c)):ba(c),l=s.length,f=0;l>f;)u=s[f++],va&&!ga(a,c,u)||(r[u]=c[u]);return r}:Oa,ja=_a;Zo({target:"Object",stat:!0,arity:2,forced:Object.assign!==ja},{assign:ja});var ka={},Ta=ie,Aa=Ir,Ma=Or,Ra=kr,La=De,Ca=ha;ka.f=Ta&&!Aa?Object.defineProperties:function(e,t){Ra(e);for(var r,n=La(t),o=Ca(t),i=o.length,a=0;i>a;)Ma.f(e,r=o[a++],n[r]);return e};var Na,Da=Ke("document","documentElement"),Ua=kr,$a=ka,Ba=bo,Fa=fn,Wa=Da,Ga=pr,Ka="prototype",za="script",Va=ln("IE_PROTO"),Ha=function(){},qa=function(e){return"<"+za+">"+e+"</"+za+">"},Ya=function(e){e.write(qa("")),e.close();var t=e.parentWindow.Object;return e=null,t},Za=function(){try{Na=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Za="undefined"!=typeof document?document.domain&&Na?Ya(Na):(t=Ga("iframe"),r="java"+za+":",t.style.display="none",Wa.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(qa("document.F=Object")),e.close(),e.F):Ya(Na);for(var n=Ba.length;n--;)delete Za[Ka][Ba[n]];return Za()};Fa[Va]=!0;var Ja=Object.create||function(e,t){var r;return null!==e?(Ha[Ka]=Ua(e),r=new Ha,Ha[Ka]=null,r[Va]=e):r=Za(),void 0===t?r:$a.f(r,t)},Xa=Qt,Qa=Ja,eu=Or.f,tu=Xa("unscopables"),ru=Array.prototype;void 0===ru[tu]&&eu(ru,tu,{configurable:!0,value:Qa(null)});var nu,ou=fo.includes;Zo({target:"Array",proto:!0,forced:oe((function(){return!Array(1).includes()}))},{includes:function(e){return ou(this,e,arguments.length>1?arguments[1]:void 0)}}),nu="includes",ru[tu][nu]=!0;var iu,au="\t\n\v\f\r \u2028\u2029\ufeff",uu=Le,cu=Ii,su=au,lu=Ee("".replace),fu=RegExp("^["+su+"]+"),pu=RegExp("(^|[^"+su+"])["+su+"]+$"),du=function(e){return function(t){var r=cu(uu(t));return 1&e&&(r=lu(r,fu,"")),2&e&&(r=lu(r,pu,"$1")),r}},hu={start:du(1),end:du(2),trim:du(3)},vu=Zr.PROPER,yu=au,gu=hu.trim;Zo({target:"String",proto:!0,forced:(iu="trim",oe((function(){return!!yu[iu]()||"
"!=="
"[iu]()||vu&&yu[iu].name!==iu})))},{trim:function(){return gu(this)}});var mu,bu,wu=kr,Eu=oe,Su=re.RegExp,Pu=Eu((function(){var e=Su("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Ou=Pu||Eu((function(){return!Su("a","y").sticky})),Iu={BROKEN_CARET:Pu||Eu((function(){var e=Su("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Ou,UNSUPPORTED_Y:Pu},xu=oe,_u=re.RegExp,ju=xu((function(){var e=_u(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),ku=oe,Tu=re.RegExp,Au=ku((function(){var e=Tu("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Mu=se,Ru=Ee,Lu=Ii,Cu=function(){var e=wu(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Nu=Iu,Du=Ja,Uu=In.get,$u=ju,Bu=Au,Fu=Rt("native-string-replace",String.prototype.replace),Wu=RegExp.prototype.exec,Gu=Wu,Ku=Ru("".charAt),zu=Ru("".indexOf),Vu=Ru("".replace),Hu=Ru("".slice),qu=(bu=/b*/g,Mu(Wu,mu=/a/,"a"),Mu(Wu,bu,"a"),0!==mu.lastIndex||0!==bu.lastIndex),Yu=Nu.BROKEN_CARET,Zu=void 0!==/()??/.exec("")[1];(qu||Zu||Yu||$u||Bu)&&(Gu=function(e){var t,r,n,o,i,a,u,c=this,s=Uu(c),l=Lu(e),f=s.raw;if(f)return f.lastIndex=c.lastIndex,t=Mu(Gu,f,l),c.lastIndex=f.lastIndex,t;var p=s.groups,d=Yu&&c.sticky,h=Mu(Cu,c),v=c.source,y=0,g=l;if(d&&(h=Vu(h,"y",""),-1===zu(h,"g")&&(h+="g"),g=Hu(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ku(l,c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",h)),Zu&&(r=new RegExp("^"+v+"$(?!\\s)",h)),qu&&(n=c.lastIndex),o=Mu(Wu,d?r:c,g),d?o?(o.input=Hu(o.input,y),o[0]=Hu(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:qu&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Zu&&o&&o.length>1&&Mu(Fu,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=Du(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Ju=Gu;Zo({target:"RegExp",proto:!0,forced:/./.exec!==Ju},{exec:Ju});var Xu=se,Qu=qn,ec=Ju,tc=oe,rc=Qt,nc=Gr,oc=rc("species"),ic=RegExp.prototype,ac=function(e,t,r,n){var o=rc(e),i=!tc((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!tc((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[oc]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var u=/./[o],c=t(o,""[e],(function(e,t,r,n,o){var a=t.exec;return a===ec||a===ic.exec?i&&!o?{done:!0,value:Xu(u,t,r,n)}:{done:!0,value:Xu(e,r,t,n)}:{done:!1}}));Qu(String.prototype,e,c[0]),Qu(ic,o,c[1])}n&&nc(ic[o],"sham",!0)},uc=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},cc=se,sc=kr,lc=$e,fc=Ie,pc=Ju,dc=TypeError,hc=function(e,t){var r=e.exec;if(lc(r)){var n=cc(r,e,t);return null!==n&&sc(n),n}if("RegExp"===fc(e))return cc(pc,e,t);throw new dc("RegExp#exec called on incompatible receiver")},vc=se,yc=kr,gc=Ae,mc=Le,bc=uc,wc=Ii,Ec=mt,Sc=hc;ac("search",(function(e,t,r){return[function(t){var r=mc(this),n=gc(t)?void 0:Ec(t,e);return n?vc(n,t,r):new RegExp(t)[e](wc(r))},function(e){var n=yc(this),o=wc(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;bc(a,0)||(n.lastIndex=0);var u=Sc(n,o);return bc(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]}));const Pc=e=>{const t=window.location.search.substr(1).split("&"),r=`${e}=`,n=t.filter((e=>e.search(r)>=0));return n.length>0?n[0].substring(n[0].search(r)+r.length):""};let Oc="true"===Pc("unisphereVerbose")?"log":Pc("unisphereVerbose")||"";const Ic=["log","debug"].includes(Oc)?Oc:"warn",xc=Pc("unisphereEnvironment")||"prod";let _c=localStorage.getItem("unisphereDevLoader")||null;const jc=Pc("unispherePresets")||null,kc={logLevel:Ic,loaderUrl:_c,verbose:Oc,environment:"dev"===xc?"dev":"prod",presets:jc?jc.split(",").map((e=>e.trim())):null},Tc=()=>kc;let Ac=window.unisphere;function Mc(e,t,r){return e in Ac?{value:Ac[e],isNew:!1}:(null==t||t.debug(`${e} not found on 'window.unisphere', creating with default value`,{data:{defaultValue:r}}),Ac[e]=r,{value:r,isNew:!0})}"unisphere"in window||(Ac=window.unisphere={});const Rc={logToConsole:!0,logLevel:Tc().logLevel};class Lc{static createWorkspaceLogger(e){return new Lc(e)}kill(){this._killed=!0}constructor(e){this.workspaceName=e,this._killed=!1,this._settings=Object.assign({},Rc)}getLogger(e){return this._killed&&console.warn("Logger factory is killed, returning a new logger anyway"),new Cc(this.workspaceName,e,this.getSettings.bind(this))}getSettings(){return this._settings}updateSettings(e){this._settings=Object.assign(Object.assign({},this._settings),e)}}class Cc{constructor(e,t,r){this.workspaceName=e,this.runtime=t,this._getSettings=r;const n=function(){const{value:e}=Mc("loggers",null,{interceptors:[],logMessages:[]});return e}();this._globalLoggers=n}logMessage(e,t,r,n){const o={workspaceName:this.workspaceName,runtime:this.runtime,time:(new Date).toISOString(),message:t,data:r,error:n,level:e},i=this._getSettings();if(this._globalLoggers.logMessages.push(o),this._globalLoggers.interceptors.forEach((e=>{e(o)})),i.logToConsole&&this.shouldLog(e,i.logLevel)){const t=`${o.time} [Unisphere.${o.runtime}] ${o.message}`;switch(e){case"debug":console.debug(t,o.data);break;case"log":console.log(t,o.data);break;case"warn":console.warn(t,o.data);break;case"error":console.error(t,{data:o.data,error:o.error})}}}shouldLog(e,t){const r=["debug","log","warn","error"];return r.indexOf(e)>=r.indexOf(t)}log(e,t){this.logMessage("log",e,null==t?void 0:t.data)}debug(e,t){this.logMessage("debug",e,null==t?void 0:t.data)}warn(e,t){this.logMessage("warn",e,null==t?void 0:t.data)}error(e,t){this.logMessage("error",e,null==t?void 0:t.data,null==t?void 0:t.error)}}var Nc,Dc=Ie,Uc=Ee,$c=function(e){if("Function"===Dc(e))return Uc(e)},Bc=Fe,Fc=Ie,Wc=Qt("match"),Gc=TypeError,Kc=function(e){if(function(e){var t;return Bc(e)&&(void 0!==(t=e[Wc])?!!t:"RegExp"===Fc(e))}(e))throw new Gc("The method doesn't accept regular expressions");return e},zc=Qt("match"),Vc=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[zc]=!1,"/./"[e](t)}catch(e){}}return!1},Hc=Zo,qc=$c,Yc=ne.f,Zc=io,Jc=Ii,Xc=Kc,Qc=Le,es=Vc,ts=qc("".slice),rs=Math.min,ns=es("startsWith");function os(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))}Hc({target:"String",proto:!0,forced:!(!ns&&(Nc=Yc(String.prototype,"startsWith"),Nc&&!Nc.writable)||ns)},{startsWith:function(e){var t=Jc(Qc(this));Xc(e);var r=Zc(rs(arguments.length>1?arguments[1]:void 0,t.length)),n=Jc(e);return ts(t,r,r+n.length)===n}}),"function"==typeof SuppressedError&&SuppressedError;var is="process"===Ie(re.process),as=Or.f,us=$t,cs=Qt("toStringTag"),ss=Gn,ls=Or,fs=Ke,ps=ie,ds=Qt("species"),hs=ze,vs=TypeError,ys=Ee,gs=oe,ms=$e,bs=Si,ws=nn,Es=function(){},Ss=Ke("Reflect","construct"),Ps=/^\s*(?:class|function)\b/,Os=ys(Ps.exec),Is=!Ps.test(Es),xs=function(e){if(!ms(e))return!1;try{return Ss(Es,[],e),!0}catch(e){return!1}},_s=function(e){if(!ms(e))return!1;switch(bs(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Is||!!Os(Ps,ws(e))}catch(e){return!0}};_s.sham=!0;var js,ks,Ts,As,Ms=!Ss||gs((function(){var e;return xs(xs.call)||!xs(Object)||!xs((function(){e=!0}))||e}))?_s:xs,Rs=Ms,Ls=ft,Cs=TypeError,Ns=kr,Ds=Ae,Us=Qt("species"),$s=vt,Bs=ae,Fs=$c($c.bind),Ws=function(e,t){return $s(e),void 0===t?e:Bs?Fs(e,t):function(){return e.apply(t,arguments)}},Gs=Ee([].slice),Ks=TypeError,zs=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ve),Vs=re,Hs=ti,qs=Ws,Ys=$e,Zs=$t,Js=oe,Xs=Da,Qs=Gs,el=pr,tl=zs,rl=is,nl=Vs.setImmediate,ol=Vs.clearImmediate,il=Vs.process,al=Vs.Dispatch,ul=Vs.Function,cl=Vs.MessageChannel,sl=Vs.String,ll=0,fl={},pl="onreadystatechange";Js((function(){js=Vs.location}));var dl=function(e){if(Zs(fl,e)){var t=fl[e];delete fl[e],t()}},hl=function(e){return function(){dl(e)}},vl=function(e){dl(e.data)},yl=function(e){Vs.postMessage(sl(e),js.protocol+"//"+js.host)};nl&&ol||(nl=function(e){!function(e,t){if(e<t)throw new Ks("Not enough arguments")}(arguments.length,1);var t=Ys(e)?e:ul(e),r=Qs(arguments,1);return fl[++ll]=function(){Hs(t,void 0,r)},ks(ll),ll},ol=function(e){delete fl[e]},rl?ks=function(e){il.nextTick(hl(e))}:al&&al.now?ks=function(e){al.now(hl(e))}:cl&&!tl?(As=(Ts=new cl).port2,Ts.port1.onmessage=vl,ks=qs(As.postMessage,As)):Vs.addEventListener&&Ys(Vs.postMessage)&&!Vs.importScripts&&js&&"file:"!==js.protocol&&!Js(yl)?(ks=yl,Vs.addEventListener("message",vl,!1)):ks=pl in el("script")?function(e){Xs.appendChild(el("script"))[pl]=function(){Xs.removeChild(this),dl(e)}}:function(e){setTimeout(hl(e),0)});var gl={set:nl,clear:ol},ml=re,bl=ie,wl=Object.getOwnPropertyDescriptor,El=function(){this.head=null,this.tail=null};El.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Sl,Pl,Ol,Il,xl,_l=El,jl=/ipad|iphone|ipod/i.test(Ve)&&"undefined"!=typeof Pebble,kl=/web0s(?!.*chrome)/i.test(Ve),Tl=re,Al=Ws,Ml=gl.set,Rl=_l,Ll=zs,Cl=jl,Nl=kl,Dl=is,Ul=Tl.MutationObserver||Tl.WebKitMutationObserver,$l=Tl.document,Bl=Tl.process,Fl=Tl.Promise,Wl=function(e){if(!bl)return ml[e];var t=wl(ml,e);return t&&t.value}("queueMicrotask");if(!Wl){var Gl=new Rl,Kl=function(){var e,t;for(Dl&&(e=Bl.domain)&&e.exit();t=Gl.get();)try{t()}catch(e){throw Gl.head&&Sl(),e}e&&e.enter()};Ll||Dl||Nl||!Ul||!$l?!Cl&&Fl&&Fl.resolve?((Il=Fl.resolve(void 0)).constructor=Fl,xl=Al(Il.then,Il),Sl=function(){xl(Kl)}):Dl?Sl=function(){Bl.nextTick(Kl)}:(Ml=Al(Ml,Tl),Sl=function(){Ml(Kl)}):(Pl=!0,Ol=$l.createTextNode(""),new Ul(Kl).observe(Ol,{characterData:!0}),Sl=function(){Ol.data=Pl=!Pl}),Wl=function(e){Gl.head||Sl(),Gl.add(e)}}var zl=Wl,Vl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Hl=re.Promise,ql="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Yl=!ql&&!is&&"object"==typeof window&&"object"==typeof document,Zl=re,Jl=Hl,Xl=$e,Ql=Wo,ef=nn,tf=Qt,rf=Yl,nf=ql,of=Qe;Jl&&Jl.prototype;var af=tf("species"),uf=!1,cf=Xl(Zl.PromiseRejectionEvent),sf=Ql("Promise",(function(){var e=ef(Jl),t=e!==String(Jl);if(!t&&66===of)return!0;if(!of||of<51||!/native code/.test(e)){var r=new Jl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[af]=n,!(uf=r.then((function(){}))instanceof n))return!0}return!t&&(rf||nf)&&!cf})),lf={CONSTRUCTOR:sf,REJECTION_EVENT:cf,SUBCLASSING:uf},ff={},pf=vt,df=TypeError,hf=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new df("Bad Promise constructor");t=e,r=n})),this.resolve=pf(t),this.reject=pf(r)};ff.f=function(e){return new hf(e)};var vf,yf,gf,mf,bf,wf,Ef,Sf=Zo,Pf=is,Of=re,If=se,xf=qn,_f=li,jf=vt,kf=$e,Tf=Fe,Af=function(e,t){var r,n=Ns(e).constructor;return void 0===n||Ds(r=Ns(n)[Us])?t:function(e){if(Rs(e))return e;throw new Cs(Ls(e)+" is not a constructor")}(r)},Mf=gl.set,Rf=zl,Lf=Vl,Cf=_l,Nf=In,Df=Hl,Uf=ff,$f="Promise",Bf=lf.CONSTRUCTOR,Ff=lf.REJECTION_EVENT,Wf=lf.SUBCLASSING,Gf=Nf.getterFor($f),Kf=Nf.set,zf=Df&&Df.prototype,Vf=Df,Hf=zf,qf=Of.TypeError,Yf=Of.document,Zf=Of.process,Jf=Uf.f,Xf=Jf,Qf=!!(Yf&&Yf.createEvent&&Of.dispatchEvent),ep="unhandledrejection",tp=function(e){var t;return!(!Tf(e)||!kf(t=e.then))&&t},rp=function(e,t){var r,n,o,i=t.value,a=1===t.state,u=a?e.ok:e.fail,c=e.resolve,s=e.reject,l=e.domain;try{u?(a||(2===t.rejection&&up(t),t.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===e.promise?s(new qf("Promise-chain cycle")):(n=tp(r))?If(n,r,c,s):c(r)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},np=function(e,t){e.notified||(e.notified=!0,Rf((function(){for(var r,n=e.reactions;r=n.get();)rp(r,e);e.notified=!1,t&&!e.rejection&&ip(e)})))},op=function(e,t,r){var n,o;Qf?((n=Yf.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Of.dispatchEvent(n)):n={promise:t,reason:r},!Ff&&(o=Of["on"+e])?o(n):e===ep&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},ip=function(e){If(Mf,Of,(function(){var t,r=e.facade,n=e.value;if(ap(e)&&(t=Lf((function(){Pf?Zf.emit("unhandledRejection",n,r):op(ep,r,n)})),e.rejection=Pf||ap(e)?2:1,t.error))throw t.value}))},ap=function(e){return 1!==e.rejection&&!e.parent},up=function(e){If(Mf,Of,(function(){var t=e.facade;Pf?Zf.emit("rejectionHandled",t):op("rejectionhandled",t,e.value)}))},cp=function(e,t,r){return function(n){e(t,n,r)}},sp=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,np(e,!0))},lp=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new qf("Promise can't be resolved itself");var n=tp(t);n?Rf((function(){var r={done:!1};try{If(n,t,cp(lp,r,e),cp(sp,r,e))}catch(t){sp(r,t,e)}})):(e.value=t,e.state=1,np(e,!1))}catch(t){sp({done:!1},t,e)}}};if(Bf&&(Hf=(Vf=function(e){(function(e,t){if(hs(t,e))return e;throw new vs("Incorrect invocation")})(this,Hf),jf(e),If(vf,this);var t=Gf(this);try{e(cp(lp,t),cp(sp,t))}catch(e){sp(t,e)}}).prototype,(vf=function(e){Kf(this,{type:$f,done:!1,notified:!1,parent:!1,reactions:new Cf,rejection:!1,state:0,value:void 0})}).prototype=xf(Hf,"then",(function(e,t){var r=Gf(this),n=Jf(Af(this,Vf));return r.parent=!0,n.ok=!kf(e)||e,n.fail=kf(t)&&t,n.domain=Pf?Zf.domain:void 0,0===r.state?r.reactions.add(n):Rf((function(){rp(n,r)})),n.promise})),yf=function(){var e=new vf,t=Gf(e);this.promise=e,this.resolve=cp(lp,t),this.reject=cp(sp,t)},Uf.f=Jf=function(e){return e===Vf||void 0===e?new yf(e):Xf(e)},kf(Df)&&zf!==Object.prototype)){gf=zf.then,Wf||xf(zf,"then",(function(e,t){var r=this;return new Vf((function(e,t){If(gf,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete zf.constructor}catch(e){}_f&&_f(zf,Hf)}Sf({global:!0,constructor:!0,wrap:!0,forced:Bf},{Promise:Vf}),wf=$f,Ef=!1,(bf=Vf)&&!Ef&&(bf=bf.prototype),bf&&!us(bf,cs)&&as(bf,cs,{configurable:!0,value:wf}),mf=fs($f),ps&&mf&&!mf[ds]&&function(e,t,r){r.get&&ss(r.get,t,{getter:!0}),r.set&&ss(r.set,t,{setter:!0}),ls.f(e,t,r)}(mf,ds,{configurable:!0,get:function(){return this}});var fp={},pp=fp,dp=Qt("iterator"),hp=Array.prototype,vp=Si,yp=mt,gp=Ae,mp=fp,bp=Qt("iterator"),wp=function(e){if(!gp(e))return yp(e,bp)||yp(e,"@@iterator")||mp[vp(e)]},Ep=se,Sp=vt,Pp=kr,Op=ft,Ip=wp,xp=TypeError,_p=se,jp=kr,kp=mt,Tp=Ws,Ap=se,Mp=kr,Rp=ft,Lp=uo,Cp=ze,Np=wp,Dp=function(e,t,r){var n,o;jp(e);try{if(!(n=kp(e,"return"))){if("throw"===t)throw r;return r}n=_p(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return jp(n),r},Up=TypeError,$p=function(e,t){this.stopped=e,this.result=t},Bp=$p.prototype,Fp=function(e,t,r){var n,o,i,a,u,c,s,l,f=r&&r.that,p=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Tp(t,f),g=function(e){return n&&Dp(n,"normal",e),new $p(!0,e)},m=function(e){return p?(Mp(e),v?y(e[0],e[1],g):y(e[0],e[1])):v?y(e,g):y(e)};if(d)n=e.iterator;else if(h)n=e;else{if(!(o=Np(e)))throw new Up(Rp(e)+" is not iterable");if(void 0!==(l=o)&&(pp.Array===l||hp[dp]===l)){for(i=0,a=Lp(e);a>i;i++)if((u=m(e[i]))&&Cp(Bp,u))return u;return new $p(!1)}n=function(e,t){var r=arguments.length<2?Ip(e):t;if(Sp(r))return Pp(Ep(r,e));throw new xp(Op(e)+" is not iterable")}(e,o)}for(c=d?e.next:n.next;!(s=Ap(c,n)).done;){try{u=m(s.value)}catch(e){Dp(n,"throw",e)}if("object"==typeof u&&u&&Cp(Bp,u))return u}return new $p(!1)},Wp=Qt("iterator"),Gp=!1;try{var Kp=0,zp={next:function(){return{done:!!Kp++}},return:function(){Gp=!0}};zp[Wp]=function(){return this},Array.from(zp,(function(){throw 2}))}catch(e){}var Vp=Hl,Hp=lf.CONSTRUCTOR||!function(e,t){try{if(!t&&!Gp)return!1}catch(e){return!1}var r=!1;try{var n={};n[Wp]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}((function(e){Vp.all(e).then(void 0,(function(){}))})),qp=se,Yp=vt,Zp=ff,Jp=Vl,Xp=Fp;Zo({target:"Promise",stat:!0,forced:Hp},{all:function(e){var t=this,r=Zp.f(t),n=r.resolve,o=r.reject,i=Jp((function(){var r=Yp(t.resolve),i=[],a=0,u=1;Xp(e,(function(e){var c=a++,s=!1;u++,qp(r,t,e).then((function(e){s||(s=!0,i[c]=e,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var Qp=Zo,ed=lf.CONSTRUCTOR,td=Hl,rd=Ke,nd=$e,od=qn,id=td&&td.prototype;if(Qp({target:"Promise",proto:!0,forced:ed,real:!0},{catch:function(e){return this.then(void 0,e)}}),nd(td)){var ad=rd("Promise").prototype.catch;id.catch!==ad&&od(id,"catch",ad,{unsafe:!0})}var ud=se,cd=vt,sd=ff,ld=Vl,fd=Fp;Zo({target:"Promise",stat:!0,forced:Hp},{race:function(e){var t=this,r=sd.f(t),n=r.reject,o=ld((function(){var o=cd(t.resolve);fd(e,(function(e){ud(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var pd=ff;Zo({target:"Promise",stat:!0,forced:lf.CONSTRUCTOR},{reject:function(e){var t=pd.f(this);return(0,t.reject)(e),t.promise}});var dd=kr,hd=Fe,vd=ff,yd=Zo,gd=lf.CONSTRUCTOR;Ke("Promise"),yd({target:"Promise",stat:!0,forced:gd},{resolve:function(e){return function(e,t){if(dd(e),hd(t)&&t.constructor===e)return t;var r=vd.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});const md=Lc.createWorkspaceLogger("window").getLogger("fetchers"),{value:{factoriesByOwner:bd}}=Mc("factoriesByOwner",md,{factoriesByOwner:{}});function wd(e){return os(this,arguments,void 0,(function*({owner:e,url:t}){let r=bd[e];r||(md.log(`no factories found for ${e}, creating new list`),r=[],bd[e]=r);const n=r.find((e=>e.url===t));if(null==n?void 0:n.factoryModule)return md.log(`using cached factory module for ${t}`),{factoryModule:n.factoryModule,error:null};const o=r.find((e=>e.url===t));if(o)return md.log(`a request to fetch factory already in progress for ${t}, waiting for it to finish`),new Promise(((e,t)=>{o.onFetched.push(e),o.onError.push(t)}));md.log(`fetching factory module for ${t}`);const i={url:t,factoryModule:null,error:null,onFetched:[],onError:[]};r.push(i);try{const e=yield import(t);md.log(`fetched factory module for ${t}, caching it`),i.factoryModule=e,i.onFetched&&(md.log(`calling onFetched callbacks for ${t} (${i.onFetched.length} queued)`),i.onFetched.forEach((r=>{try{r(e)}catch(e){md.error(`error calling onFetched callback for ${t}`,{error:e})}}))),i.onFetched=[],i.onError=[]}catch(e){md.log(`failed to fetch factory module for ${t}, removing from list`),i.onError&&(md.log(`calling onError callbacks for ${t} (${i.onError.length} queued)`),i.onError.forEach((r=>{try{r(e)}catch(e){md.error(`error calling onError callback for ${t}`,{error:e})}}))),i.onError=[],i.onFetched=[],r.splice(r.indexOf(i),1)}return{factoryModule:i.factoryModule,error:i.error}}))}const Ed=Tc(),Sd=e=>os(void 0,void 0,void 0,(function*(){const t=Lc.createWorkspaceLogger(e.workspaceName||"").getLogger("fetch-loader");let r="",n="";if(Ed.loaderUrl?(t.log(`using custom loader url from query params '${Ed.loaderUrl}'`),n=Ed.loaderUrl):e.devLoaderUrl&&(t.log(`using custom loader url from options '${e.devLoaderUrl}'`),n=e.devLoaderUrl),n){t.log(`verifying custom loader url '${n}' url against environment runtime json. fetching runtime json...`);const o=yield((e,t)=>os(void 0,void 0,void 0,(function*(){let r,n=`${e}/runtime.json`;try{t.log(`loading runtime versions for env from '${n}'`),r=yield fetch(n).then((e=>e.json()))}catch(e){throw t.error(`error loading runtime versions for env from '${n}'`,{error:e}),new Error(`failed to load runtime versions for env from '${n}'`)}if(!r||!("domains"in r))throw new Error("invalid runtime json, 'domains' is missing in the runtime json");return r.domains})))(e.serverUrl,t),i=n.startsWith(e.serverUrl),a=o.some((e=>n.startsWith(e)));if(t.log("ensuring custom loader url is in environment artifacts or from an allowed domain",{data:{customLoaderUrl:n,serverUrl:e.serverUrl,isInEnvironmentArtifacts:i,isInAllowedDomains:a}}),!i&&!a)throw new Error(`the custom loader url '${n}' is not in the environment artifacts or from an allowed domain`);t.log(`using custom loader url '${n}'`),r=n}else t.log("using environment loader"),r=`${e.serverUrl}/loader/index.esm.js`;t.log("fetching environment unisphere loader",{data:{environmentLoaderUrl:r,options:e}});const{factoryModule:{loader:o}}=yield wd({owner:"runtime-js",url:r});if(!o)throw new Error(`failed to load dev loader from '${r}'`);return t.log("executing environment unisphere loader"),o(Object.assign({},e))}));var Pd=Zo,Od=$c,Id=ne.f,xd=io,_d=Ii,jd=Kc,kd=Le,Td=Vc,Ad=Od("".slice),Md=Math.min,Rd=Td("endsWith"),Ld=!Rd&&!!function(){var e=Id(String.prototype,"endsWith");return e&&!e.writable}();Pd({target:"String",proto:!0,forced:!Ld&&!Rd},{endsWith:function(e){var t=_d(kd(this));jd(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,o=void 0===r?n:Md(xd(r),n),i=_d(e);return Ad(t,o-i.length,o)===i}});var Cd=Ee,Nd=Qn,Dd=Ii,Ud=Le,$d=Cd("".charAt),Bd=Cd("".charCodeAt),Fd=Cd("".slice),Wd=function(e){return function(t,r){var n,o,i=Dd(Ud(t)),a=Nd(r),u=i.length;return a<0||a>=u?e?"":void 0:(n=Bd(i,a))<55296||n>56319||a+1===u||(o=Bd(i,a+1))<56320||o>57343?e?$d(i,a):n:e?Fd(i,a,a+2):o-56320+(n-55296<<10)+65536}},Gd=(Wd(!1),Wd(!0)),Kd=Ee,zd=Nt,Vd=Math.floor,Hd=Kd("".charAt),qd=Kd("".replace),Yd=Kd("".slice),Zd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Jd=/\$([$&'`]|\d{1,2})/g,Xd=ti,Qd=se,eh=Ee,th=ac,rh=oe,nh=kr,oh=$e,ih=Ae,ah=Qn,uh=io,ch=Ii,sh=Le,lh=function(e,t,r){return t+(r?Gd(e,t).length:1)},fh=mt,ph=function(e,t,r,n,o,i){var a=r+e.length,u=n.length,c=Jd;return void 0!==o&&(o=zd(o),c=Zd),qd(i,c,(function(i,c){var s;switch(Hd(c,0)){case"$":return"$";case"&":return e;case"`":return Yd(t,0,r);case"'":return Yd(t,a);case"<":s=o[Yd(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>u){var f=Vd(l/10);return 0===f?i:f<=u?void 0===n[f-1]?Hd(c,1):n[f-1]+Hd(c,1):i}s=n[l-1]}return void 0===s?"":s}))},dh=hc,hh=Qt("replace"),vh=Math.max,yh=Math.min,gh=eh([].concat),mh=eh([].push),bh=eh("".indexOf),wh=eh("".slice),Eh="$0"==="a".replace(/./,"$0"),Sh=!!/./[hh]&&""===/./[hh]("a","$0");function Ph(e){return os(this,void 0,void 0,(function*(){return(yield function(){const e=window;return new Promise((t=>{var r,n;if(null===(n=null===(r=e.unisphere)||void 0===r?void 0:r.instancesManager)||void 0===n?void 0:n.get)t(e.unisphere.instancesManager.get);else{const r=()=>{document.removeEventListener("unisphere-ready",r),t(e.unisphere.instancesManager.get)};document.addEventListener("unisphere-ready",r)}}))}())(e)}))}function Oh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Oh=function(){return!!e})()}th("replace",(function(e,t,r){var n=Sh?"$":"$0";return[function(e,r){var n=sh(this),o=ih(e)?void 0:fh(e,hh);return o?Qd(o,e,n,r):Qd(t,ch(n),e,r)},function(e,o){var i=nh(this),a=ch(e);if("string"==typeof o&&-1===bh(o,n)&&-1===bh(o,"$<")){var u=r(t,i,a,o);if(u.done)return u.value}var c=oh(o);c||(o=ch(o));var s,l=i.global;l&&(s=i.unicode,i.lastIndex=0);for(var f,p=[];null!==(f=dh(i,a))&&(mh(p,f),l);)""===ch(f[0])&&(i.lastIndex=lh(a,uh(i.lastIndex),s));for(var d,h="",v=0,y=0;y<p.length;y++){for(var g,m=ch((f=p[y])[0]),b=vh(yh(ah(f.index),a.length),0),w=[],E=1;E<f.length;E++)mh(w,void 0===(d=f[E])?d:String(d));var S=f.groups;if(c){var P=gh([m],w,b,a);void 0!==S&&mh(P,S),g=ch(Xd(o,void 0,P))}else g=ph(m,a,b,w,S,o);b>=v&&(h+=wh(a,v,b)+g,v=b+m.length)}return h+wh(a,v)}]}),!!rh((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Eh||Sh),Tc();var Ih=function(e){function t(e,r,n){var i,a,u,c;return o(this,t),a=this,c=[e,r,n],u=l(u=t),d(i=s(a,Oh()?Reflect.construct(u,c||[],l(a).constructor):u.apply(a,c)),"isReady",!1),d(i,"workspaceName",""),d(i,"shouldCreateWorkspace",!1),i.unispherePluginManager=new Q(r,i.eventManager,i.logger),i.player.config.provider.unisphereLoaderUrl&&"string"==typeof i.config.workspaceName?i.workspaceName=i.config.workspaceName:(i.workspaceName=F("kaltura_player_workspace_"),i.shouldCreateWorkspace=!0),i}return p(t,e),c(t,[{key:"getWorkspace",value:(r=n(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.shouldCreateWorkspace){e.next=2;break}return e.abrupt("return",Sd({serverUrl:this.player.config.provider.unisphereLoaderUrl,workspaceName:this.workspaceName,ui:{theme:"light",language:"en"}}));case 2:return e.abrupt("return",Ph(this.config.workspaceName));case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"loadMedia",value:function(){var e=this;this.isReady?(this.unispherePluginManager.updateSessionData(),this.unispherePluginManager.loadWidgets(this.config.widgets)):this.getWorkspace().then((function(t){e.unispherePluginManager.init(t,e.config.widgets),e.unispherePluginManager.updateSessionData(),e.isReady=!0})).catch((function(){e.logger.warn("Failed to load unisphere workspace",e.workspaceName)}))}},{key:"reset",value:function(){this.unispherePluginManager.reset()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.unispherePluginManager.destroy()}}],[{key:"isValid",value:function(){return!0}}]);var r}(e.BasePlugin);d(Ih,"defaultConfig",{widgets:[]}),(0,e.registerPlugin)("unisphere",Ih)})(),{}})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("KalturaPlayer",[],t):"object"==typeof exports?exports.KalturaPlayer=t():(e.KalturaPlayer=e.KalturaPlayer||{},e.KalturaPlayer.plugins=e.KalturaPlayer.plugins||{},e.KalturaPlayer.plugins.unisphere=t())}(self,(()=>(()=>{var e={51:(e,t,r)=>{var n=r(564).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof w?t:w,i=Object.create(o.prototype),a=new R(n||[]);return u(i,"_invoke",{value:k(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="suspendedYield",g="executing",m="completed",b={};function w(){}function E(){}function S(){}var P={};p(P,s,(function(){return this}));var O=Object.getPrototypeOf,I=O&&O(O(L([])));I&&I!==i&&a.call(I,s)&&(P=I);var x=S.prototype=w.prototype=Object.create(P);function _(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(e,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:y,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return E.prototype=S,u(x,"constructor",{value:S,configurable:!0}),u(S,"constructor",{value:E,configurable:!0}),E.displayName=p(S,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,p(e,f,"GeneratorFunction")),e.prototype=Object.create(x),e},r.awrap=function(e){return{__await:e}},_(j.prototype),p(j.prototype,l,(function(){return this})),r.AsyncIterator=j,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new j(d(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(x),p(x,f,"Generator"),p(x,s,(function(){return this})),p(x,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=L,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},564:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},790:(e,t,r)=>{var n=r(51)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{PlayerEvent:()=>w});const e=KalturaPlayer;function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function o(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function s(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function h(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var v=r(790),y=r.n(v);const g=KalturaPlayer.ui.preact,m=KalturaPlayer.core;var b=function(e){return e.UPPER_BAR_ICON_SHOW="unisphere.event.player.upper-bar-icon.show",e.UPPER_BAR_ICON_CLICK="unisphere.event.player.upper-bar-icon.click",e.SIDE_PANEL_OPEN="unisphere.event.player.side-panel.open",e.SIDE_PANEL_CLOSE="unisphere.event.player.side-panel.close",e.SIDE_PANEL_TOGGLE="unisphere.event.player.side-panel.toggle",e.SET_VALUE_CURRENT_TIME="unisphere.event.player.set-value.current-time",e.CHAPTERS_ADD="unisphere.event.player.chapters.add",e.PLAYER_RESIZE="unisphere.event.player.resize",e.DISPATCH_EVENT="unisphere.event.player.dispatch-event",e.SIDE_PANEL_CLOSED="unisphere.event.player.side-panel.closed",e.SIDE_PANEL_OPENED="unisphere.event.player.side-panel.opened",e}({}),w=function(e){return e.UNISPHERE_CHAPTERS_ADDED="unisphere_chapters_added",e}({}),E=function(e){return e.SELECTED_CHAPTER="selectedChapter",e.CURRENT_TIME="currentTime",e.IS_PAUSED="isPaused",e.PLAYER_SESSION="player-session",e.IS_SMALL_SIZE="isSmallSize",e}(E||{}),S=function(e){var t;return(0,g.h)("div",{style:null!==(t=e.style)&&void 0!==t?t:{},id:e.id})},P=e.ui.components,O=P.Tooltip,I=P.Icon,x=function(t){var r=t.id,n=t.label,o=t.iconPath;return(0,g.h)(O,{label:n,type:"bottom"},(0,g.h)("button",{type:"button","data-testid":"playlist_pluginButton","aria-label":n,className:e.ui.style.upperBarIcon},(0,g.h)(I,{id:"unisphere-icon-".concat(r),height:32,width:32,viewBox:"0 0 32 32",path:o})))},_=function(){function e(){i(this,e)}return s(e,null,[{key:"set",value:function(t){e.workspaceInstance=t}},{key:"get",value:function(){return e.workspaceInstance}},{key:"destroy",value:function(){try{this.workspaceInstance.kill()}catch(e){}e.workspaceInstance=null}}])}();function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}h(_,"workspaceInstance",null);var A=function(){function e(){i(this,e)}return s(e,null,[{key:"addToUnsubscribeMap",value:function(t){return e.unsubscribeMap.set(e.sequence,t),++e.sequence,e.sequence}},{key:"unsubscribeAll",value:function(){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.unsubscribeMap);try{for(r.s();!(t=r.n()).done;){var n=k(t.value,2),o=n[0];(0,n[1])(),e.unsubscribeMap.delete(o)}}catch(e){r.e(e)}finally{r.f()}}},{key:"unsubscribe",value:function(t){var r=e.unsubscribeMap.get(t);r&&(r(),e.unsubscribeMap.delete(t))}}])}();function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}h(A,"unsubscribeMap",new Map),h(A,"sequence",-1);var R,L=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,M()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t)}(A);function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}h(L,"get",function(){var e=o(y().mark((function e(t){var r,n,o,i,a;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.widgetId,n=t.context,o=t.settings,i=_.get(),e.prev=2,e.next=5,null==i?void 0:i.loadRuntime(r,n,o||{});case 5:return a=e.sent,e.abrupt("return",a?null==a?void 0:a.runtime:null);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}());var N,D="unisphere.service.pub-sub",U=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,C()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(A);function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($=function(){return!!e})()}R=U,h(U,"subscribe",(function(e,t){var r=_.get(),n=null==r?void 0:r.getService(D);if(n){var o=n.subscribe(e,t);return R.addToUnsubscribeMap(o)}return-1})),h(U,"emit",(function(e,t){var r=_.get(),n=null==r?void 0:r.getService(D);null==n||n.emit({id:e,version:"1.0.0",payload:t})}));var B="player",F="unisphere.service.storage",W=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,$()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(A);function G(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0;t<5;++t)e+=m.Utils.Generator.uniqueId();return e}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}N=W,h(W,"update",(function(e,t){var r=_.get(),n=null==r?void 0:r.getService(F);null==n||n.update(B,e,t)})),h(W,"get",(function(e){var t=_.get(),r=null==t?void 0:t.getService(F);return r?r.get(B,e):null})),h(W,"subscribe",(function(e,t){var r=_.get(),n=null==r?void 0:r.getService(F);if(n){var o=n.subscribe(t,{namespace:B,property:e,emitLastValue:!0});N.addToUnsubscribeMap(o)}}));var z=function(){return s((function e(){i(this,e),h(this,"_disposers",new Map)}),[{key:"generateId",value:function(e){return G("".concat(e.containerType,"_container_"))}},{key:"getSidePanelsManager",value:function(e){return e.getService("sidePanelsManager")}},{key:"addDisposer",value:function(e,t){this._disposers.set(e,t)}},{key:"dispose",value:function(e){var t=this._disposers.get(e);t&&(t(),this._disposers.delete(e))}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return K(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this._disposers);try{for(t.s();!(e=t.n()).done;){var r=k(e.value,1)[0];this.dispose(r)}}catch(e){t.e(e)}finally{t.f()}}}])}();function H(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(H=function(){return!!e})()}var V=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,H()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,[{key:"createContainer",value:function(e,t){var r,n=this,o=this.generateId(t),i=t.unisphereArea,a=t.position,u=t.expandMode,c=t.presets,s=null===(r=this.getSidePanelsManager(e))||void 0===r?void 0:r.add({label:o,panelComponent:function(){return(0,g.h)(S,{style:{height:"100%"},id:o})},presets:c,position:a,expandMode:u});return"number"==typeof s?(this.addDisposer(o,(function(){var t;null===(t=n.getSidePanelsManager(e))||void 0===t||t.remove(s)})),W.update(i,{upperBarIcon:{panelId:s}}),o):null}}])}(z);function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(q=function(){return!!e})()}var Y=function(e){function t(){return i(this,t),e=this,n=arguments,r=f(r=t),l(e,q()?Reflect.construct(r,n||[],f(e).constructor):r.apply(e,n));var e,r,n}return d(t,e),s(t,[{key:"createContainer",value:function(e,t){var r=this.generateId(t),n=t.playerArea,o=t.presets,i=e.ui.addComponent({label:r,presets:o,area:n,get:function(){return(0,g.h)(S,{style:{width:"inherit"},id:r})}});return this.addDisposer(r,i),r}}])}(z);function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var J=function(){return s((function e(t){i(this,e),h(this,"containerProducers",new Map([["sidepanel",new V],["simple",new Y]])),this.player=t}),[{key:"createContainer",value:function(e){var t=this.containerProducers.get(e.containerType);return t?t.createContainer(this.player,e):null}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Z(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this.containerProducers);try{for(t.s();!(e=t.n()).done;){var r,n=k(e.value,1)[0];null===(r=this.containerProducers.get(n))||void 0===r||r.destroy()}}catch(e){t.e(e)}finally{t.f()}}}])}();function X(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Q(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ee=e.ui.reducers.shell,te=function(){return s((function e(t,r,n){i(this,e),h(this,"iconIds",new Map),h(this,"panelIds",new Set),h(this,"persistentIconIds",new Map),this.player=t,this.eventManager=r,this.logger=n,this.containerManager=new J(t),this.currentIsSmallSize=void 0}),[{key:"upperBarManager",get:function(){return this.player.getService("upperBarManager")}},{key:"sidePanelsManager",get:function(){return this.player.getService("sidePanelsManager")}},{key:"timelineManager",get:function(){return this.player.getService("timeline")}},{key:"cuePointManager",get:function(){return this.player.getService("kalturaCuepoints")}},{key:"addEventHandlers",value:function(){var t=this,r=e.ui.redux.useStore();this.unsubscribeStore=r.subscribe((function(){var e=r.getState().shell.isSmallSize;e!==t.currentIsSmallSize&&(t.currentIsSmallSize=e,W.update(E.IS_SMALL_SIZE,e))})),U.subscribe(b.UPPER_BAR_ICON_SHOW,(function(e){var r=e.payload,n=r.id,o=r.label,i=r.order,a=r.iconPath,u=r.panelId,c=r.isPersistent;t.addUpperBarIcon(n,o,i,a,u,c)})),U.subscribe(b.SIDE_PANEL_OPEN,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.activateItem(o),U.emit(b.SIDE_PANEL_OPENED,n)})),U.subscribe(b.SIDE_PANEL_CLOSE,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.deactivateItem(o),U.emit(b.SIDE_PANEL_CLOSED,n)})),U.subscribe(b.SIDE_PANEL_TOGGLE,(function(e){var r,n,o,i=e.payload,a=i.panelId;null!==(r=t.sidePanelsManager)&&void 0!==r&&r.isItemActive(a)?(null===(n=t.sidePanelsManager)||void 0===n||n.deactivateItem(a),U.emit(b.SIDE_PANEL_CLOSED,i)):(null===(o=t.sidePanelsManager)||void 0===o||o.activateItem(a),U.emit(b.SIDE_PANEL_OPENED,i))})),U.subscribe(b.SET_VALUE_CURRENT_TIME,(function(e){var r=e.payload.currentTime;r>=0&&(t.player.currentTime=r)})),U.subscribe(b.CHAPTERS_ADD,(function(e){var r=e.payload,n=r.chapters;if(n&&n.length){var o;null===(o=t.timelineManager)||void 0===o||o.disableChapters();for(var i=0;i<n.length;++i){var a,u=n[i],c=u.title,s=+u.time;null===(a=t.timelineManager)||void 0===a||a.addKalturaCuePoint(s,"SummaryAndChapters",i,c,{onClick:function(e){var t=e.cuePoint;W.update(E.SELECTED_CHAPTER,t.id)}})}t.player.dispatchEvent(new m.FakeEvent(w.UNISPHERE_CHAPTERS_ADDED,r))}})),U.subscribe(b.DISPATCH_EVENT,(function(e){var r=e.payload,n=r.eventName,o=r.data;t.player.dispatchEvent(new m.FakeEvent(n,o))})),this.eventManager.listen(this.player,e.core.EventType.TIME_UPDATE,(function(){W.update(E.CURRENT_TIME,"".concat(t.player.currentTime))})),this.eventManager.listen(this.player,e.ui.EventType.GUI_RESIZE,(function(){U.emit(b.PLAYER_RESIZE,{}),setTimeout((function(){U.emit(b.PLAYER_RESIZE,{})}),1e3)})),this.eventManager.listen(this.player,e.core.EventType.PAUSE,(function(){W.update(E.IS_PAUSED,!0)})),this.eventManager.listen(this.player,e.core.EventType.PLAY,(function(){W.update(E.IS_PAUSED,!1)}))}},{key:"addUpperBarIcon",value:function(e,t,r,n,o,i){var a;if(!this.iconIds.has(e)&&!this.persistentIconIds.has(e)){this.panelIds.add(o);var u=null===(a=this.upperBarManager)||void 0===a?void 0:a.add({displayName:t,ariaLabel:t,order:r,component:function(){return(0,g.h)(x,{id:e,label:t,iconPath:n})},svgIcon:{path:n},onClick:function(){U.emit(b.UPPER_BAR_ICON_CLICK,{id:e,panelId:o})}});i?this.persistentIconIds.set(e,u):this.iconIds.set(e,u)}}},{key:"isVideoClipped",value:function(){var e=this.player.config.sources,t=e.seekFrom,r=e.clipTo,n=e.duration;return"number"==typeof t&&t>0||"number"==typeof r&&r<n}},{key:"shouldLoadWidget",value:function(e){var t=e.widgetId,r=e.context;return!(t.includes("video-summary")&&"kaltura-player-list"===r&&this.isVideoClipped())}},{key:"loadWidgets",value:function(e){var t,r=this,n=X(e);try{var o=function(){var e=t.value,n=e.widgetId,o=e.context;if(!n||!o||!r.shouldLoadWidget(e))return 1;var i,a=X(e.containers);try{var u=function(){var t=i.value;if(!t.unisphereArea)return 1;var a=r.containerManager.createContainer(t);a&&L.get(e).then((function(e){null==e||e.assignAreaByName(t.unisphereArea,a)})).catch((function(e){r.logger.warn("Failed to load unisphere widget ".concat(n," with context ").concat(o," "),e)}))};for(a.s();!(i=a.n()).done;)u()}catch(e){a.e(e)}finally{a.f()}};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}}},{key:"init",value:function(e,t){_.set(e),this.addEventHandlers(),this.loadWidgets(t)}},{key:"updateSessionData",value:function(){var e,t;W.update(E.PLAYER_SESSION,{entryId:this.player.sources.id,ks:null===(e=this.player.config.session)||void 0===e?void 0:e.ks,entryName:null===(t=this.player.sources.metadata)||void 0===t?void 0:t.name})}},{key:"reset",value:function(){var e,t=X(this.panelIds);try{for(t.s();!(e=t.n()).done;){var r,n=e.value;if(null!==(r=this.sidePanelsManager)&&void 0!==r&&r.isItemActive(n)){this.sidePanelsManager.deactivateItem(n);break}}}catch(e){t.e(e)}finally{t.f()}var o,i=X(this.iconIds.values());try{for(i.s();!(o=i.n()).done;){var a,u=o.value;null===(a=this.upperBarManager)||void 0===a||a.remove(u)}}catch(e){i.e(e)}finally{i.f()}this.iconIds.clear(),this.containerManager.destroy(),this.player.ui.store.dispatch(ee.actions.updateTimeDisplayIsMinimized(!1))}},{key:"destroy",value:function(){this.reset(),this.containerManager.destroy();var e,t=X(this.persistentIconIds.values());try{for(t.s();!(e=t.n()).done;){var r,n=e.value;null===(r=this.upperBarManager)||void 0===r||r.remove(n)}}catch(e){t.e(e)}finally{t.f()}U.destroy(),W.destroy(),_.destroy(),this.unsubscribeStore&&this.unsubscribeStore()}}])}(),re="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ne=function(e){return e&&e.Math===Math&&e},oe=ne("object"==typeof globalThis&&globalThis)||ne("object"==typeof window&&window)||ne("object"==typeof self&&self)||ne("object"==typeof re&&re)||ne("object"==typeof re&&re)||function(){return this}()||Function("return this")(),ie={},ae=function(e){try{return!!e()}catch(e){return!0}},ue=!ae((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ce=!ae((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),se=ce,le=Function.prototype.call,fe=se?le.bind(le):function(){return le.apply(le,arguments)},pe={},de={}.propertyIsEnumerable,he=Object.getOwnPropertyDescriptor,ve=he&&!de.call({1:2},1);pe.f=ve?function(e){var t=he(this,e);return!!t&&t.enumerable}:de;var ye,ge,me=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},be=ce,we=Function.prototype,Ee=we.call,Se=be&&we.bind.bind(Ee,Ee),Pe=be?Se:function(e){return function(){return Ee.apply(e,arguments)}},Oe=Pe,Ie=Oe({}.toString),xe=Oe("".slice),_e=function(e){return xe(Ie(e),8,-1)},je=ae,ke=_e,Te=Object,Ae=Pe("".split),Me=je((function(){return!Te("z").propertyIsEnumerable(0)}))?function(e){return"String"===ke(e)?Ae(e,""):Te(e)}:Te,Re=function(e){return null==e},Le=Re,Ce=TypeError,Ne=function(e){if(Le(e))throw new Ce("Can't call method on "+e);return e},De=Me,Ue=Ne,$e=function(e){return De(Ue(e))},Be="object"==typeof document&&document.all,Fe=void 0===Be&&void 0!==Be?function(e){return"function"==typeof e||e===Be}:function(e){return"function"==typeof e},We=Fe,Ge=function(e){return"object"==typeof e?null!==e:We(e)},Ke=oe,ze=Fe,He=function(e,t){return arguments.length<2?(r=Ke[e],ze(r)?r:void 0):Ke[e]&&Ke[e][t];var r},Ve=Pe({}.isPrototypeOf),qe="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Ye=oe,Ze=qe,Je=Ye.process,Xe=Ye.Deno,Qe=Je&&Je.versions||Xe&&Xe.version,et=Qe&&Qe.v8;et&&(ge=(ye=et.split("."))[0]>0&&ye[0]<4?1:+(ye[0]+ye[1])),!ge&&Ze&&(!(ye=Ze.match(/Edge\/(\d+)/))||ye[1]>=74)&&(ye=Ze.match(/Chrome\/(\d+)/))&&(ge=+ye[1]);var tt=ge,rt=tt,nt=ae,ot=oe.String,it=!!Object.getOwnPropertySymbols&&!nt((function(){var e=Symbol("symbol detection");return!ot(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&rt&&rt<41})),at=it&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ut=He,ct=Fe,st=Ve,lt=Object,ft=at?function(e){return"symbol"==typeof e}:function(e){var t=ut("Symbol");return ct(t)&&st(t.prototype,lt(e))},pt=String,dt=function(e){try{return pt(e)}catch(e){return"Object"}},ht=Fe,vt=dt,yt=TypeError,gt=function(e){if(ht(e))return e;throw new yt(vt(e)+" is not a function")},mt=gt,bt=Re,wt=function(e,t){var r=e[t];return bt(r)?void 0:mt(r)},Et=fe,St=Fe,Pt=Ge,Ot=TypeError,It={exports:{}},xt=oe,_t=Object.defineProperty,jt=function(e,t){try{_t(xt,e,{value:t,configurable:!0,writable:!0})}catch(r){xt[e]=t}return t},kt=oe,Tt=jt,At="__core-js_shared__",Mt=It.exports=kt[At]||Tt(At,{});(Mt.versions||(Mt.versions=[])).push({version:"3.36.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Rt=It.exports,Lt=Rt,Ct=function(e,t){return Lt[e]||(Lt[e]=t||{})},Nt=Ne,Dt=Object,Ut=function(e){return Dt(Nt(e))},$t=Ut,Bt=Pe({}.hasOwnProperty),Ft=Object.hasOwn||function(e,t){return Bt($t(e),t)},Wt=Pe,Gt=0,Kt=Math.random(),zt=Wt(1..toString),Ht=function(e){return"Symbol("+(void 0===e?"":e)+")_"+zt(++Gt+Kt,36)},Vt=Ct,qt=Ft,Yt=Ht,Zt=it,Jt=at,Xt=oe.Symbol,Qt=Vt("wks"),er=Jt?Xt.for||Xt:Xt&&Xt.withoutSetter||Yt,tr=function(e){return qt(Qt,e)||(Qt[e]=Zt&&qt(Xt,e)?Xt[e]:er("Symbol."+e)),Qt[e]},rr=fe,nr=Ge,or=ft,ir=wt,ar=TypeError,ur=tr("toPrimitive"),cr=function(e,t){if(!nr(e)||or(e))return e;var r,n=ir(e,ur);if(n){if(void 0===t&&(t="default"),r=rr(n,e,t),!nr(r)||or(r))return r;throw new ar("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&St(r=e.toString)&&!Pt(n=Et(r,e)))return n;if(St(r=e.valueOf)&&!Pt(n=Et(r,e)))return n;if("string"!==t&&St(r=e.toString)&&!Pt(n=Et(r,e)))return n;throw new Ot("Can't convert object to primitive value")}(e,t)},sr=ft,lr=function(e){var t=cr(e,"string");return sr(t)?t:t+""},fr=Ge,pr=oe.document,dr=fr(pr)&&fr(pr.createElement),hr=function(e){return dr?pr.createElement(e):{}},vr=hr,yr=!ue&&!ae((function(){return 7!==Object.defineProperty(vr("div"),"a",{get:function(){return 7}}).a})),gr=ue,mr=fe,br=pe,wr=me,Er=$e,Sr=lr,Pr=Ft,Or=yr,Ir=Object.getOwnPropertyDescriptor;ie.f=gr?Ir:function(e,t){if(e=Er(e),t=Sr(t),Or)try{return Ir(e,t)}catch(e){}if(Pr(e,t))return wr(!mr(br.f,e,t),e[t])};var xr={},_r=ue&&ae((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),jr=Ge,kr=String,Tr=TypeError,Ar=function(e){if(jr(e))return e;throw new Tr(kr(e)+" is not an object")},Mr=ue,Rr=yr,Lr=_r,Cr=Ar,Nr=lr,Dr=TypeError,Ur=Object.defineProperty,$r=Object.getOwnPropertyDescriptor,Br="enumerable",Fr="configurable",Wr="writable";xr.f=Mr?Lr?function(e,t,r){if(Cr(e),t=Nr(t),Cr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Wr in r&&!r[Wr]){var n=$r(e,t);n&&n[Wr]&&(e[t]=r.value,r={configurable:Fr in r?r[Fr]:n[Fr],enumerable:Br in r?r[Br]:n[Br],writable:!1})}return Ur(e,t,r)}:Ur:function(e,t,r){if(Cr(e),t=Nr(t),Cr(r),Rr)try{return Ur(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Dr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Gr=xr,Kr=me,zr=ue?function(e,t,r){return Gr.f(e,t,Kr(1,r))}:function(e,t,r){return e[t]=r,e},Hr={exports:{}},Vr=ue,qr=Ft,Yr=Function.prototype,Zr=Vr&&Object.getOwnPropertyDescriptor,Jr=qr(Yr,"name"),Xr={EXISTS:Jr,PROPER:Jr&&"something"===function(){}.name,CONFIGURABLE:Jr&&(!Vr||Vr&&Zr(Yr,"name").configurable)},Qr=Fe,en=Rt,tn=Pe(Function.toString);Qr(en.inspectSource)||(en.inspectSource=function(e){return tn(e)});var rn,nn,on,an=en.inspectSource,un=Fe,cn=oe.WeakMap,sn=un(cn)&&/native code/.test(String(cn)),ln=Ht,fn=Ct("keys"),pn=function(e){return fn[e]||(fn[e]=ln(e))},dn={},hn=sn,vn=oe,yn=Ge,gn=zr,mn=Ft,bn=Rt,wn=pn,En=dn,Sn="Object already initialized",Pn=vn.TypeError,On=vn.WeakMap;if(hn||bn.state){var In=bn.state||(bn.state=new On);In.get=In.get,In.has=In.has,In.set=In.set,rn=function(e,t){if(In.has(e))throw new Pn(Sn);return t.facade=e,In.set(e,t),t},nn=function(e){return In.get(e)||{}},on=function(e){return In.has(e)}}else{var xn=wn("state");En[xn]=!0,rn=function(e,t){if(mn(e,xn))throw new Pn(Sn);return t.facade=e,gn(e,xn,t),t},nn=function(e){return mn(e,xn)?e[xn]:{}},on=function(e){return mn(e,xn)}}var _n={set:rn,get:nn,has:on,enforce:function(e){return on(e)?nn(e):rn(e,{})},getterFor:function(e){return function(t){var r;if(!yn(t)||(r=nn(t)).type!==e)throw new Pn("Incompatible receiver, "+e+" required");return r}}},jn=Pe,kn=ae,Tn=Fe,An=Ft,Mn=ue,Rn=Xr.CONFIGURABLE,Ln=an,Cn=_n.enforce,Nn=_n.get,Dn=String,Un=Object.defineProperty,$n=jn("".slice),Bn=jn("".replace),Fn=jn([].join),Wn=Mn&&!kn((function(){return 8!==Un((function(){}),"length",{value:8}).length})),Gn=String(String).split("String"),Kn=Hr.exports=function(e,t,r){"Symbol("===$n(Dn(t),0,7)&&(t="["+Bn(Dn(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!An(e,"name")||Rn&&e.name!==t)&&(Mn?Un(e,"name",{value:t,configurable:!0}):e.name=t),Wn&&r&&An(r,"arity")&&e.length!==r.arity&&Un(e,"length",{value:r.arity});try{r&&An(r,"constructor")&&r.constructor?Mn&&Un(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Cn(e);return An(n,"source")||(n.source=Fn(Gn,"string"==typeof t?t:"")),e};Function.prototype.toString=Kn((function(){return Tn(this)&&Nn(this).source||Ln(this)}),"toString");var zn=Hr.exports,Hn=Fe,Vn=xr,qn=zn,Yn=jt,Zn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Hn(r)&&qn(r,i,n),n.global)o?e[t]=r:Yn(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:Vn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Jn={},Xn=Math.ceil,Qn=Math.floor,eo=Math.trunc||function(e){var t=+e;return(t>0?Qn:Xn)(t)},to=function(e){var t=+e;return t!=t||0===t?0:eo(t)},ro=to,no=Math.max,oo=Math.min,io=to,ao=Math.min,uo=function(e){var t=io(e);return t>0?ao(t,9007199254740991):0},co=uo,so=function(e){return co(e.length)},lo=$e,fo=so,po=function(e){return function(t,r,n){var o=lo(t),i=fo(o);if(0===i)return!e&&-1;var a,u=function(e,t){var r=ro(e);return r<0?no(r+t,0):oo(r,t)}(n,i);if(e&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((e||u in o)&&o[u]===r)return e||u||0;return!e&&-1}},ho={includes:po(!0),indexOf:po(!1)},vo=Ft,yo=$e,go=ho.indexOf,mo=dn,bo=Pe([].push),wo=function(e,t){var r,n=yo(e),o=0,i=[];for(r in n)!vo(mo,r)&&vo(n,r)&&bo(i,r);for(;t.length>o;)vo(n,r=t[o++])&&(~go(i,r)||bo(i,r));return i},Eo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],So=wo,Po=Eo.concat("length","prototype");Jn.f=Object.getOwnPropertyNames||function(e){return So(e,Po)};var Oo={};Oo.f=Object.getOwnPropertySymbols;var Io=He,xo=Jn,_o=Oo,jo=Ar,ko=Pe([].concat),To=Io("Reflect","ownKeys")||function(e){var t=xo.f(jo(e)),r=_o.f;return r?ko(t,r(e)):t},Ao=Ft,Mo=To,Ro=ie,Lo=xr,Co=function(e,t,r){for(var n=Mo(t),o=Lo.f,i=Ro.f,a=0;a<n.length;a++){var u=n[a];Ao(e,u)||r&&Ao(r,u)||o(e,u,i(t,u))}},No=ae,Do=Fe,Uo=/#|\.prototype\./,$o=function(e,t){var r=Fo[Bo(e)];return r===Go||r!==Wo&&(Do(t)?No(t):!!t)},Bo=$o.normalize=function(e){return String(e).replace(Uo,".").toLowerCase()},Fo=$o.data={},Wo=$o.NATIVE="N",Go=$o.POLYFILL="P",Ko=$o,zo=oe,Ho=ie.f,Vo=zr,qo=Zn,Yo=jt,Zo=Co,Jo=Ko,Xo=function(e,t){var r,n,o,i,a,u=e.target,c=e.global,s=e.stat;if(r=c?zo:s?zo[u]||Yo(u,{}):zo[u]&&zo[u].prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=Ho(r,n))&&a.value:r[n],!Jo(c?n:u+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Zo(i,o)}(e.sham||o&&o.sham)&&Vo(i,"sham",!0),qo(r,n,i,e)}},Qo=ce,ei=Function.prototype,ti=ei.apply,ri=ei.call,ni="object"==typeof Reflect&&Reflect.apply||(Qo?ri.bind(ti):function(){return ri.apply(ti,arguments)}),oi=Pe,ii=gt,ai=Ge,ui=String,ci=TypeError,si=Ge,li=Ne,fi=function(e){if(function(e){return ai(e)||null===e}(e))return e;throw new ci("Can't set "+ui(e)+" as a prototype")},pi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=function(e,t,r){try{return oi(ii(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return li(r),fi(n),si(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),di=xr.f,hi=Fe,vi=Ge,yi=pi,gi={};gi[tr("toStringTag")]="z";var mi="[object z]"===String(gi),bi=Fe,wi=_e,Ei=tr("toStringTag"),Si=Object,Pi="Arguments"===wi(function(){return arguments}()),Oi=mi?wi:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Si(e),Ei))?r:Pi?wi(t):"Object"===(n=wi(t))&&bi(t.callee)?"Arguments":n},Ii=Oi,xi=String,_i=function(e){if("Symbol"===Ii(e))throw new TypeError("Cannot convert a Symbol value to a string");return xi(e)},ji=_i,ki=Ge,Ti=zr,Ai=Error,Mi=Pe("".replace),Ri=String(new Ai("zxcasd").stack),Li=/\n\s*at [^:]*:[^\n]*/,Ci=Li.test(Ri),Ni=me,Di=!ae((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ni(1,7)),7!==e.stack)})),Ui=zr,$i=Di,Bi=Error.captureStackTrace,Fi=He,Wi=Ft,Gi=zr,Ki=Ve,zi=pi,Hi=Co,Vi=function(e,t,r){r in e||di(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},qi=function(e,t,r,n){$i&&(Bi?Bi(e,t):Ui(e,"stack",function(e,t){if(Ci&&"string"==typeof e&&!Ai.prepareStackTrace)for(;t--;)e=Mi(e,Li,"");return e}(r,n)))},Yi=ue,Zi=Xo,Ji=ni,Xi=function(e,t,r,n){var o="stackTraceLimit",i=n?2:1,a=e.split("."),u=a[a.length-1],c=Fi.apply(null,a);if(c){var s=c.prototype;if(Wi(s,"cause")&&delete s.cause,!r)return c;var l=Fi("Error"),f=t((function(e,t){var r,o,a,u,l,p,d,h=function(e,t){return void 0===e?arguments.length<2?"":t:ji(e)}(n?t:e,void 0),v=n?new c(e):new c;return void 0!==h&&Gi(v,"message",h),qi(v,f,v.stack,2),this&&Ki(s,this)&&(a=v,u=this,l=f,yi&&hi(p=u.constructor)&&p!==l&&vi(d=p.prototype)&&d!==l.prototype&&yi(a,d)),arguments.length>i&&(r=v,ki(o=arguments[i])&&"cause"in o&&Ti(r,"cause",o.cause)),v}));f.prototype=s,"Error"!==u?zi?zi(f,l):Hi(f,l,{name:!0}):Yi&&o in c&&(Vi(f,c,o),Vi(f,c,"prepareStackTrace")),Hi(f,c);try{s.name!==u&&Gi(s,"name",u),s.constructor=f}catch(e){}return f}},Qi="WebAssembly",ea=oe[Qi],ta=7!==new Error("e",{cause:7}).cause,ra=function(e,t){var r={};r[e]=Xi(e,t,ta),Zi({global:!0,constructor:!0,arity:1,forced:ta},r)},na=function(e,t){if(ea&&ea[e]){var r={};r[e]=Xi(Qi+"."+e,t,ta),Zi({target:Qi,stat:!0,constructor:!0,arity:1,forced:ta},r)}};ra("Error",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("EvalError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("RangeError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("ReferenceError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("SyntaxError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("TypeError",(function(e){return function(t){return Ji(e,this,arguments)}})),ra("URIError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("CompileError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("LinkError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("RuntimeError",(function(e){return function(t){return Ji(e,this,arguments)}})),Error;var oa=_e,ia=ue,aa=Array.isArray||function(e){return"Array"===oa(e)},ua=TypeError,ca=Object.getOwnPropertyDescriptor,sa=ia&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),la=TypeError,fa=Ut,pa=so,da=sa?function(e,t){if(aa(e)&&!ca(e,"length").writable)throw new ua("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t};Xo({target:"Array",proto:!0,arity:1,forced:ae((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=fa(this),r=pa(t),n=arguments.length;!function(e){if(e>9007199254740991)throw la("Maximum allowed index exceeded")}(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return da(t,r),r}});var ha=wo,va=Eo,ya=Object.keys||function(e){return ha(e,va)},ga=ue,ma=Pe,ba=fe,wa=ae,Ea=ya,Sa=Oo,Pa=pe,Oa=Ut,Ia=Me,xa=Object.assign,_a=Object.defineProperty,ja=ma([].concat),ka=!xa||wa((function(){if(ga&&1!==xa({b:1},xa(_a({},"a",{enumerable:!0,get:function(){_a(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==xa({},e)[r]||Ea(xa({},t)).join("")!==n}))?function(e,t){for(var r=Oa(e),n=arguments.length,o=1,i=Sa.f,a=Pa.f;n>o;)for(var u,c=Ia(arguments[o++]),s=i?ja(Ea(c),i(c)):Ea(c),l=s.length,f=0;l>f;)u=s[f++],ga&&!ba(a,c,u)||(r[u]=c[u]);return r}:xa,Ta=ka;Xo({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ta},{assign:Ta});var Aa={},Ma=ue,Ra=_r,La=xr,Ca=Ar,Na=$e,Da=ya;Aa.f=Ma&&!Ra?Object.defineProperties:function(e,t){Ca(e);for(var r,n=Na(t),o=Da(t),i=o.length,a=0;i>a;)La.f(e,r=o[a++],n[r]);return e};var Ua,$a=He("document","documentElement"),Ba=Ar,Fa=Aa,Wa=Eo,Ga=dn,Ka=$a,za=hr,Ha="prototype",Va="script",qa=pn("IE_PROTO"),Ya=function(){},Za=function(e){return"<"+Va+">"+e+"</"+Va+">"},Ja=function(e){e.write(Za("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xa=function(){try{Ua=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Xa="undefined"!=typeof document?document.domain&&Ua?Ja(Ua):(t=za("iframe"),r="java"+Va+":",t.style.display="none",Ka.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Za("document.F=Object")),e.close(),e.F):Ja(Ua);for(var n=Wa.length;n--;)delete Xa[Ha][Wa[n]];return Xa()};Ga[qa]=!0;var Qa=Object.create||function(e,t){var r;return null!==e?(Ya[Ha]=Ba(e),r=new Ya,Ya[Ha]=null,r[qa]=e):r=Xa(),void 0===t?r:Fa.f(r,t)},eu=tr,tu=Qa,ru=xr.f,nu=eu("unscopables"),ou=Array.prototype;void 0===ou[nu]&&ru(ou,nu,{configurable:!0,value:tu(null)});var iu,au=ho.includes;Xo({target:"Array",proto:!0,forced:ae((function(){return!Array(1).includes()}))},{includes:function(e){return au(this,e,arguments.length>1?arguments[1]:void 0)}}),iu="includes",ou[nu][iu]=!0;var uu,cu="\t\n\v\f\r \u2028\u2029\ufeff",su=Ne,lu=_i,fu=cu,pu=Pe("".replace),du=RegExp("^["+fu+"]+"),hu=RegExp("(^|[^"+fu+"])["+fu+"]+$"),vu=function(e){return function(t){var r=lu(su(t));return 1&e&&(r=pu(r,du,"")),2&e&&(r=pu(r,hu,"$1")),r}},yu={start:vu(1),end:vu(2),trim:vu(3)},gu=Xr.PROPER,mu=cu,bu=yu.trim;Xo({target:"String",proto:!0,forced:(uu="trim",ae((function(){return!!mu[uu]()||"
"!=="
"[uu]()||gu&&mu[uu].name!==uu})))},{trim:function(){return bu(this)}});var wu,Eu,Su=Ar,Pu=ae,Ou=oe.RegExp,Iu=Pu((function(){var e=Ou("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),xu=Iu||Pu((function(){return!Ou("a","y").sticky})),_u={BROKEN_CARET:Iu||Pu((function(){var e=Ou("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:xu,UNSUPPORTED_Y:Iu},ju=ae,ku=oe.RegExp,Tu=ju((function(){var e=ku(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),Au=ae,Mu=oe.RegExp,Ru=Au((function(){var e=Mu("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Lu=fe,Cu=Pe,Nu=_i,Du=function(){var e=Su(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Uu=_u,$u=Qa,Bu=_n.get,Fu=Tu,Wu=Ru,Gu=Ct("native-string-replace",String.prototype.replace),Ku=RegExp.prototype.exec,zu=Ku,Hu=Cu("".charAt),Vu=Cu("".indexOf),qu=Cu("".replace),Yu=Cu("".slice),Zu=(Eu=/b*/g,Lu(Ku,wu=/a/,"a"),Lu(Ku,Eu,"a"),0!==wu.lastIndex||0!==Eu.lastIndex),Ju=Uu.BROKEN_CARET,Xu=void 0!==/()??/.exec("")[1];(Zu||Xu||Ju||Fu||Wu)&&(zu=function(e){var t,r,n,o,i,a,u,c=this,s=Bu(c),l=Nu(e),f=s.raw;if(f)return f.lastIndex=c.lastIndex,t=Lu(zu,f,l),c.lastIndex=f.lastIndex,t;var p=s.groups,d=Ju&&c.sticky,h=Lu(Du,c),v=c.source,y=0,g=l;if(d&&(h=qu(h,"y",""),-1===Vu(h,"g")&&(h+="g"),g=Yu(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Hu(l,c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",h)),Xu&&(r=new RegExp("^"+v+"$(?!\\s)",h)),Zu&&(n=c.lastIndex),o=Lu(Ku,d?r:c,g),d?o?(o.input=Yu(o.input,y),o[0]=Yu(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Zu&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Xu&&o&&o.length>1&&Lu(Gu,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=$u(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Qu=zu;Xo({target:"RegExp",proto:!0,forced:/./.exec!==Qu},{exec:Qu});var ec=fe,tc=Zn,rc=Qu,nc=ae,oc=tr,ic=zr,ac=oc("species"),uc=RegExp.prototype,cc=function(e,t,r,n){var o=oc(e),i=!nc((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!nc((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[ac]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var u=/./[o],c=t(o,""[e],(function(e,t,r,n,o){var a=t.exec;return a===rc||a===uc.exec?i&&!o?{done:!0,value:ec(u,t,r,n)}:{done:!0,value:ec(e,r,t,n)}:{done:!1}}));tc(String.prototype,e,c[0]),tc(uc,o,c[1])}n&&ic(uc[o],"sham",!0)},sc=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},lc=fe,fc=Ar,pc=Fe,dc=_e,hc=Qu,vc=TypeError,yc=function(e,t){var r=e.exec;if(pc(r)){var n=lc(r,e,t);return null!==n&&fc(n),n}if("RegExp"===dc(e))return lc(hc,e,t);throw new vc("RegExp#exec called on incompatible receiver")},gc=fe,mc=Ar,bc=Re,wc=Ne,Ec=sc,Sc=_i,Pc=wt,Oc=yc;cc("search",(function(e,t,r){return[function(t){var r=wc(this),n=bc(t)?void 0:Pc(t,e);return n?gc(n,t,r):new RegExp(t)[e](Sc(r))},function(e){var n=mc(this),o=Sc(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;Ec(a,0)||(n.lastIndex=0);var u=Oc(n,o);return Ec(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]}));const Ic=e=>{const t=window.location.search.substr(1).split("&"),r=`${e}=`,n=t.filter((e=>e.search(r)>=0));return n.length>0?n[0].substring(n[0].search(r)+r.length):""};let xc="true"===Ic("unisphereVerbose")?"log":Ic("unisphereVerbose")||"";const _c=["log","debug"].includes(xc)?xc:"warn",jc=Ic("unisphereEnvironment")||"prod";let kc=localStorage.getItem("unisphereDevLoader")||null;const Tc=Ic("unispherePresets")||null,Ac={logLevel:_c,loaderUrl:kc,verbose:xc,environment:"dev"===jc?"dev":"prod",presets:Tc?Tc.split(",").map((e=>e.trim())):null},Mc=()=>Ac;let Rc=window.unisphere;function Lc(e,t,r){return e in Rc?{value:Rc[e],isNew:!1}:(null==t||t.debug(`${e} not found on 'window.unisphere', creating with default value`,{data:{defaultValue:r}}),Rc[e]=r,{value:r,isNew:!0})}"unisphere"in window||(Rc=window.unisphere={});const Cc={logToConsole:!0,logLevel:Mc().logLevel};class Nc{static createWorkspaceLogger(e){return new Nc(e)}kill(){this._killed=!0}constructor(e){this.workspaceName=e,this._killed=!1,this._settings=Object.assign({},Cc)}getLogger(e){return this._killed&&console.warn("Logger factory is killed, returning a new logger anyway"),new Dc(this.workspaceName,e,this.getSettings.bind(this))}getSettings(){return this._settings}updateSettings(e){this._settings=Object.assign(Object.assign({},this._settings),e)}}class Dc{constructor(e,t,r){this.workspaceName=e,this.runtime=t,this._getSettings=r;const n=function(){const{value:e}=Lc("loggers",null,{interceptors:[],logMessages:[]});return e}();this._globalLoggers=n}logMessage(e,t,r,n){const o={workspaceName:this.workspaceName,runtime:this.runtime,time:(new Date).toISOString(),message:t,data:r,error:n,level:e},i=this._getSettings();if(this._globalLoggers.logMessages.push(o),this._globalLoggers.interceptors.forEach((e=>{e(o)})),i.logToConsole&&this.shouldLog(e,i.logLevel)){const t=`${o.time} [Unisphere.${o.runtime}] ${o.message}`;switch(e){case"debug":console.debug(t,o.data);break;case"log":console.log(t,o.data);break;case"warn":console.warn(t,o.data);break;case"error":console.error(t,{data:o.data,error:o.error})}}}shouldLog(e,t){const r=["debug","log","warn","error"];return r.indexOf(e)>=r.indexOf(t)}log(e,t){this.logMessage("log",e,null==t?void 0:t.data)}debug(e,t){this.logMessage("debug",e,null==t?void 0:t.data)}warn(e,t){this.logMessage("warn",e,null==t?void 0:t.data)}error(e,t){this.logMessage("error",e,null==t?void 0:t.data,null==t?void 0:t.error)}}var Uc,$c=_e,Bc=Pe,Fc=function(e){if("Function"===$c(e))return Bc(e)},Wc=Ge,Gc=_e,Kc=tr("match"),zc=TypeError,Hc=function(e){if(function(e){var t;return Wc(e)&&(void 0!==(t=e[Kc])?!!t:"RegExp"===Gc(e))}(e))throw new zc("The method doesn't accept regular expressions");return e},Vc=tr("match"),qc=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Vc]=!1,"/./"[e](t)}catch(e){}}return!1},Yc=Xo,Zc=Fc,Jc=ie.f,Xc=uo,Qc=_i,es=Hc,ts=Ne,rs=qc,ns=Zc("".slice),os=Math.min,is=rs("startsWith");function as(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))}Yc({target:"String",proto:!0,forced:!(!is&&(Uc=Jc(String.prototype,"startsWith"),Uc&&!Uc.writable)||is)},{startsWith:function(e){var t=Qc(ts(this));es(e);var r=Xc(os(arguments.length>1?arguments[1]:void 0,t.length)),n=Qc(e);return ns(t,r,r+n.length)===n}}),"function"==typeof SuppressedError&&SuppressedError;var us="process"===_e(oe.process),cs=xr.f,ss=Ft,ls=tr("toStringTag"),fs=zn,ps=xr,ds=He,hs=ue,vs=tr("species"),ys=Ve,gs=TypeError,ms=Pe,bs=ae,ws=Fe,Es=Oi,Ss=an,Ps=function(){},Os=He("Reflect","construct"),Is=/^\s*(?:class|function)\b/,xs=ms(Is.exec),_s=!Is.test(Ps),js=function(e){if(!ws(e))return!1;try{return Os(Ps,[],e),!0}catch(e){return!1}},ks=function(e){if(!ws(e))return!1;switch(Es(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _s||!!xs(Is,Ss(e))}catch(e){return!0}};ks.sham=!0;var Ts,As,Ms,Rs,Ls=!Os||bs((function(){var e;return js(js.call)||!js(Object)||!js((function(){e=!0}))||e}))?ks:js,Cs=Ls,Ns=dt,Ds=TypeError,Us=Ar,$s=Re,Bs=tr("species"),Fs=gt,Ws=ce,Gs=Fc(Fc.bind),Ks=function(e,t){return Fs(e),void 0===t?e:Ws?Gs(e,t):function(){return e.apply(t,arguments)}},zs=Pe([].slice),Hs=TypeError,Vs=/(?:ipad|iphone|ipod).*applewebkit/i.test(qe),qs=oe,Ys=ni,Zs=Ks,Js=Fe,Xs=Ft,Qs=ae,el=$a,tl=zs,rl=hr,nl=Vs,ol=us,il=qs.setImmediate,al=qs.clearImmediate,ul=qs.process,cl=qs.Dispatch,sl=qs.Function,ll=qs.MessageChannel,fl=qs.String,pl=0,dl={},hl="onreadystatechange";Qs((function(){Ts=qs.location}));var vl=function(e){if(Xs(dl,e)){var t=dl[e];delete dl[e],t()}},yl=function(e){return function(){vl(e)}},gl=function(e){vl(e.data)},ml=function(e){qs.postMessage(fl(e),Ts.protocol+"//"+Ts.host)};il&&al||(il=function(e){!function(e,t){if(e<t)throw new Hs("Not enough arguments")}(arguments.length,1);var t=Js(e)?e:sl(e),r=tl(arguments,1);return dl[++pl]=function(){Ys(t,void 0,r)},As(pl),pl},al=function(e){delete dl[e]},ol?As=function(e){ul.nextTick(yl(e))}:cl&&cl.now?As=function(e){cl.now(yl(e))}:ll&&!nl?(Rs=(Ms=new ll).port2,Ms.port1.onmessage=gl,As=Zs(Rs.postMessage,Rs)):qs.addEventListener&&Js(qs.postMessage)&&!qs.importScripts&&Ts&&"file:"!==Ts.protocol&&!Qs(ml)?(As=ml,qs.addEventListener("message",gl,!1)):As=hl in rl("script")?function(e){el.appendChild(rl("script"))[hl]=function(){el.removeChild(this),vl(e)}}:function(e){setTimeout(yl(e),0)});var bl={set:il,clear:al},wl=oe,El=ue,Sl=Object.getOwnPropertyDescriptor,Pl=function(){this.head=null,this.tail=null};Pl.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Ol,Il,xl,_l,jl,kl=Pl,Tl=/ipad|iphone|ipod/i.test(qe)&&"undefined"!=typeof Pebble,Al=/web0s(?!.*chrome)/i.test(qe),Ml=oe,Rl=Ks,Ll=bl.set,Cl=kl,Nl=Vs,Dl=Tl,Ul=Al,$l=us,Bl=Ml.MutationObserver||Ml.WebKitMutationObserver,Fl=Ml.document,Wl=Ml.process,Gl=Ml.Promise,Kl=function(e){if(!El)return wl[e];var t=Sl(wl,e);return t&&t.value}("queueMicrotask");if(!Kl){var zl=new Cl,Hl=function(){var e,t;for($l&&(e=Wl.domain)&&e.exit();t=zl.get();)try{t()}catch(e){throw zl.head&&Ol(),e}e&&e.enter()};Nl||$l||Ul||!Bl||!Fl?!Dl&&Gl&&Gl.resolve?((_l=Gl.resolve(void 0)).constructor=Gl,jl=Rl(_l.then,_l),Ol=function(){jl(Hl)}):$l?Ol=function(){Wl.nextTick(Hl)}:(Ll=Rl(Ll,Ml),Ol=function(){Ll(Hl)}):(Il=!0,xl=Fl.createTextNode(""),new Bl(Hl).observe(xl,{characterData:!0}),Ol=function(){xl.data=Il=!Il}),Kl=function(e){zl.head||Ol(),zl.add(e)}}var Vl=Kl,ql=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Yl=oe.Promise,Zl="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Jl=!Zl&&!us&&"object"==typeof window&&"object"==typeof document,Xl=oe,Ql=Yl,ef=Fe,tf=Ko,rf=an,nf=tr,of=Jl,af=Zl,uf=tt;Ql&&Ql.prototype;var cf=nf("species"),sf=!1,lf=ef(Xl.PromiseRejectionEvent),ff=tf("Promise",(function(){var e=rf(Ql),t=e!==String(Ql);if(!t&&66===uf)return!0;if(!uf||uf<51||!/native code/.test(e)){var r=new Ql((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[cf]=n,!(sf=r.then((function(){}))instanceof n))return!0}return!t&&(of||af)&&!lf})),pf={CONSTRUCTOR:ff,REJECTION_EVENT:lf,SUBCLASSING:sf},df={},hf=gt,vf=TypeError,yf=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new vf("Bad Promise constructor");t=e,r=n})),this.resolve=hf(t),this.reject=hf(r)};df.f=function(e){return new yf(e)};var gf,mf,bf,wf,Ef,Sf,Pf,Of=Xo,If=us,xf=oe,_f=fe,jf=Zn,kf=pi,Tf=gt,Af=Fe,Mf=Ge,Rf=function(e,t){var r,n=Us(e).constructor;return void 0===n||$s(r=Us(n)[Bs])?t:function(e){if(Cs(e))return e;throw new Ds(Ns(e)+" is not a constructor")}(r)},Lf=bl.set,Cf=Vl,Nf=ql,Df=kl,Uf=_n,$f=Yl,Bf=df,Ff="Promise",Wf=pf.CONSTRUCTOR,Gf=pf.REJECTION_EVENT,Kf=pf.SUBCLASSING,zf=Uf.getterFor(Ff),Hf=Uf.set,Vf=$f&&$f.prototype,qf=$f,Yf=Vf,Zf=xf.TypeError,Jf=xf.document,Xf=xf.process,Qf=Bf.f,ep=Qf,tp=!!(Jf&&Jf.createEvent&&xf.dispatchEvent),rp="unhandledrejection",np=function(e){var t;return!(!Mf(e)||!Af(t=e.then))&&t},op=function(e,t){var r,n,o,i=t.value,a=1===t.state,u=a?e.ok:e.fail,c=e.resolve,s=e.reject,l=e.domain;try{u?(a||(2===t.rejection&&sp(t),t.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===e.promise?s(new Zf("Promise-chain cycle")):(n=np(r))?_f(n,r,c,s):c(r)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},ip=function(e,t){e.notified||(e.notified=!0,Cf((function(){for(var r,n=e.reactions;r=n.get();)op(r,e);e.notified=!1,t&&!e.rejection&&up(e)})))},ap=function(e,t,r){var n,o;tp?((n=Jf.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),xf.dispatchEvent(n)):n={promise:t,reason:r},!Gf&&(o=xf["on"+e])?o(n):e===rp&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},up=function(e){_f(Lf,xf,(function(){var t,r=e.facade,n=e.value;if(cp(e)&&(t=Nf((function(){If?Xf.emit("unhandledRejection",n,r):ap(rp,r,n)})),e.rejection=If||cp(e)?2:1,t.error))throw t.value}))},cp=function(e){return 1!==e.rejection&&!e.parent},sp=function(e){_f(Lf,xf,(function(){var t=e.facade;If?Xf.emit("rejectionHandled",t):ap("rejectionhandled",t,e.value)}))},lp=function(e,t,r){return function(n){e(t,n,r)}},fp=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,ip(e,!0))},pp=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new Zf("Promise can't be resolved itself");var n=np(t);n?Cf((function(){var r={done:!1};try{_f(n,t,lp(pp,r,e),lp(fp,r,e))}catch(t){fp(r,t,e)}})):(e.value=t,e.state=1,ip(e,!1))}catch(t){fp({done:!1},t,e)}}};if(Wf&&(Yf=(qf=function(e){(function(e,t){if(ys(t,e))return e;throw new gs("Incorrect invocation")})(this,Yf),Tf(e),_f(gf,this);var t=zf(this);try{e(lp(pp,t),lp(fp,t))}catch(e){fp(t,e)}}).prototype,(gf=function(e){Hf(this,{type:Ff,done:!1,notified:!1,parent:!1,reactions:new Df,rejection:!1,state:0,value:void 0})}).prototype=jf(Yf,"then",(function(e,t){var r=zf(this),n=Qf(Rf(this,qf));return r.parent=!0,n.ok=!Af(e)||e,n.fail=Af(t)&&t,n.domain=If?Xf.domain:void 0,0===r.state?r.reactions.add(n):Cf((function(){op(n,r)})),n.promise})),mf=function(){var e=new gf,t=zf(e);this.promise=e,this.resolve=lp(pp,t),this.reject=lp(fp,t)},Bf.f=Qf=function(e){return e===qf||void 0===e?new mf(e):ep(e)},Af($f)&&Vf!==Object.prototype)){bf=Vf.then,Kf||jf(Vf,"then",(function(e,t){var r=this;return new qf((function(e,t){_f(bf,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Vf.constructor}catch(e){}kf&&kf(Vf,Yf)}Of({global:!0,constructor:!0,wrap:!0,forced:Wf},{Promise:qf}),Sf=Ff,Pf=!1,(Ef=qf)&&!Pf&&(Ef=Ef.prototype),Ef&&!ss(Ef,ls)&&cs(Ef,ls,{configurable:!0,value:Sf}),wf=ds(Ff),hs&&wf&&!wf[vs]&&function(e,t,r){r.get&&fs(r.get,t,{getter:!0}),r.set&&fs(r.set,t,{setter:!0}),ps.f(e,t,r)}(wf,vs,{configurable:!0,get:function(){return this}});var dp={},hp=dp,vp=tr("iterator"),yp=Array.prototype,gp=Oi,mp=wt,bp=Re,wp=dp,Ep=tr("iterator"),Sp=function(e){if(!bp(e))return mp(e,Ep)||mp(e,"@@iterator")||wp[gp(e)]},Pp=fe,Op=gt,Ip=Ar,xp=dt,_p=Sp,jp=TypeError,kp=fe,Tp=Ar,Ap=wt,Mp=Ks,Rp=fe,Lp=Ar,Cp=dt,Np=so,Dp=Ve,Up=Sp,$p=function(e,t,r){var n,o;Tp(e);try{if(!(n=Ap(e,"return"))){if("throw"===t)throw r;return r}n=kp(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return Tp(n),r},Bp=TypeError,Fp=function(e,t){this.stopped=e,this.result=t},Wp=Fp.prototype,Gp=function(e,t,r){var n,o,i,a,u,c,s,l,f=r&&r.that,p=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Mp(t,f),g=function(e){return n&&$p(n,"normal",e),new Fp(!0,e)},m=function(e){return p?(Lp(e),v?y(e[0],e[1],g):y(e[0],e[1])):v?y(e,g):y(e)};if(d)n=e.iterator;else if(h)n=e;else{if(!(o=Up(e)))throw new Bp(Cp(e)+" is not iterable");if(void 0!==(l=o)&&(hp.Array===l||yp[vp]===l)){for(i=0,a=Np(e);a>i;i++)if((u=m(e[i]))&&Dp(Wp,u))return u;return new Fp(!1)}n=function(e,t){var r=arguments.length<2?_p(e):t;if(Op(r))return Ip(Pp(r,e));throw new jp(xp(e)+" is not iterable")}(e,o)}for(c=d?e.next:n.next;!(s=Rp(c,n)).done;){try{u=m(s.value)}catch(e){$p(n,"throw",e)}if("object"==typeof u&&u&&Dp(Wp,u))return u}return new Fp(!1)},Kp=tr("iterator"),zp=!1;try{var Hp=0,Vp={next:function(){return{done:!!Hp++}},return:function(){zp=!0}};Vp[Kp]=function(){return this},Array.from(Vp,(function(){throw 2}))}catch(e){}var qp=Yl,Yp=pf.CONSTRUCTOR||!function(e,t){try{if(!t&&!zp)return!1}catch(e){return!1}var r=!1;try{var n={};n[Kp]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}((function(e){qp.all(e).then(void 0,(function(){}))})),Zp=fe,Jp=gt,Xp=df,Qp=ql,ed=Gp;Xo({target:"Promise",stat:!0,forced:Yp},{all:function(e){var t=this,r=Xp.f(t),n=r.resolve,o=r.reject,i=Qp((function(){var r=Jp(t.resolve),i=[],a=0,u=1;ed(e,(function(e){var c=a++,s=!1;u++,Zp(r,t,e).then((function(e){s||(s=!0,i[c]=e,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var td=Xo,rd=pf.CONSTRUCTOR,nd=Yl,od=He,id=Fe,ad=Zn,ud=nd&&nd.prototype;if(td({target:"Promise",proto:!0,forced:rd,real:!0},{catch:function(e){return this.then(void 0,e)}}),id(nd)){var cd=od("Promise").prototype.catch;ud.catch!==cd&&ad(ud,"catch",cd,{unsafe:!0})}var sd=fe,ld=gt,fd=df,pd=ql,dd=Gp;Xo({target:"Promise",stat:!0,forced:Yp},{race:function(e){var t=this,r=fd.f(t),n=r.reject,o=pd((function(){var o=ld(t.resolve);dd(e,(function(e){sd(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var hd=df;Xo({target:"Promise",stat:!0,forced:pf.CONSTRUCTOR},{reject:function(e){var t=hd.f(this);return(0,t.reject)(e),t.promise}});var vd=Ar,yd=Ge,gd=df,md=Xo,bd=pf.CONSTRUCTOR;He("Promise"),md({target:"Promise",stat:!0,forced:bd},{resolve:function(e){return function(e,t){if(vd(e),yd(t)&&t.constructor===e)return t;var r=gd.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});const wd=Nc.createWorkspaceLogger("window").getLogger("fetchers"),{value:{factoriesByOwner:Ed}}=Lc("factoriesByOwner",wd,{factoriesByOwner:{}});function Sd(e){return as(this,arguments,void 0,(function*({owner:e,url:t}){let r=Ed[e];r||(wd.log(`no factories found for ${e}, creating new list`),r=[],Ed[e]=r);const n=r.find((e=>e.url===t));if(null==n?void 0:n.factoryModule)return wd.log(`using cached factory module for ${t}`),{factoryModule:n.factoryModule,error:null};const o=r.find((e=>e.url===t));if(o)return wd.log(`a request to fetch factory already in progress for ${t}, waiting for it to finish`),new Promise(((e,t)=>{o.onFetched.push(e),o.onError.push(t)}));wd.log(`fetching factory module for ${t}`);const i={url:t,factoryModule:null,error:null,onFetched:[],onError:[]};r.push(i);try{const e=yield import(t);wd.log(`fetched factory module for ${t}, caching it`),i.factoryModule=e,i.onFetched&&(wd.log(`calling onFetched callbacks for ${t} (${i.onFetched.length} queued)`),i.onFetched.forEach((r=>{try{r(e)}catch(e){wd.error(`error calling onFetched callback for ${t}`,{error:e})}}))),i.onFetched=[],i.onError=[]}catch(e){wd.log(`failed to fetch factory module for ${t}, removing from list`),i.onError&&(wd.log(`calling onError callbacks for ${t} (${i.onError.length} queued)`),i.onError.forEach((r=>{try{r(e)}catch(e){wd.error(`error calling onError callback for ${t}`,{error:e})}}))),i.onError=[],i.onFetched=[],r.splice(r.indexOf(i),1)}return{factoryModule:i.factoryModule,error:i.error}}))}const Pd=Mc(),Od=e=>as(void 0,void 0,void 0,(function*(){const t=Nc.createWorkspaceLogger(e.workspaceName||"").getLogger("fetch-loader");let r="",n="";if(Pd.loaderUrl?(t.log(`using custom loader url from query params '${Pd.loaderUrl}'`),n=Pd.loaderUrl):e.devLoaderUrl&&(t.log(`using custom loader url from options '${e.devLoaderUrl}'`),n=e.devLoaderUrl),n){t.log(`verifying custom loader url '${n}' url against environment runtime json. fetching runtime json...`);const o=yield((e,t)=>as(void 0,void 0,void 0,(function*(){let r,n=`${e}/runtime.json`;try{t.log(`loading runtime versions for env from '${n}'`),r=yield fetch(n).then((e=>e.json()))}catch(e){throw t.error(`error loading runtime versions for env from '${n}'`,{error:e}),new Error(`failed to load runtime versions for env from '${n}'`)}if(!r||!("domains"in r))throw new Error("invalid runtime json, 'domains' is missing in the runtime json");return r.domains})))(e.serverUrl,t),i=n.startsWith(e.serverUrl),a=o.some((e=>n.startsWith(e)));if(t.log("ensuring custom loader url is in environment artifacts or from an allowed domain",{data:{customLoaderUrl:n,serverUrl:e.serverUrl,isInEnvironmentArtifacts:i,isInAllowedDomains:a}}),!i&&!a)throw new Error(`the custom loader url '${n}' is not in the environment artifacts or from an allowed domain`);t.log(`using custom loader url '${n}'`),r=n}else t.log("using environment loader"),r=`${e.serverUrl}/loader/index.esm.js`;t.log("fetching environment unisphere loader",{data:{environmentLoaderUrl:r,options:e}});const{factoryModule:{loader:o}}=yield Sd({owner:"runtime-js",url:r});if(!o)throw new Error(`failed to load dev loader from '${r}'`);return t.log("executing environment unisphere loader"),o(Object.assign({},e))}));var Id=Xo,xd=Fc,_d=ie.f,jd=uo,kd=_i,Td=Hc,Ad=Ne,Md=qc,Rd=xd("".slice),Ld=Math.min,Cd=Md("endsWith"),Nd=!Cd&&!!function(){var e=_d(String.prototype,"endsWith");return e&&!e.writable}();Id({target:"String",proto:!0,forced:!Nd&&!Cd},{endsWith:function(e){var t=kd(Ad(this));Td(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,o=void 0===r?n:Ld(jd(r),n),i=kd(e);return Rd(t,o-i.length,o)===i}});var Dd=Pe,Ud=to,$d=_i,Bd=Ne,Fd=Dd("".charAt),Wd=Dd("".charCodeAt),Gd=Dd("".slice),Kd=function(e){return function(t,r){var n,o,i=$d(Bd(t)),a=Ud(r),u=i.length;return a<0||a>=u?e?"":void 0:(n=Wd(i,a))<55296||n>56319||a+1===u||(o=Wd(i,a+1))<56320||o>57343?e?Fd(i,a):n:e?Gd(i,a,a+2):o-56320+(n-55296<<10)+65536}},zd=(Kd(!1),Kd(!0)),Hd=Pe,Vd=Ut,qd=Math.floor,Yd=Hd("".charAt),Zd=Hd("".replace),Jd=Hd("".slice),Xd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Qd=/\$([$&'`]|\d{1,2})/g,eh=ni,th=fe,rh=Pe,nh=cc,oh=ae,ih=Ar,ah=Fe,uh=Re,ch=to,sh=uo,lh=_i,fh=Ne,ph=function(e,t,r){return t+(r?zd(e,t).length:1)},dh=wt,hh=function(e,t,r,n,o,i){var a=r+e.length,u=n.length,c=Qd;return void 0!==o&&(o=Vd(o),c=Xd),Zd(i,c,(function(i,c){var s;switch(Yd(c,0)){case"$":return"$";case"&":return e;case"`":return Jd(t,0,r);case"'":return Jd(t,a);case"<":s=o[Jd(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>u){var f=qd(l/10);return 0===f?i:f<=u?void 0===n[f-1]?Yd(c,1):n[f-1]+Yd(c,1):i}s=n[l-1]}return void 0===s?"":s}))},vh=yc,yh=tr("replace"),gh=Math.max,mh=Math.min,bh=rh([].concat),wh=rh([].push),Eh=rh("".indexOf),Sh=rh("".slice),Ph="$0"==="a".replace(/./,"$0"),Oh=!!/./[yh]&&""===/./[yh]("a","$0");function Ih(e){return as(this,void 0,void 0,(function*(){return(yield function(){const e=window;return new Promise((t=>{var r,n;if(null===(n=null===(r=e.unisphere)||void 0===r?void 0:r.instancesManager)||void 0===n?void 0:n.get)t(e.unisphere.instancesManager.get);else{const r=()=>{document.removeEventListener("unisphere-ready",r),t(e.unisphere.instancesManager.get)};document.addEventListener("unisphere-ready",r)}}))}())(e)}))}function xh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xh=function(){return!!e})()}nh("replace",(function(e,t,r){var n=Oh?"$":"$0";return[function(e,r){var n=fh(this),o=uh(e)?void 0:dh(e,yh);return o?th(o,e,n,r):th(t,lh(n),e,r)},function(e,o){var i=ih(this),a=lh(e);if("string"==typeof o&&-1===Eh(o,n)&&-1===Eh(o,"$<")){var u=r(t,i,a,o);if(u.done)return u.value}var c=ah(o);c||(o=lh(o));var s,l=i.global;l&&(s=i.unicode,i.lastIndex=0);for(var f,p=[];null!==(f=vh(i,a))&&(wh(p,f),l);)""===lh(f[0])&&(i.lastIndex=ph(a,sh(i.lastIndex),s));for(var d,h="",v=0,y=0;y<p.length;y++){for(var g,m=lh((f=p[y])[0]),b=gh(mh(ch(f.index),a.length),0),w=[],E=1;E<f.length;E++)wh(w,void 0===(d=f[E])?d:String(d));var S=f.groups;if(c){var P=bh([m],w,b,a);void 0!==S&&wh(P,S),g=lh(eh(o,void 0,P))}else g=hh(m,a,b,w,S,o);b>=v&&(h+=Sh(a,v,b)+g,v=b+m.length)}return h+Sh(a,v)}]}),!!oh((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Ph||Oh),Mc();var _h=function(e){function t(e,r,n){var o,a,u,c;return i(this,t),a=this,c=[e,r,n],u=f(u=t),h(o=l(a,xh()?Reflect.construct(u,c||[],f(a).constructor):u.apply(a,c)),"isReady",!1),h(o,"workspaceName",""),h(o,"shouldCreateWorkspace",!1),o.unispherePluginManager=new te(r,o.eventManager,o.logger),o.player.config.provider.unisphereLoaderUrl&&"string"==typeof o.config.workspaceName?o.workspaceName=o.config.workspaceName:(o.workspaceName=G("kaltura_player_workspace_"),o.shouldCreateWorkspace=!0),o}return d(t,e),s(t,[{key:"getWorkspace",value:(r=o(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.shouldCreateWorkspace){e.next=2;break}return e.abrupt("return",Od({serverUrl:this.player.config.provider.unisphereLoaderUrl,workspaceName:this.workspaceName,ui:{theme:"light",language:"en"}}));case 2:return e.abrupt("return",Ih(this.config.workspaceName));case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"loadMedia",value:function(){var e=this;this.isReady?(this.unispherePluginManager.updateSessionData(),this.unispherePluginManager.loadWidgets(this.config.widgets)):this.getWorkspace().then((function(t){e.unispherePluginManager.init(t,e.config.widgets),e.unispherePluginManager.updateSessionData(),e.isReady=!0})).catch((function(){e.logger.warn("Failed to load unisphere workspace",e.workspaceName)}))}},{key:"reset",value:function(){this.unispherePluginManager.reset()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.unispherePluginManager.destroy()}}],[{key:"isValid",value:function(){return!0}}]);var r}(e.BasePlugin);h(_h,"defaultConfig",{widgets:[]}),(0,e.registerPlugin)("unisphere",_h)})(),n})()));
|
|
3
3
|
//# sourceMappingURL=playkit-unisphere.js.map
|