@salutejs/jazz-sdk-electron
Version:
Jazz SDK Electron
2 lines (1 loc) • 21.8 kB
JavaScript
"use strict";var t=require("ditox"),r=require("electron"),e=require("rx-effects"),n=require("rxjs"),o=require("nrgy/mvc"),i=require("nrgy/rxjs"),u=require("nrgy");function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t){var r=function(t,r){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==a(r)?r:r+""}function f(t,r,e){return(r=c(r))in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}var s,l,p,h,y,v,d,g,b,m,_,w,O,j,E,S,L,P,x,A,k,T,D,N,C,I,R,z,F,M,Z,$,G,K,q,J,B,V,U,W,Y,H,X,Q,tt,rt,et,nt,ot,it,ut,at,ct,ft,st,lt,pt,ht,yt,vt,dt,gt,bt,mt,_t,wt,Ot,jt,Et,St,Lt,Pt,xt,At,kt,Tt,Dt,Nt,Ct="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function It(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Rt(){if(l)return s;l=1;var t="object"==a(Ct)&&Ct&&Ct.Object===Object&&Ct;return s=t}function zt(){if(h)return p;h=1;var t=Rt(),r="object"==("undefined"==typeof self?"undefined":a(self))&&self&&self.Object===Object&&self,e=t||r||Function("return this")();return p=e}function Ft(){if(v)return y;v=1;var t=zt().Symbol;return y=t}function Mt(){if(g)return d;g=1;var t=Ft(),r=Object.prototype,e=r.hasOwnProperty,n=r.toString,o=t?t.toStringTag:void 0;return d=function(t){var r=e.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(t){}var a=n.call(t);return u&&(r?t[o]=i:delete t[o]),a}}function Zt(){if(m)return b;m=1;var t=Object.prototype.toString;return b=function(r){return t.call(r)}}function $t(){if(w)return _;w=1;var t=Ft(),r=Mt(),e=Zt(),n=t?t.toStringTag:void 0;return _=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":n&&n in Object(t)?r(t):e(t)}}function Gt(){if(j)return O;return j=1,O=function(t){var r=a(t);return null!=t&&("object"==r||"function"==r)}}function Kt(){if(S)return E;S=1;var t=$t(),r=Gt();return E=function(e){if(!r(e))return!1;var n=t(e);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function qt(){if(P)return L;P=1;var t=zt()["__core-js_shared__"];return L=t}function Jt(){if(A)return x;A=1;var t,r=qt(),e=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return x=function(t){return!!e&&e in t}}function Bt(){if(T)return k;T=1;var t=Function.prototype.toString;return k=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}function Vt(){if(N)return D;N=1;var t=Kt(),r=Jt(),e=Gt(),n=Bt(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,a=i.toString,c=u.hasOwnProperty,f=RegExp("^"+a.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return D=function(i){return!(!e(i)||r(i))&&(t(i)?f:o).test(n(i))}}function Ut(){if(I)return C;return I=1,C=function(t,r){return null==t?void 0:t[r]}}function Wt(){if(z)return R;z=1;var t=Vt(),r=Ut();return R=function(e,n){var o=r(e,n);return t(o)?o:void 0}}function Yt(){if(M)return F;M=1;var t=Wt()(Object,"create");return F=t}function Ht(){if($)return Z;$=1;var t=Yt();return Z=function(){this.__data__=t?t(null):{},this.size=0}}function Xt(){if(K)return G;return K=1,G=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}}function Qt(){if(J)return q;J=1;var t=Yt(),r=Object.prototype.hasOwnProperty;return q=function(e){var n=this.__data__;if(t){var o=n[e];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(n,e)?n[e]:void 0}}function tr(){if(V)return B;V=1;var t=Yt(),r=Object.prototype.hasOwnProperty;return B=function(e){var n=this.__data__;return t?void 0!==n[e]:r.call(n,e)}}function rr(){if(W)return U;W=1;var t=Yt();return U=function(r,e){var n=this.__data__;return this.size+=this.has(r)?0:1,n[r]=t&&void 0===e?"__lodash_hash_undefined__":e,this}}function er(){if(H)return Y;H=1;var t=Ht(),r=Xt(),e=Qt(),n=tr(),o=rr();function i(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=e,i.prototype.has=n,i.prototype.set=o,Y=i}function nr(){if(Q)return X;return Q=1,X=function(){this.__data__=[],this.size=0}}function or(){if(rt)return tt;return rt=1,tt=function(t,r){return t===r||t!=t&&r!=r}}function ir(){if(nt)return et;nt=1;var t=or();return et=function(r,e){for(var n=r.length;n--;)if(t(r[n][0],e))return n;return-1}}function ur(){if(it)return ot;it=1;var t=ir(),r=Array.prototype.splice;return ot=function(e){var n=this.__data__,o=t(n,e);return!(o<0)&&(o==n.length-1?n.pop():r.call(n,o,1),--this.size,!0)}}function ar(){if(at)return ut;at=1;var t=ir();return ut=function(r){var e=this.__data__,n=t(e,r);return n<0?void 0:e[n][1]}}function cr(){if(ft)return ct;ft=1;var t=ir();return ct=function(r){return t(this.__data__,r)>-1}}function fr(){if(lt)return st;lt=1;var t=ir();return st=function(r,e){var n=this.__data__,o=t(n,r);return o<0?(++this.size,n.push([r,e])):n[o][1]=e,this}}function sr(){if(ht)return pt;ht=1;var t=nr(),r=ur(),e=ar(),n=cr(),o=fr();function i(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=e,i.prototype.has=n,i.prototype.set=o,pt=i}function lr(){if(vt)return yt;vt=1;var t=Wt()(zt(),"Map");return yt=t}function pr(){if(gt)return dt;gt=1;var t=er(),r=sr(),e=lr();return dt=function(){this.size=0,this.__data__={hash:new t,map:new(e||r),string:new t}}}function hr(){if(mt)return bt;return mt=1,bt=function(t){var r=a(t);return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t}}function yr(){if(wt)return _t;wt=1;var t=hr();return _t=function(r,e){var n=r.__data__;return t(e)?n["string"==typeof e?"string":"hash"]:n.map}}function vr(){if(jt)return Ot;jt=1;var t=yr();return Ot=function(r){var e=t(this,r).delete(r);return this.size-=e?1:0,e}}function dr(){if(St)return Et;St=1;var t=yr();return Et=function(r){return t(this,r).get(r)}}function gr(){if(Pt)return Lt;Pt=1;var t=yr();return Lt=function(r){return t(this,r).has(r)}}function br(){if(At)return xt;At=1;var t=yr();return xt=function(r,e){var n=t(this,r),o=n.size;return n.set(r,e),this.size+=n.size==o?0:1,this}}function mr(){if(Tt)return kt;Tt=1;var t=pr(),r=vr(),e=dr(),n=gr(),o=br();function i(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=e,i.prototype.has=n,i.prototype.set=o,kt=i}function _r(){if(Nt)return Dt;Nt=1;var t=mr();function r(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var o=function(){var t=arguments,r=n?n.apply(this,t):t[0],i=o.cache;if(i.has(r))return i.get(r);var u=e.apply(this,t);return o.cache=i.set(r,u)||i,u};return o.cache=new(r.Cache||t),o}return r.Cache=t,Dt=r}var wr=It(_r());function Or(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function jr(t,r){if(t){if("string"==typeof t)return Or(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Or(t,r):void 0}}function Er(t){return function(t){if(Array.isArray(t))return Or(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||jr(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sr(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,u,a=[],c=!0,f=!1;try{if(i=(e=e.call(t)).next,0===r);else for(;!(c=(n=i.call(e)).done)&&(a.push(n.value),a.length!==r);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=e.return&&(u=e.return(),Object(u)!==u))return}finally{if(f)throw o}}return a}}(t,r)||jr(t,r)||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 Lr(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function Pr(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?Lr(Object(e),!0).forEach((function(r){f(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Lr(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var xr=["debug","info","warn","error"];function Ar(t){return xr.find((function(r){return r===t}))}var kr,Tr,Dr,Nr,Cr={debug:0,info:1,warn:2,error:3},Ir=Object.create(null),Rr=(kr=1e3,Dr=-1,Nr=!1,{append:function(t){Tr||(Tr=new Array(kr)),Nr=Nr||Dr+1===kr,Tr[Dr=(Dr+1)%kr]=t},clear:function(){Tr=void 0,Dr=-1,Nr=!1},getItems:function(){if(!Tr||Dr<0)return[];var t=Nr?Tr.slice(Dr+2):[],r=Tr.slice(0,Dr+1);return[].concat(Er(t),Er(r))}});function zr(){return Rr.getItems()}var Fr,Mr,Zr=(Fr=new n.Subject,(Mr=function(t){var r=Pr(Pr({},t),{},{meta:Pr(Pr({},Ir),t.meta)});Rr.append(r),Fr.next(r)}).event$=Fr.asObservable(),Mr);function $r(t,r){return{getLogger:function(e,n){return $r("".concat(t,".").concat(e),Pr(Pr({},r),n))},withMeta:function(e){return $r(t,Pr(Pr({},r),e))},debug:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Zr({level:"debug",timestamp:Date.now(),tag:t,messages:n,meta:r})},log:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Zr({level:"info",timestamp:Date.now(),tag:t,messages:n,meta:r})},info:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Zr({level:"info",timestamp:Date.now(),tag:t,messages:n,meta:r})},warn:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Zr({level:"warn",timestamp:Date.now(),tag:t,messages:n,meta:r})},error:function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];Zr({level:"error",timestamp:Date.now(),tag:t,messages:n,meta:r})}}}function Gr(t,r){return wr((function(){return $r(t,r)}))}function Kr(t,r,e,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void e(t)}a.done?r(c):Promise.resolve(c).then(n,o)}var qr,Jr=Object.prototype,Br=Jr.hasOwnProperty,Vr="function"==typeof Symbol?Symbol:{},Ur=Vr.iterator||"@@iterator",Wr=Vr.asyncIterator||"@@asyncIterator",Yr=Vr.toStringTag||"@@toStringTag";function Hr(t,r,e,n){var o=r&&r.prototype instanceof oe?r:oe,i=Object.create(o.prototype),u=new ge(n||[]);return i._invoke=function(t,r,e){var n=Qr;return function(o,i){if(n===re)throw new Error("Generator is already running");if(n===ee){if("throw"===o)throw i;return me()}for(e.method=o,e.arg=i;;){var u=e.delegate;if(u){var a=ye(u,e);if(a){if(a===ne)continue;return a}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===Qr)throw n=ee,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=re;var c=Xr(t,r,e);if("normal"===c.type){if(n=e.done?ee:te,c.arg===ne)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n=ee,e.method="throw",e.arg=c.arg)}}}(t,e,u),i}function Xr(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}var Qr="suspendedStart",te="suspendedYield",re="executing",ee="completed",ne={};function oe(){}function ie(){}function ue(){}var ae={};ae[Ur]=function(){return this};var ce=Object.getPrototypeOf,fe=ce&&ce(ce(be([])));fe&&fe!==Jr&&Br.call(fe,Ur)&&(ae=fe);var se=ue.prototype=oe.prototype=Object.create(ae);function le(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function pe(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===ie||"GeneratorFunction"===(r.displayName||r.name))}function he(t,r){function e(n,o,i,u){var c=Xr(t[n],t,o);if("throw"!==c.type){var f=c.arg,s=f.value;return s&&"object"===a(s)&&Br.call(s,"__await")?r.resolve(s.__await).then((function(t){e("next",t,i,u)}),(function(t){e("throw",t,i,u)})):r.resolve(s).then((function(t){f.value=t,i(f)}),(function(t){return e("throw",t,i,u)}))}u(c.arg)}var n;this._invoke=function(t,o){function i(){return new r((function(r,n){e(t,o,r,n)}))}return n=n?n.then(i,i):i()}}function ye(t,r){var e=t.iterator[r.method];if(e===qr){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=qr,ye(t,r),"throw"===r.method))return ne;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return ne}var n=Xr(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,ne;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=qr),r.delegate=null,ne):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,ne)}function ve(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function de(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function ge(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(ve,this),this.reset(!0)}function be(t){if(t){var r=t[Ur];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(Br.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=qr,r.done=!0,r};return n.next=n}}return{next:me}}function me(){return{value:qr,done:!0}}ie.prototype=se.constructor=ue,ue.constructor=ie,ue[Yr]=ie.displayName="GeneratorFunction",le(he.prototype),he.prototype[Wr]=function(){return this},le(se),se[Yr]="Generator",se[Ur]=function(){return this},se.toString=function(){return"[object Generator]"},ge.prototype={constructor:ge,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=qr,this.done=!1,this.delegate=null,this.method="next",this.arg=qr,this.tryEntries.forEach(de),!t)for(var r in this)"t"===r.charAt(0)&&Br.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=qr)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return i.type="throw",i.arg=t,r.next=e,n&&(r.method="next",r.arg=qr),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var u=Br.call(o,"catchLoc"),a=Br.call(o,"finallyLoc");if(u&&a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&Br.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,ne):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),ne},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),de(e),ne}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;de(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:be(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=qr),ne}};var _e={wrap:Hr,isGeneratorFunction:pe,AsyncIterator:he,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,ue):(t.__proto__=ue,Yr in t||(t[Yr]="GeneratorFunction")),t.prototype=Object.create(se),t},awrap:function(t){return{__await:t}},async:function(t,r,e,n,o){void 0===o&&(o=Promise);var i=new he(Hr(t,r,e,n),o);return pe(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},keys:function(t){var r=[];for(var e in t)r.push(e);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}},values:be},we="JAZZ_SDK_ELECTRON_IPC_CHANNEL",Oe=o.declareController().params().apply((function(t){var r=t.scope,e=t.params.ipcRenderer,o=r.signal(),u=function(t,r){o(r)};e.on(we,u),r.onDestroy((function(){e.off(we,u)}));var a=new Map,c=function(t,r){var e=a.get(t);if(e){var n=e.get(r);n&&(n.unsubscribe(),e.delete(r),0===e.size&&a.delete(t))}},f=function(t,r,e){var n,o=a.get(t);return o?(o.get(r)||null===(n=a.get(t))||void 0===n||n.set(r,e),function(){return c(t,r)}):(a.set(t,new Map([[r,e]])),function(){return c(t,r)})};r.onDestroy((function(){a.forEach((function(t){t.forEach((function(t){t.unsubscribe()})),t.clear()})),a.clear()}));var s,l,p=function(t,r){var e=i.observe(o).pipe(n.filter((function(r){return r.type===t}))).subscribe((function(t){"payload"in t?r(t.payload):r()}));return f(t,r,e)},h={send:function(t){e.send(we,t)},once:function(t,r){var e=i.observe(o).pipe(n.filter((function(r){return r.type===t})),n.take(1)).subscribe((function(e){c(t,r),"payload"in e?r(e.payload):r()}));return f(t,r,e)},on:p,subscribe:p,addListener:function(){p.apply(void 0,arguments)},off:c,removeListener:c,__invoke:(s=_e.mark((function t(r){return _e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.invoke(we,r).then((function(t){return t.payload})));case 1:case"end":return t.stop()}}),t)})),l=function(){var t=this,r=arguments;return new Promise((function(e,n){var o=s.apply(t,r);function i(t){Kr(o,e,n,i,u,"next",t)}function u(t){Kr(o,e,n,i,u,"throw",t)}i(void 0)}))},function(t){return l.apply(this,arguments)}),withType:function(){return h}};return h})),je=t.token({key:"JAZZ_SDK_ELECTRON_PRELOAD_CONTEXT_TOKEN"}),Ee={Transport:t.token({key:"JAZZ_SDK_ELECTRON_PRELOAD_TOKENS_TRANSPORT_TOKEN"})};var Se=["destroy"];function Le(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function Pe(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?Le(Object(e),!0).forEach((function(r){f(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Le(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}function xe(t){return!t||0===Object.keys(t).length}exports.createEventBus=function(){return e.createAction()},exports.createJazzSdkElectronPreload=function(){var n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.createScope(),u={logEvent$:Zr.event$,logLevelWeight:Cr,createLoggerFactory:Gr,getLogBuffer:zr,getLogger:$r,logLevelValues:xr,logMessage:Zr,parseLogLevel:Ar}.getLogger("JAZZ_SDK_PRELOAD"),a=null!==(n=o.container)&&void 0!==n?n:t.createContainer(),c=i.createController((function(){return new Oe({ipcRenderer:r.ipcRenderer})})),f={transport:c},s={logger:u,transport:c};return a.bindValue(je,s),a.bindValue(Ee.Transport,c),i.createController((function(){return function(r){var n=r.container,o=r.plugins,i=r.defaultPlugins,u=e.createScope(),a=[].concat(Er(i),Er(o)),c=[],f=new Set;return Er(a).reverse().forEach((function(t){var r=t(),e=r.key,n=r.module;e?f.has(e)||(f.add(e),c.push({module:n,options:{scope:"scoped"}})):c.push({module:n,options:{scope:"scoped"}})})),f.clear(),t.bindModules(n,c),c.forEach((function(t){var r=t.module;n.resolve(r.token)})),{destroy:function(){u.destroy()}}}({logger:u,container:a,plugins:o.plugins||[],defaultPlugins:[]})})),r.contextBridge.exposeInMainWorld("JAZZ_SDK_ELECTRON_BRIDGE",f),{destroy:i.destroy,container:a}},exports.createModule=function(r){var e=r.factory,n=r.exports,o=r.imports,i=void 0===o?{}:o,a=r.token,c=r.name,f=Object.entries(i).reduce((function(r,e){var n=Sr(e,2),o=n[0],i=n[1];return t.isToken(i)?r.deps[o]=i:(r.imports.push(i),r.deps[o]=i.token),r}),{deps:{},imports:[]});return function(){return{module:t.declareModule({token:a,factory:function(r){var n=u.createScope(),o=e({scope:n,container:r,deps:xe(f.deps)?void 0:t.resolveValue(r,f.deps),name:c}),i=o.destroy;return Pe(Pe({},function(t,r){if(null==t)return{};var e,n,o=function(t,r){if(null==t)return{};var e={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(r.includes(n))continue;e[n]=t[n]}return e}(t,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)e=i[n],r.includes(e)||{}.propertyIsEnumerable.call(t,e)&&(o[e]=t[e])}return o}(o,Se)),{},{destroy:function(){null==i||i(),n.destroy()}})},exports:n,imports:f.imports}),key:c}}};