@streamlayer/react 1.24.3 → 1.24.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.
@@ -53,7 +53,7 @@ view this resource.`}):u.jsx(s1,{}),bp=W.memo(({sdk:e,swipeable:t=!0,onEvent:n=R
53
53
  `}${is.intermediate("xl","lg")`
54
54
  --header-offset: 0px;
55
55
  `}`;const wW="m1ojpy2l",l2=({children:e,style:t})=>u.jsx("div",{className:"StreamLayerSDKTheme",children:u.jsx("div",{className:je("masters-theme",wW),style:t,children:e})});function xW(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function y3(e,t){const n=Ah(e);if(n)throw t.forEach((r,s)=>{n.metadata.append(s,r)}),n;if(!t.has(Jn)&&!e.has(Jn))throw new Ve("protocol error: missing status",de.Internal)}function E3(e,t,n,r){const s=new Headers(n??{});s.set(eg,e?sg:ig),s.set(rg,"1");let i="connect-es/2.0.2";return i=s.has(Zc)?s.get(Zc):s.has(js)?s.get(js):i,s.set(js,i),t!==void 0&&s.set(tg,`${t}m`),s}function LW(e){switch(e){case 400:return de.Internal;case 401:return de.Unauthenticated;case 403:return de.PermissionDenied;case 404:return de.Unimplemented;case 429:return de.Unavailable;case 502:return de.Unavailable;case 503:return de.Unavailable;case 504:return de.Unavailable;default:return de.Unknown}}function C3(e,t){var n;if(e>=200&&e<300)return{foundStatus:t.has(Jn),headerError:Ah(t)};throw new Ve(decodeURIComponent((n=t.get(bh))!==null&&n!==void 0?n:`HTTP ${e}`),LW(e),t)}var un=function(e){return this instanceof un?(this.v=e,this):new un(e)},kW=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),s,i=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),s[Symbol.asyncIterator]=function(){return this},s;function a(m){return function(g){return Promise.resolve(g).then(m,h)}}function o(m,g){r[m]&&(s[m]=function(R){return new Promise(function(y,b){i.push([m,R,y,b])>1||l(m,R)})},g&&(s[m]=g(s[m])))}function l(m,g){try{c(r[m](g))}catch(R){p(i[0][3],R)}}function c(m){m.value instanceof un?Promise.resolve(m.value.v).then(d,h):p(i[0][2],m)}function d(m){l("next",m)}function h(m){l("throw",m)}function p(m,g){m(g),i.shift(),i.length&&l(i[0][0],i[0][1])}};const S3={redirect:"error"};function Z3(e){var t;xW();const n=(t=e.useBinaryFormat)!==null&&t!==void 0?t:!0;return{async unary(r,s,i,a,o,l){const{serialize:c,parse:d}=Wc(r,n,e.jsonOptions,e.binaryOptions);return i=i===void 0?e.defaultTimeoutMs:i<=0?void 0:i,await ug({interceptors:e.interceptors,signal:s,timeoutMs:i,req:{stream:!1,service:r.parent,method:r,requestMethod:"POST",url:vc(e.baseUrl,r),header:E3(n,i,a),contextValues:l??jl(),message:o},next:async h=>{var p;const g=await((p=e.fetch)!==null&&p!==void 0?p:globalThis.fetch)(h.url,Object.assign(Object.assign({},S3),{method:h.requestMethod,headers:h.header,signal:h.signal,body:yc(0,c(h.message))})),{headerError:R}=C3(g.status,g.headers);if(!g.body)throw R!==void 0?R:"missing response body";const y=Vc(g.body).getReader();let b,f;for(;;){const V=await y.read();if(V.done)break;const{flags:A,data:S}=V.value;if((A&Rc)===Rc)throw new Ve("protocol error: received unsupported compressed output",de.Internal);if(A===_s){if(b!==void 0)throw"extra trailer";b=Sc(S);continue}if(f!==void 0)throw new Ve("extra message",de.Unimplemented);f=d(S)}if(b===void 0)throw R!==void 0?R:new Ve("missing trailer",g.headers.has(Jn)?de.Unimplemented:de.Unknown);if(y3(b,g.headers),f===void 0)throw new Ve("missing message",b.has(Jn)?de.Unimplemented:de.Unknown);return{stream:!1,service:r.parent,method:r,header:g.headers,message:f,trailer:b}}})},async stream(r,s,i,a,o,l){const{serialize:c,parse:d}=Wc(r,n,e.jsonOptions,e.binaryOptions);function h(m,g,R,y,b){return kW(this,arguments,function*(){const V=Vc(m).getReader();if(g){if(!(yield un(V.read())).done)throw"extra data for trailers-only";return yield un(void 0)}let A=!1;for(;;){const S=yield un(V.read());if(S.done)break;const{flags:F,data:U}=S.value;if((F&_s)===_s){if(A)throw"extra trailer";A=!0;const Z=Sc(U);y3(Z,y),Z.forEach((v,I)=>R.set(I,v));continue}if(A)throw"extra message";yield yield un(d(U))}if("throwIfAborted"in b&&b.throwIfAborted(),!A)throw"missing trailer"})}async function p(m){if(r.methodKind!="server_streaming")throw"The fetch API does not support streaming request bodies";const g=await m[Symbol.asyncIterator]().next();if(g.done==!0)throw"missing request message";return yc(0,c(g.value))}return i=i===void 0?e.defaultTimeoutMs:i<=0?void 0:i,hg({interceptors:e.interceptors,signal:s,timeoutMs:i,req:{stream:!0,service:r.parent,method:r,requestMethod:"POST",url:vc(e.baseUrl,r),header:E3(n,i,a),contextValues:l??jl(),message:o},next:async m=>{var g;const y=await((g=e.fetch)!==null&&g!==void 0?g:globalThis.fetch)(m.url,Object.assign(Object.assign({},S3),{method:m.requestMethod,headers:m.header,signal:m.signal,body:await p(m.message)})),{foundStatus:b,headerError:f}=C3(y.status,y.headers);if(f!=null)throw f;if(!y.body)throw"missing response body";const V=new Headers;return Object.assign(Object.assign({},m),{header:y.headers,trailer:V,message:h(y.body,b,V,y.headers,m.signal)})}})}}}const Rr=Ce("CiZzdHJlYW1sYXllci9zcG9ydHMvc3BvcnRzX2NvbW1vbi5wcm90bxISc3RyZWFtbGF5ZXIuc3BvcnRzIi0KClBhZ2luYXRpb24SDAoEcGFnZRgBIAEoBRIRCglwYWdlX3NpemUYAiABKAUiJAoEU29ydBINCgVmaWVsZBgBIAEoCRINCgVvcmRlchgCIAEoCSI2CgRNZXRhEg0KBWNvdW50GAEgASgFEgwKBHBhZ2UYAiABKAUSEQoJcGFnZV9zaXplGAMgASgFIjcKBVZlbnVlEgwKBGNpdHkYASABKAkSDwoHY291bnRyeRgCIAEoCRIPCgdz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),Yp=sn(aI,0);function oI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tp={exports:{}},we=Tp.exports={},Et,Ct;function l1(){throw new Error("setTimeout has not been defined")}function c1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Et=setTimeout:Et=l1}catch{Et=l1}try{typeof clearTimeout=="function"?Ct=clearTimeout:Ct=c1}catch{Ct=c1}})();function wp(e){if(Et===setTimeout)return setTimeout(e,0);if((Et===l1||!Et)&&setTimeout)return Et=setTimeout,setTimeout(e,0);try{return Et(e,0)}catch{try{return Et.call(null,e,0)}catch{return Et.call(this,e,0)}}}function lI(e){if(Ct===clearTimeout)return clearTimeout(e);if((Ct===c1||!Ct)&&clearTimeout)return Ct=clearTimeout,clearTimeout(e);try{return Ct(e)}catch{try{return Ct.call(null,e)}catch{return Ct.call(this,e)}}}var zt=[],Bn=!1,hn,jr=-1;function cI(){!Bn||!hn||(Bn=!1,hn.length?zt=hn.concat(zt):jr=-1,zt.length&&xp())}function xp(){if(!Bn){var e=wp(cI);Bn=!0;for(var t=zt.length;t;){for(hn=zt,zt=[];++jr<t;)hn&&hn[jr].run();jr=-1,t=zt.length}hn=null,Bn=!1,lI(e)}}we.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];zt.push(new Lp(e,t)),zt.length===1&&!Bn&&wp(xp)};function Lp(e,t){this.fun=e,this.array=t}Lp.prototype.run=function(){this.fun.apply(null,this.array)};we.title="browser";we.browser=!0;we.env={};we.argv=[];we.version="";we.versions={};function Ot(){}we.on=Ot;we.addListener=Ot;we.once=Ot;we.off=Ot;we.removeListener=Ot;we.removeAllListeners=Ot;we.emit=Ot;we.prependListener=Ot;we.prependOnceListener=Ot;we.listeners=function(e){return[]};we.binding=function(e){throw new Error("process.binding is not supported")};we.cwd=function(){return"/"};we.chdir=function(e){throw new Error("process.chdir is not supported")};we.umask=function(){return 0};var dI=Tp.exports;const he=oI(dI),uI=i9.pino({level:"trace",enabled:typeof window<"u"&&!!window.localStorage.getItem("SL_DEBUG"),browser:{write:e=>{console.log(e)}}}),st=(e,t)=>uI.child({name:e},t);class hI extends Event{slEventBus;constructor(t,n){super(t),this.slEventBus=n}}const pI=st("event-bus");class mI{name;listeners;constructor(t="sl-event-bus"){this.name=t,this.listeners=new Set}emit=(t,n)=>{const r=new hI(this.name,{...n,type:t});pI.debug(r,"Emitting event"),window.dispatchEvent(r)};listen(t){return window.addEventListener(this.name,t),this.listeners.add(t),()=>{this.off(t)}}off(t){window.removeEventListener(this.name,t),this.listeners.delete(t)}destroy=()=>{this.listeners.forEach(t=>{window.removeEventListener(this.name,t),this.listeners.delete(t)}),this.listeners.clear()}}class gI{}var Mt;(function(e){e[e.ONBOARDING=1]="ONBOARDING",e[e.QUESTION=2]="QUESTION",e[e.QUESTION_RESOLVED=3]="QUESTION_RESOLVED"})(Mt||(Mt={}));window.slStore=Object.create(null);class Ns{store;name;constructor(t,n){this.store=t,this.name=n}getStore(){return this.store}}const fI=e=>{const t=Object.keys(e);return _e.computed(t.map(n=>e[n].getStore()),(...n)=>Object.fromEntries(t.map((r,s)=>[r,n[s]])))};class mn extends Ns{getValues=()=>this.getStore().get();getValue=t=>this.getStore().get()[t];setValue=(t,n)=>this.getStore().setKey(t,n);subscribe=(...t)=>this.getStore().subscribe(...t);unsubscribe=()=>this.getStore().off()}const tt=e=>_e.map(e);var xt;(function(e){e.ORGANIZATION="ORGANIZATION",e.STREAM="STREAM"})(xt||(xt={}));const bI={[pe.BETTING]:"betting",[pe.GAMES]:"games",[pe.PUBLIC_CHAT]:"publicChat",[pe.TWITTER]:"twitter"};var nn;(function(e){e.Ready="ready",e.Suspended="suspended"})(nn||(nn={}));const AI=new Set(["equals","clone","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","getType"]);class kp{status;listeners=new Set;constructor(){this.status=_e.atom(nn.Suspended)}registerEventListener(t){this.listeners.add(t)}enable=()=>{this.status.set(nn.Ready)};disable=()=>{this.status.set(nn.Suspended)};fireEvent(t){for(const n of this.listeners.values())try{n.onEvent(t)}catch(r){console.error(r)}}}class Jp{status;source;config;settings;listeners=new Set;settingsKey;constructor({settings:t,...n},r){this.settingsKey=bI[n.type],this.status=_e.atom(nn.Suspended),this.config=new mn(tt(n),`feature:config:${this.settingsKey}`),this.settingsKey!==void 0&&t?.overlaySettings.case===this.settingsKey?this.settings=new mn(tt(t.overlaySettings.value),`feature:settings:${this.settingsKey}`):this.settings=new mn(tt({}),`feature:settings:${this.settingsKey}`),this.source=r}get featureConfig(){return this.config.getStore()}get featureSettings(){return this.settings.getStore()}registerEventListener(t){this.listeners.add(t)}enable=()=>{this.status.set(nn.Ready)};disable=()=>{this.status.set(nn.Suspended)};setFeatureConfig=({settings:t,...n})=>{let r;for(r in n)this.config.setValue(r,n[r]);if(t?.overlaySettings?.case!==void 0&&t?.overlaySettings.case===this.settingsKey){const s=t.overlaySettings.value;if(s!==void 0){let i;for(i in s)!AI.has(i)&&s[i]&&this.settings.setValue(i,s[i])}}};update=(t,n)=>{this.source===xt.STREAM&&n===xt.ORGANIZATION||(this.setFeatureConfig(t),this.source=n)};fireEvent(t){for(const n of this.listeners.values())try{n.onEvent(t)}catch(r){console.error(r)}}}class ct extends Ns{getValue=()=>this.getStore().get();getValues(){throw new Error("not implemented")}setValue=t=>this.getStore().set(t);subscribe=t=>this.getStore().subscribe(t);unsubscribe=()=>this.getStore().off();listen(t){return this.getStore().listen(t)}get(){return this.getStore().get()}}const ke=e=>_e.atom(e);class gt extends Ns{atomStore;constructor(t,n,r){super(t,`api:${n}`),this.atomStore=_e.atom(),r&&t.subscribe(s=>{const i=this.atomStore.get(),a=r(s,i);i!==a&&this.atomStore.set(a)})}getAtomStore=()=>this.atomStore;getValue=()=>new Promise((t,n)=>window.requestAnimationFrame(async()=>{try{const r=this.getStore();if(r.value===void 0)throw new Error("no store");if(!r.key){t(void 0);return}await r.fetch(),t(r.get().data)}catch(r){n(r)}}));getValues=()=>this.getStore().get();setValue=t=>this.getStore().set({loading:!1,data:t?.data});subscribe=t=>this.getStore().subscribe(t);unsubscribe=()=>{throw new Error("not implemented")};invalidate=()=>{this.store.invalidate()};listen=t=>this.getStore().listen(t);get(){throw new Error("not implemented")}key=()=>this.getStore().key;off=()=>this.getStore().off()}const Se=new mI;async function*RI(e,t){for await(const n of t){e.response.message=n,e.received_at=Date.now(),e.id=Date.now();const r={type:"__GRPC_DEVTOOLS_EXTENSION__",data:e};window.postMessage(r),yield n}}const VI=()=>e=>async t=>{const n={id:Date.now(),name:t.url,stream:t.stream,sent_at:Date.now(),request:{header:Object.fromEntries(t.header.entries()),message:t.message},response:{}};try{window.postMessage({type:"__GRPC_DEVTOOLS_EXTENSION__",data:n})}catch(r){console.log("devtools error",r)}try{const r=await e(t);if(n.received_at=Date.now(),n.response.header=Object.fromEntries(r.header.entries()),n.response.trailer=Object.fromEntries(r.trailer.entries()),t.stream){const s={type:"__GRPC_DEVTOOLS_EXTENSION__",data:{...n,stream:!0}};try{window.postMessage(s)}catch(i){console.log("devtools error",i)}return{...r,message:RI(n,r.message)}}else{n.response.message=r.message,n.latency=n.received_at-n.sent_at;const s={type:"__GRPC_DEVTOOLS_EXTENSION__",data:n};try{window.postMessage(s)}catch(i){console.log("devtools error",i)}}return r}catch(r){n.received_at=Date.now(),n.response.trailer={"grpc-status":r.code,"grpc-message":r.rawMessage},n.response.message=r.rawMessage,n.latency=n.received_at-n.sent_at;const s={type:"__GRPC_DEVTOOLS_EXTENSION__",data:n};try{window.postMessage(s)}catch(i){console.log("devtools error",i)}throw r}};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));function Qp(e){return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==="QuotaExceededError"||e.name==="NS_ERROR_DOM_QUOTA_REACHED")}class Hn{delimiter=":";prefix;storage;constructor(t="main",n=window.localStorage){this.prefix=`sl-sdk${this.delimiter}${t}`,this.storage=n}clear=()=>{for(const t in window.localStorage)t.startsWith(this.prefix)&&this.storage.removeItem(t)};generateKey=t=>`${this.prefix}${this.delimiter}${t.join(this.delimiter)}`;write=(...t)=>{const n=t.pop()||"",r=this.generateKey(t);try{this.storage.setItem(r,n)}catch(s){Qp(s)&&this.storage===window.sessionStorage&&(window.sessionStorage.removeItem("slstreamlogs"),this.storage.setItem(r,n))}};read=(...t)=>{const n=this.storage.getItem(this.generateKey(t));return n===null?void 0:n};remove=(...t)=>{this.storage.removeItem(this.generateKey(t))}}var pt;(function(e){e.Init="init",e.Ready="ready",e.Connecting="connecting",e.Connected="connected",e.Disconnected="disconnected",e.Failed="failed",e.Reconnect="reconnect",e.Reconnecting="reconnecting"})(pt||(pt={}));const I3=st("grpc:stream");class yI{params;streamCancel;method;options;headers;listeners;state;store;paramsListener;reconnectTimeout;attempt=0;constructor(t,n,r,s){const i={status:pt.Init,ts:new Date,log:[]};this.state=new mn(tt(i),`subscription:${s.name}:state`),this.options={...s,reconnectDelay:s.reconnectDelay??1e3,reconnectMaxDelay:s.reconnectMaxDelay??3e4,reconnectMaxAttempts:s.reconnectMaxAttempts??10,withStore:s.withStore??!1},this.headers=t,this.listeners=new Map,this.params=r,this.method=n,s.withStore&&(this.store=new ct(ke(null),`subscription:${s.name}:store`)),"subscribe"in r&&typeof r.subscribe=="function"&&(this.paramsListener=r.subscribe(a=>{this.state.getValue("status")===pt.Connected&&(this.addStateLog(`params updated, reconnect => ${JSON.stringify(a)}`),this.reconnect())})),this.updateState(pt.Ready)}updateState=t=>{this.state.setValue("status",t),this.state.setValue("ts",new Date),this.addStateLog(`status => ${t}`)};addStateLog=t=>{const n=this.state.getStore().get().log,r=`${this.options.name} ${new Date().toISOString()}: ${t}`;if(n.push(r),this.state.setValue("log",n),localStorage.getItem("SL_DEBUG")){t.startsWith("received data")?I3.trace({name:this.options.name,attempt:this.attempt},"received data"):I3.trace({name:this.options.name,attempt:this.attempt},t);try{window.sessionStorage.setItem("slstreamlogs",window.sessionStorage.getItem("slstreamlogs")+`
56
- `+r)}catch(s){Qp(s)&&window.sessionStorage.removeItem("slstreamlogs"),window.sessionStorage.setItem("slstreamlogs",r)}}};addListener=(t,n)=>this.listeners.has(t)?(this.addStateLog(`listener '${t}' not added, already exists`),()=>{}):(this.listeners.set(t,n),this.addStateLog(`listener '${t}' added`),()=>this.removeListener(t));removeListener=t=>{this.listeners.delete(t),this.addStateLog(`listener '${t}' removed`)};connect=()=>{this.updateState(pt.Connecting),this.streamCancel&&(this.addStateLog("disconnect prev connection"),this.streamCancel.abort(),this.streamCancel=void 0);const t="get"in this.params&&typeof this.params.get=="function"?this.params.get():this.params;(async()=>{this.streamCancel=new AbortController;try{const n={headers:this.headers.getValues(),signal:this.streamCancel.signal},r=this.method(t,n);for await(const s of r)this.attempt=0,this.onData(s)}catch(n){n instanceof Ve&&n.code!=de.Canceled&&this.onStreamError(n)}})(),this.updateState(pt.Connected)};disconnect=()=>{this.streamCancel&&this.streamCancel.abort(),this.listeners.clear(),this.paramsListener?.(),clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.updateState(pt.Disconnected)};reconnect=()=>{if(this.reconnectTimeout)this.addStateLog("already reconnecting");else if(this.attempt<this.options.reconnectMaxAttempts){this.updateState(pt.Reconnect);const t=Math.min(this.options.reconnectMaxDelay,Math.pow(2,this.attempt)*this.options.reconnectDelay),n=Math.round(t*(1+Math.random())/2);this.reconnectTimeout=setTimeout(()=>{this.attempt++,this.updateState(pt.Reconnecting),this.addStateLog(`reconnect attempt ${this.attempt} after ${n}ms`),this.connect(),this.reconnectTimeout=void 0},n)}else this.addStateLog("max reconnect attempts reached"),this.disconnect()};getStore=()=>this.store?.getStore();onData=t=>{try{this.addStateLog(`received data => ${JSON.stringify(t)}`),this.store&&this.store.setValue(t);for(const[,n]of this.listeners)n(t);this.addStateLog(`data routed to ${this.listeners.size} listeners`)}catch(n){this.addStateLog(`error process data => ${n}`)}};onStreamError=t=>{if(this.addStateLog(`error => ${t?JSON.stringify(t):"undefined"}}`),t!==void 0){if(t instanceof Ve&&t.code!==de.Canceled){this.updateState(pt.Failed),this.state.setValue("error",t),t.code===de.Unknown&&t.cause==="missing trailer"&&(this.attempt=0),this.reconnect();return}this.disconnect()}}}const EI=new Set([de.Unknown,de.Internal,de.DeadlineExceeded,de.ResourceExhausted,de.FailedPrecondition,de.Unavailable,de.DataLoss]),F3=st("grpc:retry"),CI=e=>async t=>{const n=t.contextValues.get(d1.retryAttempts),r=300,s=t.contextValues.get(d1.retryDelay);if(t.stream||n===0)return e(t);F3.trace({url:t.url,attempts:n,maxDelay:s},"retry options");for(let i=0;;i++)try{return await e(t)}catch(a){F3.trace({attempt:i,error:a,url:t.url},"retry attempt");const o=Ve.from(a);if(i>=n||!(o instanceof Ve)||!EI.has(o.code))throw a;const l=Math.min(s,Math.pow(2,i)*r),c=Math.round(l*(1+Math.random())/2);await new Promise(d=>setTimeout(d,c))}},d1={retryAttempts:Cc(10,{description:"Number of attempts to retry"}),retryDelay:Cc(3e4,{description:"Max delay between retries in milliseconds"})},SI=()=>{const e=localStorage.getItem("sl-device-id");if(e)return e;const t=Wn.v4();return localStorage.setItem("sl-device-id",t),t},ZI=()=>navigator.userAgentData?.platform||navigator.platform,vI=e=>e?"webOS":navigator.userAgentData&&navigator.userAgentData.mobile||"ontouchstart"in window||navigator.maxTouchPoints>0?"mobile-web":"desktop-web";class N3{toJsonOptions={emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1};transport;streamTransport;nanoquery;host;$headers;storeCache;interceptors=[];clients;streamClients;subscriptions;opts;constructor(t,n){this.host=t,this.opts=n,this.$headers=new mn(tt({"sl-device-id":SI(),"sl-device-os":ZI(),"sl-platform":vI(n?.webOS)}),"transport:headers"),this.initInterceptors(),this.clients=new Map,this.streamClients=new Map,this.subscriptions=new Map,this.storeCache=new Map;const[r,s,i]=E2.nanoquery({dedupeTime:n?.dedupeTime,revalidateInterval:n?.refetchInterval});this.nanoquery={createFetcherStore:r,createMutatorStore:s,utils:i},this.transport=Z3({baseUrl:t,defaultTimeoutMs:1e4,interceptors:this.interceptors}),this.streamTransport=Z3({baseUrl:t,interceptors:this.interceptors})}addSubscription=(t,n,r)=>{const s=this.subscriptions.get(n);if(s)return s;const i=new yI(this.$headers,t,n,r);return this.subscriptions.set(n,i),i};removeSubscription=t=>{t.disconnect(),this.subscriptions.delete(t.params)};disconnect=()=>{for(const[s,i]of this.subscriptions)i.disconnect(),this.subscriptions.delete(s);this.clients.clear(),this.streamClients.clear(),this.subscriptions.clear();const[t,n,r]=E2.nanoquery({dedupeTime:this.opts?.dedupeTime,revalidateInterval:this.opts?.refetchInterval});this.nanoquery={createFetcherStore:t,createMutatorStore:n,utils:r}};registerInterceptor=t=>{this.interceptors.push(t)};removeInterceptor=t=>{this.interceptors=this.interceptors.filter(n=>n!==t)};getClient=t=>{const n=t.typeName;if(this.clients.has(n))return this.clients.get(n);const r=Ec(t,this.transport);return this.clients.set(n,r),r};getStreamClient=t=>{const n=`stream-${t.typeName}`;if(this.clients.has(n))return this.clients.get(n);const r=Ec(t,this.streamTransport);return this.clients.set(n,r),r};createPromiseClient=(t,{params:n=[],method:r})=>{const s=this.getClient(t),i=r.toString(),a=[t.typeName,i.charAt(0).toLowerCase()+i.slice(1),...Array.isArray(n)?n:[n]],o=[t.typeName,i.charAt(0).toLowerCase()+i.slice(1)];return{client:s,createRequestOptions:l=>{const c=jl();for(const d in l){const h=d1[d];c.set(h,l[d])}return c},queryKey:a,queryKeyStr:o.join("")}};createStreamClient=t=>({client:this.getStreamClient(t)});setSdkKey=t=>{this.$headers.setValue("sdk",t)};setAuth=(t,n)=>{this.$headers.setValue("authorization",t),this.$headers.setValue("sl-user-id",n)};setHeader=(t,n)=>this.$headers.setValue(t,n);getHeader=t=>this.$headers.getValue(t);getHeaders=()=>this.$headers.getValues();initInterceptors=()=>{if(this.interceptors.length!==0)return;const t=n=>r=>{const s=this.$headers.getValues();for(const i in s)r.header.set(i,s[i]);return n(r)};this.interceptors.push(t),window.localStorage.getItem("SL_GRPC_DEVTOOLS")==="true"?this.interceptors.push(VI()):console.warn("SL GRPC DevTools is disabled. To enable, set SL_GRPC_DEVTOOLS to true in localStorage."),this.opts?.retryable&&this.interceptors.push(CI)}}const WI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Gp,{method:"retrieveEventId",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>{if(!a||typeof a!="string")return"";try{return(await n.retrieveEventId({id:a})).data?.id||""}catch{return""}}})},II=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Vr,{method:"getStream",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>a?(await n.getStream({id:a})).data?.attributes:void 0})},FI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Gp,{method:"summary",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>a?(await n.summary({id:a})).data?.attributes:void 0})},NI=(e,t)=>{const{queryKey:n,client:r}=t.createPromiseClient(c2,{method:"me",params:[e]});return t.nanoquery.createFetcherStore(n,{fetcher:async()=>{if(!t.getHeader("authorization"))return{data:void 0};const{data:s}=await r.me({});return{data:s}}})},GI=e=>{const{client:t,createRequestOptions:n}=e.createPromiseClient(c2,{method:"bypassAuth"}),r=n({retryAttempts:0});return({userKey:s,schema:i,init:a,inviterKey:o})=>t.bypassAuth({userKey:s,schema:i,init:a,inviterKey:o},{contextValues:r})},XI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Vr,{method:"get",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async()=>(await n.get({})).data?.attributes})},UI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Vr,{method:"getOrganization",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async()=>{const s=await n.getOrganization({});return s.data?{...s.data.attributes,id:s.data.id}:void 0}})},BI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Vr,{method:"getOrganizationAdvertising",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async()=>(await n.getOrganizationAdvertising({})).data?.attributes})},YI=(e,t,n)=>{e.transport=new N3(t.host,{dedupeTime:1e3*60*5,refetchInterval:1e3*60*5,retryable:!0,webOS:t.webOS}),e.analyticsTransport=new N3(t.analyticsHost),e.sdk.host=e.transport.host,e.transport.setSdkKey(t.sdkKey),e.transport.setHeader("sl-sdk-version",t.version||"-"),e.transport.$headers.subscribe(r=>{e.analyticsTransport.$headers.getStore().set(r)}),e.sdk.onMount({name:"transport"},()=>()=>{e.transport.disconnect(),e.analyticsTransport.disconnect()}),n()};var Tt;(function(e){e.SCHEMA="schema",e.EXTERNAL_TOKEN="eToken",e.TOKEN="token"})(Tt||(Tt={}));class In extends Hn{constructor(){super("user")}setSchema=t=>{this.write(Tt.SCHEMA,t)};getSchema=()=>this.read(Tt.SCHEMA);setToken=t=>{this.write(Tt.TOKEN,t)};getToken=()=>this.read(Tt.TOKEN);setExternalToken=t=>{this.write(Tt.EXTERNAL_TOKEN,t)};getExternalToken=()=>this.read(Tt.EXTERNAL_TOKEN);removeToken=()=>{this.remove(Tt.TOKEN)}}var Lt;(function(e){e.DISABLED="disabled",e.INITIALIZATION="initialization",e.READY="ready",e.FAILED="failed",e.SUSPENDED="suspended"})(Lt||(Lt={}));const TI=e=>{const t=new In,n=new ct(ke(t.getExternalToken()),"userKey"),r=new ct(ke(t.getToken()),"userToken"),s=new gt(NI(r.getStore(),e),"user",({data:a,error:o,loading:l},c)=>{if(!o)return a?.data?.id?a.data.id:l===!1?void 0:c}),i=new gt(XI(r.getStore(),e),"userSettings");return{userKey:n,userToken:r,user:s,userSettings:i}},wI=e=>{const t=new ct(ke(void 0),"providerStreamId"),n=new gt(WI(t.getStore(),e),"slStreamId",i=>i?.data),r=new gt(II(n.getAtomStore(),e),"streamSettings"),s=new gt(FI(n.getAtomStore(),e),"streamSettings");return n.getAtomStore().listen(i=>{(i===""||i===void 0)&&(r.getStore().mutate(void 0),s.getStore().mutate(void 0))}),{providerStreamId:t,slStreamId:n,streamSettings:r,streamSummary:s}},xI=e=>{const t=new ct(ke(void 0),"enabled"),n=new ct(ke(Lt.DISABLED),"status"),r=new gt(UI(t.getStore(),e),"organizationSettings",o=>o?.data?.id),s=new gt(BI(r.getAtomStore(),e),"organizationAdvertising"),i=TI(e),a=wI(e);return{enabled:t,status:n,providerStreamId:a.providerStreamId,slStreamId:a.slStreamId,streamSettings:a.streamSettings,streamSummary:a.streamSummary,user:i.user,userKey:i.userKey,userToken:i.userToken,userSettings:i.userSettings,organizationSettings:r,organizationAdvertising:s}};class LI extends Ns{stores;constructor(t){const n=xI(t),r=fI(n);super(r,"core"),this.stores=n}getValue(){throw new Error("Not implemented")}getValues(){return this.stores}setValue(){throw new Error("Not implemented")}subscribe=t=>{let n;for(n in this.stores){const r=t[n];n in t&&r!==void 0&&this.stores[n].subscribe(t[n])}};unsubscribe=()=>this.getStore().off()}const kI=(e,t,n)=>{e.store=new LI(e.transport),e.stores=e.store.getValues(),e.sdk.enabled=e.stores.enabled.getStore(),e.sdk.status=e.stores.status.getStore(),e.sdk.sdkStore=Object.fromEntries(Object.entries(e.stores).map(([r,s])=>[r,s.getStore()])),e.sdk.organizationStore=()=>e.stores.organizationSettings.getStore(),e.sdk.streamStore=()=>e.stores.streamSettings.getStore(),e.sdk.streamSummary=()=>e.stores.streamSummary.getStore(),e.storeUnsubscribe=()=>{e.store.unsubscribe()},n()},JI=e=>{const{client:t}=e.createPromiseClient(Xp,{method:"list"});return n=>t.list(n)},zp=e=>{const{client:t}=e.createPromiseClient(Xp,{method:"summary"});return n=>t.summary(n)},QI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(c2,{method:"getFriends",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>{if(!a)return[];try{return(await n.getFriends({})).data}catch{return[]}}})},zI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(rt,{method:"get",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>(await n.get({eventId:a})).data?.attributes,revalidateInterval:0,dedupeTime:1e3*60*60})},MI=(e,t,n)=>{const{client:r,queryKey:s}=n.createPromiseClient(rt,{method:"syncQuestion",params:[e,t?"true":""]});return n.nanoquery.createFetcherStore(s,{fetcher:async(i,a,o,l)=>{if(!o||l)return;const c=await r.syncQuestion({filter:{eventId:o}});if(c.data?.attributes?.question?.type!==M.PROMOTION)return c.data?.attributes},dedupeTime:1e3*60*10,revalidateInterval:0})},KI=async(e,t)=>{const{client:n}=t.createPromiseClient(rt,{method:"item",params:[e]});return(await n.item({id:e})).data},HI=(e,t)=>{const{client:n}=t.createStreamClient(rt),r=_e.atom({eventId:e.get()||"",feedId:""});return e.subscribe((s="")=>{r.set({eventId:s,feedId:""})}),t.addSubscription(n.subscription,r,{name:"feedSubscription"})},OI=(e,t)=>{const{client:n}=t.createStreamClient(rt);return t.addSubscription(n.questionSubscription,{questionId:e},{name:"questionSubscription"})},Mp=async(e,t)=>{const{client:n}=t.createPromiseClient(rt,{method:"questionByUser",params:[e]});return(await n.questionByUser({questionId:e})).data?.attributes?.question},Dr=(e,t)=>{const{client:n,queryKey:r,queryKeyStr:s}=t.createPromiseClient(rt,{method:"questionByUser",params:[e]});let i=s;if(typeof e!="object"?i+=e:i+="atom",t.storeCache.has(i))return t.storeCache.get(i);{const a=t.nanoquery.createFetcherStore(r,{fetcher:async(o,l,c)=>(await n.questionByUser({questionId:c})).data?.attributes?.question,dedupeTime:1/0,revalidateInterval:0});return t.storeCache.set(i,a),a}},Kp=async(e,t)=>{if(!e)return;const{client:n}=t.createPromiseClient(rt,{method:"getQuestion",params:[e]}),r=await n.getQuestion({id:e});if(!r.data?.attributes)return;const{options:s,notification:i,...a}=r.data.attributes,o=s?.options.case==="promotion"?s?.options.value:void 0;return{id:a.id,question:a,promotion:o,notification:i}},_I=(e,t,n,r,s,i,a)=>{const{client:o,queryKey:l}=a.createPromiseClient(rt,{method:"list",params:[e,t,i?"true":""]});return a.nanoquery.createFetcherStore(l,{fetcher:async(c,d,h,p,m)=>{if(!h||m)return[];const g=await o.list({eventId:h,filter:{types:p===tn.ALLOWED?[]:[M.FACTOID,M.PROMOTION,M.TWEET],statuses:[Xe.ACTIVE,Xe.RESOLVED]}}),R={eventId:h,userId:n.get(),organizationId:r.get()};for(const y of g.data)s.isQuestionReceived(R,y.id)||(Se.emit("poll",{action:"received",payload:{isAd:y.attributes?.adUnit==ot.UNSET,questionId:y.id,questionType:y.attributes?.type}}),s.saveQuestionReceived(R,y.id));return g.data},dedupeTime:1/0,revalidateInterval:0})},jI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(rt,{method:"list",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>{if(!a)return;const o=(await n.list({eventId:a,filter:{types:[M.PROMOTION],statuses:[Xe.ACTIVE]},pagination:{page:0,pageSize:1}})).data?.[0];if(o.type==="promotion")return Kp(o.id,t)},dedupeTime:1/0,revalidateInterval:0})},DI=(e,t,n,r,s)=>{const{client:i,queryKey:a}=s.createPromiseClient(rt,{method:"betPack",params:[e,t,n]});return s.nanoquery.createFetcherStore(a,{fetcher:async(o,l,c,d,h)=>{if(!c||!d||!h)return{timestamp:Date.now(),data:null};const p=await i.betPack({eventId:c,types:[M.PREDICTION],statuses:[Xe.ACTIVE,Xe.RESOLVED],limit:5,sort:{field:"activated_at",order:"asc"}});return!p.data||!p.data.length?{timestamp:Date.now(),data:null}:{timestamp:Date.now(),data:p.data?.reduce((m,g)=>{const R=g?.attributes?.question;if(!R?.id)return m;const y={eventId:c,userId:d,organizationId:h};return r.isQuestionReceived(y,R.id)||(Se.emit("poll",{action:"received",payload:{isAd:R?.adUnit==ot.UNSET,questionId:R.id,questionType:R.type}}),r.saveQuestionReceived(y,R.id)),R.answers=R.answers.sort((b,f)=>b.id>f.id?1:-1),{...m,[R.id]:R}},{})}},dedupeTime:1/0,revalidateInterval:0})},PI=(e,t,n)=>{const r=_e.batched([t,n],()=>{const a=t.get();if(!a)return;const o=n.get().data?.find(c=>c.id===a?.questionId),l=a?.question?.openedFrom;return o?(o.openedFrom=l,o):a.question}),s=_e.batched(r,a=>a&&a.type==="question"?a.id:void 0),i=Dr(s,e);return{$store:r,$extendedStore:i,updateExtendedQuestion:a=>{const o=i.get().data,l=(c,d)=>{if(!c||!d)return(c||d||[]).sort((g,R)=>g.id>R.id?1:-1);const h=c.sort((g,R)=>g.id>R.id?1:-1),p=d.sort((g,R)=>g.id>R.id?1:-1),m=[];for(let g=0;g<h.length;g++)m.push({...h[g],...p[g],correct:h[g].correct,youVoted:h[g].youVoted,pointsEarned:h[g].pointsEarned});return m};i.mutate({...a,options:o?.options,subject:o?.subject,appearance:o?.appearance,answers:l(o?.answers,a?.answers)})}}};var Fn;(function(e){e.SHOWED="showed",e.EVENT="ev"})(Fn||(Fn={}));class $I extends Hn{constructor(){super("advertisement")}setShowed=t=>{this.write(Fn.SHOWED,t,"true")};isViewed=t=>this.read(Fn.SHOWED,t);fireEvent=(t,n)=>{this.write(Fn.EVENT,n,t,"true")};isEventFired=(t,n)=>this.read(Fn.EVENT,n,t)==="true"}const qI=e=>{const t=e.data?.attributes?.question;if((e.data?.attributes?.feedItem?.type==="promotion"?e.data.attributes.feedItem:void 0)===void 0||!t)return;const{options:n,notification:r,...s}=t,i=n?.options.case==="promotion"?n.options.value:void 0;return{id:s.id,question:s,notification:r,promotion:i}},Br=e=>e.startsWith("http://")||e.startsWith("https://")?new URL(e).toString():e,eF=({gamOptions:e,gamBaseUrl:t})=>{const n=`${t}?`,r=[];for(const s in e){const i=s.replace(/([a-zA-Z])(?=[A-Z])/g,"$1_").toLowerCase(),a=e[s];if(a)if(typeof a=="string")r.push(`${i}=${Br(a)}`);else if(Array.isArray(a))r.push(`${i}=${a.map(Br).join(",")}`);else{const o=Object.entries(a).map(([l,c])=>Array.isArray(c)?`${l}=${c.map(Br).join(",")}`:typeof c=="string"?`${l}=${Br(c)}`:`${l}=${c}`).join("&").replaceAll("=","%3D").replaceAll("&","%26").replaceAll(",","%2C");r.push(`${i}=${o}`)}}return n+r.join("&")},Zn=e=>(e?.promotion?.type===Ae.INGAME_IAB11_LBAR||e?.promotion?.type===Ae.INGAME_IAB21_LBAR)&&!!e.promotion.additionalBanner?.imageUrl,tF=(e,t,n)=>{let r=!1;const s=n.transport,i=st("advertisement"),a=new $I,o=(b,f)=>{a.fireEvent(b,f)},l=(b,f)=>a.isEventFired(b,f),c=tt({}),d=jI(e,s),h=b=>{const f=c.get(),V=f.data?.question.id,A=f.data?.promotion?.type;V&&(c.get()?.isOpened||(c.setKey("isOpened",!0),Se.emit("advertisement",{action:"opened",payload:{id:V,type:A,hasBanner:Zn(f.data),openedFrom:b?.fromNotification?"notification":"auto"}})),b?.fromNotification&&(c.setKey("hasNotification",!1),Se.emit("advertisement",{action:"notification-opened",payload:{id:V,type:A,hasBanner:Zn(f.data)}})))},p=()=>{const b=c.get(),f=b.data?.question.id,V=b.data?.promotion?.type,A=c.get()?.isOpened;f&&!A&&(i.debug({id:f},"markAsViewed: %o"),a.setShowed(f),c.setKey("isOpened",!0),Se.emit("advertisement",{action:"viewed",payload:{id:f,type:V,hasBanner:Zn(b.data)}}))},m=(b,f)=>{f?c.set({loading:!1,error:void 0,data:f,hasNotification:f?.notification?.enabled===dc.NOTIFICATION_ENABLED,close:()=>g(f.question.id),togglePause:V=>R(f.question.id,V),toggleMute:V=>y(f.question.id,V),isViewed:!!a.isViewed(f.question.id),fireEvent:V=>o(b,V),isEventFired:V=>l(b,V)}):(c.setKey("loading",!0),Kp(b,s).then(V=>c.set({loading:!1,error:void 0,data:V,hasNotification:V?.notification?.enabled===dc.NOTIFICATION_ENABLED,close:()=>g(V?.question.id),togglePause:A=>R(V?.question.id,A),toggleMute:A=>y(V?.question.id,A),isViewed:V&&!!a.isViewed(V.question.id),fireEvent:A=>o(b,A),isEventFired:A=>l(b,A)})).catch(V=>c.set({loading:!1,error:V,data:void 0,fireEvent:()=>{},isEventFired:()=>!1})))};c.subscribe((b,f)=>{if(!(b.data?.id===f?.data?.id&&b.isPaused!==f?.isPaused)){if(b.data?.promotion?.type===Ae.EXTERNAL_AD&&!b?.externalAd&&b.data.promotion.adCampaigns?.desktopWebSettings){const V=eF(b.data.promotion.adCampaigns.desktopWebSettings);c.setKey("externalAd",{type:"gam",url:V})}b.data?.promotion&&!b.isOpened&&(Se.emit("advertisement",{action:"received",payload:{id:b.data.question.id,type:b.data.promotion.type,hasNotification:!!b.hasNotification,hasBanner:Zn(b.data),isViewed:!!a.isViewed(b.data.question.id)},skipAnalytics:b.data.question.id===f?.data?.question.id}),b.data.question.id!==f?.data?.question.id&&!a.isViewed(b.data.question.id)&&Se.emit("advertisement",{action:"notification-received",payload:{id:b.data.question.id,type:b.data.promotion.type,hasNotification:!0,hasBanner:Zn(b.data),isViewed:!1}})),!b?.data&&f?.data&&Se.emit("advertisement",{action:"closed",payload:{id:f.data.question.id,type:f.data.promotion?.type,hasNotification:!!f.hasNotification,hasBanner:Zn(f.data),isViewed:!!a.isViewed(f.data.question.id)}})}});const g=b=>{(!b||c.get()?.data?.question.id===b)&&c.set({})},R=(b,f)=>{c.get()?.data?.question.id===b&&c.setKey("isPaused",f)},y=(b,f)=>{c.get()?.data?.question.id===b&&c.setKey("isMuted",f)};return{connect:()=>{r||(r=!0,d.subscribe((b,f)=>{b.data&&(!f?.data||b.data.id!==f.data.id)&&m(b.data.question.id,b.data)}),t.addListener("promotion",b=>{const f=qI(b);if(f){if(f.question.status===Xe.RESOLVED){g(f.question.id),i.debug({promotion:f},"resolved: %o");return}if(f.question.status===Xe.ACTIVE){i.debug({promotion:f},"active: %o"),m(f.question.id,f);return}i.debug({promotion:f},"skip: %o")}}))},hide:g,show:m,open:h,markAsViewed:p,$store:c}};var Rt;(function(e){e.ONBOARDING="onboarding",e.ONBOARDING_IO="onboarding_io",e.QUESTION_RECEIVED="q-received",e.QUESTION_OPENED="q-opened"})(Rt||(Rt={}));class nF extends Hn{constructor(){super("gamification-session",window.sessionStorage)}writeValue=(t,n)=>{this.write(...t,n)};readValue=t=>this.read(...t)}class rF extends Hn{sessionStorage;constructor(){super("gamification"),this.sessionStorage=new nF}saveQuestionReceived=({userId:t,eventId:n,organizationId:r},s)=>{this.write(Rt.QUESTION_RECEIVED,r,t,n,s,"1")};isQuestionReceived=({userId:t,eventId:n,organizationId:r},s)=>!!this.read(Rt.QUESTION_RECEIVED,r,t,n,s);saveQuestionOpened=({userId:t,eventId:n,organizationId:r},s)=>{this.write(Rt.QUESTION_OPENED,r,t,n,s,"1")};isQuestionOpened=({userId:t,eventId:n,organizationId:r},s)=>!!this.read(Rt.QUESTION_OPENED,r,t,n,s);saveOnboardingStatus=({userId:t,eventId:n,organizationId:r},s)=>{this.write(Rt.ONBOARDING,r,t,n,s)};getOnboardingStatus=({userId:t,eventId:n,organizationId:r})=>this.read(Rt.ONBOARDING,r,t,n);setOnboardingInstantOpen=({userId:t,eventId:n,organizationId:r})=>{this.sessionStorage.writeValue([Rt.ONBOARDING_IO,r,t,n],"1")};getOnboardingInstantOpen=({userId:t,eventId:n,organizationId:r})=>this.sessionStorage.readValue([Rt.ONBOARDING_IO,r,t,n])}var tn;(function(e){e.ALLOWED="allowed",e.DISALLOWED="disallowed"})(tn||(tn={}));class sF{slStreamId;organizationId;userId;interactiveAllowed;openedQuestionId;openedQuestion;activeQuestionId;feedList;betPack;moderationId;moderation;feedSubscription;questionSubscription;advertisement;storage;notifications;log;transport;cancels=new Set;constructor(t){this.transport=t.transport,this.log=st("gamification-background"),this.storage=new rF,this.slStreamId=t.stores.slStreamId.getAtomStore(),this.organizationId=t.stores.organizationSettings.getAtomStore(),this.userId=t.stores.user.getAtomStore(),this.moderationId=new ct(ke(void 0),"moderationId").getStore(),this.interactiveAllowed=new ct(ke(tn.DISALLOWED),"interactiveAllowed").getStore(),this.openedQuestionId=new ct(ke(void 0),"openedQuestionId").getStore(),this.notifications=t.notifications,this.moderation=new gt(zI(this.slStreamId,t.transport),"gamification:moderation");const n=!!t.sdk.options.get().betPack;this.feedList=new gt(_I(this.slStreamId,this.interactiveAllowed,this.userId,this.organizationId,this.storage,n,t.transport),"gamification:feedList"),this.betPack=new gt(DI(this.slStreamId,this.userId,this.organizationId,this.storage,t.transport),"gamification:betPack"),this.activeQuestionId=MI(this.slStreamId,n,t.transport),this.openedQuestion=PI(t.transport,this.openedQuestionId,this.feedList.getStore()),this.cancels.add(this.openedQuestionId.listen(r=>{this.log.debug({item:r},"received question"),r?.questionId?(this.log.info("cleanup on close question"),this.questionSubscription!==void 0&&(t.transport.removeSubscription(this.questionSubscription),this.questionSubscription=void 0),this.questionSubscription=OI(r.questionId,t.transport),this.questionSubscription.addListener("feed-subscription-opened-question",s=>{const i=s.data?.attributes?.question;if(this.openedQuestion.updateExtendedQuestion(i),this.betPack&&i?.type===M.PREDICTION&&(i.status===Xe.ACTIVE||i.status===Xe.RESOLVED)){const a=this.betPack.getValues().data?.data||{},o=a?.[i.id];if(o){const l=[],c=o.answers.sort((h,p)=>h.id>p.id?1:-1),d=i.answers.sort((h,p)=>h.id>p.id?1:-1);for(let h=0;h<c.length;h++)l.push({...c[h],...d[h],correct:c[h].correct,youVoted:c[h].youVoted,pointsEarned:c[h].pointsEarned});this.betPack.getStore().mutate({timestamp:Date.now(),data:{...a,[i.id]:{...o,status:i.status,marketClosed:i.marketClosed,activatedAt:i.activatedAt,answerSetAt:i.answerSetAt,answers:l}}})}}}),this.questionSubscription.connect()):(this.log.info("cleanup on close question"),this.questionSubscription!==void 0&&(t.transport.removeSubscription(this.questionSubscription),this.questionSubscription=void 0))})),this.feedSubscription=HI(this.slStreamId,t.transport),this.cancels.add(this.feedSubscription.addListener("bet-pack-update",async r=>{const s=r.data?.attributes?.question;if(this.betPack&&s?.type===M.PREDICTION&&(s.status===Xe.ACTIVE||s.status===Xe.RESOLVED)){const i=this.betPack.getValues().data?.data||{},a=i?.[s.id];if(a)this.betPack.getStore().mutate({timestamp:Date.now(),data:{...i,[s.id]:{...a,status:s.status,marketClosed:s.marketClosed,activatedAt:s.activatedAt,answerSetAt:s.answerSetAt}}});else if(!a&&Object.keys(i).length<5){const o=await Mp(s.id,this.transport);this.betPack.getStore().mutate({timestamp:Date.now(),data:{...i,[s.id]:o}})}}})),this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question",r=>{const s=this.activeQuestionId.get().data?.question?.id,i=r.data?.attributes?.question;if(!(!i||i.type===M.PROMOTION)){if(i.status===Xe.RESOLVED){s===i.id&&this.activeQuestionId.mutate(void 0);return}window.requestAnimationFrame(()=>{this.activeQuestionId.mutate(r.data?.attributes)})}})),this.cancels.add(this.feedSubscription.addListener("moderation update",r=>{window.requestAnimationFrame(()=>{r.data?.attributes?.question===void 0&&r.data?.attributes?.moderation&&this.moderation.invalidate()})})),this.cancels.add(this.activeQuestionId.subscribe((r,s)=>{r.data?.feedItem&&r.data?.feedItem?.id!==s?.data?.feedItem?.id&&t.onQuestionActivate({stage:"activate",id:r.data.feedItem.id,isViewed:!!this.notifications.isViewed(this.getCurrentSessionId({prefix:"notification",entity:r.data.feedItem.id})),hasNotification:!0,type:r.data.feedItem.type}),!r.data?.feedItem&&s?.data?.feedItem&&t.onQuestionActivate({stage:"deactivate",id:s.data.feedItem.id,isViewed:!!this.notifications.isViewed(this.getCurrentSessionId({prefix:"notification",entity:s.data.feedItem.id})),hasNotification:!0,type:s.data.feedItem.type})})),this.feedSubscription.connect(),this.cancels.add(this.interactiveAllowed.listen(()=>{window.requestAnimationFrame(()=>{this.activeQuestionId.invalidate()})})),t.sdk.onMount({name:"gamification-background"},()=>()=>{this.activeQuestionId.off();for(const r of this.cancels)r(),this.cancels.delete(r)}),n||(this.advertisement=tF(this.slStreamId,this.feedSubscription,t))}getCurrentSessionId=t=>{const n=t.eventId||this.slStreamId.get()||"",r=t.userId||this.userId.get()||"",s=t.organizationId||this.organizationId.get()||"",i=t.entity||"",a=t.prefix||"";return[s,n,r,a,i].join(":")};disconnect=()=>{this.feedSubscription?.disconnect(),this.questionSubscription!==void 0&&(this.transport.removeSubscription(this.questionSubscription),this.questionSubscription=void 0)};openQuestion=(t,n)=>{this.openedQuestionId.set({questionId:t,question:n}),this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:t}))};closeQuestion=t=>{this.openedQuestionId.set(void 0),t&&this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:t}))}}class iF{notificationsList;store;timeouts;waitingQueue;activeQueue;options;logger;constructor(t){this.options=t,this.logger=st("notifications"),this.store=new Map,this.timeouts=new Map,this.waitingQueue=new Set,this.activeQueue=new Set,this.notificationsList=ke(new Map)}addToQueue=t=>{if(this.store.has(t.id)){this.logger.debug({notification:t},"skip existed notification: %o");return}const n=t.close,r=t.action;if(this.store.set(t.id,{...t,close:(...s)=>{n&&n(...s),this.closeNotification(t.id)},action:(...s)=>{r&&r(...s),this.closeNotification(t.id,{animateHiding:!1})}}),this.waitingQueue.add(t.id),this.activeQueue.size===this.options.concurrency){const[s]=this.activeQueue;if(this.store.get(s)?.persistent!==!0)this.closeNotification(s);else{const[i]=this.waitingQueue;this.waitingQueue.size>1&&this.closeNotification(i),this.tickWaitingQueue()}}else this.tickWaitingQueue()};tickWaitingQueue=()=>{if(this.activeQueue.size<this.options.concurrency){const[t]=this.waitingQueue;if(!t)return;this.activeQueue.add(t),this.waitingQueue.delete(t),this.logger.debug({job:t},"waiting queue tick"),this.tickActiveQueue(t)}else this.logger.debug({queueSize:this.activeQueue.size,concurrency:this.options.concurrency},"waiting queue tick skipped")};tickActiveQueue=t=>{if(!t)return;const n=this.store.get(t);if(!n){this.logger.debug({notificationId:t},"active queue tick skipped, notification not exist");return}Se.emit("notification",{action:"received",payload:{type:n.type,questionId:n.data.questionId,questionType:n.data.questionType}});const r=setTimeout(()=>{const s=t,i=new Map(this.notificationsList.get());i.set(n.id,n),this.notificationsList.set(i);const a=setTimeout(()=>{this.logger.debug({notificationId:s,delay:n.autoHideDuration||5e3},"notification hiding by autoHideDuration"),this.closeNotification(s)},n.autoHideDuration||5e3);this.timeouts.set(s,a),this.logger.debug({notificationId:s,queue:[...i.values()]},"notification displayed")},n.delay||0);this.timeouts.set(t,r),this.logger.debug({notificationId:t},"active queue tick completed"),this.tickWaitingQueue()};closeNotification=(t,{animateHiding:n=!0}={})=>{const r=new Map(this.notificationsList.get()),s=r.get(t);if(s){const i=!(this.waitingQueue.size>=this.options.concurrency)&&n;s.hiding=i,this.notificationsList.set(r);const a=()=>{const o=new Map(this.notificationsList.get());o.delete(t),this.notificationsList.set(o);const l=this.timeouts.get(t);l!==void 0&&(clearTimeout(l),this.timeouts.delete(t)),this.logger.debug({notificationId:t},"notification hidden"),s.hiding&&Se.emit("notification",{action:"closed",payload:{type:s.type,questionId:s.data.questionId,questionType:s.data.questionType}})};if(i){const o=setTimeout(a,this.options.animationDelay||0);this.timeouts.set(t,o)}else a()}return this.store.delete(t),this.activeQueue.delete(t),this.waitingQueue.delete(t),this.tickWaitingQueue(),this.logger.debug({notificationId:t},"notification hiding"),s};drain=()=>{this.store.clear(),this.timeouts.clear(),this.waitingQueue.clear(),this.activeQueue.clear(),this.notificationsList.off(),this.notificationsList.set(new Map)}}var ms;(function(e){e.OPENED="opened"})(ms||(ms={}));class aF extends Hn{constructor(){super("notification")}setOpened=t=>{this.write(ms.OPENED,t,"true")};isOpened=t=>this.read(ms.OPENED,t);clearNotification=()=>{this.clear()}}class oF{queue;storage;constructor(t={}){this.storage=new aF,this.queue=new iF({concurrency:1,animationDelay:1600,...t})}isViewed=t=>this.storage.isOpened(t);add=t=>{if(!this.isViewed(t.id)){if(t.data&&t.emitEvent){const n=t.action;t.action=(...r)=>{n&&n(...r),Se.emit("notification",{action:"opened",payload:{questionId:t.data.questionId,questionType:t.data.questionType}})}}this.queue.addToQueue(t)}};close=(t,{markAsViewed:n=!0,animateHiding:r}={})=>{this.queue.closeNotification(t,{animateHiding:r}),n&&this.markAsViewed(t)};update=(t,n)=>{const r=this.queue.notificationsList.get()?.get(t);n(r)};getActiveNotification=()=>{const t=this.queue.notificationsList.get();if(!t?.size)return null;for(const n of t.values())if(n.type===Mt.ONBOARDING)return n;return t.values().next().value};getQueueStore=()=>this.queue.notificationsList;markAsViewed=t=>{this.storage.setOpened(t)}}const lF=(e,t,n)=>{e.notifications=new oF(void 0),e.addNotification=e.notifications.add,e.sdk.getNotificationsStore=()=>e.notifications.getQueueStore(),e.sdk.getActiveNotification=()=>e.notifications.getActiveNotification(),e.sdk.onMount({name:"notifications"},()=>()=>{e.notifications.queue.drain()}),n()};var Qn;(function(e){e.UNKNOWN="unknown",e.ALREADY_VOTED="already_voted"})(Qn||(Qn={}));const G3=async(e,t)=>{const{client:n,createRequestOptions:r}=e.createPromiseClient(rt,{method:"submitAnswer"}),s=r({retryAttempts:0});try{return await n.submitAnswer({data:t},{contextValues:s})}catch(i){throw Ve.from(i)?.code===de.AlreadyExists?new Error(Qn.ALREADY_VOTED):new Error(Qn.UNKNOWN)}},Hp=(e,t)=>{const{client:n,createRequestOptions:r}=e.createPromiseClient(rt,{method:"submitInplay"}),s=r({retryAttempts:0});return n.submitInplay({data:{eventId:+t}},{contextValues:s})},cF={pageSize:10},dF=(e,t,n,r,s)=>{let i=0;const a=ke({pageSize:cF.pageSize,page:0}),o=tt({data:[],key:Date.now(),hasMore:!0,loading:void 0,error:void 0}),l=JI(e),c=async()=>{const p=t.get(),m=r?.getStore().get().data?.map(g=>g.slId)||[];if(p&&m?.length){const g=n.get();g&&m.push(g),o.setKey("loading",!0),o.setKey("data",[]);const R=await l({eventId:p,usersIds:m,leaderboardId:""});o.set({data:R.data.map((y,b)=>({...y.attributes,friendsRank:b+1})),hasMore:!1,key:Date.now(),loading:!1}),R.meta&&(i=Math.round(R.meta.count/R.meta.pageSize))}},d=()=>{c()},h=p=>{const m=a.get(),g=p||m.page+1;g<=i&&a.set({...m,page:g})};return _e.onMount(o,()=>{const p=t.listen(c),m=r?.listen(c);return()=>{p(),m?.()}}),{$store:o,fetchMore:h,invalidate:d}};class uF extends Hn{get=this.read;set=this.write;del=this.remove;constructor(){super("deep-link-context",window.sessionStorage)}}const X3="sldl",Gs="sldl_uid",Op="sldl_eid",_p="sldl_e_eid",hF=new Set([Gs,Op,_p]),U3=e=>{const t={},n={};for(const[r,s]of e)hF.has(r)?t[r]=s:n[r]=s;return{result:t,remain:n}},pF=({hash:e,search:t})=>{if(e&&e.includes(X3)){const n=new URLSearchParams(e.substr(1));return{hash:U3(n)}}if(t&&t.includes(X3)){const n=new URLSearchParams(t);return{search:U3(n)}}return null},B3=st("deep_link"),vt={debug:(...e)=>{B3.debug(...e),localStorage.getItem("SL_DEBUG")&&console.log(...e)},trace:(...e)=>{B3.trace(...e),localStorage.getItem("SL_DEBUG")&&console.log(...e)}},mF=(e,t)=>{const{hash:n,search:r}=window.location;if(vt.debug({hash:n,search:r},"get deep link data from"),n||r){const s=pF({hash:n,search:r});if(vt.debug(s,"parse deep link result"),s){const{hash:i,search:a}=s,{result:o,remain:l}=i||a;if(Object.keys(o).length!==0){e.setValue("data",o);const c=Object.keys(l).length!==0;if(i){let d="";c&&(d=`#${new URLSearchParams(l).toString()}`,vt.debug({updatedHash:d},"update hash")),window.history.replaceState(null,"",window.location.pathname+window.location.search+d)}if(a){let d="";c&&(d=`?${new URLSearchParams(l).toString()}`,vt.debug({updatedSearch:d},"update search")),window.history.replaceState(null,"",window.location.pathname+d+window.location.hash)}t(o)}}}e.setValue("parsed",!0)},gF=(e,t,n)=>{const r=new uF,s=r.get("sl-deep-link-store");let i={};if(s)try{i=JSON.parse(s)}catch(o){vt.debug(o)}e.deepLink={$store:new mn(tt(i),"deep-link-context"),getDeepLinkData:()=>{const{data:o,used:l}=e.deepLink.$store.getValues();return{data:o,used:l}},deepLinkUsed:o=>{vt.debug(`logged in with inviterId: ${o}`),e.deepLink.$store.setValue("used",!0)},onDeepLinkHandlers:new Set},e.sdk.getInviter=()=>{const{data:o,used:l}=e.deepLink.getDeepLinkData();return l?o?.[Gs]:void 0},e.sdk.inviteDisplayed=()=>{e.deepLink.$store.getStore().set({}),e.deepLink.$store.getStore().off(),r.del("sl-deep-link-store")},e.deepLink.$store.subscribe(o=>r.set("sl-deep-link-store",JSON.stringify(o))),e.sdk.addDeepLinkHandler=o=>{localStorage.getItem("SL_DEBUG")&&vt.trace("adding deep link handler"),e.deepLink.onDeepLinkHandlers.add(o)},t.onDeepLinkHandled&&e.sdk.addDeepLinkHandler(t.onDeepLinkHandled),e.sdk.removeDeepLinkHandler=o=>{vt.trace("removing deep link handler"),e.deepLink.onDeepLinkHandlers.delete(o)};const a=o=>{e.deepLink.$store.setValue("handled",!0),vt.trace({size:e.deepLink.onDeepLinkHandlers.size},"deep link handled, call callbacks");for(const l of e.deepLink.onDeepLinkHandlers)try{vt.trace("called handler"),l(o)}catch(c){console.error(c)}};mF(e.deepLink.$store,a),n()},fF=st("bypass");class bF extends gI{$coreStore;deepLink;transport;bypassLogin;constructor(t,n,r){super(),this.$coreStore=t,this.deepLink=r,this.transport=n,this.bypassLogin=GI(this.transport),this.connect()}me=async()=>(this.$coreStore.getValues().user.invalidate(),(await this.$coreStore.getValues().user.getValue())?.data);login=async(t,n)=>{this.$coreStore.getValues().userKey.setValue(n);const{used:r,data:s}=this.deepLink?.getDeepLinkData()||{},i=r?"":s?.[Gs];fF.debug({inviterKey:i},"login with inviterKey");const a=await this.bypassLogin({schema:t,userKey:n,inviterKey:i,init:!1}),o=a.meta?.jwt,l=a.data?.id;if(!o||!l)throw new Error("internal: token missing");return a.meta?.inviterKey&&this.deepLink&&this.deepLink.deepLinkUsed(a.meta.inviterKey),this.$coreStore.getValues().user.getStore().mutate({data:a.data}),this.saveUser(o,l),o};isAuthenticated=()=>this.me();logout=()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("",""),new In().clear()};softLogout=()=>{const t=new In;this.transport.setAuth("",""),t.setToken(""),this.reLogin()};reLogin=({skipLogin:t}={skipLogin:!1})=>{const n=new In,r=n.getToken(),s=n.getExternalToken();if(this.$coreStore.getValues().userKey.setValue(s),r)return this.saveUser(r,""),this.me().then(i=>{if(i?.id){const a=i.id;this.saveUser(r,a)}return i});if(s&&!r&&!t){const i=n.getSchema();i&&s&&this.login(i,s).catch(()=>{this.logout()})}};saveUser=(t,n)=>{this.transport.setAuth(t,n),this.$coreStore.getValues().userToken.setValue(t),new In().setToken(t)};connect=()=>{this.transport.registerInterceptor(t=>async n=>{try{return await t(n)}catch(r){throw r.code&&(r.code===7||r.code===16)&&this.transport.getHeader("authorization")&&this.softLogout(),r}})}}const qn=new In,AF=(e,t,n)=>{e.auth=new bF(e.store,e.transport,e.deepLink),e.stores.status.listen(r=>{r===Lt.READY&&e.auth.reLogin()}),e.sdk.userId=e.stores.user.getAtomStore,e.sdk.authorizationBypass=async(r,s)=>{if(!(qn.getSchema()===r&&qn.getExternalToken()===s&&e.transport.getHeader("authorization")))try{console.log("login",r,s),await e.auth.login(r,s),qn.setSchema(r),qn.setExternalToken(s)}catch(i){console.log("login error",i),e.sdk.logout()}},e.sdk.logout=()=>{e.auth.logout(),qn.clear()},e.sdk.getUserStore=()=>e.stores.user.getStore(),e.sdk.isUserAuthorized=()=>e.auth.isAuthenticated(),n()},Y3=st("video_player"),Yr={debug:(...e)=>{Y3.debug(...e),localStorage.getItem("SL_DEBUG")&&console.log(...e)},trace:(...e)=>{Y3.trace(...e),localStorage.getItem("SL_DEBUG")&&console.log(...e)}},RF=(e,t,n)=>{e.videoPlayer={controllers:new Set},e.sdk.addVideoPlayerController=r=>{Yr.trace("adding video player controller"),e.videoPlayer.controllers.add(r)},t.videoPlayerController&&e.sdk.addVideoPlayerController(t.videoPlayerController),e.sdk.removeVideoPlayerController=r=>{Yr.trace("removing video player controller"),e.videoPlayer.controllers.delete(r)},e.sdk.controlVideoPlayer=r=>{Yr.trace("controlling video player");for(const s of e.videoPlayer.controllers){Yr.trace("calling video player controller");try{s(r)}catch(i){console.error(i)}}},n()},VF={[M.FACTOID]:"insight",[M.POLL]:"poll",[M.TRIVIA]:"trivia",[M.PREDICTION]:"prediction",[M.TWEET]:"tweet"},vn=e=>e===Ae.INGAME_IAB11||e===Ae.INGAME_IAB21||e===Ae.NFL_SHOP_OVERLAY||e===Ae.SHOP_OVERLAY,yF=(e,t,n)=>{e.sdk.uiState=tt({}),e.ui={enableAppNotification:function(){e.sdk.uiState.setKey("appNotification",!0)},disableAppNotification:function(){e.sdk.uiState.get().app||e.sdk.uiState.setKey("appNotification",!1)},enableOnboardingNotification:function(){e.sdk.uiState.setKey("onboardingNotification",!0)},disableOnboardingNotification:function(){e.sdk.uiState.setKey("onboardingNotification",!1)},enablePolymarket:function(){e.sdk.uiState.setKey("polymarket",!0)},disablePolymarket:function(){e.sdk.uiState.setKey("polymarket",!1)},enableApp:function(){e.sdk.uiState.set({app:!0,appNotification:!0})},disableApp:function(){e.sdk.uiState.set({...e.sdk.uiState.get(),onboardingNotification:!1,appBanner:!1,appSidebar:!1,appNotification:!1,app:!1})},enableExposedPauseAd:function(){e.sdk.uiState.set({...e.sdk.uiState.get(),exposedPauseAd:!0})},disableExposedPauseAd:function(){e.sdk.uiState.set({...e.sdk.uiState.get(),exposedPauseAd:!1})}},e.sdk.uiHandlers={enablePolymarket:e.ui.enablePolymarket,disablePolymarket:e.ui.disablePolymarket},t.onContentActivate&&(e.ui.onContentActivate=t.onContentActivate);const r=s=>{e.ui.onContentActivate&&e.ui.onContentActivate({...s,type:"advertisement"})};e.onQuestionActivate=({questionType:s,...i})=>{if(e.ui.enableAppNotification(),e.ui.onContentActivate){const a=i.type||s&&VF[s]||"question";e.ui.onContentActivate({...i,type:a})}},e.sdk.onMount({name:"ui"},()=>{const s=o=>{if(o.slEventBus?.type==="exposedPauseAd")switch(o.slEventBus.action){case"enabled":e.ui.enableExposedPauseAd();break;case"disabled":e.ui.disableExposedPauseAd();break}if(o.slEventBus?.type==="app")switch(o.slEventBus.action){case"open":e.ui.enableApp();break;case"close":e.ui.disableApp();break}if(o.slEventBus?.type==="poll"){const l=o.slEventBus.action,{hasBanner:c}=o.slEventBus.payload;switch(l){case"onboardingOpen":e.sdk.uiState.set({app:!0});break;case"opened":e.sdk.uiState.set({...e.sdk.uiState.get(),appBanner:c,appSidebar:!0});break;case"closed":e.sdk.uiState.set({...e.sdk.uiState.get(),appBanner:!1,appSidebar:!1});break}}if(o.slEventBus?.type==="notification"){const l=o.slEventBus.action;if(o.slEventBus.payload.type===Mt.ONBOARDING)switch(l){case"received":e.ui.enableOnboardingNotification();break;case"closed":e.ui.disableOnboardingNotification();break}else switch(l){case"received":e.ui.enableAppNotification();break;case"closed":e.ui.disableAppNotification();break}}if(o.slEventBus?.type==="advertisement"&&t.withAd){const l=o.slEventBus,{hasNotification:c,hasBanner:d,id:h,isViewed:p,type:m}=l.payload;switch(l.action){case"notification-opened":e.sdk.uiState.set({promotionExternalAd:m===Ae.EXTERNAL_AD,promotionBanner:d,promotionNotification:!1,promotionOverlay:vn(m),promotionSidebar:!vn(m)});break;case"received":if(e.sdk.closeFeature(),r({stage:"activate",id:h,hasNotification:c,hasBanner:d,isViewed:p}),!t.withAdNotification){e.sdk.uiState.set({promotionBanner:d,onboardingNotification:e.sdk.uiState.get().onboardingNotification,promotionOverlay:vn(m),promotionSidebar:!vn(m),promotionExternalAd:m===Ae.EXTERNAL_AD});break}c?e.sdk.uiState.set({onboardingNotification:e.sdk.uiState.get().onboardingNotification,promotionNotification:!0}):e.sdk.uiState.set({onboardingNotification:e.sdk.uiState.get().onboardingNotification,promotionBanner:d,promotionOverlay:vn(m),promotionSidebar:!vn(m),promotionExternalAd:m===Ae.EXTERNAL_AD});break;case"closed":e.sdk.uiState.set({...e.sdk.uiState.get(),promotionNotification:!1,promotionBanner:!1,promotionOverlay:!1,promotionExternalAd:!1,promotionSidebar:!1}),r({stage:"deactivate",id:h,hasNotification:c,hasBanner:d,isViewed:p});break}}},i=Se.listen(s),a=e.activeFeature.subscribe(o=>{o||e.ui.disableApp()});return()=>{i(),a()}}),n()},EF=(e,t,n)=>{const r={onMountedFired:!1},s=new Map,i=new Map;e.sdk=Object.create(null),e.sdk.options=tt(t),e.sdk.withAuth=!1,e.sdk.onMount=({name:a,clear:o},l)=>{if(s.has(a)){const c=i.get(a);c&&c(),s.delete(a),i.delete(a)}s.set(a,{cb:l,clear:o}),e?.stores?.enabled?.get()==="on"&&i.set(a,l())},e.ready=()=>{e.stores.enabled.subscribe(a=>{a==="on"&&r.onMountedFired===!1&&(s.forEach(({cb:o},l)=>i.set(l,o())),r.onMountedFired=!0),a!=="on"&&r.onMountedFired===!0&&(i.forEach(o=>o()),i.clear(),s.forEach(({clear:o},l)=>o&&s.delete(l)),r.onMountedFired=!1)})},e.sdk.initializeApp=a=>(e.contextConfig=a,e.stores.enabled.get()==="on"?Promise.resolve({enabled:!0}):(e.storeSubscribe(),e.stores.enabled.setValue("on"),e.stores.status.setValue(Lt.INITIALIZATION),new Promise(o=>{window.requestAnimationFrame(async()=>{try{const l=await e.stores.organizationSettings.getValue();return l?(e.stores.status.setValue(Lt.READY),o({enabled:!!l})):(e.stores.status.setValue(Lt.FAILED),o({err:"failed"}))}catch(l){return e.stores.enabled.setValue(),e.stores.status.setValue(Lt.FAILED),o({err:`${l}`})}})}))),e.sdk.disableApp=()=>{e.stores.enabled.get()==="on"&&(e.stores.enabled.setValue(),e.stores.status.setValue(Lt.DISABLED),e.stores.slStreamId.setValue(),e.stores.providerStreamId.setValue(),e.sdk.closeFeature(!0),e.storeUnsubscribe(),e.transport.disconnect())},e.sdk.createEventSession=(a,o)=>{o?e.stores.slStreamId.getStore().set({loading:!1,data:a}):e.stores.providerStreamId.setValue(a)},n()},CF=(e,t)=>{const{client:n,queryKey:r}=e.createPromiseClient(Vr,{method:"generateDeepLink",params:t});return e.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a,o)=>{if(!a)return{};try{return(await n.generateDeepLink({data:{gamification:!0,externalEventId:o,eventId:a}})).data?.attributes}catch{return}},dedupeTime:1e3*60*60*24,revalidateInterval:0})},SF=(e,{web:t,mobile:n})=>{const{client:r}=e.createPromiseClient(PW,{method:"generate"});return r.generate({web:t,mobile:n})},T3=(e,t)=>{const n=new URLSearchParams(e);for(const[r,s]of Object.entries(t))n.append(r,s);return n.toString()},ZF=(e,t,n,r)=>{const s=tt({});return _e.onMount(s,()=>CF(e,[t,n]).subscribe(async({data:i,loading:a})=>{const o=i===void 0&&a===!1?"https://streamlayer.io":i?.url,l=r.get()||"",c=t.get()||"",d=n.get()||"",h={[Gs]:l,[Op]:c,[_p]:d};if(!a&&o){s.setKey("loading",!0);let p=window.location.search,m=window.location.hash;p&&m||m?p=`?${T3(p,h)}`:m=`#${T3("",h)}`;const g=window.location.origin+window.location.pathname+p+m;try{const R=await SF(e,{web:g,mobile:o});s.set({data:R.data?.link,loading:!1})}catch{s.set({loading:!1,error:"Failed to generate short link",data:void 0})}}else s.setKey("loading",!0)})),{$store:s,fetch}};var Be;(function(e){e.Unset="unset",e.Required="required",e.Optional="optional",e.Completed="completed",e.Disabled="disabled",e.Unavailable="unavailable"})(Be||(Be={}));const vF=(e,t,n,r)=>{const{inplayGame:s}=e.featureSettings.get(),i=t.getCurrentSessionId({prefix:"onboarding"});s&&n.add({type:Mt.ONBOARDING,id:i,action:e.openFeature,close:()=>{e.onboardingProcessed.set(!0)},persistent:!0,autoHideDuration:1e6,data:{questionId:"onboarding",questionType:M.UNSET,onboarding:{...s,instantOpen:!r.getOnboardingInstantOpen({userId:t.userId.get()||"",organizationId:t.organizationId.get()||"",eventId:t.slStreamId.get()||""}),markIstantOpen:()=>{r.setOnboardingInstantOpen({userId:t.userId.get()||"",organizationId:t.organizationId.get()||"",eventId:t.slStreamId.get()||""}),n.update(i,a=>{a?.data?.onboarding&&(a.data.onboarding.instantOpen=!0)})}}}})},Tr=(e,t,n,r,s,i,a,o)=>{try{const l=t.userId.get(),c=t.organizationId.get(),d=t.slStreamId.get();if(!l||!c||!d)return;const h=s.getOnboardingStatus({userId:l,organizationId:c,eventId:d});if(h===Be.Completed||o?.skipOnboarding){e.set(Be.Completed);for(const y of i)y();o?.skipOnboarding&&h!==Be.Completed&&(s.saveOnboardingStatus({organizationId:c,userId:l,eventId:d},Be.Completed),Hp(a,d));return}const p=t.moderation.getStore().value?.data,m=n.featureSettings.get().inplayGame;if(p===void 0||m===void 0)return;const g=p?.options?.onboardingEnabled,R=m?.titleCard?.optIn;g?R?e.set(Be.Required):e.set(Be.Optional):(R?e.set(Be.Unavailable):e.set(Be.Disabled),r.close(t.getCurrentSessionId({prefix:"onboarding"}),{markAsViewed:!1}))}catch(l){console.error(l)}},w3=(e,t,n,r,s)=>{let i=!!s?.skipOnboarding;const a=t.storage,o=ke(Be.Unset);o.subscribe(c=>{c!==Be.Unset&&(c===Be.Optional||c===Be.Required?i===!1&&(vF(e,t,r,a),i=!0):e.onboardingProcessed.set(!0),c===Be.Completed&&t.activeQuestionId.invalidate(),a.setOnboardingInstantOpen({userId:t.userId.get()||"",organizationId:t.organizationId.get()||"",eventId:t.slStreamId.get()||""}))});const l=[];return o.get()!==Be.Completed&&(l.push(t.userId.listen(c=>{c&&Tr(o,t,e,r,a,l,n,s)})),l.push(t.moderation.listen(c=>{c.data&&Tr(o,t,e,r,a,l,n,s)})),l.push(e.featureSettings.listen(c=>{c&&Tr(o,t,e,r,a,l,n,s)}))),Tr(o,t,e,r,a,l,n,s),{$store:o,submitInplay:async()=>{const c=t.slStreamId.get();if(c){await Hp(n,c),o.set(Be.Completed),a.saveOnboardingStatus({organizationId:t.organizationId.get()||"",userId:t.userId.get()||"",eventId:c},Be.Completed),Se.emit("poll",{action:"onboardingPassed",payload:{}}),e.openFeature();const d=t.getCurrentSessionId({prefix:"onboarding"});r.close(d)}}}},WF=(e,t,n,r)=>{const s=tt(void 0),i=zp(r),a=async()=>{const l=e.get(),c=t.get(),d=n?n.getStore().get().data?.map(m=>m.slId):[];if(!d||!l||!c)return;const h={eventId:l,userId:c,leaderboardId:"",usersIds:[...d,c]},p=await i(h);s.set(p.data?.attributes)},o=()=>{a()};return _e.onMount(s,()=>{o();const l=e.listen(a),c=n?.listen(a),d=t.listen(a);return()=>{l(),c?.(),d()}}),{$store:s,invalidate:o}},IF=async(e,t,n,r,s)=>{const i=zp(s),a=e.get(),o=t.get(),l=n?.getStore().get().data?.map(d=>d.slId)||[],c={eventId:a,userId:r,leaderboardId:"",usersIds:[...l,o]};return(await i(c)).data?.attributes?.summary},x3=new Set([M.POLL,M.PREDICTION,M.TRIVIA]);class FF extends Jp{userSummary;feedList;betPack;friends;leaderboardId;leaderboardList;deepLink;onboardingStatus;openedQuestion;currentUserId;openedUser;closeFeature;openFeature;feedSubscription;activeQuestionId;openedQuestionId;advertisement;onboardingProcessed;friendsTabEnabled;skipOnboarding;notifications;transport;background;storage;submitAnswerTimeout;cancels=new Set;onQuestionActivate;constructor(t,n,r){if(super(t,n),this.background=new sF(r),this.advertisement=this.background.advertisement,this.onQuestionActivate=r.onQuestionActivate,this.feedSubscription=this.background.feedSubscription,this.activeQuestionId=this.background.activeQuestionId,this.openedQuestionId=this.background.openedQuestionId,this.storage=this.background.storage,this.feedList=this.background.feedList,this.betPack=this.background.betPack,this.currentUserId=this.background.userId,this.onboardingProcessed=ke(!r.sdk.withAuth),this.leaderboardId=new ct(ke(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.notifications=r.notifications,this.transport=r.transport,this.closeFeature=(s=!0)=>r.sdk.closeFeature(s),this.openFeature=()=>r.sdk.openFeature(pe.GAMES),this.openedQuestion=this.background.openedQuestion,this.deepLink=ZF(this.transport,this.background.slStreamId,r.stores.providerStreamId.getStore(),this.background.userId),this.userSummary=WF(this.background.slStreamId,this.background.userId,this.friends,this.transport),!r.sdk.options.get().hideFriends){this.friends=new gt(QI(this.background.userId,r.transport),"gamification:friends"),this.openedUser=ke(void 0);const s=this.leaderboardList=dF(this.transport,this.background.slStreamId,this.background.userId,this.friends);this.cancels.add(this.userSummary.$store.listen((i,a)=>{a?.summary&&i?.summary&&s.invalidate()}))}this.connect(),this.skipOnboarding=!!r.sdk.options.get().skipOnboarding,this.onboardingStatus=w3(this,this.background,r.transport,r.notifications,{skipOnboarding:r.sdk.options.get().skipOnboarding}),r.sdk.options.get().skipOnboarding||(this.onboardingStatus=w3(this,this.background,r.transport,r.notifications,{skipOnboarding:r.sdk.options.get().skipOnboarding})),this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)),this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)),this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)),this.cancels.add(this.onboardingStatus.$store.listen((s,i)=>{(i===void 0||s!==Be.Unset)&&this.background.activeQuestionId.invalidate()})),this.background.activeQuestionId.listen(this.showInApp),this.friendsTabEnabled=ke(!1),this.cancels.add(r.sdk.options.subscribe(s=>{s.friendsTab==="disabled"?this.friendsTabEnabled.set(!1):s.friendsTab==="enabled"&&this.friendsTabEnabled.set(!0)})),this.cancels.add(this.settings.subscribe(s=>{r.sdk.options.get().friendsTab==="activatedGame"&&this.friendsTabEnabled.set(!!s.inplayGame?.titleCard?.optIn)})),r.sdk.onMount({name:"gamification",clear:!0},()=>()=>{for(const s of this.cancels)s(),this.cancels.delete(s)})}get isInteractiveAllowed(){return this.background.interactiveAllowed.get()===tn.ALLOWED}checkInteractiveFlag=()=>{if(this.skipOnboarding)this.background.interactiveAllowed.set(tn.ALLOWED);else{const t=this.onboardingStatus.$store.get(),n=this.background.moderation.getStore().value?.data?.options?.onboardingEnabled,r=this.settings.getValues().inplayGame?.titleCard?.optIn,s=t===Be.Completed,i=!n||s||r!==!0;this.background.interactiveAllowed.set(i?tn.ALLOWED:tn.DISALLOWED)}};connect=()=>{this.onboardingProcessed.subscribe(t=>{t&&this.advertisement&&this.advertisement.connect()}),this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-prediction-close",async t=>{if(!this.isInteractiveAllowed)return;const n=t.data?.attributes?.question,r=t.data?.attributes?.feedItem;if(!n||!r?.attributes)return;const{status:s,type:i,id:a,answers:o}=n;if(s===Xe.RESOLVED&&i===M.PREDICTION){const l=this.background.getCurrentSessionId({prefix:`notification-id:${a}`}),c=[...this.feedList.getValues().data||[]],d=c.findIndex(V=>V.id===a),h=c[d];let p=h?.attributes?.attributes?.value?.answerId;const m=Dr(a,this.transport),g=m.subscribe(()=>{});await m.fetch();let R=m.get().data;R||(R=await Mp(a,this.transport),m.mutate(R)),g(),window.requestAnimationFrame(()=>{m.invalidate()}),p||(p=R?.answers.find(({youVoted:V})=>V)?.id);const y=o.find(({correct:V})=>V),b=p?o.find(({id:V})=>V===p):void 0,f=!!b?.correct;if(h&&c[d]?.attributes?.attributes.case==="question"){try{c[d].attributes.attributes.value.answerId=p,c[d].attributes.attributes.value.openForVoting=!1,p&&(c[d].attributes.attributes.value.status=f?qt.WON:qt.LOST)}catch{}this.feedList.getStore().mutate(c)}if(!b||!y)return;this.openedQuestionId.get()?.questionId!==n.id&&this.notifications.add({type:Mt.QUESTION_RESOLVED,action:()=>this.openQuestion(n.id,r),close:()=>this.closeQuestion(a),autoHideDuration:f?15e3:14e3,id:l,emitEvent:!1,data:{questionId:a,questionType:M.PREDICTION,question:{title:f?`Congratulations! You answered correctly! You won ${y.points} pts!`:`Better luck next time! Correct: ${y?.text}!`,votedAnswer:{title:b?.text,points:b?.points},correctAnswerTitle:y?.text,correct:!!f,predictionResult:!0,questionTitle:n?.subject},inApp:{notification:n.notification,appearance:n.appearance,sponsorship:n.sponsorship,adUnit:n?.adUnit,sponsorLogo:n.promotion?.sponsor?.logo}}}),this.userSummary.invalidate()}})),_e.onStart(this.feedList.getStore(),()=>{this.cancels.add(this.feedList.subscribe(()=>{}))}),this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list",t=>{const n=[...this.feedList.getStore().value?.data||[]],r=t.data?.attributes?.feedItem,s=n.findIndex(i=>i.id===r?.id);if(r?.attributes&&r.attributes.attributes.case!=="promotion"&&!(r.attributes.status!==Xe.ACTIVE&&r.attributes.status!==Xe.RESOLVED)&&!(!this.isInteractiveAllowed&&x3.has(r.attributes.type)&&r?.attributes?.adUnit!==ot.STANDART)){if(s!==-1)if(r.attributes.attributes.case==="question"&&n[s].attributes?.attributes.case==="question"){const i=n[s];i.attributes&&(n[s]={...n[s],attributes:{...i.attributes,attributes:{...i.attributes.attributes,value:{...i.attributes.attributes.value,...r.attributes.attributes.value,answerId:i.attributes.attributes.value.answerId,status:i.attributes.attributes.value.status,openForVoting:i.attributes.attributes.value.openForVoting===!1?!1:r.attributes.attributes.value.openForVoting}}}})}else{const i=n[s];i.attributes&&r.attributes&&(n[s]={...n[s],attributes:{...i.attributes,attributes:{...i.attributes.attributes,value:{...i.attributes.attributes.value,...r.attributes.attributes.value}}}})}s===-1&&(n.unshift(r),Se.emit("poll",{action:"received",payload:{isAd:r.attributes?.adUnit==ot.UNSET,questionId:r.id,questionType:r.attributes?.type}})),this.feedList.getStore().mutate(n)}}))};disconnect=()=>{this.background.feedSubscription.removeListener("feed-subscription-prediction-close"),this.background.feedSubscription.removeListener("feed-subscription-questions-list")};betPackVote=async(t,n)=>{if(!this.betPack)return;try{await G3(this.transport,{questionId:t,answerId:n})}catch(i){if(i.message===Qn.ALREADY_VOTED){const a=Dr(t,this.transport),o=a.subscribe(()=>{});a.invalidate(),o()}throw i}const r={...this.betPack.getValues().data?.data},s=r?.[t];s&&(Se.emit("poll",{action:"voted",payload:{questionId:t,isAd:s?.adUnit==ot.UNSET,questionType:s.type}}),s.answers=s.answers.map(i=>i.id===n?{...i,youVoted:!0}:i),this.betPack.getStore().mutate({data:r,timestamp:Date.now()}))};submitAnswer=async(t,n)=>{const r=Dr(t,this.transport),s=r.subscribe(()=>{}),i={...r.get().data||{}},a=()=>{const o=this.feedList.getValues().data;if(!o)return;const l=o.findIndex(h=>h.id===t),c=o[l],d=c?.attributes?.attributes.case==="question"&&c.attributes.attributes.value;if(d){Se.emit("poll",{action:"voted",payload:{isAd:c.attributes?.adUnit==ot.UNSET,questionId:t,questionType:d.questionType}});const h=r.get().data;if(s(),h){const p=h.answers.find(y=>y.correct===!0),m=h.answers.findIndex(y=>y.id===n),g=h.answers[m],R=h.answers.every(({percentageDecimal:y},b)=>y===i?.answers[b].percentageDecimal);o[l].attributes.attributes.value.answerId=n,o[l].attributes.attributes.value.openForVoting=!1,o[l].attributes.attributes.value.text=g?.text||"",p&&(o[l].attributes.attributes.value.status=p.id===n?qt.WON:qt.LOST),this.feedList.getStore().mutate([...o]),h.answers[m].correct=p?.id===n,h.answers[m].youVoted=!0,R&&h.answers.forEach(y=>{y.percentageDecimal=0}),p?.id===n&&(h.answers[m].pointsEarned=h.status===Xe.RESOLVED?0:p.points),r.mutate({...h})}this.submitAnswerTimeout&&clearTimeout(this.submitAnswerTimeout),this.submitAnswerTimeout=setTimeout(()=>{this.userSummary.invalidate()},1e3)}};try{await G3(this.transport,{questionId:t,answerId:n}),a()}catch(o){if(o.message===Qn.ALREADY_VOTED){this.userSummary.invalidate();const l=r.subscribe(()=>{});r.invalidate(),l()}throw o}};openQuestion=(t,n)=>{if(!t)return()=>{};const r=n?.openedFrom==="bet-pack";this.notifications.close(this.background.getCurrentSessionId({prefix:"notification",entity:t}),{animateHiding:!1});let s=n?.attributes?.type,i=n?.attributes?.adUnit===ot.STANDART&&!!n?.attributes?.adPromotion?.banner?.imageUrl;if(!s&&!r){const o=(this.feedList.getStore().value?.data||[]).find(l=>l.id===t)?.attributes;s=o?.type,i=o?.adUnit===ot.STANDART&&!!o?.adPromotion?.banner?.imageUrl}const a={eventId:this.background.slStreamId.get()||"",userId:this.background.userId.get()||"",organizationId:this.background.organizationId.get()||""};return Se.emit("poll",{action:"opened",payload:{questionId:t,questionType:s,isAd:n?.attributes?.adUnit==ot.UNSET,questionOpenedFrom:n?.openedFrom==="bet-pack"?"list":n?.openedFrom,hasBanner:i}}),this.storage.isQuestionOpened(a,t)||(Se.emit("poll",{action:"viewed",payload:{questionId:t,questionType:s,isAd:n?.attributes?.adUnit==ot.UNSET,questionOpenedFrom:n?.openedFrom==="bet-pack"?"list":n?.openedFrom}}),this.storage.saveQuestionOpened(a,t)),r||this.openFeature(),this.background.openQuestion(t,n?{...n,openedFrom:n?.openedFrom==="bet-pack"?"list":n?.openedFrom}:void 0)};getFeedItem=t=>KI(t,this.transport);isOpenedQuestion=t=>!!this.notifications.isViewed(t);closeQuestion=t=>(t&&(this.onQuestionActivate({stage:"deactivate",id:t,isViewed:!!this.notifications.isViewed(this.background.getCurrentSessionId({prefix:"notification",entity:t}))}),Se.emit("poll",{action:"closed",payload:{questionId:t}})),this.background.closeQuestion(t));openUser=async t=>{if(!this.leaderboardList)return;const n=this.leaderboardList?.$store.get().data?.find(s=>s.userId===t);if(!n){this.openedUser?.set(n);return}if(n.summaryLoaded){this.openedUser?.set(n);return}const r={...n};try{const s=await IF(this.background.slStreamId,this.background.userId,this.friends,t,this.transport);s?.inTop!==void 0&&(this.leaderboardList?.$store.setKey("data",this.leaderboardList.$store.get().data?.map(i=>(i.userId===t&&(i.inTop=s.inTop),i))),r.inTop=s.inTop)}catch(s){console.error(s)}this.openedUser.set(r)};closeUser=()=>{this.openedUser?.set(void 0)};openOnboarding=()=>{this.openFeature(),Se.emit("poll",{action:"onboardingOpen",payload:{}})};showInApp=t=>{const n=this.onboardingStatus.$store.get(),r=t?.data?.question?.adUnit===ot.STANDART;if(t&&t.data&&(r||n&&n!==Be.Unset)&&t.data.question?.id!==void 0&&t.data.question?.bypassNotifications?.inAppSilence!==Dm.ON&&t.data.question.status===Xe.ACTIVE&&!t.data.question.marketClosed){if(x3.has(t.data.question.type))(this.isInteractiveAllowed||r)&&t.data.question.notification!==void 0&&this.notifications.add({type:Mt.QUESTION,action:()=>this.openQuestion(t.data?.question?.id,t.data?.feedItem),close:()=>this.closeQuestion(t.data?.question?.id),autoHideDuration:1e3*60,id:this.background.getCurrentSessionId({prefix:"notification",entity:t.data.question.id}),emitEvent:!0,data:{questionId:t.data.question.id,questionType:t.data.question.type,question:{title:t.data.question.notification.title},inApp:{notification:t.data.question.notification,appearance:t.data.question.appearance,sponsorship:t.data.question.sponsorship,adUnit:t.data.question?.adUnit,sponsorLogo:t.data.question.promotion?.sponsor?.logo}}});else if(t.data.question.type===M.FACTOID){const s=t.data.question.options?.options.value,i=t.data.question.notification?.useContentTexts===uc.ENABLED?t.data.question.subject:t.data.question.notification?.title||"",a=t.data.question.notification?.useContentTexts===uc.ENABLED?s.body:t.data.question.notification?.body,o={heading:i,body:a,imageMode:s?.imageMode,image:s?.image,video:{id:s?.video?.id||"",url:s?.video?.url||"",thumbnailUrl:s?.video?.thumbnailUrl||""},webLink:{label:"",url:""}};this.notifications.add({type:Mt.QUESTION,action:()=>this.openQuestion(t?.data?.question?.id,t?.data?.feedItem),close:()=>this.closeQuestion(t?.data?.question?.id),autoHideDuration:1e3*120,emitEvent:!0,id:this.background.getCurrentSessionId({prefix:"notification",entity:t.data.question.id}),data:{questionId:t.data.question.id,questionType:t.data.question.type,insight:o,inApp:{useMediaFromContent:s?.useAsNotification===xm.ENABLED,notification:t.data.question.notification,appearance:t.data.question.appearance,sponsorship:t.data.question.sponsorship,adUnit:t.data.question?.adUnit,sponsorLogo:t.data.question.promotion?.sponsor?.logo,isVideo:s?.mode===_m.VIDEO}}})}else if(t.data.question.type===M.TWEET&&t.data.question.notification!==void 0){const s=t.data.question.options?.options.value,i={image:"",video:""};if(s.tweetMeta?.tweet?.meta?.extendedEntities?.media?.[0]){const o=s.tweetMeta.tweet.meta.extendedEntities.media;if(o){const l=o.find(({type:c})=>c==="photo")||o[0];i.image=l.mediaUrlHttps,l.type==="video"&&(i.video=l.url)}}const a={title:t.data.question.notification?.title,body:t.data.question.notification?.body,image:t.data.question.notification?.image,account:s?.tweetMeta?.account||"",accountVerified:!!s?.tweetMeta?.accountVerified,tweet:s?.tweetMeta?.tweet,tweetId:t.data.question.id,tweetMedia:i};this.notifications.add({type:Mt.QUESTION,action:()=>this.openQuestion(t.data?.question?.id,t.data?.feedItem),close:()=>this.closeQuestion(t.data?.question?.id),autoHideDuration:1e3*120,emitEvent:!0,id:this.background.getCurrentSessionId({prefix:"notification",entity:t.data.question.id}),data:{questionId:t.data.question.id,questionType:t.data.question.type,tweet:a,inApp:{notification:t.data.question.notification,appearance:t.data.question.appearance,sponsorship:t.data.question.sponsorship}}})}}}}const NF={[pe.GAMES]:!0};class GF extends Jp{constructor(t,n){super(t,n)}}const XF=(e,t,n)=>e.type===pe.GAMES?new FF(e,t,n):new GF(e,t),UF=(e,t,n)=>{e.features=new Map,e.sdk.featuresList=new ct(ke(new Set),"features-list"),e.activeFeature=new ct(ke(pe.UNSET),"activeFeature"),e.sdk.getFeatures=()=>e.features,e.sdk.getFeature=r=>e.features.get(r),e.sdk.getActiveFeature=()=>e.activeFeature.getStore(),e.sdk.openFeature=r=>{e.sdk.initializeApp().then(()=>{e.activeFeature.setValue(r)})},e.sdk.closeFeature=(r=!1)=>{const s=e.activeFeature.getValue();if(e.activeFeature.setValue(pe.UNSET),r&&s){e.features.delete(s);const i=e.sdk.featuresList.getValue();i&&i.delete(s),e.sdk.featuresList.setValue(i)}},e.initFeature=(r,s=xt.ORGANIZATION)=>{if(r.type in NF&&!e.features.has(r.type)){const i=XF(r,s,e);e.features.set(r.type,i);let a=e.sdk.featuresList.getValue();a?a.add(r.type):a=new Set([r.type]),e.sdk.featuresList.setValue(new Set(a))}},e.updateFeature=(r,s)=>{e.features.get(r.type)?.update(r,s)},e.destroyFeature=r=>{e.features.delete(r.type);const s=e.sdk.featuresList.getValue();s&&s.delete(r.type),e.sdk.featuresList.setValue(new Set(s))},e.reinitializeFeatures=async()=>{const r=await e.stores.organizationSettings.getValue();e.features.clear(),e.sdk.featuresList.setValue(new Set);for(const s of r?.overlays||[])e.initFeature(s,xt.ORGANIZATION)},e.stores.providerStreamId.listen(r=>{r||e.reinitializeFeatures()}),e.storeSubscribe=()=>{const r=(i,a)=>{if(a?.overlays&&!(e.contextConfig?.skipOrganizationSettings&&i===xt.ORGANIZATION))for(const o of a.overlays)o.sdkEnable===!0&&(e.features.has(o.type)?e.updateFeature(o,i):e.initFeature(o,i))},s={organizationSettings:i=>{if(i.data)try{r(xt.ORGANIZATION,i.data)}catch(a){console.log(a)}},streamSettings:i=>{if(i.data)try{r(xt.STREAM,i.data)}catch(a){console.log(a)}}};e.store.subscribe(s)},n()},BF=(e,t,n)=>{const{client:r,queryKey:s}=n.createPromiseClient(eI,{method:"getMarketWithSeries",params:[e,t]});return n.nanoquery.createFetcherStore(s,{fetcher:async(i,a,o,l)=>{if(l)try{return(await r.getMarketWithSeries({eventId:o,timeframe:qW.TIMEFRAME_ALL})).event}catch{return}}})},YF=e=>{const t=e.stores.slStreamId.getAtomStore(),n=e.stores.user.getAtomStore();return BF(t,n,e.transport)};class TF extends kp{marketWithSeries;log;constructor(t){super(),this.log=st("polymarket"),this.marketWithSeries=YF(t)}connect=()=>{this.log.debug("connect")};disconnect=()=>{this.marketWithSeries.off(),this.log.debug("disconnect")}}const wF=(e,t,n)=>{e.sdk.polymarket=new TF(e),e.sdk.onMount({name:"polymarket"},()=>(e.sdk.polymarket.connect(),()=>{e.sdk.polymarket.disconnect()})),n()};function u2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:e.id||null,adId:e.adId||null,sequence:e.sequence||null,apiFramework:e.apiFramework||null,universalAdIds:[],creativeExtensions:[]}}const xF=["ADCATEGORIES","ADCOUNT","ADPLAYHEAD","ADSERVINGID","ADTYPE","APIFRAMEWORKS","APPBUNDLE","ASSETURI","BLOCKEDADCATEGORIES","BREAKMAXADLENGTH","BREAKMAXADS","BREAKMAXDURATION","BREAKMINADLENGTH","BREAKMINDURATION","BREAKPOSITION","CLICKPOS","CLICKTYPE","CLIENTUA","CONTENTID","CONTENTPLAYHEAD","CONTENTURI","DEVICEIP","DEVICEUA","DOMAIN","EXTENSIONS","GDPRCONSENT","IFA","IFATYPE","INVENTORYSTATE","LATLONG","LIMITADTRACKING","MEDIAMIME","MEDIAPLAYHEAD","OMIDPARTNER","PAGEURL","PLACEMENTTYPE","PLAYERCAPABILITIES","PLAYERSIZE","PLAYERSTATE","PODSEQUENCE","REGULATIONS","SERVERSIDE","SERVERUA","TRANSACTIONID","UNIVERSALADID","VASTVERSIONS","VERIFICATIONVENDORS"];function L3(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=[],s=Dp(e);!t.ERRORCODE||n.isCustomCode||/^[0-9]{3}$/.test(t.ERRORCODE)||(t.ERRORCODE=900),t.CACHEBUSTING=qp(Math.round(1e8*Math.random())),t.TIMESTAMP=new Date().toISOString(),t.RANDOM=t.random=t.CACHEBUSTING;for(const i in t)t[i]=$p(t[i]);for(const i in s){const a=s[i];typeof a=="string"&&r.push(jp(a,t))}return r}function jp(e,t){const n=(e=k3(e,t)).match(/[^[\]]+(?=])/g);if(!n)return e;let r=n.filter((s=>xF.indexOf(s)>-1));return r.length===0?e:(r=r.reduce(((s,i)=>(s[i]=-1,s)),{}),k3(e,r))}function k3(e,t){let n=e;for(const r in t){const s=t[r];n=n.replace(new RegExp("(?:\\[|%%)(".concat(r,")(?:\\]|%%)"),"g"),s)}return n}function Dp(e){return Array.isArray(e)?e.map((t=>t&&t.hasOwnProperty("url")?t.url:t)):e}function J3(e){return/^(https?:\/\/|\/\/)/.test(e)}function Q3(e,t){for(let n=0;n<t.length;n++)if(Pp(t[n],e))return!0;return!1}function Pp(e,t){if(e&&t){const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&e.id===t.id&&e.url===t.url}return!1}function $p(e){return encodeURIComponent(e).replace(/[!'()*]/g,(t=>"%".concat(t.charCodeAt(0).toString(16))))}function qp(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8;return e.toString().padStart(t,"0")}const bn={track:function(e,t,n){L3(e,t,n).forEach((r=>{typeof window<"u"&&window!==null&&(new Image().src=r)}))},resolveURLTemplates:L3,extractURLsFromTemplates:Dp,filterUrlTemplates:function(e){return e.reduce(((t,n)=>{const r=n.url||n;return J3(r)?t.validUrls.push(r):t.invalidUrls.push(r),t}),{validUrls:[],invalidUrls:[]})},containsTemplateObject:Q3,isTemplateObjectEqual:Pp,encodeURIComponentRFC3986:$p,replaceUrlMacros:jp,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},flatten:function e(t){return t.reduce(((n,r)=>n.concat(Array.isArray(r)?e(r):r)),[])},joinArrayOfUniqueTemplateObjs:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=Array.isArray(e)?e:[],r=Array.isArray(t)?t:[];return n.concat(r).reduce(((s,i)=>(Q3(i,s)||s.push(i),s)),[])},isValidTimeValue:function(e){return Number.isFinite(e)&&e>=-2},addLeadingZeros:qp,isValidUrl:J3,isBrowserEnvironment:function(){return typeof window<"u"},formatMacrosValues:function(e){return typeof e!="object"?e:JSON.stringify(e)}};function z3(e){return["true","TRUE","True","1"].includes(e)}function LF(e){if(e==null)return-1;if(bn.isNumeric(e))return parseInt(e);const t=e.split(":");if(t.length!==3)return-1;const n=t[2].split(".");let r=parseInt(n[0]);n.length===2&&(r+=parseFloat("0.".concat(n[1])));const s=parseInt(60*t[1]),i=parseInt(60*t[0]*60);return isNaN(i)||isNaN(s)||isNaN(r)||s>3600||r>60?-1:i+s+r}const k={childByName:function(e,t){return Array.from(e.childNodes).find((n=>n.nodeName===t))},childrenByName:function(e,t){return Array.from(e.childNodes).filter((n=>n.nodeName===t))},resolveVastAdTagURI:function(e,t){if(!t)return e;if(e.startsWith("//")){const{protocol:n}=location;return"".concat(n).concat(e)}if(!e.includes("://")){const n=t.slice(0,t.lastIndexOf("/"));return"".concat(n,"/").concat(e)}return e},parseBoolean:z3,parseNodeText:function(e){return e&&(e.textContent||e.text||"").trim()},copyNodeAttribute:function(e,t,n){const r=t.getAttribute(e);r&&n.setAttribute(e,r)},parseAttributes:function(e){return Array.from(e.attributes).reduce(((t,n)=>(t[n.nodeName]=n.nodeValue,t)),{})},parseDuration:LF,getStandAloneAds:function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter((e=>!parseInt(e.sequence,10)))},getSortedAdPods:function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter((e=>parseInt(e.sequence,10))).sort(((e,t)=>e.sequence-t.sequence))},assignAttributes:function(e,t){e&&Array.from(e).forEach((n=>{let{nodeName:r,nodeValue:s}=n;if(r&&s&&t.hasOwnProperty(r)){let i=s;typeof t[r]=="boolean"&&(i=z3(i)),t[r]=i}}))},mergeWrapperAdData:function(e,t){var n;e.errorURLTemplates=t.errorURLTemplates.concat(e.errorURLTemplates),e.impressionURLTemplates=t.impressionURLTemplates.concat(e.impressionURLTemplates),e.extensions=t.extensions.concat(e.extensions),t.viewableImpression.length>0&&(e.viewableImpression=[...e.viewableImpression,...t.viewableImpression]),e.followAdditionalWrappers=t.followAdditionalWrappers,e.allowMultipleAds=t.allowMultipleAds,e.fallbackOnNoAd=t.fallbackOnNoAd;const r=(t.creatives||[]).filter((o=>o&&o.type==="companion")),s=r.reduce(((o,l)=>((l.variations||[]).forEach((c=>{(c.companionClickTrackingURLTemplates||[]).forEach((d=>{bn.containsTemplateObject(d,o)||o.push(d)}))})),o)),[]);e.creatives=r.concat(e.creatives);const i=t.videoClickTrackingURLTemplates&&t.videoClickTrackingURLTemplates.length,a=t.videoCustomClickURLTemplates&&t.videoCustomClickURLTemplates.length;if(e.creatives.forEach((o=>{if(t.trackingEvents&&t.trackingEvents[o.type])for(const l in t.trackingEvents[o.type]){const c=t.trackingEvents[o.type][l];Array.isArray(o.trackingEvents[l])||(o.trackingEvents[l]=[]),o.trackingEvents[l]=o.trackingEvents[l].concat(c)}o.type==="linear"&&(i&&(o.videoClickTrackingURLTemplates=o.videoClickTrackingURLTemplates.concat(t.videoClickTrackingURLTemplates)),a&&(o.videoCustomClickURLTemplates=o.videoCustomClickURLTemplates.concat(t.videoCustomClickURLTemplates)),!t.videoClickThroughURLTemplate||o.videoClickThroughURLTemplate!==null&&o.videoClickThroughURLTemplate!==void 0||(o.videoClickThroughURLTemplate=t.videoClickThroughURLTemplate)),o.type==="companion"&&s.length&&(o.variations||[]).forEach((l=>{l.companionClickTrackingURLTemplates=bn.joinArrayOfUniqueTemplateObjs(l.companionClickTrackingURLTemplates,s)}))})),t.adVerifications&&(e.adVerifications=e.adVerifications.concat(t.adVerifications)),t.blockedAdCategories&&(e.blockedAdCategories=e.blockedAdCategories.concat(t.blockedAdCategories)),(n=t.creatives)!==null&&n!==void 0&&n.length){const o=t.creatives.filter((l=>{var c;return((c=l.icons)===null||c===void 0?void 0:c.length)&&!l.mediaFiles.length}));o.length&&(e.creatives=e.creatives.concat(o))}}};function kF(e,t){const n=(function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:s,adId:i,sequence:a,apiFramework:o}=u2(r);return{id:s,adId:i,sequence:a,apiFramework:o,type:"companion",required:null,variations:[]}})(t);return n.required=e.getAttribute("required")||null,n.variations=k.childrenByName(e,"Companion").map((r=>{const s=(function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:o.id||null,adType:"companionAd",width:o.width||0,height:o.height||0,assetWidth:o.assetWidth||null,assetHeight:o.assetHeight||null,expandedWidth:o.expandedWidth||null,expandedHeight:o.expandedHeight||null,apiFramework:o.apiFramework||null,adSlotId:o.adSlotId||null,pxratio:o.pxratio||"1",renderingMode:o.renderingMode||"default",staticResources:[],htmlResources:[],iframeResources:[],adParameters:null,altText:null,companionClickThroughURLTemplate:null,companionClickTrackingURLTemplates:[],trackingEvents:{}}})(k.parseAttributes(r));s.htmlResources=k.childrenByName(r,"HTMLResource").reduce(((o,l)=>{const c=k.parseNodeText(l);return c?o.concat(c):o}),[]),s.iframeResources=k.childrenByName(r,"IFrameResource").reduce(((o,l)=>{const c=k.parseNodeText(l);return c?o.concat(c):o}),[]),s.staticResources=k.childrenByName(r,"StaticResource").reduce(((o,l)=>{const c=k.parseNodeText(l);return c?o.concat({url:c,creativeType:l.getAttribute("creativeType")||null}):o}),[]),s.altText=k.parseNodeText(k.childByName(r,"AltText"))||null;const i=k.childByName(r,"TrackingEvents");i&&k.childrenByName(i,"Tracking").forEach((o=>{const l=o.getAttribute("event"),c=k.parseNodeText(o);l&&c&&(Array.isArray(s.trackingEvents[l])||(s.trackingEvents[l]=[]),s.trackingEvents[l].push(c))})),s.companionClickTrackingURLTemplates=k.childrenByName(r,"CompanionClickTracking").map((o=>({id:o.getAttribute("id")||null,url:k.parseNodeText(o)}))),s.companionClickThroughURLTemplate=k.parseNodeText(k.childByName(r,"CompanionClickThrough"))||null;const a=k.childByName(r,"AdParameters");return a&&(s.adParameters={value:k.parseNodeText(a),xmlEncoded:a.getAttribute("xmlEncoded")||null}),s})),n}function JF(e,t){let n;const r=(function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:c,adId:d,sequence:h,apiFramework:p}=u2(l);return{id:c,adId:d,sequence:h,apiFramework:p,type:"linear",duration:0,skipDelay:null,mediaFiles:[],mezzanine:null,interactiveCreativeFile:null,closedCaptionFiles:[],videoClickThroughURLTemplate:null,videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[],adParameters:null,icons:[],trackingEvents:{}}})(t);r.duration=k.parseDuration(k.parseNodeText(k.childByName(e,"Duration")));const s=e.getAttribute("skipoffset");if(s==null)r.skipDelay=null;else if(s.charAt(s.length-1)==="%"&&r.duration!==-1){const l=parseInt(s,10);r.skipDelay=r.duration*(l/100)}else r.skipDelay=k.parseDuration(s);const i=k.childByName(e,"VideoClicks");if(i){const l=k.childByName(i,"ClickThrough");r.videoClickThroughURLTemplate=l?{id:l.getAttribute("id")||null,url:k.parseNodeText(l)}:null,k.childrenByName(i,"ClickTracking").forEach((c=>{r.videoClickTrackingURLTemplates.push({id:c.getAttribute("id")||null,url:k.parseNodeText(c)})})),k.childrenByName(i,"CustomClick").forEach((c=>{r.videoCustomClickURLTemplates.push({id:c.getAttribute("id")||null,url:k.parseNodeText(c)})}))}const a=k.childByName(e,"AdParameters");a&&(r.adParameters={value:k.parseNodeText(a),xmlEncoded:a.getAttribute("xmlEncoded")||null}),k.childrenByName(e,"TrackingEvents").forEach((l=>{k.childrenByName(l,"Tracking").forEach((c=>{let d=c.getAttribute("event");const h=k.parseNodeText(c);if(d&&h){if(d==="progress"){if(n=c.getAttribute("offset"),!n)return;d=n.charAt(n.length-1)==="%"?"progress-".concat(n):"progress-".concat(k.parseDuration(n))}Array.isArray(r.trackingEvents[d])||(r.trackingEvents[d]=[]),r.trackingEvents[d].push(h)}}))})),k.childrenByName(e,"MediaFiles").forEach((l=>{k.childrenByName(l,"MediaFile").forEach((m=>{r.mediaFiles.push((function(g){const R={id:null,fileURL:null,fileSize:0,deliveryType:"progressive",mimeType:null,mediaType:null,codec:null,bitrate:0,minBitrate:0,maxBitrate:0,width:0,height:0,apiFramework:null,scalable:null,maintainAspectRatio:null};R.id=g.getAttribute("id"),R.fileURL=k.parseNodeText(g),R.deliveryType=g.getAttribute("delivery"),R.codec=g.getAttribute("codec"),R.mimeType=g.getAttribute("type"),R.mediaType=g.getAttribute("mediaType")||"2D",R.apiFramework=g.getAttribute("apiFramework"),R.fileSize=parseInt(g.getAttribute("fileSize")||0),R.bitrate=parseInt(g.getAttribute("bitrate")||0),R.minBitrate=parseInt(g.getAttribute("minBitrate")||0),R.maxBitrate=parseInt(g.getAttribute("maxBitrate")||0),R.width=parseInt(g.getAttribute("width")||0),R.height=parseInt(g.getAttribute("height")||0);const y=g.getAttribute("scalable");y&&typeof y=="string"&&(R.scalable=k.parseBoolean(y));const b=g.getAttribute("maintainAspectRatio");return b&&typeof b=="string"&&(R.maintainAspectRatio=k.parseBoolean(b)),R})(m))}));const c=k.childByName(l,"InteractiveCreativeFile");c&&(r.interactiveCreativeFile=(function(m){const g=(function(){let R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:R.type||null,apiFramework:R.apiFramework||null,variableDuration:k.parseBoolean(R.variableDuration),fileURL:null}})(k.parseAttributes(m));return g.fileURL=k.parseNodeText(m),g})(c));const d=k.childByName(l,"ClosedCaptionFiles");d&&k.childrenByName(d,"ClosedCaptionFile").forEach((m=>{const g=(function(){let R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:R.type||null,language:R.language||null,fileURL:null}})(k.parseAttributes(m));g.fileURL=k.parseNodeText(m),r.closedCaptionFiles.push(g)}));const h=k.childByName(l,"Mezzanine"),p=(function(m,g){const R={};let y=!1;return g.forEach((b=>{m&&m.getAttribute(b)?R[b]=m.getAttribute(b):y=!0})),y?null:R})(h,["delivery","type","width","height"]);if(p){const m={id:null,fileURL:null,delivery:null,codec:null,type:null,width:0,height:0,fileSize:0,mediaType:"2D"};m.id=h.getAttribute("id"),m.fileURL=k.parseNodeText(h),m.delivery=p.delivery,m.codec=h.getAttribute("codec"),m.type=p.type,m.width=parseInt(p.width,10),m.height=parseInt(p.height,10),m.fileSize=parseInt(h.getAttribute("fileSize"),10),m.mediaType=h.getAttribute("mediaType")||"2D",r.mezzanine=m}}));const o=k.childByName(e,"Icons");return o&&k.childrenByName(o,"Icon").forEach((l=>{r.icons.push((function(c){const d={program:null,height:0,width:0,xPosition:0,yPosition:0,apiFramework:null,offset:null,duration:0,type:null,staticResource:null,htmlResource:null,iframeResource:null,pxratio:"1",iconClickThroughURLTemplate:null,iconClickTrackingURLTemplates:[],iconViewTrackingURLTemplate:null,iconClickFallbackImages:[],altText:null,hoverText:null};d.program=c.getAttribute("program"),d.height=parseInt(c.getAttribute("height")||0),d.width=parseInt(c.getAttribute("width")||0),d.xPosition=(function(p){return["left","right"].indexOf(p)!==-1?p:parseInt(p||0)})(c.getAttribute("xPosition")),d.yPosition=(function(p){return["top","bottom"].indexOf(p)!==-1?p:parseInt(p||0)})(c.getAttribute("yPosition")),d.apiFramework=c.getAttribute("apiFramework"),d.pxratio=c.getAttribute("pxratio")||"1",d.offset=k.parseDuration(c.getAttribute("offset")),d.duration=k.parseDuration(c.getAttribute("duration")),d.altText=c.getAttribute("altText"),d.hoverText=c.getAttribute("hoverText"),k.childrenByName(c,"HTMLResource").forEach((p=>{d.type=p.getAttribute("creativeType")||"text/html",d.htmlResource=k.parseNodeText(p)})),k.childrenByName(c,"IFrameResource").forEach((p=>{d.type=p.getAttribute("creativeType")||0,d.iframeResource=k.parseNodeText(p)})),k.childrenByName(c,"StaticResource").forEach((p=>{d.type=p.getAttribute("creativeType")||0,d.staticResource=k.parseNodeText(p)}));const h=k.childByName(c,"IconClicks");if(h){d.iconClickThroughURLTemplate=k.parseNodeText(k.childByName(h,"IconClickThrough")),k.childrenByName(h,"IconClickTracking").forEach((m=>{d.iconClickTrackingURLTemplates.push({id:m.getAttribute("id")||null,url:k.parseNodeText(m)})}));const p=k.childByName(h,"IconClickFallbackImages");p&&k.childrenByName(p,"IconClickFallbackImage").forEach((m=>{d.iconClickFallbackImages.push({url:k.parseNodeText(m)||null,width:m.getAttribute("width")||null,height:m.getAttribute("height")||null})}))}return d.iconViewTrackingURLTemplate=k.parseNodeText(k.childByName(c,"IconViewTracking")),d})(l))})),r}function QF(e,t){const n=(function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:s,adId:i,sequence:a,apiFramework:o}=u2(r);return{id:s,adId:i,sequence:a,apiFramework:o,type:"nonlinear",variations:[],trackingEvents:{}}})(t);return k.childrenByName(e,"TrackingEvents").forEach((r=>{let s,i;k.childrenByName(r,"Tracking").forEach((a=>{s=a.getAttribute("event"),i=k.parseNodeText(a),s&&i&&(Array.isArray(n.trackingEvents[s])||(n.trackingEvents[s]=[]),n.trackingEvents[s].push(i))}))})),k.childrenByName(e,"NonLinear").forEach((r=>{const s={id:null,width:0,height:0,expandedWidth:0,expandedHeight:0,scalable:!0,maintainAspectRatio:!0,minSuggestedDuration:0,apiFramework:"static",adType:"nonLinearAd",type:null,staticResource:null,htmlResource:null,iframeResource:null,nonlinearClickThroughURLTemplate:null,nonlinearClickTrackingURLTemplates:[],adParameters:null};s.id=r.getAttribute("id")||null,s.width=r.getAttribute("width"),s.height=r.getAttribute("height"),s.expandedWidth=r.getAttribute("expandedWidth"),s.expandedHeight=r.getAttribute("expandedHeight"),s.scalable=k.parseBoolean(r.getAttribute("scalable")),s.maintainAspectRatio=k.parseBoolean(r.getAttribute("maintainAspectRatio")),s.minSuggestedDuration=k.parseDuration(r.getAttribute("minSuggestedDuration")),s.apiFramework=r.getAttribute("apiFramework"),k.childrenByName(r,"HTMLResource").forEach((a=>{s.type=a.getAttribute("creativeType")||"text/html",s.htmlResource=k.parseNodeText(a)})),k.childrenByName(r,"IFrameResource").forEach((a=>{s.type=a.getAttribute("creativeType")||0,s.iframeResource=k.parseNodeText(a)})),k.childrenByName(r,"StaticResource").forEach((a=>{s.type=a.getAttribute("creativeType")||0,s.staticResource=k.parseNodeText(a)}));const i=k.childByName(r,"AdParameters");i&&(s.adParameters={value:k.parseNodeText(i),xmlEncoded:i.getAttribute("xmlEncoded")||null}),s.nonlinearClickThroughURLTemplate=k.parseNodeText(k.childByName(r,"NonLinearClickThrough")),k.childrenByName(r,"NonLinearClickTracking").forEach((a=>{s.nonlinearClickTrackingURLTemplates.push({id:a.getAttribute("id")||null,url:k.parseNodeText(a)})})),n.variations.push(s)})),n}function M3(e){const t=[];return e.forEach((n=>{const r=e4(n);r&&t.push(r)})),t}function e4(e){if(e.nodeName==="#comment")return null;const t={name:null,value:null,attributes:{},children:[]},n=e.attributes,r=e.childNodes;if(t.name=e.nodeName,e.attributes){for(const i in n)if(n.hasOwnProperty(i)){const a=n[i];a.nodeName&&a.nodeValue&&(t.attributes[a.nodeName]=a.nodeValue)}}for(const i in r)if(r.hasOwnProperty(i)){const a=e4(r[i]);a&&t.children.push(a)}if(t.children.length===0||t.children.length===1&&["#cdata-section","#text"].indexOf(t.children[0].name)>=0){const i=k.parseNodeText(e);i!==""&&(t.value=i),t.children=[]}return(s=t).value===null&&Object.keys(s.attributes).length===0&&s.children.length===0?null:t;var s}function zF(e){return e.getAttribute("AdID")||e.getAttribute("adID")||e.getAttribute("adId")||null}const Pr={Wrapper:{subElements:["VASTAdTagURI","Impression"]},BlockedAdCategories:{attributes:["authority"]},InLine:{subElements:["AdSystem","AdTitle","Impression","AdServingId","Creatives"]},Category:{attributes:["authority"]},Pricing:{attributes:["model","currency"]},Verification:{oneOfinLineResources:["JavaScriptResource","ExecutableResource"],attributes:["vendor"]},UniversalAdId:{attributes:["idRegistry"]},JavaScriptResource:{attributes:["apiFramework","browserOptional"]},ExecutableResource:{attributes:["apiFramework","type"]},Tracking:{attributes:["event"]},Creatives:{subElements:["Creative"]},Creative:{subElements:["UniversalAdId"]},Linear:{subElements:["MediaFiles","Duration"]},MediaFiles:{subElements:["MediaFile"]},MediaFile:{attributes:["delivery","type","width","height"]},Mezzanine:{attributes:["delivery","type","width","height"]},NonLinear:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},Companion:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},StaticResource:{attributes:["creativeType"]},Icons:{subElements:["Icon"]},Icon:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"]}};function K3(e,t){if(!Pr[e.nodeName]||!Pr[e.nodeName].attributes)return;const n=Pr[e.nodeName].attributes.filter((r=>!e.getAttribute(r)));n.length>0&&dr({name:e.nodeName,parentName:e.parentNode.nodeName,attributes:n},t)}function H3(e,t,n){const r=Pr[e.nodeName],s=!n&&e.nodeName!=="Wrapper";if(!(!r||s)){if(r.subElements){const i=r.subElements.filter((a=>!k.childByName(e,a)));i.length>0&&dr({name:e.nodeName,parentName:e.parentNode.nodeName,subElements:i},t)}!n||!r.oneOfinLineResources||r.oneOfinLineResources.some((i=>k.childByName(e,i)))||dr({name:e.nodeName,parentName:e.parentNode.nodeName,oneOfResources:r.oneOfinLineResources},t)}}function O3(e){return e.children&&e.children.length!==0}function dr(e,t){let{name:n,parentName:r,attributes:s,subElements:i,oneOfResources:a}=e,o="Element '".concat(n,"'");o+=s?" missing required attribute(s) '".concat(s.join(", "),"' "):i?" missing required sub element(s) '".concat(i.join(", "),"' "):a?" must provide one of the following '".concat(a.join(", "),"' "):" is empty",t("VAST-warning",{message:o,parentElement:r,specVersion:4.1})}const MF={verifyRequiredValues:function e(t,n,r){if(t&&t.nodeName)if(t.nodeName==="InLine"&&(r=!0),K3(t,n),O3(t)){H3(t,n,r);for(let s=0;s<t.children.length;s++)e(t.children[s],n,r)}else k.parseNodeText(t).length===0&&dr({name:t.nodeName,parentName:t.parentNode.nodeName},n)},hasSubElements:O3,emitMissingValueWarning:dr,verifyRequiredAttributes:K3,verifyRequiredSubElements:H3};function KF(e,t){let{allowMultipleAds:n,followAdditionalWrappers:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=Array.from(e.childNodes).filter((i=>{const a=i.nodeName.toLowerCase();return a==="inline"||r!==!1&&a==="wrapper"}));for(const i of s){if(k.copyNodeAttribute("id",e,i),k.copyNodeAttribute("sequence",e,i),k.copyNodeAttribute("adType",e,i),i.nodeName==="Wrapper")return{ad:OF(i,t),type:"WRAPPER"};if(i.nodeName==="InLine")return{ad:HF(i,t,{allowMultipleAds:n}),type:"INLINE"};const a=i.nodeName.toLowerCase();t("VAST-warning",{message:"<".concat(i.nodeName,a==="inline"?"> must be written <InLine>":"> must be written <Wrapper>"),wrongNode:i})}}function HF(e,t){let{allowMultipleAds:n}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n===!1&&e.getAttribute("sequence")?null:t4(e,t)}function t4(e,t){let n=[];t&&MF.verifyRequiredValues(e,t);const r=Array.from(e.childNodes),s=(function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:i.id||null,sequence:i.sequence||null,adType:i.adType||null,adServingId:null,categories:[],expires:null,viewableImpression:[],system:null,title:null,description:null,advertiser:null,pricing:null,survey:null,errorURLTemplates:[],impressionURLTemplates:[],creatives:[],extensions:[],adVerifications:[],blockedAdCategories:[],followAdditionalWrappers:!0,allowMultipleAds:!1,fallbackOnNoAd:null}})(k.parseAttributes(e));return r.forEach((i=>{switch(i.nodeName){case"Error":s.errorURLTemplates.push(k.parseNodeText(i));break;case"Impression":s.impressionURLTemplates.push({id:i.getAttribute("id")||null,url:k.parseNodeText(i)});break;case"Creatives":s.creatives=(function(a){const o=[];return a.forEach((l=>{const c={id:l.getAttribute("id")||null,adId:zF(l),sequence:l.getAttribute("sequence")||null,apiFramework:l.getAttribute("apiFramework")||null},d=[];let h;k.childrenByName(l,"UniversalAdId").forEach((m=>{const g={idRegistry:m.getAttribute("idRegistry")||"unknown",value:k.parseNodeText(m)};d.push(g)}));const p=k.childByName(l,"CreativeExtensions");p&&(h=M3(k.childrenByName(p,"CreativeExtension")));for(const m in l.childNodes){const g=l.childNodes[m];let R;switch(g.nodeName){case"Linear":R=JF(g,c);break;case"NonLinearAds":R=QF(g,c);break;case"CompanionAds":R=kF(g,c)}R&&(d&&(R.universalAdIds=d),h&&(R.creativeExtensions=h),o.push(R))}})),o})(k.childrenByName(i,"Creative"));break;case"Extensions":{const a=k.childrenByName(i,"Extension");s.extensions=M3(a),s.adVerifications.length||(n=(function(o){let l=null,c=[];return o.some((d=>l=k.childByName(d,"AdVerifications"))),l&&(c=_3(k.childrenByName(l,"Verification"))),c})(a));break}case"AdVerifications":s.adVerifications=_3(k.childrenByName(i,"Verification"));break;case"AdSystem":s.system={value:k.parseNodeText(i),version:i.getAttribute("version")||null};break;case"AdTitle":s.title=k.parseNodeText(i);break;case"AdServingId":s.adServingId=k.parseNodeText(i);break;case"Category":s.categories.push({authority:i.getAttribute("authority")||null,value:k.parseNodeText(i)});break;case"Expires":s.expires=parseInt(k.parseNodeText(i),10);break;case"ViewableImpression":s.viewableImpression.push((function(a){const o=(l,c)=>{const d=k.parseNodeText(c);return d&&l.push(d),l};return{id:a.getAttribute("id")||null,viewable:k.childrenByName(a,"Viewable").reduce(o,[]),notViewable:k.childrenByName(a,"NotViewable").reduce(o,[]),viewUndetermined:k.childrenByName(a,"ViewUndetermined").reduce(o,[])}})(i));break;case"Description":s.description=k.parseNodeText(i);break;case"Advertiser":s.advertiser={id:i.getAttribute("id")||null,value:k.parseNodeText(i)};break;case"Pricing":s.pricing={value:k.parseNodeText(i),model:i.getAttribute("model")||null,currency:i.getAttribute("currency")||null};break;case"Survey":s.survey={value:k.parseNodeText(i),type:i.getAttribute("type")||null};break;case"BlockedAdCategories":s.blockedAdCategories.push({authority:i.getAttribute("authority")||null,value:k.parseNodeText(i)})}})),n.length&&(s.adVerifications=s.adVerifications.concat(n)),s}function OF(e,t){const n=t4(e,t),r=e.getAttribute("followAdditionalWrappers"),s=e.getAttribute("allowMultipleAds"),i=e.getAttribute("fallbackOnNoAd");n.followAdditionalWrappers=!r||k.parseBoolean(r),n.allowMultipleAds=!!s&&k.parseBoolean(s),n.fallbackOnNoAd=i?k.parseBoolean(i):null;let a=k.childByName(e,"VASTAdTagURI");if(a?n.nextWrapperURL=k.parseNodeText(a):(a=k.childByName(e,"VASTAdTagURL"),a&&(n.nextWrapperURL=k.parseNodeText(k.childByName(a,"URL")))),n.creatives.forEach((o=>{if(["linear","nonlinear"].includes(o.type)){if(o.trackingEvents){n.trackingEvents||(n.trackingEvents={}),n.trackingEvents[o.type]||(n.trackingEvents[o.type]={});for(const l in o.trackingEvents){const c=o.trackingEvents[l];Array.isArray(n.trackingEvents[o.type][l])||(n.trackingEvents[o.type][l]=[]),c.forEach((d=>{n.trackingEvents[o.type][l].push(d)}))}}o.videoClickTrackingURLTemplates&&(Array.isArray(n.videoClickTrackingURLTemplates)||(n.videoClickTrackingURLTemplates=[]),o.videoClickTrackingURLTemplates.forEach((l=>{n.videoClickTrackingURLTemplates.push(l)}))),o.videoClickThroughURLTemplate&&(n.videoClickThroughURLTemplate=o.videoClickThroughURLTemplate),o.videoCustomClickURLTemplates&&(Array.isArray(n.videoCustomClickURLTemplates)||(n.videoCustomClickURLTemplates=[]),o.videoCustomClickURLTemplates.forEach((l=>{n.videoCustomClickURLTemplates.push(l)})))}})),n.nextWrapperURL)return n}function _3(e){const t=[];return e.forEach((n=>{const r={resource:null,vendor:null,browserOptional:!1,apiFramework:null,type:null,parameters:null,trackingEvents:{}},s=Array.from(n.childNodes);k.assignAttributes(n.attributes,r),s.forEach((a=>{let{nodeName:o,textContent:l,attributes:c}=a;switch(o){case"JavaScriptResource":case"ExecutableResource":r.resource=l.trim(),k.assignAttributes(c,r);break;case"VerificationParameters":r.parameters=l.trim()}}));const i=k.childByName(n,"TrackingEvents");i&&k.childrenByName(i,"Tracking").forEach((a=>{const o=a.getAttribute("event"),l=k.parseNodeText(a);o&&l&&(Array.isArray(r.trackingEvents[o])||(r.trackingEvents[o]=[]),r.trackingEvents[o].push(l))})),t.push(r)})),t}class _F{constructor(){this._handlers=[]}on(t,n){if(typeof n!="function")throw new TypeError("The handler argument must be of type Function. Received type ".concat(typeof n));if(!t)throw new TypeError("The event argument must be of type String. Received type ".concat(typeof t));return this._handlers.push({event:t,handler:n}),this}once(t,n){return this.on(t,(function(r,s,i){const a={fired:!1,wrapFn:void 0};function o(){a.fired||(r.off(s,a.wrapFn),a.fired=!0,i.bind(r)(...arguments))}return a.wrapFn=o,o})(this,t,n))}off(t,n){return this._handlers=this._handlers.filter((r=>r.event!==t||r.handler!==n)),this}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];let i=!1;return this._handlers.forEach((a=>{a.event==="*"&&(i=!0,a.handler(t,...r)),a.event===t&&(i=!0,a.handler(...r))})),i}removeAllListeners(t){return t?(this._handlers=this._handlers.filter((n=>n.event!==t)),this):(this._handlers=[],this)}listenerCount(t){return this._handlers.filter((n=>n.event===t)).length}listeners(t){return this._handlers.reduce(((n,r)=>(r.event===t&&n.push(r.handler),n)),[])}eventNames(){return this._handlers.map((t=>t.event))}}let j3=0,u1=0;const n4=(e,t)=>{!e||!t||e<=0||t<=0||(u1=(u1*j3+8*e/t)/++j3)},jF={ERRORCODE:900,extensions:[]},D3="VAST response version not supported";class DF extends _F{constructor(){let{fetcher:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this.maxWrapperDepth=null,this.rootErrorURLTemplates=[],this.errorURLTemplates=[],this.remainingAds=[],this.parsingOptions={},this.fetcher=t||null,this.keepFailedAdPod=!1}trackVastError(t,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i<r;i++)s[i-2]=arguments[i];this.emit("VAST-error",Object.assign({},jF,n,...s)),bn.track(t,n)}getErrorURLTemplates(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)}getEstimatedBitrate(){return u1}initParsingStatus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.maxWrapperDepth=t.wrapperLimit||10,this.parsingOptions={allowMultipleAds:t.allowMultipleAds},this.keepFailedAdPod=t.keepFailedAdPod||!1,this.rootURL="",this.resetParsingStatus(),n4(t.byteLength,t.requestDuration)}resetParsingStatus(){this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.vastVersion=null}getRemainingAds(t){if(this.remainingAds.length===0)return Promise.reject(new Error("No more ads are available for the given VAST"));const n=t?this.remainingAds:[this.remainingAds.shift()];return this.errorURLTemplates=[],this.resolveAds(n,{wrapperDepth:0,url:this.rootURL}).then((r=>this.buildVASTResponse(r)))}parseVAST(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.initParsingStatus(n),n.isRootVAST=!0,this.parse(t,n).then((r=>this.buildVASTResponse(r)))}buildVASTResponse(t){const n=(function(r){let{ads:s,errorURLTemplates:i,version:a}=r;return{ads:s||[],errorURLTemplates:i||[],version:a||null}})({ads:t,errorURLTemplates:this.getErrorURLTemplates(),version:this.vastVersion});return this.completeWrapperResolving(n),n}parseVastXml(t,n){let{isRootVAST:r=!1,url:s=null,wrapperDepth:i=0,allowMultipleAds:a,followAdditionalWrappers:o}=n;if(!t||!t.documentElement||t.documentElement.nodeName!=="VAST"){var l;this.emit("VAST-ad-parsed",{type:"ERROR",url:s,wrapperDepth:i});const p=(t==null||(l=t.documentElement)===null||l===void 0?void 0:l.nodeName)==="VideoAdServingTemplate";throw new Error(p?D3:"Invalid VAST XMLDocument")}const c=[],d=t.documentElement.childNodes,h=t.documentElement.getAttribute("version");r&&h&&(this.vastVersion=h);for(const p in d){const m=d[p];if(m.nodeName==="Error"){const g=k.parseNodeText(m);r?this.rootErrorURLTemplates.push(g):this.errorURLTemplates.push(g)}else if(m.nodeName==="Ad"){if(this.vastVersion&&parseFloat(this.vastVersion)<3)a=!0;else if(a===!1&&c.length>1)break;const g=KF(m,this.emit.bind(this),{allowMultipleAds:a,followAdditionalWrappers:o});g.ad?(c.push(g.ad),this.emit("VAST-ad-parsed",{type:g.type,url:s,wrapperDepth:i,adIndex:c.length-1,vastVersion:h})):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}return c}parse(t){let{url:n=null,resolveAll:r=!0,wrapperSequence:s=null,previousUrl:i=null,wrapperDepth:a=0,isRootVAST:o=!1,followAdditionalWrappers:l,allowMultipleAds:c}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=[];this.vastVersion&&parseFloat(this.vastVersion)<3&&o&&(c=!0);try{d=this.parseVastXml(t,{isRootVAST:o,url:n,wrapperDepth:a,allowMultipleAds:c,followAdditionalWrappers:l})}catch(h){return Promise.reject(h)}if(d.length===1&&s!=null&&(d[0].sequence=s),r===!1){const h=k.getSortedAdPods(d),p=k.getStandAloneAds(d);h.length?d=h:p.length&&(d=[p.shift()]),this.remainingAds=p}return this.resolveAds(d,{wrapperDepth:a,previousUrl:i,url:n})}resolveAds(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{wrapperDepth:n,previousUrl:r,url:s}=arguments.length>1?arguments[1]:void 0;const i=[];return r=s,t.forEach((a=>{const o=this.resolveWrappers(a,n,r);i.push(o)})),Promise.all(i).then((a=>bn.flatten(a)))}resolveWrappers(t,n,r){const s={...t};return new Promise((i=>{var a;if(n++,!s.nextWrapperURL)return delete s.nextWrapperURL,i(s);if(!this.fetcher)return s.VASTAdTagURI=s.nextWrapperURL,delete s.nextWrapperURL,i(s);if(n>=this.maxWrapperDepth)return s.errorCode=302,delete s.nextWrapperURL,i(s);s.nextWrapperURL=k.resolveVastAdTagURI(s.nextWrapperURL,r);const o=(a=this.parsingOptions.allowMultipleAds)!==null&&a!==void 0?a:s.allowMultipleAds,l=s.sequence;this.fetcher.fetchVAST({url:s.nextWrapperURL,emitter:this.emit.bind(this),maxWrapperDepth:this.maxWrapperDepth}).then((c=>this.parse(c,{url:s.nextWrapperURL,previousUrl:r,wrapperSequence:l,wrapperDepth:n,followAdditionalWrappers:s.followAdditionalWrappers,allowMultipleAds:o}).then((d=>{if(delete s.nextWrapperURL,d.length===0)return s.creatives=[],i(s);d.forEach((h=>{h&&k.mergeWrapperAdData(h,s)})),i(d)})))).catch((c=>{s.errorCode=c.message===D3?102:301,s.errorMessage=c.message,i(s)}))}))}completeWrapperResolving(t){if(t.ads.length===0)this.trackVastError(t.errorURLTemplates,{ERRORCODE:303});else for(let n=t.ads.length-1;n>=0;n--){const r=t.ads[n],s=!r.creatives.some((i=>{var a,o;return((a=i.mediaFiles)===null||a===void 0?void 0:a.length)>0||((o=i.variations)===null||o===void 0?void 0:o.length)>0}));!r.errorCode&&!s||r.VASTAdTagURI||(this.trackVastError(r.errorURLTemplates.concat(t.errorURLTemplates),{ERRORCODE:r.errorCode||303},{ERRORMESSAGE:r.errorMessage||""},{extensions:r.extensions},{system:r.system}),this.keepFailedAdPod&&r.sequence?r.hasFailed=!0:t.ads.splice(n,1))}}}let Xt=null;const PF={data:{},length:0,getItem(e){return this.data[e]},setItem(e,t){this.data[e]=t,this.length=Object.keys(this.data).length},removeItem(e){delete this.data[e],this.length=Object.keys(this.data).length},clear(){this.data={},this.length=0}};class $F{constructor(){this.storage=this.initStorage()}initStorage(){if(Xt)return Xt;try{Xt=typeof window<"u"&&window!==null?window.localStorage||window.sessionStorage:null}catch{Xt=null}return Xt&&!this.isStorageDisabled(Xt)||(Xt=PF,Xt.clear()),Xt}isStorageDisabled(t){const n="__VASTStorage__";try{if(t.setItem(n,n),t.getItem(n)!==n)return t.removeItem(n),!0}catch{return!0}return t.removeItem(n),!1}getItem(t){return this.storage.getItem(t)}setItem(t,n){return this.storage.setItem(t,n)}removeItem(t){return this.storage.removeItem(t)}clear(){return this.storage.clear()}}const h1=12e4,qF={get:async function(e,t){try{const n=new AbortController,r=setTimeout((()=>{throw n.abort(),new Error("URLHandler: Request timed out after ".concat(t.timeout||h1," ms (408)"))}),t.timeout||h1),s=await fetch(e,{...t,signal:n.signal,credentials:t.withCredentials?"include":"omit"}).finally((()=>{clearTimeout(r)})),i=(function(a){return bn.isBrowserEnvironment()&&window.location.protocol==="https:"&&a.url.includes("http://")?"URLHandler: Cannot go from HTTPS to HTTP.":a.status===200&&a.ok?null:"URLHandler: ".concat(a.statusText," (").concat(a.status,")")})(s);return i?{error:new Error(i),statusCode:s.status}:(async function(a){const o=await a.text();let l;return l=bn.isBrowserEnvironment()?new DOMParser:new(await Promise.resolve().then(()=>require("./index-ByUNFvMk.js")).then(c=>c.i)).DOMParser,{xml:l.parseFromString(o,"text/xml"),details:{byteLength:o.length,statusCode:a.status,rawXml:o}}})(s)}catch(n){return{error:n,statusCode:n.name==="AbortError"?408:null}}}};class eN{constructor(){this.URLTemplateFilters=[]}setOptions(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.urlHandler=t.urlHandler||t.urlhandler||qF,this.fetchingOptions={...t.fetchOptions,timeout:t.timeout||h1,withCredentials:!!t.withCredentials}}addURLTemplateFilter(t){typeof t=="function"&&this.URLTemplateFilters.push(t)}removeLastURLTemplateFilter(){this.URLTemplateFilters.pop()}countURLTemplateFilters(){return this.URLTemplateFilters.length}clearURLTemplateFilters(){this.URLTemplateFilters=[]}async fetchVAST(t){var n;let{url:r,maxWrapperDepth:s,emitter:i,wrapperDepth:a=0,previousUrl:o=null,wrapperAd:l=null}=t;const c=Date.now();this.URLTemplateFilters.forEach((p=>{r=p(r)})),i("VAST-resolving",{url:r,previousUrl:o,wrapperDepth:a,maxWrapperDepth:s,timeout:this.fetchingOptions.timeout,wrapperAd:l});const d=await this.urlHandler.get(r,this.fetchingOptions),h=Math.round(Date.now()-c);if(i("VAST-resolved",{url:r,previousUrl:o,wrapperDepth:a,error:d?.error||null,duration:h,statusCode:d?.statusCode||null,...d?.details}),n4(d==null||(n=d.details)===null||n===void 0?void 0:n.byteLength,h),d.error)throw new Error(d.error);return d.xml}}class tN{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new $F;this.cappingFreeLunch=t,this.cappingMinimumTimeInterval=n,this.fetcher=new eN,this.vastParser=new DF({fetcher:this.fetcher}),this.storage=r,this.lastSuccessfulAd===void 0&&(this.lastSuccessfulAd=0),this.totalCalls===void 0&&(this.totalCalls=0),this.totalCallsTimeout===void 0&&(this.totalCallsTimeout=0)}addURLTemplateFilter(t){this.fetcher.addURLTemplateFilter(t)}removeLastURLTemplateFilter(){this.fetcher.removeLastURLTemplateFilter()}countURLTemplateFilters(){return this.fetcher.countURLTemplateFilters()}clearURLTemplateFilters(){this.fetcher.clearURLTemplateFilters()}getParser(){return this.vastParser}get lastSuccessfulAd(){return this.storage.getItem("vast-client-last-successful-ad")}set lastSuccessfulAd(t){this.storage.setItem("vast-client-last-successful-ad",t)}get totalCalls(){return this.storage.getItem("vast-client-total-calls")}set totalCalls(t){this.storage.setItem("vast-client-total-calls",t)}get totalCallsTimeout(){return this.storage.getItem("vast-client-total-calls-timeout")}set totalCallsTimeout(t){this.storage.setItem("vast-client-total-calls-timeout",t)}hasRemainingAds(){return this.vastParser.remainingAds.length>0}getNextAds(t){return this.vastParser.getRemainingAds(t)}parseVAST(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.fetcher.setOptions(n),this.vastParser.parseVAST(t,n)}get(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Date.now();return n.hasOwnProperty("resolveAll")||(n.resolveAll=!1),this.totalCallsTimeout<r?(this.totalCalls=1,this.totalCallsTimeout=r+36e5):this.totalCalls++,new Promise(((s,i)=>{if(this.cappingFreeLunch>=this.totalCalls)return i(new Error("VAST call canceled – FreeLunch capping not reached yet ".concat(this.totalCalls,"/").concat(this.cappingFreeLunch)));const a=r-this.lastSuccessfulAd;if(a<0)this.lastSuccessfulAd=0;else if(a<this.cappingMinimumTimeInterval)return i(new Error("VAST call canceled – (".concat(this.cappingMinimumTimeInterval,")ms minimum interval reached")));this.vastParser.initParsingStatus(n),this.fetcher.setOptions(n),this.vastParser.rootURL=t,this.fetcher.fetchVAST({url:t,emitter:this.vastParser.emit.bind(this.vastParser),maxWrapperDepth:this.vastParser.maxWrapperDepth}).then((o=>(n.previousUrl=t,n.isRootVAST=!0,n.url=t,this.vastParser.parse(o,n).then((l=>{const c=this.vastParser.buildVASTResponse(l);s(c)}))))).catch((o=>i(o)))}))}}const nN=new tN,ul=st("ui:gam-static"),P3=e=>new Promise((t,n)=>{const r=new Image;r.onload=()=>t(e),r.onerror=()=>n(),r.src=e}),rN=e=>(t,n,r)=>e.transport.nanoquery.createFetcherStore([t,n],{dedupeTime:r.prefetch?r.refetchInterval:1/0,revalidateInterval:r.refetchInterval>0?r.refetchInterval:0,fetcher:async s=>{if(!s||typeof s!="string")throw new Error("no_valid_ad");Se.emit("exposedPauseAd",{action:"load",payload:{}});try{const i=(await nN.get(s)).ads.find(a=>a.creatives.length>0);if(i){const a=i.id||"";ul.debug(i,"validAd");const o=i.creatives.find(h=>h.type==="nonlinear");if(o){const h=o.adId||o.id||a;ul.debug(o,"nonlinear");const p=o.variations?.[0]?.staticResource,m=o.variations?.[0]?.nonlinearClickThroughURLTemplate;if(p)return await P3(p),Se.emit("exposedPauseAd",{action:"loaded",payload:{id:h,parentId:a}}),{id:h,parentId:a,url:s,imageSrc:p,adUrl:m}}const l=i.creatives.find(h=>h.type==="companion");ul.debug(l,"companion");const c=l?.variations?.[0]?.staticResources?.[0]?.url,d=l?.variations?.[0]?.companionClickThroughURLTemplate;if(c){const h=l.adId||l.id||a;return await P3(c),Se.emit("exposedPauseAd",{action:"loaded",payload:{id:h,parentId:a}}),{id:h,parentId:a,url:s,imageSrc:c,adUrl:d}}}throw new Error("no_valid_ad")}catch(i){throw console.error(i,"err"),new Error("no_valid_ad")}}});class sN extends kp{getExternalPauseAd;externalPauseAdStores=new Map;externalPauseAdEnabled=new Map;log;constructor(t){super(),this.log=st("advertisement");const n=rN(t);this.getExternalPauseAd=(r,s)=>{if(this.externalPauseAdStores.has(r)){const o=this.externalPauseAdEnabled.get(r),l=this.externalPauseAdStores.get(r),c=o.get()===!1&&s.$enabled===!0;return o.set(s.$enabled),c&&window.requestAnimationFrame(()=>{l.revalidate()}),[l,r]}const i=ke(s.$enabled),a=n(r,i,s);return this.externalPauseAdEnabled.set(r,i),this.externalPauseAdStores.set(r,a),[a,r]}}connect=()=>{this.log.debug("connect")};disconnect=()=>{this.log.debug("disconnect"),this.externalPauseAdStores.forEach(t=>{t.off()}),this.externalPauseAdEnabled.forEach(t=>{t.off()}),this.externalPauseAdEnabled.clear(),this.externalPauseAdStores.clear()}}const iN=(e,t,n)=>{e.sdk.advertisement=new sN(e),e.sdk.onMount({name:"advertisement"},()=>(e.sdk.advertisement.connect(),()=>{e.sdk.advertisement.disconnect()})),n()};class aN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{r.slEventBus?.type==="invitation"&&r.slEventBus.action==="sent"&&this.sent(r.slEventBus.payload)};return Se.listen(n)})}accepted=()=>{this.analytics.write("invitation",{common:{...this.analytics.commonStore.getValues(),kind:fe.INVITATION_ACCEPTED},category:hc.GAMES,from:_l.UNSET})};sent=({from:t})=>{this.analytics.write("invitation",{common:{...this.analytics.commonStore.getValues(),kind:fe.INVITATION_SENT},category:hc.GAMES,from:t||_l.UNSET})}}class oN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{if(r.slEventBus?.type==="interactions")switch(r.slEventBus.action){case"tap":this.tap();break;case"scroll":this.scroll();break}};return Se.listen(n)})}tap=()=>{this.analytics.write("interactions",{common:{...this.analytics.commonStore.getValues(),kind:fe.INTERACTIONS},actionType:v3.TAP})};scroll=()=>{this.analytics.write("interactions",{common:{...this.analytics.commonStore.getValues(),kind:fe.INTERACTIONS},actionType:v3.SCROLL})}}const lN={[Ae.UNSET]:Ie.UNSET,[Ae.INGAME_IAB21]:Ie.PROMOTION_INGAME_IAB21,[Ae.INGAME_IAB21_SIDEBAR]:Ie.PROMOTION_INGAME_IAB21,[Ae.INGAME_IAB11_LBAR]:Ie.PROMOTION_INGAME_IAB11_LBAR,[Ae.INGAME_IAB11]:Ie.PROMOTION_INGAME_IAB11,[Ae.INGAME_IAB11_SIDEBAR]:Ie.PROMOTION_INGAME_IAB11,[Ae.INGAME_IAB21_LBAR]:Ie.PROMOTION_INGAME_IAB21_LBAR,[Ae.INGAME_IAB61]:Ie.PROMOTION_INGAME_IAB61,[Ae.INGAME_IAB61_SIDEBAR]:Ie.PROMOTION_INGAME_IAB61,[Ae.EXTERNAL_AD]:Ie.PROMOTION_GAM,[Ae.VIDEO_SIDE_BY_SIDE]:Ie.PROMOTION_VIDEO_SIDE_BY_SIDE,[Ae.PICTURE_IN_PICTURE]:Ie.PROMOTION_PICTURE_IN_PICTURE,[Ae.LOWER_THIRD]:Ie.PROMOTION_LOWER_THIRD,[Ae.SHOP_LBAR]:Ie.PROMOTION_SHOP_LBAR,[Ae.SHOP_OVERLAY]:Ie.PROMOTION_SHOP_OVERLAY,[Ae.SHOP_SIDEBAR]:Ie.PROMOTION_SHOP_SIDEBAR,[Ae.NFL_SHOP_LBAR]:Ie.PROMOTION_SHOP_LBAR,[Ae.NFL_SHOP_OVERLAY]:Ie.PROMOTION_SHOP_OVERLAY,[Ae.NFL_SHOP_SIDEBAR]:Ie.PROMOTION_SHOP_SIDEBAR,[Ae.STATS]:Ie.UNSET,[Ae.STANDARD]:Ie.UNSET,[Ae.SHOP]:Ie.UNSET,[Ae.NFL_SHOP]:Ie.UNSET},p1=e=>e?lN[e]:Ie.UNSET,cN={25:fe.AD_VIDEO_Q25,50:fe.AD_VIDEO_Q50,75:fe.AD_VIDEO_Q75};class dN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{if(!r.slEventBus?.skipAnalytics){if(r.slEventBus?.type==="exposedPauseAd"){const s=r.slEventBus.payload;switch(r.slEventBus.action){case"enabled":this.exposedPauseAdEnabled(s);break;case"disabled":this.exposedPauseAdDisabled(s);break;case"closed":this.exposedPauseAdClosed(s);break;case"load":this.exposedPauseAdLoad(s,!1);break;case"loaded":this.exposedPauseAdLoad(s,!0);break;case"rendered":this.exposedPauseAdOpened(s);break;case"navigated":this.exposedPauseAdNavigated(s);break}}if(r.slEventBus?.type==="advertisement"){const s=r.slEventBus.payload,i=p1(s.type);switch(r.slEventBus.action){case"videoPlay":this.videoPlay(s,{topicSubType:i});break;case"videoEnd":this.videoEnd(s,{topicSubType:i});break;case"videoRendered":this.videoRendered(s,{topicSubType:i});break;case"buttonSelect":this.buttonSelect(s,{topicSubType:i});break;case"bannerSelect":this.bannerSelect(s,{topicSubType:i});break;case"bannerShown":this.bannerShown(s,{topicSubType:i});break;case"received":this.received(s,{topicSubType:i});break;case"opened":this.opened(s,{topicSubType:i});break;case"viewed":this.viewed(s,{topicSubType:i});break;case"videoMuted":case"videoUnmuted":this.videoMuted(s,{topicSubType:i,muted:r.slEventBus.action==="videoMuted"});break;case"videoReplayed":this.videoReplayed(s,{topicSubType:i});break;case"quartileCompleted":this.quartileCompleted(s,{topicSubType:i});break}}}};return Se.listen(n)})}exposedPauseAdEnabled=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.STREAM_PAUSED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdClosed=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.EXTERNAL_AD_CLOSED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdDisabled=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.STREAM_RESUMED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdOpened=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.EXTERNAL_AD_RENDERED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdNavigated=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.AD_INTERACTION_BANNER_NAVIGATED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdLoad=({id:t,parentId:n},r)=>{const s=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...s,kind:r?fe.EXTERNAL_AD_LOADED:fe.EXTERNAL_AD_REQUESTED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};received=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.POLLS_RECEIVED,topicId:t,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};opened=({id:t,openedFrom:n},{topicSubType:r})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.POLLS_OPENED,topicId:t,topicType:Ee.POLLS_PROMOTION,topicSubType:r},pollOpenedFrom:n==="notification"?Fe.IN_APP:Fe.UNSET})};viewed=({id:t},{topicSubType:n})=>{};videoMuted=({id:t},{topicSubType:n,muted:r})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:r?fe.AD_VIDEO_MUTED:fe.AD_VIDEO_UNMUTED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};quartileCompleted=({id:t,quartile:n},{topicSubType:r})=>{n&&this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:cN[n],topicType:Ee.POLLS_PROMOTION,topicSubType:r},pollOpenedFrom:Fe.UNSET})};videoReplayed=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_VIDEO_REPLAYED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};videoPlay=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_VIDEO_PLAYED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};videoEnd=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_VIDEO_COMPLETE,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};videoRendered=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_VIDEO_RENDERED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};buttonSelect=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_INTERACTION_BUTTON_NAVIGATED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};bannerSelect=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_INTERACTION_BANNER_NAVIGATED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};bannerShown=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_BANNER_SHOWN,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})}}const ir={[M.UNSET]:Ee.UNSET,[M.FACTOID]:Ee.POLLS_INSIGHT,[M.POLL]:Ee.POLLS_POLL,[M.PREDICTION]:Ee.POLLS_PREDICTION,[M.PROMOTION]:Ee.POLLS_PROMOTION,[M.TRIVIA]:Ee.POLLS_TRIVIA,[M.TWEET]:Ee.POLLS_TWITTER};M.UNSET+"",Yt.UNSET,M.FACTOID+"",Yt.POLLS,M.POLL+"",Yt.POLLS,M.PREDICTION+"",Yt.POLLS,M.PROMOTION+"",Yt.POLLS,M.TRIVIA+"",Yt.POLLS,M.TWEET+"",Yt.POLLS;const uN={[pe.UNSET]:Qe.UNSET,[pe.INPLAY]:Qe.INPLAY,[pe.MESSAGING]:Qe.MESSAGING,[pe.STATISTICS]:Qe.STATS,[pe.BETTING]:Qe.BETTING,[pe.TWITTER]:Qe.TWITTER,[pe.MERCHANDISE]:Qe.MERCHANDISE,[pe.CONTESTS]:Qe.CONTESTS,[pe.VOICE_CHAT]:Qe.CALLING,[pe.TICKETS]:Qe.TICKETS,[pe.WHOIS_WATCHING]:Qe.WHOISWATCHING,[pe.PROFILE]:Qe.PROFILE,[pe.GAMES]:Qe.POLLS,[pe.GOLF_STATISTICS]:Qe.STATS,[pe.HIGHLIGHTS]:Qe.HIGHLIGHTS,[pe.PUBLIC_CHAT]:Qe.PUBLIC_CHAT};class hN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{if(r.slEventBus?.type==="notification")switch(r.slEventBus.action){case"rendered":this.received(r.slEventBus.payload);break;case"opened":this.opened(r.slEventBus.payload);break}if(r.slEventBus?.type==="advertisement")switch(r.slEventBus.action){case"notification-received":this.received({questionId:r.slEventBus.payload.id,questionType:M.PROMOTION,topicSubType:p1(r.slEventBus.payload.type)});break;case"notification-opened":this.opened({questionId:r.slEventBus.payload.id,questionType:M.PROMOTION,topicSubType:p1(r.slEventBus.payload.type)});break}};return Se.listen(n)})}received=({questionId:t,questionType:n,topicSubType:r})=>{this.analytics.write("notification",{common:{...this.analytics.commonStore.getValues(),kind:fe.NOTIFICATION_RECEIVED,topicId:t,topicType:n?ir[n]:Ee.UNSET,topicSubType:r},notificationKind:Yt.POLLS,notificationType:W3.IN_APP})};opened=({questionId:t,questionType:n,topicSubType:r})=>{this.analytics.write("notification",{common:{...this.analytics.commonStore.getValues(),kind:fe.NOTIFICATION_OPENED,topicId:t,topicType:n?ir[n]:Ee.UNSET,topicSubType:r},notificationKind:Yt.POLLS,notificationType:W3.IN_APP})}}class pN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{if(r.slEventBus?.type==="poll")switch(r.slEventBus.action){case"voted":this.voted(r.slEventBus.payload);break;case"navigated":this.navigated();break;case"onboardingPassed":this.onboardingPassed();break;case"received":this.received(r.slEventBus.payload);break;case"viewed":this.viewed(r.slEventBus.payload);break}};return Se.listen(n)})}received=({questionId:t,questionType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.POLLS_RECEIVED,topicId:t,topicType:n?ir[n]:Ee.UNSET},pollOpenedFrom:Fe.UNSET})};viewed=({questionId:t,questionType:n,questionOpenedFrom:r,isAd:s})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:s?fe.POLLS_AD_OPENED:fe.POLLS_OPENED,topicId:t,topicType:n?ir[n]:Ee.UNSET},pollOpenedFrom:r==="list"?Fe.PICK_HISTORY:Fe.IN_APP})};voted=({questionId:t,questionType:n,isAd:r})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:r?fe.POLLS_AD_VOTE:fe.POLLS_VOTE,topicId:t,topicType:n?ir[n]:Ee.UNSET},pollOpenedFrom:Fe.UNSET})};onboardingPassed=()=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.GAMES_JOINED},pollOpenedFrom:Fe.UNSET})};navigated=()=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.POLLS_NAVIGATED},pollOpenedFrom:Fe.UNSET})}}const mN=({transport:e,$commonStore:t})=>{let n;const r=ke(!1),s=3e4,{client:i,queryKey:a}=e.createPromiseClient(Yp,{method:"send",params:[r]}),o=e.nanoquery.createFetcherStore(a,{fetcher:async()=>{const h=t.getStore().get();try{await i.unary({message:{case:"heartbeat",value:{common:{...h,kind:fe.SESSION_HEARTBEAT}}}})}catch(p){kt.error(p,"send heartbeat failed")}return Date.now()},revalidateInterval:s}),l=()=>{kt.debug("mounted heartbeat"),n=o.subscribe(()=>{})},c=()=>{kt.debug("enabled heartbeat"),r.set(!0),o.lc===0&&l()},d=()=>{kt.debug("disabled heartbeat"),r.set(!1)};return{enable:c,disable:d,mount:l,unmount:()=>{kt.debug("unmounted heartbeat"),o.off(),n?.(),n=void 0,d()}}},kt=st("analytics");class gN{commonStore;notifications;polls;invitation;interactions;advertisement;heartbeat;analyticsClient;listeners;listenersCancels;connected=!1;constructor(t){this.listeners=new Set,this.listenersCancels=new Set,this.commonStore=new mn(tt({}),"common-analytics"),this.connectToSDK(t),this.heartbeat=mN({transport:t.analyticsTransport,$commonStore:this.commonStore}),this.notifications=new hN(this),this.polls=new pN(this),this.invitation=new aN(this),this.interactions=new oN(this),this.advertisement=new dN(this);const{client:n}=t.analyticsTransport.createPromiseClient(Yp,{method:"send"});this.analyticsClient=n}connect=()=>{this.writeCommon("sessionId",Wn.v4()),this.heartbeat.enable(),this.listeners.forEach(t=>this.listenersCancels.add(t())),this.connected=!0,kt.debug("analytics connected")};disconnect=()=>{this.writeCommon("sessionId",""),this.writeCommon("overlaySessionId",""),this.heartbeat.unmount(),this.listenersCancels.forEach(t=>t()),this.connected=!1,kt.debug("analytics disconnected")};write=(t,n)=>{n&&this.analyticsClient.unary({message:{case:t,value:n}}).then(()=>{kt.trace("send analytics success",t,n)}).catch(r=>{kt.error(r,"send analytics failed")})};writeCommon=(t,n)=>{this.commonStore.setValue(t,n)};onConnect=t=>{this.listeners.add(t),this.connected&&this.listenersCancels.add(t())};connectToSDK=t=>{this.onConnect(()=>t.stores.slStreamId.getAtomStore().subscribe(n=>{this.writeCommon("eventId",n)})),this.onConnect(()=>t.sdk.getActiveFeature().subscribe(n=>{n&&this.writeCommon("category",uN[n]),n!==pe.UNSET?this.writeCommon("overlaySessionId",Wn.v4()):this.writeCommon("overlaySessionId","")})),this.onConnect(()=>{const n=r=>{if(!r.slEventBus)return;const s=r.slEventBus?.action;r.slEventBus?.type==="exposedPauseAd"&&((s==="disabled"||s==="closed")&&setTimeout(()=>{this.writeCommon("overlaySessionId",""),this.writeCommon("topicId",""),this.writeCommon("parentTopicId",""),this.writeCommon("topicType",Ee.UNSET),this.writeCommon("category",Qe.UNSET)},200),s==="enabled"&&(this.writeCommon("overlaySessionId",Wn.v4()),this.writeCommon("category",Qe.EXPOSED_PAUSED_AD))),r.slEventBus?.type==="advertisement"&&(s==="opened"&&this.writeCommon("overlaySessionId",Wn.v4()),s==="closed"&&this.writeCommon("overlaySessionId",""))};return Se.listen(n)}),this.onConnect(()=>{const n=window.matchMedia("(orientation: portrait)"),r=s=>{this.writeCommon("screenOrientation",s.matches?cc.PORTRAIT:cc.LANDSCAPE)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}),t.deepLink&&this.onConnect(()=>t.deepLink.$store.subscribe(n=>{n?.handled&&this.invitation.accepted()}))}}const fN=(e,t,n)=>{e.analytics=new gN(e),e.sdk.onMount({name:"analytics"},()=>(e.analytics.connect(),e.sdk.writeOverlaySessionId=r=>{r===""?e.analytics.writeCommon("overlaySessionId",""):e.analytics.writeCommon("overlaySessionId",Wn.v4())},()=>{e.analytics.disconnect()})),n()};var h2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Dl<"u"?Dl:typeof self<"u"?self:{};function r4(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wr={exports:{}},xr={exports:{}},hl,$3;function bN(){if($3)return hl;$3=1;function e(t){var n=new t,r=n;function s(){var a=n;return a.next?n=a.next:(n=new t,r=n),a.next=null,a}function i(a){r.next=a,r=a}return{get:s,release:i}}return hl=e,hl}var q3;function s4(){if(q3)return xr.exports;q3=1;var e=bN();function t(i,a,o){if(typeof i=="function"&&(o=a,a=i,i=null),!(o>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var l=e(r),c=null,d=null,h=0,p=null,m={push:A,drain:n,saturated:n,pause:R,paused:!1,get concurrency(){return o},set concurrency(I){if(!(I>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(o=I,!m.paused)for(;c&&h<o;)h++,F()},running:g,resume:f,idle:V,length:y,getQueue:b,unshift:S,empty:n,kill:U,killAndDrain:Z,error:v};return m;function g(){return h}function R(){m.paused=!0}function y(){for(var I=c,N=0;I;)I=I.next,N++;return N}function b(){for(var I=c,N=[];I;)N.push(I.value),I=I.next;return N}function f(){if(m.paused){if(m.paused=!1,c===null){h++,F();return}for(;c&&h<o;)h++,F()}}function V(){return h===0&&m.length()===0}function A(I,N){var X=l.get();X.context=i,X.release=F,X.value=I,X.callback=N||n,X.errorHandler=p,h>=o||m.paused?d?(d.next=X,d=X):(c=X,d=X,m.saturated()):(h++,a.call(i,X.value,X.worked))}function S(I,N){var X=l.get();X.context=i,X.release=F,X.value=I,X.callback=N||n,X.errorHandler=p,h>=o||m.paused?c?(X.next=c,c=X):(c=X,d=X,m.saturated()):(h++,a.call(i,X.value,X.worked))}function F(I){I&&l.release(I);var N=c;N&&h<=o?m.paused?h--:(d===c&&(d=null),c=N.next,N.next=null,a.call(i,N.value,N.worked),d===null&&m.empty()):--h===0&&m.drain()}function U(){c=null,d=null,m.drain=n}function Z(){c=null,d=null,m.drain(),m.drain=n}function v(I){p=I}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var i=this;this.worked=function(a,o){var l=i.callback,c=i.errorHandler,d=i.value;i.value=null,i.callback=n,i.errorHandler&&c(a,d),l.call(i.context,a,o),i.release(i)}}function s(i,a,o){typeof i=="function"&&(o=a,a=i,i=null);function l(R,y){a.call(this,R).then(function(b){y(null,b)},y)}var c=t(i,l,o),d=c.push,h=c.unshift;return c.push=p,c.unshift=m,c.drained=g,c;function p(R){var y=new Promise(function(b,f){d(R,function(V,A){if(V){f(V);return}b(A)})});return y.catch(n),y}function m(R){var y=new Promise(function(b,f){h(R,function(V,A){if(V){f(V);return}b(A)})});return y.catch(n),y}function g(){if(c.idle())return new Promise(function(b){b()});var R=c.drain,y=new Promise(function(b){c.drain=function(){R(),b()}});return y}}return xr.exports=t,xr.exports.promise=s,xr.exports}var Lr={exports:{}},e5;function i4(){if(e5)return Lr.exports;e5=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(A,S,F){return Function.prototype.apply.call(A,S,F)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:n=function(A){return Object.getOwnPropertyNames(A)};function r(A){console&&console.warn&&console.warn(A)}var s=Number.isNaN||function(A){return A!==A};function i(){i.init.call(this)}Lr.exports=i,Lr.exports.once=b,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(A){if(typeof A!="number"||A<0||s(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");a=A}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(A){if(typeof A!="number"||A<0||s(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this};function l(A){return A._maxListeners===void 0?i.defaultMaxListeners:A._maxListeners}i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(A){for(var S=[],F=1;F<arguments.length;F++)S.push(arguments[F]);var U=A==="error",Z=this._events;if(Z!==void 0)U=U&&Z.error===void 0;else if(!U)return!1;if(U){var v;if(S.length>0&&(v=S[0]),v instanceof Error)throw v;var I=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw I.context=v,I}var N=Z[A];if(N===void 0)return!1;if(typeof N=="function")t(N,this,S);else for(var X=N.length,T=g(N,X),F=0;F<X;++F)t(T[F],this,S);return!0};function c(A,S,F,U){var Z,v,I;if(o(F),v=A._events,v===void 0?(v=A._events=Object.create(null),A._eventsCount=0):(v.newListener!==void 0&&(A.emit("newListener",S,F.listener?F.listener:F),v=A._events),I=v[S]),I===void 0)I=v[S]=F,++A._eventsCount;else if(typeof I=="function"?I=v[S]=U?[F,I]:[I,F]:U?I.unshift(F):I.push(F),Z=l(A),Z>0&&I.length>Z&&!I.warned){I.warned=!0;var N=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");N.name="MaxListenersExceededWarning",N.emitter=A,N.type=S,N.count=I.length,r(N)}return A}i.prototype.addListener=function(A,S){return c(this,A,S,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(A,S){return c(this,A,S,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(A,S,F){var U={fired:!1,wrapFn:void 0,target:A,type:S,listener:F},Z=d.bind(U);return Z.listener=F,U.wrapFn=Z,Z}i.prototype.once=function(A,S){return o(S),this.on(A,h(this,A,S)),this},i.prototype.prependOnceListener=function(A,S){return o(S),this.prependListener(A,h(this,A,S)),this},i.prototype.removeListener=function(A,S){var F,U,Z,v,I;if(o(S),U=this._events,U===void 0)return this;if(F=U[A],F===void 0)return this;if(F===S||F.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete U[A],U.removeListener&&this.emit("removeListener",A,F.listener||S));else if(typeof F!="function"){for(Z=-1,v=F.length-1;v>=0;v--)if(F[v]===S||F[v].listener===S){I=F[v].listener,Z=v;break}if(Z<0)return this;Z===0?F.shift():R(F,Z),F.length===1&&(U[A]=F[0]),U.removeListener!==void 0&&this.emit("removeListener",A,I||S)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(A){var S,F,U;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[A]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete F[A]),this;if(arguments.length===0){var Z=Object.keys(F),v;for(U=0;U<Z.length;++U)v=Z[U],v!=="removeListener"&&this.removeAllListeners(v);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(S=F[A],typeof S=="function")this.removeListener(A,S);else if(S!==void 0)for(U=S.length-1;U>=0;U--)this.removeListener(A,S[U]);return this};function p(A,S,F){var U=A._events;if(U===void 0)return[];var Z=U[S];return Z===void 0?[]:typeof Z=="function"?F?[Z.listener||Z]:[Z]:F?y(Z):g(Z,Z.length)}i.prototype.listeners=function(A){return p(this,A,!0)},i.prototype.rawListeners=function(A){return p(this,A,!1)},i.listenerCount=function(A,S){return typeof A.listenerCount=="function"?A.listenerCount(S):m.call(A,S)},i.prototype.listenerCount=m;function m(A){var S=this._events;if(S!==void 0){var F=S[A];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function g(A,S){for(var F=new Array(S),U=0;U<S;++U)F[U]=A[U];return F}function R(A,S){for(;S+1<A.length;S++)A[S]=A[S+1];A.pop()}function y(A){for(var S=new Array(A.length),F=0;F<S.length;++F)S[F]=A[F].listener||A[F];return S}function b(A,S){return new Promise(function(F,U){function Z(I){A.removeListener(S,v),U(I)}function v(){typeof A.removeListener=="function"&&A.removeListener("error",Z),F([].slice.call(arguments))}V(A,S,v,{once:!0}),S!=="error"&&f(A,Z,{once:!0})})}function f(A,S,F){typeof A.on=="function"&&V(A,"error",S,F)}function V(A,S,F,U){if(typeof A.on=="function")U.once?A.once(S,F):A.on(S,F);else if(typeof A.addEventListener=="function")A.addEventListener(S,function Z(v){U.once&&A.removeEventListener(S,Z),F(v)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}return Lr.exports}var t5={},n5={},r5,s5;function a4(){return s5||(s5=1,r5=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==r||i.enumerable!==!0)return!1}return!0}),r5}var pl,i5;function Xs(){if(i5)return pl;i5=1;var e=a4();return pl=function(){return e()&&!!Symbol.toStringTag},pl}var a5,o5;function AN(){return o5||(o5=1,a5=Error),a5}var l5,c5;function RN(){return c5||(c5=1,l5=EvalError),l5}var d5,u5;function VN(){return u5||(u5=1,d5=RangeError),d5}var h5,p5;function yN(){return p5||(p5=1,h5=ReferenceError),h5}var m5,g5;function o4(){return g5||(g5=1,m5=SyntaxError),m5}var f5,b5;function Us(){return b5||(b5=1,f5=TypeError),f5}var A5,R5;function EN(){return R5||(R5=1,A5=URIError),A5}var ml,V5;function CN(){if(V5)return ml;V5=1;var e=typeof Symbol<"u"&&Symbol,t=a4();return ml=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},ml}var gl,y5;function SN(){if(y5)return gl;y5=1;var e={__proto__:null,foo:{}},t=Object;return gl=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)},gl}var fl,E5;function ZN(){if(E5)return fl;E5=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",s=function(o,l){for(var c=[],d=0;d<o.length;d+=1)c[d]=o[d];for(var h=0;h<l.length;h+=1)c[h+o.length]=l[h];return c},i=function(o,l){for(var c=[],d=l,h=0;d<o.length;d+=1,h+=1)c[h]=o[d];return c},a=function(o,l){for(var c="",d=0;d<o.length;d+=1)c+=o[d],d+1<o.length&&(c+=l);return c};return fl=function(o){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(e+l);for(var c=i(arguments,1),d,h=function(){if(this instanceof d){var y=l.apply(this,s(c,arguments));return Object(y)===y?y:this}return l.apply(o,s(c,arguments))},p=n(0,l.length-c.length),m=[],g=0;g<p;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(h),l.prototype){var R=function(){};R.prototype=l.prototype,d.prototype=new R,R.prototype=null}return d},fl}var bl,C5;function p2(){if(C5)return bl;C5=1;var e=ZN();return bl=Function.prototype.bind||e,bl}var Al,S5;function vN(){if(S5)return Al;S5=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=p2();return Al=n.call(e,t),Al}var Rl,Z5;function yr(){if(Z5)return Rl;Z5=1;var e,t=AN(),n=RN(),r=VN(),s=yN(),i=o4(),a=Us(),o=EN(),l=Function,c=function(P){try{return l('"use strict"; return ('+P+").constructor;")()}catch{}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch{d=null}var h=function(){throw new a},p=d?(function(){try{return arguments.callee,h}catch{try{return d(arguments,"callee").get}catch{return h}}})():h,m=CN()(),g=SN()(),R=Object.getPrototypeOf||(g?function(P){return P.__proto__}:null),y={},b=typeof Uint8Array>"u"||!R?e:R(Uint8Array),f={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":m&&R?R([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":y,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&R?R(R([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!m||!R?e:R(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":r,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!m||!R?e:R(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&R?R(""[Symbol.iterator]()):e,"%Symbol%":m?Symbol:e,"%SyntaxError%":i,"%ThrowTypeError%":p,"%TypedArray%":b,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":o,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet};if(R)try{null.error}catch(P){var V=R(R(P));f["%Error.prototype%"]=V}var A=function P(ce){var $;if(ce==="%AsyncFunction%")$=c("async function () {}");else if(ce==="%GeneratorFunction%")$=c("function* () {}");else if(ce==="%AsyncGeneratorFunction%")$=c("async function* () {}");else if(ce==="%AsyncGenerator%"){var se=P("%AsyncGeneratorFunction%");se&&($=se.prototype)}else if(ce==="%AsyncIteratorPrototype%"){var ge=P("%AsyncGenerator%");ge&&R&&($=R(ge.prototype))}return f[ce]=$,$},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=p2(),U=vN(),Z=F.call(Function.call,Array.prototype.concat),v=F.call(Function.apply,Array.prototype.splice),I=F.call(Function.call,String.prototype.replace),N=F.call(Function.call,String.prototype.slice),X=F.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,K=function(P){var ce=N(P,0,1),$=N(P,-1);if(ce==="%"&&$!=="%")throw new i("invalid intrinsic syntax, expected closing `%`");if($==="%"&&ce!=="%")throw new i("invalid intrinsic syntax, expected opening `%`");var se=[];return I(P,T,function(ge,B,J,H){se[se.length]=J?I(H,O,"$1"):B||ge}),se},q=function(P,ce){var $=P,se;if(U(S,$)&&(se=S[$],$="%"+se[0]+"%"),U(f,$)){var ge=f[$];if(ge===y&&(ge=A($)),typeof ge>"u"&&!ce)throw new a("intrinsic "+P+" exists, but is not available. Please file an issue!");return{alias:se,name:$,value:ge}}throw new i("intrinsic "+P+" does not exist!")};return Rl=function(P,ce){if(typeof P!="string"||P.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ce!="boolean")throw new a('"allowMissing" argument must be a boolean');if(X(/^%?[^%]*%?$/,P)===null)throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $=K(P),se=$.length>0?$[0]:"",ge=q("%"+se+"%",ce),B=ge.name,J=ge.value,H=!1,_=ge.alias;_&&(se=_[0],v($,Z([0,1],_)));for(var ie=1,ae=!0;ie<$.length;ie+=1){var ne=$[ie],j=N(ne,0,1),oe=N(ne,-1);if((j==='"'||j==="'"||j==="`"||oe==='"'||oe==="'"||oe==="`")&&j!==oe)throw new i("property names with quotes must have matching quotes");if((ne==="constructor"||!ae)&&(H=!0),se+="."+ne,B="%"+se+"%",U(f,B))J=f[B];else if(J!=null){if(!(ne in J)){if(!ce)throw new a("base intrinsic for "+P+" exists, but the property is not available.");return}if(d&&ie+1>=$.length){var z=d(J,ne);ae=!!z,ae&&"get"in z&&!("originalValue"in z.get)?J=z.get:J=J[ne]}else ae=U(J,ne),J=J[ne];ae&&!H&&(f[B]=J)}}return J},Rl}var v5={exports:{}},Vl,W5;function m2(){if(W5)return Vl;W5=1;var e=yr(),t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Vl=t,Vl}var yl,I5;function Bs(){if(I5)return yl;I5=1;var e=yr(),t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return yl=t,yl}var El,F5;function WN(){if(F5)return El;F5=1;var e=m2(),t=o4(),n=Us(),r=Bs();return El=function(s,i,a){if(!s||typeof s!="object"&&typeof s!="function")throw new n("`obj` must be an object or a function`");if(typeof i!="string"&&typeof i!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,h=!!r&&r(s,i);if(e)e(s,i,{configurable:c===null&&h?h.configurable:!c,enumerable:o===null&&h?h.enumerable:!o,value:a,writable:l===null&&h?h.writable:!l});else if(d||!o&&!l&&!c)s[i]=a;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},El}var Cl,N5;function IN(){if(N5)return Cl;N5=1;var e=m2(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Cl=t,Cl}var Sl,G5;function FN(){if(G5)return Sl;G5=1;var e=yr(),t=WN(),n=IN()(),r=Bs(),s=Us(),i=e("%Math.floor%");return Sl=function(a,o){if(typeof a!="function")throw new s("`fn` is not a function");if(typeof o!="number"||o<0||o>4294967295||i(o)!==o)throw new s("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],c=!0,d=!0;if("length"in a&&r){var h=r(a,"length");h&&!h.configurable&&(c=!1),h&&!h.writable&&(d=!1)}return(c||d||!l)&&(n?t(a,"length",o,!0,!0):t(a,"length",o)),a},Sl}var X5;function g2(){return X5||(X5=1,(function(e){var t=p2(),n=yr(),r=FN(),s=Us(),i=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(a,i),l=m2(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new s("a function is required");var p=o(t,a,arguments);return r(p,1+c(0,h.length-(arguments.length-1)),!0)};var d=function(){return o(t,i,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d})(v5)),v5.exports}var Zl,U5;function f2(){if(U5)return Zl;U5=1;var e=yr(),t=g2(),n=t(e("String.prototype.indexOf"));return Zl=function(r,s){var i=e(r,!!s);return typeof i=="function"&&n(r,".prototype.")>-1?t(i):i},Zl}var vl,B5;function NN(){if(B5)return vl;B5=1;var e=Xs()(),t=f2(),n=t("Object.prototype.toString"),r=function(a){return e&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:n(a)==="[object Arguments]"},s=function(a){return r(a)?!0:a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&n(a)!=="[object Array]"&&n(a.callee)==="[object Function]"},i=(function(){return r(arguments)})();return r.isLegacyArguments=s,vl=i?r:s,vl}var Wl,Y5;function GN(){if(Y5)return Wl;Y5=1;var e=Object.prototype.toString,t=Function.prototype.toString,n=/^\s*(?:function)?\*/,r=Xs()(),s=Object.getPrototypeOf,i=function(){if(!r)return!1;try{return Function("return function*() {}")()}catch{}},a;return Wl=function(o){if(typeof o!="function")return!1;if(n.test(t.call(o)))return!0;if(!r){var l=e.call(o);return l==="[object GeneratorFunction]"}if(!s)return!1;if(typeof a>"u"){var c=i();a=c?s(c):!1}return s(o)===a},Wl}var Il,T5;function XN(){if(T5)return Il;T5=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,n)}catch(f){f!==r&&(t=null)}else t=null;var s=/^\s*class\b/,i=function(f){try{var V=e.call(f);return s.test(V)}catch{return!1}},a=function(f){try{return i(f)?!1:(e.call(f),!0)}catch{return!1}},o=Object.prototype.toString,l="[object Object]",c="[object Function]",d="[object GeneratorFunction]",h="[object HTMLAllCollection]",p="[object HTML document.all class]",m="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,R=!(0 in[,]),y=function(){return!1};if(typeof document=="object"){var b=document.all;o.call(b)===o.call(document.all)&&(y=function(f){if((R||!f)&&(typeof f>"u"||typeof f=="object"))try{var V=o.call(f);return(V===h||V===p||V===m||V===l)&&f("")==null}catch{}return!1})}return Il=t?function(f){if(y(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;try{t(f,null,n)}catch(V){if(V!==r)return!1}return!i(f)&&a(f)}:function(f){if(y(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;if(g)return a(f);if(i(f))return!1;var V=o.call(f);return V!==c&&V!==d&&!/^\[object HTML/.test(V)?!1:a(f)},Il}var Fl,w5;function l4(){if(w5)return Fl;w5=1;var e=XN(),t=Object.prototype.toString,n=Object.prototype.hasOwnProperty,r=function(o,l,c){for(var d=0,h=o.length;d<h;d++)n.call(o,d)&&(c==null?l(o[d],d,o):l.call(c,o[d],d,o))},s=function(o,l,c){for(var d=0,h=o.length;d<h;d++)c==null?l(o.charAt(d),d,o):l.call(c,o.charAt(d),d,o)},i=function(o,l,c){for(var d in o)n.call(o,d)&&(c==null?l(o[d],d,o):l.call(c,o[d],d,o))},a=function(o,l,c){if(!e(l))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=c),t.call(o)==="[object Array]"?r(o,l,d):typeof o=="string"?s(o,l,d):i(o,l,d)};return Fl=a,Fl}var x5,L5;function UN(){return L5||(L5=1,x5=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),x5}var Nl,k5;function c4(){if(k5)return Nl;k5=1;var e=UN(),t=typeof globalThis>"u"?h2:globalThis;return Nl=function(){for(var n=[],r=0;r<e.length;r++)typeof t[e[r]]=="function"&&(n[n.length]=e[r]);return n},Nl}var Gl,J5;function BN(){if(J5)return Gl;J5=1;var e=l4(),t=c4(),n=g2(),r=f2(),s=Bs(),i=r("Object.prototype.toString"),a=Xs()(),o=typeof globalThis>"u"?h2:globalThis,l=t(),c=r("String.prototype.slice"),d=Object.getPrototypeOf,h=r("Array.prototype.indexOf",!0)||function(R,y){for(var b=0;b<R.length;b+=1)if(R[b]===y)return b;return-1},p={__proto__:null};a&&s&&d?e(l,function(R){var y=new o[R];if(Symbol.toStringTag in y){var b=d(y),f=s(b,Symbol.toStringTag);if(!f){var V=d(b);f=s(V,Symbol.toStringTag)}p["$"+R]=n(f.get)}}):e(l,function(R){var y=new o[R],b=y.slice||y.set;b&&(p["$"+R]=n(b))});var m=function(R){var y=!1;return e(p,function(b,f){if(!y)try{"$"+b(R)===f&&(y=c(f,1))}catch{}}),y},g=function(R){var y=!1;return e(p,function(b,f){if(!y)try{b(R),y=c(f,1)}catch{}}),y};return Gl=function(R){if(!R||typeof R!="object")return!1;if(!a){var y=c(i(R),8,-1);return h(l,y)>-1?y:y!=="Object"?!1:g(R)}return s?m(R):null},Gl}var Xl,Q5;function YN(){if(Q5)return Xl;Q5=1;var e=l4(),t=c4(),n=g2(),r=f2(),s=Bs(),i=r("Object.prototype.toString"),a=Xs()(),o=typeof globalThis>"u"?h2:globalThis,l=t(),c=r("String.prototype.slice"),d=Object.getPrototypeOf,h=r("Array.prototype.indexOf",!0)||function(R,y){for(var b=0;b<R.length;b+=1)if(R[b]===y)return b;return-1},p={__proto__:null};a&&s&&d?e(l,function(R){var y=new o[R];if(Symbol.toStringTag in y){var b=d(y),f=s(b,Symbol.toStringTag);if(!f){var V=d(b);f=s(V,Symbol.toStringTag)}p["$"+R]=n(f.get)}}):e(l,function(R){var y=new o[R],b=y.slice||y.set;b&&(p["$"+R]=n(b))});var m=function(R){var y=!1;return e(p,function(b,f){if(!y)try{"$"+b(R)===f&&(y=c(f,1))}catch{}}),y},g=function(R){var y=!1;return e(p,function(b,f){if(!y)try{b(R),y=c(f,1)}catch{}}),y};return Xl=function(R){if(!R||typeof R!="object")return!1;if(!a){var y=c(i(R),8,-1);return h(l,y)>-1?y:y!=="Object"?!1:g(R)}return s?m(R):null},Xl}var Ul,z5;function TN(){if(z5)return Ul;z5=1;var e=YN();return Ul=function(t){return!!e(t)},Ul}var M5;function wN(){return M5||(M5=1,(function(e){var t=NN(),n=GN(),r=BN(),s=TN();function i(w){return w.call.bind(w)}var a=typeof BigInt<"u",o=typeof Symbol<"u",l=i(Object.prototype.toString),c=i(Number.prototype.valueOf),d=i(String.prototype.valueOf),h=i(Boolean.prototype.valueOf);if(a)var p=i(BigInt.prototype.valueOf);if(o)var m=i(Symbol.prototype.valueOf);function g(w,be){if(typeof w!="object")return!1;try{return be(w),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=s;function R(w){return typeof Promise<"u"&&w instanceof Promise||w!==null&&typeof w=="object"&&typeof w.then=="function"&&typeof w.catch=="function"}e.isPromise=R;function y(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(w):s(w)||J(w)}e.isArrayBufferView=y;function b(w){return r(w)==="Uint8Array"}e.isUint8Array=b;function f(w){return r(w)==="Uint8ClampedArray"}e.isUint8ClampedArray=f;function V(w){return r(w)==="Uint16Array"}e.isUint16Array=V;function A(w){return r(w)==="Uint32Array"}e.isUint32Array=A;function S(w){return r(w)==="Int8Array"}e.isInt8Array=S;function F(w){return r(w)==="Int16Array"}e.isInt16Array=F;function U(w){return r(w)==="Int32Array"}e.isInt32Array=U;function Z(w){return r(w)==="Float32Array"}e.isFloat32Array=Z;function v(w){return r(w)==="Float64Array"}e.isFloat64Array=v;function I(w){return r(w)==="BigInt64Array"}e.isBigInt64Array=I;function N(w){return r(w)==="BigUint64Array"}e.isBigUint64Array=N;function X(w){return l(w)==="[object Map]"}X.working=typeof Map<"u"&&X(new Map);function T(w){return typeof Map>"u"?!1:X.working?X(w):w instanceof Map}e.isMap=T;function O(w){return l(w)==="[object Set]"}O.working=typeof Set<"u"&&O(new Set);function K(w){return typeof Set>"u"?!1:O.working?O(w):w instanceof Set}e.isSet=K;function q(w){return l(w)==="[object WeakMap]"}q.working=typeof WeakMap<"u"&&q(new WeakMap);function P(w){return typeof WeakMap>"u"?!1:q.working?q(w):w instanceof WeakMap}e.isWeakMap=P;function ce(w){return l(w)==="[object WeakSet]"}ce.working=typeof WeakSet<"u"&&ce(new WeakSet);function $(w){return ce(w)}e.isWeakSet=$;function se(w){return l(w)==="[object ArrayBuffer]"}se.working=typeof ArrayBuffer<"u"&&se(new ArrayBuffer);function ge(w){return typeof ArrayBuffer>"u"?!1:se.working?se(w):w instanceof ArrayBuffer}e.isArrayBuffer=ge;function B(w){return l(w)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function J(w){return typeof DataView>"u"?!1:B.working?B(w):w instanceof DataView}e.isDataView=J;var H=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function _(w){return l(w)==="[object SharedArrayBuffer]"}function ie(w){return typeof H>"u"?!1:(typeof _.working>"u"&&(_.working=_(new H)),_.working?_(w):w instanceof H)}e.isSharedArrayBuffer=ie;function ae(w){return l(w)==="[object AsyncFunction]"}e.isAsyncFunction=ae;function ne(w){return l(w)==="[object Map Iterator]"}e.isMapIterator=ne;function j(w){return l(w)==="[object Set Iterator]"}e.isSetIterator=j;function oe(w){return l(w)==="[object Generator]"}e.isGeneratorObject=oe;function z(w){return l(w)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=z;function G(w){return g(w,c)}e.isNumberObject=G;function x(w){return g(w,d)}e.isStringObject=x;function L(w){return g(w,h)}e.isBooleanObject=L;function Q(w){return a&&g(w,p)}e.isBigIntObject=Q;function D(w){return o&&g(w,m)}e.isSymbolObject=D;function ee(w){return G(w)||x(w)||L(w)||Q(w)||D(w)}e.isBoxedPrimitive=ee;function re(w){return typeof Uint8Array<"u"&&(ge(w)||ie(w))}e.isAnyArrayBuffer=re,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(w){Object.defineProperty(e,w,{enumerable:!1,value:function(){throw new Error(w+" is not supported in userland")}})})})(n5)),n5}var K5,H5;function xN(){return H5||(H5=1,K5=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),K5}var Bl={exports:{}},O5;function LN(){return O5||(O5=1,typeof Object.create=="function"?Bl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Bl.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),Bl.exports}var _5;function b2(){return _5||(_5=1,(function(e){var t=Object.getOwnPropertyDescriptors||function(B){for(var J=Object.keys(B),H={},_=0;_<J.length;_++)H[J[_]]=Object.getOwnPropertyDescriptor(B,J[_]);return H},n=/%[sdj%]/g;e.format=function(B){if(!S(B)){for(var J=[],H=0;H<arguments.length;H++)J.push(a(arguments[H]));return J.join(" ")}for(var H=1,_=arguments,ie=_.length,ae=String(B).replace(n,function(oe){if(oe==="%%")return"%";if(H>=ie)return oe;switch(oe){case"%s":return String(_[H++]);case"%d":return Number(_[H++]);case"%j":try{return JSON.stringify(_[H++])}catch{return"[Circular]"}default:return oe}}),ne=_[H];H<ie;ne=_[++H])f(ne)||!v(ne)?ae+=" "+ne:ae+=" "+a(ne);return ae},e.deprecate=function(B,J){if(typeof he<"u"&&he.noDeprecation===!0)return B;if(typeof he>"u")return function(){return e.deprecate(B,J).apply(this,arguments)};var H=!1;function _(){if(!H){if(he.throwDeprecation)throw new Error(J);he.traceDeprecation?console.trace(J):console.error(J),H=!0}return B.apply(this,arguments)}return _};var r={},s=/^$/;if(he.env.NODE_DEBUG){var i=he.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+i+"$","i")}e.debuglog=function(B){if(B=B.toUpperCase(),!r[B])if(s.test(B)){var J=he.pid;r[B]=function(){var H=e.format.apply(e,arguments);console.error("%s %d: %s",B,J,H)}}else r[B]=function(){};return r[B]};function a(B,J){var H={seen:[],stylize:l};return arguments.length>=3&&(H.depth=arguments[2]),arguments.length>=4&&(H.colors=arguments[3]),b(J)?H.showHidden=J:J&&e._extend(H,J),U(H.showHidden)&&(H.showHidden=!1),U(H.depth)&&(H.depth=2),U(H.colors)&&(H.colors=!1),U(H.customInspect)&&(H.customInspect=!0),H.colors&&(H.stylize=o),d(H,B,H.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(B,J){var H=a.styles[J];return H?"\x1B["+a.colors[H][0]+"m"+B+"\x1B["+a.colors[H][1]+"m":B}function l(B,J){return B}function c(B){var J={};return B.forEach(function(H,_){J[H]=!0}),J}function d(B,J,H){if(B.customInspect&&J&&X(J.inspect)&&J.inspect!==e.inspect&&!(J.constructor&&J.constructor.prototype===J)){var _=J.inspect(H,B);return S(_)||(_=d(B,_,H)),_}var ie=h(B,J);if(ie)return ie;var ae=Object.keys(J),ne=c(ae);if(B.showHidden&&(ae=Object.getOwnPropertyNames(J)),N(J)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return p(J);if(ae.length===0){if(X(J)){var j=J.name?": "+J.name:"";return B.stylize("[Function"+j+"]","special")}if(Z(J))return B.stylize(RegExp.prototype.toString.call(J),"regexp");if(I(J))return B.stylize(Date.prototype.toString.call(J),"date");if(N(J))return p(J)}var oe="",z=!1,G=["{","}"];if(y(J)&&(z=!0,G=["[","]"]),X(J)){var x=J.name?": "+J.name:"";oe=" [Function"+x+"]"}if(Z(J)&&(oe=" "+RegExp.prototype.toString.call(J)),I(J)&&(oe=" "+Date.prototype.toUTCString.call(J)),N(J)&&(oe=" "+p(J)),ae.length===0&&(!z||J.length==0))return G[0]+oe+G[1];if(H<0)return Z(J)?B.stylize(RegExp.prototype.toString.call(J),"regexp"):B.stylize("[Object]","special");B.seen.push(J);var L;return z?L=m(B,J,H,ne,ae):L=ae.map(function(Q){return g(B,J,H,ne,Q,z)}),B.seen.pop(),R(L,oe,G)}function h(B,J){if(U(J))return B.stylize("undefined","undefined");if(S(J)){var H="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(H,"string")}if(A(J))return B.stylize(""+J,"number");if(b(J))return B.stylize(""+J,"boolean");if(f(J))return B.stylize("null","null")}function p(B){return"["+Error.prototype.toString.call(B)+"]"}function m(B,J,H,_,ie){for(var ae=[],ne=0,j=J.length;ne<j;++ne)ce(J,String(ne))?ae.push(g(B,J,H,_,String(ne),!0)):ae.push("");return ie.forEach(function(oe){oe.match(/^\d+$/)||ae.push(g(B,J,H,_,oe,!0))}),ae}function g(B,J,H,_,ie,ae){var ne,j,oe;if(oe=Object.getOwnPropertyDescriptor(J,ie)||{value:J[ie]},oe.get?oe.set?j=B.stylize("[Getter/Setter]","special"):j=B.stylize("[Getter]","special"):oe.set&&(j=B.stylize("[Setter]","special")),ce(_,ie)||(ne="["+ie+"]"),j||(B.seen.indexOf(oe.value)<0?(f(H)?j=d(B,oe.value,null):j=d(B,oe.value,H-1),j.indexOf(`
56
+ `+r)}catch(s){Qp(s)&&window.sessionStorage.removeItem("slstreamlogs"),window.sessionStorage.setItem("slstreamlogs",r)}}};addListener=(t,n)=>this.listeners.has(t)?(this.addStateLog(`listener '${t}' not added, already exists`),()=>{}):(this.listeners.set(t,n),this.addStateLog(`listener '${t}' added`),()=>this.removeListener(t));removeListener=t=>{this.listeners.delete(t),this.addStateLog(`listener '${t}' removed`)};connect=()=>{this.updateState(pt.Connecting),this.streamCancel&&(this.addStateLog("disconnect prev connection"),this.streamCancel.abort(),this.streamCancel=void 0);const t="get"in this.params&&typeof this.params.get=="function"?this.params.get():this.params;(async()=>{this.streamCancel=new AbortController;try{const n={headers:this.headers.getValues(),signal:this.streamCancel.signal},r=this.method(t,n);for await(const s of r)this.attempt=0,this.onData(s)}catch(n){n instanceof Ve&&n.code!=de.Canceled&&this.onStreamError(n)}})(),this.updateState(pt.Connected)};disconnect=()=>{this.streamCancel&&this.streamCancel.abort(),this.listeners.clear(),this.paramsListener?.(),clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.updateState(pt.Disconnected)};reconnect=()=>{if(this.reconnectTimeout)this.addStateLog("already reconnecting");else if(this.attempt<this.options.reconnectMaxAttempts){this.updateState(pt.Reconnect);const t=Math.min(this.options.reconnectMaxDelay,Math.pow(2,this.attempt)*this.options.reconnectDelay),n=Math.round(t*(1+Math.random())/2);this.reconnectTimeout=setTimeout(()=>{this.attempt++,this.updateState(pt.Reconnecting),this.addStateLog(`reconnect attempt ${this.attempt} after ${n}ms`),this.connect(),this.reconnectTimeout=void 0},n)}else this.addStateLog("max reconnect attempts reached"),this.disconnect()};getStore=()=>this.store?.getStore();onData=t=>{try{this.addStateLog(`received data => ${JSON.stringify(t)}`),this.store&&this.store.setValue(t);for(const[,n]of this.listeners)n(t);this.addStateLog(`data routed to ${this.listeners.size} listeners`)}catch(n){this.addStateLog(`error process data => ${n}`)}};onStreamError=t=>{if(this.addStateLog(`error => ${t?JSON.stringify(t):"undefined"}}`),t!==void 0){if(t instanceof Ve&&t.code!==de.Canceled){this.updateState(pt.Failed),this.state.setValue("error",t),t.code===de.Unknown&&t.cause==="missing trailer"&&(this.attempt=0),this.reconnect();return}this.disconnect()}}}const EI=new Set([de.Unknown,de.Internal,de.DeadlineExceeded,de.ResourceExhausted,de.FailedPrecondition,de.Unavailable,de.DataLoss]),CI=new Set(["An attempt was made to perform an operation that is not permitted: HttpStatusError: invalid SDK key"]),F3=st("grpc:retry"),SI=e=>async t=>{const n=t.contextValues.get(d1.retryAttempts),r=300,s=t.contextValues.get(d1.retryDelay);if(t.stream||n===0)return e(t);F3.trace({url:t.url,attempts:n,maxDelay:s},"retry options");for(let i=0;;i++)try{return await e(t)}catch(a){F3.trace({attempt:i,error:a,url:t.url},"retry attempt");const o=Ve.from(a);if(i>=n||!(o instanceof Ve)||!EI.has(o.code)||CI.has(o.rawMessage))throw a;const l=Math.min(s,Math.pow(2,i)*r),c=Math.round(l*(1+Math.random())/2);await new Promise(d=>setTimeout(d,c))}},d1={retryAttempts:Cc(10,{description:"Number of attempts to retry"}),retryDelay:Cc(3e4,{description:"Max delay between retries in milliseconds"})},ZI=()=>{const e=localStorage.getItem("sl-device-id");if(e)return e;const t=Wn.v4();return localStorage.setItem("sl-device-id",t),t},vI=()=>navigator.userAgentData?.platform||navigator.platform,WI=e=>e?"webOS":navigator.userAgentData&&navigator.userAgentData.mobile||"ontouchstart"in window||navigator.maxTouchPoints>0?"mobile-web":"desktop-web";class N3{toJsonOptions={emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1};transport;streamTransport;nanoquery;host;$headers;storeCache;interceptors=[];clients;streamClients;subscriptions;opts;constructor(t,n){this.host=t,this.opts=n,this.$headers=new mn(tt({"sl-device-id":ZI(),"sl-device-os":vI(),"sl-platform":WI(n?.webOS)}),"transport:headers"),this.initInterceptors(),this.clients=new Map,this.streamClients=new Map,this.subscriptions=new Map,this.storeCache=new Map;const[r,s,i]=E2.nanoquery({dedupeTime:n?.dedupeTime,revalidateInterval:n?.refetchInterval});this.nanoquery={createFetcherStore:r,createMutatorStore:s,utils:i},this.transport=Z3({baseUrl:t,defaultTimeoutMs:1e4,interceptors:this.interceptors}),this.streamTransport=Z3({baseUrl:t,interceptors:this.interceptors})}addSubscription=(t,n,r)=>{const s=this.subscriptions.get(n);if(s)return s;const i=new yI(this.$headers,t,n,r);return this.subscriptions.set(n,i),i};removeSubscription=t=>{t.disconnect(),this.subscriptions.delete(t.params)};disconnect=()=>{for(const[s,i]of this.subscriptions)i.disconnect(),this.subscriptions.delete(s);this.clients.clear(),this.streamClients.clear(),this.subscriptions.clear();const[t,n,r]=E2.nanoquery({dedupeTime:this.opts?.dedupeTime,revalidateInterval:this.opts?.refetchInterval});this.nanoquery={createFetcherStore:t,createMutatorStore:n,utils:r}};registerInterceptor=t=>{this.interceptors.push(t)};removeInterceptor=t=>{this.interceptors=this.interceptors.filter(n=>n!==t)};getClient=t=>{const n=t.typeName;if(this.clients.has(n))return this.clients.get(n);const r=Ec(t,this.transport);return this.clients.set(n,r),r};getStreamClient=t=>{const n=`stream-${t.typeName}`;if(this.clients.has(n))return this.clients.get(n);const r=Ec(t,this.streamTransport);return this.clients.set(n,r),r};createPromiseClient=(t,{params:n=[],method:r})=>{const s=this.getClient(t),i=r.toString(),a=[t.typeName,i.charAt(0).toLowerCase()+i.slice(1),...Array.isArray(n)?n:[n]],o=[t.typeName,i.charAt(0).toLowerCase()+i.slice(1)];return{client:s,createRequestOptions:l=>{const c=jl();for(const d in l){const h=d1[d];c.set(h,l[d])}return c},queryKey:a,queryKeyStr:o.join("")}};createStreamClient=t=>({client:this.getStreamClient(t)});setSdkKey=t=>{this.$headers.setValue("sdk",t)};setAuth=(t,n)=>{this.$headers.setValue("authorization",t),this.$headers.setValue("sl-user-id",n)};setHeader=(t,n)=>this.$headers.setValue(t,n);getHeader=t=>this.$headers.getValue(t);getHeaders=()=>this.$headers.getValues();initInterceptors=()=>{if(this.interceptors.length!==0)return;const t=n=>r=>{const s=this.$headers.getValues();for(const i in s)r.header.set(i,s[i]);return n(r)};this.interceptors.push(t),window.localStorage.getItem("SL_GRPC_DEVTOOLS")==="true"?this.interceptors.push(VI()):console.warn("SL GRPC DevTools is disabled. To enable, set SL_GRPC_DEVTOOLS to true in localStorage."),this.opts?.retryable&&this.interceptors.push(SI)}}const II=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Gp,{method:"retrieveEventId",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>{if(!a||typeof a!="string")return"";try{return(await n.retrieveEventId({id:a})).data?.id||""}catch{return""}}})},FI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Vr,{method:"getStream",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>a?(await n.getStream({id:a})).data?.attributes:void 0})},NI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Gp,{method:"summary",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>a?(await n.summary({id:a})).data?.attributes:void 0})},GI=(e,t)=>{const{queryKey:n,client:r}=t.createPromiseClient(c2,{method:"me",params:[e]});return t.nanoquery.createFetcherStore(n,{fetcher:async()=>{if(!t.getHeader("authorization"))return{data:void 0};const{data:s}=await r.me({});return{data:s}}})},XI=e=>{const{client:t,createRequestOptions:n}=e.createPromiseClient(c2,{method:"bypassAuth"}),r=n({retryAttempts:0});return({userKey:s,schema:i,init:a,inviterKey:o})=>t.bypassAuth({userKey:s,schema:i,init:a,inviterKey:o},{contextValues:r})},UI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Vr,{method:"get",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async()=>(await n.get({})).data?.attributes})},BI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Vr,{method:"getOrganization",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async()=>{const s=await n.getOrganization({});return s.data?{...s.data.attributes,id:s.data.id}:void 0}})},YI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(Vr,{method:"getOrganizationAdvertising",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async()=>(await n.getOrganizationAdvertising({})).data?.attributes})},TI=(e,t,n)=>{e.transport=new N3(t.host,{dedupeTime:1e3*60*5,refetchInterval:1e3*60*5,retryable:!0,webOS:t.webOS}),e.analyticsTransport=new N3(t.analyticsHost),e.sdk.host=e.transport.host,e.transport.setSdkKey(t.sdkKey),e.transport.setHeader("sl-sdk-version",t.version||"-"),e.transport.$headers.subscribe(r=>{e.analyticsTransport.$headers.getStore().set(r)}),e.sdk.onMount({name:"transport"},()=>()=>{e.transport.disconnect(),e.analyticsTransport.disconnect()}),n()};var Tt;(function(e){e.SCHEMA="schema",e.EXTERNAL_TOKEN="eToken",e.TOKEN="token"})(Tt||(Tt={}));class In extends Hn{constructor(){super("user")}setSchema=t=>{this.write(Tt.SCHEMA,t)};getSchema=()=>this.read(Tt.SCHEMA);setToken=t=>{this.write(Tt.TOKEN,t)};getToken=()=>this.read(Tt.TOKEN);setExternalToken=t=>{this.write(Tt.EXTERNAL_TOKEN,t)};getExternalToken=()=>this.read(Tt.EXTERNAL_TOKEN);removeToken=()=>{this.remove(Tt.TOKEN)}}var Lt;(function(e){e.DISABLED="disabled",e.INITIALIZATION="initialization",e.READY="ready",e.FAILED="failed",e.SUSPENDED="suspended"})(Lt||(Lt={}));const wI=e=>{const t=new In,n=new ct(ke(t.getExternalToken()),"userKey"),r=new ct(ke(t.getToken()),"userToken"),s=new gt(GI(r.getStore(),e),"user",({data:a,error:o,loading:l},c)=>{if(!o)return a?.data?.id?a.data.id:l===!1?void 0:c}),i=new gt(UI(r.getStore(),e),"userSettings");return{userKey:n,userToken:r,user:s,userSettings:i}},xI=e=>{const t=new ct(ke(void 0),"providerStreamId"),n=new gt(II(t.getStore(),e),"slStreamId",i=>i?.data),r=new gt(FI(n.getAtomStore(),e),"streamSettings"),s=new gt(NI(n.getAtomStore(),e),"streamSettings");return n.getAtomStore().listen(i=>{(i===""||i===void 0)&&(r.getStore().mutate(void 0),s.getStore().mutate(void 0))}),{providerStreamId:t,slStreamId:n,streamSettings:r,streamSummary:s}},LI=e=>{const t=new ct(ke(void 0),"enabled"),n=new ct(ke(Lt.DISABLED),"status"),r=new gt(BI(t.getStore(),e),"organizationSettings",o=>o?.data?.id),s=new gt(YI(r.getAtomStore(),e),"organizationAdvertising"),i=wI(e),a=xI(e);return{enabled:t,status:n,providerStreamId:a.providerStreamId,slStreamId:a.slStreamId,streamSettings:a.streamSettings,streamSummary:a.streamSummary,user:i.user,userKey:i.userKey,userToken:i.userToken,userSettings:i.userSettings,organizationSettings:r,organizationAdvertising:s}};class kI extends Ns{stores;constructor(t){const n=LI(t),r=fI(n);super(r,"core"),this.stores=n}getValue(){throw new Error("Not implemented")}getValues(){return this.stores}setValue(){throw new Error("Not implemented")}subscribe=t=>{let n;for(n in this.stores){const r=t[n];n in t&&r!==void 0&&this.stores[n].subscribe(t[n])}};unsubscribe=()=>this.getStore().off()}const JI=(e,t,n)=>{e.store=new kI(e.transport),e.stores=e.store.getValues(),e.sdk.enabled=e.stores.enabled.getStore(),e.sdk.status=e.stores.status.getStore(),e.sdk.sdkStore=Object.fromEntries(Object.entries(e.stores).map(([r,s])=>[r,s.getStore()])),e.sdk.organizationStore=()=>e.stores.organizationSettings.getStore(),e.sdk.streamStore=()=>e.stores.streamSettings.getStore(),e.sdk.streamSummary=()=>e.stores.streamSummary.getStore(),e.storeUnsubscribe=()=>{e.store.unsubscribe()},n()},QI=e=>{const{client:t}=e.createPromiseClient(Xp,{method:"list"});return n=>t.list(n)},zp=e=>{const{client:t}=e.createPromiseClient(Xp,{method:"summary"});return n=>t.summary(n)},zI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(c2,{method:"getFriends",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>{if(!a)return[];try{return(await n.getFriends({})).data}catch{return[]}}})},MI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(rt,{method:"get",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>(await n.get({eventId:a})).data?.attributes,revalidateInterval:0,dedupeTime:1e3*60*60})},KI=(e,t,n)=>{const{client:r,queryKey:s}=n.createPromiseClient(rt,{method:"syncQuestion",params:[e,t?"true":""]});return n.nanoquery.createFetcherStore(s,{fetcher:async(i,a,o,l)=>{if(!o||l)return;const c=await r.syncQuestion({filter:{eventId:o}});if(c.data?.attributes?.question?.type!==M.PROMOTION)return c.data?.attributes},dedupeTime:1e3*60*10,revalidateInterval:0})},HI=async(e,t)=>{const{client:n}=t.createPromiseClient(rt,{method:"item",params:[e]});return(await n.item({id:e})).data},OI=(e,t)=>{const{client:n}=t.createStreamClient(rt),r=_e.atom({eventId:e.get()||"",feedId:""});return e.subscribe((s="")=>{r.set({eventId:s,feedId:""})}),t.addSubscription(n.subscription,r,{name:"feedSubscription"})},_I=(e,t)=>{const{client:n}=t.createStreamClient(rt);return t.addSubscription(n.questionSubscription,{questionId:e},{name:"questionSubscription"})},Mp=async(e,t)=>{const{client:n}=t.createPromiseClient(rt,{method:"questionByUser",params:[e]});return(await n.questionByUser({questionId:e})).data?.attributes?.question},Dr=(e,t)=>{const{client:n,queryKey:r,queryKeyStr:s}=t.createPromiseClient(rt,{method:"questionByUser",params:[e]});let i=s;if(typeof e!="object"?i+=e:i+="atom",t.storeCache.has(i))return t.storeCache.get(i);{const a=t.nanoquery.createFetcherStore(r,{fetcher:async(o,l,c)=>(await n.questionByUser({questionId:c})).data?.attributes?.question,dedupeTime:1/0,revalidateInterval:0});return t.storeCache.set(i,a),a}},Kp=async(e,t)=>{if(!e)return;const{client:n}=t.createPromiseClient(rt,{method:"getQuestion",params:[e]}),r=await n.getQuestion({id:e});if(!r.data?.attributes)return;const{options:s,notification:i,...a}=r.data.attributes,o=s?.options.case==="promotion"?s?.options.value:void 0;return{id:a.id,question:a,promotion:o,notification:i}},jI=(e,t,n,r,s,i,a)=>{const{client:o,queryKey:l}=a.createPromiseClient(rt,{method:"list",params:[e,t,i?"true":""]});return a.nanoquery.createFetcherStore(l,{fetcher:async(c,d,h,p,m)=>{if(!h||m)return[];const g=await o.list({eventId:h,filter:{types:p===tn.ALLOWED?[]:[M.FACTOID,M.PROMOTION,M.TWEET],statuses:[Xe.ACTIVE,Xe.RESOLVED]}}),R={eventId:h,userId:n.get(),organizationId:r.get()};for(const y of g.data)s.isQuestionReceived(R,y.id)||(Se.emit("poll",{action:"received",payload:{isAd:y.attributes?.adUnit==ot.UNSET,questionId:y.id,questionType:y.attributes?.type}}),s.saveQuestionReceived(R,y.id));return g.data},dedupeTime:1/0,revalidateInterval:0})},DI=(e,t)=>{const{client:n,queryKey:r}=t.createPromiseClient(rt,{method:"list",params:[e]});return t.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a)=>{if(!a)return;const o=(await n.list({eventId:a,filter:{types:[M.PROMOTION],statuses:[Xe.ACTIVE]},pagination:{page:0,pageSize:1}})).data?.[0];if(o.type==="promotion")return Kp(o.id,t)},dedupeTime:1/0,revalidateInterval:0})},PI=(e,t,n,r,s)=>{const{client:i,queryKey:a}=s.createPromiseClient(rt,{method:"betPack",params:[e,t,n]});return s.nanoquery.createFetcherStore(a,{fetcher:async(o,l,c,d,h)=>{if(!c||!d||!h)return{timestamp:Date.now(),data:null};const p=await i.betPack({eventId:c,types:[M.PREDICTION],statuses:[Xe.ACTIVE,Xe.RESOLVED],limit:5,sort:{field:"activated_at",order:"asc"}});return!p.data||!p.data.length?{timestamp:Date.now(),data:null}:{timestamp:Date.now(),data:p.data?.reduce((m,g)=>{const R=g?.attributes?.question;if(!R?.id)return m;const y={eventId:c,userId:d,organizationId:h};return r.isQuestionReceived(y,R.id)||(Se.emit("poll",{action:"received",payload:{isAd:R?.adUnit==ot.UNSET,questionId:R.id,questionType:R.type}}),r.saveQuestionReceived(y,R.id)),R.answers=R.answers.sort((b,f)=>b.id>f.id?1:-1),{...m,[R.id]:R}},{})}},dedupeTime:1/0,revalidateInterval:0})},$I=(e,t,n)=>{const r=_e.batched([t,n],()=>{const a=t.get();if(!a)return;const o=n.get().data?.find(c=>c.id===a?.questionId),l=a?.question?.openedFrom;return o?(o.openedFrom=l,o):a.question}),s=_e.batched(r,a=>a&&a.type==="question"?a.id:void 0),i=Dr(s,e);return{$store:r,$extendedStore:i,updateExtendedQuestion:a=>{const o=i.get().data,l=(c,d)=>{if(!c||!d)return(c||d||[]).sort((g,R)=>g.id>R.id?1:-1);const h=c.sort((g,R)=>g.id>R.id?1:-1),p=d.sort((g,R)=>g.id>R.id?1:-1),m=[];for(let g=0;g<h.length;g++)m.push({...h[g],...p[g],correct:h[g].correct,youVoted:h[g].youVoted,pointsEarned:h[g].pointsEarned});return m};i.mutate({...a,options:o?.options,subject:o?.subject,appearance:o?.appearance,answers:l(o?.answers,a?.answers)})}}};var Fn;(function(e){e.SHOWED="showed",e.EVENT="ev"})(Fn||(Fn={}));class qI extends Hn{constructor(){super("advertisement")}setShowed=t=>{this.write(Fn.SHOWED,t,"true")};isViewed=t=>this.read(Fn.SHOWED,t);fireEvent=(t,n)=>{this.write(Fn.EVENT,n,t,"true")};isEventFired=(t,n)=>this.read(Fn.EVENT,n,t)==="true"}const eF=e=>{const t=e.data?.attributes?.question;if((e.data?.attributes?.feedItem?.type==="promotion"?e.data.attributes.feedItem:void 0)===void 0||!t)return;const{options:n,notification:r,...s}=t,i=n?.options.case==="promotion"?n.options.value:void 0;return{id:s.id,question:s,notification:r,promotion:i}},Br=e=>e.startsWith("http://")||e.startsWith("https://")?new URL(e).toString():e,tF=({gamOptions:e,gamBaseUrl:t})=>{const n=`${t}?`,r=[];for(const s in e){const i=s.replace(/([a-zA-Z])(?=[A-Z])/g,"$1_").toLowerCase(),a=e[s];if(a)if(typeof a=="string")r.push(`${i}=${Br(a)}`);else if(Array.isArray(a))r.push(`${i}=${a.map(Br).join(",")}`);else{const o=Object.entries(a).map(([l,c])=>Array.isArray(c)?`${l}=${c.map(Br).join(",")}`:typeof c=="string"?`${l}=${Br(c)}`:`${l}=${c}`).join("&").replaceAll("=","%3D").replaceAll("&","%26").replaceAll(",","%2C");r.push(`${i}=${o}`)}}return n+r.join("&")},Zn=e=>(e?.promotion?.type===Ae.INGAME_IAB11_LBAR||e?.promotion?.type===Ae.INGAME_IAB21_LBAR)&&!!e.promotion.additionalBanner?.imageUrl,nF=(e,t,n)=>{let r=!1;const s=n.transport,i=st("advertisement"),a=new qI,o=(b,f)=>{a.fireEvent(b,f)},l=(b,f)=>a.isEventFired(b,f),c=tt({}),d=DI(e,s),h=b=>{const f=c.get(),V=f.data?.question.id,A=f.data?.promotion?.type;V&&(c.get()?.isOpened||(c.setKey("isOpened",!0),Se.emit("advertisement",{action:"opened",payload:{id:V,type:A,hasBanner:Zn(f.data),openedFrom:b?.fromNotification?"notification":"auto"}})),b?.fromNotification&&(c.setKey("hasNotification",!1),Se.emit("advertisement",{action:"notification-opened",payload:{id:V,type:A,hasBanner:Zn(f.data)}})))},p=()=>{const b=c.get(),f=b.data?.question.id,V=b.data?.promotion?.type,A=c.get()?.isOpened;f&&!A&&(i.debug({id:f},"markAsViewed: %o"),a.setShowed(f),c.setKey("isOpened",!0),Se.emit("advertisement",{action:"viewed",payload:{id:f,type:V,hasBanner:Zn(b.data)}}))},m=(b,f)=>{f?c.set({loading:!1,error:void 0,data:f,hasNotification:f?.notification?.enabled===dc.NOTIFICATION_ENABLED,close:()=>g(f.question.id),togglePause:V=>R(f.question.id,V),toggleMute:V=>y(f.question.id,V),isViewed:!!a.isViewed(f.question.id),fireEvent:V=>o(b,V),isEventFired:V=>l(b,V)}):(c.setKey("loading",!0),Kp(b,s).then(V=>c.set({loading:!1,error:void 0,data:V,hasNotification:V?.notification?.enabled===dc.NOTIFICATION_ENABLED,close:()=>g(V?.question.id),togglePause:A=>R(V?.question.id,A),toggleMute:A=>y(V?.question.id,A),isViewed:V&&!!a.isViewed(V.question.id),fireEvent:A=>o(b,A),isEventFired:A=>l(b,A)})).catch(V=>c.set({loading:!1,error:V,data:void 0,fireEvent:()=>{},isEventFired:()=>!1})))};c.subscribe((b,f)=>{if(!(b.data?.id===f?.data?.id&&b.isPaused!==f?.isPaused)){if(b.data?.promotion?.type===Ae.EXTERNAL_AD&&!b?.externalAd&&b.data.promotion.adCampaigns?.desktopWebSettings){const V=tF(b.data.promotion.adCampaigns.desktopWebSettings);c.setKey("externalAd",{type:"gam",url:V})}b.data?.promotion&&!b.isOpened&&(Se.emit("advertisement",{action:"received",payload:{id:b.data.question.id,type:b.data.promotion.type,hasNotification:!!b.hasNotification,hasBanner:Zn(b.data),isViewed:!!a.isViewed(b.data.question.id)},skipAnalytics:b.data.question.id===f?.data?.question.id}),b.data.question.id!==f?.data?.question.id&&!a.isViewed(b.data.question.id)&&Se.emit("advertisement",{action:"notification-received",payload:{id:b.data.question.id,type:b.data.promotion.type,hasNotification:!0,hasBanner:Zn(b.data),isViewed:!1}})),!b?.data&&f?.data&&Se.emit("advertisement",{action:"closed",payload:{id:f.data.question.id,type:f.data.promotion?.type,hasNotification:!!f.hasNotification,hasBanner:Zn(f.data),isViewed:!!a.isViewed(f.data.question.id)}})}});const g=b=>{(!b||c.get()?.data?.question.id===b)&&c.set({})},R=(b,f)=>{c.get()?.data?.question.id===b&&c.setKey("isPaused",f)},y=(b,f)=>{c.get()?.data?.question.id===b&&c.setKey("isMuted",f)};return{connect:()=>{r||(r=!0,d.subscribe((b,f)=>{b.data&&(!f?.data||b.data.id!==f.data.id)&&m(b.data.question.id,b.data)}),t.addListener("promotion",b=>{const f=eF(b);if(f){if(f.question.status===Xe.RESOLVED){g(f.question.id),i.debug({promotion:f},"resolved: %o");return}if(f.question.status===Xe.ACTIVE){i.debug({promotion:f},"active: %o"),m(f.question.id,f);return}i.debug({promotion:f},"skip: %o")}}))},hide:g,show:m,open:h,markAsViewed:p,$store:c}};var Rt;(function(e){e.ONBOARDING="onboarding",e.ONBOARDING_IO="onboarding_io",e.QUESTION_RECEIVED="q-received",e.QUESTION_OPENED="q-opened"})(Rt||(Rt={}));class rF extends Hn{constructor(){super("gamification-session",window.sessionStorage)}writeValue=(t,n)=>{this.write(...t,n)};readValue=t=>this.read(...t)}class sF extends Hn{sessionStorage;constructor(){super("gamification"),this.sessionStorage=new rF}saveQuestionReceived=({userId:t,eventId:n,organizationId:r},s)=>{this.write(Rt.QUESTION_RECEIVED,r,t,n,s,"1")};isQuestionReceived=({userId:t,eventId:n,organizationId:r},s)=>!!this.read(Rt.QUESTION_RECEIVED,r,t,n,s);saveQuestionOpened=({userId:t,eventId:n,organizationId:r},s)=>{this.write(Rt.QUESTION_OPENED,r,t,n,s,"1")};isQuestionOpened=({userId:t,eventId:n,organizationId:r},s)=>!!this.read(Rt.QUESTION_OPENED,r,t,n,s);saveOnboardingStatus=({userId:t,eventId:n,organizationId:r},s)=>{this.write(Rt.ONBOARDING,r,t,n,s)};getOnboardingStatus=({userId:t,eventId:n,organizationId:r})=>this.read(Rt.ONBOARDING,r,t,n);setOnboardingInstantOpen=({userId:t,eventId:n,organizationId:r})=>{this.sessionStorage.writeValue([Rt.ONBOARDING_IO,r,t,n],"1")};getOnboardingInstantOpen=({userId:t,eventId:n,organizationId:r})=>this.sessionStorage.readValue([Rt.ONBOARDING_IO,r,t,n])}var tn;(function(e){e.ALLOWED="allowed",e.DISALLOWED="disallowed"})(tn||(tn={}));class iF{slStreamId;organizationId;userId;interactiveAllowed;openedQuestionId;openedQuestion;activeQuestionId;feedList;betPack;moderationId;moderation;feedSubscription;questionSubscription;advertisement;storage;notifications;log;transport;cancels=new Set;constructor(t){this.transport=t.transport,this.log=st("gamification-background"),this.storage=new sF,this.slStreamId=t.stores.slStreamId.getAtomStore(),this.organizationId=t.stores.organizationSettings.getAtomStore(),this.userId=t.stores.user.getAtomStore(),this.moderationId=new ct(ke(void 0),"moderationId").getStore(),this.interactiveAllowed=new ct(ke(tn.DISALLOWED),"interactiveAllowed").getStore(),this.openedQuestionId=new ct(ke(void 0),"openedQuestionId").getStore(),this.notifications=t.notifications,this.moderation=new gt(MI(this.slStreamId,t.transport),"gamification:moderation");const n=!!t.sdk.options.get().betPack;this.feedList=new gt(jI(this.slStreamId,this.interactiveAllowed,this.userId,this.organizationId,this.storage,n,t.transport),"gamification:feedList"),this.betPack=new gt(PI(this.slStreamId,this.userId,this.organizationId,this.storage,t.transport),"gamification:betPack"),this.activeQuestionId=KI(this.slStreamId,n,t.transport),this.openedQuestion=$I(t.transport,this.openedQuestionId,this.feedList.getStore()),this.cancels.add(this.openedQuestionId.listen(r=>{this.log.debug({item:r},"received question"),r?.questionId?(this.log.info("cleanup on close question"),this.questionSubscription!==void 0&&(t.transport.removeSubscription(this.questionSubscription),this.questionSubscription=void 0),this.questionSubscription=_I(r.questionId,t.transport),this.questionSubscription.addListener("feed-subscription-opened-question",s=>{const i=s.data?.attributes?.question;if(this.openedQuestion.updateExtendedQuestion(i),this.betPack&&i?.type===M.PREDICTION&&(i.status===Xe.ACTIVE||i.status===Xe.RESOLVED)){const a=this.betPack.getValues().data?.data||{},o=a?.[i.id];if(o){const l=[],c=o.answers.sort((h,p)=>h.id>p.id?1:-1),d=i.answers.sort((h,p)=>h.id>p.id?1:-1);for(let h=0;h<c.length;h++)l.push({...c[h],...d[h],correct:c[h].correct,youVoted:c[h].youVoted,pointsEarned:c[h].pointsEarned});this.betPack.getStore().mutate({timestamp:Date.now(),data:{...a,[i.id]:{...o,status:i.status,marketClosed:i.marketClosed,activatedAt:i.activatedAt,answerSetAt:i.answerSetAt,answers:l}}})}}}),this.questionSubscription.connect()):(this.log.info("cleanup on close question"),this.questionSubscription!==void 0&&(t.transport.removeSubscription(this.questionSubscription),this.questionSubscription=void 0))})),this.feedSubscription=OI(this.slStreamId,t.transport),this.cancels.add(this.feedSubscription.addListener("bet-pack-update",async r=>{const s=r.data?.attributes?.question;if(this.betPack&&s?.type===M.PREDICTION&&(s.status===Xe.ACTIVE||s.status===Xe.RESOLVED)){const i=this.betPack.getValues().data?.data||{},a=i?.[s.id];if(a)this.betPack.getStore().mutate({timestamp:Date.now(),data:{...i,[s.id]:{...a,status:s.status,marketClosed:s.marketClosed,activatedAt:s.activatedAt,answerSetAt:s.answerSetAt}}});else if(!a&&Object.keys(i).length<5){const o=await Mp(s.id,this.transport);this.betPack.getStore().mutate({timestamp:Date.now(),data:{...i,[s.id]:o}})}}})),this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question",r=>{const s=this.activeQuestionId.get().data?.question?.id,i=r.data?.attributes?.question;if(!(!i||i.type===M.PROMOTION)){if(i.status===Xe.RESOLVED){s===i.id&&this.activeQuestionId.mutate(void 0);return}window.requestAnimationFrame(()=>{this.activeQuestionId.mutate(r.data?.attributes)})}})),this.cancels.add(this.feedSubscription.addListener("moderation update",r=>{window.requestAnimationFrame(()=>{r.data?.attributes?.question===void 0&&r.data?.attributes?.moderation&&this.moderation.invalidate()})})),this.cancels.add(this.activeQuestionId.subscribe((r,s)=>{r.data?.feedItem&&r.data?.feedItem?.id!==s?.data?.feedItem?.id&&t.onQuestionActivate({stage:"activate",id:r.data.feedItem.id,isViewed:!!this.notifications.isViewed(this.getCurrentSessionId({prefix:"notification",entity:r.data.feedItem.id})),hasNotification:!0,type:r.data.feedItem.type}),!r.data?.feedItem&&s?.data?.feedItem&&t.onQuestionActivate({stage:"deactivate",id:s.data.feedItem.id,isViewed:!!this.notifications.isViewed(this.getCurrentSessionId({prefix:"notification",entity:s.data.feedItem.id})),hasNotification:!0,type:s.data.feedItem.type})})),this.feedSubscription.connect(),this.cancels.add(this.interactiveAllowed.listen(()=>{window.requestAnimationFrame(()=>{this.activeQuestionId.invalidate()})})),t.sdk.onMount({name:"gamification-background"},()=>()=>{this.activeQuestionId.off();for(const r of this.cancels)r(),this.cancels.delete(r)}),n||(this.advertisement=nF(this.slStreamId,this.feedSubscription,t))}getCurrentSessionId=t=>{const n=t.eventId||this.slStreamId.get()||"",r=t.userId||this.userId.get()||"",s=t.organizationId||this.organizationId.get()||"",i=t.entity||"",a=t.prefix||"";return[s,n,r,a,i].join(":")};disconnect=()=>{this.feedSubscription?.disconnect(),this.questionSubscription!==void 0&&(this.transport.removeSubscription(this.questionSubscription),this.questionSubscription=void 0)};openQuestion=(t,n)=>{this.openedQuestionId.set({questionId:t,question:n}),this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:t}))};closeQuestion=t=>{this.openedQuestionId.set(void 0),t&&this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:t}))}}class aF{notificationsList;store;timeouts;waitingQueue;activeQueue;options;logger;constructor(t){this.options=t,this.logger=st("notifications"),this.store=new Map,this.timeouts=new Map,this.waitingQueue=new Set,this.activeQueue=new Set,this.notificationsList=ke(new Map)}addToQueue=t=>{if(this.store.has(t.id)){this.logger.debug({notification:t},"skip existed notification: %o");return}const n=t.close,r=t.action;if(this.store.set(t.id,{...t,close:(...s)=>{n&&n(...s),this.closeNotification(t.id)},action:(...s)=>{r&&r(...s),this.closeNotification(t.id,{animateHiding:!1})}}),this.waitingQueue.add(t.id),this.activeQueue.size===this.options.concurrency){const[s]=this.activeQueue;if(this.store.get(s)?.persistent!==!0)this.closeNotification(s);else{const[i]=this.waitingQueue;this.waitingQueue.size>1&&this.closeNotification(i),this.tickWaitingQueue()}}else this.tickWaitingQueue()};tickWaitingQueue=()=>{if(this.activeQueue.size<this.options.concurrency){const[t]=this.waitingQueue;if(!t)return;this.activeQueue.add(t),this.waitingQueue.delete(t),this.logger.debug({job:t},"waiting queue tick"),this.tickActiveQueue(t)}else this.logger.debug({queueSize:this.activeQueue.size,concurrency:this.options.concurrency},"waiting queue tick skipped")};tickActiveQueue=t=>{if(!t)return;const n=this.store.get(t);if(!n){this.logger.debug({notificationId:t},"active queue tick skipped, notification not exist");return}Se.emit("notification",{action:"received",payload:{type:n.type,questionId:n.data.questionId,questionType:n.data.questionType}});const r=setTimeout(()=>{const s=t,i=new Map(this.notificationsList.get());i.set(n.id,n),this.notificationsList.set(i);const a=setTimeout(()=>{this.logger.debug({notificationId:s,delay:n.autoHideDuration||5e3},"notification hiding by autoHideDuration"),this.closeNotification(s)},n.autoHideDuration||5e3);this.timeouts.set(s,a),this.logger.debug({notificationId:s,queue:[...i.values()]},"notification displayed")},n.delay||0);this.timeouts.set(t,r),this.logger.debug({notificationId:t},"active queue tick completed"),this.tickWaitingQueue()};closeNotification=(t,{animateHiding:n=!0}={})=>{const r=new Map(this.notificationsList.get()),s=r.get(t);if(s){const i=!(this.waitingQueue.size>=this.options.concurrency)&&n;s.hiding=i,this.notificationsList.set(r);const a=()=>{const o=new Map(this.notificationsList.get());o.delete(t),this.notificationsList.set(o);const l=this.timeouts.get(t);l!==void 0&&(clearTimeout(l),this.timeouts.delete(t)),this.logger.debug({notificationId:t},"notification hidden"),s.hiding&&Se.emit("notification",{action:"closed",payload:{type:s.type,questionId:s.data.questionId,questionType:s.data.questionType}})};if(i){const o=setTimeout(a,this.options.animationDelay||0);this.timeouts.set(t,o)}else a()}return this.store.delete(t),this.activeQueue.delete(t),this.waitingQueue.delete(t),this.tickWaitingQueue(),this.logger.debug({notificationId:t},"notification hiding"),s};drain=()=>{this.store.clear(),this.timeouts.clear(),this.waitingQueue.clear(),this.activeQueue.clear(),this.notificationsList.off(),this.notificationsList.set(new Map)}}var ms;(function(e){e.OPENED="opened"})(ms||(ms={}));class oF extends Hn{constructor(){super("notification")}setOpened=t=>{this.write(ms.OPENED,t,"true")};isOpened=t=>this.read(ms.OPENED,t);clearNotification=()=>{this.clear()}}class lF{queue;storage;constructor(t={}){this.storage=new oF,this.queue=new aF({concurrency:1,animationDelay:1600,...t})}isViewed=t=>this.storage.isOpened(t);add=t=>{if(!this.isViewed(t.id)){if(t.data&&t.emitEvent){const n=t.action;t.action=(...r)=>{n&&n(...r),Se.emit("notification",{action:"opened",payload:{questionId:t.data.questionId,questionType:t.data.questionType}})}}this.queue.addToQueue(t)}};close=(t,{markAsViewed:n=!0,animateHiding:r}={})=>{this.queue.closeNotification(t,{animateHiding:r}),n&&this.markAsViewed(t)};update=(t,n)=>{const r=this.queue.notificationsList.get()?.get(t);n(r)};getActiveNotification=()=>{const t=this.queue.notificationsList.get();if(!t?.size)return null;for(const n of t.values())if(n.type===Mt.ONBOARDING)return n;return t.values().next().value};getQueueStore=()=>this.queue.notificationsList;markAsViewed=t=>{this.storage.setOpened(t)}}const cF=(e,t,n)=>{e.notifications=new lF(void 0),e.addNotification=e.notifications.add,e.sdk.getNotificationsStore=()=>e.notifications.getQueueStore(),e.sdk.getActiveNotification=()=>e.notifications.getActiveNotification(),e.sdk.onMount({name:"notifications"},()=>()=>{e.notifications.queue.drain()}),n()};var Qn;(function(e){e.UNKNOWN="unknown",e.ALREADY_VOTED="already_voted"})(Qn||(Qn={}));const G3=async(e,t)=>{const{client:n,createRequestOptions:r}=e.createPromiseClient(rt,{method:"submitAnswer"}),s=r({retryAttempts:0});try{return await n.submitAnswer({data:t},{contextValues:s})}catch(i){throw Ve.from(i)?.code===de.AlreadyExists?new Error(Qn.ALREADY_VOTED):new Error(Qn.UNKNOWN)}},Hp=(e,t)=>{const{client:n,createRequestOptions:r}=e.createPromiseClient(rt,{method:"submitInplay"}),s=r({retryAttempts:0});return n.submitInplay({data:{eventId:+t}},{contextValues:s})},dF={pageSize:10},uF=(e,t,n,r,s)=>{let i=0;const a=ke({pageSize:dF.pageSize,page:0}),o=tt({data:[],key:Date.now(),hasMore:!0,loading:void 0,error:void 0}),l=QI(e),c=async()=>{const p=t.get(),m=r?.getStore().get().data?.map(g=>g.slId)||[];if(p&&m?.length){const g=n.get();g&&m.push(g),o.setKey("loading",!0),o.setKey("data",[]);const R=await l({eventId:p,usersIds:m,leaderboardId:""});o.set({data:R.data.map((y,b)=>({...y.attributes,friendsRank:b+1})),hasMore:!1,key:Date.now(),loading:!1}),R.meta&&(i=Math.round(R.meta.count/R.meta.pageSize))}},d=()=>{c()},h=p=>{const m=a.get(),g=p||m.page+1;g<=i&&a.set({...m,page:g})};return _e.onMount(o,()=>{const p=t.listen(c),m=r?.listen(c);return()=>{p(),m?.()}}),{$store:o,fetchMore:h,invalidate:d}};class hF extends Hn{get=this.read;set=this.write;del=this.remove;constructor(){super("deep-link-context",window.sessionStorage)}}const X3="sldl",Gs="sldl_uid",Op="sldl_eid",_p="sldl_e_eid",pF=new Set([Gs,Op,_p]),U3=e=>{const t={},n={};for(const[r,s]of e)pF.has(r)?t[r]=s:n[r]=s;return{result:t,remain:n}},mF=({hash:e,search:t})=>{if(e&&e.includes(X3)){const n=new URLSearchParams(e.substr(1));return{hash:U3(n)}}if(t&&t.includes(X3)){const n=new URLSearchParams(t);return{search:U3(n)}}return null},B3=st("deep_link"),vt={debug:(...e)=>{B3.debug(...e),localStorage.getItem("SL_DEBUG")&&console.log(...e)},trace:(...e)=>{B3.trace(...e),localStorage.getItem("SL_DEBUG")&&console.log(...e)}},gF=(e,t)=>{const{hash:n,search:r}=window.location;if(vt.debug({hash:n,search:r},"get deep link data from"),n||r){const s=mF({hash:n,search:r});if(vt.debug(s,"parse deep link result"),s){const{hash:i,search:a}=s,{result:o,remain:l}=i||a;if(Object.keys(o).length!==0){e.setValue("data",o);const c=Object.keys(l).length!==0;if(i){let d="";c&&(d=`#${new URLSearchParams(l).toString()}`,vt.debug({updatedHash:d},"update hash")),window.history.replaceState(null,"",window.location.pathname+window.location.search+d)}if(a){let d="";c&&(d=`?${new URLSearchParams(l).toString()}`,vt.debug({updatedSearch:d},"update search")),window.history.replaceState(null,"",window.location.pathname+d+window.location.hash)}t(o)}}}e.setValue("parsed",!0)},fF=(e,t,n)=>{const r=new hF,s=r.get("sl-deep-link-store");let i={};if(s)try{i=JSON.parse(s)}catch(o){vt.debug(o)}e.deepLink={$store:new mn(tt(i),"deep-link-context"),getDeepLinkData:()=>{const{data:o,used:l}=e.deepLink.$store.getValues();return{data:o,used:l}},deepLinkUsed:o=>{vt.debug(`logged in with inviterId: ${o}`),e.deepLink.$store.setValue("used",!0)},onDeepLinkHandlers:new Set},e.sdk.getInviter=()=>{const{data:o,used:l}=e.deepLink.getDeepLinkData();return l?o?.[Gs]:void 0},e.sdk.inviteDisplayed=()=>{e.deepLink.$store.getStore().set({}),e.deepLink.$store.getStore().off(),r.del("sl-deep-link-store")},e.deepLink.$store.subscribe(o=>r.set("sl-deep-link-store",JSON.stringify(o))),e.sdk.addDeepLinkHandler=o=>{localStorage.getItem("SL_DEBUG")&&vt.trace("adding deep link handler"),e.deepLink.onDeepLinkHandlers.add(o)},t.onDeepLinkHandled&&e.sdk.addDeepLinkHandler(t.onDeepLinkHandled),e.sdk.removeDeepLinkHandler=o=>{vt.trace("removing deep link handler"),e.deepLink.onDeepLinkHandlers.delete(o)};const a=o=>{e.deepLink.$store.setValue("handled",!0),vt.trace({size:e.deepLink.onDeepLinkHandlers.size},"deep link handled, call callbacks");for(const l of e.deepLink.onDeepLinkHandlers)try{vt.trace("called handler"),l(o)}catch(c){console.error(c)}};gF(e.deepLink.$store,a),n()},bF=st("bypass");class AF extends gI{$coreStore;deepLink;transport;bypassLogin;constructor(t,n,r){super(),this.$coreStore=t,this.deepLink=r,this.transport=n,this.bypassLogin=XI(this.transport),this.connect()}me=async()=>(this.$coreStore.getValues().user.invalidate(),(await this.$coreStore.getValues().user.getValue())?.data);login=async(t,n)=>{this.$coreStore.getValues().userKey.setValue(n);const{used:r,data:s}=this.deepLink?.getDeepLinkData()||{},i=r?"":s?.[Gs];bF.debug({inviterKey:i},"login with inviterKey");const a=await this.bypassLogin({schema:t,userKey:n,inviterKey:i,init:!1}),o=a.meta?.jwt,l=a.data?.id;if(!o||!l)throw new Error("internal: token missing");return a.meta?.inviterKey&&this.deepLink&&this.deepLink.deepLinkUsed(a.meta.inviterKey),this.$coreStore.getValues().user.getStore().mutate({data:a.data}),this.saveUser(o,l),o};isAuthenticated=()=>this.me();logout=()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("",""),new In().clear()};softLogout=()=>{const t=new In;this.transport.setAuth("",""),t.setToken(""),this.reLogin()};reLogin=({skipLogin:t}={skipLogin:!1})=>{const n=new In,r=n.getToken(),s=n.getExternalToken();if(this.$coreStore.getValues().userKey.setValue(s),r)return this.saveUser(r,""),this.me().then(i=>{if(i?.id){const a=i.id;this.saveUser(r,a)}return i});if(s&&!r&&!t){const i=n.getSchema();i&&s&&this.login(i,s).catch(()=>{this.logout()})}};saveUser=(t,n)=>{this.transport.setAuth(t,n),this.$coreStore.getValues().userToken.setValue(t),new In().setToken(t)};connect=()=>{this.transport.registerInterceptor(t=>async n=>{try{return await t(n)}catch(r){throw r.code&&(r.code===7||r.code===16)&&this.transport.getHeader("authorization")&&this.softLogout(),r}})}}const qn=new In,RF=(e,t,n)=>{e.auth=new AF(e.store,e.transport,e.deepLink),e.stores.status.listen(r=>{r===Lt.READY&&e.auth.reLogin()}),e.sdk.userId=e.stores.user.getAtomStore,e.sdk.authorizationBypass=async(r,s)=>{if(!(qn.getSchema()===r&&qn.getExternalToken()===s&&e.transport.getHeader("authorization")))try{console.log("login",r,s),await e.auth.login(r,s),qn.setSchema(r),qn.setExternalToken(s)}catch(i){console.log("login error",i),e.sdk.logout()}},e.sdk.logout=()=>{e.auth.logout(),qn.clear()},e.sdk.getUserStore=()=>e.stores.user.getStore(),e.sdk.isUserAuthorized=()=>e.auth.isAuthenticated(),n()},Y3=st("video_player"),Yr={debug:(...e)=>{Y3.debug(...e),localStorage.getItem("SL_DEBUG")&&console.log(...e)},trace:(...e)=>{Y3.trace(...e),localStorage.getItem("SL_DEBUG")&&console.log(...e)}},VF=(e,t,n)=>{e.videoPlayer={controllers:new Set},e.sdk.addVideoPlayerController=r=>{Yr.trace("adding video player controller"),e.videoPlayer.controllers.add(r)},t.videoPlayerController&&e.sdk.addVideoPlayerController(t.videoPlayerController),e.sdk.removeVideoPlayerController=r=>{Yr.trace("removing video player controller"),e.videoPlayer.controllers.delete(r)},e.sdk.controlVideoPlayer=r=>{Yr.trace("controlling video player");for(const s of e.videoPlayer.controllers){Yr.trace("calling video player controller");try{s(r)}catch(i){console.error(i)}}},n()},yF={[M.FACTOID]:"insight",[M.POLL]:"poll",[M.TRIVIA]:"trivia",[M.PREDICTION]:"prediction",[M.TWEET]:"tweet"},vn=e=>e===Ae.INGAME_IAB11||e===Ae.INGAME_IAB21||e===Ae.NFL_SHOP_OVERLAY||e===Ae.SHOP_OVERLAY,EF=(e,t,n)=>{e.sdk.uiState=tt({}),e.ui={enableAppNotification:function(){e.sdk.uiState.setKey("appNotification",!0)},disableAppNotification:function(){e.sdk.uiState.get().app||e.sdk.uiState.setKey("appNotification",!1)},enableOnboardingNotification:function(){e.sdk.uiState.setKey("onboardingNotification",!0)},disableOnboardingNotification:function(){e.sdk.uiState.setKey("onboardingNotification",!1)},enablePolymarket:function(){e.sdk.uiState.setKey("polymarket",!0)},disablePolymarket:function(){e.sdk.uiState.setKey("polymarket",!1)},enableApp:function(){e.sdk.uiState.set({app:!0,appNotification:!0})},disableApp:function(){e.sdk.uiState.set({...e.sdk.uiState.get(),onboardingNotification:!1,appBanner:!1,appSidebar:!1,appNotification:!1,app:!1})},enableExposedPauseAd:function(){e.sdk.uiState.set({...e.sdk.uiState.get(),exposedPauseAd:!0})},disableExposedPauseAd:function(){e.sdk.uiState.set({...e.sdk.uiState.get(),exposedPauseAd:!1})}},e.sdk.uiHandlers={enablePolymarket:e.ui.enablePolymarket,disablePolymarket:e.ui.disablePolymarket},t.onContentActivate&&(e.ui.onContentActivate=t.onContentActivate);const r=s=>{e.ui.onContentActivate&&e.ui.onContentActivate({...s,type:"advertisement"})};e.onQuestionActivate=({questionType:s,...i})=>{if(e.ui.enableAppNotification(),e.ui.onContentActivate){const a=i.type||s&&yF[s]||"question";e.ui.onContentActivate({...i,type:a})}},e.sdk.onMount({name:"ui"},()=>{const s=o=>{if(o.slEventBus?.type==="exposedPauseAd")switch(o.slEventBus.action){case"enabled":e.ui.enableExposedPauseAd();break;case"disabled":e.ui.disableExposedPauseAd();break}if(o.slEventBus?.type==="app")switch(o.slEventBus.action){case"open":e.ui.enableApp();break;case"close":e.ui.disableApp();break}if(o.slEventBus?.type==="poll"){const l=o.slEventBus.action,{hasBanner:c}=o.slEventBus.payload;switch(l){case"onboardingOpen":e.sdk.uiState.set({app:!0});break;case"opened":e.sdk.uiState.set({...e.sdk.uiState.get(),appBanner:c,appSidebar:!0});break;case"closed":e.sdk.uiState.set({...e.sdk.uiState.get(),appBanner:!1,appSidebar:!1});break}}if(o.slEventBus?.type==="notification"){const l=o.slEventBus.action;if(o.slEventBus.payload.type===Mt.ONBOARDING)switch(l){case"received":e.ui.enableOnboardingNotification();break;case"closed":e.ui.disableOnboardingNotification();break}else switch(l){case"received":e.ui.enableAppNotification();break;case"closed":e.ui.disableAppNotification();break}}if(o.slEventBus?.type==="advertisement"&&t.withAd){const l=o.slEventBus,{hasNotification:c,hasBanner:d,id:h,isViewed:p,type:m}=l.payload;switch(l.action){case"notification-opened":e.sdk.uiState.set({promotionExternalAd:m===Ae.EXTERNAL_AD,promotionBanner:d,promotionNotification:!1,promotionOverlay:vn(m),promotionSidebar:!vn(m)});break;case"received":if(e.sdk.closeFeature(),r({stage:"activate",id:h,hasNotification:c,hasBanner:d,isViewed:p}),!t.withAdNotification){e.sdk.uiState.set({promotionBanner:d,onboardingNotification:e.sdk.uiState.get().onboardingNotification,promotionOverlay:vn(m),promotionSidebar:!vn(m),promotionExternalAd:m===Ae.EXTERNAL_AD});break}c?e.sdk.uiState.set({onboardingNotification:e.sdk.uiState.get().onboardingNotification,promotionNotification:!0}):e.sdk.uiState.set({onboardingNotification:e.sdk.uiState.get().onboardingNotification,promotionBanner:d,promotionOverlay:vn(m),promotionSidebar:!vn(m),promotionExternalAd:m===Ae.EXTERNAL_AD});break;case"closed":e.sdk.uiState.set({...e.sdk.uiState.get(),promotionNotification:!1,promotionBanner:!1,promotionOverlay:!1,promotionExternalAd:!1,promotionSidebar:!1}),r({stage:"deactivate",id:h,hasNotification:c,hasBanner:d,isViewed:p});break}}},i=Se.listen(s),a=e.activeFeature.subscribe(o=>{o||e.ui.disableApp()});return()=>{i(),a()}}),n()},CF=(e,t,n)=>{const r={onMountedFired:!1},s=new Map,i=new Map;e.sdk=Object.create(null),e.sdk.options=tt(t),e.sdk.withAuth=!1,e.sdk.onMount=({name:a,clear:o},l)=>{if(s.has(a)){const c=i.get(a);c&&c(),s.delete(a),i.delete(a)}s.set(a,{cb:l,clear:o}),e?.stores?.enabled?.get()==="on"&&i.set(a,l())},e.ready=()=>{e.stores.enabled.subscribe(a=>{a==="on"&&r.onMountedFired===!1&&(s.forEach(({cb:o},l)=>i.set(l,o())),r.onMountedFired=!0),a!=="on"&&r.onMountedFired===!0&&(i.forEach(o=>o()),i.clear(),s.forEach(({clear:o},l)=>o&&s.delete(l)),r.onMountedFired=!1)})},e.sdk.initializeApp=a=>(e.contextConfig=a,e.stores.enabled.get()==="on"?Promise.resolve({enabled:!0}):(e.storeSubscribe(),e.stores.enabled.setValue("on"),e.stores.status.setValue(Lt.INITIALIZATION),new Promise(o=>{window.requestAnimationFrame(async()=>{try{const l=await e.stores.organizationSettings.getValue();return l?(e.stores.status.setValue(Lt.READY),o({enabled:!!l})):(e.stores.status.setValue(Lt.FAILED),o({err:"failed"}))}catch(l){return e.stores.enabled.setValue(),e.stores.status.setValue(Lt.FAILED),o({err:`${l}`})}})}))),e.sdk.disableApp=()=>{e.stores.enabled.get()==="on"&&(e.stores.enabled.setValue(),e.stores.status.setValue(Lt.DISABLED),e.stores.slStreamId.setValue(),e.stores.providerStreamId.setValue(),e.sdk.closeFeature(!0),e.storeUnsubscribe(),e.transport.disconnect())},e.sdk.createEventSession=(a,o)=>{o?e.stores.slStreamId.getStore().set({loading:!1,data:a}):e.stores.providerStreamId.setValue(a)},n()},SF=(e,t)=>{const{client:n,queryKey:r}=e.createPromiseClient(Vr,{method:"generateDeepLink",params:t});return e.nanoquery.createFetcherStore(r,{fetcher:async(s,i,a,o)=>{if(!a)return{};try{return(await n.generateDeepLink({data:{gamification:!0,externalEventId:o,eventId:a}})).data?.attributes}catch{return}},dedupeTime:1e3*60*60*24,revalidateInterval:0})},ZF=(e,{web:t,mobile:n})=>{const{client:r}=e.createPromiseClient(PW,{method:"generate"});return r.generate({web:t,mobile:n})},T3=(e,t)=>{const n=new URLSearchParams(e);for(const[r,s]of Object.entries(t))n.append(r,s);return n.toString()},vF=(e,t,n,r)=>{const s=tt({});return _e.onMount(s,()=>SF(e,[t,n]).subscribe(async({data:i,loading:a})=>{const o=i===void 0&&a===!1?"https://streamlayer.io":i?.url,l=r.get()||"",c=t.get()||"",d=n.get()||"",h={[Gs]:l,[Op]:c,[_p]:d};if(!a&&o){s.setKey("loading",!0);let p=window.location.search,m=window.location.hash;p&&m||m?p=`?${T3(p,h)}`:m=`#${T3("",h)}`;const g=window.location.origin+window.location.pathname+p+m;try{const R=await ZF(e,{web:g,mobile:o});s.set({data:R.data?.link,loading:!1})}catch{s.set({loading:!1,error:"Failed to generate short link",data:void 0})}}else s.setKey("loading",!0)})),{$store:s,fetch}};var Be;(function(e){e.Unset="unset",e.Required="required",e.Optional="optional",e.Completed="completed",e.Disabled="disabled",e.Unavailable="unavailable"})(Be||(Be={}));const WF=(e,t,n,r)=>{const{inplayGame:s}=e.featureSettings.get(),i=t.getCurrentSessionId({prefix:"onboarding"});s&&n.add({type:Mt.ONBOARDING,id:i,action:e.openFeature,close:()=>{e.onboardingProcessed.set(!0)},persistent:!0,autoHideDuration:1e6,data:{questionId:"onboarding",questionType:M.UNSET,onboarding:{...s,instantOpen:!r.getOnboardingInstantOpen({userId:t.userId.get()||"",organizationId:t.organizationId.get()||"",eventId:t.slStreamId.get()||""}),markIstantOpen:()=>{r.setOnboardingInstantOpen({userId:t.userId.get()||"",organizationId:t.organizationId.get()||"",eventId:t.slStreamId.get()||""}),n.update(i,a=>{a?.data?.onboarding&&(a.data.onboarding.instantOpen=!0)})}}}})},Tr=(e,t,n,r,s,i,a,o)=>{try{const l=t.userId.get(),c=t.organizationId.get(),d=t.slStreamId.get();if(!l||!c||!d)return;const h=s.getOnboardingStatus({userId:l,organizationId:c,eventId:d});if(h===Be.Completed||o?.skipOnboarding){e.set(Be.Completed);for(const y of i)y();o?.skipOnboarding&&h!==Be.Completed&&(s.saveOnboardingStatus({organizationId:c,userId:l,eventId:d},Be.Completed),Hp(a,d));return}const p=t.moderation.getStore().value?.data,m=n.featureSettings.get().inplayGame;if(p===void 0||m===void 0)return;const g=p?.options?.onboardingEnabled,R=m?.titleCard?.optIn;g?R?e.set(Be.Required):e.set(Be.Optional):(R?e.set(Be.Unavailable):e.set(Be.Disabled),r.close(t.getCurrentSessionId({prefix:"onboarding"}),{markAsViewed:!1}))}catch(l){console.error(l)}},w3=(e,t,n,r,s)=>{let i=!!s?.skipOnboarding;const a=t.storage,o=ke(Be.Unset);o.subscribe(c=>{c!==Be.Unset&&(c===Be.Optional||c===Be.Required?i===!1&&(WF(e,t,r,a),i=!0):e.onboardingProcessed.set(!0),c===Be.Completed&&t.activeQuestionId.invalidate(),a.setOnboardingInstantOpen({userId:t.userId.get()||"",organizationId:t.organizationId.get()||"",eventId:t.slStreamId.get()||""}))});const l=[];return o.get()!==Be.Completed&&(l.push(t.userId.listen(c=>{c&&Tr(o,t,e,r,a,l,n,s)})),l.push(t.moderation.listen(c=>{c.data&&Tr(o,t,e,r,a,l,n,s)})),l.push(e.featureSettings.listen(c=>{c&&Tr(o,t,e,r,a,l,n,s)}))),Tr(o,t,e,r,a,l,n,s),{$store:o,submitInplay:async()=>{const c=t.slStreamId.get();if(c){await Hp(n,c),o.set(Be.Completed),a.saveOnboardingStatus({organizationId:t.organizationId.get()||"",userId:t.userId.get()||"",eventId:c},Be.Completed),Se.emit("poll",{action:"onboardingPassed",payload:{}}),e.openFeature();const d=t.getCurrentSessionId({prefix:"onboarding"});r.close(d)}}}},IF=(e,t,n,r)=>{const s=tt(void 0),i=zp(r),a=async()=>{const l=e.get(),c=t.get(),d=n?n.getStore().get().data?.map(m=>m.slId):[];if(!d||!l||!c)return;const h={eventId:l,userId:c,leaderboardId:"",usersIds:[...d,c]},p=await i(h);s.set(p.data?.attributes)},o=()=>{a()};return _e.onMount(s,()=>{o();const l=e.listen(a),c=n?.listen(a),d=t.listen(a);return()=>{l(),c?.(),d()}}),{$store:s,invalidate:o}},FF=async(e,t,n,r,s)=>{const i=zp(s),a=e.get(),o=t.get(),l=n?.getStore().get().data?.map(d=>d.slId)||[],c={eventId:a,userId:r,leaderboardId:"",usersIds:[...l,o]};return(await i(c)).data?.attributes?.summary},x3=new Set([M.POLL,M.PREDICTION,M.TRIVIA]);class NF extends Jp{userSummary;feedList;betPack;friends;leaderboardId;leaderboardList;deepLink;onboardingStatus;openedQuestion;currentUserId;openedUser;closeFeature;openFeature;feedSubscription;activeQuestionId;openedQuestionId;advertisement;onboardingProcessed;friendsTabEnabled;skipOnboarding;notifications;transport;background;storage;submitAnswerTimeout;cancels=new Set;onQuestionActivate;constructor(t,n,r){if(super(t,n),this.background=new iF(r),this.advertisement=this.background.advertisement,this.onQuestionActivate=r.onQuestionActivate,this.feedSubscription=this.background.feedSubscription,this.activeQuestionId=this.background.activeQuestionId,this.openedQuestionId=this.background.openedQuestionId,this.storage=this.background.storage,this.feedList=this.background.feedList,this.betPack=this.background.betPack,this.currentUserId=this.background.userId,this.onboardingProcessed=ke(!r.sdk.withAuth),this.leaderboardId=new ct(ke(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.notifications=r.notifications,this.transport=r.transport,this.closeFeature=(s=!0)=>r.sdk.closeFeature(s),this.openFeature=()=>r.sdk.openFeature(pe.GAMES),this.openedQuestion=this.background.openedQuestion,this.deepLink=vF(this.transport,this.background.slStreamId,r.stores.providerStreamId.getStore(),this.background.userId),this.userSummary=IF(this.background.slStreamId,this.background.userId,this.friends,this.transport),!r.sdk.options.get().hideFriends){this.friends=new gt(zI(this.background.userId,r.transport),"gamification:friends"),this.openedUser=ke(void 0);const s=this.leaderboardList=uF(this.transport,this.background.slStreamId,this.background.userId,this.friends);this.cancels.add(this.userSummary.$store.listen((i,a)=>{a?.summary&&i?.summary&&s.invalidate()}))}this.connect(),this.skipOnboarding=!!r.sdk.options.get().skipOnboarding,this.onboardingStatus=w3(this,this.background,r.transport,r.notifications,{skipOnboarding:r.sdk.options.get().skipOnboarding}),r.sdk.options.get().skipOnboarding||(this.onboardingStatus=w3(this,this.background,r.transport,r.notifications,{skipOnboarding:r.sdk.options.get().skipOnboarding})),this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)),this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)),this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)),this.cancels.add(this.onboardingStatus.$store.listen((s,i)=>{(i===void 0||s!==Be.Unset)&&this.background.activeQuestionId.invalidate()})),this.background.activeQuestionId.listen(this.showInApp),this.friendsTabEnabled=ke(!1),this.cancels.add(r.sdk.options.subscribe(s=>{s.friendsTab==="disabled"?this.friendsTabEnabled.set(!1):s.friendsTab==="enabled"&&this.friendsTabEnabled.set(!0)})),this.cancels.add(this.settings.subscribe(s=>{r.sdk.options.get().friendsTab==="activatedGame"&&this.friendsTabEnabled.set(!!s.inplayGame?.titleCard?.optIn)})),r.sdk.onMount({name:"gamification",clear:!0},()=>()=>{for(const s of this.cancels)s(),this.cancels.delete(s)})}get isInteractiveAllowed(){return this.background.interactiveAllowed.get()===tn.ALLOWED}checkInteractiveFlag=()=>{if(this.skipOnboarding)this.background.interactiveAllowed.set(tn.ALLOWED);else{const t=this.onboardingStatus.$store.get(),n=this.background.moderation.getStore().value?.data?.options?.onboardingEnabled,r=this.settings.getValues().inplayGame?.titleCard?.optIn,s=t===Be.Completed,i=!n||s||r!==!0;this.background.interactiveAllowed.set(i?tn.ALLOWED:tn.DISALLOWED)}};connect=()=>{this.onboardingProcessed.subscribe(t=>{t&&this.advertisement&&this.advertisement.connect()}),this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-prediction-close",async t=>{if(!this.isInteractiveAllowed)return;const n=t.data?.attributes?.question,r=t.data?.attributes?.feedItem;if(!n||!r?.attributes)return;const{status:s,type:i,id:a,answers:o}=n;if(s===Xe.RESOLVED&&i===M.PREDICTION){const l=this.background.getCurrentSessionId({prefix:`notification-id:${a}`}),c=[...this.feedList.getValues().data||[]],d=c.findIndex(V=>V.id===a),h=c[d];let p=h?.attributes?.attributes?.value?.answerId;const m=Dr(a,this.transport),g=m.subscribe(()=>{});await m.fetch();let R=m.get().data;R||(R=await Mp(a,this.transport),m.mutate(R)),g(),window.requestAnimationFrame(()=>{m.invalidate()}),p||(p=R?.answers.find(({youVoted:V})=>V)?.id);const y=o.find(({correct:V})=>V),b=p?o.find(({id:V})=>V===p):void 0,f=!!b?.correct;if(h&&c[d]?.attributes?.attributes.case==="question"){try{c[d].attributes.attributes.value.answerId=p,c[d].attributes.attributes.value.openForVoting=!1,p&&(c[d].attributes.attributes.value.status=f?qt.WON:qt.LOST)}catch{}this.feedList.getStore().mutate(c)}if(!b||!y)return;this.openedQuestionId.get()?.questionId!==n.id&&this.notifications.add({type:Mt.QUESTION_RESOLVED,action:()=>this.openQuestion(n.id,r),close:()=>this.closeQuestion(a),autoHideDuration:f?15e3:14e3,id:l,emitEvent:!1,data:{questionId:a,questionType:M.PREDICTION,question:{title:f?`Congratulations! You answered correctly! You won ${y.points} pts!`:`Better luck next time! Correct: ${y?.text}!`,votedAnswer:{title:b?.text,points:b?.points},correctAnswerTitle:y?.text,correct:!!f,predictionResult:!0,questionTitle:n?.subject},inApp:{notification:n.notification,appearance:n.appearance,sponsorship:n.sponsorship,adUnit:n?.adUnit,sponsorLogo:n.promotion?.sponsor?.logo}}}),this.userSummary.invalidate()}})),_e.onStart(this.feedList.getStore(),()=>{this.cancels.add(this.feedList.subscribe(()=>{}))}),this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list",t=>{const n=[...this.feedList.getStore().value?.data||[]],r=t.data?.attributes?.feedItem,s=n.findIndex(i=>i.id===r?.id);if(r?.attributes&&r.attributes.attributes.case!=="promotion"&&!(r.attributes.status!==Xe.ACTIVE&&r.attributes.status!==Xe.RESOLVED)&&!(!this.isInteractiveAllowed&&x3.has(r.attributes.type)&&r?.attributes?.adUnit!==ot.STANDART)){if(s!==-1)if(r.attributes.attributes.case==="question"&&n[s].attributes?.attributes.case==="question"){const i=n[s];i.attributes&&(n[s]={...n[s],attributes:{...i.attributes,attributes:{...i.attributes.attributes,value:{...i.attributes.attributes.value,...r.attributes.attributes.value,answerId:i.attributes.attributes.value.answerId,status:i.attributes.attributes.value.status,openForVoting:i.attributes.attributes.value.openForVoting===!1?!1:r.attributes.attributes.value.openForVoting}}}})}else{const i=n[s];i.attributes&&r.attributes&&(n[s]={...n[s],attributes:{...i.attributes,attributes:{...i.attributes.attributes,value:{...i.attributes.attributes.value,...r.attributes.attributes.value}}}})}s===-1&&(n.unshift(r),Se.emit("poll",{action:"received",payload:{isAd:r.attributes?.adUnit==ot.UNSET,questionId:r.id,questionType:r.attributes?.type}})),this.feedList.getStore().mutate(n)}}))};disconnect=()=>{this.background.feedSubscription.removeListener("feed-subscription-prediction-close"),this.background.feedSubscription.removeListener("feed-subscription-questions-list")};betPackVote=async(t,n)=>{if(!this.betPack)return;try{await G3(this.transport,{questionId:t,answerId:n})}catch(i){if(i.message===Qn.ALREADY_VOTED){const a=Dr(t,this.transport),o=a.subscribe(()=>{});a.invalidate(),o()}throw i}const r={...this.betPack.getValues().data?.data},s=r?.[t];s&&(Se.emit("poll",{action:"voted",payload:{questionId:t,isAd:s?.adUnit==ot.UNSET,questionType:s.type}}),s.answers=s.answers.map(i=>i.id===n?{...i,youVoted:!0}:i),this.betPack.getStore().mutate({data:r,timestamp:Date.now()}))};submitAnswer=async(t,n)=>{const r=Dr(t,this.transport),s=r.subscribe(()=>{}),i={...r.get().data||{}},a=()=>{const o=this.feedList.getValues().data;if(!o)return;const l=o.findIndex(h=>h.id===t),c=o[l],d=c?.attributes?.attributes.case==="question"&&c.attributes.attributes.value;if(d){Se.emit("poll",{action:"voted",payload:{isAd:c.attributes?.adUnit==ot.UNSET,questionId:t,questionType:d.questionType}});const h=r.get().data;if(s(),h){const p=h.answers.find(y=>y.correct===!0),m=h.answers.findIndex(y=>y.id===n),g=h.answers[m],R=h.answers.every(({percentageDecimal:y},b)=>y===i?.answers[b].percentageDecimal);o[l].attributes.attributes.value.answerId=n,o[l].attributes.attributes.value.openForVoting=!1,o[l].attributes.attributes.value.text=g?.text||"",p&&(o[l].attributes.attributes.value.status=p.id===n?qt.WON:qt.LOST),this.feedList.getStore().mutate([...o]),h.answers[m].correct=p?.id===n,h.answers[m].youVoted=!0,R&&h.answers.forEach(y=>{y.percentageDecimal=0}),p?.id===n&&(h.answers[m].pointsEarned=h.status===Xe.RESOLVED?0:p.points),r.mutate({...h})}this.submitAnswerTimeout&&clearTimeout(this.submitAnswerTimeout),this.submitAnswerTimeout=setTimeout(()=>{this.userSummary.invalidate()},1e3)}};try{await G3(this.transport,{questionId:t,answerId:n}),a()}catch(o){if(o.message===Qn.ALREADY_VOTED){this.userSummary.invalidate();const l=r.subscribe(()=>{});r.invalidate(),l()}throw o}};openQuestion=(t,n)=>{if(!t)return()=>{};const r=n?.openedFrom==="bet-pack";this.notifications.close(this.background.getCurrentSessionId({prefix:"notification",entity:t}),{animateHiding:!1});let s=n?.attributes?.type,i=n?.attributes?.adUnit===ot.STANDART&&!!n?.attributes?.adPromotion?.banner?.imageUrl;if(!s&&!r){const o=(this.feedList.getStore().value?.data||[]).find(l=>l.id===t)?.attributes;s=o?.type,i=o?.adUnit===ot.STANDART&&!!o?.adPromotion?.banner?.imageUrl}const a={eventId:this.background.slStreamId.get()||"",userId:this.background.userId.get()||"",organizationId:this.background.organizationId.get()||""};return Se.emit("poll",{action:"opened",payload:{questionId:t,questionType:s,isAd:n?.attributes?.adUnit==ot.UNSET,questionOpenedFrom:n?.openedFrom==="bet-pack"?"list":n?.openedFrom,hasBanner:i}}),this.storage.isQuestionOpened(a,t)||(Se.emit("poll",{action:"viewed",payload:{questionId:t,questionType:s,isAd:n?.attributes?.adUnit==ot.UNSET,questionOpenedFrom:n?.openedFrom==="bet-pack"?"list":n?.openedFrom}}),this.storage.saveQuestionOpened(a,t)),r||this.openFeature(),this.background.openQuestion(t,n?{...n,openedFrom:n?.openedFrom==="bet-pack"?"list":n?.openedFrom}:void 0)};getFeedItem=t=>HI(t,this.transport);isOpenedQuestion=t=>!!this.notifications.isViewed(t);closeQuestion=t=>(t&&(this.onQuestionActivate({stage:"deactivate",id:t,isViewed:!!this.notifications.isViewed(this.background.getCurrentSessionId({prefix:"notification",entity:t}))}),Se.emit("poll",{action:"closed",payload:{questionId:t}})),this.background.closeQuestion(t));openUser=async t=>{if(!this.leaderboardList)return;const n=this.leaderboardList?.$store.get().data?.find(s=>s.userId===t);if(!n){this.openedUser?.set(n);return}if(n.summaryLoaded){this.openedUser?.set(n);return}const r={...n};try{const s=await FF(this.background.slStreamId,this.background.userId,this.friends,t,this.transport);s?.inTop!==void 0&&(this.leaderboardList?.$store.setKey("data",this.leaderboardList.$store.get().data?.map(i=>(i.userId===t&&(i.inTop=s.inTop),i))),r.inTop=s.inTop)}catch(s){console.error(s)}this.openedUser.set(r)};closeUser=()=>{this.openedUser?.set(void 0)};openOnboarding=()=>{this.openFeature(),Se.emit("poll",{action:"onboardingOpen",payload:{}})};showInApp=t=>{const n=this.onboardingStatus.$store.get(),r=t?.data?.question?.adUnit===ot.STANDART;if(t&&t.data&&(r||n&&n!==Be.Unset)&&t.data.question?.id!==void 0&&t.data.question?.bypassNotifications?.inAppSilence!==Dm.ON&&t.data.question.status===Xe.ACTIVE&&!t.data.question.marketClosed){if(x3.has(t.data.question.type))(this.isInteractiveAllowed||r)&&t.data.question.notification!==void 0&&this.notifications.add({type:Mt.QUESTION,action:()=>this.openQuestion(t.data?.question?.id,t.data?.feedItem),close:()=>this.closeQuestion(t.data?.question?.id),autoHideDuration:1e3*60,id:this.background.getCurrentSessionId({prefix:"notification",entity:t.data.question.id}),emitEvent:!0,data:{questionId:t.data.question.id,questionType:t.data.question.type,question:{title:t.data.question.notification.title},inApp:{notification:t.data.question.notification,appearance:t.data.question.appearance,sponsorship:t.data.question.sponsorship,adUnit:t.data.question?.adUnit,sponsorLogo:t.data.question.promotion?.sponsor?.logo}}});else if(t.data.question.type===M.FACTOID){const s=t.data.question.options?.options.value,i=t.data.question.notification?.useContentTexts===uc.ENABLED?t.data.question.subject:t.data.question.notification?.title||"",a=t.data.question.notification?.useContentTexts===uc.ENABLED?s.body:t.data.question.notification?.body,o={heading:i,body:a,imageMode:s?.imageMode,image:s?.image,video:{id:s?.video?.id||"",url:s?.video?.url||"",thumbnailUrl:s?.video?.thumbnailUrl||""},webLink:{label:"",url:""}};this.notifications.add({type:Mt.QUESTION,action:()=>this.openQuestion(t?.data?.question?.id,t?.data?.feedItem),close:()=>this.closeQuestion(t?.data?.question?.id),autoHideDuration:1e3*120,emitEvent:!0,id:this.background.getCurrentSessionId({prefix:"notification",entity:t.data.question.id}),data:{questionId:t.data.question.id,questionType:t.data.question.type,insight:o,inApp:{useMediaFromContent:s?.useAsNotification===xm.ENABLED,notification:t.data.question.notification,appearance:t.data.question.appearance,sponsorship:t.data.question.sponsorship,adUnit:t.data.question?.adUnit,sponsorLogo:t.data.question.promotion?.sponsor?.logo,isVideo:s?.mode===_m.VIDEO}}})}else if(t.data.question.type===M.TWEET&&t.data.question.notification!==void 0){const s=t.data.question.options?.options.value,i={image:"",video:""};if(s.tweetMeta?.tweet?.meta?.extendedEntities?.media?.[0]){const o=s.tweetMeta.tweet.meta.extendedEntities.media;if(o){const l=o.find(({type:c})=>c==="photo")||o[0];i.image=l.mediaUrlHttps,l.type==="video"&&(i.video=l.url)}}const a={title:t.data.question.notification?.title,body:t.data.question.notification?.body,image:t.data.question.notification?.image,account:s?.tweetMeta?.account||"",accountVerified:!!s?.tweetMeta?.accountVerified,tweet:s?.tweetMeta?.tweet,tweetId:t.data.question.id,tweetMedia:i};this.notifications.add({type:Mt.QUESTION,action:()=>this.openQuestion(t.data?.question?.id,t.data?.feedItem),close:()=>this.closeQuestion(t.data?.question?.id),autoHideDuration:1e3*120,emitEvent:!0,id:this.background.getCurrentSessionId({prefix:"notification",entity:t.data.question.id}),data:{questionId:t.data.question.id,questionType:t.data.question.type,tweet:a,inApp:{notification:t.data.question.notification,appearance:t.data.question.appearance,sponsorship:t.data.question.sponsorship}}})}}}}const GF={[pe.GAMES]:!0};class XF extends Jp{constructor(t,n){super(t,n)}}const UF=(e,t,n)=>e.type===pe.GAMES?new NF(e,t,n):new XF(e,t),BF=(e,t,n)=>{e.features=new Map,e.sdk.featuresList=new ct(ke(new Set),"features-list"),e.activeFeature=new ct(ke(pe.UNSET),"activeFeature"),e.sdk.getFeatures=()=>e.features,e.sdk.getFeature=r=>e.features.get(r),e.sdk.getActiveFeature=()=>e.activeFeature.getStore(),e.sdk.openFeature=r=>{e.sdk.initializeApp().then(()=>{e.activeFeature.setValue(r)})},e.sdk.closeFeature=(r=!1)=>{const s=e.activeFeature.getValue();if(e.activeFeature.setValue(pe.UNSET),r&&s){e.features.delete(s);const i=e.sdk.featuresList.getValue();i&&i.delete(s),e.sdk.featuresList.setValue(i)}},e.initFeature=(r,s=xt.ORGANIZATION)=>{if(r.type in GF&&!e.features.has(r.type)){const i=UF(r,s,e);e.features.set(r.type,i);let a=e.sdk.featuresList.getValue();a?a.add(r.type):a=new Set([r.type]),e.sdk.featuresList.setValue(new Set(a))}},e.updateFeature=(r,s)=>{e.features.get(r.type)?.update(r,s)},e.destroyFeature=r=>{e.features.delete(r.type);const s=e.sdk.featuresList.getValue();s&&s.delete(r.type),e.sdk.featuresList.setValue(new Set(s))},e.reinitializeFeatures=async()=>{const r=await e.stores.organizationSettings.getValue();e.features.clear(),e.sdk.featuresList.setValue(new Set);for(const s of r?.overlays||[])e.initFeature(s,xt.ORGANIZATION)},e.stores.providerStreamId.listen(r=>{r||e.reinitializeFeatures()}),e.storeSubscribe=()=>{const r=(i,a)=>{if(a?.overlays&&!(e.contextConfig?.skipOrganizationSettings&&i===xt.ORGANIZATION))for(const o of a.overlays)o.sdkEnable===!0&&(e.features.has(o.type)?e.updateFeature(o,i):e.initFeature(o,i))},s={organizationSettings:i=>{if(i.data)try{r(xt.ORGANIZATION,i.data)}catch(a){console.log(a)}},streamSettings:i=>{if(i.data)try{r(xt.STREAM,i.data)}catch(a){console.log(a)}}};e.store.subscribe(s)},n()},YF=(e,t,n)=>{const{client:r,queryKey:s}=n.createPromiseClient(eI,{method:"getMarketWithSeries",params:[e,t]});return n.nanoquery.createFetcherStore(s,{fetcher:async(i,a,o,l)=>{if(l)try{return(await r.getMarketWithSeries({eventId:o,timeframe:qW.TIMEFRAME_ALL})).event}catch{return}}})},TF=e=>{const t=e.stores.slStreamId.getAtomStore(),n=e.stores.user.getAtomStore();return YF(t,n,e.transport)};class wF extends kp{marketWithSeries;log;constructor(t){super(),this.log=st("polymarket"),this.marketWithSeries=TF(t)}connect=()=>{this.log.debug("connect")};disconnect=()=>{this.marketWithSeries.off(),this.log.debug("disconnect")}}const xF=(e,t,n)=>{e.sdk.polymarket=new wF(e),e.sdk.onMount({name:"polymarket"},()=>(e.sdk.polymarket.connect(),()=>{e.sdk.polymarket.disconnect()})),n()};function u2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:e.id||null,adId:e.adId||null,sequence:e.sequence||null,apiFramework:e.apiFramework||null,universalAdIds:[],creativeExtensions:[]}}const LF=["ADCATEGORIES","ADCOUNT","ADPLAYHEAD","ADSERVINGID","ADTYPE","APIFRAMEWORKS","APPBUNDLE","ASSETURI","BLOCKEDADCATEGORIES","BREAKMAXADLENGTH","BREAKMAXADS","BREAKMAXDURATION","BREAKMINADLENGTH","BREAKMINDURATION","BREAKPOSITION","CLICKPOS","CLICKTYPE","CLIENTUA","CONTENTID","CONTENTPLAYHEAD","CONTENTURI","DEVICEIP","DEVICEUA","DOMAIN","EXTENSIONS","GDPRCONSENT","IFA","IFATYPE","INVENTORYSTATE","LATLONG","LIMITADTRACKING","MEDIAMIME","MEDIAPLAYHEAD","OMIDPARTNER","PAGEURL","PLACEMENTTYPE","PLAYERCAPABILITIES","PLAYERSIZE","PLAYERSTATE","PODSEQUENCE","REGULATIONS","SERVERSIDE","SERVERUA","TRANSACTIONID","UNIVERSALADID","VASTVERSIONS","VERIFICATIONVENDORS"];function L3(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=[],s=Dp(e);!t.ERRORCODE||n.isCustomCode||/^[0-9]{3}$/.test(t.ERRORCODE)||(t.ERRORCODE=900),t.CACHEBUSTING=qp(Math.round(1e8*Math.random())),t.TIMESTAMP=new Date().toISOString(),t.RANDOM=t.random=t.CACHEBUSTING;for(const i in t)t[i]=$p(t[i]);for(const i in s){const a=s[i];typeof a=="string"&&r.push(jp(a,t))}return r}function jp(e,t){const n=(e=k3(e,t)).match(/[^[\]]+(?=])/g);if(!n)return e;let r=n.filter((s=>LF.indexOf(s)>-1));return r.length===0?e:(r=r.reduce(((s,i)=>(s[i]=-1,s)),{}),k3(e,r))}function k3(e,t){let n=e;for(const r in t){const s=t[r];n=n.replace(new RegExp("(?:\\[|%%)(".concat(r,")(?:\\]|%%)"),"g"),s)}return n}function Dp(e){return Array.isArray(e)?e.map((t=>t&&t.hasOwnProperty("url")?t.url:t)):e}function J3(e){return/^(https?:\/\/|\/\/)/.test(e)}function Q3(e,t){for(let n=0;n<t.length;n++)if(Pp(t[n],e))return!0;return!1}function Pp(e,t){if(e&&t){const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&e.id===t.id&&e.url===t.url}return!1}function $p(e){return encodeURIComponent(e).replace(/[!'()*]/g,(t=>"%".concat(t.charCodeAt(0).toString(16))))}function qp(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8;return e.toString().padStart(t,"0")}const bn={track:function(e,t,n){L3(e,t,n).forEach((r=>{typeof window<"u"&&window!==null&&(new Image().src=r)}))},resolveURLTemplates:L3,extractURLsFromTemplates:Dp,filterUrlTemplates:function(e){return e.reduce(((t,n)=>{const r=n.url||n;return J3(r)?t.validUrls.push(r):t.invalidUrls.push(r),t}),{validUrls:[],invalidUrls:[]})},containsTemplateObject:Q3,isTemplateObjectEqual:Pp,encodeURIComponentRFC3986:$p,replaceUrlMacros:jp,isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},flatten:function e(t){return t.reduce(((n,r)=>n.concat(Array.isArray(r)?e(r):r)),[])},joinArrayOfUniqueTemplateObjs:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=Array.isArray(e)?e:[],r=Array.isArray(t)?t:[];return n.concat(r).reduce(((s,i)=>(Q3(i,s)||s.push(i),s)),[])},isValidTimeValue:function(e){return Number.isFinite(e)&&e>=-2},addLeadingZeros:qp,isValidUrl:J3,isBrowserEnvironment:function(){return typeof window<"u"},formatMacrosValues:function(e){return typeof e!="object"?e:JSON.stringify(e)}};function z3(e){return["true","TRUE","True","1"].includes(e)}function kF(e){if(e==null)return-1;if(bn.isNumeric(e))return parseInt(e);const t=e.split(":");if(t.length!==3)return-1;const n=t[2].split(".");let r=parseInt(n[0]);n.length===2&&(r+=parseFloat("0.".concat(n[1])));const s=parseInt(60*t[1]),i=parseInt(60*t[0]*60);return isNaN(i)||isNaN(s)||isNaN(r)||s>3600||r>60?-1:i+s+r}const k={childByName:function(e,t){return Array.from(e.childNodes).find((n=>n.nodeName===t))},childrenByName:function(e,t){return Array.from(e.childNodes).filter((n=>n.nodeName===t))},resolveVastAdTagURI:function(e,t){if(!t)return e;if(e.startsWith("//")){const{protocol:n}=location;return"".concat(n).concat(e)}if(!e.includes("://")){const n=t.slice(0,t.lastIndexOf("/"));return"".concat(n,"/").concat(e)}return e},parseBoolean:z3,parseNodeText:function(e){return e&&(e.textContent||e.text||"").trim()},copyNodeAttribute:function(e,t,n){const r=t.getAttribute(e);r&&n.setAttribute(e,r)},parseAttributes:function(e){return Array.from(e.attributes).reduce(((t,n)=>(t[n.nodeName]=n.nodeValue,t)),{})},parseDuration:kF,getStandAloneAds:function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter((e=>!parseInt(e.sequence,10)))},getSortedAdPods:function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).filter((e=>parseInt(e.sequence,10))).sort(((e,t)=>e.sequence-t.sequence))},assignAttributes:function(e,t){e&&Array.from(e).forEach((n=>{let{nodeName:r,nodeValue:s}=n;if(r&&s&&t.hasOwnProperty(r)){let i=s;typeof t[r]=="boolean"&&(i=z3(i)),t[r]=i}}))},mergeWrapperAdData:function(e,t){var n;e.errorURLTemplates=t.errorURLTemplates.concat(e.errorURLTemplates),e.impressionURLTemplates=t.impressionURLTemplates.concat(e.impressionURLTemplates),e.extensions=t.extensions.concat(e.extensions),t.viewableImpression.length>0&&(e.viewableImpression=[...e.viewableImpression,...t.viewableImpression]),e.followAdditionalWrappers=t.followAdditionalWrappers,e.allowMultipleAds=t.allowMultipleAds,e.fallbackOnNoAd=t.fallbackOnNoAd;const r=(t.creatives||[]).filter((o=>o&&o.type==="companion")),s=r.reduce(((o,l)=>((l.variations||[]).forEach((c=>{(c.companionClickTrackingURLTemplates||[]).forEach((d=>{bn.containsTemplateObject(d,o)||o.push(d)}))})),o)),[]);e.creatives=r.concat(e.creatives);const i=t.videoClickTrackingURLTemplates&&t.videoClickTrackingURLTemplates.length,a=t.videoCustomClickURLTemplates&&t.videoCustomClickURLTemplates.length;if(e.creatives.forEach((o=>{if(t.trackingEvents&&t.trackingEvents[o.type])for(const l in t.trackingEvents[o.type]){const c=t.trackingEvents[o.type][l];Array.isArray(o.trackingEvents[l])||(o.trackingEvents[l]=[]),o.trackingEvents[l]=o.trackingEvents[l].concat(c)}o.type==="linear"&&(i&&(o.videoClickTrackingURLTemplates=o.videoClickTrackingURLTemplates.concat(t.videoClickTrackingURLTemplates)),a&&(o.videoCustomClickURLTemplates=o.videoCustomClickURLTemplates.concat(t.videoCustomClickURLTemplates)),!t.videoClickThroughURLTemplate||o.videoClickThroughURLTemplate!==null&&o.videoClickThroughURLTemplate!==void 0||(o.videoClickThroughURLTemplate=t.videoClickThroughURLTemplate)),o.type==="companion"&&s.length&&(o.variations||[]).forEach((l=>{l.companionClickTrackingURLTemplates=bn.joinArrayOfUniqueTemplateObjs(l.companionClickTrackingURLTemplates,s)}))})),t.adVerifications&&(e.adVerifications=e.adVerifications.concat(t.adVerifications)),t.blockedAdCategories&&(e.blockedAdCategories=e.blockedAdCategories.concat(t.blockedAdCategories)),(n=t.creatives)!==null&&n!==void 0&&n.length){const o=t.creatives.filter((l=>{var c;return((c=l.icons)===null||c===void 0?void 0:c.length)&&!l.mediaFiles.length}));o.length&&(e.creatives=e.creatives.concat(o))}}};function JF(e,t){const n=(function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:s,adId:i,sequence:a,apiFramework:o}=u2(r);return{id:s,adId:i,sequence:a,apiFramework:o,type:"companion",required:null,variations:[]}})(t);return n.required=e.getAttribute("required")||null,n.variations=k.childrenByName(e,"Companion").map((r=>{const s=(function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:o.id||null,adType:"companionAd",width:o.width||0,height:o.height||0,assetWidth:o.assetWidth||null,assetHeight:o.assetHeight||null,expandedWidth:o.expandedWidth||null,expandedHeight:o.expandedHeight||null,apiFramework:o.apiFramework||null,adSlotId:o.adSlotId||null,pxratio:o.pxratio||"1",renderingMode:o.renderingMode||"default",staticResources:[],htmlResources:[],iframeResources:[],adParameters:null,altText:null,companionClickThroughURLTemplate:null,companionClickTrackingURLTemplates:[],trackingEvents:{}}})(k.parseAttributes(r));s.htmlResources=k.childrenByName(r,"HTMLResource").reduce(((o,l)=>{const c=k.parseNodeText(l);return c?o.concat(c):o}),[]),s.iframeResources=k.childrenByName(r,"IFrameResource").reduce(((o,l)=>{const c=k.parseNodeText(l);return c?o.concat(c):o}),[]),s.staticResources=k.childrenByName(r,"StaticResource").reduce(((o,l)=>{const c=k.parseNodeText(l);return c?o.concat({url:c,creativeType:l.getAttribute("creativeType")||null}):o}),[]),s.altText=k.parseNodeText(k.childByName(r,"AltText"))||null;const i=k.childByName(r,"TrackingEvents");i&&k.childrenByName(i,"Tracking").forEach((o=>{const l=o.getAttribute("event"),c=k.parseNodeText(o);l&&c&&(Array.isArray(s.trackingEvents[l])||(s.trackingEvents[l]=[]),s.trackingEvents[l].push(c))})),s.companionClickTrackingURLTemplates=k.childrenByName(r,"CompanionClickTracking").map((o=>({id:o.getAttribute("id")||null,url:k.parseNodeText(o)}))),s.companionClickThroughURLTemplate=k.parseNodeText(k.childByName(r,"CompanionClickThrough"))||null;const a=k.childByName(r,"AdParameters");return a&&(s.adParameters={value:k.parseNodeText(a),xmlEncoded:a.getAttribute("xmlEncoded")||null}),s})),n}function QF(e,t){let n;const r=(function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:c,adId:d,sequence:h,apiFramework:p}=u2(l);return{id:c,adId:d,sequence:h,apiFramework:p,type:"linear",duration:0,skipDelay:null,mediaFiles:[],mezzanine:null,interactiveCreativeFile:null,closedCaptionFiles:[],videoClickThroughURLTemplate:null,videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[],adParameters:null,icons:[],trackingEvents:{}}})(t);r.duration=k.parseDuration(k.parseNodeText(k.childByName(e,"Duration")));const s=e.getAttribute("skipoffset");if(s==null)r.skipDelay=null;else if(s.charAt(s.length-1)==="%"&&r.duration!==-1){const l=parseInt(s,10);r.skipDelay=r.duration*(l/100)}else r.skipDelay=k.parseDuration(s);const i=k.childByName(e,"VideoClicks");if(i){const l=k.childByName(i,"ClickThrough");r.videoClickThroughURLTemplate=l?{id:l.getAttribute("id")||null,url:k.parseNodeText(l)}:null,k.childrenByName(i,"ClickTracking").forEach((c=>{r.videoClickTrackingURLTemplates.push({id:c.getAttribute("id")||null,url:k.parseNodeText(c)})})),k.childrenByName(i,"CustomClick").forEach((c=>{r.videoCustomClickURLTemplates.push({id:c.getAttribute("id")||null,url:k.parseNodeText(c)})}))}const a=k.childByName(e,"AdParameters");a&&(r.adParameters={value:k.parseNodeText(a),xmlEncoded:a.getAttribute("xmlEncoded")||null}),k.childrenByName(e,"TrackingEvents").forEach((l=>{k.childrenByName(l,"Tracking").forEach((c=>{let d=c.getAttribute("event");const h=k.parseNodeText(c);if(d&&h){if(d==="progress"){if(n=c.getAttribute("offset"),!n)return;d=n.charAt(n.length-1)==="%"?"progress-".concat(n):"progress-".concat(k.parseDuration(n))}Array.isArray(r.trackingEvents[d])||(r.trackingEvents[d]=[]),r.trackingEvents[d].push(h)}}))})),k.childrenByName(e,"MediaFiles").forEach((l=>{k.childrenByName(l,"MediaFile").forEach((m=>{r.mediaFiles.push((function(g){const R={id:null,fileURL:null,fileSize:0,deliveryType:"progressive",mimeType:null,mediaType:null,codec:null,bitrate:0,minBitrate:0,maxBitrate:0,width:0,height:0,apiFramework:null,scalable:null,maintainAspectRatio:null};R.id=g.getAttribute("id"),R.fileURL=k.parseNodeText(g),R.deliveryType=g.getAttribute("delivery"),R.codec=g.getAttribute("codec"),R.mimeType=g.getAttribute("type"),R.mediaType=g.getAttribute("mediaType")||"2D",R.apiFramework=g.getAttribute("apiFramework"),R.fileSize=parseInt(g.getAttribute("fileSize")||0),R.bitrate=parseInt(g.getAttribute("bitrate")||0),R.minBitrate=parseInt(g.getAttribute("minBitrate")||0),R.maxBitrate=parseInt(g.getAttribute("maxBitrate")||0),R.width=parseInt(g.getAttribute("width")||0),R.height=parseInt(g.getAttribute("height")||0);const y=g.getAttribute("scalable");y&&typeof y=="string"&&(R.scalable=k.parseBoolean(y));const b=g.getAttribute("maintainAspectRatio");return b&&typeof b=="string"&&(R.maintainAspectRatio=k.parseBoolean(b)),R})(m))}));const c=k.childByName(l,"InteractiveCreativeFile");c&&(r.interactiveCreativeFile=(function(m){const g=(function(){let R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:R.type||null,apiFramework:R.apiFramework||null,variableDuration:k.parseBoolean(R.variableDuration),fileURL:null}})(k.parseAttributes(m));return g.fileURL=k.parseNodeText(m),g})(c));const d=k.childByName(l,"ClosedCaptionFiles");d&&k.childrenByName(d,"ClosedCaptionFile").forEach((m=>{const g=(function(){let R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{type:R.type||null,language:R.language||null,fileURL:null}})(k.parseAttributes(m));g.fileURL=k.parseNodeText(m),r.closedCaptionFiles.push(g)}));const h=k.childByName(l,"Mezzanine"),p=(function(m,g){const R={};let y=!1;return g.forEach((b=>{m&&m.getAttribute(b)?R[b]=m.getAttribute(b):y=!0})),y?null:R})(h,["delivery","type","width","height"]);if(p){const m={id:null,fileURL:null,delivery:null,codec:null,type:null,width:0,height:0,fileSize:0,mediaType:"2D"};m.id=h.getAttribute("id"),m.fileURL=k.parseNodeText(h),m.delivery=p.delivery,m.codec=h.getAttribute("codec"),m.type=p.type,m.width=parseInt(p.width,10),m.height=parseInt(p.height,10),m.fileSize=parseInt(h.getAttribute("fileSize"),10),m.mediaType=h.getAttribute("mediaType")||"2D",r.mezzanine=m}}));const o=k.childByName(e,"Icons");return o&&k.childrenByName(o,"Icon").forEach((l=>{r.icons.push((function(c){const d={program:null,height:0,width:0,xPosition:0,yPosition:0,apiFramework:null,offset:null,duration:0,type:null,staticResource:null,htmlResource:null,iframeResource:null,pxratio:"1",iconClickThroughURLTemplate:null,iconClickTrackingURLTemplates:[],iconViewTrackingURLTemplate:null,iconClickFallbackImages:[],altText:null,hoverText:null};d.program=c.getAttribute("program"),d.height=parseInt(c.getAttribute("height")||0),d.width=parseInt(c.getAttribute("width")||0),d.xPosition=(function(p){return["left","right"].indexOf(p)!==-1?p:parseInt(p||0)})(c.getAttribute("xPosition")),d.yPosition=(function(p){return["top","bottom"].indexOf(p)!==-1?p:parseInt(p||0)})(c.getAttribute("yPosition")),d.apiFramework=c.getAttribute("apiFramework"),d.pxratio=c.getAttribute("pxratio")||"1",d.offset=k.parseDuration(c.getAttribute("offset")),d.duration=k.parseDuration(c.getAttribute("duration")),d.altText=c.getAttribute("altText"),d.hoverText=c.getAttribute("hoverText"),k.childrenByName(c,"HTMLResource").forEach((p=>{d.type=p.getAttribute("creativeType")||"text/html",d.htmlResource=k.parseNodeText(p)})),k.childrenByName(c,"IFrameResource").forEach((p=>{d.type=p.getAttribute("creativeType")||0,d.iframeResource=k.parseNodeText(p)})),k.childrenByName(c,"StaticResource").forEach((p=>{d.type=p.getAttribute("creativeType")||0,d.staticResource=k.parseNodeText(p)}));const h=k.childByName(c,"IconClicks");if(h){d.iconClickThroughURLTemplate=k.parseNodeText(k.childByName(h,"IconClickThrough")),k.childrenByName(h,"IconClickTracking").forEach((m=>{d.iconClickTrackingURLTemplates.push({id:m.getAttribute("id")||null,url:k.parseNodeText(m)})}));const p=k.childByName(h,"IconClickFallbackImages");p&&k.childrenByName(p,"IconClickFallbackImage").forEach((m=>{d.iconClickFallbackImages.push({url:k.parseNodeText(m)||null,width:m.getAttribute("width")||null,height:m.getAttribute("height")||null})}))}return d.iconViewTrackingURLTemplate=k.parseNodeText(k.childByName(c,"IconViewTracking")),d})(l))})),r}function zF(e,t){const n=(function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{id:s,adId:i,sequence:a,apiFramework:o}=u2(r);return{id:s,adId:i,sequence:a,apiFramework:o,type:"nonlinear",variations:[],trackingEvents:{}}})(t);return k.childrenByName(e,"TrackingEvents").forEach((r=>{let s,i;k.childrenByName(r,"Tracking").forEach((a=>{s=a.getAttribute("event"),i=k.parseNodeText(a),s&&i&&(Array.isArray(n.trackingEvents[s])||(n.trackingEvents[s]=[]),n.trackingEvents[s].push(i))}))})),k.childrenByName(e,"NonLinear").forEach((r=>{const s={id:null,width:0,height:0,expandedWidth:0,expandedHeight:0,scalable:!0,maintainAspectRatio:!0,minSuggestedDuration:0,apiFramework:"static",adType:"nonLinearAd",type:null,staticResource:null,htmlResource:null,iframeResource:null,nonlinearClickThroughURLTemplate:null,nonlinearClickTrackingURLTemplates:[],adParameters:null};s.id=r.getAttribute("id")||null,s.width=r.getAttribute("width"),s.height=r.getAttribute("height"),s.expandedWidth=r.getAttribute("expandedWidth"),s.expandedHeight=r.getAttribute("expandedHeight"),s.scalable=k.parseBoolean(r.getAttribute("scalable")),s.maintainAspectRatio=k.parseBoolean(r.getAttribute("maintainAspectRatio")),s.minSuggestedDuration=k.parseDuration(r.getAttribute("minSuggestedDuration")),s.apiFramework=r.getAttribute("apiFramework"),k.childrenByName(r,"HTMLResource").forEach((a=>{s.type=a.getAttribute("creativeType")||"text/html",s.htmlResource=k.parseNodeText(a)})),k.childrenByName(r,"IFrameResource").forEach((a=>{s.type=a.getAttribute("creativeType")||0,s.iframeResource=k.parseNodeText(a)})),k.childrenByName(r,"StaticResource").forEach((a=>{s.type=a.getAttribute("creativeType")||0,s.staticResource=k.parseNodeText(a)}));const i=k.childByName(r,"AdParameters");i&&(s.adParameters={value:k.parseNodeText(i),xmlEncoded:i.getAttribute("xmlEncoded")||null}),s.nonlinearClickThroughURLTemplate=k.parseNodeText(k.childByName(r,"NonLinearClickThrough")),k.childrenByName(r,"NonLinearClickTracking").forEach((a=>{s.nonlinearClickTrackingURLTemplates.push({id:a.getAttribute("id")||null,url:k.parseNodeText(a)})})),n.variations.push(s)})),n}function M3(e){const t=[];return e.forEach((n=>{const r=e4(n);r&&t.push(r)})),t}function e4(e){if(e.nodeName==="#comment")return null;const t={name:null,value:null,attributes:{},children:[]},n=e.attributes,r=e.childNodes;if(t.name=e.nodeName,e.attributes){for(const i in n)if(n.hasOwnProperty(i)){const a=n[i];a.nodeName&&a.nodeValue&&(t.attributes[a.nodeName]=a.nodeValue)}}for(const i in r)if(r.hasOwnProperty(i)){const a=e4(r[i]);a&&t.children.push(a)}if(t.children.length===0||t.children.length===1&&["#cdata-section","#text"].indexOf(t.children[0].name)>=0){const i=k.parseNodeText(e);i!==""&&(t.value=i),t.children=[]}return(s=t).value===null&&Object.keys(s.attributes).length===0&&s.children.length===0?null:t;var s}function MF(e){return e.getAttribute("AdID")||e.getAttribute("adID")||e.getAttribute("adId")||null}const Pr={Wrapper:{subElements:["VASTAdTagURI","Impression"]},BlockedAdCategories:{attributes:["authority"]},InLine:{subElements:["AdSystem","AdTitle","Impression","AdServingId","Creatives"]},Category:{attributes:["authority"]},Pricing:{attributes:["model","currency"]},Verification:{oneOfinLineResources:["JavaScriptResource","ExecutableResource"],attributes:["vendor"]},UniversalAdId:{attributes:["idRegistry"]},JavaScriptResource:{attributes:["apiFramework","browserOptional"]},ExecutableResource:{attributes:["apiFramework","type"]},Tracking:{attributes:["event"]},Creatives:{subElements:["Creative"]},Creative:{subElements:["UniversalAdId"]},Linear:{subElements:["MediaFiles","Duration"]},MediaFiles:{subElements:["MediaFile"]},MediaFile:{attributes:["delivery","type","width","height"]},Mezzanine:{attributes:["delivery","type","width","height"]},NonLinear:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},Companion:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"],attributes:["width","height"]},StaticResource:{attributes:["creativeType"]},Icons:{subElements:["Icon"]},Icon:{oneOfinLineResources:["StaticResource","IFrameResource","HTMLResource"]}};function K3(e,t){if(!Pr[e.nodeName]||!Pr[e.nodeName].attributes)return;const n=Pr[e.nodeName].attributes.filter((r=>!e.getAttribute(r)));n.length>0&&dr({name:e.nodeName,parentName:e.parentNode.nodeName,attributes:n},t)}function H3(e,t,n){const r=Pr[e.nodeName],s=!n&&e.nodeName!=="Wrapper";if(!(!r||s)){if(r.subElements){const i=r.subElements.filter((a=>!k.childByName(e,a)));i.length>0&&dr({name:e.nodeName,parentName:e.parentNode.nodeName,subElements:i},t)}!n||!r.oneOfinLineResources||r.oneOfinLineResources.some((i=>k.childByName(e,i)))||dr({name:e.nodeName,parentName:e.parentNode.nodeName,oneOfResources:r.oneOfinLineResources},t)}}function O3(e){return e.children&&e.children.length!==0}function dr(e,t){let{name:n,parentName:r,attributes:s,subElements:i,oneOfResources:a}=e,o="Element '".concat(n,"'");o+=s?" missing required attribute(s) '".concat(s.join(", "),"' "):i?" missing required sub element(s) '".concat(i.join(", "),"' "):a?" must provide one of the following '".concat(a.join(", "),"' "):" is empty",t("VAST-warning",{message:o,parentElement:r,specVersion:4.1})}const KF={verifyRequiredValues:function e(t,n,r){if(t&&t.nodeName)if(t.nodeName==="InLine"&&(r=!0),K3(t,n),O3(t)){H3(t,n,r);for(let s=0;s<t.children.length;s++)e(t.children[s],n,r)}else k.parseNodeText(t).length===0&&dr({name:t.nodeName,parentName:t.parentNode.nodeName},n)},hasSubElements:O3,emitMissingValueWarning:dr,verifyRequiredAttributes:K3,verifyRequiredSubElements:H3};function HF(e,t){let{allowMultipleAds:n,followAdditionalWrappers:r}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=Array.from(e.childNodes).filter((i=>{const a=i.nodeName.toLowerCase();return a==="inline"||r!==!1&&a==="wrapper"}));for(const i of s){if(k.copyNodeAttribute("id",e,i),k.copyNodeAttribute("sequence",e,i),k.copyNodeAttribute("adType",e,i),i.nodeName==="Wrapper")return{ad:_F(i,t),type:"WRAPPER"};if(i.nodeName==="InLine")return{ad:OF(i,t,{allowMultipleAds:n}),type:"INLINE"};const a=i.nodeName.toLowerCase();t("VAST-warning",{message:"<".concat(i.nodeName,a==="inline"?"> must be written <InLine>":"> must be written <Wrapper>"),wrongNode:i})}}function OF(e,t){let{allowMultipleAds:n}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return n===!1&&e.getAttribute("sequence")?null:t4(e,t)}function t4(e,t){let n=[];t&&KF.verifyRequiredValues(e,t);const r=Array.from(e.childNodes),s=(function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return{id:i.id||null,sequence:i.sequence||null,adType:i.adType||null,adServingId:null,categories:[],expires:null,viewableImpression:[],system:null,title:null,description:null,advertiser:null,pricing:null,survey:null,errorURLTemplates:[],impressionURLTemplates:[],creatives:[],extensions:[],adVerifications:[],blockedAdCategories:[],followAdditionalWrappers:!0,allowMultipleAds:!1,fallbackOnNoAd:null}})(k.parseAttributes(e));return r.forEach((i=>{switch(i.nodeName){case"Error":s.errorURLTemplates.push(k.parseNodeText(i));break;case"Impression":s.impressionURLTemplates.push({id:i.getAttribute("id")||null,url:k.parseNodeText(i)});break;case"Creatives":s.creatives=(function(a){const o=[];return a.forEach((l=>{const c={id:l.getAttribute("id")||null,adId:MF(l),sequence:l.getAttribute("sequence")||null,apiFramework:l.getAttribute("apiFramework")||null},d=[];let h;k.childrenByName(l,"UniversalAdId").forEach((m=>{const g={idRegistry:m.getAttribute("idRegistry")||"unknown",value:k.parseNodeText(m)};d.push(g)}));const p=k.childByName(l,"CreativeExtensions");p&&(h=M3(k.childrenByName(p,"CreativeExtension")));for(const m in l.childNodes){const g=l.childNodes[m];let R;switch(g.nodeName){case"Linear":R=QF(g,c);break;case"NonLinearAds":R=zF(g,c);break;case"CompanionAds":R=JF(g,c)}R&&(d&&(R.universalAdIds=d),h&&(R.creativeExtensions=h),o.push(R))}})),o})(k.childrenByName(i,"Creative"));break;case"Extensions":{const a=k.childrenByName(i,"Extension");s.extensions=M3(a),s.adVerifications.length||(n=(function(o){let l=null,c=[];return o.some((d=>l=k.childByName(d,"AdVerifications"))),l&&(c=_3(k.childrenByName(l,"Verification"))),c})(a));break}case"AdVerifications":s.adVerifications=_3(k.childrenByName(i,"Verification"));break;case"AdSystem":s.system={value:k.parseNodeText(i),version:i.getAttribute("version")||null};break;case"AdTitle":s.title=k.parseNodeText(i);break;case"AdServingId":s.adServingId=k.parseNodeText(i);break;case"Category":s.categories.push({authority:i.getAttribute("authority")||null,value:k.parseNodeText(i)});break;case"Expires":s.expires=parseInt(k.parseNodeText(i),10);break;case"ViewableImpression":s.viewableImpression.push((function(a){const o=(l,c)=>{const d=k.parseNodeText(c);return d&&l.push(d),l};return{id:a.getAttribute("id")||null,viewable:k.childrenByName(a,"Viewable").reduce(o,[]),notViewable:k.childrenByName(a,"NotViewable").reduce(o,[]),viewUndetermined:k.childrenByName(a,"ViewUndetermined").reduce(o,[])}})(i));break;case"Description":s.description=k.parseNodeText(i);break;case"Advertiser":s.advertiser={id:i.getAttribute("id")||null,value:k.parseNodeText(i)};break;case"Pricing":s.pricing={value:k.parseNodeText(i),model:i.getAttribute("model")||null,currency:i.getAttribute("currency")||null};break;case"Survey":s.survey={value:k.parseNodeText(i),type:i.getAttribute("type")||null};break;case"BlockedAdCategories":s.blockedAdCategories.push({authority:i.getAttribute("authority")||null,value:k.parseNodeText(i)})}})),n.length&&(s.adVerifications=s.adVerifications.concat(n)),s}function _F(e,t){const n=t4(e,t),r=e.getAttribute("followAdditionalWrappers"),s=e.getAttribute("allowMultipleAds"),i=e.getAttribute("fallbackOnNoAd");n.followAdditionalWrappers=!r||k.parseBoolean(r),n.allowMultipleAds=!!s&&k.parseBoolean(s),n.fallbackOnNoAd=i?k.parseBoolean(i):null;let a=k.childByName(e,"VASTAdTagURI");if(a?n.nextWrapperURL=k.parseNodeText(a):(a=k.childByName(e,"VASTAdTagURL"),a&&(n.nextWrapperURL=k.parseNodeText(k.childByName(a,"URL")))),n.creatives.forEach((o=>{if(["linear","nonlinear"].includes(o.type)){if(o.trackingEvents){n.trackingEvents||(n.trackingEvents={}),n.trackingEvents[o.type]||(n.trackingEvents[o.type]={});for(const l in o.trackingEvents){const c=o.trackingEvents[l];Array.isArray(n.trackingEvents[o.type][l])||(n.trackingEvents[o.type][l]=[]),c.forEach((d=>{n.trackingEvents[o.type][l].push(d)}))}}o.videoClickTrackingURLTemplates&&(Array.isArray(n.videoClickTrackingURLTemplates)||(n.videoClickTrackingURLTemplates=[]),o.videoClickTrackingURLTemplates.forEach((l=>{n.videoClickTrackingURLTemplates.push(l)}))),o.videoClickThroughURLTemplate&&(n.videoClickThroughURLTemplate=o.videoClickThroughURLTemplate),o.videoCustomClickURLTemplates&&(Array.isArray(n.videoCustomClickURLTemplates)||(n.videoCustomClickURLTemplates=[]),o.videoCustomClickURLTemplates.forEach((l=>{n.videoCustomClickURLTemplates.push(l)})))}})),n.nextWrapperURL)return n}function _3(e){const t=[];return e.forEach((n=>{const r={resource:null,vendor:null,browserOptional:!1,apiFramework:null,type:null,parameters:null,trackingEvents:{}},s=Array.from(n.childNodes);k.assignAttributes(n.attributes,r),s.forEach((a=>{let{nodeName:o,textContent:l,attributes:c}=a;switch(o){case"JavaScriptResource":case"ExecutableResource":r.resource=l.trim(),k.assignAttributes(c,r);break;case"VerificationParameters":r.parameters=l.trim()}}));const i=k.childByName(n,"TrackingEvents");i&&k.childrenByName(i,"Tracking").forEach((a=>{const o=a.getAttribute("event"),l=k.parseNodeText(a);o&&l&&(Array.isArray(r.trackingEvents[o])||(r.trackingEvents[o]=[]),r.trackingEvents[o].push(l))})),t.push(r)})),t}class jF{constructor(){this._handlers=[]}on(t,n){if(typeof n!="function")throw new TypeError("The handler argument must be of type Function. Received type ".concat(typeof n));if(!t)throw new TypeError("The event argument must be of type String. Received type ".concat(typeof t));return this._handlers.push({event:t,handler:n}),this}once(t,n){return this.on(t,(function(r,s,i){const a={fired:!1,wrapFn:void 0};function o(){a.fired||(r.off(s,a.wrapFn),a.fired=!0,i.bind(r)(...arguments))}return a.wrapFn=o,o})(this,t,n))}off(t,n){return this._handlers=this._handlers.filter((r=>r.event!==t||r.handler!==n)),this}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];let i=!1;return this._handlers.forEach((a=>{a.event==="*"&&(i=!0,a.handler(t,...r)),a.event===t&&(i=!0,a.handler(...r))})),i}removeAllListeners(t){return t?(this._handlers=this._handlers.filter((n=>n.event!==t)),this):(this._handlers=[],this)}listenerCount(t){return this._handlers.filter((n=>n.event===t)).length}listeners(t){return this._handlers.reduce(((n,r)=>(r.event===t&&n.push(r.handler),n)),[])}eventNames(){return this._handlers.map((t=>t.event))}}let j3=0,u1=0;const n4=(e,t)=>{!e||!t||e<=0||t<=0||(u1=(u1*j3+8*e/t)/++j3)},DF={ERRORCODE:900,extensions:[]},D3="VAST response version not supported";class PF extends jF{constructor(){let{fetcher:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(),this.maxWrapperDepth=null,this.rootErrorURLTemplates=[],this.errorURLTemplates=[],this.remainingAds=[],this.parsingOptions={},this.fetcher=t||null,this.keepFailedAdPod=!1}trackVastError(t,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i<r;i++)s[i-2]=arguments[i];this.emit("VAST-error",Object.assign({},DF,n,...s)),bn.track(t,n)}getErrorURLTemplates(){return this.rootErrorURLTemplates.concat(this.errorURLTemplates)}getEstimatedBitrate(){return u1}initParsingStatus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.maxWrapperDepth=t.wrapperLimit||10,this.parsingOptions={allowMultipleAds:t.allowMultipleAds},this.keepFailedAdPod=t.keepFailedAdPod||!1,this.rootURL="",this.resetParsingStatus(),n4(t.byteLength,t.requestDuration)}resetParsingStatus(){this.errorURLTemplates=[],this.rootErrorURLTemplates=[],this.vastVersion=null}getRemainingAds(t){if(this.remainingAds.length===0)return Promise.reject(new Error("No more ads are available for the given VAST"));const n=t?this.remainingAds:[this.remainingAds.shift()];return this.errorURLTemplates=[],this.resolveAds(n,{wrapperDepth:0,url:this.rootURL}).then((r=>this.buildVASTResponse(r)))}parseVAST(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.initParsingStatus(n),n.isRootVAST=!0,this.parse(t,n).then((r=>this.buildVASTResponse(r)))}buildVASTResponse(t){const n=(function(r){let{ads:s,errorURLTemplates:i,version:a}=r;return{ads:s||[],errorURLTemplates:i||[],version:a||null}})({ads:t,errorURLTemplates:this.getErrorURLTemplates(),version:this.vastVersion});return this.completeWrapperResolving(n),n}parseVastXml(t,n){let{isRootVAST:r=!1,url:s=null,wrapperDepth:i=0,allowMultipleAds:a,followAdditionalWrappers:o}=n;if(!t||!t.documentElement||t.documentElement.nodeName!=="VAST"){var l;this.emit("VAST-ad-parsed",{type:"ERROR",url:s,wrapperDepth:i});const p=(t==null||(l=t.documentElement)===null||l===void 0?void 0:l.nodeName)==="VideoAdServingTemplate";throw new Error(p?D3:"Invalid VAST XMLDocument")}const c=[],d=t.documentElement.childNodes,h=t.documentElement.getAttribute("version");r&&h&&(this.vastVersion=h);for(const p in d){const m=d[p];if(m.nodeName==="Error"){const g=k.parseNodeText(m);r?this.rootErrorURLTemplates.push(g):this.errorURLTemplates.push(g)}else if(m.nodeName==="Ad"){if(this.vastVersion&&parseFloat(this.vastVersion)<3)a=!0;else if(a===!1&&c.length>1)break;const g=HF(m,this.emit.bind(this),{allowMultipleAds:a,followAdditionalWrappers:o});g.ad?(c.push(g.ad),this.emit("VAST-ad-parsed",{type:g.type,url:s,wrapperDepth:i,adIndex:c.length-1,vastVersion:h})):this.trackVastError(this.getErrorURLTemplates(),{ERRORCODE:101})}}return c}parse(t){let{url:n=null,resolveAll:r=!0,wrapperSequence:s=null,previousUrl:i=null,wrapperDepth:a=0,isRootVAST:o=!1,followAdditionalWrappers:l,allowMultipleAds:c}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=[];this.vastVersion&&parseFloat(this.vastVersion)<3&&o&&(c=!0);try{d=this.parseVastXml(t,{isRootVAST:o,url:n,wrapperDepth:a,allowMultipleAds:c,followAdditionalWrappers:l})}catch(h){return Promise.reject(h)}if(d.length===1&&s!=null&&(d[0].sequence=s),r===!1){const h=k.getSortedAdPods(d),p=k.getStandAloneAds(d);h.length?d=h:p.length&&(d=[p.shift()]),this.remainingAds=p}return this.resolveAds(d,{wrapperDepth:a,previousUrl:i,url:n})}resolveAds(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],{wrapperDepth:n,previousUrl:r,url:s}=arguments.length>1?arguments[1]:void 0;const i=[];return r=s,t.forEach((a=>{const o=this.resolveWrappers(a,n,r);i.push(o)})),Promise.all(i).then((a=>bn.flatten(a)))}resolveWrappers(t,n,r){const s={...t};return new Promise((i=>{var a;if(n++,!s.nextWrapperURL)return delete s.nextWrapperURL,i(s);if(!this.fetcher)return s.VASTAdTagURI=s.nextWrapperURL,delete s.nextWrapperURL,i(s);if(n>=this.maxWrapperDepth)return s.errorCode=302,delete s.nextWrapperURL,i(s);s.nextWrapperURL=k.resolveVastAdTagURI(s.nextWrapperURL,r);const o=(a=this.parsingOptions.allowMultipleAds)!==null&&a!==void 0?a:s.allowMultipleAds,l=s.sequence;this.fetcher.fetchVAST({url:s.nextWrapperURL,emitter:this.emit.bind(this),maxWrapperDepth:this.maxWrapperDepth}).then((c=>this.parse(c,{url:s.nextWrapperURL,previousUrl:r,wrapperSequence:l,wrapperDepth:n,followAdditionalWrappers:s.followAdditionalWrappers,allowMultipleAds:o}).then((d=>{if(delete s.nextWrapperURL,d.length===0)return s.creatives=[],i(s);d.forEach((h=>{h&&k.mergeWrapperAdData(h,s)})),i(d)})))).catch((c=>{s.errorCode=c.message===D3?102:301,s.errorMessage=c.message,i(s)}))}))}completeWrapperResolving(t){if(t.ads.length===0)this.trackVastError(t.errorURLTemplates,{ERRORCODE:303});else for(let n=t.ads.length-1;n>=0;n--){const r=t.ads[n],s=!r.creatives.some((i=>{var a,o;return((a=i.mediaFiles)===null||a===void 0?void 0:a.length)>0||((o=i.variations)===null||o===void 0?void 0:o.length)>0}));!r.errorCode&&!s||r.VASTAdTagURI||(this.trackVastError(r.errorURLTemplates.concat(t.errorURLTemplates),{ERRORCODE:r.errorCode||303},{ERRORMESSAGE:r.errorMessage||""},{extensions:r.extensions},{system:r.system}),this.keepFailedAdPod&&r.sequence?r.hasFailed=!0:t.ads.splice(n,1))}}}let Xt=null;const $F={data:{},length:0,getItem(e){return this.data[e]},setItem(e,t){this.data[e]=t,this.length=Object.keys(this.data).length},removeItem(e){delete this.data[e],this.length=Object.keys(this.data).length},clear(){this.data={},this.length=0}};class qF{constructor(){this.storage=this.initStorage()}initStorage(){if(Xt)return Xt;try{Xt=typeof window<"u"&&window!==null?window.localStorage||window.sessionStorage:null}catch{Xt=null}return Xt&&!this.isStorageDisabled(Xt)||(Xt=$F,Xt.clear()),Xt}isStorageDisabled(t){const n="__VASTStorage__";try{if(t.setItem(n,n),t.getItem(n)!==n)return t.removeItem(n),!0}catch{return!0}return t.removeItem(n),!1}getItem(t){return this.storage.getItem(t)}setItem(t,n){return this.storage.setItem(t,n)}removeItem(t){return this.storage.removeItem(t)}clear(){return this.storage.clear()}}const h1=12e4,eN={get:async function(e,t){try{const n=new AbortController,r=setTimeout((()=>{throw n.abort(),new Error("URLHandler: Request timed out after ".concat(t.timeout||h1," ms (408)"))}),t.timeout||h1),s=await fetch(e,{...t,signal:n.signal,credentials:t.withCredentials?"include":"omit"}).finally((()=>{clearTimeout(r)})),i=(function(a){return bn.isBrowserEnvironment()&&window.location.protocol==="https:"&&a.url.includes("http://")?"URLHandler: Cannot go from HTTPS to HTTP.":a.status===200&&a.ok?null:"URLHandler: ".concat(a.statusText," (").concat(a.status,")")})(s);return i?{error:new Error(i),statusCode:s.status}:(async function(a){const o=await a.text();let l;return l=bn.isBrowserEnvironment()?new DOMParser:new(await Promise.resolve().then(()=>require("./index-DvqmgCor.js")).then(c=>c.i)).DOMParser,{xml:l.parseFromString(o,"text/xml"),details:{byteLength:o.length,statusCode:a.status,rawXml:o}}})(s)}catch(n){return{error:n,statusCode:n.name==="AbortError"?408:null}}}};class tN{constructor(){this.URLTemplateFilters=[]}setOptions(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.urlHandler=t.urlHandler||t.urlhandler||eN,this.fetchingOptions={...t.fetchOptions,timeout:t.timeout||h1,withCredentials:!!t.withCredentials}}addURLTemplateFilter(t){typeof t=="function"&&this.URLTemplateFilters.push(t)}removeLastURLTemplateFilter(){this.URLTemplateFilters.pop()}countURLTemplateFilters(){return this.URLTemplateFilters.length}clearURLTemplateFilters(){this.URLTemplateFilters=[]}async fetchVAST(t){var n;let{url:r,maxWrapperDepth:s,emitter:i,wrapperDepth:a=0,previousUrl:o=null,wrapperAd:l=null}=t;const c=Date.now();this.URLTemplateFilters.forEach((p=>{r=p(r)})),i("VAST-resolving",{url:r,previousUrl:o,wrapperDepth:a,maxWrapperDepth:s,timeout:this.fetchingOptions.timeout,wrapperAd:l});const d=await this.urlHandler.get(r,this.fetchingOptions),h=Math.round(Date.now()-c);if(i("VAST-resolved",{url:r,previousUrl:o,wrapperDepth:a,error:d?.error||null,duration:h,statusCode:d?.statusCode||null,...d?.details}),n4(d==null||(n=d.details)===null||n===void 0?void 0:n.byteLength,h),d.error)throw new Error(d.error);return d.xml}}class nN{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new qF;this.cappingFreeLunch=t,this.cappingMinimumTimeInterval=n,this.fetcher=new tN,this.vastParser=new PF({fetcher:this.fetcher}),this.storage=r,this.lastSuccessfulAd===void 0&&(this.lastSuccessfulAd=0),this.totalCalls===void 0&&(this.totalCalls=0),this.totalCallsTimeout===void 0&&(this.totalCallsTimeout=0)}addURLTemplateFilter(t){this.fetcher.addURLTemplateFilter(t)}removeLastURLTemplateFilter(){this.fetcher.removeLastURLTemplateFilter()}countURLTemplateFilters(){return this.fetcher.countURLTemplateFilters()}clearURLTemplateFilters(){this.fetcher.clearURLTemplateFilters()}getParser(){return this.vastParser}get lastSuccessfulAd(){return this.storage.getItem("vast-client-last-successful-ad")}set lastSuccessfulAd(t){this.storage.setItem("vast-client-last-successful-ad",t)}get totalCalls(){return this.storage.getItem("vast-client-total-calls")}set totalCalls(t){this.storage.setItem("vast-client-total-calls",t)}get totalCallsTimeout(){return this.storage.getItem("vast-client-total-calls-timeout")}set totalCallsTimeout(t){this.storage.setItem("vast-client-total-calls-timeout",t)}hasRemainingAds(){return this.vastParser.remainingAds.length>0}getNextAds(t){return this.vastParser.getRemainingAds(t)}parseVAST(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.fetcher.setOptions(n),this.vastParser.parseVAST(t,n)}get(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Date.now();return n.hasOwnProperty("resolveAll")||(n.resolveAll=!1),this.totalCallsTimeout<r?(this.totalCalls=1,this.totalCallsTimeout=r+36e5):this.totalCalls++,new Promise(((s,i)=>{if(this.cappingFreeLunch>=this.totalCalls)return i(new Error("VAST call canceled – FreeLunch capping not reached yet ".concat(this.totalCalls,"/").concat(this.cappingFreeLunch)));const a=r-this.lastSuccessfulAd;if(a<0)this.lastSuccessfulAd=0;else if(a<this.cappingMinimumTimeInterval)return i(new Error("VAST call canceled – (".concat(this.cappingMinimumTimeInterval,")ms minimum interval reached")));this.vastParser.initParsingStatus(n),this.fetcher.setOptions(n),this.vastParser.rootURL=t,this.fetcher.fetchVAST({url:t,emitter:this.vastParser.emit.bind(this.vastParser),maxWrapperDepth:this.vastParser.maxWrapperDepth}).then((o=>(n.previousUrl=t,n.isRootVAST=!0,n.url=t,this.vastParser.parse(o,n).then((l=>{const c=this.vastParser.buildVASTResponse(l);s(c)}))))).catch((o=>i(o)))}))}}const rN=new nN,ul=st("ui:gam-static"),P3=e=>new Promise((t,n)=>{const r=new Image;r.onload=()=>t(e),r.onerror=()=>n(),r.src=e}),sN=e=>(t,n,r)=>e.transport.nanoquery.createFetcherStore([t,n],{dedupeTime:r.prefetch?r.refetchInterval:1/0,revalidateInterval:r.refetchInterval>0?r.refetchInterval:0,fetcher:async s=>{if(!s||typeof s!="string")throw new Error("no_valid_ad");Se.emit("exposedPauseAd",{action:"load",payload:{}});try{const i=(await rN.get(s)).ads.find(a=>a.creatives.length>0);if(i){const a=i.id||"";ul.debug(i,"validAd");const o=i.creatives.find(h=>h.type==="nonlinear");if(o){const h=o.adId||o.id||a;ul.debug(o,"nonlinear");const p=o.variations?.[0]?.staticResource,m=o.variations?.[0]?.nonlinearClickThroughURLTemplate;if(p)return await P3(p),Se.emit("exposedPauseAd",{action:"loaded",payload:{id:h,parentId:a}}),{id:h,parentId:a,url:s,imageSrc:p,adUrl:m}}const l=i.creatives.find(h=>h.type==="companion");ul.debug(l,"companion");const c=l?.variations?.[0]?.staticResources?.[0]?.url,d=l?.variations?.[0]?.companionClickThroughURLTemplate;if(c){const h=l.adId||l.id||a;return await P3(c),Se.emit("exposedPauseAd",{action:"loaded",payload:{id:h,parentId:a}}),{id:h,parentId:a,url:s,imageSrc:c,adUrl:d}}}throw new Error("no_valid_ad")}catch(i){throw console.error(i,"err"),new Error("no_valid_ad")}}});class iN extends kp{getExternalPauseAd;externalPauseAdStores=new Map;externalPauseAdEnabled=new Map;log;constructor(t){super(),this.log=st("advertisement");const n=sN(t);this.getExternalPauseAd=(r,s)=>{if(this.externalPauseAdStores.has(r)){const o=this.externalPauseAdEnabled.get(r),l=this.externalPauseAdStores.get(r),c=o.get()===!1&&s.$enabled===!0;return o.set(s.$enabled),c&&window.requestAnimationFrame(()=>{l.revalidate()}),[l,r]}const i=ke(s.$enabled),a=n(r,i,s);return this.externalPauseAdEnabled.set(r,i),this.externalPauseAdStores.set(r,a),[a,r]}}connect=()=>{this.log.debug("connect")};disconnect=()=>{this.log.debug("disconnect"),this.externalPauseAdStores.forEach(t=>{t.off()}),this.externalPauseAdEnabled.forEach(t=>{t.off()}),this.externalPauseAdEnabled.clear(),this.externalPauseAdStores.clear()}}const aN=(e,t,n)=>{e.sdk.advertisement=new iN(e),e.sdk.onMount({name:"advertisement"},()=>(e.sdk.advertisement.connect(),()=>{e.sdk.advertisement.disconnect()})),n()};class oN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{r.slEventBus?.type==="invitation"&&r.slEventBus.action==="sent"&&this.sent(r.slEventBus.payload)};return Se.listen(n)})}accepted=()=>{this.analytics.write("invitation",{common:{...this.analytics.commonStore.getValues(),kind:fe.INVITATION_ACCEPTED},category:hc.GAMES,from:_l.UNSET})};sent=({from:t})=>{this.analytics.write("invitation",{common:{...this.analytics.commonStore.getValues(),kind:fe.INVITATION_SENT},category:hc.GAMES,from:t||_l.UNSET})}}class lN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{if(r.slEventBus?.type==="interactions")switch(r.slEventBus.action){case"tap":this.tap();break;case"scroll":this.scroll();break}};return Se.listen(n)})}tap=()=>{this.analytics.write("interactions",{common:{...this.analytics.commonStore.getValues(),kind:fe.INTERACTIONS},actionType:v3.TAP})};scroll=()=>{this.analytics.write("interactions",{common:{...this.analytics.commonStore.getValues(),kind:fe.INTERACTIONS},actionType:v3.SCROLL})}}const cN={[Ae.UNSET]:Ie.UNSET,[Ae.INGAME_IAB21]:Ie.PROMOTION_INGAME_IAB21,[Ae.INGAME_IAB21_SIDEBAR]:Ie.PROMOTION_INGAME_IAB21,[Ae.INGAME_IAB11_LBAR]:Ie.PROMOTION_INGAME_IAB11_LBAR,[Ae.INGAME_IAB11]:Ie.PROMOTION_INGAME_IAB11,[Ae.INGAME_IAB11_SIDEBAR]:Ie.PROMOTION_INGAME_IAB11,[Ae.INGAME_IAB21_LBAR]:Ie.PROMOTION_INGAME_IAB21_LBAR,[Ae.INGAME_IAB61]:Ie.PROMOTION_INGAME_IAB61,[Ae.INGAME_IAB61_SIDEBAR]:Ie.PROMOTION_INGAME_IAB61,[Ae.EXTERNAL_AD]:Ie.PROMOTION_GAM,[Ae.VIDEO_SIDE_BY_SIDE]:Ie.PROMOTION_VIDEO_SIDE_BY_SIDE,[Ae.PICTURE_IN_PICTURE]:Ie.PROMOTION_PICTURE_IN_PICTURE,[Ae.LOWER_THIRD]:Ie.PROMOTION_LOWER_THIRD,[Ae.SHOP_LBAR]:Ie.PROMOTION_SHOP_LBAR,[Ae.SHOP_OVERLAY]:Ie.PROMOTION_SHOP_OVERLAY,[Ae.SHOP_SIDEBAR]:Ie.PROMOTION_SHOP_SIDEBAR,[Ae.NFL_SHOP_LBAR]:Ie.PROMOTION_SHOP_LBAR,[Ae.NFL_SHOP_OVERLAY]:Ie.PROMOTION_SHOP_OVERLAY,[Ae.NFL_SHOP_SIDEBAR]:Ie.PROMOTION_SHOP_SIDEBAR,[Ae.STATS]:Ie.UNSET,[Ae.STANDARD]:Ie.UNSET,[Ae.SHOP]:Ie.UNSET,[Ae.NFL_SHOP]:Ie.UNSET},p1=e=>e?cN[e]:Ie.UNSET,dN={25:fe.AD_VIDEO_Q25,50:fe.AD_VIDEO_Q50,75:fe.AD_VIDEO_Q75};class uN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{if(!r.slEventBus?.skipAnalytics){if(r.slEventBus?.type==="exposedPauseAd"){const s=r.slEventBus.payload;switch(r.slEventBus.action){case"enabled":this.exposedPauseAdEnabled(s);break;case"disabled":this.exposedPauseAdDisabled(s);break;case"closed":this.exposedPauseAdClosed(s);break;case"load":this.exposedPauseAdLoad(s,!1);break;case"loaded":this.exposedPauseAdLoad(s,!0);break;case"rendered":this.exposedPauseAdOpened(s);break;case"navigated":this.exposedPauseAdNavigated(s);break}}if(r.slEventBus?.type==="advertisement"){const s=r.slEventBus.payload,i=p1(s.type);switch(r.slEventBus.action){case"videoPlay":this.videoPlay(s,{topicSubType:i});break;case"videoEnd":this.videoEnd(s,{topicSubType:i});break;case"videoRendered":this.videoRendered(s,{topicSubType:i});break;case"buttonSelect":this.buttonSelect(s,{topicSubType:i});break;case"bannerSelect":this.bannerSelect(s,{topicSubType:i});break;case"bannerShown":this.bannerShown(s,{topicSubType:i});break;case"received":this.received(s,{topicSubType:i});break;case"opened":this.opened(s,{topicSubType:i});break;case"viewed":this.viewed(s,{topicSubType:i});break;case"videoMuted":case"videoUnmuted":this.videoMuted(s,{topicSubType:i,muted:r.slEventBus.action==="videoMuted"});break;case"videoReplayed":this.videoReplayed(s,{topicSubType:i});break;case"quartileCompleted":this.quartileCompleted(s,{topicSubType:i});break}}}};return Se.listen(n)})}exposedPauseAdEnabled=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.STREAM_PAUSED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdClosed=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.EXTERNAL_AD_CLOSED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdDisabled=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.STREAM_RESUMED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdOpened=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.EXTERNAL_AD_RENDERED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdNavigated=({id:t,parentId:n})=>{const r=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...r,kind:fe.AD_INTERACTION_BANNER_NAVIGATED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};exposedPauseAdLoad=({id:t,parentId:n},r)=>{const s=this.analytics.commonStore.getValues();this.analytics.write("games",{common:{...s,kind:r?fe.EXTERNAL_AD_LOADED:fe.EXTERNAL_AD_REQUESTED,topicId:t,parentTopicId:n,topicType:Ee.EXPOSED_PAUSED_AD},pollOpenedFrom:Fe.UNSET})};received=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.POLLS_RECEIVED,topicId:t,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};opened=({id:t,openedFrom:n},{topicSubType:r})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.POLLS_OPENED,topicId:t,topicType:Ee.POLLS_PROMOTION,topicSubType:r},pollOpenedFrom:n==="notification"?Fe.IN_APP:Fe.UNSET})};viewed=({id:t},{topicSubType:n})=>{};videoMuted=({id:t},{topicSubType:n,muted:r})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:r?fe.AD_VIDEO_MUTED:fe.AD_VIDEO_UNMUTED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};quartileCompleted=({id:t,quartile:n},{topicSubType:r})=>{n&&this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:dN[n],topicType:Ee.POLLS_PROMOTION,topicSubType:r},pollOpenedFrom:Fe.UNSET})};videoReplayed=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_VIDEO_REPLAYED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};videoPlay=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_VIDEO_PLAYED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};videoEnd=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_VIDEO_COMPLETE,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};videoRendered=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_VIDEO_RENDERED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};buttonSelect=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_INTERACTION_BUTTON_NAVIGATED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};bannerSelect=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_INTERACTION_BANNER_NAVIGATED,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})};bannerShown=({id:t},{topicSubType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),topicId:t,kind:fe.AD_BANNER_SHOWN,topicType:Ee.POLLS_PROMOTION,topicSubType:n},pollOpenedFrom:Fe.UNSET})}}const ir={[M.UNSET]:Ee.UNSET,[M.FACTOID]:Ee.POLLS_INSIGHT,[M.POLL]:Ee.POLLS_POLL,[M.PREDICTION]:Ee.POLLS_PREDICTION,[M.PROMOTION]:Ee.POLLS_PROMOTION,[M.TRIVIA]:Ee.POLLS_TRIVIA,[M.TWEET]:Ee.POLLS_TWITTER};M.UNSET+"",Yt.UNSET,M.FACTOID+"",Yt.POLLS,M.POLL+"",Yt.POLLS,M.PREDICTION+"",Yt.POLLS,M.PROMOTION+"",Yt.POLLS,M.TRIVIA+"",Yt.POLLS,M.TWEET+"",Yt.POLLS;const hN={[pe.UNSET]:Qe.UNSET,[pe.INPLAY]:Qe.INPLAY,[pe.MESSAGING]:Qe.MESSAGING,[pe.STATISTICS]:Qe.STATS,[pe.BETTING]:Qe.BETTING,[pe.TWITTER]:Qe.TWITTER,[pe.MERCHANDISE]:Qe.MERCHANDISE,[pe.CONTESTS]:Qe.CONTESTS,[pe.VOICE_CHAT]:Qe.CALLING,[pe.TICKETS]:Qe.TICKETS,[pe.WHOIS_WATCHING]:Qe.WHOISWATCHING,[pe.PROFILE]:Qe.PROFILE,[pe.GAMES]:Qe.POLLS,[pe.GOLF_STATISTICS]:Qe.STATS,[pe.HIGHLIGHTS]:Qe.HIGHLIGHTS,[pe.PUBLIC_CHAT]:Qe.PUBLIC_CHAT};class pN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{if(r.slEventBus?.type==="notification")switch(r.slEventBus.action){case"rendered":this.received(r.slEventBus.payload);break;case"opened":this.opened(r.slEventBus.payload);break}if(r.slEventBus?.type==="advertisement")switch(r.slEventBus.action){case"notification-received":this.received({questionId:r.slEventBus.payload.id,questionType:M.PROMOTION,topicSubType:p1(r.slEventBus.payload.type)});break;case"notification-opened":this.opened({questionId:r.slEventBus.payload.id,questionType:M.PROMOTION,topicSubType:p1(r.slEventBus.payload.type)});break}};return Se.listen(n)})}received=({questionId:t,questionType:n,topicSubType:r})=>{this.analytics.write("notification",{common:{...this.analytics.commonStore.getValues(),kind:fe.NOTIFICATION_RECEIVED,topicId:t,topicType:n?ir[n]:Ee.UNSET,topicSubType:r},notificationKind:Yt.POLLS,notificationType:W3.IN_APP})};opened=({questionId:t,questionType:n,topicSubType:r})=>{this.analytics.write("notification",{common:{...this.analytics.commonStore.getValues(),kind:fe.NOTIFICATION_OPENED,topicId:t,topicType:n?ir[n]:Ee.UNSET,topicSubType:r},notificationKind:Yt.POLLS,notificationType:W3.IN_APP})}}class mN{analytics;constructor(t){this.analytics=t,this.analytics.onConnect(()=>{const n=r=>{if(r.slEventBus?.type==="poll")switch(r.slEventBus.action){case"voted":this.voted(r.slEventBus.payload);break;case"navigated":this.navigated();break;case"onboardingPassed":this.onboardingPassed();break;case"received":this.received(r.slEventBus.payload);break;case"viewed":this.viewed(r.slEventBus.payload);break}};return Se.listen(n)})}received=({questionId:t,questionType:n})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.POLLS_RECEIVED,topicId:t,topicType:n?ir[n]:Ee.UNSET},pollOpenedFrom:Fe.UNSET})};viewed=({questionId:t,questionType:n,questionOpenedFrom:r,isAd:s})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:s?fe.POLLS_AD_OPENED:fe.POLLS_OPENED,topicId:t,topicType:n?ir[n]:Ee.UNSET},pollOpenedFrom:r==="list"?Fe.PICK_HISTORY:Fe.IN_APP})};voted=({questionId:t,questionType:n,isAd:r})=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:r?fe.POLLS_AD_VOTE:fe.POLLS_VOTE,topicId:t,topicType:n?ir[n]:Ee.UNSET},pollOpenedFrom:Fe.UNSET})};onboardingPassed=()=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.GAMES_JOINED},pollOpenedFrom:Fe.UNSET})};navigated=()=>{this.analytics.write("games",{common:{...this.analytics.commonStore.getValues(),kind:fe.POLLS_NAVIGATED},pollOpenedFrom:Fe.UNSET})}}const gN=({transport:e,$commonStore:t})=>{let n;const r=ke(!1),s=3e4,{client:i,queryKey:a}=e.createPromiseClient(Yp,{method:"send",params:[r]}),o=e.nanoquery.createFetcherStore(a,{fetcher:async()=>{const h=t.getStore().get();try{await i.unary({message:{case:"heartbeat",value:{common:{...h,kind:fe.SESSION_HEARTBEAT}}}})}catch(p){kt.error(p,"send heartbeat failed")}return Date.now()},revalidateInterval:s}),l=()=>{kt.debug("mounted heartbeat"),n=o.subscribe(()=>{})},c=()=>{kt.debug("enabled heartbeat"),r.set(!0),o.lc===0&&l()},d=()=>{kt.debug("disabled heartbeat"),r.set(!1)};return{enable:c,disable:d,mount:l,unmount:()=>{kt.debug("unmounted heartbeat"),o.off(),n?.(),n=void 0,d()}}},kt=st("analytics");class fN{commonStore;notifications;polls;invitation;interactions;advertisement;heartbeat;analyticsClient;listeners;listenersCancels;connected=!1;constructor(t){this.listeners=new Set,this.listenersCancels=new Set,this.commonStore=new mn(tt({}),"common-analytics"),this.connectToSDK(t),this.heartbeat=gN({transport:t.analyticsTransport,$commonStore:this.commonStore}),this.notifications=new pN(this),this.polls=new mN(this),this.invitation=new oN(this),this.interactions=new lN(this),this.advertisement=new uN(this);const{client:n}=t.analyticsTransport.createPromiseClient(Yp,{method:"send"});this.analyticsClient=n}connect=()=>{this.writeCommon("sessionId",Wn.v4()),this.heartbeat.enable(),this.listeners.forEach(t=>this.listenersCancels.add(t())),this.connected=!0,kt.debug("analytics connected")};disconnect=()=>{this.writeCommon("sessionId",""),this.writeCommon("overlaySessionId",""),this.heartbeat.unmount(),this.listenersCancels.forEach(t=>t()),this.connected=!1,kt.debug("analytics disconnected")};write=(t,n)=>{n&&this.analyticsClient.unary({message:{case:t,value:n}}).then(()=>{kt.trace("send analytics success",t,n)}).catch(r=>{kt.error(r,"send analytics failed")})};writeCommon=(t,n)=>{this.commonStore.setValue(t,n)};onConnect=t=>{this.listeners.add(t),this.connected&&this.listenersCancels.add(t())};connectToSDK=t=>{this.onConnect(()=>t.stores.slStreamId.getAtomStore().subscribe(n=>{this.writeCommon("eventId",n)})),this.onConnect(()=>t.sdk.getActiveFeature().subscribe(n=>{n&&this.writeCommon("category",hN[n]),n!==pe.UNSET?this.writeCommon("overlaySessionId",Wn.v4()):this.writeCommon("overlaySessionId","")})),this.onConnect(()=>{const n=r=>{if(!r.slEventBus)return;const s=r.slEventBus?.action;r.slEventBus?.type==="exposedPauseAd"&&((s==="disabled"||s==="closed")&&setTimeout(()=>{this.writeCommon("overlaySessionId",""),this.writeCommon("topicId",""),this.writeCommon("parentTopicId",""),this.writeCommon("topicType",Ee.UNSET),this.writeCommon("category",Qe.UNSET)},200),s==="enabled"&&(this.writeCommon("overlaySessionId",Wn.v4()),this.writeCommon("category",Qe.EXPOSED_PAUSED_AD))),r.slEventBus?.type==="advertisement"&&(s==="opened"&&this.writeCommon("overlaySessionId",Wn.v4()),s==="closed"&&this.writeCommon("overlaySessionId",""))};return Se.listen(n)}),this.onConnect(()=>{const n=window.matchMedia("(orientation: portrait)"),r=s=>{this.writeCommon("screenOrientation",s.matches?cc.PORTRAIT:cc.LANDSCAPE)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}),t.deepLink&&this.onConnect(()=>t.deepLink.$store.subscribe(n=>{n?.handled&&this.invitation.accepted()}))}}const bN=(e,t,n)=>{e.analytics=new fN(e),e.sdk.onMount({name:"analytics"},()=>(e.analytics.connect(),e.sdk.writeOverlaySessionId=r=>{r===""?e.analytics.writeCommon("overlaySessionId",""):e.analytics.writeCommon("overlaySessionId",Wn.v4())},()=>{e.analytics.disconnect()})),n()};var h2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Dl<"u"?Dl:typeof self<"u"?self:{};function r4(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wr={exports:{}},xr={exports:{}},hl,$3;function AN(){if($3)return hl;$3=1;function e(t){var n=new t,r=n;function s(){var a=n;return a.next?n=a.next:(n=new t,r=n),a.next=null,a}function i(a){r.next=a,r=a}return{get:s,release:i}}return hl=e,hl}var q3;function s4(){if(q3)return xr.exports;q3=1;var e=AN();function t(i,a,o){if(typeof i=="function"&&(o=a,a=i,i=null),!(o>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var l=e(r),c=null,d=null,h=0,p=null,m={push:A,drain:n,saturated:n,pause:R,paused:!1,get concurrency(){return o},set concurrency(I){if(!(I>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(o=I,!m.paused)for(;c&&h<o;)h++,F()},running:g,resume:f,idle:V,length:y,getQueue:b,unshift:S,empty:n,kill:U,killAndDrain:Z,error:v};return m;function g(){return h}function R(){m.paused=!0}function y(){for(var I=c,N=0;I;)I=I.next,N++;return N}function b(){for(var I=c,N=[];I;)N.push(I.value),I=I.next;return N}function f(){if(m.paused){if(m.paused=!1,c===null){h++,F();return}for(;c&&h<o;)h++,F()}}function V(){return h===0&&m.length()===0}function A(I,N){var X=l.get();X.context=i,X.release=F,X.value=I,X.callback=N||n,X.errorHandler=p,h>=o||m.paused?d?(d.next=X,d=X):(c=X,d=X,m.saturated()):(h++,a.call(i,X.value,X.worked))}function S(I,N){var X=l.get();X.context=i,X.release=F,X.value=I,X.callback=N||n,X.errorHandler=p,h>=o||m.paused?c?(X.next=c,c=X):(c=X,d=X,m.saturated()):(h++,a.call(i,X.value,X.worked))}function F(I){I&&l.release(I);var N=c;N&&h<=o?m.paused?h--:(d===c&&(d=null),c=N.next,N.next=null,a.call(i,N.value,N.worked),d===null&&m.empty()):--h===0&&m.drain()}function U(){c=null,d=null,m.drain=n}function Z(){c=null,d=null,m.drain(),m.drain=n}function v(I){p=I}}function n(){}function r(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var i=this;this.worked=function(a,o){var l=i.callback,c=i.errorHandler,d=i.value;i.value=null,i.callback=n,i.errorHandler&&c(a,d),l.call(i.context,a,o),i.release(i)}}function s(i,a,o){typeof i=="function"&&(o=a,a=i,i=null);function l(R,y){a.call(this,R).then(function(b){y(null,b)},y)}var c=t(i,l,o),d=c.push,h=c.unshift;return c.push=p,c.unshift=m,c.drained=g,c;function p(R){var y=new Promise(function(b,f){d(R,function(V,A){if(V){f(V);return}b(A)})});return y.catch(n),y}function m(R){var y=new Promise(function(b,f){h(R,function(V,A){if(V){f(V);return}b(A)})});return y.catch(n),y}function g(){if(c.idle())return new Promise(function(b){b()});var R=c.drain,y=new Promise(function(b){c.drain=function(){R(),b()}});return y}}return xr.exports=t,xr.exports.promise=s,xr.exports}var Lr={exports:{}},e5;function i4(){if(e5)return Lr.exports;e5=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(A,S,F){return Function.prototype.apply.call(A,S,F)},n;e&&typeof e.ownKeys=="function"?n=e.ownKeys:Object.getOwnPropertySymbols?n=function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:n=function(A){return Object.getOwnPropertyNames(A)};function r(A){console&&console.warn&&console.warn(A)}var s=Number.isNaN||function(A){return A!==A};function i(){i.init.call(this)}Lr.exports=i,Lr.exports.once=b,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function o(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(A){if(typeof A!="number"||A<0||s(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");a=A}}),i.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(A){if(typeof A!="number"||A<0||s(A))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+A+".");return this._maxListeners=A,this};function l(A){return A._maxListeners===void 0?i.defaultMaxListeners:A._maxListeners}i.prototype.getMaxListeners=function(){return l(this)},i.prototype.emit=function(A){for(var S=[],F=1;F<arguments.length;F++)S.push(arguments[F]);var U=A==="error",Z=this._events;if(Z!==void 0)U=U&&Z.error===void 0;else if(!U)return!1;if(U){var v;if(S.length>0&&(v=S[0]),v instanceof Error)throw v;var I=new Error("Unhandled error."+(v?" ("+v.message+")":""));throw I.context=v,I}var N=Z[A];if(N===void 0)return!1;if(typeof N=="function")t(N,this,S);else for(var X=N.length,T=g(N,X),F=0;F<X;++F)t(T[F],this,S);return!0};function c(A,S,F,U){var Z,v,I;if(o(F),v=A._events,v===void 0?(v=A._events=Object.create(null),A._eventsCount=0):(v.newListener!==void 0&&(A.emit("newListener",S,F.listener?F.listener:F),v=A._events),I=v[S]),I===void 0)I=v[S]=F,++A._eventsCount;else if(typeof I=="function"?I=v[S]=U?[F,I]:[I,F]:U?I.unshift(F):I.push(F),Z=l(A),Z>0&&I.length>Z&&!I.warned){I.warned=!0;var N=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");N.name="MaxListenersExceededWarning",N.emitter=A,N.type=S,N.count=I.length,r(N)}return A}i.prototype.addListener=function(A,S){return c(this,A,S,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(A,S){return c(this,A,S,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(A,S,F){var U={fired:!1,wrapFn:void 0,target:A,type:S,listener:F},Z=d.bind(U);return Z.listener=F,U.wrapFn=Z,Z}i.prototype.once=function(A,S){return o(S),this.on(A,h(this,A,S)),this},i.prototype.prependOnceListener=function(A,S){return o(S),this.prependListener(A,h(this,A,S)),this},i.prototype.removeListener=function(A,S){var F,U,Z,v,I;if(o(S),U=this._events,U===void 0)return this;if(F=U[A],F===void 0)return this;if(F===S||F.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete U[A],U.removeListener&&this.emit("removeListener",A,F.listener||S));else if(typeof F!="function"){for(Z=-1,v=F.length-1;v>=0;v--)if(F[v]===S||F[v].listener===S){I=F[v].listener,Z=v;break}if(Z<0)return this;Z===0?F.shift():R(F,Z),F.length===1&&(U[A]=F[0]),U.removeListener!==void 0&&this.emit("removeListener",A,I||S)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(A){var S,F,U;if(F=this._events,F===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[A]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete F[A]),this;if(arguments.length===0){var Z=Object.keys(F),v;for(U=0;U<Z.length;++U)v=Z[U],v!=="removeListener"&&this.removeAllListeners(v);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(S=F[A],typeof S=="function")this.removeListener(A,S);else if(S!==void 0)for(U=S.length-1;U>=0;U--)this.removeListener(A,S[U]);return this};function p(A,S,F){var U=A._events;if(U===void 0)return[];var Z=U[S];return Z===void 0?[]:typeof Z=="function"?F?[Z.listener||Z]:[Z]:F?y(Z):g(Z,Z.length)}i.prototype.listeners=function(A){return p(this,A,!0)},i.prototype.rawListeners=function(A){return p(this,A,!1)},i.listenerCount=function(A,S){return typeof A.listenerCount=="function"?A.listenerCount(S):m.call(A,S)},i.prototype.listenerCount=m;function m(A){var S=this._events;if(S!==void 0){var F=S[A];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}i.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]};function g(A,S){for(var F=new Array(S),U=0;U<S;++U)F[U]=A[U];return F}function R(A,S){for(;S+1<A.length;S++)A[S]=A[S+1];A.pop()}function y(A){for(var S=new Array(A.length),F=0;F<S.length;++F)S[F]=A[F].listener||A[F];return S}function b(A,S){return new Promise(function(F,U){function Z(I){A.removeListener(S,v),U(I)}function v(){typeof A.removeListener=="function"&&A.removeListener("error",Z),F([].slice.call(arguments))}V(A,S,v,{once:!0}),S!=="error"&&f(A,Z,{once:!0})})}function f(A,S,F){typeof A.on=="function"&&V(A,"error",S,F)}function V(A,S,F,U){if(typeof A.on=="function")U.once?A.once(S,F):A.on(S,F);else if(typeof A.addEventListener=="function")A.addEventListener(S,function Z(v){U.once&&A.removeEventListener(S,Z),F(v)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof A)}return Lr.exports}var t5={},n5={},r5,s5;function a4(){return s5||(s5=1,r5=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==r||i.enumerable!==!0)return!1}return!0}),r5}var pl,i5;function Xs(){if(i5)return pl;i5=1;var e=a4();return pl=function(){return e()&&!!Symbol.toStringTag},pl}var a5,o5;function RN(){return o5||(o5=1,a5=Error),a5}var l5,c5;function VN(){return c5||(c5=1,l5=EvalError),l5}var d5,u5;function yN(){return u5||(u5=1,d5=RangeError),d5}var h5,p5;function EN(){return p5||(p5=1,h5=ReferenceError),h5}var m5,g5;function o4(){return g5||(g5=1,m5=SyntaxError),m5}var f5,b5;function Us(){return b5||(b5=1,f5=TypeError),f5}var A5,R5;function CN(){return R5||(R5=1,A5=URIError),A5}var ml,V5;function SN(){if(V5)return ml;V5=1;var e=typeof Symbol<"u"&&Symbol,t=a4();return ml=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},ml}var gl,y5;function ZN(){if(y5)return gl;y5=1;var e={__proto__:null,foo:{}},t=Object;return gl=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)},gl}var fl,E5;function vN(){if(E5)return fl;E5=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",s=function(o,l){for(var c=[],d=0;d<o.length;d+=1)c[d]=o[d];for(var h=0;h<l.length;h+=1)c[h+o.length]=l[h];return c},i=function(o,l){for(var c=[],d=l,h=0;d<o.length;d+=1,h+=1)c[h]=o[d];return c},a=function(o,l){for(var c="",d=0;d<o.length;d+=1)c+=o[d],d+1<o.length&&(c+=l);return c};return fl=function(o){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(e+l);for(var c=i(arguments,1),d,h=function(){if(this instanceof d){var y=l.apply(this,s(c,arguments));return Object(y)===y?y:this}return l.apply(o,s(c,arguments))},p=n(0,l.length-c.length),m=[],g=0;g<p;g++)m[g]="$"+g;if(d=Function("binder","return function ("+a(m,",")+"){ return binder.apply(this,arguments); }")(h),l.prototype){var R=function(){};R.prototype=l.prototype,d.prototype=new R,R.prototype=null}return d},fl}var bl,C5;function p2(){if(C5)return bl;C5=1;var e=vN();return bl=Function.prototype.bind||e,bl}var Al,S5;function WN(){if(S5)return Al;S5=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=p2();return Al=n.call(e,t),Al}var Rl,Z5;function yr(){if(Z5)return Rl;Z5=1;var e,t=RN(),n=VN(),r=yN(),s=EN(),i=o4(),a=Us(),o=CN(),l=Function,c=function(P){try{return l('"use strict"; return ('+P+").constructor;")()}catch{}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch{d=null}var h=function(){throw new a},p=d?(function(){try{return arguments.callee,h}catch{try{return d(arguments,"callee").get}catch{return h}}})():h,m=SN()(),g=ZN()(),R=Object.getPrototypeOf||(g?function(P){return P.__proto__}:null),y={},b=typeof Uint8Array>"u"||!R?e:R(Uint8Array),f={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":m&&R?R([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":y,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&R?R(R([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!m||!R?e:R(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":r,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!m||!R?e:R(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&R?R(""[Symbol.iterator]()):e,"%Symbol%":m?Symbol:e,"%SyntaxError%":i,"%ThrowTypeError%":p,"%TypedArray%":b,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":o,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet};if(R)try{null.error}catch(P){var V=R(R(P));f["%Error.prototype%"]=V}var A=function P(ce){var $;if(ce==="%AsyncFunction%")$=c("async function () {}");else if(ce==="%GeneratorFunction%")$=c("function* () {}");else if(ce==="%AsyncGeneratorFunction%")$=c("async function* () {}");else if(ce==="%AsyncGenerator%"){var se=P("%AsyncGeneratorFunction%");se&&($=se.prototype)}else if(ce==="%AsyncIteratorPrototype%"){var ge=P("%AsyncGenerator%");ge&&R&&($=R(ge.prototype))}return f[ce]=$,$},S={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},F=p2(),U=WN(),Z=F.call(Function.call,Array.prototype.concat),v=F.call(Function.apply,Array.prototype.splice),I=F.call(Function.call,String.prototype.replace),N=F.call(Function.call,String.prototype.slice),X=F.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,O=/\\(\\)?/g,K=function(P){var ce=N(P,0,1),$=N(P,-1);if(ce==="%"&&$!=="%")throw new i("invalid intrinsic syntax, expected closing `%`");if($==="%"&&ce!=="%")throw new i("invalid intrinsic syntax, expected opening `%`");var se=[];return I(P,T,function(ge,B,J,H){se[se.length]=J?I(H,O,"$1"):B||ge}),se},q=function(P,ce){var $=P,se;if(U(S,$)&&(se=S[$],$="%"+se[0]+"%"),U(f,$)){var ge=f[$];if(ge===y&&(ge=A($)),typeof ge>"u"&&!ce)throw new a("intrinsic "+P+" exists, but is not available. Please file an issue!");return{alias:se,name:$,value:ge}}throw new i("intrinsic "+P+" does not exist!")};return Rl=function(P,ce){if(typeof P!="string"||P.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ce!="boolean")throw new a('"allowMissing" argument must be a boolean');if(X(/^%?[^%]*%?$/,P)===null)throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $=K(P),se=$.length>0?$[0]:"",ge=q("%"+se+"%",ce),B=ge.name,J=ge.value,H=!1,_=ge.alias;_&&(se=_[0],v($,Z([0,1],_)));for(var ie=1,ae=!0;ie<$.length;ie+=1){var ne=$[ie],j=N(ne,0,1),oe=N(ne,-1);if((j==='"'||j==="'"||j==="`"||oe==='"'||oe==="'"||oe==="`")&&j!==oe)throw new i("property names with quotes must have matching quotes");if((ne==="constructor"||!ae)&&(H=!0),se+="."+ne,B="%"+se+"%",U(f,B))J=f[B];else if(J!=null){if(!(ne in J)){if(!ce)throw new a("base intrinsic for "+P+" exists, but the property is not available.");return}if(d&&ie+1>=$.length){var z=d(J,ne);ae=!!z,ae&&"get"in z&&!("originalValue"in z.get)?J=z.get:J=J[ne]}else ae=U(J,ne),J=J[ne];ae&&!H&&(f[B]=J)}}return J},Rl}var v5={exports:{}},Vl,W5;function m2(){if(W5)return Vl;W5=1;var e=yr(),t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Vl=t,Vl}var yl,I5;function Bs(){if(I5)return yl;I5=1;var e=yr(),t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return yl=t,yl}var El,F5;function IN(){if(F5)return El;F5=1;var e=m2(),t=o4(),n=Us(),r=Bs();return El=function(s,i,a){if(!s||typeof s!="object"&&typeof s!="function")throw new n("`obj` must be an object or a function`");if(typeof i!="string"&&typeof i!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,h=!!r&&r(s,i);if(e)e(s,i,{configurable:c===null&&h?h.configurable:!c,enumerable:o===null&&h?h.enumerable:!o,value:a,writable:l===null&&h?h.writable:!l});else if(d||!o&&!l&&!c)s[i]=a;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},El}var Cl,N5;function FN(){if(N5)return Cl;N5=1;var e=m2(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Cl=t,Cl}var Sl,G5;function NN(){if(G5)return Sl;G5=1;var e=yr(),t=IN(),n=FN()(),r=Bs(),s=Us(),i=e("%Math.floor%");return Sl=function(a,o){if(typeof a!="function")throw new s("`fn` is not a function");if(typeof o!="number"||o<0||o>4294967295||i(o)!==o)throw new s("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],c=!0,d=!0;if("length"in a&&r){var h=r(a,"length");h&&!h.configurable&&(c=!1),h&&!h.writable&&(d=!1)}return(c||d||!l)&&(n?t(a,"length",o,!0,!0):t(a,"length",o)),a},Sl}var X5;function g2(){return X5||(X5=1,(function(e){var t=p2(),n=yr(),r=NN(),s=Us(),i=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(a,i),l=m2(),c=n("%Math.max%");e.exports=function(h){if(typeof h!="function")throw new s("a function is required");var p=o(t,a,arguments);return r(p,1+c(0,h.length-(arguments.length-1)),!0)};var d=function(){return o(t,i,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d})(v5)),v5.exports}var Zl,U5;function f2(){if(U5)return Zl;U5=1;var e=yr(),t=g2(),n=t(e("String.prototype.indexOf"));return Zl=function(r,s){var i=e(r,!!s);return typeof i=="function"&&n(r,".prototype.")>-1?t(i):i},Zl}var vl,B5;function GN(){if(B5)return vl;B5=1;var e=Xs()(),t=f2(),n=t("Object.prototype.toString"),r=function(a){return e&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:n(a)==="[object Arguments]"},s=function(a){return r(a)?!0:a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&n(a)!=="[object Array]"&&n(a.callee)==="[object Function]"},i=(function(){return r(arguments)})();return r.isLegacyArguments=s,vl=i?r:s,vl}var Wl,Y5;function XN(){if(Y5)return Wl;Y5=1;var e=Object.prototype.toString,t=Function.prototype.toString,n=/^\s*(?:function)?\*/,r=Xs()(),s=Object.getPrototypeOf,i=function(){if(!r)return!1;try{return Function("return function*() {}")()}catch{}},a;return Wl=function(o){if(typeof o!="function")return!1;if(n.test(t.call(o)))return!0;if(!r){var l=e.call(o);return l==="[object GeneratorFunction]"}if(!s)return!1;if(typeof a>"u"){var c=i();a=c?s(c):!1}return s(o)===a},Wl}var Il,T5;function UN(){if(T5)return Il;T5=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,n)}catch(f){f!==r&&(t=null)}else t=null;var s=/^\s*class\b/,i=function(f){try{var V=e.call(f);return s.test(V)}catch{return!1}},a=function(f){try{return i(f)?!1:(e.call(f),!0)}catch{return!1}},o=Object.prototype.toString,l="[object Object]",c="[object Function]",d="[object GeneratorFunction]",h="[object HTMLAllCollection]",p="[object HTML document.all class]",m="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,R=!(0 in[,]),y=function(){return!1};if(typeof document=="object"){var b=document.all;o.call(b)===o.call(document.all)&&(y=function(f){if((R||!f)&&(typeof f>"u"||typeof f=="object"))try{var V=o.call(f);return(V===h||V===p||V===m||V===l)&&f("")==null}catch{}return!1})}return Il=t?function(f){if(y(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;try{t(f,null,n)}catch(V){if(V!==r)return!1}return!i(f)&&a(f)}:function(f){if(y(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;if(g)return a(f);if(i(f))return!1;var V=o.call(f);return V!==c&&V!==d&&!/^\[object HTML/.test(V)?!1:a(f)},Il}var Fl,w5;function l4(){if(w5)return Fl;w5=1;var e=UN(),t=Object.prototype.toString,n=Object.prototype.hasOwnProperty,r=function(o,l,c){for(var d=0,h=o.length;d<h;d++)n.call(o,d)&&(c==null?l(o[d],d,o):l.call(c,o[d],d,o))},s=function(o,l,c){for(var d=0,h=o.length;d<h;d++)c==null?l(o.charAt(d),d,o):l.call(c,o.charAt(d),d,o)},i=function(o,l,c){for(var d in o)n.call(o,d)&&(c==null?l(o[d],d,o):l.call(c,o[d],d,o))},a=function(o,l,c){if(!e(l))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=c),t.call(o)==="[object Array]"?r(o,l,d):typeof o=="string"?s(o,l,d):i(o,l,d)};return Fl=a,Fl}var x5,L5;function BN(){return L5||(L5=1,x5=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),x5}var Nl,k5;function c4(){if(k5)return Nl;k5=1;var e=BN(),t=typeof globalThis>"u"?h2:globalThis;return Nl=function(){for(var n=[],r=0;r<e.length;r++)typeof t[e[r]]=="function"&&(n[n.length]=e[r]);return n},Nl}var Gl,J5;function YN(){if(J5)return Gl;J5=1;var e=l4(),t=c4(),n=g2(),r=f2(),s=Bs(),i=r("Object.prototype.toString"),a=Xs()(),o=typeof globalThis>"u"?h2:globalThis,l=t(),c=r("String.prototype.slice"),d=Object.getPrototypeOf,h=r("Array.prototype.indexOf",!0)||function(R,y){for(var b=0;b<R.length;b+=1)if(R[b]===y)return b;return-1},p={__proto__:null};a&&s&&d?e(l,function(R){var y=new o[R];if(Symbol.toStringTag in y){var b=d(y),f=s(b,Symbol.toStringTag);if(!f){var V=d(b);f=s(V,Symbol.toStringTag)}p["$"+R]=n(f.get)}}):e(l,function(R){var y=new o[R],b=y.slice||y.set;b&&(p["$"+R]=n(b))});var m=function(R){var y=!1;return e(p,function(b,f){if(!y)try{"$"+b(R)===f&&(y=c(f,1))}catch{}}),y},g=function(R){var y=!1;return e(p,function(b,f){if(!y)try{b(R),y=c(f,1)}catch{}}),y};return Gl=function(R){if(!R||typeof R!="object")return!1;if(!a){var y=c(i(R),8,-1);return h(l,y)>-1?y:y!=="Object"?!1:g(R)}return s?m(R):null},Gl}var Xl,Q5;function TN(){if(Q5)return Xl;Q5=1;var e=l4(),t=c4(),n=g2(),r=f2(),s=Bs(),i=r("Object.prototype.toString"),a=Xs()(),o=typeof globalThis>"u"?h2:globalThis,l=t(),c=r("String.prototype.slice"),d=Object.getPrototypeOf,h=r("Array.prototype.indexOf",!0)||function(R,y){for(var b=0;b<R.length;b+=1)if(R[b]===y)return b;return-1},p={__proto__:null};a&&s&&d?e(l,function(R){var y=new o[R];if(Symbol.toStringTag in y){var b=d(y),f=s(b,Symbol.toStringTag);if(!f){var V=d(b);f=s(V,Symbol.toStringTag)}p["$"+R]=n(f.get)}}):e(l,function(R){var y=new o[R],b=y.slice||y.set;b&&(p["$"+R]=n(b))});var m=function(R){var y=!1;return e(p,function(b,f){if(!y)try{"$"+b(R)===f&&(y=c(f,1))}catch{}}),y},g=function(R){var y=!1;return e(p,function(b,f){if(!y)try{b(R),y=c(f,1)}catch{}}),y};return Xl=function(R){if(!R||typeof R!="object")return!1;if(!a){var y=c(i(R),8,-1);return h(l,y)>-1?y:y!=="Object"?!1:g(R)}return s?m(R):null},Xl}var Ul,z5;function wN(){if(z5)return Ul;z5=1;var e=TN();return Ul=function(t){return!!e(t)},Ul}var M5;function xN(){return M5||(M5=1,(function(e){var t=GN(),n=XN(),r=YN(),s=wN();function i(w){return w.call.bind(w)}var a=typeof BigInt<"u",o=typeof Symbol<"u",l=i(Object.prototype.toString),c=i(Number.prototype.valueOf),d=i(String.prototype.valueOf),h=i(Boolean.prototype.valueOf);if(a)var p=i(BigInt.prototype.valueOf);if(o)var m=i(Symbol.prototype.valueOf);function g(w,be){if(typeof w!="object")return!1;try{return be(w),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=s;function R(w){return typeof Promise<"u"&&w instanceof Promise||w!==null&&typeof w=="object"&&typeof w.then=="function"&&typeof w.catch=="function"}e.isPromise=R;function y(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(w):s(w)||J(w)}e.isArrayBufferView=y;function b(w){return r(w)==="Uint8Array"}e.isUint8Array=b;function f(w){return r(w)==="Uint8ClampedArray"}e.isUint8ClampedArray=f;function V(w){return r(w)==="Uint16Array"}e.isUint16Array=V;function A(w){return r(w)==="Uint32Array"}e.isUint32Array=A;function S(w){return r(w)==="Int8Array"}e.isInt8Array=S;function F(w){return r(w)==="Int16Array"}e.isInt16Array=F;function U(w){return r(w)==="Int32Array"}e.isInt32Array=U;function Z(w){return r(w)==="Float32Array"}e.isFloat32Array=Z;function v(w){return r(w)==="Float64Array"}e.isFloat64Array=v;function I(w){return r(w)==="BigInt64Array"}e.isBigInt64Array=I;function N(w){return r(w)==="BigUint64Array"}e.isBigUint64Array=N;function X(w){return l(w)==="[object Map]"}X.working=typeof Map<"u"&&X(new Map);function T(w){return typeof Map>"u"?!1:X.working?X(w):w instanceof Map}e.isMap=T;function O(w){return l(w)==="[object Set]"}O.working=typeof Set<"u"&&O(new Set);function K(w){return typeof Set>"u"?!1:O.working?O(w):w instanceof Set}e.isSet=K;function q(w){return l(w)==="[object WeakMap]"}q.working=typeof WeakMap<"u"&&q(new WeakMap);function P(w){return typeof WeakMap>"u"?!1:q.working?q(w):w instanceof WeakMap}e.isWeakMap=P;function ce(w){return l(w)==="[object WeakSet]"}ce.working=typeof WeakSet<"u"&&ce(new WeakSet);function $(w){return ce(w)}e.isWeakSet=$;function se(w){return l(w)==="[object ArrayBuffer]"}se.working=typeof ArrayBuffer<"u"&&se(new ArrayBuffer);function ge(w){return typeof ArrayBuffer>"u"?!1:se.working?se(w):w instanceof ArrayBuffer}e.isArrayBuffer=ge;function B(w){return l(w)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function J(w){return typeof DataView>"u"?!1:B.working?B(w):w instanceof DataView}e.isDataView=J;var H=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function _(w){return l(w)==="[object SharedArrayBuffer]"}function ie(w){return typeof H>"u"?!1:(typeof _.working>"u"&&(_.working=_(new H)),_.working?_(w):w instanceof H)}e.isSharedArrayBuffer=ie;function ae(w){return l(w)==="[object AsyncFunction]"}e.isAsyncFunction=ae;function ne(w){return l(w)==="[object Map Iterator]"}e.isMapIterator=ne;function j(w){return l(w)==="[object Set Iterator]"}e.isSetIterator=j;function oe(w){return l(w)==="[object Generator]"}e.isGeneratorObject=oe;function z(w){return l(w)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=z;function G(w){return g(w,c)}e.isNumberObject=G;function x(w){return g(w,d)}e.isStringObject=x;function L(w){return g(w,h)}e.isBooleanObject=L;function Q(w){return a&&g(w,p)}e.isBigIntObject=Q;function D(w){return o&&g(w,m)}e.isSymbolObject=D;function ee(w){return G(w)||x(w)||L(w)||Q(w)||D(w)}e.isBoxedPrimitive=ee;function re(w){return typeof Uint8Array<"u"&&(ge(w)||ie(w))}e.isAnyArrayBuffer=re,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(w){Object.defineProperty(e,w,{enumerable:!1,value:function(){throw new Error(w+" is not supported in userland")}})})})(n5)),n5}var K5,H5;function LN(){return H5||(H5=1,K5=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),K5}var Bl={exports:{}},O5;function kN(){return O5||(O5=1,typeof Object.create=="function"?Bl.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Bl.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),Bl.exports}var _5;function b2(){return _5||(_5=1,(function(e){var t=Object.getOwnPropertyDescriptors||function(B){for(var J=Object.keys(B),H={},_=0;_<J.length;_++)H[J[_]]=Object.getOwnPropertyDescriptor(B,J[_]);return H},n=/%[sdj%]/g;e.format=function(B){if(!S(B)){for(var J=[],H=0;H<arguments.length;H++)J.push(a(arguments[H]));return J.join(" ")}for(var H=1,_=arguments,ie=_.length,ae=String(B).replace(n,function(oe){if(oe==="%%")return"%";if(H>=ie)return oe;switch(oe){case"%s":return String(_[H++]);case"%d":return Number(_[H++]);case"%j":try{return JSON.stringify(_[H++])}catch{return"[Circular]"}default:return oe}}),ne=_[H];H<ie;ne=_[++H])f(ne)||!v(ne)?ae+=" "+ne:ae+=" "+a(ne);return ae},e.deprecate=function(B,J){if(typeof he<"u"&&he.noDeprecation===!0)return B;if(typeof he>"u")return function(){return e.deprecate(B,J).apply(this,arguments)};var H=!1;function _(){if(!H){if(he.throwDeprecation)throw new Error(J);he.traceDeprecation?console.trace(J):console.error(J),H=!0}return B.apply(this,arguments)}return _};var r={},s=/^$/;if(he.env.NODE_DEBUG){var i=he.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+i+"$","i")}e.debuglog=function(B){if(B=B.toUpperCase(),!r[B])if(s.test(B)){var J=he.pid;r[B]=function(){var H=e.format.apply(e,arguments);console.error("%s %d: %s",B,J,H)}}else r[B]=function(){};return r[B]};function a(B,J){var H={seen:[],stylize:l};return arguments.length>=3&&(H.depth=arguments[2]),arguments.length>=4&&(H.colors=arguments[3]),b(J)?H.showHidden=J:J&&e._extend(H,J),U(H.showHidden)&&(H.showHidden=!1),U(H.depth)&&(H.depth=2),U(H.colors)&&(H.colors=!1),U(H.customInspect)&&(H.customInspect=!0),H.colors&&(H.stylize=o),d(H,B,H.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(B,J){var H=a.styles[J];return H?"\x1B["+a.colors[H][0]+"m"+B+"\x1B["+a.colors[H][1]+"m":B}function l(B,J){return B}function c(B){var J={};return B.forEach(function(H,_){J[H]=!0}),J}function d(B,J,H){if(B.customInspect&&J&&X(J.inspect)&&J.inspect!==e.inspect&&!(J.constructor&&J.constructor.prototype===J)){var _=J.inspect(H,B);return S(_)||(_=d(B,_,H)),_}var ie=h(B,J);if(ie)return ie;var ae=Object.keys(J),ne=c(ae);if(B.showHidden&&(ae=Object.getOwnPropertyNames(J)),N(J)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return p(J);if(ae.length===0){if(X(J)){var j=J.name?": "+J.name:"";return B.stylize("[Function"+j+"]","special")}if(Z(J))return B.stylize(RegExp.prototype.toString.call(J),"regexp");if(I(J))return B.stylize(Date.prototype.toString.call(J),"date");if(N(J))return p(J)}var oe="",z=!1,G=["{","}"];if(y(J)&&(z=!0,G=["[","]"]),X(J)){var x=J.name?": "+J.name:"";oe=" [Function"+x+"]"}if(Z(J)&&(oe=" "+RegExp.prototype.toString.call(J)),I(J)&&(oe=" "+Date.prototype.toUTCString.call(J)),N(J)&&(oe=" "+p(J)),ae.length===0&&(!z||J.length==0))return G[0]+oe+G[1];if(H<0)return Z(J)?B.stylize(RegExp.prototype.toString.call(J),"regexp"):B.stylize("[Object]","special");B.seen.push(J);var L;return z?L=m(B,J,H,ne,ae):L=ae.map(function(Q){return g(B,J,H,ne,Q,z)}),B.seen.pop(),R(L,oe,G)}function h(B,J){if(U(J))return B.stylize("undefined","undefined");if(S(J)){var H="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(H,"string")}if(A(J))return B.stylize(""+J,"number");if(b(J))return B.stylize(""+J,"boolean");if(f(J))return B.stylize("null","null")}function p(B){return"["+Error.prototype.toString.call(B)+"]"}function m(B,J,H,_,ie){for(var ae=[],ne=0,j=J.length;ne<j;++ne)ce(J,String(ne))?ae.push(g(B,J,H,_,String(ne),!0)):ae.push("");return ie.forEach(function(oe){oe.match(/^\d+$/)||ae.push(g(B,J,H,_,oe,!0))}),ae}function g(B,J,H,_,ie,ae){var ne,j,oe;if(oe=Object.getOwnPropertyDescriptor(J,ie)||{value:J[ie]},oe.get?oe.set?j=B.stylize("[Getter/Setter]","special"):j=B.stylize("[Getter]","special"):oe.set&&(j=B.stylize("[Setter]","special")),ce(_,ie)||(ne="["+ie+"]"),j||(B.seen.indexOf(oe.value)<0?(f(H)?j=d(B,oe.value,null):j=d(B,oe.value,H-1),j.indexOf(`
57
57
  `)>-1&&(ae?j=j.split(`
58
58
  `).map(function(z){return" "+z}).join(`
59
59
  `).slice(2):j=`
@@ -62,8 +62,8 @@ view this resource.`}):u.jsx(s1,{}),bp=W.memo(({sdk:e,swipeable:t=!0,onEvent:n=R
62
62
  `))):j=B.stylize("[Circular]","special")),U(ne)){if(ae&&ie.match(/^\d+$/))return j;ne=JSON.stringify(""+ie),ne.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ne=ne.slice(1,-1),ne=B.stylize(ne,"name")):(ne=ne.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ne=B.stylize(ne,"string"))}return ne+": "+j}function R(B,J,H){var _=B.reduce(function(ie,ae){return ae.indexOf(`
63
63
  `)>=0,ie+ae.replace(/\u001b\[\d\d?m/g,"").length+1},0);return _>60?H[0]+(J===""?"":J+`
64
64
  `)+" "+B.join(`,
65
- `)+" "+H[1]:H[0]+J+" "+B.join(", ")+" "+H[1]}e.types=wN();function y(B){return Array.isArray(B)}e.isArray=y;function b(B){return typeof B=="boolean"}e.isBoolean=b;function f(B){return B===null}e.isNull=f;function V(B){return B==null}e.isNullOrUndefined=V;function A(B){return typeof B=="number"}e.isNumber=A;function S(B){return typeof B=="string"}e.isString=S;function F(B){return typeof B=="symbol"}e.isSymbol=F;function U(B){return B===void 0}e.isUndefined=U;function Z(B){return v(B)&&O(B)==="[object RegExp]"}e.isRegExp=Z,e.types.isRegExp=Z;function v(B){return typeof B=="object"&&B!==null}e.isObject=v;function I(B){return v(B)&&O(B)==="[object Date]"}e.isDate=I,e.types.isDate=I;function N(B){return v(B)&&(O(B)==="[object Error]"||B instanceof Error)}e.isError=N,e.types.isNativeError=N;function X(B){return typeof B=="function"}e.isFunction=X;function T(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}e.isPrimitive=T,e.isBuffer=xN();function O(B){return Object.prototype.toString.call(B)}function K(B){return B<10?"0"+B.toString(10):B.toString(10)}var q=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var B=new Date,J=[K(B.getHours()),K(B.getMinutes()),K(B.getSeconds())].join(":");return[B.getDate(),q[B.getMonth()],J].join(" ")}e.log=function(){console.log("%s - %s",P(),e.format.apply(e,arguments))},e.inherits=LN(),e._extend=function(B,J){if(!J||!v(J))return B;for(var H=Object.keys(J),_=H.length;_--;)B[H[_]]=J[H[_]];return B};function ce(B,J){return Object.prototype.hasOwnProperty.call(B,J)}var $=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');if($&&B[$]){var J=B[$];if(typeof J!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(J,$,{value:J,enumerable:!1,writable:!1,configurable:!0}),J}function J(){for(var H,_,ie=new Promise(function(j,oe){H=j,_=oe}),ae=[],ne=0;ne<arguments.length;ne++)ae.push(arguments[ne]);ae.push(function(j,oe){j?_(j):H(oe)});try{B.apply(this,ae)}catch(j){_(j)}return ie}return Object.setPrototypeOf(J,Object.getPrototypeOf(B)),$&&Object.defineProperty(J,$,{value:J,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(J,t(B))},e.promisify.custom=$;function se(B,J){if(!B){var H=new Error("Promise was rejected with a falsy value");H.reason=B,B=H}return J(B)}function ge(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function J(){for(var H=[],_=0;_<arguments.length;_++)H.push(arguments[_]);var ie=H.pop();if(typeof ie!="function")throw new TypeError("The last argument must be of type Function");var ae=this,ne=function(){return ie.apply(ae,arguments)};B.apply(this,H).then(function(j){he.nextTick(ne.bind(null,null,j))},function(j){he.nextTick(se.bind(null,j,ne))})}return Object.setPrototypeOf(J,Object.getPrototypeOf(B)),Object.defineProperties(J,t(B)),J}e.callbackify=ge})(t5)),t5}var Yl,j5;function d4(){if(j5)return Yl;j5=1;const{inherits:e,format:t}=b2();function n(r,s,i=Error){if(!r)throw new Error("Avvio error code must not be empty");if(!s)throw new Error("Avvio base error message must not be empty");function a(o,l,c){if(!new.target)return new a(o,l,c);Error.captureStackTrace(this,a),this.code=r,this.message=s,this.name="AvvioError",o&&l&&c?this.message=t(s,o,l,c):o&&l?this.message=t(s,o,l):o?this.message=t(s,o):this.message=s}return a.prototype[Symbol.toStringTag]="Error",a.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},e(a,i),a}return Yl={createError:n,AVV_ERR_EXPOSE_ALREADY_DEFINED:n("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:n("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:n("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:n("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:n("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:n("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},Yl}var D5,P5;function kN(){return P5||(P5=1,D5=function e(t,n,r){n===void 0&&(n=""),r||(r={});var s=function(l){var c={"│":"|","└":"`","├":"+","─":"-","┬":"-"};return r.unicode===!1?c[l]:l};typeof t=="string"&&(t={label:t});var i=t.nodes||[],a=(t.label||"").split(`
65
+ `)+" "+H[1]:H[0]+J+" "+B.join(", ")+" "+H[1]}e.types=xN();function y(B){return Array.isArray(B)}e.isArray=y;function b(B){return typeof B=="boolean"}e.isBoolean=b;function f(B){return B===null}e.isNull=f;function V(B){return B==null}e.isNullOrUndefined=V;function A(B){return typeof B=="number"}e.isNumber=A;function S(B){return typeof B=="string"}e.isString=S;function F(B){return typeof B=="symbol"}e.isSymbol=F;function U(B){return B===void 0}e.isUndefined=U;function Z(B){return v(B)&&O(B)==="[object RegExp]"}e.isRegExp=Z,e.types.isRegExp=Z;function v(B){return typeof B=="object"&&B!==null}e.isObject=v;function I(B){return v(B)&&O(B)==="[object Date]"}e.isDate=I,e.types.isDate=I;function N(B){return v(B)&&(O(B)==="[object Error]"||B instanceof Error)}e.isError=N,e.types.isNativeError=N;function X(B){return typeof B=="function"}e.isFunction=X;function T(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}e.isPrimitive=T,e.isBuffer=LN();function O(B){return Object.prototype.toString.call(B)}function K(B){return B<10?"0"+B.toString(10):B.toString(10)}var q=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var B=new Date,J=[K(B.getHours()),K(B.getMinutes()),K(B.getSeconds())].join(":");return[B.getDate(),q[B.getMonth()],J].join(" ")}e.log=function(){console.log("%s - %s",P(),e.format.apply(e,arguments))},e.inherits=kN(),e._extend=function(B,J){if(!J||!v(J))return B;for(var H=Object.keys(J),_=H.length;_--;)B[H[_]]=J[H[_]];return B};function ce(B,J){return Object.prototype.hasOwnProperty.call(B,J)}var $=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');if($&&B[$]){var J=B[$];if(typeof J!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(J,$,{value:J,enumerable:!1,writable:!1,configurable:!0}),J}function J(){for(var H,_,ie=new Promise(function(j,oe){H=j,_=oe}),ae=[],ne=0;ne<arguments.length;ne++)ae.push(arguments[ne]);ae.push(function(j,oe){j?_(j):H(oe)});try{B.apply(this,ae)}catch(j){_(j)}return ie}return Object.setPrototypeOf(J,Object.getPrototypeOf(B)),$&&Object.defineProperty(J,$,{value:J,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(J,t(B))},e.promisify.custom=$;function se(B,J){if(!B){var H=new Error("Promise was rejected with a falsy value");H.reason=B,B=H}return J(B)}function ge(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function J(){for(var H=[],_=0;_<arguments.length;_++)H.push(arguments[_]);var ie=H.pop();if(typeof ie!="function")throw new TypeError("The last argument must be of type Function");var ae=this,ne=function(){return ie.apply(ae,arguments)};B.apply(this,H).then(function(j){he.nextTick(ne.bind(null,null,j))},function(j){he.nextTick(se.bind(null,j,ne))})}return Object.setPrototypeOf(J,Object.getPrototypeOf(B)),Object.defineProperties(J,t(B)),J}e.callbackify=ge})(t5)),t5}var Yl,j5;function d4(){if(j5)return Yl;j5=1;const{inherits:e,format:t}=b2();function n(r,s,i=Error){if(!r)throw new Error("Avvio error code must not be empty");if(!s)throw new Error("Avvio base error message must not be empty");function a(o,l,c){if(!new.target)return new a(o,l,c);Error.captureStackTrace(this,a),this.code=r,this.message=s,this.name="AvvioError",o&&l&&c?this.message=t(s,o,l,c):o&&l?this.message=t(s,o,l):o?this.message=t(s,o):this.message=s}return a.prototype[Symbol.toStringTag]="Error",a.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},e(a,i),a}return Yl={createError:n,AVV_ERR_EXPOSE_ALREADY_DEFINED:n("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:n("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:n("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:n("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:n("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:n("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},Yl}var D5,P5;function JN(){return P5||(P5=1,D5=function e(t,n,r){n===void 0&&(n=""),r||(r={});var s=function(l){var c={"│":"|","└":"`","├":"+","─":"-","┬":"-"};return r.unicode===!1?c[l]:l};typeof t=="string"&&(t={label:t});var i=t.nodes||[],a=(t.label||"").split(`
66
66
  `),o=`
67
67
  `+n+(i.length?s("│"):" ")+" ";return n+a.join(o)+`
68
- `+i.map(function(l,c){var d=c===i.length-1,h=l.nodes&&l.nodes.length,p=n+(d?" ":s("│"))+" ";return n+s(d?"└":"├")+s("─")+s(h?"┬":"─")+" "+e(l,p,r).slice(n.length+2)}).join("")}),D5}var Tl,$5;function JN(){if($5)return Tl;$5=1;const e=kN(),t=Symbol("avvio.TimeTree.untrackNode"),n=Symbol("avvio.TimeTree.trackNode"),r=Symbol("avvio.TimeTree.getParent"),s=Symbol("avvio.TimeTree.getNode"),i=Symbol("avvio.TimeTree.addNode");class a{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[n](l){this.tableId.set(l.id,l),this.tableLabel.has(l.label)?this.tableLabel.get(l.label).push(l):this.tableLabel.set(l.label,[l])}[t](l){this.tableId.delete(l.id);const c=this.tableLabel.get(l.label);if(c.id){this.tableLabel.delete(l.label);return}c.pop(),c.length===0&&this.tableLabel.delete(l.label)}[r](l){if(l===null)return this.root;const c=this.tableLabel.get(l);return c.id?c:c[c.length-1]}[s](l){return this.tableId.get(l)}[i](l,c,d){if(l===null)return this.root={id:"root",label:c,start:d,nodes:[]},this[n](this.root),this.root.id;const h=this[r](l),p=`${c}-${Math.random()}`,m={id:p,parent:l,start:d,label:c,nodes:[]};return h.nodes.push(m),this[n](m),p}start(l,c,d=Date.now()){return this[i](l,c,d)}stop(l,c=Date.now()){const d=this[s](l);d&&(d.stop=c,d.diff=d.stop-d.start||0,this[t](d))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const l=d=>(d.label=`${d.label} ${d.diff} ms`,d.nodes.length>0&&(d.nodes=d.nodes.map(h=>l(h))),d),c=l(this.toJSON());return e(c)}}return Tl=a,Tl}var kr={exports:{}},wl={exports:{}},xl,q5;function QN(){if(q5)return xl;q5=1;var e=1e3,t=e*60,n=t*60,r=n*24,s=r*7,i=r*365.25;xl=function(d,h){h=h||{};var p=typeof d;if(p==="string"&&d.length>0)return a(d);if(p==="number"&&isFinite(d))return h.long?l(d):o(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function a(d){if(d=String(d),!(d.length>100)){var h=/^(-?(?:\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(h){var p=parseFloat(h[1]),m=(h[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*s;case"days":case"day":case"d":return p*r;case"hours":case"hour":case"hrs":case"hr":case"h":return p*n;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function o(d){var h=Math.abs(d);return h>=r?Math.round(d/r)+"d":h>=n?Math.round(d/n)+"h":h>=t?Math.round(d/t)+"m":h>=e?Math.round(d/e)+"s":d+"ms"}function l(d){var h=Math.abs(d);return h>=r?c(d,h,r,"day"):h>=n?c(d,h,n,"hour"):h>=t?c(d,h,t,"minute"):h>=e?c(d,h,e,"second"):d+" ms"}function c(d,h,p,m){var g=h>=p*1.5;return Math.round(d/p)+" "+m+(g?"s":"")}return xl}var Ll,e9;function zN(){if(e9)return Ll;e9=1;function e(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=l,r.humanize=QN(),r.destroy=d,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function n(h){let p=0;for(let m=0;m<h.length;m++)p=(p<<5)-p+h.charCodeAt(m),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=n;function r(h){let p,m=null,g,R;function y(...b){if(!y.enabled)return;const f=y,V=Number(new Date),A=V-(p||V);f.diff=A,f.prev=p,f.curr=V,p=V,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let S=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(F,U)=>{if(F==="%%")return"%";S++;const Z=r.formatters[U];if(typeof Z=="function"){const v=b[S];F=Z.call(f,v),b.splice(S,1),S--}return F}),r.formatArgs.call(f,b),(f.log||r.log).apply(f,b)}return y.namespace=h,y.useColors=r.useColors(),y.color=r.selectColor(h),y.extend=s,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(g!==r.namespaces&&(g=r.namespaces,R=r.enabled(h)),R),set:b=>{m=b}}),typeof r.init=="function"&&r.init(y),y}function s(h,p){const m=r(this.namespace+(typeof p>"u"?":":p)+h);return m.log=this.log,m}function i(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];const p=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const m of p)m[0]==="-"?r.skips.push(m.slice(1)):r.names.push(m)}function a(h,p){let m=0,g=0,R=-1,y=0;for(;m<h.length;)if(g<p.length&&(p[g]===h[m]||p[g]==="*"))p[g]==="*"?(R=g,y=m,g++):(m++,g++);else if(R!==-1)g=R+1,y++,m=y;else return!1;for(;g<p.length&&p[g]==="*";)g++;return g===p.length}function o(){const h=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),h}function l(h){for(const p of r.skips)if(a(h,p))return!1;for(const p of r.names)if(a(h,p))return!0;return!1}function c(h){return h instanceof Error?h.stack||h.message:h}function d(){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 r.enable(r.load()),r}return Ll=e,Ll}var t9;function u4(){return t9||(t9=1,(function(e,t){t.formatArgs=r,t.save=s,t.load=i,t.useColors=n,t.storage=a(),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(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return 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&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(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,h=0;l[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(d++,p==="%c"&&(h=d))}),l.splice(h,0,c)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function i(){let l;try{l=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!l&&typeof he<"u"&&"env"in he&&(l=he.env.DEBUG),l}function a(){try{return localStorage}catch{}}e.exports=zN()(t);const{formatters:o}=e.exports;o.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(wl,wl.exports)),wl.exports}var n9;function MN(){if(n9)return kr.exports;n9=1;const e=s4(),t=i4().EventEmitter,n=b2().inherits,r=u4()("avvio"),{AVV_ERR_READY_TIMEOUT:s}=d4(),i=Symbol.for("plugin-meta");function a(p,m){return p[i]&&p[i].name?p[i].name:typeof m<"u"&&typeof m!="function"&&m.name?m.name:p.name?p.name:p.toString().split(`
69
- `).slice(0,2).map(g=>g.trim()).join(" -- ")}function o(){const p={};return p.promise=new Promise((m,g)=>{p.resolve=m,p.reject=g}),p}function l(p,m,g,R,y){this.started=!1,this.func=m,this.opts=g,this.onFinish=null,this.parent=p,this.timeout=y===void 0?p._timeout:y,this.name=a(m,g),this.isAfter=R,this.q=e(p,c,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}n(l,t),l.prototype.exec=function(p,m){const g=this.func;let R=!1;const y=this.name;if(this.parent._error&&!this.isAfter){r("skipping loading of plugin as parent errored and it is not an after",y),he.nextTick(m);return}if(this.isAfter)this.server=p;else try{this.server=this.parent.override(p,g,this.opts)}catch(A){return r("override errored",y),m(A)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,r("exec",y);let b;const f=A=>{if(R){r("loading complete",y);return}this._error=A,r(A?"exec errored":"exec completed",y),R=!0,b&&clearTimeout(b),m(A)};this.timeout>0&&(r("setting up timeout",y,this.timeout),b=setTimeout(function(){r("timed out",y),b=null;const A=new s(y);A.fn=g,f(A)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const V=g(this.server,this.opts,f);V&&typeof V.then=="function"&&(r("exec: resolving promise",y),V.then(()=>he.nextTick(f),A=>he.nextTick(f,A)))},l.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const p=()=>{this.server.after((g,R)=>{this._error=g,this.q.pause(),g?(r("rejecting promise",this.name,g),this._promise.reject(g)):(r("resolving promise",this.name),this._promise.resolve()),this._promise=null,he.nextTick(R,g)}),this.q.resume()};let m;return this._promise?m=Promise.resolve():(this._promise=o(),m=this._promise.promise,this.server?p():this.on("start",p)),m},l.prototype.enqueue=function(p,m){r("enqueue",this.name,p.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(p,m)},l.prototype.finish=function(p,m){r("finish",this.name,p);const g=()=>{this.loaded||(r("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,m(p))};if(p){this._promise&&(this._promise.reject(p),this._promise=null),g();return}const R=()=>{if(r("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const y=()=>{r("wrap"),queueMicrotask(R)};this._promise.resolve(),this._promise.promise.then(y,y),this._promise=null}else g();else r("delayed",this.name),this.q.drain=()=>{r("drain",this.name),this.q.drain=h,queueMicrotask(R)}};queueMicrotask(R),this.q.resume()};function c(p,m){const g=this;he.nextTick(d.bind(g),p,m)}function d(p,m){if(typeof p.func.then=="function"){p.func.then(R=>{typeof R.default=="function"&&(R=R.default),p.func=R,d.call(this,p,m)},m);return}const g=this._current[0];this._current.unshift(p),p.exec(g&&g.server||this._server,R=>{p.finish(R,y=>{this._current.shift(),m(y)})})}function h(){}return kr.exports=l,kr.exports.loadPlugin=d,kr.exports}var r9;function KN(){if(r9)return wr.exports;r9=1;const e=s4(),t=i4().EventEmitter,n=b2().inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:r,AVV_ERR_CALLBACK_NOT_FN:s,AVV_ERR_PLUGIN_NOT_VALID:i,AVV_ERR_ROOT_PLG_BOOTED:a,AVV_ERR_READY_TIMEOUT:o}=d4(),l=JN(),c=MN(),d=u4()("avvio"),h=Symbol("kAvvio"),p=Symbol("kThenifyDoNotWrap");function m(Z,v,I){const N=v.expose||{},X=N.use||"use",T=N.after||"after",O=N.ready||"ready",K=N.onClose||"onClose",q=N.close||"close";if(Z[X])throw new r(X);if(Z[T])throw new r(T);if(Z[O])throw new r(O);Z[X]=function(P,ce){return I.use(P,ce),this},Object.defineProperty(Z,"then",{get:f.bind(I)}),Z[h]=!0,Z[T]=function(P){return typeof P!="function"?I._loadRegistered():(I.after(U(P,this)),this)},Z[O]=function(P){if(P&&typeof P!="function")throw new s(O,typeof P);return I.ready(P?U(P,this):void 0)},Z[K]=function(P){if(typeof P!="function")throw new s(K,typeof P);return I.onClose(F(P,this)),this},Z[q]=function(P){if(P&&typeof P!="function")throw new s(q,typeof P);return P?(I.close(U(P,this)),this):I.close()}}function g(Z,v,I){if(typeof Z=="function"&&arguments.length===1&&(I=Z,v={},Z=null),typeof v=="function"&&(I=v,v={}),v=v||{},!(this instanceof g)){const N=new g(Z,v,I);return Z&&m(Z,v,N),N}v.autostart!==!1&&(v.autostart=!0),Z=Z||this,this._timeout=Number(v.timeout)||0,this._server=Z,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),I&&this.once("start",I),this.started=!1,this.booted=!1,this.pluginTree=new l,this._readyQ=e(this,V,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=b},this._closeQ=e(this,S,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=b},this._doStart=null,this._root=new c(this,R.bind(this),v,!1,0),this._root.once("start",(N,X,T)=>{const O=this.pluginTree.start(null,X,T);this._root.once("loaded",(K,q,P)=>{this.pluginTree.stop(O,P)})}),c.loadPlugin.call(this,this._root,N=>{d("root plugin ready");try{this.emit("preReady"),this._root=null}catch(X){N=N||this._error||X}if(N){if(this._error=N,this._readyQ.length()===0)throw N}else this.booted=!0;this._readyQ.resume()})}function R(Z,v,I){this._doStart=I,v.autostart&&this.start()}n(g,t),g.prototype.start=function(){return this.started=!0,he.nextTick(this._doStart),this},g.prototype.override=function(Z,v,I){return Z};function y(Z){if(Z&&typeof Z=="object"&&typeof Z.default=="function"&&(Z=Z.default),!(Z&&(typeof Z=="function"||typeof Z.then=="function")))throw new i(typeof Z);return Z}g.prototype[h]=!0,g.prototype.use=function(Z,v){return this._lastUsed=this._addPlugin(Z,v,!1),this},g.prototype._loadRegistered=function(){const Z=this._current[0];return!this.started&&!this.booted&&he.nextTick(()=>this._root.q.resume()),Z?Z.loadedSoFar():Promise.resolve()},Object.defineProperty(g.prototype,"then",{get:f}),g.prototype._addPlugin=function(Z,v,I){if(Z=y(Z),v=v||{},this.booted)throw new a;const N=this._current[0],X=new c(this,Z,v,I);if(X.once("start",(T,O,K)=>{const q=this.pluginTree.start(N.name,O,K);X.once("loaded",(P,ce,$)=>{this.pluginTree.stop(q,$)})}),N.loaded)throw new Error(X.name,N.name);return N.enqueue(X,T=>{T&&(this._error=T)}),X},g.prototype.after=function(Z){if(!Z)return this._loadRegistered();this._addPlugin(v.bind(this),{},!0);function v(I,N,X){V.call(this,Z,X)}return this},g.prototype.onClose=function(Z){if(typeof Z!="function")throw new Error("not a function");Z[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(Z,v.bind(this));function v(I){I&&(this._error=I)}return this},g.prototype.close=function(Z){let v;if(Z){if(typeof Z!="function")throw new s("close",typeof Z)}else v=new Promise(function(I,N){Z=function(X){if(X)return N(X);I()}});return this.ready(()=>{this._error=null,this._closeQ.push(Z),he.nextTick(this._closeQ.resume.bind(this._closeQ))}),v},g.prototype.ready=function(Z){if(Z){if(typeof Z!="function")throw new s("ready",typeof Z);this._readyQ.push(Z),queueMicrotask(this.start.bind(this));return}return new Promise((v,I)=>{this._readyQ.push(X),this.start();const N=this._current[0].server;function X(T,O,K){T?I(T):v(N),he.nextTick(K)}})},g.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()},g.prototype.toJSON=function(){return this.pluginTree.toJSON()};function b(){}function f(){if(this.booted){d("thenify returning null because we are already booted");return}if(this[p]){this[p]=!1;return}return d("thenify"),(Z,v)=>this._loadRegistered().then(()=>(this[p]=!0,Z(this._server)),v)}function V(Z,v){const I=this._server,N=this._error;let X;if(this._error=null,Z.length===0)this._error=N,X=Z(),X&&!X[h]&&typeof X.then=="function"?X.then(()=>he.nextTick(v),T=>he.nextTick(v,T)):he.nextTick(v);else if(Z.length===1)X=Z(N),X&&!X[h]&&typeof X.then=="function"?X.then(()=>he.nextTick(v),T=>he.nextTick(v,T)):he.nextTick(v);else if(this._timeout===0){const T=O=>{this._error=O,v(this._error)};Z.length===2?Z(N,T):Z(N,I,T)}else A.call(this,Z,N,I,v)}function A(Z,v,I,N){const X=Z.name;d("setting up ready timeout",X,this._timeout);let T=setTimeout(()=>{d("timed out",X),T=null;const K=new o(X);K.fn=Z,this._error=K,N(K)},this._timeout);Z.length===2?Z(v,O.bind(this)):Z(v,I,O.bind(this));function O(K){T&&(clearTimeout(T),this._error=K,N(this._error))}}function S(Z,v){const I=this._server,N=Z[this._isOnCloseHandlerKey];if(Z.length===0||Z.length===1){let X;N?X=Z(I):X=Z(this._error),X&&typeof X.then=="function"?(d("resolving close/onClose promise"),X.then(()=>he.nextTick(v),T=>he.nextTick(v,T))):he.nextTick(v)}else Z.length===2?Z(N?I:this._error,v):N?Z(I,v):Z(this._error,I,v)}function F(Z,v){return I.bind(v);function I(N,X){let T;Z.length===0?(T=Z(),T&&T.then?T.then(function(){he.nextTick(X)},X):he.nextTick(X)):Z.length===1?(T=Z(this),T&&T.then?T.then(function(){he.nextTick(X)},X):he.nextTick(X)):Z(this,X)}}function U(Z,v){return I.bind(v);function I(N,X){let T;Z?Z.length===0?(T=Z(),T&&T.then?T.then(function(){he.nextTick(X,N)},X):he.nextTick(X,N)):Z.length===1?(T=Z(N),T&&T.then?T.then(function(){he.nextTick(X)},X):he.nextTick(X)):Z.length===2?Z(N,X):Z(N,this,X):he.nextTick(X)}}return wr.exports=g,wr.exports.express=function(Z){return g(Z,{expose:{use:"load"}})},wr.exports}var HN=KN();const ON=r4(HN);(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(r){const s=n?window.performance.now():new Date().getTime(),i=Math.max(0,16-(s-t)),a=window.setTimeout(function(){r(s+i)},i);return t=s+i,a},window.cancelAnimationFrame=clearTimeout}})();function _N(e,t=!0,n=!0,r={friendsTab:"enabled"}){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",i=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",a=ON(Object.create({}),{autostart:!1});return a.use(EF,{hideFriends:r.hideFriends,skipOnboarding:r.skipOnboarding,betPack:r.betPack,friendsTab:r.friendsTab,theme:r.theme,themeMode:r.themeMode}),a.use(gF,{onDeepLinkHandled:r?.onDeepLinkHandled}),a.use(RF,{videoPlayerController:r?.videoPlayerController}),a.use(yF,{onContentActivate:r?.onContentActivate,withAd:r?.withAd,withAdNotification:r?.withAdNotification}),a.use(YI,{sdkKey:e,host:s,analyticsHost:i,version:r?.version,webOS:r?.webOS}),a.use(kI),a.use(AF),r?.gamification!==!1&&(a.use(UF),a.use(lF),a.use(wF)),a.use(fN),a.use(iN),a.after((o,l,c)=>{if(o)throw o;l.ready(),c()}),n&&a.after(async(o,l,c)=>{if(o)throw o;await l.sdk.initializeApp(),c()}),a.onClose(()=>{console.log("close StreamLayer instance")}),a}function jN(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h4={exports:{}},xe=h4.exports={},St,Zt;function m1(){throw new Error("setTimeout has not been defined")}function g1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?St=setTimeout:St=m1}catch{St=m1}try{typeof clearTimeout=="function"?Zt=clearTimeout:Zt=g1}catch{Zt=g1}})();function p4(e){if(St===setTimeout)return setTimeout(e,0);if((St===m1||!St)&&setTimeout)return St=setTimeout,setTimeout(e,0);try{return St(e,0)}catch{try{return St.call(null,e,0)}catch{return St.call(this,e,0)}}}function DN(e){if(Zt===clearTimeout)return clearTimeout(e);if((Zt===g1||!Zt)&&clearTimeout)return Zt=clearTimeout,clearTimeout(e);try{return Zt(e)}catch{try{return Zt.call(null,e)}catch{return Zt.call(this,e)}}}var Kt=[],Yn=!1,pn,$r=-1;function PN(){!Yn||!pn||(Yn=!1,pn.length?Kt=pn.concat(Kt):$r=-1,Kt.length&&m4())}function m4(){if(!Yn){var e=p4(PN);Yn=!0;for(var t=Kt.length;t;){for(pn=Kt,Kt=[];++$r<t;)pn&&pn[$r].run();$r=-1,t=Kt.length}pn=null,Yn=!1,DN(e)}}xe.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Kt.push(new g4(e,t)),Kt.length===1&&!Yn&&p4(m4)};function g4(e,t){this.fun=e,this.array=t}g4.prototype.run=function(){this.fun.apply(null,this.array)};xe.title="browser";xe.browser=!0;xe.env={};xe.argv=[];xe.version="";xe.versions={};function _t(){}xe.on=_t;xe.addListener=_t;xe.once=_t;xe.off=_t;xe.removeListener=_t;xe.removeAllListeners=_t;xe.emit=_t;xe.prependListener=_t;xe.prependOnceListener=_t;xe.listeners=function(e){return[]};xe.binding=function(e){throw new Error("process.binding is not supported")};xe.cwd=function(){return"/"};xe.chdir=function(e){throw new Error("process.chdir is not supported")};xe.umask=function(){return 0};var $N=h4.exports;const qN=jN($N),eG=({sdkKey:e,plugins:t,production:n,autoEnable:r,onDeepLinkHandled:s,videoPlayerController:i,onContentActivate:a,hideFriends:o,skipOnboarding:l,withAdNotification:c,withAd:d,friendsTab:h,betPack:p,webOS:m,gamification:g})=>{const[R,y]=W.useState(null);return W.useEffect(()=>{let b=!1;if(!e)return console.error("streamlayer sdk key should be provided"),y(V=>(V!==null&&typeof V.disableApp=="function"&&V.disableApp(),null)),()=>{b=!0};const f=_N(e,n,r,{version:qN.env.APP_VERSION,onDeepLinkHandled:s,videoPlayerController:i,onContentActivate:a,skipOnboarding:l,withAdNotification:c,withAd:d,hideFriends:o,friendsTab:h,betPack:p,webOS:m,gamification:g});if(t)for(const V of t)f.use(V);return f.ready().then(V=>{b||y(V.sdk)}).catch(V=>console.log(V)),()=>{b=!0,f.close(function(V){if(V)throw V})}},[e,n]),R},A2=({event:e,internal:t})=>{const n=Er(),r=nG();return W.useEffect(()=>{n&&(e&&(n.createEventSession(e,t),r&&(r.current=e)),!e&&r?.current&&(n.createEventSession("",t),r.current=""))},[e,t,r,n]),null};var f4=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(f4||{});const tG={status:0,sdk:null},Ys=W.createContext(tG),b4=({sdkKey:e,theme:t,themeMode:n,plugins:r,children:s,event:i,production:a=!0,autoEnable:o=!0,withAdNotification:l,withAd:c=!0,betPack:d=!1,hideFriends:h,skipOnboarding:p,friendsTab:m="enabled",onDeepLinkHandled:g,videoPlayerController:R,onContentActivate:y,containerId:b,webOS:f,gamification:V})=>{const A=eG({sdkKey:e,plugins:r,production:a,autoEnable:o,onDeepLinkHandled:g,videoPlayerController:R,onContentActivate:y,hideFriends:h,skipOnboarding:p,withAdNotification:l,withAd:c,friendsTab:m,betPack:d,webOS:f,gamification:V}),S=W.useRef(""),F=W.useMemo(()=>A?{sdk:A,status:2,event:S}:{status:1,sdk:null,event:S},[A]);return W.useEffect(()=>{A&&(A.options.setKey("friendsTab",m),A.options.setKey("theme",t),A.options.setKey("themeMode",n),A.options.setKey("skipOnboarding",p),A.options.setKey("betPack",d),A.options.setKey("containerId",b))},[A,m,t,n,p,d,b]),W.useEffect(()=>()=>{g&&A?.removeDeepLinkHandler(g),R&&A?.removeVideoPlayerController(R)},[A]),W.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!e,onDeepLinkHandled:!!g,videoPlayerController:!!R})},[e,g,R]),u.jsxs(Ys.Provider,{value:F,children:[i!==void 0&&u.jsx(A2,{event:i}),s]})},Er=()=>{const{sdk:e}=W.useContext(Ys);return e},nG=()=>{const{event:e}=W.useContext(Ys);return e},rG=({sdkKey:e,plugins:t,children:n,event:r,onDeepLinkHandled:s,videoPlayerController:i,production:a=!0})=>u.jsxs(b4,{sdkKey:e,plugins:t,production:a,autoEnable:!0,onDeepLinkHandled:s,videoPlayerController:i,friendsTab:"disabled",skipOnboarding:!0,hideFriends:!0,children:[u.jsx(A2,{event:r}),n]}),sG=({sdk:e,className:t})=>{const[,n]=s6(e);return u.jsx(FS,{className:t,feature:n,sdk:e})},iG=({sdk:e,className:t,appNode:n,responsiveStore:r,useContainer:s})=>{const i=Ge(e.featuresList.getStore());return i?Array.from(i,a=>{const o=e.getFeature(a);return o?u.jsx(NS,{useContainer:s,responsiveStore:r,className:t,appNode:n,feature:o,sdk:e},a):null}):null},aG=e=>{const t=W.useRef(null);return oh(t,{enabled:!0,event:"click",listener:ah}),u.jsx(Fy,{ref:t,...e})},oG=({sdk:e,useContainer:t})=>{const n=W.useRef(null),r=Ge(e.status),s=Ge(e.sdkStore.slStreamId),i=W.useRef(null),[a]=BW(n),[o,l]=P4(n,a,t),c=r==="ready"&&!!s.data;return W.useEffect(()=>{window.requestAnimationFrame(()=>{e.initializeApp().then(()=>{e.openFeature(pe.GAMES)})})},[e]),oh(n,{enabled:!0,event:"click",listener:ah}),W.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature.js"))},[]),u.jsxs(N4,{className:je("SDKContainer",!t&&G4),ref:n,children:[u.jsx(YS,{className:je(Mr),ref:i}),u.jsxs(X4,{className:"sl-hide-on-modal",ref:o,children:[c&&u.jsx(UW,{sdk:e,scrollNode:o,headerNode:i,appNode:n,scrollStore:l,responsiveStore:a,useContainer:t}),c&&u.jsx(sG,{className:Mr,sdk:e}),c&&u.jsx(iG,{responsiveStore:a,appNode:n,className:Mr,sdk:e,useContainer:t})]})]})},lG=({sdk:e,betPack:t,useContainer:n})=>{const[r,s]=W.useState(t),i=!!Ge(e.userId()),a=W.useMemo(()=>({sdk:e}),[e]),o=W.useCallback(()=>{s(!1),e?.getFeature(pe.GAMES)?.closeQuestion()},[e]);return u.jsxs(Vp.Provider,{value:a,children:[r&&i&&u.jsx(aG,{sdk:e,onEvent:({type:l})=>l==="slOpenGameCenter"?o():()=>{},close:()=>o()}),!r&&u.jsx(oG,{sdk:e,useContainer:n})]})},cG=E("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),dG=E("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),uG=()=>le,hG=E(uG())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),pG=E("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),mG=E("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),gG=E("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),fG=({points:e,onClick:t})=>u.jsxs(cG,{className:Mr,onClick:t,children:[u.jsx(dG,{children:u.jsx(hG,{name:"icon-trophy-solid"})}),u.jsxs(pG,{children:[u.jsx(mG,{children:"Total points"}),u.jsx(gG,{children:u.jsx(vs,{value:e})})]})]}),bG=({gamification:e})=>{const t=e.userSummary.$store,[n,r]=W.useState(0);W.useEffect(()=>{const i=t.subscribe(a=>{a?.summary?.points&&r(a.summary.points)});return()=>{i()}},[t]);const s=W.useCallback(()=>{xn.emit("interactions",{action:"tap",payload:{}})},[]);return u.jsx(fG,{onClick:s,points:n})},AG=({sdk:e})=>{if(!Ge(e.featuresList.getStore()))return null;const t=e.getFeature(pe.GAMES);return t?u.jsx(bG,{gamification:t}):null};var wt;(function(e){e.SCHEMA="schema",e.EXTERNAL_TOKEN="eToken",e.TOKEN="token"})(wt||(wt={}));class RG extends wS{constructor(){super("user")}setSchema=t=>{this.write(wt.SCHEMA,t)};getSchema=()=>this.read(wt.SCHEMA);setToken=t=>{this.write(wt.TOKEN,t)};getToken=()=>this.read(wt.TOKEN);setExternalToken=t=>{this.write(wt.EXTERNAL_TOKEN,t)};getExternalToken=()=>this.read(wt.EXTERNAL_TOKEN);removeToken=()=>{this.remove(wt.TOKEN)}}const s9=e=>{const t=e.target;t instanceof Element&&t.getAttribute("data-a")==="intr"&&xn.emit("interactions",{action:"tap",payload:{}})},VG=()=>{const e=Er();return W.useEffect(()=>(document?.addEventListener("click",s9),()=>{document?.removeEventListener("click",s9)}),[]),e?u.jsx(bp,{sdk:e}):null},yG=({betPack:e,useContainer:t})=>{const{sdk:n,status:r}=W.useContext(Ys);return r===f4.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),null):n?u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(l2,{style:{height:"100%"},children:u.jsx(lG,{sdk:n,betPack:e,useContainer:t})})}):null};class EG extends W.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(yG,{...this.props})}}const CG=({token:e,schema:t})=>{const n=Er();return W.useEffect(()=>{e&&t&&n&&n.authorizationBypass(t,e),n&&(n.withAuth=!0)},[e,t,n]),null},SG=({event:e,sdkKey:t,token:n,deviceId:r,production:s=!1,theme:i,themeMode:a="light",children:o})=>{const[l,c]=W.useState(!1);return W.useEffect(()=>{n&&(new RG().setToken(n),c(!0))},[n]),W.useEffect(()=>{r&&localStorage.setItem("sl-device-id",r)},[r]),l?u.jsxs(b4,{sdkKey:t,production:s,theme:i,themeMode:a,betPack:!0,friendsTab:"disabled",hideFriends:!0,skipOnboarding:!0,autoEnable:!0,children:[u.jsx(A2,{event:e,internal:!1}),u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(l2,{children:o})})]}):null},ZG=({production:e})=>{const[t,n]=W.useState();return W.useEffect(()=>{const{hostname:r,search:s}=window.location,i=new URLSearchParams(s);n({sdkKey:i.get("_slrk")||"",event:i.get("_slre")||"",token:i.get("_slrt")||"",deviceId:i.get("_slrd")||"",theme:i.get("theme")||"",themeMode:i.get("themeMode")==="dark"?"dark":"light",production:e??!(r.includes("next.")||r==="localhost")})},[e]),t?u.jsx(SG,{...t,children:u.jsx(VG,{})}):null},vG=()=>{const e=Er();return e?u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(l2,{children:u.jsx(AG,{sdk:e})})}):null};exports.BetPackStandalone=ZG;exports.C=ZS;exports.MastersStreamLayerSDKReact=EG;exports.S=rG;exports.StreamLayerLogin=CG;exports.StreamLayerSDKPoints=vG;exports.Y=Er;exports.ta=r4;
68
+ `+i.map(function(l,c){var d=c===i.length-1,h=l.nodes&&l.nodes.length,p=n+(d?" ":s("│"))+" ";return n+s(d?"└":"├")+s("─")+s(h?"┬":"─")+" "+e(l,p,r).slice(n.length+2)}).join("")}),D5}var Tl,$5;function QN(){if($5)return Tl;$5=1;const e=JN(),t=Symbol("avvio.TimeTree.untrackNode"),n=Symbol("avvio.TimeTree.trackNode"),r=Symbol("avvio.TimeTree.getParent"),s=Symbol("avvio.TimeTree.getNode"),i=Symbol("avvio.TimeTree.addNode");class a{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[n](l){this.tableId.set(l.id,l),this.tableLabel.has(l.label)?this.tableLabel.get(l.label).push(l):this.tableLabel.set(l.label,[l])}[t](l){this.tableId.delete(l.id);const c=this.tableLabel.get(l.label);if(c.id){this.tableLabel.delete(l.label);return}c.pop(),c.length===0&&this.tableLabel.delete(l.label)}[r](l){if(l===null)return this.root;const c=this.tableLabel.get(l);return c.id?c:c[c.length-1]}[s](l){return this.tableId.get(l)}[i](l,c,d){if(l===null)return this.root={id:"root",label:c,start:d,nodes:[]},this[n](this.root),this.root.id;const h=this[r](l),p=`${c}-${Math.random()}`,m={id:p,parent:l,start:d,label:c,nodes:[]};return h.nodes.push(m),this[n](m),p}start(l,c,d=Date.now()){return this[i](l,c,d)}stop(l,c=Date.now()){const d=this[s](l);d&&(d.stop=c,d.diff=d.stop-d.start||0,this[t](d))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const l=d=>(d.label=`${d.label} ${d.diff} ms`,d.nodes.length>0&&(d.nodes=d.nodes.map(h=>l(h))),d),c=l(this.toJSON());return e(c)}}return Tl=a,Tl}var kr={exports:{}},wl={exports:{}},xl,q5;function zN(){if(q5)return xl;q5=1;var e=1e3,t=e*60,n=t*60,r=n*24,s=r*7,i=r*365.25;xl=function(d,h){h=h||{};var p=typeof d;if(p==="string"&&d.length>0)return a(d);if(p==="number"&&isFinite(d))return h.long?l(d):o(d);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(d))};function a(d){if(d=String(d),!(d.length>100)){var h=/^(-?(?:\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(h){var p=parseFloat(h[1]),m=(h[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*s;case"days":case"day":case"d":return p*r;case"hours":case"hour":case"hrs":case"hr":case"h":return p*n;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function o(d){var h=Math.abs(d);return h>=r?Math.round(d/r)+"d":h>=n?Math.round(d/n)+"h":h>=t?Math.round(d/t)+"m":h>=e?Math.round(d/e)+"s":d+"ms"}function l(d){var h=Math.abs(d);return h>=r?c(d,h,r,"day"):h>=n?c(d,h,n,"hour"):h>=t?c(d,h,t,"minute"):h>=e?c(d,h,e,"second"):d+" ms"}function c(d,h,p,m){var g=h>=p*1.5;return Math.round(d/p)+" "+m+(g?"s":"")}return xl}var Ll,e9;function MN(){if(e9)return Ll;e9=1;function e(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=l,r.humanize=zN(),r.destroy=d,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function n(h){let p=0;for(let m=0;m<h.length;m++)p=(p<<5)-p+h.charCodeAt(m),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=n;function r(h){let p,m=null,g,R;function y(...b){if(!y.enabled)return;const f=y,V=Number(new Date),A=V-(p||V);f.diff=A,f.prev=p,f.curr=V,p=V,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let S=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(F,U)=>{if(F==="%%")return"%";S++;const Z=r.formatters[U];if(typeof Z=="function"){const v=b[S];F=Z.call(f,v),b.splice(S,1),S--}return F}),r.formatArgs.call(f,b),(f.log||r.log).apply(f,b)}return y.namespace=h,y.useColors=r.useColors(),y.color=r.selectColor(h),y.extend=s,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(g!==r.namespaces&&(g=r.namespaces,R=r.enabled(h)),R),set:b=>{m=b}}),typeof r.init=="function"&&r.init(y),y}function s(h,p){const m=r(this.namespace+(typeof p>"u"?":":p)+h);return m.log=this.log,m}function i(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];const p=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const m of p)m[0]==="-"?r.skips.push(m.slice(1)):r.names.push(m)}function a(h,p){let m=0,g=0,R=-1,y=0;for(;m<h.length;)if(g<p.length&&(p[g]===h[m]||p[g]==="*"))p[g]==="*"?(R=g,y=m,g++):(m++,g++);else if(R!==-1)g=R+1,y++,m=y;else return!1;for(;g<p.length&&p[g]==="*";)g++;return g===p.length}function o(){const h=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),h}function l(h){for(const p of r.skips)if(a(h,p))return!1;for(const p of r.names)if(a(h,p))return!0;return!1}function c(h){return h instanceof Error?h.stack||h.message:h}function d(){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 r.enable(r.load()),r}return Ll=e,Ll}var t9;function u4(){return t9||(t9=1,(function(e,t){t.formatArgs=r,t.save=s,t.load=i,t.useColors=n,t.storage=a(),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(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return 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&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(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,h=0;l[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(d++,p==="%c"&&(h=d))}),l.splice(h,0,c)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function i(){let l;try{l=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!l&&typeof he<"u"&&"env"in he&&(l=he.env.DEBUG),l}function a(){try{return localStorage}catch{}}e.exports=MN()(t);const{formatters:o}=e.exports;o.j=function(l){try{return JSON.stringify(l)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}})(wl,wl.exports)),wl.exports}var n9;function KN(){if(n9)return kr.exports;n9=1;const e=s4(),t=i4().EventEmitter,n=b2().inherits,r=u4()("avvio"),{AVV_ERR_READY_TIMEOUT:s}=d4(),i=Symbol.for("plugin-meta");function a(p,m){return p[i]&&p[i].name?p[i].name:typeof m<"u"&&typeof m!="function"&&m.name?m.name:p.name?p.name:p.toString().split(`
69
+ `).slice(0,2).map(g=>g.trim()).join(" -- ")}function o(){const p={};return p.promise=new Promise((m,g)=>{p.resolve=m,p.reject=g}),p}function l(p,m,g,R,y){this.started=!1,this.func=m,this.opts=g,this.onFinish=null,this.parent=p,this.timeout=y===void 0?p._timeout:y,this.name=a(m,g),this.isAfter=R,this.q=e(p,c,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}n(l,t),l.prototype.exec=function(p,m){const g=this.func;let R=!1;const y=this.name;if(this.parent._error&&!this.isAfter){r("skipping loading of plugin as parent errored and it is not an after",y),he.nextTick(m);return}if(this.isAfter)this.server=p;else try{this.server=this.parent.override(p,g,this.opts)}catch(A){return r("override errored",y),m(A)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,r("exec",y);let b;const f=A=>{if(R){r("loading complete",y);return}this._error=A,r(A?"exec errored":"exec completed",y),R=!0,b&&clearTimeout(b),m(A)};this.timeout>0&&(r("setting up timeout",y,this.timeout),b=setTimeout(function(){r("timed out",y),b=null;const A=new s(y);A.fn=g,f(A)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const V=g(this.server,this.opts,f);V&&typeof V.then=="function"&&(r("exec: resolving promise",y),V.then(()=>he.nextTick(f),A=>he.nextTick(f,A)))},l.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const p=()=>{this.server.after((g,R)=>{this._error=g,this.q.pause(),g?(r("rejecting promise",this.name,g),this._promise.reject(g)):(r("resolving promise",this.name),this._promise.resolve()),this._promise=null,he.nextTick(R,g)}),this.q.resume()};let m;return this._promise?m=Promise.resolve():(this._promise=o(),m=this._promise.promise,this.server?p():this.on("start",p)),m},l.prototype.enqueue=function(p,m){r("enqueue",this.name,p.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(p,m)},l.prototype.finish=function(p,m){r("finish",this.name,p);const g=()=>{this.loaded||(r("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,m(p))};if(p){this._promise&&(this._promise.reject(p),this._promise=null),g();return}const R=()=>{if(r("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const y=()=>{r("wrap"),queueMicrotask(R)};this._promise.resolve(),this._promise.promise.then(y,y),this._promise=null}else g();else r("delayed",this.name),this.q.drain=()=>{r("drain",this.name),this.q.drain=h,queueMicrotask(R)}};queueMicrotask(R),this.q.resume()};function c(p,m){const g=this;he.nextTick(d.bind(g),p,m)}function d(p,m){if(typeof p.func.then=="function"){p.func.then(R=>{typeof R.default=="function"&&(R=R.default),p.func=R,d.call(this,p,m)},m);return}const g=this._current[0];this._current.unshift(p),p.exec(g&&g.server||this._server,R=>{p.finish(R,y=>{this._current.shift(),m(y)})})}function h(){}return kr.exports=l,kr.exports.loadPlugin=d,kr.exports}var r9;function HN(){if(r9)return wr.exports;r9=1;const e=s4(),t=i4().EventEmitter,n=b2().inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:r,AVV_ERR_CALLBACK_NOT_FN:s,AVV_ERR_PLUGIN_NOT_VALID:i,AVV_ERR_ROOT_PLG_BOOTED:a,AVV_ERR_READY_TIMEOUT:o}=d4(),l=QN(),c=KN(),d=u4()("avvio"),h=Symbol("kAvvio"),p=Symbol("kThenifyDoNotWrap");function m(Z,v,I){const N=v.expose||{},X=N.use||"use",T=N.after||"after",O=N.ready||"ready",K=N.onClose||"onClose",q=N.close||"close";if(Z[X])throw new r(X);if(Z[T])throw new r(T);if(Z[O])throw new r(O);Z[X]=function(P,ce){return I.use(P,ce),this},Object.defineProperty(Z,"then",{get:f.bind(I)}),Z[h]=!0,Z[T]=function(P){return typeof P!="function"?I._loadRegistered():(I.after(U(P,this)),this)},Z[O]=function(P){if(P&&typeof P!="function")throw new s(O,typeof P);return I.ready(P?U(P,this):void 0)},Z[K]=function(P){if(typeof P!="function")throw new s(K,typeof P);return I.onClose(F(P,this)),this},Z[q]=function(P){if(P&&typeof P!="function")throw new s(q,typeof P);return P?(I.close(U(P,this)),this):I.close()}}function g(Z,v,I){if(typeof Z=="function"&&arguments.length===1&&(I=Z,v={},Z=null),typeof v=="function"&&(I=v,v={}),v=v||{},!(this instanceof g)){const N=new g(Z,v,I);return Z&&m(Z,v,N),N}v.autostart!==!1&&(v.autostart=!0),Z=Z||this,this._timeout=Number(v.timeout)||0,this._server=Z,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),I&&this.once("start",I),this.started=!1,this.booted=!1,this.pluginTree=new l,this._readyQ=e(this,V,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=b},this._closeQ=e(this,S,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=b},this._doStart=null,this._root=new c(this,R.bind(this),v,!1,0),this._root.once("start",(N,X,T)=>{const O=this.pluginTree.start(null,X,T);this._root.once("loaded",(K,q,P)=>{this.pluginTree.stop(O,P)})}),c.loadPlugin.call(this,this._root,N=>{d("root plugin ready");try{this.emit("preReady"),this._root=null}catch(X){N=N||this._error||X}if(N){if(this._error=N,this._readyQ.length()===0)throw N}else this.booted=!0;this._readyQ.resume()})}function R(Z,v,I){this._doStart=I,v.autostart&&this.start()}n(g,t),g.prototype.start=function(){return this.started=!0,he.nextTick(this._doStart),this},g.prototype.override=function(Z,v,I){return Z};function y(Z){if(Z&&typeof Z=="object"&&typeof Z.default=="function"&&(Z=Z.default),!(Z&&(typeof Z=="function"||typeof Z.then=="function")))throw new i(typeof Z);return Z}g.prototype[h]=!0,g.prototype.use=function(Z,v){return this._lastUsed=this._addPlugin(Z,v,!1),this},g.prototype._loadRegistered=function(){const Z=this._current[0];return!this.started&&!this.booted&&he.nextTick(()=>this._root.q.resume()),Z?Z.loadedSoFar():Promise.resolve()},Object.defineProperty(g.prototype,"then",{get:f}),g.prototype._addPlugin=function(Z,v,I){if(Z=y(Z),v=v||{},this.booted)throw new a;const N=this._current[0],X=new c(this,Z,v,I);if(X.once("start",(T,O,K)=>{const q=this.pluginTree.start(N.name,O,K);X.once("loaded",(P,ce,$)=>{this.pluginTree.stop(q,$)})}),N.loaded)throw new Error(X.name,N.name);return N.enqueue(X,T=>{T&&(this._error=T)}),X},g.prototype.after=function(Z){if(!Z)return this._loadRegistered();this._addPlugin(v.bind(this),{},!0);function v(I,N,X){V.call(this,Z,X)}return this},g.prototype.onClose=function(Z){if(typeof Z!="function")throw new Error("not a function");Z[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(Z,v.bind(this));function v(I){I&&(this._error=I)}return this},g.prototype.close=function(Z){let v;if(Z){if(typeof Z!="function")throw new s("close",typeof Z)}else v=new Promise(function(I,N){Z=function(X){if(X)return N(X);I()}});return this.ready(()=>{this._error=null,this._closeQ.push(Z),he.nextTick(this._closeQ.resume.bind(this._closeQ))}),v},g.prototype.ready=function(Z){if(Z){if(typeof Z!="function")throw new s("ready",typeof Z);this._readyQ.push(Z),queueMicrotask(this.start.bind(this));return}return new Promise((v,I)=>{this._readyQ.push(X),this.start();const N=this._current[0].server;function X(T,O,K){T?I(T):v(N),he.nextTick(K)}})},g.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()},g.prototype.toJSON=function(){return this.pluginTree.toJSON()};function b(){}function f(){if(this.booted){d("thenify returning null because we are already booted");return}if(this[p]){this[p]=!1;return}return d("thenify"),(Z,v)=>this._loadRegistered().then(()=>(this[p]=!0,Z(this._server)),v)}function V(Z,v){const I=this._server,N=this._error;let X;if(this._error=null,Z.length===0)this._error=N,X=Z(),X&&!X[h]&&typeof X.then=="function"?X.then(()=>he.nextTick(v),T=>he.nextTick(v,T)):he.nextTick(v);else if(Z.length===1)X=Z(N),X&&!X[h]&&typeof X.then=="function"?X.then(()=>he.nextTick(v),T=>he.nextTick(v,T)):he.nextTick(v);else if(this._timeout===0){const T=O=>{this._error=O,v(this._error)};Z.length===2?Z(N,T):Z(N,I,T)}else A.call(this,Z,N,I,v)}function A(Z,v,I,N){const X=Z.name;d("setting up ready timeout",X,this._timeout);let T=setTimeout(()=>{d("timed out",X),T=null;const K=new o(X);K.fn=Z,this._error=K,N(K)},this._timeout);Z.length===2?Z(v,O.bind(this)):Z(v,I,O.bind(this));function O(K){T&&(clearTimeout(T),this._error=K,N(this._error))}}function S(Z,v){const I=this._server,N=Z[this._isOnCloseHandlerKey];if(Z.length===0||Z.length===1){let X;N?X=Z(I):X=Z(this._error),X&&typeof X.then=="function"?(d("resolving close/onClose promise"),X.then(()=>he.nextTick(v),T=>he.nextTick(v,T))):he.nextTick(v)}else Z.length===2?Z(N?I:this._error,v):N?Z(I,v):Z(this._error,I,v)}function F(Z,v){return I.bind(v);function I(N,X){let T;Z.length===0?(T=Z(),T&&T.then?T.then(function(){he.nextTick(X)},X):he.nextTick(X)):Z.length===1?(T=Z(this),T&&T.then?T.then(function(){he.nextTick(X)},X):he.nextTick(X)):Z(this,X)}}function U(Z,v){return I.bind(v);function I(N,X){let T;Z?Z.length===0?(T=Z(),T&&T.then?T.then(function(){he.nextTick(X,N)},X):he.nextTick(X,N)):Z.length===1?(T=Z(N),T&&T.then?T.then(function(){he.nextTick(X)},X):he.nextTick(X)):Z.length===2?Z(N,X):Z(N,this,X):he.nextTick(X)}}return wr.exports=g,wr.exports.express=function(Z){return g(Z,{expose:{use:"load"}})},wr.exports}var ON=HN();const _N=r4(ON);(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(r){const s=n?window.performance.now():new Date().getTime(),i=Math.max(0,16-(s-t)),a=window.setTimeout(function(){r(s+i)},i);return t=s+i,a},window.cancelAnimationFrame=clearTimeout}})();function jN(e,t=!0,n=!0,r={friendsTab:"enabled"}){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",i=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",a=_N(Object.create({}),{autostart:!1});return a.use(CF,{hideFriends:r.hideFriends,skipOnboarding:r.skipOnboarding,betPack:r.betPack,friendsTab:r.friendsTab,theme:r.theme,themeMode:r.themeMode}),a.use(fF,{onDeepLinkHandled:r?.onDeepLinkHandled}),a.use(VF,{videoPlayerController:r?.videoPlayerController}),a.use(EF,{onContentActivate:r?.onContentActivate,withAd:r?.withAd,withAdNotification:r?.withAdNotification}),a.use(TI,{sdkKey:e,host:s,analyticsHost:i,version:r?.version,webOS:r?.webOS}),a.use(JI),a.use(RF),r?.gamification!==!1&&(a.use(BF),a.use(cF),a.use(xF)),a.use(bN),a.use(aN),a.after((o,l,c)=>{if(o)throw o;l.ready(),c()}),n&&a.after(async(o,l,c)=>{if(o)throw o;await l.sdk.initializeApp(),c()}),a.onClose(()=>{console.log("close StreamLayer instance")}),a}function DN(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h4={exports:{}},xe=h4.exports={},St,Zt;function m1(){throw new Error("setTimeout has not been defined")}function g1(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?St=setTimeout:St=m1}catch{St=m1}try{typeof clearTimeout=="function"?Zt=clearTimeout:Zt=g1}catch{Zt=g1}})();function p4(e){if(St===setTimeout)return setTimeout(e,0);if((St===m1||!St)&&setTimeout)return St=setTimeout,setTimeout(e,0);try{return St(e,0)}catch{try{return St.call(null,e,0)}catch{return St.call(this,e,0)}}}function PN(e){if(Zt===clearTimeout)return clearTimeout(e);if((Zt===g1||!Zt)&&clearTimeout)return Zt=clearTimeout,clearTimeout(e);try{return Zt(e)}catch{try{return Zt.call(null,e)}catch{return Zt.call(this,e)}}}var Kt=[],Yn=!1,pn,$r=-1;function $N(){!Yn||!pn||(Yn=!1,pn.length?Kt=pn.concat(Kt):$r=-1,Kt.length&&m4())}function m4(){if(!Yn){var e=p4($N);Yn=!0;for(var t=Kt.length;t;){for(pn=Kt,Kt=[];++$r<t;)pn&&pn[$r].run();$r=-1,t=Kt.length}pn=null,Yn=!1,PN(e)}}xe.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];Kt.push(new g4(e,t)),Kt.length===1&&!Yn&&p4(m4)};function g4(e,t){this.fun=e,this.array=t}g4.prototype.run=function(){this.fun.apply(null,this.array)};xe.title="browser";xe.browser=!0;xe.env={};xe.argv=[];xe.version="";xe.versions={};function _t(){}xe.on=_t;xe.addListener=_t;xe.once=_t;xe.off=_t;xe.removeListener=_t;xe.removeAllListeners=_t;xe.emit=_t;xe.prependListener=_t;xe.prependOnceListener=_t;xe.listeners=function(e){return[]};xe.binding=function(e){throw new Error("process.binding is not supported")};xe.cwd=function(){return"/"};xe.chdir=function(e){throw new Error("process.chdir is not supported")};xe.umask=function(){return 0};var qN=h4.exports;const eG=DN(qN),tG=({sdkKey:e,plugins:t,production:n,autoEnable:r,onDeepLinkHandled:s,videoPlayerController:i,onContentActivate:a,hideFriends:o,skipOnboarding:l,withAdNotification:c,withAd:d,friendsTab:h,betPack:p,webOS:m,gamification:g})=>{const[R,y]=W.useState(null);return W.useEffect(()=>{let b=!1;if(!e)return console.error("streamlayer sdk key should be provided"),y(V=>(V!==null&&typeof V.disableApp=="function"&&V.disableApp(),null)),()=>{b=!0};const f=jN(e,n,r,{version:eG.env.APP_VERSION,onDeepLinkHandled:s,videoPlayerController:i,onContentActivate:a,skipOnboarding:l,withAdNotification:c,withAd:d,hideFriends:o,friendsTab:h,betPack:p,webOS:m,gamification:g});if(t)for(const V of t)f.use(V);return f.ready().then(V=>{console.log("ready",V,b),b||y(V.sdk)}).catch(V=>console.log(V)),()=>{b=!0,f.close(function(V){if(V)throw V})}},[e,n]),R},A2=({event:e,internal:t})=>{const n=Er(),r=rG();return W.useEffect(()=>{n&&(e&&(n.createEventSession(e,t),r&&(r.current=e)),!e&&r?.current&&(n.createEventSession("",t),r.current=""))},[e,t,r,n]),null};var f4=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(f4||{});const nG={status:0,sdk:null},Ys=W.createContext(nG),b4=({sdkKey:e,theme:t,themeMode:n,plugins:r,children:s,event:i,production:a=!0,autoEnable:o=!0,withAdNotification:l,withAd:c=!0,betPack:d=!1,hideFriends:h,skipOnboarding:p,friendsTab:m="enabled",onDeepLinkHandled:g,videoPlayerController:R,onContentActivate:y,containerId:b,webOS:f,gamification:V})=>{const A=tG({sdkKey:e,plugins:r,production:a,autoEnable:o,onDeepLinkHandled:g,videoPlayerController:R,onContentActivate:y,hideFriends:h,skipOnboarding:p,withAdNotification:l,withAd:c,friendsTab:m,betPack:d,webOS:f,gamification:V}),S=W.useRef(""),F=W.useMemo(()=>A?{sdk:A,status:2,event:S}:{status:1,sdk:null,event:S},[A]);return W.useEffect(()=>{A&&(A.options.setKey("friendsTab",m),A.options.setKey("theme",t),A.options.setKey("themeMode",n),A.options.setKey("skipOnboarding",p),A.options.setKey("betPack",d),A.options.setKey("containerId",b))},[A,m,t,n,p,d,b]),W.useEffect(()=>()=>{g&&A?.removeDeepLinkHandler(g),R&&A?.removeVideoPlayerController(R)},[A]),W.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!e,onDeepLinkHandled:!!g,videoPlayerController:!!R})},[e,g,R]),u.jsxs(Ys.Provider,{value:F,children:[i!==void 0&&u.jsx(A2,{event:i}),s]})},Er=()=>{const{sdk:e}=W.useContext(Ys);return e},rG=()=>{const{event:e}=W.useContext(Ys);return e},sG=({sdkKey:e,plugins:t,children:n,event:r,onDeepLinkHandled:s,videoPlayerController:i,production:a=!0})=>u.jsxs(b4,{sdkKey:e,plugins:t,production:a,autoEnable:!0,onDeepLinkHandled:s,videoPlayerController:i,friendsTab:"disabled",skipOnboarding:!0,hideFriends:!0,children:[u.jsx(A2,{event:r}),n]}),iG=({sdk:e,className:t})=>{const[,n]=s6(e);return u.jsx(FS,{className:t,feature:n,sdk:e})},aG=({sdk:e,className:t,appNode:n,responsiveStore:r,useContainer:s})=>{const i=Ge(e.featuresList.getStore());return i?Array.from(i,a=>{const o=e.getFeature(a);return o?u.jsx(NS,{useContainer:s,responsiveStore:r,className:t,appNode:n,feature:o,sdk:e},a):null}):null},oG=e=>{const t=W.useRef(null);return oh(t,{enabled:!0,event:"click",listener:ah}),u.jsx(Fy,{ref:t,...e})},lG=({sdk:e,useContainer:t})=>{const n=W.useRef(null),r=Ge(e.status),s=Ge(e.sdkStore.slStreamId),i=W.useRef(null),[a]=BW(n),[o,l]=P4(n,a,t),c=r==="ready"&&!!s.data;return W.useEffect(()=>{window.requestAnimationFrame(()=>{e.initializeApp().then(()=>{e.openFeature(pe.GAMES)})})},[e]),oh(n,{enabled:!0,event:"click",listener:ah}),W.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature.js"))},[]),u.jsxs(N4,{className:je("SDKContainer",!t&&G4),ref:n,children:[u.jsx(YS,{className:je(Mr),ref:i}),u.jsxs(X4,{className:"sl-hide-on-modal",ref:o,children:[c&&u.jsx(UW,{sdk:e,scrollNode:o,headerNode:i,appNode:n,scrollStore:l,responsiveStore:a,useContainer:t}),c&&u.jsx(iG,{className:Mr,sdk:e}),c&&u.jsx(aG,{responsiveStore:a,appNode:n,className:Mr,sdk:e,useContainer:t})]})]})},cG=({sdk:e,betPack:t,useContainer:n})=>{const[r,s]=W.useState(t),i=!!Ge(e.userId()),a=W.useMemo(()=>({sdk:e}),[e]),o=W.useCallback(()=>{s(!1),e?.getFeature(pe.GAMES)?.closeQuestion()},[e]);return u.jsxs(Vp.Provider,{value:a,children:[r&&i&&u.jsx(oG,{sdk:e,onEvent:({type:l})=>l==="slOpenGameCenter"?o():()=>{},close:()=>o()}),!r&&u.jsx(lG,{sdk:e,useContainer:n})]})},dG=E("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),uG=E("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),hG=()=>le,pG=E(hG())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),mG=E("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),gG=E("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),fG=E("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),bG=({points:e,onClick:t})=>u.jsxs(dG,{className:Mr,onClick:t,children:[u.jsx(uG,{children:u.jsx(pG,{name:"icon-trophy-solid"})}),u.jsxs(mG,{children:[u.jsx(gG,{children:"Total points"}),u.jsx(fG,{children:u.jsx(vs,{value:e})})]})]}),AG=({gamification:e})=>{const t=e.userSummary.$store,[n,r]=W.useState(0);W.useEffect(()=>{const i=t.subscribe(a=>{a?.summary?.points&&r(a.summary.points)});return()=>{i()}},[t]);const s=W.useCallback(()=>{xn.emit("interactions",{action:"tap",payload:{}})},[]);return u.jsx(bG,{onClick:s,points:n})},RG=({sdk:e})=>{if(!Ge(e.featuresList.getStore()))return null;const t=e.getFeature(pe.GAMES);return t?u.jsx(AG,{gamification:t}):null};var wt;(function(e){e.SCHEMA="schema",e.EXTERNAL_TOKEN="eToken",e.TOKEN="token"})(wt||(wt={}));class VG extends wS{constructor(){super("user")}setSchema=t=>{this.write(wt.SCHEMA,t)};getSchema=()=>this.read(wt.SCHEMA);setToken=t=>{this.write(wt.TOKEN,t)};getToken=()=>this.read(wt.TOKEN);setExternalToken=t=>{this.write(wt.EXTERNAL_TOKEN,t)};getExternalToken=()=>this.read(wt.EXTERNAL_TOKEN);removeToken=()=>{this.remove(wt.TOKEN)}}const s9=e=>{const t=e.target;t instanceof Element&&t.getAttribute("data-a")==="intr"&&xn.emit("interactions",{action:"tap",payload:{}})},yG=()=>{const e=Er();return W.useEffect(()=>(document?.addEventListener("click",s9),()=>{document?.removeEventListener("click",s9)}),[]),e?u.jsx(bp,{sdk:e}):null},EG=({betPack:e,useContainer:t})=>{const{sdk:n,status:r}=W.useContext(Ys);return r===f4.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),null):n?u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(l2,{style:{height:"100%"},children:u.jsx(cG,{sdk:n,betPack:e,useContainer:t})})}):null};class CG extends W.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(EG,{...this.props})}}const SG=({token:e,schema:t})=>{const n=Er();return W.useEffect(()=>{e&&t&&n&&n.authorizationBypass(t,e),n&&(n.withAuth=!0)},[e,t,n]),null},ZG=({event:e,sdkKey:t,token:n,deviceId:r,production:s=!1,theme:i,themeMode:a="light",children:o})=>{const[l,c]=W.useState(!1);return W.useEffect(()=>{n&&(new VG().setToken(n),c(!0))},[n]),W.useEffect(()=>{r&&localStorage.setItem("sl-device-id",r)},[r]),l?u.jsxs(b4,{sdkKey:t,production:s,theme:i,themeMode:a,betPack:!0,friendsTab:"disabled",hideFriends:!0,skipOnboarding:!0,autoEnable:!0,children:[u.jsx(A2,{event:e,internal:!1}),u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(l2,{children:o})})]}):null},vG=({production:e})=>{const[t,n]=W.useState();return W.useEffect(()=>{const{hostname:r,search:s}=window.location,i=new URLSearchParams(s);n({sdkKey:i.get("_slrk")||"",event:i.get("_slre")||"",token:i.get("_slrt")||"",deviceId:i.get("_slrd")||"",theme:i.get("theme")||"",themeMode:i.get("themeMode")==="dark"?"dark":"light",production:e??!(r.includes("next.")||r==="localhost")})},[e]),t?u.jsx(ZG,{...t,children:u.jsx(yG,{})}):null},WG=()=>{const e=Er();return e?u.jsx("div",{className:"StreamLayerSDK",children:u.jsx(l2,{children:u.jsx(RG,{sdk:e})})}):null};exports.BetPackStandalone=vG;exports.C=ZS;exports.MastersStreamLayerSDKReact=CG;exports.S=sG;exports.StreamLayerLogin=SG;exports.StreamLayerSDKPoints=WG;exports.Y=Er;exports.ra=r4;