@streamlayer/react 1.14.4 → 1.14.5
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/lib/cjs/useStreamLayerApp2.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +1 -1
- package/lib/classic/es/useStreamLayerApp2.js +1 -1
- package/lib/classic/style.css +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/masters.js +1 -1
- package/lib/dist/style.css +1 -1
- package/lib/es/useStreamLayerApp2.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +14 -14
package/lib/dist/cjs/masters.js
CHANGED
|
@@ -94,4 +94,4 @@ Error generating stack: `+s.message+`
|
|
|
94
94
|
`),o=`
|
|
95
95
|
`+n+(s.length?r("│"):" ")+" ";return n+i.join(o)+`
|
|
96
96
|
`+s.map(function(l,c){var d=c===s.length-1,p=l.nodes&&l.nodes.length,f=n+(d?" ":r("│"))+" ";return n+r(d?"└":"├")+r("─")+r(p?"┬":"─")+" "+e(l,f,a).slice(n.length+2)}).join("")};const qB=GB,v6=Symbol("avvio.TimeTree.untrackNode"),$c=Symbol("avvio.TimeTree.trackNode"),k6=Symbol("avvio.TimeTree.getParent"),b6=Symbol("avvio.TimeTree.getNode"),C6=Symbol("avvio.TimeTree.addNode");let zB=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[$c](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[v6](e){this.tableId.delete(e.id);const t=this.tableLabel.get(e.label);if(t.id){this.tableLabel.delete(e.label);return}t.pop(),t.length===0&&this.tableLabel.delete(e.label)}[k6](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[b6](e){return this.tableId.get(e)}[C6](e,t,n){if(e===null)return this.root={id:"root",label:t,start:n,nodes:[]},this[$c](this.root),this.root.id;const a=this[k6](e),r=`${t}-${Math.random()}`,s={id:r,parent:e,start:n,label:t,nodes:[]};return a.nodes.push(s),this[$c](s),r}start(e,t,n=Date.now()){return this[C6](e,t,n)}stop(e,t=Date.now()){const n=this[b6](e);n&&(n.stop=t,n.diff=n.stop-n.start||0,this[v6](n))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const e=n=>(n.label=`${n.label} ${n.diff} ms`,n.nodes.length>0&&(n.nodes=n.nodes.map(a=>e(a))),n),t=e(this.toJSON());return qB(t)}};var WB=zB,d0={exports:{}},I2={exports:{}},Fc,S6;function QB(){if(S6)return Fc;S6=1;var e=1e3,t=e*60,n=t*60,a=n*24,r=a*7,s=a*365.25;Fc=function(d,p){p=p||{};var f=typeof d;if(f==="string"&&d.length>0)return i(d);if(f==="number"&&isFinite(d))return p.long?l(d):o(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function i(d){if(d=String(d),!(d.length>100)){var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(d);if(p){var f=parseFloat(p[1]),y=(p[2]||"ms").toLowerCase();switch(y){case"years":case"year":case"yrs":case"yr":case"y":return f*s;case"weeks":case"week":case"w":return f*r;case"days":case"day":case"d":return f*a;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function o(d){var p=Math.abs(d);return p>=a?Math.round(d/a)+"d":p>=n?Math.round(d/n)+"h":p>=t?Math.round(d/t)+"m":p>=e?Math.round(d/e)+"s":d+"ms"}function l(d){var p=Math.abs(d);return p>=a?c(d,p,a,"day"):p>=n?c(d,p,n,"hour"):p>=t?c(d,p,t,"minute"):p>=e?c(d,p,e,"second"):d+" ms"}function c(d,p,f,y){var v=p>=f*1.5;return Math.round(d/f)+" "+y+(v?"s":"")}return Fc}function YB(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=r,n.enabled=i,n.humanize=QB(),n.destroy=c,Object.keys(e).forEach(d=>{n[d]=e[d]}),n.names=[],n.skips=[],n.formatters={};function t(d){let p=0;for(let f=0;f<d.length;f++)p=(p<<5)-p+d.charCodeAt(f),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=t;function n(d){let p,f=null,y,v;function T(...C){if(!T.enabled)return;const h=T,g=Number(new Date),b=g-(p||g);h.diff=b,h.prev=p,h.curr=g,p=g,C[0]=n.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let _=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(w,O)=>{if(w==="%%")return"%";_++;const N=n.formatters[O];if(typeof N=="function"){const x=C[_];w=N.call(h,x),C.splice(_,1),_--}return w}),n.formatArgs.call(h,C),(h.log||n.log).apply(h,C)}return T.namespace=d,T.useColors=n.useColors(),T.color=n.selectColor(d),T.extend=a,T.destroy=n.destroy,Object.defineProperty(T,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(y!==n.namespaces&&(y=n.namespaces,v=n.enabled(d)),v),set:C=>{f=C}}),typeof n.init=="function"&&n.init(T),T}function a(d,p){const f=n(this.namespace+(typeof p>"u"?":":p)+d);return f.log=this.log,f}function r(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let p;const f=(typeof d=="string"?d:"").split(/[\s,]+/),y=f.length;for(p=0;p<y;p++)f[p]&&(d=f[p].replace(/\*/g,".*?"),d[0]==="-"?n.skips.push(new RegExp("^"+d.slice(1)+"$")):n.names.push(new RegExp("^"+d+"$")))}function s(){const d=[...n.names.map(o),...n.skips.map(o).map(p=>"-"+p)].join(",");return n.enable(""),d}function i(d){if(d[d.length-1]==="*")return!0;let p,f;for(p=0,f=n.skips.length;p<f;p++)if(n.skips[p].test(d))return!1;for(p=0,f=n.names.length;p<f;p++)if(n.names[p].test(d))return!0;return!1}function o(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function l(d){return d instanceof Error?d.stack||d.message:d}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var KB=YB;(function(e,t){t.formatArgs=a,t.save=r,t.load=s,t.useColors=n,t.storage=i(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;l.splice(1,0,c,"color: inherit");let d=0,p=0;l[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(d++,f==="%c"&&(p=d))}),l.splice(p,0,c)}t.log=console.debug||console.log||(()=>{});function r(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function s(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof re<"u"&&"env"in re&&(l=re.env.DEBUG),l}function i(){try{return localStorage}catch{}}e.exports=KB(t);const{formatters:o}=e.exports;o.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(I2,I2.exports);var r7=I2.exports;const ZB=A9,JB=V9.EventEmitter,XB=h1.inherits,tt=r7("avvio"),{AVV_ERR_READY_TIMEOUT:eH}=a7,jc=Symbol.for("plugin-meta");function tH(e,t){return e[jc]&&e[jc].name?e[jc].name:typeof t<"u"&&typeof t!="function"&&t.name?t.name:e.name?e.name:e.toString().split(`
|
|
97
|
-
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function nH(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function hs(e,t,n,a,r){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=r===void 0?e._timeout:r,this.name=tH(t,n),this.isAfter=a,this.q=ZB(e,aH,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}XB(hs,JB);hs.prototype.exec=function(e,t){const n=this.func;let a=!1;const r=this.name;if(this.parent._error&&!this.isAfter){tt("skipping loading of plugin as parent errored and it is not an after",r),re.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return tt("override errored",r),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,tt("exec",r);let s;const i=l=>{if(a){tt("loading complete",r);return}this._error=l,tt(l?"exec errored":"exec completed",r),a=!0,s&&clearTimeout(s),t(l)};this.timeout>0&&(tt("setting up timeout",r,this.timeout),s=setTimeout(function(){tt("timed out",r),s=null;const l=new eH(r);l.fn=n,i(l)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const o=n(this.server,this.opts,i);o&&typeof o.then=="function"&&(tt("exec: resolving promise",r),o.then(()=>re.nextTick(i),l=>re.nextTick(i,l)))};hs.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(tt("rejecting promise",this.name,n),this._promise.reject(n)):(tt("resolving promise",this.name),this._promise.resolve()),this._promise=null,re.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=nH(),t=this._promise.promise,this.server?e():this.on("start",e)),t};hs.prototype.enqueue=function(e,t){tt("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};hs.prototype.finish=function(e,t){tt("finish",this.name,e);const n=()=>{this.loaded||(tt("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),n();return}const a=()=>{if(tt("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const r=()=>{tt("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else n();else tt("delayed",this.name),this.q.drain=()=>{tt("drain",this.name),this.q.drain=rH,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function aH(e,t){const n=this;re.nextTick(m0.bind(n),e,t)}function m0(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,m0.call(this,e,t)},t);return}const n=this._current[0];this._current.unshift(e),e.exec(n&&n.server||this._server,a=>{e.finish(a,r=>{this._current.shift(),t(r)})})}function rH(){}d0.exports=hs;d0.exports.loadPlugin=m0;var sH=d0.exports;const E6=A9,iH=V9.EventEmitter,oH=h1.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Vc,AVV_ERR_CALLBACK_NOT_FN:Ys,AVV_ERR_PLUGIN_NOT_VALID:lH,AVV_ERR_ROOT_PLG_BOOTED:cH,AVV_ERR_READY_TIMEOUT:uH}=a7,dH=WB,O2=sH,cs=r7("avvio"),Ml=Symbol("kAvvio"),Uc=Symbol("kThenifyDoNotWrap");function mH(e,t,n){const a=t.expose||{},r=a.use||"use",s=a.after||"after",i=a.ready||"ready",o=a.onClose||"onClose",l=a.close||"close";if(e[r])throw new Vc(r);if(e[s])throw new Vc(s);if(e[i])throw new Vc(i);e[r]=function(c,d){return n.use(c,d),this},Object.defineProperty(e,"then",{get:s7.bind(n)}),e[Ml]=!0,e[s]=function(c){return typeof c!="function"?n._loadRegistered():(n.after(Bc(c,this)),this)},e[i]=function(c){if(c&&typeof c!="function")throw new Ys(i,typeof c);return n.ready(c?Bc(c,this):void 0)},e[o]=function(c){if(typeof c!="function")throw new Ys(o,typeof c);return n.onClose(yH(c,this)),this},e[l]=function(c){if(c&&typeof c!="function")throw new Ys(l,typeof c);return c?(n.close(Bc(c,this)),this):n.close()}}function Ze(e,t,n){if(typeof e=="function"&&arguments.length===1&&(n=e,t={},e=null),typeof t=="function"&&(n=t,t={}),t=t||{},!(this instanceof Ze)){const a=new Ze(e,t,n);return e&&mH(e,t,a),a}t.autostart!==!1&&(t.autostart=!0),e=e||this,this._timeout=Number(t.timeout)||0,this._server=e,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new dH,this._readyQ=E6(this,i7,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=_6},this._closeQ=E6(this,gH,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=_6},this._doStart=null,this._root=new O2(this,pH.bind(this),t,!1,0),this._root.once("start",(a,r,s)=>{const i=this.pluginTree.start(null,r,s);this._root.once("loaded",(o,l,c)=>{this.pluginTree.stop(i,c)})}),O2.loadPlugin.call(this,this._root,a=>{cs("root plugin ready");try{this.emit("preReady"),this._root=null}catch(r){a=a||this._error||r}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function pH(e,t,n){this._doStart=n,t.autostart&&this.start()}oH(Ze,iH);Ze.prototype.start=function(){return this.started=!0,re.nextTick(this._doStart),this};Ze.prototype.override=function(e,t,n){return e};function fH(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new lH(typeof e);return e}Ze.prototype[Ml]=!0;Ze.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};Ze.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&re.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(Ze.prototype,"then",{get:s7});Ze.prototype._addPlugin=function(e,t,n){if(e=fH(e),t=t||{},this.booted)throw new cH;const a=this._current[0],r=new O2(this,e,t,n);if(r.once("start",(s,i,o)=>{const l=this.pluginTree.start(a.name,i,o);r.once("loaded",(c,d,p)=>{this.pluginTree.stop(l,p)})}),a.loaded)throw new Error(r.name,a.name);return a.enqueue(r,s=>{s&&(this._error=s)}),r};Ze.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,r){i7.call(this,e,r)}return this};Ze.prototype.onClose=function(e){if(typeof e!="function")throw new Error("not a function");e[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(e,t.bind(this));function t(n){n&&(this._error=n)}return this};Ze.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new Ys("close",typeof e)}else t=new Promise(function(n,a){e=function(r){if(r)return a(r);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),re.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};Ze.prototype.ready=function(e){if(e){if(typeof e!="function")throw new Ys("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(r),this.start();const a=this._current[0].server;function r(s,i,o){s?n(s):t(a),re.nextTick(o)}})};Ze.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};Ze.prototype.toJSON=function(){return this.pluginTree.toJSON()};function _6(){}function s7(){if(this.booted){cs("thenify returning null because we are already booted");return}if(this[Uc]){this[Uc]=!1;return}return cs("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Uc]=!0,e(this._server)),t)}function i7(e,t){const n=this._server,a=this._error;let r;if(this._error=null,e.length===0)this._error=a,r=e(),r&&!r[Ml]&&typeof r.then=="function"?r.then(()=>re.nextTick(t),s=>re.nextTick(t,s)):re.nextTick(t);else if(e.length===1)r=e(a),r&&!r[Ml]&&typeof r.then=="function"?r.then(()=>re.nextTick(t),s=>re.nextTick(t,s)):re.nextTick(t);else if(this._timeout===0){const s=i=>{this._error=i,t(this._error)};e.length===2?e(a,s):e(a,n,s)}else hH.call(this,e,a,n,t)}function hH(e,t,n,a){const r=e.name;cs("setting up ready timeout",r,this._timeout);let s=setTimeout(()=>{cs("timed out",r),s=null;const o=new uH(r);o.fn=e,this._error=o,a(o)},this._timeout);e.length===2?e(t,i.bind(this)):e(t,n,i.bind(this));function i(o){s&&(clearTimeout(s),this._error=o,a(this._error))}}function gH(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let r;a?r=e(n):r=e(this._error),r&&typeof r.then=="function"?(cs("resolving close/onClose promise"),r.then(()=>re.nextTick(t),s=>re.nextTick(t,s))):re.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function yH(e,t){return n.bind(t);function n(a,r){let s;e.length===0?(s=e(),s&&s.then?s.then(function(){re.nextTick(r)},r):re.nextTick(r)):e.length===1?(s=e(this),s&&s.then?s.then(function(){re.nextTick(r)},r):re.nextTick(r)):e(this,r)}}function Bc(e,t){return n.bind(t);function n(a,r){let s;e?e.length===0?(s=e(),s&&s.then?s.then(function(){re.nextTick(r,a)},r):re.nextTick(r,a)):e.length===1?(s=e(a),s&&s.then?s.then(function(){re.nextTick(r)},r):re.nextTick(r)):e.length===2?e(a,r):e(a,this,r):re.nextTick(r)}}e0.exports=Ze;e0.exports.express=function(e){return Ze(e,{expose:{use:"load"}})};var TH=e0.exports;const vH=WV(TH);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const e=["webkit","moz","ms","o"];for(const t of e)window.requestAnimationFrame=window.requestAnimationFrame||window[`${t}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${t}CancelAnimationFrame`]||window[`${t}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let t=0;const n=!!(window.performance&&window.performance.now);window.requestAnimationFrame=function(a){const r=n?window.performance.now():new Date().getTime(),s=Math.max(0,16-(r-t)),i=window.setTimeout(function(){a(r+s)},s);return t=r+s,i},window.cancelAnimationFrame=clearTimeout}})();function kH(e,t=!0,n=!0,a={friendsTab:"enabled"}){const r=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",s=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",i=vH(Object.create({}),{autostart:!1});return i.use(_V,{hideFriends:a.hideFriends,skipOnboarding:a.skipOnboarding,betPack:a.betPack,friendsTab:a.friendsTab,theme:a.theme,themeMode:a.themeMode}),i.use(TV,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),i.use(CV,{videoPlayerController:a==null?void 0:a.videoPlayerController}),i.use(EV,{onContentActivate:a==null?void 0:a.onContentActivate,withAd:a==null?void 0:a.withAd,withAdNotification:a==null?void 0:a.withAdNotification}),i.use(Fj,{sdkKey:e,host:r,analyticsHost:s,version:a==null?void 0:a.version}),i.use(Hj),i.use(bV),i.use(DV),i.use(dV),i.use(zV),i.after((o,l,c)=>{if(o)throw o;l.ready(),c()}),n&&i.after(async(o,l,c)=>{if(o)throw o;await l.sdk.initializeApp(),c()}),i.onClose(()=>{console.log("close")}),i}const bH=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:r,videoPlayerController:s,onContentActivate:i,hideFriends:o,skipOnboarding:l,withAdNotification:c,withAd:d,friendsTab:p,betPack:f})=>{const[y,v]=I.useState(null);return I.useEffect(()=>{let T=!1;if(!e)return console.error("streamlayer sdk key should be provided"),v(h=>(h!==null&&typeof h.disableApp=="function"&&h.disableApp(),null)),()=>{T=!0};const C=kH(e,n,a,{version:"1.14.4",onDeepLinkHandled:r,videoPlayerController:s,onContentActivate:i,skipOnboarding:l,withAdNotification:c,withAd:d,hideFriends:o,friendsTab:p,betPack:f});if(t)for(const h of t)C.use(h);return C.ready().then(h=>{T||(v(h.sdk),typeof window<"u")}).catch(h=>console.log(h)),()=>{T=!0,C.close(function(h){if(h)throw h})}},[e,n]),y},o7=({event:e})=>{const t=gs(),n=SH();return I.useEffect(()=>(t&&(e&&(t.createEventSession(e),n&&(n.current=e)),!e&&(n!=null&&n.current)&&(t.createEventSession(""),n.current="")),()=>{t&&t.disableApp()}),[e,n,t]),null};var l7=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(l7||{});const CH={status:0,sdk:null},k1=I.createContext(CH),c7=({sdkKey:e,theme:t,themeMode:n,plugins:a,children:r,event:s,production:i=!0,autoEnable:o=!0,withAdNotification:l,withAd:c=!0,betPack:d=!1,hideFriends:p,skipOnboarding:f,friendsTab:y="enabled",onDeepLinkHandled:v,videoPlayerController:T,onContentActivate:C})=>{const h=bH({sdkKey:e,plugins:a,production:i,autoEnable:o,onDeepLinkHandled:v,videoPlayerController:T,onContentActivate:C,hideFriends:p,skipOnboarding:f,withAdNotification:l,withAd:c,friendsTab:y,betPack:d}),g=I.useRef(""),b=I.useMemo(()=>h?{sdk:h,status:2,event:g}:{status:1,sdk:null,event:g},[h]);return I.useEffect(()=>{h&&(h.options.setKey("friendsTab",y),h.options.setKey("theme",t),h.options.setKey("themeMode",n),h.options.setKey("skipOnboarding",f),h.options.setKey("betPack",d))},[h,y,t,n,f,d]),I.useEffect(()=>()=>{v&&(h==null||h.removeDeepLinkHandler(v)),T&&(h==null||h.removeVideoPlayerController(T))},[h]),I.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!e,onDeepLinkHandled:!!v,videoPlayerController:!!T})},[e,v,T]),u.jsxs(k1.Provider,{value:b,children:[s!==void 0&&u.jsx(o7,{event:s}),r]})},gs=()=>{const{sdk:e}=I.useContext(k1);return e},SH=()=>{const{event:e}=I.useContext(k1);return e},EH=()=>{const e=gs();return e?u.jsx(P8,{sdk:e}):null},_H=({close:e,onEvent:t})=>{const n=gs();return n?u.jsx(x8,{sdk:n,onEvent:t,close:e}):null},wH=({sdkKey:e,plugins:t,children:n,event:a,onDeepLinkHandled:r,videoPlayerController:s,production:i=!0})=>u.jsxs(c7,{sdkKey:e,plugins:t,production:i,autoEnable:!0,onDeepLinkHandled:r,videoPlayerController:s,friendsTab:"disabled",skipOnboarding:!0,hideFriends:!0,children:[u.jsx(o7,{event:a}),n]}),IH=({betPack:e})=>{const{sdk:t,status:n}=I.useContext(k1);return n===l7.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),null):t?u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(Wd,{style:{height:"100%"},children:u.jsx(lP,{sdk:t,betPack:e})})}):null};class OH extends I.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){console.error(t,n.componentStack)}render(){return this.state.hasError?null:u.jsx(IH,{...this.props})}}const NH=({token:e,schema:t})=>{const n=gs();return I.useEffect(()=>{e&&t&&n&&n.authorizationBypass(t,e),n&&(n.withAuth=!0)},[e,t,n]),null},u7=({event:e,sdkKey:t,token:n,deviceId:a,production:r=!1,theme:s,themeMode:i="light",children:o})=>{const[l,c]=I.useState(!1);return I.useEffect(()=>{n&&(new X5().setToken(n),c(!0))},[n]),I.useEffect(()=>{a&&localStorage.setItem("sl-device-id",a)},[a]),l?u.jsx(c7,{sdkKey:t,event:e,production:r,theme:s,themeMode:i,betPack:!0,skipOnboarding:!0,autoEnable:!0,children:u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(Wd,{children:o})})}):null},LH=({onEvent:e,close:t,...n})=>u.jsx(u7,{...n,children:u.jsx(_H,{close:t,onEvent:e})}),AH=({production:e})=>{const[t,n]=I.useState();return I.useEffect(()=>{const{hostname:a,search:r}=window.location,s=new URLSearchParams(r);n({sdkKey:s.get("_slrk")||"",event:s.get("_slre")||"",token:s.get("_slrt")||"",deviceId:s.get("_slrd")||"",theme:s.get("theme")||"",themeMode:s.get("themeMode")==="dark"?"dark":"light",production:e??!(a.includes("next.")||a==="localhost")})},[e]),t?u.jsx(u7,{...t,children:u.jsx(EH,{})}):null},RH=()=>{const e=gs();return e?u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(Wd,{children:u.jsx(TP,{sdk:e})})}):null};exports.A=QL;exports.A$1=Ye;exports.BetPack=LH;exports.BetPackStandalone=AH;exports.C=AE;exports.I=Gd;exports.InfiniteScroll=u2;exports.InvitationFrom=Zs;exports.M=Z5;exports.MastersStreamLayerProvider=wH;exports.MastersStreamLayerSDKReact=OH;exports.S=xE;exports.StreamLayerLogin=NH;exports.StreamLayerSDKPoints=RH;exports.T=K5;exports.cx_default=lt;exports.d=PE;exports.f=_4;exports.k=W5;exports.k1=te;exports.l=NE;exports.m=OE;exports.n=Q2;exports.p=kP;exports.s=G5;exports.styled_default=k;exports.useStore=Te;exports.useStreamLayer=gs;exports.useTransition=ph;exports.z=Q5;
|
|
97
|
+
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function nH(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function hs(e,t,n,a,r){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=r===void 0?e._timeout:r,this.name=tH(t,n),this.isAfter=a,this.q=ZB(e,aH,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}XB(hs,JB);hs.prototype.exec=function(e,t){const n=this.func;let a=!1;const r=this.name;if(this.parent._error&&!this.isAfter){tt("skipping loading of plugin as parent errored and it is not an after",r),re.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return tt("override errored",r),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,tt("exec",r);let s;const i=l=>{if(a){tt("loading complete",r);return}this._error=l,tt(l?"exec errored":"exec completed",r),a=!0,s&&clearTimeout(s),t(l)};this.timeout>0&&(tt("setting up timeout",r,this.timeout),s=setTimeout(function(){tt("timed out",r),s=null;const l=new eH(r);l.fn=n,i(l)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const o=n(this.server,this.opts,i);o&&typeof o.then=="function"&&(tt("exec: resolving promise",r),o.then(()=>re.nextTick(i),l=>re.nextTick(i,l)))};hs.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(tt("rejecting promise",this.name,n),this._promise.reject(n)):(tt("resolving promise",this.name),this._promise.resolve()),this._promise=null,re.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=nH(),t=this._promise.promise,this.server?e():this.on("start",e)),t};hs.prototype.enqueue=function(e,t){tt("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};hs.prototype.finish=function(e,t){tt("finish",this.name,e);const n=()=>{this.loaded||(tt("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),n();return}const a=()=>{if(tt("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const r=()=>{tt("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else n();else tt("delayed",this.name),this.q.drain=()=>{tt("drain",this.name),this.q.drain=rH,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function aH(e,t){const n=this;re.nextTick(m0.bind(n),e,t)}function m0(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,m0.call(this,e,t)},t);return}const n=this._current[0];this._current.unshift(e),e.exec(n&&n.server||this._server,a=>{e.finish(a,r=>{this._current.shift(),t(r)})})}function rH(){}d0.exports=hs;d0.exports.loadPlugin=m0;var sH=d0.exports;const E6=A9,iH=V9.EventEmitter,oH=h1.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Vc,AVV_ERR_CALLBACK_NOT_FN:Ys,AVV_ERR_PLUGIN_NOT_VALID:lH,AVV_ERR_ROOT_PLG_BOOTED:cH,AVV_ERR_READY_TIMEOUT:uH}=a7,dH=WB,O2=sH,cs=r7("avvio"),Ml=Symbol("kAvvio"),Uc=Symbol("kThenifyDoNotWrap");function mH(e,t,n){const a=t.expose||{},r=a.use||"use",s=a.after||"after",i=a.ready||"ready",o=a.onClose||"onClose",l=a.close||"close";if(e[r])throw new Vc(r);if(e[s])throw new Vc(s);if(e[i])throw new Vc(i);e[r]=function(c,d){return n.use(c,d),this},Object.defineProperty(e,"then",{get:s7.bind(n)}),e[Ml]=!0,e[s]=function(c){return typeof c!="function"?n._loadRegistered():(n.after(Bc(c,this)),this)},e[i]=function(c){if(c&&typeof c!="function")throw new Ys(i,typeof c);return n.ready(c?Bc(c,this):void 0)},e[o]=function(c){if(typeof c!="function")throw new Ys(o,typeof c);return n.onClose(yH(c,this)),this},e[l]=function(c){if(c&&typeof c!="function")throw new Ys(l,typeof c);return c?(n.close(Bc(c,this)),this):n.close()}}function Ze(e,t,n){if(typeof e=="function"&&arguments.length===1&&(n=e,t={},e=null),typeof t=="function"&&(n=t,t={}),t=t||{},!(this instanceof Ze)){const a=new Ze(e,t,n);return e&&mH(e,t,a),a}t.autostart!==!1&&(t.autostart=!0),e=e||this,this._timeout=Number(t.timeout)||0,this._server=e,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new dH,this._readyQ=E6(this,i7,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=_6},this._closeQ=E6(this,gH,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=_6},this._doStart=null,this._root=new O2(this,pH.bind(this),t,!1,0),this._root.once("start",(a,r,s)=>{const i=this.pluginTree.start(null,r,s);this._root.once("loaded",(o,l,c)=>{this.pluginTree.stop(i,c)})}),O2.loadPlugin.call(this,this._root,a=>{cs("root plugin ready");try{this.emit("preReady"),this._root=null}catch(r){a=a||this._error||r}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function pH(e,t,n){this._doStart=n,t.autostart&&this.start()}oH(Ze,iH);Ze.prototype.start=function(){return this.started=!0,re.nextTick(this._doStart),this};Ze.prototype.override=function(e,t,n){return e};function fH(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new lH(typeof e);return e}Ze.prototype[Ml]=!0;Ze.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};Ze.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&re.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(Ze.prototype,"then",{get:s7});Ze.prototype._addPlugin=function(e,t,n){if(e=fH(e),t=t||{},this.booted)throw new cH;const a=this._current[0],r=new O2(this,e,t,n);if(r.once("start",(s,i,o)=>{const l=this.pluginTree.start(a.name,i,o);r.once("loaded",(c,d,p)=>{this.pluginTree.stop(l,p)})}),a.loaded)throw new Error(r.name,a.name);return a.enqueue(r,s=>{s&&(this._error=s)}),r};Ze.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,r){i7.call(this,e,r)}return this};Ze.prototype.onClose=function(e){if(typeof e!="function")throw new Error("not a function");e[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(e,t.bind(this));function t(n){n&&(this._error=n)}return this};Ze.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new Ys("close",typeof e)}else t=new Promise(function(n,a){e=function(r){if(r)return a(r);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),re.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};Ze.prototype.ready=function(e){if(e){if(typeof e!="function")throw new Ys("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(r),this.start();const a=this._current[0].server;function r(s,i,o){s?n(s):t(a),re.nextTick(o)}})};Ze.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};Ze.prototype.toJSON=function(){return this.pluginTree.toJSON()};function _6(){}function s7(){if(this.booted){cs("thenify returning null because we are already booted");return}if(this[Uc]){this[Uc]=!1;return}return cs("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Uc]=!0,e(this._server)),t)}function i7(e,t){const n=this._server,a=this._error;let r;if(this._error=null,e.length===0)this._error=a,r=e(),r&&!r[Ml]&&typeof r.then=="function"?r.then(()=>re.nextTick(t),s=>re.nextTick(t,s)):re.nextTick(t);else if(e.length===1)r=e(a),r&&!r[Ml]&&typeof r.then=="function"?r.then(()=>re.nextTick(t),s=>re.nextTick(t,s)):re.nextTick(t);else if(this._timeout===0){const s=i=>{this._error=i,t(this._error)};e.length===2?e(a,s):e(a,n,s)}else hH.call(this,e,a,n,t)}function hH(e,t,n,a){const r=e.name;cs("setting up ready timeout",r,this._timeout);let s=setTimeout(()=>{cs("timed out",r),s=null;const o=new uH(r);o.fn=e,this._error=o,a(o)},this._timeout);e.length===2?e(t,i.bind(this)):e(t,n,i.bind(this));function i(o){s&&(clearTimeout(s),this._error=o,a(this._error))}}function gH(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let r;a?r=e(n):r=e(this._error),r&&typeof r.then=="function"?(cs("resolving close/onClose promise"),r.then(()=>re.nextTick(t),s=>re.nextTick(t,s))):re.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function yH(e,t){return n.bind(t);function n(a,r){let s;e.length===0?(s=e(),s&&s.then?s.then(function(){re.nextTick(r)},r):re.nextTick(r)):e.length===1?(s=e(this),s&&s.then?s.then(function(){re.nextTick(r)},r):re.nextTick(r)):e(this,r)}}function Bc(e,t){return n.bind(t);function n(a,r){let s;e?e.length===0?(s=e(),s&&s.then?s.then(function(){re.nextTick(r,a)},r):re.nextTick(r,a)):e.length===1?(s=e(a),s&&s.then?s.then(function(){re.nextTick(r)},r):re.nextTick(r)):e.length===2?e(a,r):e(a,this,r):re.nextTick(r)}}e0.exports=Ze;e0.exports.express=function(e){return Ze(e,{expose:{use:"load"}})};var TH=e0.exports;const vH=WV(TH);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const e=["webkit","moz","ms","o"];for(const t of e)window.requestAnimationFrame=window.requestAnimationFrame||window[`${t}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${t}CancelAnimationFrame`]||window[`${t}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let t=0;const n=!!(window.performance&&window.performance.now);window.requestAnimationFrame=function(a){const r=n?window.performance.now():new Date().getTime(),s=Math.max(0,16-(r-t)),i=window.setTimeout(function(){a(r+s)},s);return t=r+s,i},window.cancelAnimationFrame=clearTimeout}})();function kH(e,t=!0,n=!0,a={friendsTab:"enabled"}){const r=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",s=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",i=vH(Object.create({}),{autostart:!1});return i.use(_V,{hideFriends:a.hideFriends,skipOnboarding:a.skipOnboarding,betPack:a.betPack,friendsTab:a.friendsTab,theme:a.theme,themeMode:a.themeMode}),i.use(TV,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),i.use(CV,{videoPlayerController:a==null?void 0:a.videoPlayerController}),i.use(EV,{onContentActivate:a==null?void 0:a.onContentActivate,withAd:a==null?void 0:a.withAd,withAdNotification:a==null?void 0:a.withAdNotification}),i.use(Fj,{sdkKey:e,host:r,analyticsHost:s,version:a==null?void 0:a.version}),i.use(Hj),i.use(bV),i.use(DV),i.use(dV),i.use(zV),i.after((o,l,c)=>{if(o)throw o;l.ready(),c()}),n&&i.after(async(o,l,c)=>{if(o)throw o;await l.sdk.initializeApp(),c()}),i.onClose(()=>{console.log("close")}),i}const bH=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:r,videoPlayerController:s,onContentActivate:i,hideFriends:o,skipOnboarding:l,withAdNotification:c,withAd:d,friendsTab:p,betPack:f})=>{const[y,v]=I.useState(null);return I.useEffect(()=>{let T=!1;if(!e)return console.error("streamlayer sdk key should be provided"),v(h=>(h!==null&&typeof h.disableApp=="function"&&h.disableApp(),null)),()=>{T=!0};const C=kH(e,n,a,{version:"1.14.5",onDeepLinkHandled:r,videoPlayerController:s,onContentActivate:i,skipOnboarding:l,withAdNotification:c,withAd:d,hideFriends:o,friendsTab:p,betPack:f});if(t)for(const h of t)C.use(h);return C.ready().then(h=>{T||(v(h.sdk),typeof window<"u")}).catch(h=>console.log(h)),()=>{T=!0,C.close(function(h){if(h)throw h})}},[e,n]),y},o7=({event:e})=>{const t=gs(),n=SH();return I.useEffect(()=>(t&&(e&&(t.createEventSession(e),n&&(n.current=e)),!e&&(n!=null&&n.current)&&(t.createEventSession(""),n.current="")),()=>{t&&t.disableApp()}),[e,n,t]),null};var l7=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(l7||{});const CH={status:0,sdk:null},k1=I.createContext(CH),c7=({sdkKey:e,theme:t,themeMode:n,plugins:a,children:r,event:s,production:i=!0,autoEnable:o=!0,withAdNotification:l,withAd:c=!0,betPack:d=!1,hideFriends:p,skipOnboarding:f,friendsTab:y="enabled",onDeepLinkHandled:v,videoPlayerController:T,onContentActivate:C})=>{const h=bH({sdkKey:e,plugins:a,production:i,autoEnable:o,onDeepLinkHandled:v,videoPlayerController:T,onContentActivate:C,hideFriends:p,skipOnboarding:f,withAdNotification:l,withAd:c,friendsTab:y,betPack:d}),g=I.useRef(""),b=I.useMemo(()=>h?{sdk:h,status:2,event:g}:{status:1,sdk:null,event:g},[h]);return I.useEffect(()=>{h&&(h.options.setKey("friendsTab",y),h.options.setKey("theme",t),h.options.setKey("themeMode",n),h.options.setKey("skipOnboarding",f),h.options.setKey("betPack",d))},[h,y,t,n,f,d]),I.useEffect(()=>()=>{v&&(h==null||h.removeDeepLinkHandler(v)),T&&(h==null||h.removeVideoPlayerController(T))},[h]),I.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!e,onDeepLinkHandled:!!v,videoPlayerController:!!T})},[e,v,T]),u.jsxs(k1.Provider,{value:b,children:[s!==void 0&&u.jsx(o7,{event:s}),r]})},gs=()=>{const{sdk:e}=I.useContext(k1);return e},SH=()=>{const{event:e}=I.useContext(k1);return e},EH=()=>{const e=gs();return e?u.jsx(P8,{sdk:e}):null},_H=({close:e,onEvent:t})=>{const n=gs();return n?u.jsx(x8,{sdk:n,onEvent:t,close:e}):null},wH=({sdkKey:e,plugins:t,children:n,event:a,onDeepLinkHandled:r,videoPlayerController:s,production:i=!0})=>u.jsxs(c7,{sdkKey:e,plugins:t,production:i,autoEnable:!0,onDeepLinkHandled:r,videoPlayerController:s,friendsTab:"disabled",skipOnboarding:!0,hideFriends:!0,children:[u.jsx(o7,{event:a}),n]}),IH=({betPack:e})=>{const{sdk:t,status:n}=I.useContext(k1);return n===l7.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),null):t?u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(Wd,{style:{height:"100%"},children:u.jsx(lP,{sdk:t,betPack:e})})}):null};class OH extends I.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){console.error(t,n.componentStack)}render(){return this.state.hasError?null:u.jsx(IH,{...this.props})}}const NH=({token:e,schema:t})=>{const n=gs();return I.useEffect(()=>{e&&t&&n&&n.authorizationBypass(t,e),n&&(n.withAuth=!0)},[e,t,n]),null},u7=({event:e,sdkKey:t,token:n,deviceId:a,production:r=!1,theme:s,themeMode:i="light",children:o})=>{const[l,c]=I.useState(!1);return I.useEffect(()=>{n&&(new X5().setToken(n),c(!0))},[n]),I.useEffect(()=>{a&&localStorage.setItem("sl-device-id",a)},[a]),l?u.jsx(c7,{sdkKey:t,event:e,production:r,theme:s,themeMode:i,betPack:!0,skipOnboarding:!0,autoEnable:!0,children:u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(Wd,{children:o})})}):null},LH=({onEvent:e,close:t,...n})=>u.jsx(u7,{...n,children:u.jsx(_H,{close:t,onEvent:e})}),AH=({production:e})=>{const[t,n]=I.useState();return I.useEffect(()=>{const{hostname:a,search:r}=window.location,s=new URLSearchParams(r);n({sdkKey:s.get("_slrk")||"",event:s.get("_slre")||"",token:s.get("_slrt")||"",deviceId:s.get("_slrd")||"",theme:s.get("theme")||"",themeMode:s.get("themeMode")==="dark"?"dark":"light",production:e??!(a.includes("next.")||a==="localhost")})},[e]),t?u.jsx(u7,{...t,children:u.jsx(EH,{})}):null},RH=()=>{const e=gs();return e?u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(Wd,{children:u.jsx(TP,{sdk:e})})}):null};exports.A=QL;exports.A$1=Ye;exports.BetPack=LH;exports.BetPackStandalone=AH;exports.C=AE;exports.I=Gd;exports.InfiniteScroll=u2;exports.InvitationFrom=Zs;exports.M=Z5;exports.MastersStreamLayerProvider=wH;exports.MastersStreamLayerSDKReact=OH;exports.S=xE;exports.StreamLayerLogin=NH;exports.StreamLayerSDKPoints=RH;exports.T=K5;exports.cx_default=lt;exports.d=PE;exports.f=_4;exports.k=W5;exports.k1=te;exports.l=NE;exports.m=OE;exports.n=Q2;exports.p=kP;exports.s=G5;exports.styled_default=k;exports.useStore=Te;exports.useStreamLayer=gs;exports.useTransition=ph;exports.z=Q5;
|
package/lib/dist/es/masters.js
CHANGED
|
@@ -32021,7 +32021,7 @@ const LG = ({
|
|
|
32021
32021
|
T = !0;
|
|
32022
32022
|
};
|
|
32023
32023
|
const C = NG(e, n, a, {
|
|
32024
|
-
version: "1.14.
|
|
32024
|
+
version: "1.14.5",
|
|
32025
32025
|
onDeepLinkHandled: r,
|
|
32026
32026
|
videoPlayerController: i,
|
|
32027
32027
|
onContentActivate: s,
|