@streamlayer/react 1.14.2 → 1.14.3

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.
@@ -14,4 +14,4 @@
14
14
  `),c=`
15
15
  `+n+(o.length?s("│"):" ")+" ";return n+r.join(c)+`
16
16
  `+o.map(function(l,m){var d=m===o.length-1,u=l.nodes&&l.nodes.length,y=n+(d?" ":s("│"))+" ";return n+s(d?"└":"├")+s("─")+s(u?"┬":"─")+" "+e(l,y,a).slice(n.length+2)}).join("")};const jS=YS,Ur=Symbol("avvio.TimeTree.untrackNode"),Ca=Symbol("avvio.TimeTree.trackNode"),Fr=Symbol("avvio.TimeTree.getParent"),Br=Symbol("avvio.TimeTree.getNode"),Gr=Symbol("avvio.TimeTree.addNode");let $S=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Ca](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])}[Ur](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)}[Fr](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[Br](e){return this.tableId.get(e)}[Gr](e,t,n){if(e===null)return this.root={id:"root",label:t,start:n,nodes:[]},this[Ca](this.root),this.root.id;const a=this[Fr](e),s=`${t}-${Math.random()}`,o={id:s,parent:e,start:n,label:t,nodes:[]};return a.nodes.push(o),this[Ca](o),s}start(e,t,n=Date.now()){return this[Gr](e,t,n)}stop(e,t=Date.now()){const n=this[Br](e);n&&(n.stop=t,n.diff=n.stop-n.start||0,this[Ur](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 jS(t)}};var KS=$S,Ks={exports:{}},ps={exports:{}},Ua,Vr;function WS(){if(Vr)return Ua;Vr=1;var e=1e3,t=e*60,n=t*60,a=n*24,s=a*7,o=a*365.25;Ua=function(d,u){u=u||{};var y=typeof d;if(y==="string"&&d.length>0)return r(d);if(y==="number"&&isFinite(d))return u.long?l(d):c(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function r(d){if(d=String(d),!(d.length>100)){var u=/^(-?(?:\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(u){var y=parseFloat(u[1]),T=(u[2]||"ms").toLowerCase();switch(T){case"years":case"year":case"yrs":case"yr":case"y":return y*o;case"weeks":case"week":case"w":return y*s;case"days":case"day":case"d":return y*a;case"hours":case"hour":case"hrs":case"hr":case"h":return y*n;case"minutes":case"minute":case"mins":case"min":case"m":return y*t;case"seconds":case"second":case"secs":case"sec":case"s":return y*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return}}}}function c(d){var u=Math.abs(d);return u>=a?Math.round(d/a)+"d":u>=n?Math.round(d/n)+"h":u>=t?Math.round(d/t)+"m":u>=e?Math.round(d/e)+"s":d+"ms"}function l(d){var u=Math.abs(d);return u>=a?m(d,u,a,"day"):u>=n?m(d,u,n,"hour"):u>=t?m(d,u,t,"minute"):u>=e?m(d,u,e,"second"):d+" ms"}function m(d,u,y,T){var g=u>=y*1.5;return Math.round(d/y)+" "+T+(g?"s":"")}return Ua}function zS(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=s,n.enabled=r,n.humanize=WS(),n.destroy=m,Object.keys(e).forEach(d=>{n[d]=e[d]}),n.names=[],n.skips=[],n.formatters={};function t(d){let u=0;for(let y=0;y<d.length;y++)u=(u<<5)-u+d.charCodeAt(y),u|=0;return n.colors[Math.abs(u)%n.colors.length]}n.selectColor=t;function n(d){let u,y=null,T,g;function f(..._){if(!f.enabled)return;const h=f,O=Number(new Date),w=O-(u||O);h.diff=w,h.prev=u,h.curr=O,u=O,_[0]=n.coerce(_[0]),typeof _[0]!="string"&&_.unshift("%O");let R=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(v,P)=>{if(v==="%%")return"%";R++;const I=n.formatters[P];if(typeof I=="function"){const F=_[R];v=I.call(h,F),_.splice(R,1),R--}return v}),n.formatArgs.call(h,_),(h.log||n.log).apply(h,_)}return f.namespace=d,f.useColors=n.useColors(),f.color=n.selectColor(d),f.extend=a,f.destroy=n.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(T!==n.namespaces&&(T=n.namespaces,g=n.enabled(d)),g),set:_=>{y=_}}),typeof n.init=="function"&&n.init(f),f}function a(d,u){const y=n(this.namespace+(typeof u>"u"?":":u)+d);return y.log=this.log,y}function s(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let u;const y=(typeof d=="string"?d:"").split(/[\s,]+/),T=y.length;for(u=0;u<T;u++)y[u]&&(d=y[u].replace(/\*/g,".*?"),d[0]==="-"?n.skips.push(new RegExp("^"+d.slice(1)+"$")):n.names.push(new RegExp("^"+d+"$")))}function o(){const d=[...n.names.map(c),...n.skips.map(c).map(u=>"-"+u)].join(",");return n.enable(""),d}function r(d){if(d[d.length-1]==="*")return!0;let u,y;for(u=0,y=n.skips.length;u<y;u++)if(n.skips[u].test(d))return!1;for(u=0,y=n.names.length;u<y;u++)if(n.names[u].test(d))return!0;return!1}function c(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function l(d){return d instanceof Error?d.stack||d.message:d}function m(){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 JS=zS;(function(e,t){t.formatArgs=a,t.save=s,t.load=o,t.useColors=n,t.storage=r(),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 m="color: "+this.color;l.splice(1,0,m,"color: inherit");let d=0,u=0;l[0].replace(/%[a-zA-Z%]/g,y=>{y!=="%%"&&(d++,y==="%c"&&(u=d))}),l.splice(u,0,m)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function o(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof B<"u"&&"env"in B&&(l=B.env.DEBUG),l}function r(){try{return localStorage}catch{}}e.exports=JS(t);const{formatters:c}=e.exports;c.j=function(l){try{return JSON.stringify(l)}catch(m){return"[UnexpectedJSONParseError]: "+m.message}}})(ps,ps.exports);var zc=ps.exports;const XS=bc,ZS=Pc.EventEmitter,eE=ra.inherits,pe=zc("avvio"),{AVV_ERR_READY_TIMEOUT:tE}=Wc,Fa=Symbol.for("plugin-meta");function nE(e,t){return e[Fa]&&e[Fa].name?e[Fa].name:typeof t<"u"&&typeof t!="function"&&t.name?t.name:e.name?e.name:e.toString().split(`
17
- `).slice(0,2).map(n=>n.trim()).join(" -- ")}function aE(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Yt(e,t,n,a,s){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=s===void 0?e._timeout:s,this.name=nE(t,n),this.isAfter=a,this.q=XS(e,sE,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}eE(Yt,ZS);Yt.prototype.exec=function(e,t){const n=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){pe("skipping loading of plugin as parent errored and it is not an after",s),B.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return pe("override errored",s),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,pe("exec",s);let o;const r=l=>{if(a){pe("loading complete",s);return}this._error=l,pe(l?"exec errored":"exec completed",s),a=!0,o&&clearTimeout(o),t(l)};this.timeout>0&&(pe("setting up timeout",s,this.timeout),o=setTimeout(function(){pe("timed out",s),o=null;const l=new tE(s);l.fn=n,r(l)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const c=n(this.server,this.opts,r);c&&typeof c.then=="function"&&(pe("exec: resolving promise",s),c.then(()=>B.nextTick(r),l=>B.nextTick(r,l)))};Yt.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(pe("rejecting promise",this.name,n),this._promise.reject(n)):(pe("resolving promise",this.name),this._promise.resolve()),this._promise=null,B.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=aE(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Yt.prototype.enqueue=function(e,t){pe("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Yt.prototype.finish=function(e,t){pe("finish",this.name,e);const n=()=>{this.loaded||(pe("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(pe("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{pe("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else n();else pe("delayed",this.name),this.q.drain=()=>{pe("drain",this.name),this.q.drain=oE,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function sE(e,t){const n=this;B.nextTick(Ws.bind(n),e,t)}function Ws(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,Ws.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,s=>{this._current.shift(),t(s)})})}function oE(){}Ks.exports=Yt;Ks.exports.loadPlugin=Ws;var rE=Ks.exports;const qr=bc,iE=Pc.EventEmitter,cE=ra.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ba,AVV_ERR_CALLBACK_NOT_FN:en,AVV_ERR_PLUGIN_NOT_VALID:lE,AVV_ERR_ROOT_PLG_BOOTED:mE,AVV_ERR_READY_TIMEOUT:dE}=Wc,uE=KS,Ts=rE,xt=zc("avvio"),Kn=Symbol("kAvvio"),Ga=Symbol("kThenifyDoNotWrap");function pE(e,t,n){const a=t.expose||{},s=a.use||"use",o=a.after||"after",r=a.ready||"ready",c=a.onClose||"onClose",l=a.close||"close";if(e[s])throw new Ba(s);if(e[o])throw new Ba(o);if(e[r])throw new Ba(r);e[s]=function(m,d){return n.use(m,d),this},Object.defineProperty(e,"then",{get:Jc.bind(n)}),e[Kn]=!0,e[o]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Va(m,this)),this)},e[r]=function(m){if(m&&typeof m!="function")throw new en(r,typeof m);return n.ready(m?Va(m,this):void 0)},e[c]=function(m){if(typeof m!="function")throw new en(c,typeof m);return n.onClose(kE(m,this)),this},e[l]=function(m){if(m&&typeof m!="function")throw new en(l,typeof m);return m?(n.close(Va(m,this)),this):n.close()}}function me(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 me)){const a=new me(e,t,n);return e&&pE(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 uE,this._readyQ=qr(this,Xc,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=xr},this._closeQ=qr(this,fE,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=xr},this._doStart=null,this._root=new Ts(this,TE.bind(this),t,!1,0),this._root.once("start",(a,s,o)=>{const r=this.pluginTree.start(null,s,o);this._root.once("loaded",(c,l,m)=>{this.pluginTree.stop(r,m)})}),Ts.loadPlugin.call(this,this._root,a=>{xt("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){a=a||this._error||s}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function TE(e,t,n){this._doStart=n,t.autostart&&this.start()}cE(me,iE);me.prototype.start=function(){return this.started=!0,B.nextTick(this._doStart),this};me.prototype.override=function(e,t,n){return e};function yE(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new lE(typeof e);return e}me.prototype[Kn]=!0;me.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};me.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&B.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(me.prototype,"then",{get:Jc});me.prototype._addPlugin=function(e,t,n){if(e=yE(e),t=t||{},this.booted)throw new mE;const a=this._current[0],s=new Ts(this,e,t,n);if(s.once("start",(o,r,c)=>{const l=this.pluginTree.start(a.name,r,c);s.once("loaded",(m,d,u)=>{this.pluginTree.stop(l,u)})}),a.loaded)throw new Error(s.name,a.name);return a.enqueue(s,o=>{o&&(this._error=o)}),s};me.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,s){Xc.call(this,e,s)}return this};me.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};me.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new en("close",typeof e)}else t=new Promise(function(n,a){e=function(s){if(s)return a(s);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),B.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};me.prototype.ready=function(e){if(e){if(typeof e!="function")throw new en("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(s),this.start();const a=this._current[0].server;function s(o,r,c){o?n(o):t(a),B.nextTick(c)}})};me.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};me.prototype.toJSON=function(){return this.pluginTree.toJSON()};function xr(){}function Jc(){if(this.booted){xt("thenify returning null because we are already booted");return}if(this[Ga]){this[Ga]=!1;return}return xt("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Ga]=!0,e(this._server)),t)}function Xc(e,t){const n=this._server,a=this._error;let s;if(this._error=null,e.length===0)this._error=a,s=e(),s&&!s[Kn]&&typeof s.then=="function"?s.then(()=>B.nextTick(t),o=>B.nextTick(t,o)):B.nextTick(t);else if(e.length===1)s=e(a),s&&!s[Kn]&&typeof s.then=="function"?s.then(()=>B.nextTick(t),o=>B.nextTick(t,o)):B.nextTick(t);else if(this._timeout===0){const o=r=>{this._error=r,t(this._error)};e.length===2?e(a,o):e(a,n,o)}else gE.call(this,e,a,n,t)}function gE(e,t,n,a){const s=e.name;xt("setting up ready timeout",s,this._timeout);let o=setTimeout(()=>{xt("timed out",s),o=null;const c=new dE(s);c.fn=e,this._error=c,a(c)},this._timeout);e.length===2?e(t,r.bind(this)):e(t,n,r.bind(this));function r(c){o&&(clearTimeout(o),this._error=c,a(this._error))}}function fE(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let s;a?s=e(n):s=e(this._error),s&&typeof s.then=="function"?(xt("resolving close/onClose promise"),s.then(()=>B.nextTick(t),o=>B.nextTick(t,o))):B.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function kE(e,t){return n.bind(t);function n(a,s){let o;e.length===0?(o=e(),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e.length===1?(o=e(this),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e(this,s)}}function Va(e,t){return n.bind(t);function n(a,s){let o;e?e.length===0?(o=e(),o&&o.then?o.then(function(){B.nextTick(s,a)},s):B.nextTick(s,a)):e.length===1?(o=e(a),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e.length===2?e(a,s):e(a,this,s):B.nextTick(s)}}Fs.exports=me;Fs.exports.express=function(e){return me(e,{expose:{use:"load"}})};var hE=Fs.exports;const _E=Kh(hE);(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 s=n?window.performance.now():new Date().getTime(),o=Math.max(0,16-(s-t)),r=window.setTimeout(function(){a(s+o)},o);return t=s+o,r},window.cancelAnimationFrame=clearTimeout}})();function SE(e,t=!0,n=!0,a={friendsTab:"enabled"}){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",o=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",r=_E(Object.create({}),{autostart:!1});return r.use(Oh,{hideFriends:a.hideFriends,skipOnboarding:a.skipOnboarding,betPack:a.betPack,friendsTab:a.friendsTab,theme:a.theme,themeMode:a.themeMode}),r.use(hh,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),r.use(bh,{videoPlayerController:a==null?void 0:a.videoPlayerController}),r.use(Nh,{onContentActivate:a==null?void 0:a.onContentActivate,withAd:a==null?void 0:a.withAd,withAdNotification:a==null?void 0:a.withAdNotification}),r.use(Gk,{sdkKey:e,host:s,analyticsHost:o,version:a==null?void 0:a.version}),r.use(Qk),r.use(Eh),r.use(Fh),r.use(uh),r.use($h),r.after((c,l,m)=>{if(c)throw c;l.ready(),m()}),n&&r.after(async(c,l,m)=>{if(c)throw c;await l.sdk.initializeApp(),m()}),r.onClose(()=>{console.log("close")}),r}const EE=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,hideFriends:c,skipOnboarding:l,withAdNotification:m,withAd:d,friendsTab:u,betPack:y})=>{const[T,g]=Js.useState(null);return Js.useEffect(()=>{let f=!1;if(!e)return console.error("streamlayer sdk key should be provided"),g(h=>(h!==null&&typeof h.disableApp=="function"&&h.disableApp(),null)),()=>{f=!0};const _=SE(e,n,a,{version:"1.14.2",onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,skipOnboarding:l,withAdNotification:m,withAd:d,hideFriends:c,friendsTab:u,betPack:y});if(t)for(const h of t)_.use(h);return _.ready().then(h=>{f||(g(h.sdk),typeof window<"u")}).catch(h=>console.log(h)),()=>{f=!0,_.close(function(h){if(h)throw h})}},[e,n]),T};exports.AutoPlayVideo=zn;exports.CloseTimerAuto=Si;exports.ConnectError=j;exports.CtaIconMode=fi;exports.InvitationFrom=Bn;exports.NotificationEnabled=Un;exports.NotificationPromotionImagePosition=yi;exports.NotificationPromotionMode=Ti;exports.NotificationSponsorLogoMode=gi;exports.PickHistoryStatus=At;exports.PromotionButtonType=hi;exports.PromotionLogoMode=_i;exports.PromotionType=oe;exports.QuestionImages=lt;exports.QuestionStatus=z;exports.QuestionType=M;exports.SdkOverlayType=$;exports.createContextKey=za;exports.global=Ja;exports.pino_1=Wr;exports.unsafeStringify=qi;exports.useStreamLayerApp=EE;exports.v4=Gn;
17
+ `).slice(0,2).map(n=>n.trim()).join(" -- ")}function aE(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Yt(e,t,n,a,s){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=s===void 0?e._timeout:s,this.name=nE(t,n),this.isAfter=a,this.q=XS(e,sE,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}eE(Yt,ZS);Yt.prototype.exec=function(e,t){const n=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){pe("skipping loading of plugin as parent errored and it is not an after",s),B.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return pe("override errored",s),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,pe("exec",s);let o;const r=l=>{if(a){pe("loading complete",s);return}this._error=l,pe(l?"exec errored":"exec completed",s),a=!0,o&&clearTimeout(o),t(l)};this.timeout>0&&(pe("setting up timeout",s,this.timeout),o=setTimeout(function(){pe("timed out",s),o=null;const l=new tE(s);l.fn=n,r(l)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const c=n(this.server,this.opts,r);c&&typeof c.then=="function"&&(pe("exec: resolving promise",s),c.then(()=>B.nextTick(r),l=>B.nextTick(r,l)))};Yt.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(pe("rejecting promise",this.name,n),this._promise.reject(n)):(pe("resolving promise",this.name),this._promise.resolve()),this._promise=null,B.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=aE(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Yt.prototype.enqueue=function(e,t){pe("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Yt.prototype.finish=function(e,t){pe("finish",this.name,e);const n=()=>{this.loaded||(pe("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(pe("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{pe("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else n();else pe("delayed",this.name),this.q.drain=()=>{pe("drain",this.name),this.q.drain=oE,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function sE(e,t){const n=this;B.nextTick(Ws.bind(n),e,t)}function Ws(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,Ws.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,s=>{this._current.shift(),t(s)})})}function oE(){}Ks.exports=Yt;Ks.exports.loadPlugin=Ws;var rE=Ks.exports;const qr=bc,iE=Pc.EventEmitter,cE=ra.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ba,AVV_ERR_CALLBACK_NOT_FN:en,AVV_ERR_PLUGIN_NOT_VALID:lE,AVV_ERR_ROOT_PLG_BOOTED:mE,AVV_ERR_READY_TIMEOUT:dE}=Wc,uE=KS,Ts=rE,xt=zc("avvio"),Kn=Symbol("kAvvio"),Ga=Symbol("kThenifyDoNotWrap");function pE(e,t,n){const a=t.expose||{},s=a.use||"use",o=a.after||"after",r=a.ready||"ready",c=a.onClose||"onClose",l=a.close||"close";if(e[s])throw new Ba(s);if(e[o])throw new Ba(o);if(e[r])throw new Ba(r);e[s]=function(m,d){return n.use(m,d),this},Object.defineProperty(e,"then",{get:Jc.bind(n)}),e[Kn]=!0,e[o]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Va(m,this)),this)},e[r]=function(m){if(m&&typeof m!="function")throw new en(r,typeof m);return n.ready(m?Va(m,this):void 0)},e[c]=function(m){if(typeof m!="function")throw new en(c,typeof m);return n.onClose(kE(m,this)),this},e[l]=function(m){if(m&&typeof m!="function")throw new en(l,typeof m);return m?(n.close(Va(m,this)),this):n.close()}}function me(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 me)){const a=new me(e,t,n);return e&&pE(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 uE,this._readyQ=qr(this,Xc,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=xr},this._closeQ=qr(this,fE,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=xr},this._doStart=null,this._root=new Ts(this,TE.bind(this),t,!1,0),this._root.once("start",(a,s,o)=>{const r=this.pluginTree.start(null,s,o);this._root.once("loaded",(c,l,m)=>{this.pluginTree.stop(r,m)})}),Ts.loadPlugin.call(this,this._root,a=>{xt("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){a=a||this._error||s}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function TE(e,t,n){this._doStart=n,t.autostart&&this.start()}cE(me,iE);me.prototype.start=function(){return this.started=!0,B.nextTick(this._doStart),this};me.prototype.override=function(e,t,n){return e};function yE(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new lE(typeof e);return e}me.prototype[Kn]=!0;me.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};me.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&B.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(me.prototype,"then",{get:Jc});me.prototype._addPlugin=function(e,t,n){if(e=yE(e),t=t||{},this.booted)throw new mE;const a=this._current[0],s=new Ts(this,e,t,n);if(s.once("start",(o,r,c)=>{const l=this.pluginTree.start(a.name,r,c);s.once("loaded",(m,d,u)=>{this.pluginTree.stop(l,u)})}),a.loaded)throw new Error(s.name,a.name);return a.enqueue(s,o=>{o&&(this._error=o)}),s};me.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,s){Xc.call(this,e,s)}return this};me.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};me.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new en("close",typeof e)}else t=new Promise(function(n,a){e=function(s){if(s)return a(s);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),B.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};me.prototype.ready=function(e){if(e){if(typeof e!="function")throw new en("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(s),this.start();const a=this._current[0].server;function s(o,r,c){o?n(o):t(a),B.nextTick(c)}})};me.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};me.prototype.toJSON=function(){return this.pluginTree.toJSON()};function xr(){}function Jc(){if(this.booted){xt("thenify returning null because we are already booted");return}if(this[Ga]){this[Ga]=!1;return}return xt("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Ga]=!0,e(this._server)),t)}function Xc(e,t){const n=this._server,a=this._error;let s;if(this._error=null,e.length===0)this._error=a,s=e(),s&&!s[Kn]&&typeof s.then=="function"?s.then(()=>B.nextTick(t),o=>B.nextTick(t,o)):B.nextTick(t);else if(e.length===1)s=e(a),s&&!s[Kn]&&typeof s.then=="function"?s.then(()=>B.nextTick(t),o=>B.nextTick(t,o)):B.nextTick(t);else if(this._timeout===0){const o=r=>{this._error=r,t(this._error)};e.length===2?e(a,o):e(a,n,o)}else gE.call(this,e,a,n,t)}function gE(e,t,n,a){const s=e.name;xt("setting up ready timeout",s,this._timeout);let o=setTimeout(()=>{xt("timed out",s),o=null;const c=new dE(s);c.fn=e,this._error=c,a(c)},this._timeout);e.length===2?e(t,r.bind(this)):e(t,n,r.bind(this));function r(c){o&&(clearTimeout(o),this._error=c,a(this._error))}}function fE(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let s;a?s=e(n):s=e(this._error),s&&typeof s.then=="function"?(xt("resolving close/onClose promise"),s.then(()=>B.nextTick(t),o=>B.nextTick(t,o))):B.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function kE(e,t){return n.bind(t);function n(a,s){let o;e.length===0?(o=e(),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e.length===1?(o=e(this),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e(this,s)}}function Va(e,t){return n.bind(t);function n(a,s){let o;e?e.length===0?(o=e(),o&&o.then?o.then(function(){B.nextTick(s,a)},s):B.nextTick(s,a)):e.length===1?(o=e(a),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e.length===2?e(a,s):e(a,this,s):B.nextTick(s)}}Fs.exports=me;Fs.exports.express=function(e){return me(e,{expose:{use:"load"}})};var hE=Fs.exports;const _E=Kh(hE);(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 s=n?window.performance.now():new Date().getTime(),o=Math.max(0,16-(s-t)),r=window.setTimeout(function(){a(s+o)},o);return t=s+o,r},window.cancelAnimationFrame=clearTimeout}})();function SE(e,t=!0,n=!0,a={friendsTab:"enabled"}){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",o=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",r=_E(Object.create({}),{autostart:!1});return r.use(Oh,{hideFriends:a.hideFriends,skipOnboarding:a.skipOnboarding,betPack:a.betPack,friendsTab:a.friendsTab,theme:a.theme,themeMode:a.themeMode}),r.use(hh,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),r.use(bh,{videoPlayerController:a==null?void 0:a.videoPlayerController}),r.use(Nh,{onContentActivate:a==null?void 0:a.onContentActivate,withAd:a==null?void 0:a.withAd,withAdNotification:a==null?void 0:a.withAdNotification}),r.use(Gk,{sdkKey:e,host:s,analyticsHost:o,version:a==null?void 0:a.version}),r.use(Qk),r.use(Eh),r.use(Fh),r.use(uh),r.use($h),r.after((c,l,m)=>{if(c)throw c;l.ready(),m()}),n&&r.after(async(c,l,m)=>{if(c)throw c;await l.sdk.initializeApp(),m()}),r.onClose(()=>{console.log("close")}),r}const EE=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,hideFriends:c,skipOnboarding:l,withAdNotification:m,withAd:d,friendsTab:u,betPack:y})=>{const[T,g]=Js.useState(null);return Js.useEffect(()=>{let f=!1;if(!e)return console.error("streamlayer sdk key should be provided"),g(h=>(h!==null&&typeof h.disableApp=="function"&&h.disableApp(),null)),()=>{f=!0};const _=SE(e,n,a,{version:"1.14.3",onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,skipOnboarding:l,withAdNotification:m,withAd:d,hideFriends:c,friendsTab:u,betPack:y});if(t)for(const h of t)_.use(h);return _.ready().then(h=>{f||(g(h.sdk),typeof window<"u")}).catch(h=>console.log(h)),()=>{f=!0,_.close(function(h){if(h)throw h})}},[e,n]),T};exports.AutoPlayVideo=zn;exports.CloseTimerAuto=Si;exports.ConnectError=j;exports.CtaIconMode=fi;exports.InvitationFrom=Bn;exports.NotificationEnabled=Un;exports.NotificationPromotionImagePosition=yi;exports.NotificationPromotionMode=Ti;exports.NotificationSponsorLogoMode=gi;exports.PickHistoryStatus=At;exports.PromotionButtonType=hi;exports.PromotionLogoMode=_i;exports.PromotionType=oe;exports.QuestionImages=lt;exports.QuestionStatus=z;exports.QuestionType=M;exports.SdkOverlayType=$;exports.createContextKey=za;exports.global=Ja;exports.pino_1=Wr;exports.unsafeStringify=qi;exports.useStreamLayerApp=EE;exports.v4=Gn;
@@ -14,4 +14,4 @@
14
14
  `),c=`
15
15
  `+n+(o.length?s("│"):" ")+" ";return n+r.join(c)+`
16
16
  `+o.map(function(l,m){var d=m===o.length-1,u=l.nodes&&l.nodes.length,y=n+(d?" ":s("│"))+" ";return n+s(d?"└":"├")+s("─")+s(u?"┬":"─")+" "+e(l,y,a).slice(n.length+2)}).join("")};const jS=YS,Ur=Symbol("avvio.TimeTree.untrackNode"),Ca=Symbol("avvio.TimeTree.trackNode"),Fr=Symbol("avvio.TimeTree.getParent"),Br=Symbol("avvio.TimeTree.getNode"),Gr=Symbol("avvio.TimeTree.addNode");let $S=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Ca](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])}[Ur](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)}[Fr](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[Br](e){return this.tableId.get(e)}[Gr](e,t,n){if(e===null)return this.root={id:"root",label:t,start:n,nodes:[]},this[Ca](this.root),this.root.id;const a=this[Fr](e),s=`${t}-${Math.random()}`,o={id:s,parent:e,start:n,label:t,nodes:[]};return a.nodes.push(o),this[Ca](o),s}start(e,t,n=Date.now()){return this[Gr](e,t,n)}stop(e,t=Date.now()){const n=this[Br](e);n&&(n.stop=t,n.diff=n.stop-n.start||0,this[Ur](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 jS(t)}};var KS=$S,Ks={exports:{}},ps={exports:{}},Ua,Vr;function WS(){if(Vr)return Ua;Vr=1;var e=1e3,t=e*60,n=t*60,a=n*24,s=a*7,o=a*365.25;Ua=function(d,u){u=u||{};var y=typeof d;if(y==="string"&&d.length>0)return r(d);if(y==="number"&&isFinite(d))return u.long?l(d):c(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function r(d){if(d=String(d),!(d.length>100)){var u=/^(-?(?:\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(u){var y=parseFloat(u[1]),T=(u[2]||"ms").toLowerCase();switch(T){case"years":case"year":case"yrs":case"yr":case"y":return y*o;case"weeks":case"week":case"w":return y*s;case"days":case"day":case"d":return y*a;case"hours":case"hour":case"hrs":case"hr":case"h":return y*n;case"minutes":case"minute":case"mins":case"min":case"m":return y*t;case"seconds":case"second":case"secs":case"sec":case"s":return y*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return}}}}function c(d){var u=Math.abs(d);return u>=a?Math.round(d/a)+"d":u>=n?Math.round(d/n)+"h":u>=t?Math.round(d/t)+"m":u>=e?Math.round(d/e)+"s":d+"ms"}function l(d){var u=Math.abs(d);return u>=a?m(d,u,a,"day"):u>=n?m(d,u,n,"hour"):u>=t?m(d,u,t,"minute"):u>=e?m(d,u,e,"second"):d+" ms"}function m(d,u,y,T){var g=u>=y*1.5;return Math.round(d/y)+" "+T+(g?"s":"")}return Ua}function zS(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=s,n.enabled=r,n.humanize=WS(),n.destroy=m,Object.keys(e).forEach(d=>{n[d]=e[d]}),n.names=[],n.skips=[],n.formatters={};function t(d){let u=0;for(let y=0;y<d.length;y++)u=(u<<5)-u+d.charCodeAt(y),u|=0;return n.colors[Math.abs(u)%n.colors.length]}n.selectColor=t;function n(d){let u,y=null,T,g;function f(..._){if(!f.enabled)return;const h=f,O=Number(new Date),w=O-(u||O);h.diff=w,h.prev=u,h.curr=O,u=O,_[0]=n.coerce(_[0]),typeof _[0]!="string"&&_.unshift("%O");let R=0;_[0]=_[0].replace(/%([a-zA-Z%])/g,(v,P)=>{if(v==="%%")return"%";R++;const I=n.formatters[P];if(typeof I=="function"){const F=_[R];v=I.call(h,F),_.splice(R,1),R--}return v}),n.formatArgs.call(h,_),(h.log||n.log).apply(h,_)}return f.namespace=d,f.useColors=n.useColors(),f.color=n.selectColor(d),f.extend=a,f.destroy=n.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(T!==n.namespaces&&(T=n.namespaces,g=n.enabled(d)),g),set:_=>{y=_}}),typeof n.init=="function"&&n.init(f),f}function a(d,u){const y=n(this.namespace+(typeof u>"u"?":":u)+d);return y.log=this.log,y}function s(d){n.save(d),n.namespaces=d,n.names=[],n.skips=[];let u;const y=(typeof d=="string"?d:"").split(/[\s,]+/),T=y.length;for(u=0;u<T;u++)y[u]&&(d=y[u].replace(/\*/g,".*?"),d[0]==="-"?n.skips.push(new RegExp("^"+d.slice(1)+"$")):n.names.push(new RegExp("^"+d+"$")))}function o(){const d=[...n.names.map(c),...n.skips.map(c).map(u=>"-"+u)].join(",");return n.enable(""),d}function r(d){if(d[d.length-1]==="*")return!0;let u,y;for(u=0,y=n.skips.length;u<y;u++)if(n.skips[u].test(d))return!1;for(u=0,y=n.names.length;u<y;u++)if(n.names[u].test(d))return!0;return!1}function c(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function l(d){return d instanceof Error?d.stack||d.message:d}function m(){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 JS=zS;(function(e,t){t.formatArgs=a,t.save=s,t.load=o,t.useColors=n,t.storage=r(),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 m="color: "+this.color;l.splice(1,0,m,"color: inherit");let d=0,u=0;l[0].replace(/%[a-zA-Z%]/g,y=>{y!=="%%"&&(d++,y==="%c"&&(u=d))}),l.splice(u,0,m)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function o(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof B<"u"&&"env"in B&&(l=B.env.DEBUG),l}function r(){try{return localStorage}catch{}}e.exports=JS(t);const{formatters:c}=e.exports;c.j=function(l){try{return JSON.stringify(l)}catch(m){return"[UnexpectedJSONParseError]: "+m.message}}})(ps,ps.exports);var zc=ps.exports;const XS=bc,ZS=Pc.EventEmitter,eE=ra.inherits,pe=zc("avvio"),{AVV_ERR_READY_TIMEOUT:tE}=Wc,Fa=Symbol.for("plugin-meta");function nE(e,t){return e[Fa]&&e[Fa].name?e[Fa].name:typeof t<"u"&&typeof t!="function"&&t.name?t.name:e.name?e.name:e.toString().split(`
17
- `).slice(0,2).map(n=>n.trim()).join(" -- ")}function aE(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Yt(e,t,n,a,s){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=s===void 0?e._timeout:s,this.name=nE(t,n),this.isAfter=a,this.q=XS(e,sE,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}eE(Yt,ZS);Yt.prototype.exec=function(e,t){const n=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){pe("skipping loading of plugin as parent errored and it is not an after",s),B.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return pe("override errored",s),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,pe("exec",s);let o;const r=l=>{if(a){pe("loading complete",s);return}this._error=l,pe(l?"exec errored":"exec completed",s),a=!0,o&&clearTimeout(o),t(l)};this.timeout>0&&(pe("setting up timeout",s,this.timeout),o=setTimeout(function(){pe("timed out",s),o=null;const l=new tE(s);l.fn=n,r(l)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const c=n(this.server,this.opts,r);c&&typeof c.then=="function"&&(pe("exec: resolving promise",s),c.then(()=>B.nextTick(r),l=>B.nextTick(r,l)))};Yt.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(pe("rejecting promise",this.name,n),this._promise.reject(n)):(pe("resolving promise",this.name),this._promise.resolve()),this._promise=null,B.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=aE(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Yt.prototype.enqueue=function(e,t){pe("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Yt.prototype.finish=function(e,t){pe("finish",this.name,e);const n=()=>{this.loaded||(pe("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(pe("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{pe("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else n();else pe("delayed",this.name),this.q.drain=()=>{pe("drain",this.name),this.q.drain=oE,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function sE(e,t){const n=this;B.nextTick(Ws.bind(n),e,t)}function Ws(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,Ws.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,s=>{this._current.shift(),t(s)})})}function oE(){}Ks.exports=Yt;Ks.exports.loadPlugin=Ws;var rE=Ks.exports;const qr=bc,iE=Pc.EventEmitter,cE=ra.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ba,AVV_ERR_CALLBACK_NOT_FN:en,AVV_ERR_PLUGIN_NOT_VALID:lE,AVV_ERR_ROOT_PLG_BOOTED:mE,AVV_ERR_READY_TIMEOUT:dE}=Wc,uE=KS,Ts=rE,xt=zc("avvio"),Kn=Symbol("kAvvio"),Ga=Symbol("kThenifyDoNotWrap");function pE(e,t,n){const a=t.expose||{},s=a.use||"use",o=a.after||"after",r=a.ready||"ready",c=a.onClose||"onClose",l=a.close||"close";if(e[s])throw new Ba(s);if(e[o])throw new Ba(o);if(e[r])throw new Ba(r);e[s]=function(m,d){return n.use(m,d),this},Object.defineProperty(e,"then",{get:Jc.bind(n)}),e[Kn]=!0,e[o]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Va(m,this)),this)},e[r]=function(m){if(m&&typeof m!="function")throw new en(r,typeof m);return n.ready(m?Va(m,this):void 0)},e[c]=function(m){if(typeof m!="function")throw new en(c,typeof m);return n.onClose(kE(m,this)),this},e[l]=function(m){if(m&&typeof m!="function")throw new en(l,typeof m);return m?(n.close(Va(m,this)),this):n.close()}}function me(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 me)){const a=new me(e,t,n);return e&&pE(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 uE,this._readyQ=qr(this,Xc,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=xr},this._closeQ=qr(this,fE,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=xr},this._doStart=null,this._root=new Ts(this,TE.bind(this),t,!1,0),this._root.once("start",(a,s,o)=>{const r=this.pluginTree.start(null,s,o);this._root.once("loaded",(c,l,m)=>{this.pluginTree.stop(r,m)})}),Ts.loadPlugin.call(this,this._root,a=>{xt("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){a=a||this._error||s}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function TE(e,t,n){this._doStart=n,t.autostart&&this.start()}cE(me,iE);me.prototype.start=function(){return this.started=!0,B.nextTick(this._doStart),this};me.prototype.override=function(e,t,n){return e};function yE(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new lE(typeof e);return e}me.prototype[Kn]=!0;me.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};me.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&B.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(me.prototype,"then",{get:Jc});me.prototype._addPlugin=function(e,t,n){if(e=yE(e),t=t||{},this.booted)throw new mE;const a=this._current[0],s=new Ts(this,e,t,n);if(s.once("start",(o,r,c)=>{const l=this.pluginTree.start(a.name,r,c);s.once("loaded",(m,d,u)=>{this.pluginTree.stop(l,u)})}),a.loaded)throw new Error(s.name,a.name);return a.enqueue(s,o=>{o&&(this._error=o)}),s};me.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,s){Xc.call(this,e,s)}return this};me.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};me.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new en("close",typeof e)}else t=new Promise(function(n,a){e=function(s){if(s)return a(s);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),B.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};me.prototype.ready=function(e){if(e){if(typeof e!="function")throw new en("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(s),this.start();const a=this._current[0].server;function s(o,r,c){o?n(o):t(a),B.nextTick(c)}})};me.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};me.prototype.toJSON=function(){return this.pluginTree.toJSON()};function xr(){}function Jc(){if(this.booted){xt("thenify returning null because we are already booted");return}if(this[Ga]){this[Ga]=!1;return}return xt("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Ga]=!0,e(this._server)),t)}function Xc(e,t){const n=this._server,a=this._error;let s;if(this._error=null,e.length===0)this._error=a,s=e(),s&&!s[Kn]&&typeof s.then=="function"?s.then(()=>B.nextTick(t),o=>B.nextTick(t,o)):B.nextTick(t);else if(e.length===1)s=e(a),s&&!s[Kn]&&typeof s.then=="function"?s.then(()=>B.nextTick(t),o=>B.nextTick(t,o)):B.nextTick(t);else if(this._timeout===0){const o=r=>{this._error=r,t(this._error)};e.length===2?e(a,o):e(a,n,o)}else gE.call(this,e,a,n,t)}function gE(e,t,n,a){const s=e.name;xt("setting up ready timeout",s,this._timeout);let o=setTimeout(()=>{xt("timed out",s),o=null;const c=new dE(s);c.fn=e,this._error=c,a(c)},this._timeout);e.length===2?e(t,r.bind(this)):e(t,n,r.bind(this));function r(c){o&&(clearTimeout(o),this._error=c,a(this._error))}}function fE(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let s;a?s=e(n):s=e(this._error),s&&typeof s.then=="function"?(xt("resolving close/onClose promise"),s.then(()=>B.nextTick(t),o=>B.nextTick(t,o))):B.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function kE(e,t){return n.bind(t);function n(a,s){let o;e.length===0?(o=e(),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e.length===1?(o=e(this),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e(this,s)}}function Va(e,t){return n.bind(t);function n(a,s){let o;e?e.length===0?(o=e(),o&&o.then?o.then(function(){B.nextTick(s,a)},s):B.nextTick(s,a)):e.length===1?(o=e(a),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e.length===2?e(a,s):e(a,this,s):B.nextTick(s)}}Fs.exports=me;Fs.exports.express=function(e){return me(e,{expose:{use:"load"}})};var hE=Fs.exports;const _E=Kh(hE);(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 s=n?window.performance.now():new Date().getTime(),o=Math.max(0,16-(s-t)),r=window.setTimeout(function(){a(s+o)},o);return t=s+o,r},window.cancelAnimationFrame=clearTimeout}})();function SE(e,t=!0,n=!0,a={friendsTab:"enabled"}){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",o=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",r=_E(Object.create({}),{autostart:!1});return r.use(Oh,{hideFriends:a.hideFriends,skipOnboarding:a.skipOnboarding,betPack:a.betPack,friendsTab:a.friendsTab,theme:a.theme,themeMode:a.themeMode}),r.use(hh,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),r.use(bh,{videoPlayerController:a==null?void 0:a.videoPlayerController}),r.use(Nh,{onContentActivate:a==null?void 0:a.onContentActivate,withAd:a==null?void 0:a.withAd,withAdNotification:a==null?void 0:a.withAdNotification}),r.use(Gk,{sdkKey:e,host:s,analyticsHost:o,version:a==null?void 0:a.version}),r.use(Qk),r.use(Eh),r.use(Fh),r.use(uh),r.use($h),r.after((c,l,m)=>{if(c)throw c;l.ready(),m()}),n&&r.after(async(c,l,m)=>{if(c)throw c;await l.sdk.initializeApp(),m()}),r.onClose(()=>{console.log("close")}),r}const EE=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,hideFriends:c,skipOnboarding:l,withAdNotification:m,withAd:d,friendsTab:u,betPack:y})=>{const[T,g]=Js.useState(null);return Js.useEffect(()=>{let f=!1;if(!e)return console.error("streamlayer sdk key should be provided"),g(h=>(h!==null&&typeof h.disableApp=="function"&&h.disableApp(),null)),()=>{f=!0};const _=SE(e,n,a,{version:"1.14.2",onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,skipOnboarding:l,withAdNotification:m,withAd:d,hideFriends:c,friendsTab:u,betPack:y});if(t)for(const h of t)_.use(h);return _.ready().then(h=>{f||(g(h.sdk),typeof window<"u")}).catch(h=>console.log(h)),()=>{f=!0,_.close(function(h){if(h)throw h})}},[e,n]),T};exports.AutoPlayVideo=zn;exports.CloseTimerAuto=Si;exports.ConnectError=j;exports.CtaIconMode=fi;exports.InvitationFrom=Bn;exports.NotificationEnabled=Un;exports.NotificationPromotionImagePosition=yi;exports.NotificationPromotionMode=Ti;exports.NotificationSponsorLogoMode=gi;exports.PickHistoryStatus=At;exports.PromotionButtonType=hi;exports.PromotionLogoMode=_i;exports.PromotionType=oe;exports.QuestionImages=lt;exports.QuestionStatus=z;exports.QuestionType=M;exports.SdkOverlayType=$;exports.createContextKey=za;exports.global=Ja;exports.pino_1=Wr;exports.unsafeStringify=qi;exports.useStreamLayerApp=EE;exports.v4=Gn;
17
+ `).slice(0,2).map(n=>n.trim()).join(" -- ")}function aE(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Yt(e,t,n,a,s){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=s===void 0?e._timeout:s,this.name=nE(t,n),this.isAfter=a,this.q=XS(e,sE,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}eE(Yt,ZS);Yt.prototype.exec=function(e,t){const n=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){pe("skipping loading of plugin as parent errored and it is not an after",s),B.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return pe("override errored",s),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,pe("exec",s);let o;const r=l=>{if(a){pe("loading complete",s);return}this._error=l,pe(l?"exec errored":"exec completed",s),a=!0,o&&clearTimeout(o),t(l)};this.timeout>0&&(pe("setting up timeout",s,this.timeout),o=setTimeout(function(){pe("timed out",s),o=null;const l=new tE(s);l.fn=n,r(l)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const c=n(this.server,this.opts,r);c&&typeof c.then=="function"&&(pe("exec: resolving promise",s),c.then(()=>B.nextTick(r),l=>B.nextTick(r,l)))};Yt.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(pe("rejecting promise",this.name,n),this._promise.reject(n)):(pe("resolving promise",this.name),this._promise.resolve()),this._promise=null,B.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=aE(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Yt.prototype.enqueue=function(e,t){pe("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Yt.prototype.finish=function(e,t){pe("finish",this.name,e);const n=()=>{this.loaded||(pe("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(pe("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{pe("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else n();else pe("delayed",this.name),this.q.drain=()=>{pe("drain",this.name),this.q.drain=oE,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function sE(e,t){const n=this;B.nextTick(Ws.bind(n),e,t)}function Ws(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,Ws.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,s=>{this._current.shift(),t(s)})})}function oE(){}Ks.exports=Yt;Ks.exports.loadPlugin=Ws;var rE=Ks.exports;const qr=bc,iE=Pc.EventEmitter,cE=ra.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ba,AVV_ERR_CALLBACK_NOT_FN:en,AVV_ERR_PLUGIN_NOT_VALID:lE,AVV_ERR_ROOT_PLG_BOOTED:mE,AVV_ERR_READY_TIMEOUT:dE}=Wc,uE=KS,Ts=rE,xt=zc("avvio"),Kn=Symbol("kAvvio"),Ga=Symbol("kThenifyDoNotWrap");function pE(e,t,n){const a=t.expose||{},s=a.use||"use",o=a.after||"after",r=a.ready||"ready",c=a.onClose||"onClose",l=a.close||"close";if(e[s])throw new Ba(s);if(e[o])throw new Ba(o);if(e[r])throw new Ba(r);e[s]=function(m,d){return n.use(m,d),this},Object.defineProperty(e,"then",{get:Jc.bind(n)}),e[Kn]=!0,e[o]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Va(m,this)),this)},e[r]=function(m){if(m&&typeof m!="function")throw new en(r,typeof m);return n.ready(m?Va(m,this):void 0)},e[c]=function(m){if(typeof m!="function")throw new en(c,typeof m);return n.onClose(kE(m,this)),this},e[l]=function(m){if(m&&typeof m!="function")throw new en(l,typeof m);return m?(n.close(Va(m,this)),this):n.close()}}function me(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 me)){const a=new me(e,t,n);return e&&pE(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 uE,this._readyQ=qr(this,Xc,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=xr},this._closeQ=qr(this,fE,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=xr},this._doStart=null,this._root=new Ts(this,TE.bind(this),t,!1,0),this._root.once("start",(a,s,o)=>{const r=this.pluginTree.start(null,s,o);this._root.once("loaded",(c,l,m)=>{this.pluginTree.stop(r,m)})}),Ts.loadPlugin.call(this,this._root,a=>{xt("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){a=a||this._error||s}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function TE(e,t,n){this._doStart=n,t.autostart&&this.start()}cE(me,iE);me.prototype.start=function(){return this.started=!0,B.nextTick(this._doStart),this};me.prototype.override=function(e,t,n){return e};function yE(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new lE(typeof e);return e}me.prototype[Kn]=!0;me.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};me.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&B.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(me.prototype,"then",{get:Jc});me.prototype._addPlugin=function(e,t,n){if(e=yE(e),t=t||{},this.booted)throw new mE;const a=this._current[0],s=new Ts(this,e,t,n);if(s.once("start",(o,r,c)=>{const l=this.pluginTree.start(a.name,r,c);s.once("loaded",(m,d,u)=>{this.pluginTree.stop(l,u)})}),a.loaded)throw new Error(s.name,a.name);return a.enqueue(s,o=>{o&&(this._error=o)}),s};me.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,s){Xc.call(this,e,s)}return this};me.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};me.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new en("close",typeof e)}else t=new Promise(function(n,a){e=function(s){if(s)return a(s);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),B.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};me.prototype.ready=function(e){if(e){if(typeof e!="function")throw new en("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(s),this.start();const a=this._current[0].server;function s(o,r,c){o?n(o):t(a),B.nextTick(c)}})};me.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};me.prototype.toJSON=function(){return this.pluginTree.toJSON()};function xr(){}function Jc(){if(this.booted){xt("thenify returning null because we are already booted");return}if(this[Ga]){this[Ga]=!1;return}return xt("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Ga]=!0,e(this._server)),t)}function Xc(e,t){const n=this._server,a=this._error;let s;if(this._error=null,e.length===0)this._error=a,s=e(),s&&!s[Kn]&&typeof s.then=="function"?s.then(()=>B.nextTick(t),o=>B.nextTick(t,o)):B.nextTick(t);else if(e.length===1)s=e(a),s&&!s[Kn]&&typeof s.then=="function"?s.then(()=>B.nextTick(t),o=>B.nextTick(t,o)):B.nextTick(t);else if(this._timeout===0){const o=r=>{this._error=r,t(this._error)};e.length===2?e(a,o):e(a,n,o)}else gE.call(this,e,a,n,t)}function gE(e,t,n,a){const s=e.name;xt("setting up ready timeout",s,this._timeout);let o=setTimeout(()=>{xt("timed out",s),o=null;const c=new dE(s);c.fn=e,this._error=c,a(c)},this._timeout);e.length===2?e(t,r.bind(this)):e(t,n,r.bind(this));function r(c){o&&(clearTimeout(o),this._error=c,a(this._error))}}function fE(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let s;a?s=e(n):s=e(this._error),s&&typeof s.then=="function"?(xt("resolving close/onClose promise"),s.then(()=>B.nextTick(t),o=>B.nextTick(t,o))):B.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function kE(e,t){return n.bind(t);function n(a,s){let o;e.length===0?(o=e(),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e.length===1?(o=e(this),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e(this,s)}}function Va(e,t){return n.bind(t);function n(a,s){let o;e?e.length===0?(o=e(),o&&o.then?o.then(function(){B.nextTick(s,a)},s):B.nextTick(s,a)):e.length===1?(o=e(a),o&&o.then?o.then(function(){B.nextTick(s)},s):B.nextTick(s)):e.length===2?e(a,s):e(a,this,s):B.nextTick(s)}}Fs.exports=me;Fs.exports.express=function(e){return me(e,{expose:{use:"load"}})};var hE=Fs.exports;const _E=Kh(hE);(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 s=n?window.performance.now():new Date().getTime(),o=Math.max(0,16-(s-t)),r=window.setTimeout(function(){a(s+o)},o);return t=s+o,r},window.cancelAnimationFrame=clearTimeout}})();function SE(e,t=!0,n=!0,a={friendsTab:"enabled"}){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",o=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",r=_E(Object.create({}),{autostart:!1});return r.use(Oh,{hideFriends:a.hideFriends,skipOnboarding:a.skipOnboarding,betPack:a.betPack,friendsTab:a.friendsTab,theme:a.theme,themeMode:a.themeMode}),r.use(hh,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),r.use(bh,{videoPlayerController:a==null?void 0:a.videoPlayerController}),r.use(Nh,{onContentActivate:a==null?void 0:a.onContentActivate,withAd:a==null?void 0:a.withAd,withAdNotification:a==null?void 0:a.withAdNotification}),r.use(Gk,{sdkKey:e,host:s,analyticsHost:o,version:a==null?void 0:a.version}),r.use(Qk),r.use(Eh),r.use(Fh),r.use(uh),r.use($h),r.after((c,l,m)=>{if(c)throw c;l.ready(),m()}),n&&r.after(async(c,l,m)=>{if(c)throw c;await l.sdk.initializeApp(),m()}),r.onClose(()=>{console.log("close")}),r}const EE=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,hideFriends:c,skipOnboarding:l,withAdNotification:m,withAd:d,friendsTab:u,betPack:y})=>{const[T,g]=Js.useState(null);return Js.useEffect(()=>{let f=!1;if(!e)return console.error("streamlayer sdk key should be provided"),g(h=>(h!==null&&typeof h.disableApp=="function"&&h.disableApp(),null)),()=>{f=!0};const _=SE(e,n,a,{version:"1.14.3",onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,skipOnboarding:l,withAdNotification:m,withAd:d,hideFriends:c,friendsTab:u,betPack:y});if(t)for(const h of t)_.use(h);return _.ready().then(h=>{f||(g(h.sdk),typeof window<"u")}).catch(h=>console.log(h)),()=>{f=!0,_.close(function(h){if(h)throw h})}},[e,n]),T};exports.AutoPlayVideo=zn;exports.CloseTimerAuto=Si;exports.ConnectError=j;exports.CtaIconMode=fi;exports.InvitationFrom=Bn;exports.NotificationEnabled=Un;exports.NotificationPromotionImagePosition=yi;exports.NotificationPromotionMode=Ti;exports.NotificationSponsorLogoMode=gi;exports.PickHistoryStatus=At;exports.PromotionButtonType=hi;exports.PromotionLogoMode=_i;exports.PromotionType=oe;exports.QuestionImages=lt;exports.QuestionStatus=z;exports.QuestionType=M;exports.SdkOverlayType=$;exports.createContextKey=za;exports.global=Ja;exports.pino_1=Wr;exports.unsafeStringify=qi;exports.useStreamLayerApp=EE;exports.v4=Gn;
@@ -18419,7 +18419,7 @@ const OE = ({
18419
18419
  f = !0;
18420
18420
  };
18421
18421
  const _ = bE(e, n, a, {
18422
- version: "1.14.2",
18422
+ version: "1.14.3",
18423
18423
  onDeepLinkHandled: s,
18424
18424
  videoPlayerController: o,
18425
18425
  onContentActivate: r,