@streamlayer/react 0.18.6 → 0.18.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Ko=Object.defineProperty;var Jo=(n,e,t)=>e in n?Ko(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var S=(n,e,t)=>(Jo(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("react"),Gt=require("react-phone-number-input"),Xo=require("react-auth-code-input"),De=require("nanostores"),Ne=require("@nanostores/react");var si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ec(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ri={exports:{}},At={};/**
1
+ "use strict";var Xo=Object.defineProperty;var ec=(n,e,t)=>e in n?Xo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var N=(n,e,t)=>(ec(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("react"),Gt=require("react-phone-number-input"),nc=require("react-auth-code-input"),De=require("nanostores"),Ne=require("@nanostores/react");var si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ri={exports:{}},At={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,24 +6,24 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var nc=Q,tc=Symbol.for("react.element"),ac=Symbol.for("react.fragment"),sc=Object.prototype.hasOwnProperty,rc=nc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ic={key:!0,ref:!0,__self:!0,__source:!0};function ii(n,e,t){var s,a={},r=null,i=null;t!==void 0&&(r=""+t),e.key!==void 0&&(r=""+e.key),e.ref!==void 0&&(i=e.ref);for(s in e)sc.call(e,s)&&!ic.hasOwnProperty(s)&&(a[s]=e[s]);if(n&&n.defaultProps)for(s in e=n.defaultProps,e)a[s]===void 0&&(a[s]=e[s]);return{$$typeof:tc,type:n,key:r,ref:i,props:a,_owner:rc.current}}At.Fragment=ac;At.jsx=ii;At.jsxs=ii;ri.exports=At;var f=ri.exports;const Et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSIxMiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CiAgPHJlY3QgeD0iOC4yNSIgeT0iNyIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcpIiBmaWxsPSJ3aGl0ZSIvPgogIDxyZWN0IHg9IjciIHk9IjE1Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSA3IDE1Ljc1KSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==";function oc(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var cc=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Yt=oc(function(n){return cc.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),lc=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},s=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,m]=l.split("_");t[m]=l}else s.push(l)})});const a=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&a.push(t[r]);return a.push(...s),a.join(" ")},Ms=lc,uc=n=>n.toUpperCase()===n,mc=n=>e=>n.indexOf(e)===-1,oi=(n,e)=>{const t={};return Object.keys(n).filter(mc(e)).forEach(s=>{t[s]=n[s]}),t};function dc(n,e,t){const s=oi(e,t);if(!n){const a=typeof Yt=="function"?{default:Yt}:Yt;Object.keys(s).forEach(r=>{a.default(r)||delete s[r]})}return s}var pc=(n,e)=>{};function yc(n){let e="";return t=>{const s=(r,i)=>{const{as:l=n,class:m=e}=r,d=t.propsAsIs===void 0?!(typeof l=="string"&&l.indexOf("-")===-1&&!uc(l[0])):t.propsAsIs,y=dc(d,r,["as","class"]);y.ref=i,y.className=t.atomic?Ms(t.class,y.className||m):Ms(y.className||m,t.class);const{vars:h}=t;if(h){const T={};for(const _ in h){const L=h[_],j=L[0],R=L[1]||"",x=typeof j=="function"?j(r):j;pc(x,t.name),T[`--${_}`]=`${x}${R}`}const M=y.style||{},E=Object.keys(M);E.length>0&&E.forEach(_=>{T[_]=M[_]}),y.style=T}return n.__linaria&&n!==l?(y.as=l,Q.createElement(n,y)):Q.createElement(l,y)},a=Q.forwardRef?Q.forwardRef(s):r=>{const i=oi(r,["innerRef"]);return s(i,r.innerRef)};return a.displayName=t.name,a.__linaria={className:t.class||e,extends:n},a}}var I=yc;const gc=I("div")({name:"Container",class:"c13cgims",propsAsIs:!1}),fc=I("div")({name:"IconWrap",class:"irnp5ce",propsAsIs:!1}),Tc=I("img")({name:"Icon",class:"i19tgr4e",propsAsIs:!1}),hc=I("div")({name:"Content",class:"cczx66p",propsAsIs:!1}),kc=I("div")({name:"TitleWrap",class:"t9bb349",propsAsIs:!1}),Mc=I("div")({name:"Title",class:"t1hgdyin",propsAsIs:!1}),Nc=I("div")({name:"CloseBtnWrap",class:"cdhbq9i",propsAsIs:!1}),Ic=I("button")({name:"CloseBtn",class:"c1dwe42p",propsAsIs:!1}),Sc=I("img")({name:"CloseIcon",class:"covang7",propsAsIs:!1}),ci=({close:n,action:e,data:{color:t,icon:s,title:a}})=>{const r=Q.useCallback(i=>{i.stopPropagation(),n==null||n()},[n]);return f.jsxs(gc,{onClick:e,children:[f.jsx(fc,{style:t?{backgroundColor:t}:{},children:s&&f.jsx(Tc,{alt:"in-app-icon",src:s})}),f.jsxs(hc,{children:[f.jsx(kc,{children:f.jsx(Mc,{id:"in-app-title",children:a||""})}),f.jsx(Nc,{children:f.jsx(Ic,{onClick:r,children:f.jsx(Sc,{alt:"close-in-app-icon",src:Et})})})]})]})};var Ns=typeof window>"u"?Q.useEffect:Q.useLayoutEffect,Ac=({isPlaying:n,duration:e,startAt:t=0,updateInterval:s=0,onComplete:a,onUpdate:r})=>{let[i,l]=Q.useState(t),m=Q.useRef(0),d=Q.useRef(t),y=Q.useRef(t*-1e3),h=Q.useRef(null),T=Q.useRef(null),M=Q.useRef(null),E=j=>{let R=j/1e3;if(T.current===null){T.current=R,h.current=requestAnimationFrame(E);return}let x=R-T.current,z=m.current+x;T.current=R,m.current=z;let U=d.current+(s===0?z:(z/s|0)*s),B=d.current+z,C=typeof e=="number"&&B>=e;l(C?e:U),C||(h.current=requestAnimationFrame(E))},_=()=>{h.current&&cancelAnimationFrame(h.current),M.current&&clearTimeout(M.current),T.current=null},L=Q.useCallback(j=>{_(),m.current=0;let R=typeof j=="number"?j:t;d.current=R,l(R),n&&(h.current=requestAnimationFrame(E))},[n,t]);return Ns(()=>{if(r==null||r(i),e&&i>=e){y.current+=e*1e3;let{shouldRepeat:j=!1,delay:R=0,newStartAt:x}=(a==null?void 0:a(y.current/1e3))||{};j&&(M.current=setTimeout(()=>L(x),R*1e3))}},[i,e]),Ns(()=>(n&&(h.current=requestAnimationFrame(E)),_),[n,e,s]),{elapsedTime:i,reset:L}},Ec=(n,e,t)=>{let s=n/2,a=e/2,r=s-a,i=2*r,l=t==="clockwise"?"1,0":"0,1",m=2*Math.PI*r;return{path:`m ${s},${a} a ${r},${r} 0 ${l} 0,${i} a ${r},${r} 0 ${l} 0,-${i}`,pathLength:m}},Is=(n,e)=>n===0||n===e?0:typeof e=="number"?n-e:0,bc=n=>({position:"relative",width:n,height:n}),Dc={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},li=(n,e,t,s,a)=>{if(s===0)return e;let r=(a?s-n:n)/s;return e+t*r},Ss=n=>{var e,t;return(t=(e=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(s,a,r,i)=>`#${a}${a}${r}${r}${i}${i}`).substring(1).match(/.{2}/g))==null?void 0:e.map(s=>parseInt(s,16)))!=null?t:[]},vc=(n,e)=>{var t;let{colors:s,colorsTime:a,isSmoothColorTransition:r=!0}=n;if(typeof s=="string")return s;let i=(t=a==null?void 0:a.findIndex((T,M)=>T>=e&&e>=a[M+1]))!=null?t:-1;if(!a||i===-1)return s[0];if(!r)return s[i];let l=a[i]-e,m=a[i]-a[i+1],d=Ss(s[i]),y=Ss(s[i+1]),h=!!n.isGrowing;return`rgb(${d.map((T,M)=>li(l,T,y[M]-T,m,h)|0).join(",")})`},_c=n=>{let{duration:e,initialRemainingTime:t,updateInterval:s,size:a=180,strokeWidth:r=12,trailStrokeWidth:i,isPlaying:l=!1,isGrowing:m=!1,rotation:d="clockwise",onComplete:y,onUpdate:h}=n,T=Q.useRef(),M=Math.max(r,i??0),{path:E,pathLength:_}=Ec(a,M,d),{elapsedTime:L}=Ac({isPlaying:l,duration:e,startAt:Is(e,t),updateInterval:s,onUpdate:typeof h=="function"?R=>{let x=Math.ceil(e-R);x!==T.current&&(T.current=x,h(x))}:void 0,onComplete:typeof y=="function"?R=>{var x;let{shouldRepeat:z,delay:U,newInitialRemainingTime:B}=(x=y(R))!=null?x:{};if(z)return{shouldRepeat:z,delay:U,newStartAt:Is(e,B)}}:void 0}),j=e-L;return{elapsedTime:L,path:E,pathLength:_,remainingTime:Math.ceil(j),rotation:d,size:a,stroke:vc(n,j),strokeDashoffset:li(L,0,_,e,m),strokeWidth:r}},ui=n=>{let{children:e,strokeLinecap:t,trailColor:s,trailStrokeWidth:a}=n,{path:r,pathLength:i,stroke:l,strokeDashoffset:m,remainingTime:d,elapsedTime:y,size:h,strokeWidth:T}=_c(n);return Q.createElement("div",{style:bc(h)},Q.createElement("svg",{viewBox:`0 0 ${h} ${h}`,width:h,height:h,xmlns:"http://www.w3.org/2000/svg"},Q.createElement("path",{d:r,fill:"none",stroke:s??"#d9d9d9",strokeWidth:a??T}),Q.createElement("path",{d:r,fill:"none",stroke:l,strokeLinecap:t??"round",strokeWidth:T,strokeDasharray:i,strokeDashoffset:m})),typeof e=="function"&&Q.createElement("div",{style:Dc},e({remainingTime:d,elapsedTime:y,color:l})))};ui.displayName="CountdownCircleTimer";const Vt={BG_TRANSPARENT:"rgba(0,0,0, .8)",BG_TRANSPARENT_VOTE_CONTAINER:"rgba(10, 14, 19, 0.8)",BG_TRANSPARENT_ITEM:"rgba(0, 0, 0, 0.7)",BG_TRANSPARENT_ITEM_VOTE:"rgba(255, 255, 255, 0.1)",BG_TRANSPARENT_ITEM_SUCCESS:"rgba(0, 139, 251, 0.2)",BG_TRANSPARENT_ITEM_ERROR:"rgba(205, 37, 37, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS:"rgba(255, 255, 255, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS:"rgba(60, 139, 251, 0.5)",BG_TRANSPARENT_VOTE_PROGRESS_ERROR:"rgba(205, 37, 37, 0.5)",BG_TRANSPARENT_USER_CONTAINER:"rgba(255, 255, 255, 0.05)",BG_TRANSPARENT_ONBOARDING_INAPP:"rgba(138, 159, 182, 0.2)",BLUE_PRIMARY:"#1589EE",RED_PRIMARY:"#CD2525",RED_SECONDARY:"#EB5757",BLUE_QUESTION_ACTION_BTN:"#1589ee",WHITE:"#FFFFFF",GREY_1:"#909395",GREY_2:"#22262b",GREY_3:"#2d3135",GREY_4:"#53565a",GREY_PRIMARY_ONBOARDING_INAPP:"#B5B7B8",BLACK_1:"#161a1f",GREEN_1:"#F7B801",RED_1:"#A30000",RED_2:"#FF4170",GREY_PRIMARY:"#909395",DIVIDER_COLOR_PRIMARY:"#2d3135",DIVIDER_COLOR_SECONDARY:"#53565a",GREEN_PRIMARY_BTN:"#009B77"};const wc=I("div")({name:"RemainingTime",class:"r1l1rnv7",propsAsIs:!1}),jc=[Vt.BLUE_PRIMARY,Vt.GREEN_1,Vt.RED_1],Oc=[10,6,0],Lc=30,Rc=32,xc=4,Cc=0,mi=({isPlaying:n=!0,duration:e=Lc,setTimeToExpire:t})=>{const s=({remainingTime:a})=>f.jsx(wc,{style:{color:a?"inherit":void 0},children:a});return Q.useEffect(()=>{t(!1)},[t]),f.jsx(ui,{isPlaying:n,duration:e,colors:jc,colorsTime:Oc,size:Rc,strokeWidth:xc,trailStrokeWidth:Cc,onComplete:()=>t(!0),children:s})};function be(n,e){if(!n)throw new Error(e)}const zc=34028234663852886e22,Uc=-34028234663852886e22,Pc=4294967295,Bc=2147483647,Qc=-2147483648;function ot(n){if(typeof n!="number")throw new Error("invalid int 32: "+typeof n);if(!Number.isInteger(n)||n>Bc||n<Qc)throw new Error("invalid int 32: "+n)}function Ia(n){if(typeof n!="number")throw new Error("invalid uint 32: "+typeof n);if(!Number.isInteger(n)||n>Pc||n<0)throw new Error("invalid uint 32: "+n)}function di(n){if(typeof n!="number")throw new Error("invalid float 32: "+typeof n);if(Number.isFinite(n)&&(n>zc||n<Uc))throw new Error("invalid float 32: "+n)}const pi=Symbol("@bufbuild/protobuf/enum-type");function Fc(n){const e=n[pi];return be(e,"missing enum type on enum object"),e}function yi(n,e,t,s){n[pi]=gi(e,t.map(a=>({no:a.no,name:a.name,localName:n[a.no]})))}function gi(n,e,t){const s=Object.create(null),a=Object.create(null),r=[];for(const i of e){const l=fi(i);r.push(l),s[i.name]=l,a[i.no]=l}return{typeName:n,values:r,findName(i){return s[i]},findNumber(i){return a[i]}}}function Gc(n,e,t){const s={};for(const a of e){const r=fi(a);s[r.localName]=r.no,s[r.no]=r.localName}return yi(s,n,e),s}function fi(n){return"localName"in n?n:Object.assign(Object.assign({},n),{localName:n.name})}class Ye{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){const s=this.getType(),a=s.runtime.bin,r=a.makeReadOptions(t);return a.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){const s=this.getType(),a=s.runtime.json,r=a.makeReadOptions(t);return a.readMessage(s,e,r,this),this}fromJsonString(e,t){let s;try{s=JSON.parse(e)}catch(a){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${a instanceof Error?a.message:String(a)}`)}return this.fromJson(s,t)}toBinary(e){const t=this.getType(),s=t.runtime.bin,a=s.makeWriteOptions(e),r=a.writerFactory();return s.writeMessage(this,r,a),r.finish()}toJson(e){const t=this.getType(),s=t.runtime.json,a=s.makeWriteOptions(e);return s.writeMessage(this,a)}toJsonString(e){var t;const s=this.toJson(e);return JSON.stringify(s,null,(t=e==null?void 0:e.prettySpaces)!==null&&t!==void 0?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function Yc(n,e,t,s){var a;const r=(a=s==null?void 0:s.localName)!==null&&a!==void 0?a:e.substring(e.lastIndexOf(".")+1),i={[r]:function(l){n.util.initFields(this),n.util.initPartial(l,this)}}[r];return Object.setPrototypeOf(i.prototype,new Ye),Object.assign(i,{runtime:n,typeName:e,fields:n.util.newFieldList(t),fromBinary(l,m){return new i().fromBinary(l,m)},fromJson(l,m){return new i().fromJson(l,m)},fromJsonString(l,m){return new i().fromJsonString(l,m)},equals(l,m){return n.util.equals(i,l,m)}}),i}function Vc(n,e,t,s){return{syntax:n,json:e,bin:t,util:s,makeMessageType(a,r,i){return Yc(this,a,r,i)},makeEnum:Gc,makeEnumType:gi,getEnumType:Fc}}var v;(function(n){n[n.DOUBLE=1]="DOUBLE",n[n.FLOAT=2]="FLOAT",n[n.INT64=3]="INT64",n[n.UINT64=4]="UINT64",n[n.INT32=5]="INT32",n[n.FIXED64=6]="FIXED64",n[n.FIXED32=7]="FIXED32",n[n.BOOL=8]="BOOL",n[n.STRING=9]="STRING",n[n.BYTES=12]="BYTES",n[n.UINT32=13]="UINT32",n[n.SFIXED32=15]="SFIXED32",n[n.SFIXED64=16]="SFIXED64",n[n.SINT32=17]="SINT32",n[n.SINT64=18]="SINT64"})(v||(v={}));var gn;(function(n){n[n.BIGINT=0]="BIGINT",n[n.STRING=1]="STRING"})(gn||(gn={}));function $c(){let n=0,e=0;for(let s=0;s<28;s+=7){let a=this.buf[this.pos++];if(n|=(a&127)<<s,!(a&128))return this.assertBounds(),[n,e]}let t=this.buf[this.pos++];if(n|=(t&15)<<28,e=(t&112)>>4,!(t&128))return this.assertBounds(),[n,e];for(let s=3;s<=31;s+=7){let a=this.buf[this.pos++];if(e|=(a&127)<<s,!(a&128))return this.assertBounds(),[n,e]}throw new Error("invalid varint")}function $t(n,e,t){for(let r=0;r<28;r=r+7){const i=n>>>r,l=!(!(i>>>7)&&e==0),m=(l?i|128:i)&255;if(t.push(m),!l)return}const s=n>>>28&15|(e&7)<<4,a=!!(e>>3);if(t.push((a?s|128:s)&255),!!a){for(let r=3;r<31;r=r+7){const i=e>>>r,l=!!(i>>>7),m=(l?i|128:i)&255;if(t.push(m),!l)return}t.push(e>>>31&1)}}const ct=4294967296;function As(n){const e=n[0]==="-";e&&(n=n.slice(1));const t=1e6;let s=0,a=0;function r(i,l){const m=Number(n.slice(i,l));a*=t,s=s*t+m,s>=ct&&(a=a+(s/ct|0),s=s%ct)}return r(-24,-18),r(-18,-12),r(-12,-6),r(-6),e?hi(s,a):Ga(s,a)}function qc(n,e){let t=Ga(n,e);const s=t.hi&2147483648;s&&(t=hi(t.lo,t.hi));const a=Ti(t.lo,t.hi);return s?"-"+a:a}function Ti(n,e){if({lo:n,hi:e}=Wc(n,e),e<=2097151)return String(ct*e+n);const t=n&16777215,s=(n>>>24|e<<8)&16777215,a=e>>16&65535;let r=t+s*6777216+a*6710656,i=s+a*8147497,l=a*2;const m=1e7;return r>=m&&(i+=Math.floor(r/m),r%=m),i>=m&&(l+=Math.floor(i/m),i%=m),l.toString()+Es(i)+Es(r)}function Wc(n,e){return{lo:n>>>0,hi:e>>>0}}function Ga(n,e){return{lo:n|0,hi:e|0}}function hi(n,e){return e=~e,n?n=~n+1:e+=1,Ga(n,e)}const Es=n=>{const e=String(n);return"0000000".slice(e.length)+e};function bs(n,e){if(n>=0){for(;n>127;)e.push(n&127|128),n=n>>>7;e.push(n)}else{for(let t=0;t<9;t++)e.push(n&127|128),n=n>>7;e.push(1)}}function Hc(){let n=this.buf[this.pos++],e=n&127;if(!(n&128))return this.assertBounds(),e;if(n=this.buf[this.pos++],e|=(n&127)<<7,!(n&128))return this.assertBounds(),e;if(n=this.buf[this.pos++],e|=(n&127)<<14,!(n&128))return this.assertBounds(),e;if(n=this.buf[this.pos++],e|=(n&127)<<21,!(n&128))return this.assertBounds(),e;n=this.buf[this.pos++],e|=(n&15)<<28;for(let t=5;n&128&&t<10;t++)n=this.buf[this.pos++];if(n&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}var G={},ki={},bt={};bt.byteLength=Jc;bt.toByteArray=el;bt.fromByteArray=al;var Fe=[],je=[],Zc=typeof Uint8Array<"u"?Uint8Array:Array,qt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var kn=0,Kc=qt.length;kn<Kc;++kn)Fe[kn]=qt[kn],je[qt.charCodeAt(kn)]=kn;je["-".charCodeAt(0)]=62;je["_".charCodeAt(0)]=63;function Mi(n){var e=n.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=n.indexOf("=");t===-1&&(t=e);var s=t===e?0:4-t%4;return[t,s]}function Jc(n){var e=Mi(n),t=e[0],s=e[1];return(t+s)*3/4-s}function Xc(n,e,t){return(e+t)*3/4-t}function el(n){var e,t=Mi(n),s=t[0],a=t[1],r=new Zc(Xc(n,s,a)),i=0,l=a>0?s-4:s,m;for(m=0;m<l;m+=4)e=je[n.charCodeAt(m)]<<18|je[n.charCodeAt(m+1)]<<12|je[n.charCodeAt(m+2)]<<6|je[n.charCodeAt(m+3)],r[i++]=e>>16&255,r[i++]=e>>8&255,r[i++]=e&255;return a===2&&(e=je[n.charCodeAt(m)]<<2|je[n.charCodeAt(m+1)]>>4,r[i++]=e&255),a===1&&(e=je[n.charCodeAt(m)]<<10|je[n.charCodeAt(m+1)]<<4|je[n.charCodeAt(m+2)]>>2,r[i++]=e>>8&255,r[i++]=e&255),r}function nl(n){return Fe[n>>18&63]+Fe[n>>12&63]+Fe[n>>6&63]+Fe[n&63]}function tl(n,e,t){for(var s,a=[],r=e;r<t;r+=3)s=(n[r]<<16&16711680)+(n[r+1]<<8&65280)+(n[r+2]&255),a.push(nl(s));return a.join("")}function al(n){for(var e,t=n.length,s=t%3,a=[],r=16383,i=0,l=t-s;i<l;i+=r)a.push(tl(n,i,i+r>l?l:i+r));return s===1?(e=n[t-1],a.push(Fe[e>>2]+Fe[e<<4&63]+"==")):s===2&&(e=(n[t-2]<<8)+n[t-1],a.push(Fe[e>>10]+Fe[e>>4&63]+Fe[e<<2&63]+"=")),a.join("")}var Ya={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ya.read=function(n,e,t,s,a){var r,i,l=a*8-s-1,m=(1<<l)-1,d=m>>1,y=-7,h=t?a-1:0,T=t?-1:1,M=n[e+h];for(h+=T,r=M&(1<<-y)-1,M>>=-y,y+=l;y>0;r=r*256+n[e+h],h+=T,y-=8);for(i=r&(1<<-y)-1,r>>=-y,y+=s;y>0;i=i*256+n[e+h],h+=T,y-=8);if(r===0)r=1-d;else{if(r===m)return i?NaN:(M?-1:1)*(1/0);i=i+Math.pow(2,s),r=r-d}return(M?-1:1)*i*Math.pow(2,r-s)};Ya.write=function(n,e,t,s,a,r){var i,l,m,d=r*8-a-1,y=(1<<d)-1,h=y>>1,T=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=s?0:r-1,E=s?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,i=y):(i=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-i))<1&&(i--,m*=2),i+h>=1?e+=T/m:e+=T*Math.pow(2,1-h),e*m>=2&&(i++,m/=2),i+h>=y?(l=0,i=y):i+h>=1?(l=(e*m-1)*Math.pow(2,a),i=i+h):(l=e*Math.pow(2,h-1)*Math.pow(2,a),i=0));a>=8;n[t+M]=l&255,M+=E,l/=256,a-=8);for(i=i<<a|l,d+=a;d>0;n[t+M]=i&255,M+=E,i/=256,d-=8);n[t+M-E]|=_*128};/*!
9
+ */var ac=Q,sc=Symbol.for("react.element"),rc=Symbol.for("react.fragment"),ic=Object.prototype.hasOwnProperty,oc=ac.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cc={key:!0,ref:!0,__self:!0,__source:!0};function ii(n,e,t){var s,a={},r=null,i=null;t!==void 0&&(r=""+t),e.key!==void 0&&(r=""+e.key),e.ref!==void 0&&(i=e.ref);for(s in e)ic.call(e,s)&&!cc.hasOwnProperty(s)&&(a[s]=e[s]);if(n&&n.defaultProps)for(s in e=n.defaultProps,e)a[s]===void 0&&(a[s]=e[s]);return{$$typeof:sc,type:n,key:r,ref:i,props:a,_owner:oc.current}}At.Fragment=rc;At.jsx=ii;At.jsxs=ii;ri.exports=At;var f=ri.exports;const Et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSIxMiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CiAgPHJlY3QgeD0iOC4yNSIgeT0iNyIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcpIiBmaWxsPSJ3aGl0ZSIvPgogIDxyZWN0IHg9IjciIHk9IjE1Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSA3IDE1Ljc1KSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==";function lc(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var uc=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Yt=lc(function(n){return uc.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),mc=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},s=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(l=>{if(l.startsWith("atm_")){const[,m]=l.split("_");t[m]=l}else s.push(l)})});const a=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&a.push(t[r]);return a.push(...s),a.join(" ")},Ms=mc,dc=n=>n.toUpperCase()===n,pc=n=>e=>n.indexOf(e)===-1,oi=(n,e)=>{const t={};return Object.keys(n).filter(pc(e)).forEach(s=>{t[s]=n[s]}),t};function yc(n,e,t){const s=oi(e,t);if(!n){const a=typeof Yt=="function"?{default:Yt}:Yt;Object.keys(s).forEach(r=>{a.default(r)||delete s[r]})}return s}var gc=(n,e)=>{};function fc(n){let e="";return t=>{const s=(r,i)=>{const{as:l=n,class:m=e}=r,d=t.propsAsIs===void 0?!(typeof l=="string"&&l.indexOf("-")===-1&&!dc(l[0])):t.propsAsIs,y=yc(d,r,["as","class"]);y.ref=i,y.className=t.atomic?Ms(t.class,y.className||m):Ms(y.className||m,t.class);const{vars:h}=t;if(h){const T={};for(const D in h){const L=h[D],j=L[0],R=L[1]||"",x=typeof j=="function"?j(r):j;gc(x,t.name),T[`--${D}`]=`${x}${R}`}const M=y.style||{},E=Object.keys(M);E.length>0&&E.forEach(D=>{T[D]=M[D]}),y.style=T}return n.__linaria&&n!==l?(y.as=l,Q.createElement(n,y)):Q.createElement(l,y)},a=Q.forwardRef?Q.forwardRef(s):r=>{const i=oi(r,["innerRef"]);return s(i,r.innerRef)};return a.displayName=t.name,a.__linaria={className:t.class||e,extends:n},a}}var S=fc;const Tc=S("div")({name:"Container",class:"c13cgims",propsAsIs:!1}),hc=S("div")({name:"IconWrap",class:"irnp5ce",propsAsIs:!1}),kc=S("img")({name:"Icon",class:"i19tgr4e",propsAsIs:!1}),Mc=S("div")({name:"Content",class:"cczx66p",propsAsIs:!1}),Nc=S("div")({name:"TitleWrap",class:"t9bb349",propsAsIs:!1}),Ic=S("div")({name:"Title",class:"t1hgdyin",propsAsIs:!1}),Sc=S("div")({name:"CloseBtnWrap",class:"cdhbq9i",propsAsIs:!1}),Ac=S("button")({name:"CloseBtn",class:"c1dwe42p",propsAsIs:!1}),Ec=S("img")({name:"CloseIcon",class:"covang7",propsAsIs:!1}),ci=({close:n,action:e,data:{color:t,icon:s,title:a}})=>{const r=Q.useCallback(i=>{i.stopPropagation(),n==null||n()},[n]);return f.jsxs(Tc,{onClick:e,children:[f.jsx(hc,{style:t?{backgroundColor:t}:{},children:s&&f.jsx(kc,{alt:"in-app-icon",src:s})}),f.jsxs(Mc,{children:[f.jsx(Nc,{children:f.jsx(Ic,{id:"in-app-title",children:a||""})}),f.jsx(Sc,{children:f.jsx(Ac,{onClick:r,children:f.jsx(Ec,{alt:"close-in-app-icon",src:Et})})})]})]})};var Ns=typeof window>"u"?Q.useEffect:Q.useLayoutEffect,bc=({isPlaying:n,duration:e,startAt:t=0,updateInterval:s=0,onComplete:a,onUpdate:r})=>{let[i,l]=Q.useState(t),m=Q.useRef(0),d=Q.useRef(t),y=Q.useRef(t*-1e3),h=Q.useRef(null),T=Q.useRef(null),M=Q.useRef(null),E=j=>{let R=j/1e3;if(T.current===null){T.current=R,h.current=requestAnimationFrame(E);return}let x=R-T.current,z=m.current+x;T.current=R,m.current=z;let U=d.current+(s===0?z:(z/s|0)*s),B=d.current+z,C=typeof e=="number"&&B>=e;l(C?e:U),C||(h.current=requestAnimationFrame(E))},D=()=>{h.current&&cancelAnimationFrame(h.current),M.current&&clearTimeout(M.current),T.current=null},L=Q.useCallback(j=>{D(),m.current=0;let R=typeof j=="number"?j:t;d.current=R,l(R),n&&(h.current=requestAnimationFrame(E))},[n,t]);return Ns(()=>{if(r==null||r(i),e&&i>=e){y.current+=e*1e3;let{shouldRepeat:j=!1,delay:R=0,newStartAt:x}=(a==null?void 0:a(y.current/1e3))||{};j&&(M.current=setTimeout(()=>L(x),R*1e3))}},[i,e]),Ns(()=>(n&&(h.current=requestAnimationFrame(E)),D),[n,e,s]),{elapsedTime:i,reset:L}},Dc=(n,e,t)=>{let s=n/2,a=e/2,r=s-a,i=2*r,l=t==="clockwise"?"1,0":"0,1",m=2*Math.PI*r;return{path:`m ${s},${a} a ${r},${r} 0 ${l} 0,${i} a ${r},${r} 0 ${l} 0,-${i}`,pathLength:m}},Is=(n,e)=>n===0||n===e?0:typeof e=="number"?n-e:0,vc=n=>({position:"relative",width:n,height:n}),wc={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},li=(n,e,t,s,a)=>{if(s===0)return e;let r=(a?s-n:n)/s;return e+t*r},Ss=n=>{var e,t;return(t=(e=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(s,a,r,i)=>`#${a}${a}${r}${r}${i}${i}`).substring(1).match(/.{2}/g))==null?void 0:e.map(s=>parseInt(s,16)))!=null?t:[]},_c=(n,e)=>{var t;let{colors:s,colorsTime:a,isSmoothColorTransition:r=!0}=n;if(typeof s=="string")return s;let i=(t=a==null?void 0:a.findIndex((T,M)=>T>=e&&e>=a[M+1]))!=null?t:-1;if(!a||i===-1)return s[0];if(!r)return s[i];let l=a[i]-e,m=a[i]-a[i+1],d=Ss(s[i]),y=Ss(s[i+1]),h=!!n.isGrowing;return`rgb(${d.map((T,M)=>li(l,T,y[M]-T,m,h)|0).join(",")})`},jc=n=>{let{duration:e,initialRemainingTime:t,updateInterval:s,size:a=180,strokeWidth:r=12,trailStrokeWidth:i,isPlaying:l=!1,isGrowing:m=!1,rotation:d="clockwise",onComplete:y,onUpdate:h}=n,T=Q.useRef(),M=Math.max(r,i??0),{path:E,pathLength:D}=Dc(a,M,d),{elapsedTime:L}=bc({isPlaying:l,duration:e,startAt:Is(e,t),updateInterval:s,onUpdate:typeof h=="function"?R=>{let x=Math.ceil(e-R);x!==T.current&&(T.current=x,h(x))}:void 0,onComplete:typeof y=="function"?R=>{var x;let{shouldRepeat:z,delay:U,newInitialRemainingTime:B}=(x=y(R))!=null?x:{};if(z)return{shouldRepeat:z,delay:U,newStartAt:Is(e,B)}}:void 0}),j=e-L;return{elapsedTime:L,path:E,pathLength:D,remainingTime:Math.ceil(j),rotation:d,size:a,stroke:_c(n,j),strokeDashoffset:li(L,0,D,e,m),strokeWidth:r}},ui=n=>{let{children:e,strokeLinecap:t,trailColor:s,trailStrokeWidth:a}=n,{path:r,pathLength:i,stroke:l,strokeDashoffset:m,remainingTime:d,elapsedTime:y,size:h,strokeWidth:T}=jc(n);return Q.createElement("div",{style:vc(h)},Q.createElement("svg",{viewBox:`0 0 ${h} ${h}`,width:h,height:h,xmlns:"http://www.w3.org/2000/svg"},Q.createElement("path",{d:r,fill:"none",stroke:s??"#d9d9d9",strokeWidth:a??T}),Q.createElement("path",{d:r,fill:"none",stroke:l,strokeLinecap:t??"round",strokeWidth:T,strokeDasharray:i,strokeDashoffset:m})),typeof e=="function"&&Q.createElement("div",{style:wc},e({remainingTime:d,elapsedTime:y,color:l})))};ui.displayName="CountdownCircleTimer";const Vt={BG_TRANSPARENT:"rgba(0,0,0, .8)",BG_TRANSPARENT_VOTE_CONTAINER:"rgba(10, 14, 19, 0.8)",BG_TRANSPARENT_ITEM:"rgba(0, 0, 0, 0.7)",BG_TRANSPARENT_ITEM_VOTE:"rgba(255, 255, 255, 0.1)",BG_TRANSPARENT_ITEM_SUCCESS:"rgba(0, 139, 251, 0.2)",BG_TRANSPARENT_ITEM_ERROR:"rgba(205, 37, 37, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS:"rgba(255, 255, 255, 0.2)",BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS:"rgba(60, 139, 251, 0.5)",BG_TRANSPARENT_VOTE_PROGRESS_ERROR:"rgba(205, 37, 37, 0.5)",BG_TRANSPARENT_USER_CONTAINER:"rgba(255, 255, 255, 0.05)",BG_TRANSPARENT_ONBOARDING_INAPP:"rgba(138, 159, 182, 0.2)",BLUE_PRIMARY:"#1589EE",RED_PRIMARY:"#CD2525",RED_SECONDARY:"#EB5757",BLUE_QUESTION_ACTION_BTN:"#1589ee",WHITE:"#FFFFFF",GREY_1:"#909395",GREY_2:"#22262b",GREY_3:"#2d3135",GREY_4:"#53565a",GREY_PRIMARY_ONBOARDING_INAPP:"#B5B7B8",BLACK_1:"#161a1f",GREEN_1:"#F7B801",RED_1:"#A30000",RED_2:"#FF4170",GREY_PRIMARY:"#909395",DIVIDER_COLOR_PRIMARY:"#2d3135",DIVIDER_COLOR_SECONDARY:"#53565a",GREEN_PRIMARY_BTN:"#009B77"};const Oc=S("div")({name:"RemainingTime",class:"r1l1rnv7",propsAsIs:!1}),Lc=[Vt.BLUE_PRIMARY,Vt.GREEN_1,Vt.RED_1],Rc=[10,6,0],xc=30,Cc=32,zc=4,Uc=0,mi=({isPlaying:n=!0,duration:e=xc,setTimeToExpire:t})=>{const s=({remainingTime:a})=>f.jsx(Oc,{style:{color:a?"inherit":void 0},children:a});return Q.useEffect(()=>{t(!1)},[t]),f.jsx(ui,{isPlaying:n,duration:e,colors:Lc,colorsTime:Rc,size:Cc,strokeWidth:zc,trailStrokeWidth:Uc,onComplete:()=>t(!0),children:s})};function be(n,e){if(!n)throw new Error(e)}const Pc=34028234663852886e22,Bc=-34028234663852886e22,Qc=4294967295,Fc=2147483647,Gc=-2147483648;function ot(n){if(typeof n!="number")throw new Error("invalid int 32: "+typeof n);if(!Number.isInteger(n)||n>Fc||n<Gc)throw new Error("invalid int 32: "+n)}function Ia(n){if(typeof n!="number")throw new Error("invalid uint 32: "+typeof n);if(!Number.isInteger(n)||n>Qc||n<0)throw new Error("invalid uint 32: "+n)}function di(n){if(typeof n!="number")throw new Error("invalid float 32: "+typeof n);if(Number.isFinite(n)&&(n>Pc||n<Bc))throw new Error("invalid float 32: "+n)}const pi=Symbol("@bufbuild/protobuf/enum-type");function Yc(n){const e=n[pi];return be(e,"missing enum type on enum object"),e}function yi(n,e,t,s){n[pi]=gi(e,t.map(a=>({no:a.no,name:a.name,localName:n[a.no]})))}function gi(n,e,t){const s=Object.create(null),a=Object.create(null),r=[];for(const i of e){const l=fi(i);r.push(l),s[i.name]=l,a[i.no]=l}return{typeName:n,values:r,findName(i){return s[i]},findNumber(i){return a[i]}}}function Vc(n,e,t){const s={};for(const a of e){const r=fi(a);s[r.localName]=r.no,s[r.no]=r.localName}return yi(s,n,e),s}function fi(n){return"localName"in n?n:Object.assign(Object.assign({},n),{localName:n.name})}class Ye{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){const s=this.getType(),a=s.runtime.bin,r=a.makeReadOptions(t);return a.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){const s=this.getType(),a=s.runtime.json,r=a.makeReadOptions(t);return a.readMessage(s,e,r,this),this}fromJsonString(e,t){let s;try{s=JSON.parse(e)}catch(a){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${a instanceof Error?a.message:String(a)}`)}return this.fromJson(s,t)}toBinary(e){const t=this.getType(),s=t.runtime.bin,a=s.makeWriteOptions(e),r=a.writerFactory();return s.writeMessage(this,r,a),r.finish()}toJson(e){const t=this.getType(),s=t.runtime.json,a=s.makeWriteOptions(e);return s.writeMessage(this,a)}toJsonString(e){var t;const s=this.toJson(e);return JSON.stringify(s,null,(t=e==null?void 0:e.prettySpaces)!==null&&t!==void 0?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function $c(n,e,t,s){var a;const r=(a=s==null?void 0:s.localName)!==null&&a!==void 0?a:e.substring(e.lastIndexOf(".")+1),i={[r]:function(l){n.util.initFields(this),n.util.initPartial(l,this)}}[r];return Object.setPrototypeOf(i.prototype,new Ye),Object.assign(i,{runtime:n,typeName:e,fields:n.util.newFieldList(t),fromBinary(l,m){return new i().fromBinary(l,m)},fromJson(l,m){return new i().fromJson(l,m)},fromJsonString(l,m){return new i().fromJsonString(l,m)},equals(l,m){return n.util.equals(i,l,m)}}),i}function qc(n,e,t,s){return{syntax:n,json:e,bin:t,util:s,makeMessageType(a,r,i){return $c(this,a,r,i)},makeEnum:Vc,makeEnumType:gi,getEnumType:Yc}}var w;(function(n){n[n.DOUBLE=1]="DOUBLE",n[n.FLOAT=2]="FLOAT",n[n.INT64=3]="INT64",n[n.UINT64=4]="UINT64",n[n.INT32=5]="INT32",n[n.FIXED64=6]="FIXED64",n[n.FIXED32=7]="FIXED32",n[n.BOOL=8]="BOOL",n[n.STRING=9]="STRING",n[n.BYTES=12]="BYTES",n[n.UINT32=13]="UINT32",n[n.SFIXED32=15]="SFIXED32",n[n.SFIXED64=16]="SFIXED64",n[n.SINT32=17]="SINT32",n[n.SINT64=18]="SINT64"})(w||(w={}));var gn;(function(n){n[n.BIGINT=0]="BIGINT",n[n.STRING=1]="STRING"})(gn||(gn={}));function Wc(){let n=0,e=0;for(let s=0;s<28;s+=7){let a=this.buf[this.pos++];if(n|=(a&127)<<s,!(a&128))return this.assertBounds(),[n,e]}let t=this.buf[this.pos++];if(n|=(t&15)<<28,e=(t&112)>>4,!(t&128))return this.assertBounds(),[n,e];for(let s=3;s<=31;s+=7){let a=this.buf[this.pos++];if(e|=(a&127)<<s,!(a&128))return this.assertBounds(),[n,e]}throw new Error("invalid varint")}function $t(n,e,t){for(let r=0;r<28;r=r+7){const i=n>>>r,l=!(!(i>>>7)&&e==0),m=(l?i|128:i)&255;if(t.push(m),!l)return}const s=n>>>28&15|(e&7)<<4,a=!!(e>>3);if(t.push((a?s|128:s)&255),!!a){for(let r=3;r<31;r=r+7){const i=e>>>r,l=!!(i>>>7),m=(l?i|128:i)&255;if(t.push(m),!l)return}t.push(e>>>31&1)}}const ct=4294967296;function As(n){const e=n[0]==="-";e&&(n=n.slice(1));const t=1e6;let s=0,a=0;function r(i,l){const m=Number(n.slice(i,l));a*=t,s=s*t+m,s>=ct&&(a=a+(s/ct|0),s=s%ct)}return r(-24,-18),r(-18,-12),r(-12,-6),r(-6),e?hi(s,a):Ga(s,a)}function Hc(n,e){let t=Ga(n,e);const s=t.hi&2147483648;s&&(t=hi(t.lo,t.hi));const a=Ti(t.lo,t.hi);return s?"-"+a:a}function Ti(n,e){if({lo:n,hi:e}=Zc(n,e),e<=2097151)return String(ct*e+n);const t=n&16777215,s=(n>>>24|e<<8)&16777215,a=e>>16&65535;let r=t+s*6777216+a*6710656,i=s+a*8147497,l=a*2;const m=1e7;return r>=m&&(i+=Math.floor(r/m),r%=m),i>=m&&(l+=Math.floor(i/m),i%=m),l.toString()+Es(i)+Es(r)}function Zc(n,e){return{lo:n>>>0,hi:e>>>0}}function Ga(n,e){return{lo:n|0,hi:e|0}}function hi(n,e){return e=~e,n?n=~n+1:e+=1,Ga(n,e)}const Es=n=>{const e=String(n);return"0000000".slice(e.length)+e};function bs(n,e){if(n>=0){for(;n>127;)e.push(n&127|128),n=n>>>7;e.push(n)}else{for(let t=0;t<9;t++)e.push(n&127|128),n=n>>7;e.push(1)}}function Kc(){let n=this.buf[this.pos++],e=n&127;if(!(n&128))return this.assertBounds(),e;if(n=this.buf[this.pos++],e|=(n&127)<<7,!(n&128))return this.assertBounds(),e;if(n=this.buf[this.pos++],e|=(n&127)<<14,!(n&128))return this.assertBounds(),e;if(n=this.buf[this.pos++],e|=(n&127)<<21,!(n&128))return this.assertBounds(),e;n=this.buf[this.pos++],e|=(n&15)<<28;for(let t=5;n&128&&t<10;t++)n=this.buf[this.pos++];if(n&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}var G={},ki={},bt={};bt.byteLength=el;bt.toByteArray=tl;bt.fromByteArray=rl;var Fe=[],je=[],Jc=typeof Uint8Array<"u"?Uint8Array:Array,qt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var kn=0,Xc=qt.length;kn<Xc;++kn)Fe[kn]=qt[kn],je[qt.charCodeAt(kn)]=kn;je["-".charCodeAt(0)]=62;je["_".charCodeAt(0)]=63;function Mi(n){var e=n.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=n.indexOf("=");t===-1&&(t=e);var s=t===e?0:4-t%4;return[t,s]}function el(n){var e=Mi(n),t=e[0],s=e[1];return(t+s)*3/4-s}function nl(n,e,t){return(e+t)*3/4-t}function tl(n){var e,t=Mi(n),s=t[0],a=t[1],r=new Jc(nl(n,s,a)),i=0,l=a>0?s-4:s,m;for(m=0;m<l;m+=4)e=je[n.charCodeAt(m)]<<18|je[n.charCodeAt(m+1)]<<12|je[n.charCodeAt(m+2)]<<6|je[n.charCodeAt(m+3)],r[i++]=e>>16&255,r[i++]=e>>8&255,r[i++]=e&255;return a===2&&(e=je[n.charCodeAt(m)]<<2|je[n.charCodeAt(m+1)]>>4,r[i++]=e&255),a===1&&(e=je[n.charCodeAt(m)]<<10|je[n.charCodeAt(m+1)]<<4|je[n.charCodeAt(m+2)]>>2,r[i++]=e>>8&255,r[i++]=e&255),r}function al(n){return Fe[n>>18&63]+Fe[n>>12&63]+Fe[n>>6&63]+Fe[n&63]}function sl(n,e,t){for(var s,a=[],r=e;r<t;r+=3)s=(n[r]<<16&16711680)+(n[r+1]<<8&65280)+(n[r+2]&255),a.push(al(s));return a.join("")}function rl(n){for(var e,t=n.length,s=t%3,a=[],r=16383,i=0,l=t-s;i<l;i+=r)a.push(sl(n,i,i+r>l?l:i+r));return s===1?(e=n[t-1],a.push(Fe[e>>2]+Fe[e<<4&63]+"==")):s===2&&(e=(n[t-2]<<8)+n[t-1],a.push(Fe[e>>10]+Fe[e>>4&63]+Fe[e<<2&63]+"=")),a.join("")}var Ya={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ya.read=function(n,e,t,s,a){var r,i,l=a*8-s-1,m=(1<<l)-1,d=m>>1,y=-7,h=t?a-1:0,T=t?-1:1,M=n[e+h];for(h+=T,r=M&(1<<-y)-1,M>>=-y,y+=l;y>0;r=r*256+n[e+h],h+=T,y-=8);for(i=r&(1<<-y)-1,r>>=-y,y+=s;y>0;i=i*256+n[e+h],h+=T,y-=8);if(r===0)r=1-d;else{if(r===m)return i?NaN:(M?-1:1)*(1/0);i=i+Math.pow(2,s),r=r-d}return(M?-1:1)*i*Math.pow(2,r-s)};Ya.write=function(n,e,t,s,a,r){var i,l,m,d=r*8-a-1,y=(1<<d)-1,h=y>>1,T=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=s?0:r-1,E=s?1:-1,D=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,i=y):(i=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-i))<1&&(i--,m*=2),i+h>=1?e+=T/m:e+=T*Math.pow(2,1-h),e*m>=2&&(i++,m/=2),i+h>=y?(l=0,i=y):i+h>=1?(l=(e*m-1)*Math.pow(2,a),i=i+h):(l=e*Math.pow(2,h-1)*Math.pow(2,a),i=0));a>=8;n[t+M]=l&255,M+=E,l/=256,a-=8);for(i=i<<a|l,d+=a;d>0;n[t+M]=i&255,M+=E,i/=256,d-=8);n[t+M-E]|=D*128};/*!
10
10
  * The buffer module from node.js, for the browser.
11
11
  *
12
12
  * @author Feross Aboukhadijeh <https://feross.org>
13
13
  * @license MIT
14
- */(function(n){const e=bt,t=Ya,s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=l,n.SlowBuffer=R,n.INSPECT_MAX_BYTES=50;const a=2147483647;n.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=r(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function r(){try{const p=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(p,o),p.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function i(p){if(p>a)throw new RangeError('The value "'+p+'" is invalid for option "size"');const o=new Uint8Array(p);return Object.setPrototypeOf(o,l.prototype),o}function l(p,o,u){if(typeof p=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(p)}return m(p,o,u)}l.poolSize=8192;function m(p,o,u){if(typeof p=="string")return T(p,o);if(ArrayBuffer.isView(p))return E(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(Pe(p,ArrayBuffer)||p&&Pe(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(p,SharedArrayBuffer)||p&&Pe(p.buffer,SharedArrayBuffer)))return _(p,o,u);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=p.valueOf&&p.valueOf();if(g!=null&&g!==p)return l.from(g,o,u);const k=L(p);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return l.from(p[Symbol.toPrimitive]("string"),o,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}l.from=function(p,o,u){return m(p,o,u)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function y(p,o,u){return d(p),p<=0?i(p):o!==void 0?typeof u=="string"?i(p).fill(o,u):i(p).fill(o):i(p)}l.alloc=function(p,o,u){return y(p,o,u)};function h(p){return d(p),i(p<0?0:j(p)|0)}l.allocUnsafe=function(p){return h(p)},l.allocUnsafeSlow=function(p){return h(p)};function T(p,o){if((typeof o!="string"||o==="")&&(o="utf8"),!l.isEncoding(o))throw new TypeError("Unknown encoding: "+o);const u=x(p,o)|0;let g=i(u);const k=g.write(p,o);return k!==u&&(g=g.slice(0,k)),g}function M(p){const o=p.length<0?0:j(p.length)|0,u=i(o);for(let g=0;g<o;g+=1)u[g]=p[g]&255;return u}function E(p){if(Pe(p,Uint8Array)){const o=new Uint8Array(p);return _(o.buffer,o.byteOffset,o.byteLength)}return M(p)}function _(p,o,u){if(o<0||p.byteLength<o)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<o+(u||0))throw new RangeError('"length" is outside of buffer bounds');let g;return o===void 0&&u===void 0?g=new Uint8Array(p):u===void 0?g=new Uint8Array(p,o):g=new Uint8Array(p,o,u),Object.setPrototypeOf(g,l.prototype),g}function L(p){if(l.isBuffer(p)){const o=j(p.length)|0,u=i(o);return u.length===0||p.copy(u,0,0,o),u}if(p.length!==void 0)return typeof p.length!="number"||Ft(p.length)?i(0):M(p);if(p.type==="Buffer"&&Array.isArray(p.data))return M(p.data)}function j(p){if(p>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return p|0}function R(p){return+p!=p&&(p=0),l.alloc(+p)}l.isBuffer=function(o){return o!=null&&o._isBuffer===!0&&o!==l.prototype},l.compare=function(o,u){if(Pe(o,Uint8Array)&&(o=l.from(o,o.offset,o.byteLength)),Pe(u,Uint8Array)&&(u=l.from(u,u.offset,u.byteLength)),!l.isBuffer(o)||!l.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(o===u)return 0;let g=o.length,k=u.length;for(let A=0,b=Math.min(g,k);A<b;++A)if(o[A]!==u[A]){g=o[A],k=u[A];break}return g<k?-1:k<g?1:0},l.isEncoding=function(o){switch(String(o).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(o,u){if(!Array.isArray(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return l.alloc(0);let g;if(u===void 0)for(u=0,g=0;g<o.length;++g)u+=o[g].length;const k=l.allocUnsafe(u);let A=0;for(g=0;g<o.length;++g){let b=o[g];if(Pe(b,Uint8Array))A+b.length>k.length?(l.isBuffer(b)||(b=l.from(b)),b.copy(k,A)):Uint8Array.prototype.set.call(k,b,A);else if(l.isBuffer(b))b.copy(k,A);else throw new TypeError('"list" argument must be an Array of Buffers');A+=b.length}return k};function x(p,o){if(l.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Pe(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const u=p.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&u===0)return 0;let k=!1;for(;;)switch(o){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return Un(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return tt(p).length;default:if(k)return g?-1:Un(p).length;o=(""+o).toLowerCase(),k=!0}}l.byteLength=x;function z(p,o,u){let g=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,o>>>=0,u<=o))return"";for(p||(p="utf8");;)switch(p){case"hex":return Ie(this,o,u);case"utf8":case"utf-8":return Z(this,o,u);case"ascii":return xe(this,o,u);case"latin1":case"binary":return _e(this,o,u);case"base64":return oe(this,o,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,o,u);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}l.prototype._isBuffer=!0;function U(p,o,u){const g=p[o];p[o]=p[u],p[u]=g}l.prototype.swap16=function(){const o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let u=0;u<o;u+=2)U(this,u,u+1);return this},l.prototype.swap32=function(){const o=this.length;if(o%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let u=0;u<o;u+=4)U(this,u,u+3),U(this,u+1,u+2);return this},l.prototype.swap64=function(){const o=this.length;if(o%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let u=0;u<o;u+=8)U(this,u,u+7),U(this,u+1,u+6),U(this,u+2,u+5),U(this,u+3,u+4);return this},l.prototype.toString=function(){const o=this.length;return o===0?"":arguments.length===0?Z(this,0,o):z.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(o){if(!l.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o?!0:l.compare(this,o)===0},l.prototype.inspect=function(){let o="";const u=n.INSPECT_MAX_BYTES;return o=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(o+=" ... "),"<Buffer "+o+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(o,u,g,k,A){if(Pe(o,Uint8Array)&&(o=l.from(o,o.offset,o.byteLength)),!l.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(u===void 0&&(u=0),g===void 0&&(g=o?o.length:0),k===void 0&&(k=0),A===void 0&&(A=this.length),u<0||g>o.length||k<0||A>this.length)throw new RangeError("out of range index");if(k>=A&&u>=g)return 0;if(k>=A)return-1;if(u>=g)return 1;if(u>>>=0,g>>>=0,k>>>=0,A>>>=0,this===o)return 0;let b=A-k,V=g-u;const ce=Math.min(b,V),re=this.slice(k,A),le=o.slice(u,g);for(let ae=0;ae<ce;++ae)if(re[ae]!==le[ae]){b=re[ae],V=le[ae];break}return b<V?-1:V<b?1:0};function B(p,o,u,g,k){if(p.length===0)return-1;if(typeof u=="string"?(g=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Ft(u)&&(u=k?0:p.length-1),u<0&&(u=p.length+u),u>=p.length){if(k)return-1;u=p.length-1}else if(u<0)if(k)u=0;else return-1;if(typeof o=="string"&&(o=l.from(o,g)),l.isBuffer(o))return o.length===0?-1:C(p,o,u,g,k);if(typeof o=="number")return o=o&255,typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(p,o,u):Uint8Array.prototype.lastIndexOf.call(p,o,u):C(p,[o],u,g,k);throw new TypeError("val must be string, number or Buffer")}function C(p,o,u,g,k){let A=1,b=p.length,V=o.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||o.length<2)return-1;A=2,b/=2,V/=2,u/=2}function ce(le,ae){return A===1?le[ae]:le.readUInt16BE(ae*A)}let re;if(k){let le=-1;for(re=u;re<b;re++)if(ce(p,re)===ce(o,le===-1?0:re-le)){if(le===-1&&(le=re),re-le+1===V)return le*A}else le!==-1&&(re-=re-le),le=-1}else for(u+V>b&&(u=b-V),re=u;re>=0;re--){let le=!0;for(let ae=0;ae<V;ae++)if(ce(p,re+ae)!==ce(o,ae)){le=!1;break}if(le)return re}return-1}l.prototype.includes=function(o,u,g){return this.indexOf(o,u,g)!==-1},l.prototype.indexOf=function(o,u,g){return B(this,o,u,g,!0)},l.prototype.lastIndexOf=function(o,u,g){return B(this,o,u,g,!1)};function H(p,o,u,g){u=Number(u)||0;const k=p.length-u;g?(g=Number(g),g>k&&(g=k)):g=k;const A=o.length;g>A/2&&(g=A/2);let b;for(b=0;b<g;++b){const V=parseInt(o.substr(b*2,2),16);if(Ft(V))return b;p[u+b]=V}return b}function ne(p,o,u,g){return Pn(Un(o,p.length-u),p,u,g)}function se(p,o,u,g){return Pn(Qt(o),p,u,g)}function ie(p,o,u,g){return Pn(tt(o),p,u,g)}function ue(p,o,u,g){return Pn(w(o,p.length-u),p,u,g)}l.prototype.write=function(o,u,g,k){if(u===void 0)k="utf8",g=this.length,u=0;else if(g===void 0&&typeof u=="string")k=u,g=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(g)?(g=g>>>0,k===void 0&&(k="utf8")):(k=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const A=this.length-u;if((g===void 0||g>A)&&(g=A),o.length>0&&(g<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");let b=!1;for(;;)switch(k){case"hex":return H(this,o,u,g);case"utf8":case"utf-8":return ne(this,o,u,g);case"ascii":case"latin1":case"binary":return se(this,o,u,g);case"base64":return ie(this,o,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,o,u,g);default:if(b)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),b=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(p,o,u){return o===0&&u===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(o,u))}function Z(p,o,u){u=Math.min(p.length,u);const g=[];let k=o;for(;k<u;){const A=p[k];let b=null,V=A>239?4:A>223?3:A>191?2:1;if(k+V<=u){let ce,re,le,ae;switch(V){case 1:A<128&&(b=A);break;case 2:ce=p[k+1],(ce&192)===128&&(ae=(A&31)<<6|ce&63,ae>127&&(b=ae));break;case 3:ce=p[k+1],re=p[k+2],(ce&192)===128&&(re&192)===128&&(ae=(A&15)<<12|(ce&63)<<6|re&63,ae>2047&&(ae<55296||ae>57343)&&(b=ae));break;case 4:ce=p[k+1],re=p[k+2],le=p[k+3],(ce&192)===128&&(re&192)===128&&(le&192)===128&&(ae=(A&15)<<18|(ce&63)<<12|(re&63)<<6|le&63,ae>65535&&ae<1114112&&(b=ae))}}b===null?(b=65533,V=1):b>65535&&(b-=65536,g.push(b>>>10&1023|55296),b=56320|b&1023),g.push(b),k+=V}return Ee(g)}const me=4096;function Ee(p){const o=p.length;if(o<=me)return String.fromCharCode.apply(String,p);let u="",g=0;for(;g<o;)u+=String.fromCharCode.apply(String,p.slice(g,g+=me));return u}function xe(p,o,u){let g="";u=Math.min(p.length,u);for(let k=o;k<u;++k)g+=String.fromCharCode(p[k]&127);return g}function _e(p,o,u){let g="";u=Math.min(p.length,u);for(let k=o;k<u;++k)g+=String.fromCharCode(p[k]);return g}function Ie(p,o,u){const g=p.length;(!o||o<0)&&(o=0),(!u||u<0||u>g)&&(u=g);let k="";for(let A=o;A<u;++A)k+=Ho[p[A]];return k}function Se(p,o,u){const g=p.slice(o,u);let k="";for(let A=0;A<g.length-1;A+=2)k+=String.fromCharCode(g[A]+g[A+1]*256);return k}l.prototype.slice=function(o,u){const g=this.length;o=~~o,u=u===void 0?g:~~u,o<0?(o+=g,o<0&&(o=0)):o>g&&(o=g),u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),u<o&&(u=o);const k=this.subarray(o,u);return Object.setPrototypeOf(k,l.prototype),k};function K(p,o,u){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+o>u)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(o,u,g){o=o>>>0,u=u>>>0,g||K(o,u,this.length);let k=this[o],A=1,b=0;for(;++b<u&&(A*=256);)k+=this[o+b]*A;return k},l.prototype.readUintBE=l.prototype.readUIntBE=function(o,u,g){o=o>>>0,u=u>>>0,g||K(o,u,this.length);let k=this[o+--u],A=1;for(;u>0&&(A*=256);)k+=this[o+--u]*A;return k},l.prototype.readUint8=l.prototype.readUInt8=function(o,u){return o=o>>>0,u||K(o,1,this.length),this[o]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(o,u){return o=o>>>0,u||K(o,2,this.length),this[o]|this[o+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(o,u){return o=o>>>0,u||K(o,2,this.length),this[o]<<8|this[o+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(o,u){return o=o>>>0,u||K(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])},l.prototype.readBigUInt64LE=Xe(function(o){o=o>>>0,Ce(o,"offset");const u=this[o],g=this[o+7];(u===void 0||g===void 0)&&we(o,this.length-8);const k=u+this[++o]*2**8+this[++o]*2**16+this[++o]*2**24,A=this[++o]+this[++o]*2**8+this[++o]*2**16+g*2**24;return BigInt(k)+(BigInt(A)<<BigInt(32))}),l.prototype.readBigUInt64BE=Xe(function(o){o=o>>>0,Ce(o,"offset");const u=this[o],g=this[o+7];(u===void 0||g===void 0)&&we(o,this.length-8);const k=u*2**24+this[++o]*2**16+this[++o]*2**8+this[++o],A=this[++o]*2**24+this[++o]*2**16+this[++o]*2**8+g;return(BigInt(k)<<BigInt(32))+BigInt(A)}),l.prototype.readIntLE=function(o,u,g){o=o>>>0,u=u>>>0,g||K(o,u,this.length);let k=this[o],A=1,b=0;for(;++b<u&&(A*=256);)k+=this[o+b]*A;return A*=128,k>=A&&(k-=Math.pow(2,8*u)),k},l.prototype.readIntBE=function(o,u,g){o=o>>>0,u=u>>>0,g||K(o,u,this.length);let k=u,A=1,b=this[o+--k];for(;k>0&&(A*=256);)b+=this[o+--k]*A;return A*=128,b>=A&&(b-=Math.pow(2,8*u)),b},l.prototype.readInt8=function(o,u){return o=o>>>0,u||K(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]},l.prototype.readInt16LE=function(o,u){o=o>>>0,u||K(o,2,this.length);const g=this[o]|this[o+1]<<8;return g&32768?g|4294901760:g},l.prototype.readInt16BE=function(o,u){o=o>>>0,u||K(o,2,this.length);const g=this[o+1]|this[o]<<8;return g&32768?g|4294901760:g},l.prototype.readInt32LE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},l.prototype.readInt32BE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},l.prototype.readBigInt64LE=Xe(function(o){o=o>>>0,Ce(o,"offset");const u=this[o],g=this[o+7];(u===void 0||g===void 0)&&we(o,this.length-8);const k=this[o+4]+this[o+5]*2**8+this[o+6]*2**16+(g<<24);return(BigInt(k)<<BigInt(32))+BigInt(u+this[++o]*2**8+this[++o]*2**16+this[++o]*2**24)}),l.prototype.readBigInt64BE=Xe(function(o){o=o>>>0,Ce(o,"offset");const u=this[o],g=this[o+7];(u===void 0||g===void 0)&&we(o,this.length-8);const k=(u<<24)+this[++o]*2**16+this[++o]*2**8+this[++o];return(BigInt(k)<<BigInt(32))+BigInt(this[++o]*2**24+this[++o]*2**16+this[++o]*2**8+g)}),l.prototype.readFloatLE=function(o,u){return o=o>>>0,u||K(o,4,this.length),t.read(this,o,!0,23,4)},l.prototype.readFloatBE=function(o,u){return o=o>>>0,u||K(o,4,this.length),t.read(this,o,!1,23,4)},l.prototype.readDoubleLE=function(o,u){return o=o>>>0,u||K(o,8,this.length),t.read(this,o,!0,52,8)},l.prototype.readDoubleBE=function(o,u){return o=o>>>0,u||K(o,8,this.length),t.read(this,o,!1,52,8)};function N(p,o,u,g,k,A){if(!l.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>k||o<A)throw new RangeError('"value" argument is out of bounds');if(u+g>p.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(o,u,g,k){if(o=+o,u=u>>>0,g=g>>>0,!k){const V=Math.pow(2,8*g)-1;N(this,o,u,g,V,0)}let A=1,b=0;for(this[u]=o&255;++b<g&&(A*=256);)this[u+b]=o/A&255;return u+g},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(o,u,g,k){if(o=+o,u=u>>>0,g=g>>>0,!k){const V=Math.pow(2,8*g)-1;N(this,o,u,g,V,0)}let A=g-1,b=1;for(this[u+A]=o&255;--A>=0&&(b*=256);)this[u+A]=o/b&255;return u+g},l.prototype.writeUint8=l.prototype.writeUInt8=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,1,255,0),this[u]=o&255,u+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,2,65535,0),this[u]=o&255,this[u+1]=o>>>8,u+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,2,65535,0),this[u]=o>>>8,this[u+1]=o&255,u+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,4,4294967295,0),this[u+3]=o>>>24,this[u+2]=o>>>16,this[u+1]=o>>>8,this[u]=o&255,u+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,4,4294967295,0),this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255,u+4};function D(p,o,u,g,k){Ue(o,g,k,p,u,7);let A=Number(o&BigInt(4294967295));p[u++]=A,A=A>>8,p[u++]=A,A=A>>8,p[u++]=A,A=A>>8,p[u++]=A;let b=Number(o>>BigInt(32)&BigInt(4294967295));return p[u++]=b,b=b>>8,p[u++]=b,b=b>>8,p[u++]=b,b=b>>8,p[u++]=b,u}function O(p,o,u,g,k){Ue(o,g,k,p,u,7);let A=Number(o&BigInt(4294967295));p[u+7]=A,A=A>>8,p[u+6]=A,A=A>>8,p[u+5]=A,A=A>>8,p[u+4]=A;let b=Number(o>>BigInt(32)&BigInt(4294967295));return p[u+3]=b,b=b>>8,p[u+2]=b,b=b>>8,p[u+1]=b,b=b>>8,p[u]=b,u+8}l.prototype.writeBigUInt64LE=Xe(function(o,u=0){return D(this,o,u,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Xe(function(o,u=0){return O(this,o,u,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(o,u,g,k){if(o=+o,u=u>>>0,!k){const ce=Math.pow(2,8*g-1);N(this,o,u,g,ce-1,-ce)}let A=0,b=1,V=0;for(this[u]=o&255;++A<g&&(b*=256);)o<0&&V===0&&this[u+A-1]!==0&&(V=1),this[u+A]=(o/b>>0)-V&255;return u+g},l.prototype.writeIntBE=function(o,u,g,k){if(o=+o,u=u>>>0,!k){const ce=Math.pow(2,8*g-1);N(this,o,u,g,ce-1,-ce)}let A=g-1,b=1,V=0;for(this[u+A]=o&255;--A>=0&&(b*=256);)o<0&&V===0&&this[u+A+1]!==0&&(V=1),this[u+A]=(o/b>>0)-V&255;return u+g},l.prototype.writeInt8=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,1,127,-128),o<0&&(o=255+o+1),this[u]=o&255,u+1},l.prototype.writeInt16LE=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,2,32767,-32768),this[u]=o&255,this[u+1]=o>>>8,u+2},l.prototype.writeInt16BE=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,2,32767,-32768),this[u]=o>>>8,this[u+1]=o&255,u+2},l.prototype.writeInt32LE=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,4,2147483647,-2147483648),this[u]=o&255,this[u+1]=o>>>8,this[u+2]=o>>>16,this[u+3]=o>>>24,u+4},l.prototype.writeInt32BE=function(o,u,g){return o=+o,u=u>>>0,g||N(this,o,u,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255,u+4},l.prototype.writeBigInt64LE=Xe(function(o,u=0){return D(this,o,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Xe(function(o,u=0){return O(this,o,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function F(p,o,u,g,k,A){if(u+g>p.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function W(p,o,u,g,k){return o=+o,u=u>>>0,k||F(p,o,u,4),t.write(p,o,u,g,23,4),u+4}l.prototype.writeFloatLE=function(o,u,g){return W(this,o,u,!0,g)},l.prototype.writeFloatBE=function(o,u,g){return W(this,o,u,!1,g)};function J(p,o,u,g,k){return o=+o,u=u>>>0,k||F(p,o,u,8),t.write(p,o,u,g,52,8),u+8}l.prototype.writeDoubleLE=function(o,u,g){return J(this,o,u,!0,g)},l.prototype.writeDoubleBE=function(o,u,g){return J(this,o,u,!1,g)},l.prototype.copy=function(o,u,g,k){if(!l.isBuffer(o))throw new TypeError("argument should be a Buffer");if(g||(g=0),!k&&k!==0&&(k=this.length),u>=o.length&&(u=o.length),u||(u=0),k>0&&k<g&&(k=g),k===g||o.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("sourceEnd out of bounds");k>this.length&&(k=this.length),o.length-u<k-g&&(k=o.length-u+g);const A=k-g;return this===o&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,g,k):Uint8Array.prototype.set.call(o,this.subarray(g,k),u),A},l.prototype.fill=function(o,u,g,k){if(typeof o=="string"){if(typeof u=="string"?(k=u,u=0,g=this.length):typeof g=="string"&&(k=g,g=this.length),k!==void 0&&typeof k!="string")throw new TypeError("encoding must be a string");if(typeof k=="string"&&!l.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(o.length===1){const b=o.charCodeAt(0);(k==="utf8"&&b<128||k==="latin1")&&(o=b)}}else typeof o=="number"?o=o&255:typeof o=="boolean"&&(o=Number(o));if(u<0||this.length<u||this.length<g)throw new RangeError("Out of range index");if(g<=u)return this;u=u>>>0,g=g===void 0?this.length:g>>>0,o||(o=0);let A;if(typeof o=="number")for(A=u;A<g;++A)this[A]=o;else{const b=l.isBuffer(o)?o:l.from(o,k),V=b.length;if(V===0)throw new TypeError('The value "'+o+'" is invalid for argument "value"');for(A=0;A<g-u;++A)this[A+u]=b[A%V]}return this};const Y={};function $(p,o,u){Y[p]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:o.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(k){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:k,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}$("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(p,o){return`The "${p}" argument must be of type number. Received type ${typeof o}`},TypeError),$("ERR_OUT_OF_RANGE",function(p,o,u){let g=`The value of "${p}" is out of range.`,k=u;return Number.isInteger(u)&&Math.abs(u)>2**32?k=X(String(u)):typeof u=="bigint"&&(k=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(k=X(k)),k+="n"),g+=` It must be ${o}. Received ${k}`,g},RangeError);function X(p){let o="",u=p.length;const g=p[0]==="-"?1:0;for(;u>=g+4;u-=3)o=`_${p.slice(u-3,u)}${o}`;return`${p.slice(0,u)}${o}`}function Me(p,o,u){Ce(o,"offset"),(p[o]===void 0||p[o+u]===void 0)&&we(o,p.length-(u+1))}function Ue(p,o,u,g,k,A){if(p>u||p<o){const b=typeof o=="bigint"?"n":"";let V;throw A>3?o===0||o===BigInt(0)?V=`>= 0${b} and < 2${b} ** ${(A+1)*8}${b}`:V=`>= -(2${b} ** ${(A+1)*8-1}${b}) and < 2 ** ${(A+1)*8-1}${b}`:V=`>= ${o}${b} and <= ${u}${b}`,new Y.ERR_OUT_OF_RANGE("value",V,p)}Me(g,k,A)}function Ce(p,o){if(typeof p!="number")throw new Y.ERR_INVALID_ARG_TYPE(o,"number",p)}function we(p,o,u){throw Math.floor(p)!==p?(Ce(p,u),new Y.ERR_OUT_OF_RANGE(u||"offset","an integer",p)):o<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(u||"offset",`>= ${u?1:0} and <= ${o}`,p)}const hn=/[^+/0-9A-Za-z-_]/g;function nt(p){if(p=p.split("=")[0],p=p.trim().replace(hn,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function Un(p,o){o=o||1/0;let u;const g=p.length;let k=null;const A=[];for(let b=0;b<g;++b){if(u=p.charCodeAt(b),u>55295&&u<57344){if(!k){if(u>56319){(o-=3)>-1&&A.push(239,191,189);continue}else if(b+1===g){(o-=3)>-1&&A.push(239,191,189);continue}k=u;continue}if(u<56320){(o-=3)>-1&&A.push(239,191,189),k=u;continue}u=(k-55296<<10|u-56320)+65536}else k&&(o-=3)>-1&&A.push(239,191,189);if(k=null,u<128){if((o-=1)<0)break;A.push(u)}else if(u<2048){if((o-=2)<0)break;A.push(u>>6|192,u&63|128)}else if(u<65536){if((o-=3)<0)break;A.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((o-=4)<0)break;A.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return A}function Qt(p){const o=[];for(let u=0;u<p.length;++u)o.push(p.charCodeAt(u)&255);return o}function w(p,o){let u,g,k;const A=[];for(let b=0;b<p.length&&!((o-=2)<0);++b)u=p.charCodeAt(b),g=u>>8,k=u%256,A.push(k),A.push(g);return A}function tt(p){return e.toByteArray(nt(p))}function Pn(p,o,u,g){let k;for(k=0;k<g&&!(k+u>=o.length||k>=p.length);++k)o[k+u]=p[k];return k}function Pe(p,o){return p instanceof o||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===o.name}function Ft(p){return p!==p}const Ho=function(){const p="0123456789abcdef",o=new Array(256);for(let u=0;u<16;++u){const g=u*16;for(let k=0;k<16;++k)o[g+k]=p[u]+p[k]}return o}();function Xe(p){return typeof BigInt>"u"?Zo:p}function Zo(){throw new Error("BigInt not supported")}})(ki);var Ni={exports:{}},pe=Ni.exports={},Be,Qe;function Sa(){throw new Error("setTimeout has not been defined")}function Aa(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Be=setTimeout:Be=Sa}catch{Be=Sa}try{typeof clearTimeout=="function"?Qe=clearTimeout:Qe=Aa}catch{Qe=Aa}})();function Ii(n){if(Be===setTimeout)return setTimeout(n,0);if((Be===Sa||!Be)&&setTimeout)return Be=setTimeout,setTimeout(n,0);try{return Be(n,0)}catch{try{return Be.call(null,n,0)}catch{return Be.call(this,n,0)}}}function sl(n){if(Qe===clearTimeout)return clearTimeout(n);if((Qe===Aa||!Qe)&&clearTimeout)return Qe=clearTimeout,clearTimeout(n);try{return Qe(n)}catch{try{return Qe.call(null,n)}catch{return Qe.call(this,n)}}}var qe=[],_n=!1,ln,lt=-1;function rl(){!_n||!ln||(_n=!1,ln.length?qe=ln.concat(qe):lt=-1,qe.length&&Si())}function Si(){if(!_n){var n=Ii(rl);_n=!0;for(var e=qe.length;e;){for(ln=qe,qe=[];++lt<e;)ln&&ln[lt].run();lt=-1,e=qe.length}ln=null,_n=!1,sl(n)}}pe.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];qe.push(new Ai(n,e)),qe.length===1&&!_n&&Ii(Si)};function Ai(n,e){this.fun=n,this.array=e}Ai.prototype.run=function(){this.fun.apply(null,this.array)};pe.title="browser";pe.browser=!0;pe.env={};pe.argv=[];pe.version="";pe.versions={};function Je(){}pe.on=Je;pe.addListener=Je;pe.once=Je;pe.off=Je;pe.removeListener=Je;pe.removeAllListeners=Je;pe.emit=Je;pe.prependListener=Je;pe.prependOnceListener=Je;pe.listeners=function(n){return[]};pe.binding=function(n){throw new Error("process.binding is not supported")};pe.cwd=function(){return"/"};pe.chdir=function(n){throw new Error("process.chdir is not supported")};pe.umask=function(){return 0};var il=Ni.exports;(function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const e=ki,t=il,s=i=>i&&i.__esModule?i:{default:i},a=s(t),r=globalThis||void 0||self;Object.defineProperty(n,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(n,"process",{enumerable:!0,get:()=>a.default}),n.global=r})(G);function ol(){const n=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof n.getBigInt64=="function"&&typeof n.getBigUint64=="function"&&typeof n.setBigInt64=="function"&&typeof n.setBigUint64=="function"&&(typeof G.process!="object"||typeof G.process.env!="object"||!1)){const a=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),i=BigInt("0"),l=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(m){const d=typeof m=="bigint"?m:BigInt(m);if(d>r||d<a)throw new Error(`int64 invalid: ${m}`);return d},uParse(m){const d=typeof m=="bigint"?m:BigInt(m);if(d>l||d<i)throw new Error(`uint64 invalid: ${m}`);return d},enc(m){return n.setBigInt64(0,this.parse(m),!0),{lo:n.getInt32(0,!0),hi:n.getInt32(4,!0)}},uEnc(m){return n.setBigInt64(0,this.uParse(m),!0),{lo:n.getInt32(0,!0),hi:n.getInt32(4,!0)}},dec(m,d){return n.setInt32(0,m,!0),n.setInt32(4,d,!0),n.getBigInt64(0,!0)},uDec(m,d){return n.setInt32(0,m,!0),n.setInt32(4,d,!0),n.getBigUint64(0,!0)}}}const t=a=>be(/^-?[0-9]+$/.test(a),`int64 invalid: ${a}`),s=a=>be(/^[0-9]+$/.test(a),`uint64 invalid: ${a}`);return{zero:"0",supported:!1,parse(a){return typeof a!="string"&&(a=a.toString()),t(a),a},uParse(a){return typeof a!="string"&&(a=a.toString()),s(a),a},enc(a){return typeof a!="string"&&(a=a.toString()),t(a),As(a)},uEnc(a){return typeof a!="string"&&(a=a.toString()),s(a),As(a)},dec(a,r){return qc(a,r)},uDec(a,r){return Ti(a,r)}}}const he=ol();var de;(function(n){n[n.Varint=0]="Varint",n[n.Bit64=1]="Bit64",n[n.LengthDelimited=2]="LengthDelimited",n[n.StartGroup=3]="StartGroup",n[n.EndGroup=4]="EndGroup",n[n.Bit32=5]="Bit32"})(de||(de={}));class cl{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let a=0;a<this.chunks.length;a++)e+=this.chunks[a].length;let t=new Uint8Array(e),s=0;for(let a=0;a<this.chunks.length;a++)t.set(this.chunks[a],s),s+=this.chunks[a].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(Ia(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return ot(e),bs(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){di(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){Ia(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){ot(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return ot(e),e=(e<<1^e>>31)>>>0,bs(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),s=new DataView(t.buffer),a=he.enc(e);return s.setInt32(0,a.lo,!0),s.setInt32(4,a.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),s=new DataView(t.buffer),a=he.uEnc(e);return s.setInt32(0,a.lo,!0),s.setInt32(4,a.hi,!0),this.raw(t)}int64(e){let t=he.enc(e);return $t(t.lo,t.hi,this.buf),this}sint64(e){let t=he.enc(e),s=t.hi>>31,a=t.lo<<1^s,r=(t.hi<<1|t.lo>>>31)^s;return $t(a,r,this.buf),this}uint64(e){let t=he.uEnc(e);return $t(t.lo,t.hi,this.buf),this}}class ll{constructor(e,t){this.varint64=$c,this.uint32=Hc,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=t??new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,s=e&7;if(t<=0||s<0||s>5)throw new Error("illegal tag: field no "+t+" wire type "+s);return[t,s]}skip(e){let t=this.pos;switch(e){case de.Varint:for(;this.buf[this.pos++]&128;);break;case de.Bit64:this.pos+=4;case de.Bit32:this.pos+=4;break;case de.LengthDelimited:let s=this.uint32();this.pos+=s;break;case de.StartGroup:let a;for(;(a=this.tag()[1])!==de.EndGroup;)this.skip(a);break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return he.dec(...this.varint64())}uint64(){return he.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),s=-(e&1);return e=(e>>>1|(t&1)<<31)^s,t=t>>>1^s,he.dec(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return he.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return he.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}function Ea(n,e){return e instanceof Ye||!n.fieldWrapper?e:n.fieldWrapper.wrapField(e)}v.DOUBLE,v.FLOAT,v.INT64,v.UINT64,v.INT32,v.UINT32,v.BOOL,v.STRING,v.BYTES;function en(n,e,t){if(e===t)return!0;if(n==v.BYTES){if(!(e instanceof Uint8Array)||!(t instanceof Uint8Array)||e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}switch(n){case v.UINT64:case v.FIXED64:case v.INT64:case v.SFIXED64:case v.SINT64:return e==t}return!1}function ba(n,e){switch(n){case v.BOOL:return!1;case v.UINT64:case v.FIXED64:case v.INT64:case v.SFIXED64:case v.SINT64:return e==0?he.zero:"0";case v.DOUBLE:case v.FLOAT:return 0;case v.BYTES:return new Uint8Array(0);case v.STRING:return"";default:return 0}}function Ei(n,e){const t=e===void 0;let s=de.Varint,a=e===0;switch(n){case v.STRING:a=t||!e.length,s=de.LengthDelimited;break;case v.BOOL:a=e===!1;break;case v.DOUBLE:s=de.Bit64;break;case v.FLOAT:s=de.Bit32;break;case v.INT64:a=t||e==0;break;case v.UINT64:a=t||e==0;break;case v.FIXED64:a=t||e==0,s=de.Bit64;break;case v.BYTES:a=t||!e.byteLength,s=de.LengthDelimited;break;case v.FIXED32:s=de.Bit32;break;case v.SFIXED32:s=de.Bit32;break;case v.SFIXED64:a=t||e==0,s=de.Bit64;break;case v.SINT64:a=t||e==0;break}const r=v[n].toLowerCase();return[s,r,t||a]}const Mn=Symbol("@bufbuild/protobuf/unknown-fields"),Ds={readUnknownFields:!0,readerFactory:n=>new ll(n)},vs={writeUnknownFields:!0,writerFactory:()=>new cl};function ul(n){return n?Object.assign(Object.assign({},Ds),n):Ds}function ml(n){return n?Object.assign(Object.assign({},vs),n):vs}function dl(){return{makeReadOptions:ul,makeWriteOptions:ml,listUnknownFields(n){var e;return(e=n[Mn])!==null&&e!==void 0?e:[]},discardUnknownFields(n){delete n[Mn]},writeUnknownFields(n,e){const s=n[Mn];if(s)for(const a of s)e.tag(a.no,a.wireType).raw(a.data)},onUnknownField(n,e,t,s){const a=n;Array.isArray(a[Mn])||(a[Mn]=[]),a[Mn].push({no:e,wireType:t,data:s})},readMessage(n,e,t,s){const a=n.getType(),r=t===void 0?e.len:e.pos+t;for(;e.pos<r;){const[i,l]=e.tag(),m=a.fields.find(i);if(!m){const T=e.skip(l);s.readUnknownFields&&this.onUnknownField(n,i,l,T);continue}let d=n,y=m.repeated,h=m.localName;switch(m.oneof&&(d=d[m.oneof.localName],d.case!=h&&delete d.value,d.case=h,h="value"),m.kind){case"scalar":case"enum":const T=m.kind=="enum"?v.INT32:m.T;let M=ft;if(m.kind=="scalar"&&m.L>0&&(M=yl),y){let j=d[h];if(l==de.LengthDelimited&&T!=v.STRING&&T!=v.BYTES){let R=e.uint32()+e.pos;for(;e.pos<R;)j.push(M(e,T))}else j.push(M(e,T))}else d[h]=M(e,T);break;case"message":const E=m.T;y?d[h].push(ut(e,new E,s)):d[h]instanceof Ye?ut(e,d[h],s):(d[h]=ut(e,new E,s),E.fieldWrapper&&!m.oneof&&!m.repeated&&(d[h]=E.fieldWrapper.unwrapField(d[h])));break;case"map":let[_,L]=pl(m,e,s);d[h][_]=L;break}}}}}function ut(n,e,t){return e.getType().runtime.bin.readMessage(e,n,n.uint32(),t),e}function pl(n,e,t){const s=e.uint32(),a=e.pos+s;let r,i;for(;e.pos<a;){let[l]=e.tag();switch(l){case 1:r=ft(e,n.K);break;case 2:switch(n.V.kind){case"scalar":i=ft(e,n.V.T);break;case"enum":i=e.int32();break;case"message":i=ut(e,new n.V.T,t);break}break}}if(r===void 0){let l=ba(n.K,gn.BIGINT);r=n.K==v.BOOL?l.toString():l}if(typeof r!="string"&&typeof r!="number"&&(r=r.toString()),i===void 0)switch(n.V.kind){case"scalar":i=ba(n.V.T,gn.BIGINT);break;case"enum":i=0;break;case"message":i=new n.V.T;break}return[r,i]}function yl(n,e){const t=ft(n,e);return typeof t=="bigint"?t.toString():t}function ft(n,e){switch(e){case v.STRING:return n.string();case v.BOOL:return n.bool();case v.DOUBLE:return n.double();case v.FLOAT:return n.float();case v.INT32:return n.int32();case v.INT64:return n.int64();case v.UINT64:return n.uint64();case v.FIXED64:return n.fixed64();case v.BYTES:return n.bytes();case v.FIXED32:return n.fixed32();case v.SFIXED32:return n.sfixed32();case v.SFIXED64:return n.sfixed64();case v.SINT64:return n.sint64();case v.UINT32:return n.uint32();case v.SINT32:return n.sint32()}}function gl(n,e,t,s,a){n.tag(t.no,de.LengthDelimited),n.fork();let r=s;switch(t.K){case v.INT32:case v.FIXED32:case v.UINT32:case v.SFIXED32:case v.SINT32:r=Number.parseInt(s);break;case v.BOOL:be(s=="true"||s=="false"),r=s=="true";break}switch(Yn(n,t.K,1,r,!0),t.V.kind){case"scalar":Yn(n,t.V.T,2,a,!0);break;case"enum":Yn(n,v.INT32,2,a,!0);break;case"message":Da(n,e,t.V.T,2,a);break}n.join()}function Da(n,e,t,s,a){if(a!==void 0){const r=Ea(t,a);n.tag(s,de.LengthDelimited).bytes(r.toBinary(e))}}function Yn(n,e,t,s,a){let[r,i,l]=Ei(e,s);(!l||a)&&n.tag(t,r)[i](s)}function fl(n,e,t,s){if(!s.length)return;n.tag(t,de.LengthDelimited).fork();let[,a]=Ei(e);for(let r=0;r<s.length;r++)n[a](s[r]);n.join()}function Tl(){return Object.assign(Object.assign({},dl()),{writeMessage(n,e,t){const s=n.getType();for(const a of s.fields.byNumber()){let r,i=a.repeated,l=a.localName;if(a.oneof){const m=n[a.oneof.localName];if(m.case!==l)continue;r=m.value}else r=n[l];switch(a.kind){case"scalar":case"enum":let m=a.kind=="enum"?v.INT32:a.T;if(i)if(a.packed)fl(e,m,a.no,r);else for(const d of r)Yn(e,m,a.no,d,!0);else r!==void 0&&Yn(e,m,a.no,r,!!a.oneof||a.opt);break;case"message":if(i)for(const d of r)Da(e,t,a.T,a.no,d);else Da(e,t,a.T,a.no,r);break;case"map":for(const[d,y]of Object.entries(r))gl(e,t,a,d,y);break}}return t.writeUnknownFields&&this.writeUnknownFields(n,e),e}})}let $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Dt=[];for(let n=0;n<$e.length;n++)Dt[$e[n].charCodeAt(0)]=n;Dt["-".charCodeAt(0)]=$e.indexOf("+");Dt["_".charCodeAt(0)]=$e.indexOf("/");const Va={dec(n){let e=n.length*3/4;n[n.length-2]=="="?e-=2:n[n.length-1]=="="&&(e-=1);let t=new Uint8Array(e),s=0,a=0,r,i=0;for(let l=0;l<n.length;l++){if(r=Dt[n.charCodeAt(l)],r===void 0)switch(n[l]){case"=":a=0;case`
15
- `:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(a){case 0:i=r,a=1;break;case 1:t[s++]=i<<2|(r&48)>>4,i=r,a=2;break;case 2:t[s++]=(i&15)<<4|(r&60)>>2,i=r,a=3;break;case 3:t[s++]=(i&3)<<6|r,a=0;break}}if(a==1)throw Error("invalid base64 string.");return t.subarray(0,s)},enc(n){let e="",t=0,s,a=0;for(let r=0;r<n.length;r++)switch(s=n[r],t){case 0:e+=$e[s>>2],a=(s&3)<<4,t=1;break;case 1:e+=$e[a|s>>4],a=(s&15)<<2,t=2;break;case 2:e+=$e[a|s>>6],e+=$e[s&63],t=0;break}return t&&(e+=$e[a],e+="=",t==1&&(e+="=")),e}},_s={ignoreUnknownFields:!1},ws={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function hl(n){return n?Object.assign(Object.assign({},_s),n):_s}function kl(n){return n?Object.assign(Object.assign({},ws),n):ws}function Ml(n){const e=n(Nl,js);return{makeReadOptions:hl,makeWriteOptions:kl,readMessage(t,s,a,r){if(s==null||Array.isArray(s)||typeof s!="object")throw new Error(`cannot decode message ${t.typeName} from JSON: ${this.debug(s)}`);r=r??new t;const i={};for(const[l,m]of Object.entries(s)){const d=t.fields.findJsonName(l);if(!d){if(!a.ignoreUnknownFields)throw new Error(`cannot decode message ${t.typeName} from JSON: key "${l}" is unknown`);continue}let y=d.localName,h=r;if(d.oneof){if(m===null&&d.kind=="scalar")continue;const T=i[d.oneof.localName];if(T)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${d.oneof.name}" present: "${T}", "${l}"`);i[d.oneof.localName]=l,h=h[d.oneof.localName]={case:y},y="value"}if(d.repeated){if(m===null)continue;if(!Array.isArray(m))throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`);const T=h[y];for(const M of m){if(M===null)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(M)}`);let E;switch(d.kind){case"message":E=d.T.fromJson(M,a);break;case"enum":if(E=Wt(d.T,M,a.ignoreUnknownFields),E===void 0)continue;break;case"scalar":try{E=Bn(d.T,M,d.L)}catch(_){let L=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(M)}`;throw _ instanceof Error&&_.message.length>0&&(L+=`: ${_.message}`),new Error(L)}break}T.push(E)}}else if(d.kind=="map"){if(m===null)continue;if(Array.isArray(m)||typeof m!="object")throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`);const T=h[y];for(const[M,E]of Object.entries(m)){if(E===null)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: map value null`);let _;switch(d.V.kind){case"message":_=d.V.T.fromJson(E,a);break;case"enum":if(_=Wt(d.V.T,E,a.ignoreUnknownFields),_===void 0)continue;break;case"scalar":try{_=Bn(d.V.T,E,gn.BIGINT)}catch(L){let j=`cannot decode map value for field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw L instanceof Error&&L.message.length>0&&(j+=`: ${L.message}`),new Error(j)}break}try{T[Bn(d.K,d.K==v.BOOL?M=="true"?!0:M=="false"?!1:M:M,gn.BIGINT).toString()]=_}catch(L){let j=`cannot decode map key for field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw L instanceof Error&&L.message.length>0&&(j+=`: ${L.message}`),new Error(j)}}}else switch(d.kind){case"message":const T=d.T;if(m===null&&T.typeName!="google.protobuf.Value"){if(d.oneof)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: null is invalid for oneof field "${l}"`);continue}h[y]instanceof Ye?h[y].fromJson(m,a):(h[y]=T.fromJson(m,a),T.fieldWrapper&&!d.oneof&&(h[y]=T.fieldWrapper.unwrapField(h[y])));break;case"enum":const M=Wt(d.T,m,a.ignoreUnknownFields);M!==void 0&&(h[y]=M);break;case"scalar":try{h[y]=Bn(d.T,m,d.L)}catch(E){let _=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw E instanceof Error&&E.message.length>0&&(_+=`: ${E.message}`),new Error(_)}break}}return r},writeMessage(t,s){const a=t.getType(),r={};let i;try{for(const l of a.fields.byMember()){let m;if(l.kind=="oneof"){const d=t[l.localName];if(d.value===void 0)continue;if(i=l.findField(d.case),!i)throw"oneof case not found: "+d.case;m=e(i,d.value,s)}else i=l,m=e(i,t[i.localName],s);m!==void 0&&(r[s.useProtoFieldName?i.name:i.jsonName]=m)}}catch(l){const m=i?`cannot encode field ${a.typeName}.${i.name} to JSON`:`cannot encode message ${a.typeName} to JSON`,d=l instanceof Error?l.message:String(l);throw new Error(m+(d.length>0?`: ${d}`:""))}return r},readScalar:Bn,writeScalar:js,debug:bi}}function bi(n){if(n===null)return"null";switch(typeof n){case"object":return Array.isArray(n)?"array":"object";case"string":return n.length>100?"string":`"${n.split('"').join('\\"')}"`;default:return String(n)}}function Bn(n,e,t){switch(n){case v.DOUBLE:case v.FLOAT:if(e===null)return 0;if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""||typeof e=="string"&&e.trim().length!==e.length||typeof e!="string"&&typeof e!="number")break;const s=Number(e);if(Number.isNaN(s)||!Number.isFinite(s))break;return n==v.FLOAT&&di(s),s;case v.INT32:case v.FIXED32:case v.SFIXED32:case v.SINT32:case v.UINT32:if(e===null)return 0;let a;if(typeof e=="number"?a=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(a=Number(e)),a===void 0)break;return n==v.UINT32?Ia(a):ot(a),a;case v.INT64:case v.SFIXED64:case v.SINT64:if(e===null)return he.zero;if(typeof e!="number"&&typeof e!="string")break;const r=he.parse(e);return t?r.toString():r;case v.FIXED64:case v.UINT64:if(e===null)return he.zero;if(typeof e!="number"&&typeof e!="string")break;const i=he.uParse(e);return t?i.toString():i;case v.BOOL:if(e===null)return!1;if(typeof e!="boolean")break;return e;case v.STRING:if(e===null)return"";if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case v.BYTES:if(e===null||e==="")return new Uint8Array(0);if(typeof e!="string")break;return Va.dec(e)}throw new Error}function Wt(n,e,t){if(e===null)return 0;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":const s=n.findName(e);if(s||t)return s==null?void 0:s.no;break}throw new Error(`cannot decode enum ${n.typeName} from JSON: ${bi(e)}`)}function Nl(n,e,t,s){var a;if(e===void 0)return e;if(e===0&&!t)return;if(s)return e;if(n.typeName=="google.protobuf.NullValue")return null;const r=n.findNumber(e);return(a=r==null?void 0:r.name)!==null&&a!==void 0?a:e}function js(n,e,t){if(e!==void 0)switch(n){case v.INT32:case v.SFIXED32:case v.SINT32:case v.FIXED32:case v.UINT32:return be(typeof e=="number"),e!=0||t?e:void 0;case v.FLOAT:case v.DOUBLE:return be(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e!==0||t?e:void 0;case v.STRING:return be(typeof e=="string"),e.length>0||t?e:void 0;case v.BOOL:return be(typeof e=="boolean"),e||t?e:void 0;case v.UINT64:case v.FIXED64:case v.INT64:case v.SFIXED64:case v.SINT64:return be(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),t||e!=0?e.toString(10):void 0;case v.BYTES:return be(e instanceof Uint8Array),t||e.byteLength>0?Va.enc(e):void 0}}function Il(){return Ml((n,e)=>function(s,a,r){if(s.kind=="map"){const i={};switch(s.V.kind){case"scalar":for(const[m,d]of Object.entries(a)){const y=e(s.V.T,d,!0);be(y!==void 0),i[m.toString()]=y}break;case"message":for(const[m,d]of Object.entries(a))i[m.toString()]=d.toJson(r);break;case"enum":const l=s.V.T;for(const[m,d]of Object.entries(a)){be(d===void 0||typeof d=="number");const y=n(l,d,!0,r.enumAsInteger);be(y!==void 0),i[m.toString()]=y}break}return r.emitDefaultValues||Object.keys(i).length>0?i:void 0}else if(s.repeated){const i=[];switch(s.kind){case"scalar":for(let l=0;l<a.length;l++)i.push(e(s.T,a[l],!0));break;case"enum":for(let l=0;l<a.length;l++)i.push(n(s.T,a[l],!0,r.enumAsInteger));break;case"message":for(let l=0;l<a.length;l++)i.push(Ea(s.T,a[l]).toJson(r));break}return r.emitDefaultValues||i.length>0?i:void 0}else switch(s.kind){case"scalar":return e(s.T,a,!!s.oneof||s.opt||r.emitDefaultValues);case"enum":return n(s.T,a,!!s.oneof||s.opt||r.emitDefaultValues,r.enumAsInteger);case"message":return a!==void 0?Ea(s.T,a).toJson(r):void 0}})}function Sl(){return{setEnumType:yi,initPartial(n,e){if(n===void 0)return;const t=e.getType();for(const s of t.fields.byMember()){const a=s.localName,r=e,i=n;if(i[a]!==void 0)switch(s.kind){case"oneof":const l=i[a].case;if(l===void 0)continue;const m=s.findField(l);let d=i[a].value;m&&m.kind=="message"&&!(d instanceof m.T)?d=new m.T(d):m&&m.kind==="scalar"&&m.T===v.BYTES&&(d=Qn(d)),r[a]={case:l,value:d};break;case"scalar":case"enum":let y=i[a];s.T===v.BYTES&&(y=s.repeated?y.map(Qn):Qn(y)),r[a]=y;break;case"map":switch(s.V.kind){case"scalar":case"enum":if(s.V.T===v.BYTES)for(const[M,E]of Object.entries(i[a]))r[a][M]=Qn(E);else Object.assign(r[a],i[a]);break;case"message":const T=s.V.T;for(const M of Object.keys(i[a])){let E=i[a][M];T.fieldWrapper||(E=new T(E)),r[a][M]=E}break}break;case"message":const h=s.T;if(s.repeated)r[a]=i[a].map(T=>T instanceof h?T:new h(T));else if(i[a]!==void 0){const T=i[a];h.fieldWrapper?h.typeName==="google.protobuf.BytesValue"?r[a]=Qn(T):r[a]=T:r[a]=T instanceof h?T:new h(T)}break}}},equals(n,e,t){return e===t?!0:!e||!t?!1:n.fields.byMember().every(s=>{const a=e[s.localName],r=t[s.localName];if(s.repeated){if(a.length!==r.length)return!1;switch(s.kind){case"message":return a.every((i,l)=>s.T.equals(i,r[l]));case"scalar":return a.every((i,l)=>en(s.T,i,r[l]));case"enum":return a.every((i,l)=>en(v.INT32,i,r[l]))}throw new Error(`repeated cannot contain ${s.kind}`)}switch(s.kind){case"message":return s.T.equals(a,r);case"enum":return en(v.INT32,a,r);case"scalar":return en(s.T,a,r);case"oneof":if(a.case!==r.case)return!1;const i=s.findField(a.case);if(i===void 0)return!0;switch(i.kind){case"message":return i.T.equals(a.value,r.value);case"enum":return en(v.INT32,a.value,r.value);case"scalar":return en(i.T,a.value,r.value)}throw new Error(`oneof cannot contain ${i.kind}`);case"map":const l=Object.keys(a).concat(Object.keys(r));switch(s.V.kind){case"message":const m=s.V.T;return l.every(y=>m.equals(a[y],r[y]));case"enum":return l.every(y=>en(v.INT32,a[y],r[y]));case"scalar":const d=s.V.T;return l.every(y=>en(d,a[y],r[y]))}break}})},clone(n){const e=n.getType(),t=new e,s=t;for(const a of e.fields.byMember()){const r=n[a.localName];let i;if(a.repeated)i=r.map(at);else if(a.kind=="map"){i=s[a.localName];for(const[l,m]of Object.entries(r))i[l]=at(m)}else a.kind=="oneof"?i=a.findField(r.case)?{case:r.case,value:at(r.value)}:{case:void 0}:i=at(r);s[a.localName]=i}return t}}}function at(n){if(n===void 0)return n;if(n instanceof Ye)return n.clone();if(n instanceof Uint8Array){const e=new Uint8Array(n.byteLength);return e.set(n),e}return n}function Qn(n){return n instanceof Uint8Array?n:new Uint8Array(n)}class Al{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){const t={};for(const s of this.list())t[s.jsonName]=t[s.name]=s;this.jsonNames=t}return this.jsonNames[e]}find(e){if(!this.numbers){const t={};for(const s of this.list())t[s.no]=s;this.numbers=t}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,t)=>e.no-t.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let t;for(const s of this.list())s.oneof?s.oneof!==t&&(t=s.oneof,e.push(t)):e.push(s)}return this.members}}function Di(n,e){const t=vi(n);return e?t:wl(_l(t))}function El(n){return Di(n,!1)}const bl=vi;function vi(n){let e=!1;const t=[];for(let s=0;s<n.length;s++){let a=n.charAt(s);switch(a){case"_":e=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":t.push(a),e=!1;break;default:e&&(e=!1,a=a.toUpperCase()),t.push(a);break}}return t.join("")}const Dl=new Set(["constructor","toString","toJSON","valueOf"]),vl=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),_i=n=>`${n}$`,_l=n=>vl.has(n)?_i(n):n,wl=n=>Dl.has(n)?_i(n):n;class jl{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=El(e)}addField(e){be(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let t=0;t<this.fields.length;t++)this._lookup[this.fields[t].localName]=this.fields[t]}return this._lookup[e]}}const c=Vc("proto3",Il(),Tl(),Object.assign(Object.assign({},Sl()),{newFieldList(n){return new Al(n,Ol)},initFields(n){for(const e of n.getType().fields.byMember()){if(e.opt)continue;const t=e.localName,s=n;if(e.repeated){s[t]=[];continue}switch(e.kind){case"oneof":s[t]={case:void 0};break;case"enum":s[t]=0;break;case"map":s[t]={};break;case"scalar":s[t]=ba(e.T,e.L);break}}}}));function Ol(n){var e,t,s,a;const r=[];let i;for(const l of typeof n=="function"?n():n){const m=l;if(m.localName=Di(l.name,l.oneof!==void 0),m.jsonName=(e=l.jsonName)!==null&&e!==void 0?e:bl(l.name),m.repeated=(t=l.repeated)!==null&&t!==void 0?t:!1,l.kind=="scalar"&&(m.L=(s=l.L)!==null&&s!==void 0?s:gn.BIGINT),m.packed=(a=l.packed)!==null&&a!==void 0?a:l.kind=="enum"||l.kind=="scalar"&&l.T!=v.BYTES&&l.T!=v.STRING,l.oneof!==void 0){const d=typeof l.oneof=="string"?l.oneof:l.oneof.name;(!i||i.name!=d)&&(i=new jl(d)),m.oneof=i,i.addField(m)}r.push(m)}return r}var P;(function(n){n[n.Unary=0]="Unary",n[n.ServerStreaming=1]="ServerStreaming",n[n.ClientStreaming=2]="ClientStreaming",n[n.BiDiStreaming=3]="BiDiStreaming"})(P||(P={}));var Os;(function(n){n[n.NoSideEffects=1]="NoSideEffects",n[n.Idempotent=2]="Idempotent"})(Os||(Os={}));class Ae extends Ye{constructor(e){super(),this.seconds=he.zero,this.nanos=0,c.util.initPartial(e,this)}fromJson(e,t){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${c.json.debug(e)}`);const s=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!s)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const a=Date.parse(s[1]+"-"+s[2]+"-"+s[3]+"T"+s[4]+":"+s[5]+":"+s[6]+(s[8]?s[8]:"Z"));if(Number.isNaN(a))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(a<Date.parse("0001-01-01T00:00:00Z")||a>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=he.parse(a/1e3),this.nanos=0,s[7]&&(this.nanos=parseInt("1"+s[7]+"0".repeat(9-s[7].length))-1e9),this}toJson(e){const t=Number(this.seconds)*1e3;if(t<Date.parse("0001-01-01T00:00:00Z")||t>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let s="Z";if(this.nanos>0){const a=(this.nanos+1e9).toString().substring(1);a.substring(3)==="000000"?s="."+a.substring(0,3)+"Z":a.substring(6)==="000"?s="."+a.substring(0,6)+"Z":s="."+a+"Z"}return new Date(t).toISOString().replace(".000Z",s)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return Ae.fromDate(new Date)}static fromDate(e){const t=e.getTime();return new Ae({seconds:he.parse(Math.floor(t/1e3)),nanos:t%1e3*1e6})}static fromBinary(e,t){return new Ae().fromBinary(e,t)}static fromJson(e,t){return new Ae().fromJson(e,t)}static fromJsonString(e,t){return new Ae().fromJsonString(e,t)}static equals(e,t){return c.util.equals(Ae,e,t)}}Ae.runtime=c;Ae.typeName="google.protobuf.Timestamp";Ae.fields=c.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class Ge extends Ye{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),c.util.initPartial(e,this)}toJson(e){var t;if(this.typeUrl==="")return{};const s=this.typeUrlToName(this.typeUrl),a=(t=e==null?void 0:e.typeRegistry)===null||t===void 0?void 0:t.findMessage(s);if(!a)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let i=a.fromBinary(this.value).toJson(e);return(s.startsWith("google.protobuf.")||i===null||Array.isArray(i)||typeof i!="object")&&(i={value:i}),i["@type"]=this.typeUrl,i}fromJson(e,t){var s;if(e===null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e===null?"null":Array.isArray(e)?"array":typeof e}`);if(Object.keys(e).length==0)return this;const a=e["@type"];if(typeof a!="string"||a=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const r=this.typeUrlToName(a),i=(s=t==null?void 0:t.typeRegistry)===null||s===void 0?void 0:s.findMessage(r);if(!i)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${a} is not in the type registry`);let l;if(r.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))l=i.fromJson(e.value,t);else{const m=Object.assign({},e);delete m["@type"],l=i.fromJson(m,t)}return this.packFrom(l),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return this.is(e.getType())?(e.fromBinary(this.value),!0):!1}unpack(e){if(this.typeUrl==="")return;const t=e.findMessage(this.typeUrlToName(this.typeUrl));if(t)return t.fromBinary(this.value)}is(e){if(this.typeUrl==="")return!1;const t=this.typeUrlToName(this.typeUrl);let s="";return typeof e=="string"?s=e:s=e.typeName,t===s}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw new Error(`invalid type url: ${e}`);const t=e.lastIndexOf("/"),s=t>0?e.substring(t+1):e;if(!s.length)throw new Error(`invalid type url: ${e}`);return s}static pack(e){const t=new Ge;return t.packFrom(e),t}static fromBinary(e,t){return new Ge().fromBinary(e,t)}static fromJson(e,t){return new Ge().fromJson(e,t)}static fromJsonString(e,t){return new Ge().fromJsonString(e,t)}static equals(e,t){return c.util.equals(Ge,e,t)}}Ge.runtime=c;Ge.typeName="google.protobuf.Any";Ge.fields=c.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);var ee;(function(n){n[n.Canceled=1]="Canceled",n[n.Unknown=2]="Unknown",n[n.InvalidArgument=3]="InvalidArgument",n[n.DeadlineExceeded=4]="DeadlineExceeded",n[n.NotFound=5]="NotFound",n[n.AlreadyExists=6]="AlreadyExists",n[n.PermissionDenied=7]="PermissionDenied",n[n.ResourceExhausted=8]="ResourceExhausted",n[n.FailedPrecondition=9]="FailedPrecondition",n[n.Aborted=10]="Aborted",n[n.OutOfRange=11]="OutOfRange",n[n.Unimplemented=12]="Unimplemented",n[n.Internal=13]="Internal",n[n.Unavailable=14]="Unavailable",n[n.DataLoss=15]="DataLoss",n[n.Unauthenticated=16]="Unauthenticated"})(ee||(ee={}));function Ls(n){const e=ee[n];return typeof e!="string"?n.toString():e[0].toLowerCase()+e.substring(1).replace(/[A-Z]/g,t=>"_"+t.toLowerCase())}class ye extends Error{constructor(e,t=ee.Unknown,s,a,r){super(Ll(e,t)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=t,this.metadata=new Headers(s??{}),this.details=a??[],this.cause=r}static from(e,t=ee.Unknown){return e instanceof ye?e:e instanceof Error?e.name=="AbortError"?new ye(e.message,ee.Canceled):new ye(e.message,t,void 0,void 0,e):new ye(String(e),t,void 0,void 0,e)}findDetails(e){const t="typeName"in e?{findMessage:a=>a===e.typeName?e:void 0}:e,s=[];for(const a of this.details){if(a instanceof Ye){t.findMessage(a.getType().typeName)&&s.push(a);continue}const r=t.findMessage(a.type);if(r)try{s.push(r.fromBinary(a.value))}catch{}}return s}}function Ll(n,e){return n.length?`[${Ls(e)}] ${n}`:`[${Ls(e)}]`}function Rl(n,e,t){try{const s=Va.dec(n);return e?e.fromBinary(s,t):s}catch(s){throw ye.from(s,ee.DataLoss)}}function wi(n,e){const t={};for(const[s,a]of Object.entries(n.methods)){const r=e(Object.assign(Object.assign({},a),{localName:s,service:n}));r!=null&&(t[s]=r)}return t}function Rs(n){let e,t=new Uint8Array(0);function s(a){const r=new Uint8Array(t.length+a.length);r.set(t),r.set(a,t.length),t=r}return new ReadableStream({start(){e=n.getReader()},async pull(a){let r;for(;;){if(r===void 0&&t.byteLength>=5){let m=0;for(let d=1;d<5;d++)m=(m<<8)+t[d];r={flags:t[0],length:m}}if(r!==void 0&&t.byteLength>=r.length+5)break;const l=await e.read();if(l.done)break;s(l.value)}if(r===void 0){if(t.byteLength==0){a.close();return}a.error(new ye("premature end of stream",ee.DataLoss));return}const i=t.subarray(5,5+r.length);t=t.subarray(5+r.length),a.enqueue({flags:r.flags,data:i})}})}function xs(n,e){const t=new Uint8Array(e.length+5);t.set(e,5);const s=new DataView(t.buffer,t.byteOffset,t.byteLength);return s.setUint8(0,n),s.setUint32(1,e.length),t}var xl=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(r){t[r]=n[r]&&function(i){return new Promise(function(l,m){i=n[r](i),a(l,m,i.done,i.value)})}}function a(r,i,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},i)}},Hn=globalThis&&globalThis.__await||function(n){return this instanceof Hn?(this.v=n,this):new Hn(n)},Cl=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),a,r=[];return a={},i("next"),i("throw"),i("return"),a[Symbol.asyncIterator]=function(){return this},a;function i(T){s[T]&&(a[T]=function(M){return new Promise(function(E,_){r.push([T,M,E,_])>1||l(T,M)})})}function l(T,M){try{m(s[T](M))}catch(E){h(r[0][3],E)}}function m(T){T.value instanceof Hn?Promise.resolve(T.value.v).then(d,y):h(r[0][2],T)}function d(T){l("next",T)}function y(T){l("throw",T)}function h(T,M){T(M),r.shift(),r.length&&l(r[0][0],r[0][1])}},zl=globalThis&&globalThis.__asyncDelegator||function(n){var e,t;return e={},s("next"),s("throw",function(a){throw a}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(a,r){e[a]=n[a]?function(i){return(t=!t)?{value:Hn(n[a](i)),done:!1}:r?r(i):i}:r}};function ji(n){return Cl(this,arguments,function*(){yield Hn(yield*zl(xl(n)))})}var Ul=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(r){t[r]=n[r]&&function(i){return new Promise(function(l,m){i=n[r](i),a(l,m,i.done,i.value)})}}function a(r,i,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},i)}};function Pl(n,e){return wi(n,t=>{switch(t.kind){case P.Unary:return Bl(e,n,t);case P.ServerStreaming:return Ql(e,n,t);default:return null}})}function Bl(n,e,t){return function(s,a,r){const i=new AbortController;return r=Oi(i,r),n.unary(e,t,i.signal,r.timeoutMs,r.headers,s,r.contextValues).then(l=>{var m,d;(m=r==null?void 0:r.onHeader)===null||m===void 0||m.call(r,l.header),(d=r==null?void 0:r.onTrailer)===null||d===void 0||d.call(r,l.trailer),a(void 0,l.message)},l=>{const m=ye.from(l,ee.Internal);m.code===ee.Canceled&&i.signal.aborted||a(m,new t.O)}),()=>i.abort()}}function Ql(n,e,t){return function(s,a,r,i){const l=new AbortController;async function m(){var d,y,h,T,M,E;i=Oi(l,i);const _=await n.stream(e,t,i.signal,i.timeoutMs,i.headers,ji([s]),i.contextValues);(M=i.onHeader)===null||M===void 0||M.call(i,_.header);try{for(var L=!0,j=Ul(_.message),R;R=await j.next(),d=R.done,!d;L=!0)T=R.value,L=!1,a(T)}catch(x){y={error:x}}finally{try{!L&&!d&&(h=j.return)&&await h.call(j)}finally{if(y)throw y.error}}(E=i.onTrailer)===null||E===void 0||E.call(i,_.trailer),r(void 0)}return m().catch(d=>{const y=ye.from(d,ee.Internal);y.code===ee.Canceled&&l.signal.aborted?r(void 0):r(y)}),()=>l.abort()}}function Oi(n,e){return e!=null&&e.signal&&(e.signal.addEventListener("abort",()=>n.abort()),e.signal.aborted&&n.abort()),Object.assign(Object.assign({},e),{signal:n.signal})}var Li=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(r){t[r]=n[r]&&function(i){return new Promise(function(l,m){i=n[r](i),a(l,m,i.done,i.value)})}}function a(r,i,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},i)}},On=globalThis&&globalThis.__await||function(n){return this instanceof On?(this.v=n,this):new On(n)},Fl=globalThis&&globalThis.__asyncDelegator||function(n){var e,t;return e={},s("next"),s("throw",function(a){throw a}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(a,r){e[a]=n[a]?function(i){return(t=!t)?{value:On(n[a](i)),done:!1}:r?r(i):i}:r}},Gl=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),a,r=[];return a={},i("next"),i("throw"),i("return"),a[Symbol.asyncIterator]=function(){return this},a;function i(T){s[T]&&(a[T]=function(M){return new Promise(function(E,_){r.push([T,M,E,_])>1||l(T,M)})})}function l(T,M){try{m(s[T](M))}catch(E){h(r[0][3],E)}}function m(T){T.value instanceof On?Promise.resolve(T.value.v).then(d,y):h(r[0][2],T)}function d(T){l("next",T)}function y(T){l("throw",T)}function h(T,M){T(M),r.shift(),r.length&&l(r[0][0],r[0][1])}};function vt(n,e){return wi(n,t=>{switch(t.kind){case P.Unary:return Yl(e,n,t);case P.ServerStreaming:return Vl(e,n,t);case P.ClientStreaming:return $l(e,n,t);case P.BiDiStreaming:return ql(e,n,t);default:return null}})}function Yl(n,e,t){return async function(s,a){var r,i;const l=await n.unary(e,t,a==null?void 0:a.signal,a==null?void 0:a.timeoutMs,a==null?void 0:a.headers,s,a==null?void 0:a.contextValues);return(r=a==null?void 0:a.onHeader)===null||r===void 0||r.call(a,l.header),(i=a==null?void 0:a.onTrailer)===null||i===void 0||i.call(a,l.trailer),l.message}}function Vl(n,e,t){return function(s,a){return Ri(n.stream(e,t,a==null?void 0:a.signal,a==null?void 0:a.timeoutMs,a==null?void 0:a.headers,ji([s]),a==null?void 0:a.contextValues),a)}}function $l(n,e,t){return async function(s,a){var r,i,l,m,d,y;const h=await n.stream(e,t,a==null?void 0:a.signal,a==null?void 0:a.timeoutMs,a==null?void 0:a.headers,s,a==null?void 0:a.contextValues);(d=a==null?void 0:a.onHeader)===null||d===void 0||d.call(a,h.header);let T;try{for(var M=!0,E=Li(h.message),_;_=await E.next(),r=_.done,!r;M=!0)m=_.value,M=!1,T=m}catch(L){i={error:L}}finally{try{!M&&!r&&(l=E.return)&&await l.call(E)}finally{if(i)throw i.error}}if(!T)throw new ye("protocol error: missing response message",ee.Internal);return(y=a==null?void 0:a.onTrailer)===null||y===void 0||y.call(a,h.trailer),T}}function ql(n,e,t){return function(s,a){return Ri(n.stream(e,t,a==null?void 0:a.signal,a==null?void 0:a.timeoutMs,a==null?void 0:a.headers,s,a==null?void 0:a.contextValues),a)}}function Ri(n,e){const t=function(){var s,a;return Gl(this,arguments,function*(){const r=yield On(n);(s=e==null?void 0:e.onHeader)===null||s===void 0||s.call(e,r.header),yield On(yield*Fl(Li(r.message))),(a=e==null?void 0:e.onTrailer)===null||a===void 0||a.call(e,r.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>t.next()})}}function Wl(...n){const e=new AbortController,t=n.filter(a=>a!==void 0).concat(e.signal);for(const a of t){if(a.aborted){s.apply(a);break}a.addEventListener("abort",s)}function s(){e.signal.aborted||e.abort(xi(this));for(const a of t)a.removeEventListener("abort",s)}return e}function Hl(n){const e=new AbortController,t=()=>{e.abort(new ye("the operation timed out",ee.DeadlineExceeded))};let s;return n!==void 0&&(n<=0?t():s=setTimeout(t,n)),{signal:e.signal,cleanup:()=>clearTimeout(s)}}function xi(n){if(!n.aborted)return;if(n.reason!==void 0)return n.reason;const e=new Error("This operation was aborted");return e.name="AbortError",e}function Cs(){return{get(n){return n.id in this?this[n.id]:n.defaultValue},set(n,e){return this[n.id]=e,this},delete(n){return delete this[n.id],this}}}const Ht=128;function zs(n){const e=new Headers,t=new TextDecoder().decode(n).split(`\r
16
- `);for(const s of t){if(s==="")continue;const a=s.indexOf(":");if(a>0){const r=s.substring(0,a).trim(),i=s.substring(a+1).trim();e.append(r,i)}}return e}const Zl="Content-Type",Kl="Grpc-Timeout",Ci="Grpc-Status",zi="Grpc-Message",Jl="Grpc-Status-Details-Bin",Xl="User-Agent",eu="X-User-Agent",nu="X-Grpc-Web",tu="application/grpc-web+proto",au="application/grpc-web+json";class We extends Ye{constructor(e){super(),this.code=0,this.message="",this.details=[],c.util.initPartial(e,this)}static fromBinary(e,t){return new We().fromBinary(e,t)}static fromJson(e,t){return new We().fromJson(e,t)}static fromJsonString(e,t){return new We().fromJsonString(e,t)}static equals(e,t){return c.util.equals(We,e,t)}}We.runtime=c;We.typeName="google.rpc.Status";We.fields=c.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Ge,repeated:!0}]);const su="0";function Ui(n){var e;const t=n.get(Jl);if(t!=null){const a=Rl(t,We);if(a.code==0)return;const r=new ye(a.message,a.code,n);return r.details=a.details.map(i=>({type:i.typeUrl.substring(i.typeUrl.lastIndexOf("/")+1),value:i.value})),r}const s=n.get(Ci);if(s!=null){if(s===su)return;const a=parseInt(s,10);return a in ee?new ye(decodeURIComponent((e=n.get(zi))!==null&&e!==void 0?e:""),a,n):new ye(`invalid grpc-status: ${s}`,ee.Internal,n)}}function Us(n,e,t){const s=typeof e=="string"?e:e.typeName,a=typeof t=="string"?t:t.name;return n.toString().replace(/\/?$/,`/${s}/${a}`)}function Pi(n,e){return e instanceof Ye?e:new n(e)}function ru(n,e){function t(s){return s.done===!0?s:{done:s.done,value:Pi(n,s.value)}}return{[Symbol.asyncIterator](){const s=e[Symbol.asyncIterator](),a={next:()=>s.next().then(t)};return s.throw!==void 0&&(a.throw=r=>s.throw(r).then(t)),s.return!==void 0&&(a.return=r=>s.return(r).then(t)),a}}}function iu(n){var e;const t=Object.assign({},n);return(e=t.ignoreUnknownFields)!==null&&e!==void 0||(t.ignoreUnknownFields=!0),t}function Ps(n,e,t,s){const a=e?Bs(n.I,s):Qs(n.I,t);return{parse:(e?Bs(n.O,s):Qs(n.O,t)).parse,serialize:a.serialize}}function Bs(n,e){return{parse(t){try{return n.fromBinary(t,e)}catch(s){const a=s instanceof Error?s.message:String(s);throw new ye(`parse binary: ${a}`,ee.InvalidArgument)}},serialize(t){try{return t.toBinary(e)}catch(s){const a=s instanceof Error?s.message:String(s);throw new ye(`serialize binary: ${a}`,ee.Internal)}}}}function Qs(n,e){var t,s;const a=(t=e==null?void 0:e.textEncoder)!==null&&t!==void 0?t:new TextEncoder,r=(s=e==null?void 0:e.textDecoder)!==null&&s!==void 0?s:new TextDecoder,i=iu(e);return{parse(l){try{const m=r.decode(l);return n.fromJsonString(m,i)}catch(m){throw ye.from(m,ee.InvalidArgument)}},serialize(l){try{const m=l.toJsonString(i);return a.encode(m)}catch(m){throw ye.from(m,ee.Internal)}}}}function ou(n){const e=Qi(n.next,n.interceptors),[t,s,a]=Bi(n),r=Object.assign(Object.assign({},n.req),{message:Pi(n.req.method.I,n.req.message),signal:t});return e(r).then(i=>(a(),i),s)}function cu(n){const e=Qi(n.next,n.interceptors),[t,s,a]=Bi(n),r=Object.assign(Object.assign({},n.req),{message:ru(n.req.method.I,n.req.message),signal:t});let i=!1;return t.addEventListener("abort",function(){var l,m;const d=n.req.message[Symbol.asyncIterator]();i||(l=d.throw)===null||l===void 0||l.call(d,this.reason).catch(()=>{}),(m=d.return)===null||m===void 0||m.call(d).catch(()=>{})}),e(r).then(l=>Object.assign(Object.assign({},l),{message:{[Symbol.asyncIterator](){const m=l.message[Symbol.asyncIterator]();return{next(){return m.next().then(d=>(d.done==!0&&(i=!0,a()),d),s)}}}}}),s)}function Bi(n){const{signal:e,cleanup:t}=Hl(n.timeoutMs),s=Wl(n.signal,e);return[s.signal,function(r){const i=ye.from(e.aborted?xi(e):r);return s.abort(i),t(),Promise.reject(i)},function(){t(),s.abort()}]}function Qi(n,e){var t;return(t=e==null?void 0:e.concat().reverse().reduce((s,a)=>a(s),n))!==null&&t!==void 0?t:n}function lu(){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 Fs(n){const e=Ui(n);if(e)throw e}function Gs(n,e,t){const s=new Headers(t??{});return s.set(Zl,n?tu:au),s.set(nu,"1"),s.set(eu,"connect-es/1.1.2"),s.set(Xl,"connect-es/1.1.2"),e!==void 0&&s.set(Kl,`${e}m`),s}function uu(n){switch(n){case 400:return ee.Internal;case 401:return ee.Unauthenticated;case 403:return ee.PermissionDenied;case 404:return ee.Unimplemented;case 429:return ee.Unavailable;case 502:return ee.Unavailable;case 503:return ee.Unavailable;case 504:return ee.Unavailable;default:return ee.Unknown}}function Ys(n,e){var t;if(n>=200&&n<300){const s=Ui(e);if(s)throw s;return{foundStatus:e.has(Ci)}}throw new ye(decodeURIComponent((t=e.get(zi))!==null&&t!==void 0?t:`HTTP ${n}`),uu(n),e)}var un=globalThis&&globalThis.__await||function(n){return this instanceof un?(this.v=n,this):new un(n)},mu=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),a,r=[];return a={},i("next"),i("throw"),i("return"),a[Symbol.asyncIterator]=function(){return this},a;function i(T){s[T]&&(a[T]=function(M){return new Promise(function(E,_){r.push([T,M,E,_])>1||l(T,M)})})}function l(T,M){try{m(s[T](M))}catch(E){h(r[0][3],E)}}function m(T){T.value instanceof un?Promise.resolve(T.value.v).then(d,y):h(r[0][2],T)}function d(T){l("next",T)}function y(T){l("throw",T)}function h(T,M){T(M),r.shift(),r.length&&l(r[0][0],r[0][1])}};function _t(n){var e;lu();const t=(e=n.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(s,a,r,i,l,m,d){var y;const{serialize:h,parse:T}=Ps(a,t,n.jsonOptions,n.binaryOptions);return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,await ou({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!1,service:s,method:a,url:Us(n.baseUrl,s,a),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Gs(t,i,l),contextValues:d??Cs(),message:m},next:async M=>{var E;const L=await((E=n.fetch)!==null&&E!==void 0?E:globalThis.fetch)(M.url,Object.assign(Object.assign({},M.init),{headers:M.header,signal:M.signal,body:xs(0,h(M.message))}));if(Ys(L.status,L.headers),!L.body)throw"missing response body";const j=Rs(L.body).getReader();let R,x;for(;;){const z=await j.read();if(z.done)break;const{flags:U,data:B}=z.value;if(U===Ht){if(R!==void 0)throw"extra trailer";R=zs(B);continue}if(x!==void 0)throw"extra message";x=T(B)}if(R===void 0)throw"missing trailer";if(Fs(R),x===void 0)throw"missing message";return{stream:!1,header:L.headers,message:x,trailer:R}}})},async stream(s,a,r,i,l,m,d){var y;const{serialize:h,parse:T}=Ps(a,t,n.jsonOptions,n.binaryOptions);function M(_,L,j){return mu(this,arguments,function*(){const x=Rs(_).getReader();if(L){if(!(yield un(x.read())).done)throw"extra data for trailers-only";return yield un(void 0)}let z=!1;for(;;){const U=yield un(x.read());if(U.done)break;const{flags:B,data:C}=U.value;if((B&Ht)===Ht){if(z)throw"extra trailer";z=!0;const H=zs(C);Fs(H),H.forEach((ne,se)=>j.set(se,ne));continue}if(z)throw"extra message";yield yield un(T(C))}if(!z)throw"missing trailer"})}async function E(_){if(a.kind!=P.ServerStreaming)throw"The fetch API does not support streaming request bodies";const L=await _[Symbol.asyncIterator]().next();if(L.done==!0)throw"missing request message";return xs(0,h(L.value))}return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,cu({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!0,service:s,method:a,url:Us(n.baseUrl,s,a),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Gs(t,i,l),contextValues:d??Cs(),message:m},next:async _=>{var L;const R=await((L=n.fetch)!==null&&L!==void 0?L:globalThis.fetch)(_.url,Object.assign(Object.assign({},_.init),{headers:_.header,signal:_.signal,body:await E(_.message)})),{foundStatus:x}=Ys(R.status,R.headers);if(!R.body)throw"missing response body";const z=new Headers;return Object.assign(Object.assign({},_),{header:R.headers,trailer:z,message:M(R.body,x,z)})}})}}}const du=c.makeEnum("streamlayer.users.UserNotificationPreference",[{no:0,name:"USER_NOTIFICATION_PREFERENCE_UNSET",localName:"UNSET"},{no:1,name:"USER_NOTIFICATION_PREFERENCE_ALL_EVENTS",localName:"ALL_EVENTS"},{no:2,name:"USER_NOTIFICATION_PREFERENCE_IMPORTANT_EVENTS_ONLY",localName:"IMPORTANT_EVENTS_ONLY"},{no:3,name:"USER_NOTIFICATION_PREFERENCE_DAILY_SUMMARY_AND_MENTIONS",localName:"DAILY_SUMMARY_AND_MENTIONS"}]),pu=c.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),yu=c.makeMessageType("streamlayer.users.UserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:5,name:"avatar",kind:"scalar",T:9},{no:6,name:"public_chat",kind:"message",T:pu},{no:7,name:"public_name",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const gu=c.makeMessageType("streamlayer.users.UserMetadata",()=>[{no:2,name:"avatar",kind:"scalar",T:9},{no:3,name:"avatar_background_colour",kind:"scalar",T:9},{no:4,name:"timezone",kind:"scalar",T:9},{no:5,name:"notification_preference",kind:"enum",T:c.getEnumType(du)},{no:6,name:"active",kind:"scalar",T:8},{no:7,name:"first_name",kind:"scalar",T:9},{no:8,name:"last_name",kind:"scalar",T:9},{no:9,name:"roles",kind:"scalar",T:9,repeated:!0}]),fu=c.makeMessageType("streamlayer.users.ExtendedUserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"metadata",kind:"message",T:gu}]),$a=c.makeMessageType("streamlayer.users.User",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yu}]);c.makeMessageType("streamlayer.users.ExtendedUser",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:fu}]);const Tu=c.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),hu=c.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:ku},{no:2,name:"data",kind:"message",T:$a}]),ku=c.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),Mu=c.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Nu=c.makeMessageType("streamlayer.users.Referral",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"watching_game",kind:"scalar",T:9}]),Iu=c.makeMessageType("streamlayer.users.RegisterResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"requires_activation",kind:"scalar",T:8},{no:3,name:"referral",kind:"message",T:Nu}]),Su=c.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Au=c.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),Eu=c.makeMessageType("streamlayer.users.MeRequest",[]),bu=c.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:$a}]),Du=c.makeMessageType("streamlayer.users.UpdateMetadataRequest",()=>[{no:1,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:2,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),vu=c.makeMessageType("streamlayer.users.UpdateAvatarRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_avatar",kind:"scalar",T:9,oneof:"avatar"},{no:3,name:"del_avatar",kind:"scalar",T:9,oneof:"avatar"}]),_u=c.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),wu=c.makeMessageType("streamlayer.users.UpdatePublicChatNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),ju=c.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),Ou=c.makeMessageType("streamlayer.users.UpdatePublicNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),Lu=c.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),Ru=c.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),xu=c.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:Cu}]),Cu=c.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),zu=c.makeMessageType("streamlayer.users.InviteResponse",[]),Uu=c.makeMessageType("streamlayer.users.BypassAuthRequest",()=>[{no:1,name:"user_key",kind:"scalar",T:9},{no:2,name:"schema",kind:"scalar",T:9},{no:3,name:"init",kind:"scalar",T:8}]),Pu=c.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:Bu},{no:2,name:"data",kind:"message",T:$a,opt:!0}]),Bu=c.makeMessageType("streamlayer.users.BypassAuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9,opt:!0},{no:3,name:"token",kind:"scalar",T:9,opt:!0},{no:4,name:"getstream",kind:"scalar",T:9}],{localName:"BypassAuthResponse_AuthResponseMetadata"}),Jn={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:Tu,O:hu,kind:P.Unary},register:{name:"Register",I:Mu,O:Iu,kind:P.Unary},requestPassword:{name:"RequestPassword",I:Su,O:Au,kind:P.Unary},me:{name:"Me",I:Eu,O:bu,kind:P.Unary},invite:{name:"Invite",I:xu,O:zu,kind:P.Unary},bypassAuth:{name:"BypassAuth",I:Uu,O:Pu,kind:P.Unary},updateMetadata:{name:"UpdateMetadata",I:Du,O:Ru,kind:P.Unary},updateAvatar:{name:"UpdateAvatar",I:vu,O:_u,kind:P.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:wu,O:ju,kind:P.Unary},updatePublicName:{name:"UpdatePublicName",I:Ou,O:Lu,kind:P.Unary}}},Qu=async(n,e)=>{const t=_t({baseUrl:n});return await vt(Jn,t).requestPassword({id:e}),!0},Fu=async(n,e)=>{const t=_t({baseUrl:n});return await vt(Jn,t).register({id:e}),!0},Gu=async(n,e,t)=>{var i;const s=_t({baseUrl:n}),r=await vt(Jn,s).login({id:e,password:t});return(i=r==null?void 0:r.meta)==null?void 0:i.jwt};const Yu=I("div")({name:"Panel",class:"pkueuwk",propsAsIs:!1}),Vs=I("form")({name:"Form",class:"fp66u19",propsAsIs:!1}),$s=I("div")({name:"FormTitle",class:"fwojs5e",propsAsIs:!1}),Zt=I("div")({name:"FormDescription",class:"fwvt1dc",propsAsIs:!1}),Kt=I("button")({name:"FormSubmit",class:"f16e2wbc",propsAsIs:!1}),Vu=I("div")({name:"FormInputContainer",class:"f1xkchzs",propsAsIs:!1}),$u=I("div")({name:"Digits",class:"d132q1j",propsAsIs:!1}),qu=({login:n,anonymousLogin:e,host:t})=>{const[s,a]=Q.useState(""),[r,i]=Q.useState(""),[l,m]=Q.useState(""),d=async h=>{h.preventDefault();try{const T=s.replaceAll("+","");try{await Qu(t,T)}catch{await Fu(t,T)}i(T)}catch(T){window.alert(T)}},y=async h=>{if(h.preventDefault(),r&&l)try{const T=await Gu(t,r,l);T&&n?await n(T):console.log("token",T)}catch(T){window.alert(T)}};return f.jsxs(Yu,{children:[!r&&f.jsxs("div",{children:[f.jsxs(Vs,{onSubmit:d,children:[f.jsx($s,{children:"Enter your phone number"}),f.jsx(Zt,{children:"Enter your phone up for number to log in or sign an account."}),f.jsx(Vu,{children:f.jsx(Gt,{value:s,onChange:h=>a(`${h}`)})}),f.jsx(Kt,{disabled:!Gt.isValidPhoneNumber(s),type:"submit",children:"request code"})]}),e&&f.jsx(Kt,{style:{display:"block",margin:"auto"},onClick:e,children:"anonymous login"})]}),r&&f.jsxs(Vs,{onSubmit:y,children:[f.jsx($s,{children:"Enter Verification Code"}),f.jsxs(Zt,{children:["Please enter the verification code ",f.jsx("br",{}),"sent to ",f.jsx("b",{children:Gt.formatPhoneNumberIntl(s)})]}),f.jsx($u,{children:f.jsx(Xo,{autoFocus:!0,allowedCharacters:"numeric",length:4,onChange:m})}),f.jsx(Kt,{disabled:l.length!==4,type:"submit",children:"login"}),f.jsxs(Zt,{children:["Didn't get 59 the code? ",f.jsx("br",{}),"Resend Code in",f.jsx(mi,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const Wu=I("div")({name:"Container",class:"c18fa2p6",propsAsIs:!1}),Hu=I("div")({name:"Content",class:"cthywkn",propsAsIs:!1}),Zu=I("div")({name:"OnboardingHeader",class:"obeaxxh",propsAsIs:!1}),Ku=I("div")({name:"LeftBlock",class:"l1jam9nb",propsAsIs:!1}),Ju=I("div")({name:"RightBlock",class:"r17ziiq1",propsAsIs:!1}),Xu=I("img")({name:"GameIcon",class:"gxb34q2",propsAsIs:!1}),em=I("img")({name:"SponsorLogo",class:"s10k8h8y",propsAsIs:!1}),nm=I("button")({name:"CloseBtn",class:"ca5j1zk",propsAsIs:!1}),tm=I("img")({name:"IconClose",class:"i6wd7es",propsAsIs:!1}),am=I("button")({name:"OnboardingActionBtn",class:"onaxor0",propsAsIs:!1});const sm=I("div")({name:"Container",class:"c1tc3ie1",propsAsIs:!1}),rm=I("div")({name:"Content",class:"cenyr9j",propsAsIs:!1}),im=I("img")({name:"Graphic",class:"g17082th",propsAsIs:!1}),om=I("div")({name:"Headline",class:"hr58r57",propsAsIs:!1}),cm=({graphic:n,headline:e})=>f.jsx(sm,{children:f.jsxs(rm,{children:[f.jsx(im,{alt:"graphic-img-instrucrions",src:n}),f.jsx(om,{children:e})]})});const lm=I("div")({name:"Container",class:"c1k109z3",propsAsIs:!1}),um=I("div")({name:"Title",class:"tl3o9j9",propsAsIs:!1}),mm=I("div")({name:"RulesList",class:"rp7yn67",propsAsIs:!1}),dm=I("div")({name:"RulesItem",class:"r18km3gu",propsAsIs:!1}),pm=I("div")({name:"RuleNumber",class:"rtu7hsj",propsAsIs:!1}),ym=I("div")({name:"RuleText",class:"rfkkuag",propsAsIs:!1}),gm=({rules:n,rulesTitle:e,primaryColor:t})=>f.jsxs(lm,{children:[f.jsx(um,{children:e}),f.jsx(mm,{children:n==null?void 0:n.map((s,a)=>f.jsxs(dm,{children:[f.jsx(pm,{style:{backgroundColor:t},children:a+1}),f.jsx(ym,{children:s})]},a))})]}),fm="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyaWVuZHMiPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNNC4xOTIzMSA3LjAzMTI1QzIuNjYzNDYgNy4wMzEyNSAxLjQyMzA4IDguMTk5NzMgMS40MjMwOCA5LjYzOTk0QzEuNDIzMDggMTEuMDgwMiAyLjY2MzQ2IDEyLjI0ODYgNC4xOTIzMSAxMi4yNDg2QzUuNzIxMTUgMTIuMjQ4NiA2Ljk2MTU0IDExLjA4MDIgNi45NjE1NCA5LjYzOTk0QzYuOTYxNTQgOC4xOTk3MyA1LjcyMTE1IDcuMDMxMjUgNC4xOTIzMSA3LjAzMTI1Wk00LjE5MjMxIDEyLjI0ODZDMi4xNjIyNiAxMi4yNDg2IDAuNSAxMy44MTQ1IDAuNSAxNS43MjY5VjE3LjYyOUMwLjUgMTcuNjI5IDEuNDIzMDggMTguMzM1NiA0LjE5MjMxIDE4LjMzNTZDNi45NjE1NCAxOC4zMzU2IDcuODg0NjEgMTcuNjI5IDcuODg0NjEgMTcuNjI5VjE1LjcyNjlDNy44ODQ2MSAxMy44MTQ1IDYuMjIyMzYgMTIuMjQ4NiA0LjE5MjMxIDEyLjI0ODZaTTIwLjgwNzcgNy4wMzEyNUMxOS4yNzg4IDcuMDMxMjUgMTguMDM4NSA4LjE5OTczIDE4LjAzODUgOS42Mzk5NEMxOC4wMzg1IDExLjA4MDIgMTkuMjc4OCAxMi4yNDg2IDIwLjgwNzcgMTIuMjQ4NkMyMi4zMzY1IDEyLjI0ODYgMjMuNTc2OSAxMS4wODAyIDIzLjU3NjkgOS42Mzk5NEMyMy41NzY5IDguMTk5NzMgMjIuMzM2NSA3LjAzMTI1IDIwLjgwNzcgNy4wMzEyNVpNMjAuODA3NyAxMi4yNDg2QzE4Ljc3NzYgMTIuMjQ4NiAxNy4xMTU0IDEzLjgxNDUgMTcuMTE1NCAxNS43MjY5VjE3LjYyOUMxNy4xMTU0IDE3LjYyOSAxOC4wMzg1IDE4LjMzNTYgMjAuODA3NyAxOC4zMzU2QzIzLjU3NjkgMTguMzM1NiAyNC41IDE3LjYyOSAyNC41IDE3LjYyOVYxNS43MjY5QzI0LjUgMTMuODE0NSAyMi44Mzc3IDEyLjI0ODYgMjAuODA3NyAxMi4yNDg2Wk0xMi41IDEwLjUwOTVDMTAuOTcxMiAxMC41MDk1IDkuNzMwNzcgMTEuNjc4IDkuNzMwNzcgMTMuMTE4MkM5LjczMDc3IDE0LjU1ODQgMTAuOTcxMiAxNS43MjY5IDEyLjUgMTUuNzI2OUMxNC4wMjg4IDE1LjcyNjkgMTUuMjY5MiAxNC41NTg0IDE1LjI2OTIgMTMuMTE4MkMxNS4yNjkyIDExLjY3OCAxNC4wMjg4IDEwLjUwOTUgMTIuNSAxMC41MDk1Wk0xMi41IDE1LjcyNjlDMTAuNDcgMTUuNzI2OSA4LjgwNzY5IDE3LjI5MjggOC44MDc2OSAxOS4yMDUxVjIxLjEwNzNDOC44MDc2OSAyMS4xMDczIDkuNzMwNzcgMjEuODEzOCAxMi41IDIxLjgxMzhDMTUuMjY5MiAyMS44MTM4IDE2LjE5MjMgMjEuMTA3MyAxNi4xOTIzIDIxLjEwNzNWMTkuMjA1MUMxNi4xOTIzIDE3LjI5MjggMTQuNTMgMTUuNzI2OSAxMi41IDE1LjcyNjlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik04LjU4NDczIDEuNUM2Ljk2MzkyIDEuNSA1LjY0ODkzIDIuNzM4NzYgNS42NDg5MyA0LjI2NTZDNS42NDg5MyA1Ljc5MjQ1IDYuOTYzOTIgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFDMTAuMjA1NSA3LjAzMTIxIDExLjUyMDUgNS43OTI0NSAxMS41MjA1IDQuMjY1NkMxMS41MjA1IDIuNzM4NzYgMTAuMjA1NSAxLjUgOC41ODQ3MyAxLjVaTTguNTg0NzMgNy4wMzEyMUM4LjI5MDM4IDcuMDMxMjEgNy45OTIyMSA3LjAyNCA3LjY5Nzg3IDcuMTE3NjNDOC4yODY1NiA3Ljg1NTg0IDguNTg0NzMgOC43ODEzMSA4LjU4NDczIDkuNzk2ODFDOC41ODQ3MyAxMC4xNjQxIDguNDkyOTggMTAuNTI0MiA4LjQ5Mjk4IDEwLjg5MTVDOS4yNzY2MyA5Ljc4NjAxIDEwLjU0MTkgOS4wNTg1OSAxMi4wMDk4IDguODc0OTRDMTEuMzI1NiA3Ljc2OTQyIDEwLjA1MjYgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFaTTE2LjQxMzUgMS41QzE0Ljc5MjcgMS41IDEzLjQ3NzcgMi43Mzg3NiAxMy40Nzc3IDQuMjY1NkMxMy40Nzc3IDUuNzkyNDUgMTQuNzkyNyA3LjAzMTIxIDE2LjQxMzUgNy4wMzEyMUMxOC4wMzQzIDcuMDMxMjEgMTkuMzQ5MyA1Ljc5MjQ1IDE5LjM0OTMgNC4yNjU2QzE5LjM0OTMgMi43Mzg3NiAxOC4wMzQzIDEuNSAxNi40MTM1IDEuNVpNMTYuNDEzNSA3LjAzMTIxQzE0Ljk0NTYgNy4wMzEyMSAxMy42NzI3IDcuNzY5NDIgMTIuOTg4NCA4Ljg3NDk0QzE0LjQ1NjMgOS4wNTg1OSAxNS43MjE2IDkuNzg2MDEgMTYuNTA1MyAxMC44OTE1QzE2LjUwNTMgMTAuNTI0MiAxNi40MTM1IDEwLjE2NDEgMTYuNDEzNSA5Ljc5NjgxQzE2LjQxMzUgOC43ODEzMSAxNi43MTE3IDcuODU1ODQgMTcuMzAwNCA3LjExNzYzQzE3LjAwNiA3LjAyNCAxNi43MDc5IDcuMDMxMjEgMTYuNDEzNSA3LjAzMTIxWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC40Ii8+CjwvZz4KPC9zdmc+Cg==";const Tm=I("div")({name:"Container",class:"ckff0a9",propsAsIs:!1}),hm=I("div")({name:"Content",class:"czw1kx1",propsAsIs:!1}),km=I("div")({name:"InviteGameIconWrap",class:"i2e7ir3",propsAsIs:!1}),Mm=I("img")({name:"InviteGameIcon",class:"i2tfvcu",propsAsIs:!1}),Nm=I("div")({name:"Heading",class:"hnq23ee",propsAsIs:!1}),Im=I("div")({name:"Subtext",class:"s2drh5v",propsAsIs:!1}),Sm=I("button")({name:"InvateBtn",class:"iiwwayv",propsAsIs:!1}),Am=({inviteCardTitle:n,inviteCardSubtext:e,primaryColor:t})=>f.jsx(Tm,{children:f.jsxs(hm,{children:[f.jsx(km,{style:{backgroundColor:t},children:f.jsx(Mm,{alt:"invite-game-icon",src:fm})}),f.jsx(Nm,{children:n||""}),f.jsx(Im,{children:e||""}),f.jsx(Sm,{onClick:()=>{},style:{backgroundColor:t},children:"Invite friends!"})]})}),Nn={steps:!1,rules:!1,inviteCard:!1},Em=({gamification:n,closeFeature:e,steps:t,gameIcon:s,sponsorLogo:a,rules:r,rulesBtnLabel:i,rulesTitle:l,primaryColor:m,inviteCardTitle:d,inviteCardSubtext:y,inviteCardBtnLabel:h})=>{const T=async()=>{await n.submitInplay()},M=()=>{e()},[E,_]=Q.useState(0),[L,j]=Q.useState(Nn);Q.useEffect(()=>{t!=null&&t.length?j({...Nn,steps:!0}):r!=null&&r.length?j({...Nn,rules:!0}):j({...Nn,inviteCard:!0})},[]);const R=Q.useCallback(()=>{t!=null&&t.length&&E<t.length-1?_(x=>++x):r!=null&&r.length&&L.steps?j({...Nn,rules:!0}):L.rules&&j({...Nn,inviteCard:!0})},[E,t==null?void 0:t.length,r==null?void 0:r.length,L,_,j]);return f.jsxs(Wu,{children:[f.jsxs(Zu,{children:[f.jsx(Ku,{children:s&&f.jsx(Xu,{alt:"sponsor-one-onboarding-icon",src:s})}),f.jsxs(Ju,{children:[a&&f.jsx(em,{alt:"sponsor-two-onboarding-icon",src:a}),f.jsx(nm,{onClick:M,children:f.jsx(tm,{alt:"icon-close-onboarding",src:Et})})]})]}),f.jsxs(Hu,{children:[L.steps&&(t==null?void 0:t.length)&&f.jsx(cm,{graphic:t[E].graphic,headline:t[E].headline}),L.rules&&f.jsx(gm,{rules:r,rulesTitle:l,primaryColor:m}),L.inviteCard&&f.jsx(Am,{inviteCardTitle:d,inviteCardSubtext:y,primaryColor:m})]}),f.jsx(am,{onClick:L.inviteCard?T:R,children:L.rules?i||"Got it!":L.inviteCard?h||"Play now!":"Next"})]})},ge=c.makeEnum("streamlayer.interactive.QuestionType",[{no:0,name:"QUESTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_TYPE_POLL",localName:"POLL"},{no:2,name:"QUESTION_TYPE_TRIVIA",localName:"TRIVIA"},{no:3,name:"QUESTION_TYPE_PREDICTION",localName:"PREDICTION"},{no:4,name:"QUESTION_TYPE_FACTOID",localName:"FACTOID"},{no:5,name:"QUESTION_TYPE_TWEET",localName:"TWEET"},{no:6,name:"QUESTION_TYPE_PROMOTION",localName:"PROMOTION"}]),bm=c.makeEnum("streamlayer.interactive.QuestionSource",[{no:0,name:"QUESTION_SOURCE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SOURCE_AI",localName:"AI"},{no:2,name:"QUESTION_SOURCE_CSV_IMPORT",localName:"CSV_IMPORT"}]),Ze=c.makeEnum("streamlayer.interactive.QuestionStatus",[{no:0,name:"QUESTION_STATUS_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_STATUS_NOT_SCHEDULED",localName:"NOT_SCHEDULED"},{no:2,name:"QUESTION_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:3,name:"QUESTION_STATUS_ACTIVE",localName:"ACTIVE"},{no:4,name:"QUESTION_STATUS_RESOLVED",localName:"RESOLVED"}]),Dm=c.makeEnum("streamlayer.interactive.QuestionPosition",[{no:0,name:"QUESTION_POSITION_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_POSITION_DEFAULT",localName:"DEFAULT"},{no:2,name:"QUESTION_POSITION_FIXED_BOTTOM",localName:"FIXED_BOTTOM"}]),vm=c.makeEnum("streamlayer.interactive.QuestionLayout",[{no:0,name:"QUESTION_LAYOUT_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_LAYOUT_LIST_VIEW",localName:"LIST_VIEW"},{no:2,name:"QUESTION_LAYOUT_GRID_VIEW",localName:"GRID_VIEW"}]),nn=c.makeEnum("streamlayer.interactive.QuestionImages",[{no:0,name:"QUESTION_IMAGES_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_IMAGES_NONE",localName:"NONE"},{no:2,name:"QUESTION_IMAGES_ROUNDED",localName:"ROUNDED"},{no:3,name:"QUESTION_IMAGES_TRANSPARENT",localName:"TRANSPARENT"},{no:4,name:"QUESTION_IMAGES_CENTERED",localName:"CENTERED"}]),Fi=c.makeEnum("streamlayer.interactive.ImagePosition",[{no:0,name:"IMAGE_POSITION_UNSET",localName:"UNSET"},{no:1,name:"IMAGE_POSITION_LEFT",localName:"LEFT"},{no:2,name:"IMAGE_POSITION_RIGHT",localName:"RIGHT"}]),_m=c.makeEnum("streamlayer.interactive.PromotionType",[{no:0,name:"PROMOTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_TYPE_INGAME_IAB21",localName:"INGAME_IAB21"},{no:2,name:"PROMOTION_TYPE_INGAME_IAB11",localName:"INGAME_IAB11"},{no:3,name:"PROMOTION_TYPE_INGAME_IAB61",localName:"INGAME_IAB61"}]),wm=c.makeEnum("streamlayer.interactive.PromotionWallet",[{no:0,name:"PROMOTION_WALLET_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_WALLET_ENABLED",localName:"ENABLED"},{no:2,name:"PROMOTION_WALLET_DISABLED",localName:"DISABLED"}]),jm=c.makeEnum("streamlayer.interactive.QuestionAutoPostState",[{no:0,name:"QUESTION_AUTO_POST_STATE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_AUTO_POST_STATE_ON",localName:"ON"},{no:2,name:"QUESTION_AUTO_POST_STATE_OFF",localName:"OFF"},{no:3,name:"QUESTION_AUTO_POST_STATE_PAUSED",localName:"PAUSED"},{no:4,name:"QUESTION_AUTO_POST_STATE_IDLE",localName:"IDLE"}]),Om=c.makeEnum("streamlayer.interactive.QuestionAutoPostStart",[{no:0,name:"QUESTION_AUTO_POST_START_NONE",localName:"NONE"},{no:1,name:"QUESTION_AUTO_POST_START_TIME",localName:"TIME"}]),Lm=c.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),Rm=c.makeEnum("streamlayer.interactive.SilenceSetting",[{no:0,name:"SILENCE_SETTING_UNSET",localName:"UNSET"},{no:1,name:"SILENCE_SETTING_ON",localName:"ON"},{no:2,name:"SILENCE_SETTING_OFF",localName:"OFF"}]),xm=c.makeEnum("streamlayer.interactive.ImportStatus",[{no:0,name:"IMPORT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"IMPORT_STATUS_PLANNED",localName:"PLANNED"},{no:2,name:"IMPORT_STATUS_RUNNING",localName:"RUNNING"},{no:3,name:"IMPORT_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"IMPORT_STATUS_FAILED",localName:"FAILED"}]),qa=c.makeMessageType("streamlayer.interactive.QuestionAppearance",()=>[{no:1,name:"layout",kind:"enum",T:c.getEnumType(vm)},{no:2,name:"images",kind:"enum",T:c.getEnumType(nn)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:c.getEnumType(Dm)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),xn=c.makeMessageType("streamlayer.interactive.Sponsorship",()=>[{no:1,name:"logo",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),wt=c.makeMessageType("streamlayer.interactive.QuestionNotification",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9},{no:3,name:"indicator_color",kind:"scalar",T:9},{no:4,name:"image_position",kind:"enum",T:c.getEnumType(Fi)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}]),Cm=c.makeMessageType("streamlayer.interactive.QuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13}]),zm=c.makeMessageType("streamlayer.interactive.ExtendedQuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13},{no:6,name:"percentage",kind:"scalar",T:13},{no:7,name:"you_voted",kind:"scalar",T:8},{no:8,name:"percentage_decimal",kind:"scalar",T:1}]),tn=c.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),Um=c.makeMessageType("streamlayer.interactive.FileLink",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"thumbnail_url",kind:"scalar",T:9}]),Pm=c.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),Bm=c.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),Qm=c.makeMessageType("streamlayer.interactive.Banner",()=>[{no:1,name:"image_url",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"cta_button",kind:"message",T:Bm}]),Wa=c.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:Fm,oneof:"options"},{no:2,name:"trivia",kind:"message",T:Gm,oneof:"options"},{no:3,name:"prediction",kind:"message",T:Ym,oneof:"options"},{no:4,name:"factoid",kind:"message",T:Vm,oneof:"options"},{no:5,name:"tweet",kind:"message",T:$m,oneof:"options"},{no:6,name:"promotion",kind:"message",T:Wm,oneof:"options"}]),Fm=c.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),Gm=c.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:tn},{no:2,name:"incorrect_feedback",kind:"message",T:tn},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),Ym=c.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:tn},{no:2,name:"incorrect_feedback",kind:"message",T:tn}],{localName:"QuestionOptions_PredictionOptions"}),Vm=c.makeMessageType("streamlayer.interactive.QuestionOptions.FactoidOptions",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"video",kind:"message",T:Um},{no:4,name:"web_link",kind:"message",T:Pm}],{localName:"QuestionOptions_FactoidOptions"}),$m=c.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions",()=>[{no:1,name:"tweet_url",kind:"scalar",T:9},{no:2,name:"tweet_id",kind:"scalar",T:9},{no:3,name:"tweet_meta",kind:"message",T:qm}],{localName:"QuestionOptions_TweetOptions"}),qm=c.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions.TweetMetadata",()=>[{no:1,name:"account",kind:"scalar",T:9},{no:2,name:"account_verified",kind:"scalar",T:8},{no:3,name:"has_media",kind:"scalar",T:8}],{localName:"QuestionOptions_TweetOptions_TweetMetadata"}),Wm=c.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(_m)},{no:2,name:"sponsor",kind:"message",T:xn},{no:3,name:"banner",kind:"message",T:Qm},{no:4,name:"enable_wallet",kind:"enum",T:c.getEnumType(wm)}],{localName:"QuestionOptions_PromotionOptions"}),Hm=c.makeMessageType("streamlayer.interactive.Tag",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"last_used_time",kind:"scalar",T:4}]),Zm=c.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),Gi=c.makeMessageType("streamlayer.interactive.Question",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ge)},{no:3,name:"subject",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:Wa},{no:5,name:"appearance",kind:"message",T:qa},{no:6,name:"sponsorship",kind:"message",T:xn},{no:7,name:"notification",kind:"message",T:wt},{no:8,name:"answers",kind:"message",T:Cm,repeated:!0},{no:9,name:"status",kind:"enum",T:c.getEnumType(Ze)},{no:10,name:"position",kind:"scalar",T:13,opt:!0},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"overrides",kind:"map",K:9,V:{kind:"scalar",T:8}},{no:15,name:"event_id",kind:"scalar",T:9},{no:16,name:"stream_timestamp",kind:"message",T:Ae},{no:17,name:"tags",kind:"message",T:Hm,repeated:!0},{no:18,name:"bypass_notifications",kind:"message",T:Ka},{no:19,name:"import_id",kind:"scalar",T:9},{no:20,name:"activation_trigger_count",kind:"scalar",T:13,opt:!0},{no:21,name:"source",kind:"enum",T:c.getEnumType(bm)},{no:22,name:"ai",kind:"message",T:Zm}]),Ha=c.makeMessageType("streamlayer.interactive.ExtendedQuestion",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ge)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"options",kind:"message",T:Wa},{no:5,name:"appearance",kind:"message",T:qa},{no:6,name:"sponsorship",kind:"message",T:xn},{no:7,name:"notification",kind:"message",T:wt},{no:8,name:"answers",kind:"message",T:zm,repeated:!0},{no:9,name:"status",kind:"enum",T:c.getEnumType(Ze)},{no:10,name:"position",kind:"scalar",T:13},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"event_id",kind:"scalar",T:9},{no:15,name:"bypass_notifications",kind:"message",T:Ka}]);c.makeMessageType("streamlayer.interactive.QuestionTimeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ge)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"activated_at",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:c.getEnumType(Ze)},{no:6,name:"options",kind:"message",T:Wa},{no:7,name:"notification",kind:"message",T:wt}]);const Yi=c.makeMessageType("streamlayer.interactive.EventModeration",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"sponsorship",kind:"message",T:xn},{no:4,name:"onboarding_enabled",kind:"scalar",T:8},{no:5,name:"question",kind:"message",T:Km},{no:6,name:"sponsors",kind:"message",T:ed},{no:7,name:"notification",kind:"message",T:nd},{no:8,name:"activated_at",kind:"message",T:Ae},{no:9,name:"deactivated_at",kind:"message",T:Ae},{no:10,name:"question_auto_post",kind:"message",T:td},{no:11,name:"bypass_notifications",kind:"message",T:Ka},{no:12,name:"importer_collaboration",kind:"message",T:md}]),Km=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:qa},{no:2,name:"trivia",kind:"message",T:Jm},{no:3,name:"prediction",kind:"message",T:Xm},{no:4,name:"correct_feedbacks",kind:"message",T:tn,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:tn,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),Jm=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),Xm=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),ed=c.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:xn,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),nd=c.makeMessageType("streamlayer.interactive.EventModeration.NotificationSettings",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"indicator_color",kind:"scalar",T:9},{no:3,name:"image_position",kind:"enum",T:c.getEnumType(Fi)},{no:4,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}],{localName:"EventModeration_NotificationSettings"}),td=c.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:c.getEnumType(jm)},{no:2,name:"interval",kind:"scalar",T:13},{no:3,name:"next_post_time",kind:"message",T:Ae},{no:4,name:"start_mode",kind:"enum",T:c.getEnumType(Om)},{no:5,name:"start_options",kind:"message",T:ad}]),ad=c.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:sd,oneof:"options"}]),sd=c.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions.TimeOptions",()=>[{no:1,name:"timestamp",kind:"scalar",T:4}],{localName:"QuestionAutoPostStartOptions_TimeOptions"});c.makeMessageType("streamlayer.interactive.AnswerData",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13}]);const Za=c.makeMessageType("streamlayer.interactive.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5},{no:3,name:"cursor",kind:"scalar",T:9}]),rd=c.makeMessageType("streamlayer.interactive.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.interactive.QuestionStats",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"question",kind:"message",T:id},{no:3,name:"statistics",kind:"message",T:od,repeated:!0}]);const id=c.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:c.getEnumType(Ze)}],{localName:"QuestionStats_QuestionData"}),od=c.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:cd}]),cd=c.makeMessageType("streamlayer.interactive.AnswerVotesStats.AnswerVotesData",()=>[{no:1,name:"count",kind:"scalar",T:13},{no:2,name:"percentage",kind:"scalar",T:13}],{localName:"AnswerVotesStats_AnswerVotesData"});c.makeMessageType("streamlayer.interactive.ServerNotificationOptions",()=>[{no:1,name:"silence",kind:"scalar",T:8},{no:2,name:"skip_update",kind:"scalar",T:8}]);const Ka=c.makeMessageType("streamlayer.interactive.BypassNotifications",()=>[{no:1,name:"in_app_silence",kind:"enum",T:c.getEnumType(Rm)}]),ld=c.makeMessageType("streamlayer.interactive.ImportError",()=>[{no:1,name:"row_id",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}]),ud=c.makeMessageType("streamlayer.interactive.ImportProgress",()=>[{no:1,name:"import_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:c.getEnumType(xm)},{no:3,name:"errors",kind:"message",T:ld,repeated:!0},{no:4,name:"last_updated",kind:"message",T:Ae}]),md=c.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:ud}}]),Gn=c.makeEnum("streamlayer.interactive.feed.PickHistoryStatus",[{no:0,name:"PICK_HISTORY_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PICK_HISTORY_STATUS_WON",localName:"WON"},{no:2,name:"PICK_HISTORY_STATUS_LOST",localName:"LOST"},{no:3,name:"PICK_HISTORY_STATUS_DNP",localName:"DNP"}]),Vi=c.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:Gi},{no:2,name:"notification",kind:"message",T:wt},{no:3,name:"moderation",kind:"message",T:Yi}]),dd=c.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]),pd=c.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:yd}]),yd=c.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse.SubscriptionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Vi}],{localName:"SubscriptionResponse_SubscriptionResponseData"}),gd=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]),fd=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Td}]),Td=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse.VotingSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ja,repeated:!0}],{localName:"VotingSubscriptionResponse_VotingSubscriptionResponseData"}),hd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:Ha}]),kd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),Md=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Nd}]),Nd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse.QuestionSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:hd}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),Id=c.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:Ha}]),Sd=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),Ad=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:Ed}]),Ed=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse.QuestionByUserResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Id}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"}),bd=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:Dd}]),Dd=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"}),vd=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:_d}]),_d=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse.SyncQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Vi}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"}),wd=c.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),jd=c.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Od}]),Od=c.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse.GetQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Gi}],{localName:"GetQuestionResponse_GetQuestionResponseData"}),Ld=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Rd=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:xd}]),xd=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse.QuestionDetailResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ha}],{localName:"QuestionDetailResponse_QuestionDetailResponseData"}),Ja=c.makeMessageType("streamlayer.interactive.feed.AnswerVoteResult",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13},{no:3,name:"voted",kind:"scalar",T:8},{no:4,name:"correct",kind:"scalar",T:8}]),Cd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:zd}]),zd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest.SubmitRequestData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9}],{localName:"SubmitAnswerRequest_SubmitRequestData"}),Ud=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:Pd}]),Pd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse.SubmitAnswerResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ja,repeated:!0}],{localName:"SubmitAnswerResponse_SubmitAnswerResponseData"}),Bd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:Qd}]),Qd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"}),Fd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]),Gd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:Yd}]),Yd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:c.getEnumType(Lm)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"}),Vd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:$d}]),$d=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse.SkipQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ja,repeated:!0}],{localName:"SkipQuestionResponse_SkipQuestionResponseData"}),qd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryRequest",()=>[{no:1,name:"question_type",kind:"enum",T:c.getEnumType(ge),repeated:!0},{no:3,name:"event_id",kind:"scalar",T:9},{no:2,name:"pagination",kind:"message",T:Za}]),Wd=c.makeMessageType("streamlayer.interactive.feed.PickHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9},{no:3,name:"status",kind:"enum",T:c.getEnumType(Gn)},{no:4,name:"question_type",kind:"enum",T:c.getEnumType(ge)},{no:5,name:"subject",kind:"scalar",T:9},{no:6,name:"text",kind:"scalar",T:9},{no:7,name:"open_for_voting",kind:"scalar",T:8},{no:8,name:"question_status",kind:"enum",T:c.getEnumType(Ze)}]),Hd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Zd,repeated:!0},{no:2,name:"meta",kind:"message",T:Kd}]),Zd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Wd}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),Kd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseMetadata",()=>[{no:1,name:"total",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"PickHistoryResponse_PickHistoryResponseMetadata"}),Jd=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Xd=c.makeMessageType("streamlayer.interactive.feed.InsightHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}]),ep=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:np,repeated:!0}]),np=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse.InsightHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Xd}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"}),tp=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),ap=c.makeMessageType("streamlayer.interactive.feed.TweetHistory",()=>[{no:1,name:"tweet_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"body",kind:"scalar",T:9},{no:5,name:"account",kind:"scalar",T:9},{no:6,name:"account_verified",kind:"scalar",T:8}]),sp=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:rp,repeated:!0}]),rp=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse.TweetHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ap}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),ip=c.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:op},{no:3,name:"moderation",kind:"message",T:Yi}]),op=c.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]),cp=c.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),lp=c.makeMessageType("streamlayer.interactive.feed.GetResponse",()=>[{no:1,name:"data",kind:"message",T:up}]),up=c.makeMessageType("streamlayer.interactive.feed.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ip}],{localName:"GetResponse_GetResponseData"}),mp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),dp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistory",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9}]),pp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:yp,repeated:!0}]),yp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse.PromotionHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:dp}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),gp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameAppearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}]),fp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameMedia",()=>[{no:1,name:"game_icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),Tp=c.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),hp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameOverview",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"auto_activate",kind:"scalar",T:8},{no:4,name:"scoring",kind:"scalar",T:8},{no:5,name:"media",kind:"message",T:fp},{no:6,name:"appearance",kind:"message",T:gp},{no:7,name:"prizes",kind:"message",T:Tp,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),kp=c.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),Mp=c.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),Np=c.makeMessageType("streamlayer.sdkSettings.game.common.GameTitleCard",()=>[{no:1,name:"visible",kind:"scalar",T:8},{no:2,name:"opt_in",kind:"scalar",T:8},{no:3,name:"title",kind:"scalar",T:9},{no:4,name:"subtitle",kind:"scalar",T:9},{no:5,name:"header",kind:"scalar",T:9},{no:6,name:"media",kind:"message",T:kp},{no:7,name:"appearance",kind:"message",T:Mp},{no:8,name:"completed",kind:"scalar",T:8}]),Ip=c.makeMessageType("streamlayer.sdkSettings.game.common.OnboardingStep",()=>[{no:1,name:"headline",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"graphic",kind:"scalar",T:9}]),Sp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:Ip,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),Ap=c.makeMessageType("streamlayer.sdkSettings.game.common.GameRules",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"button_label",kind:"scalar",T:9},{no:4,name:"numbers_color",kind:"scalar",T:9},{no:5,name:"rules",kind:"scalar",T:9,repeated:!0},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"terms",kind:"scalar",T:9},{no:8,name:"terms_url",kind:"scalar",T:9}]),Ep=c.makeMessageType("streamlayer.sdkSettings.game.common.GameInviteCard",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"subtext",kind:"scalar",T:9},{no:4,name:"button_label",kind:"scalar",T:9},{no:5,name:"icon_color",kind:"scalar",T:9},{no:6,name:"terms",kind:"scalar",T:9},{no:7,name:"completed",kind:"scalar",T:8}]),bp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:hp},{no:2,name:"title_card",kind:"message",T:Np},{no:3,name:"onboarding",kind:"message",T:Sp},{no:4,name:"rules",kind:"message",T:Ap},{no:5,name:"invite_card",kind:"message",T:Ep},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),Dp=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationGeneral",()=>[{no:1,name:"default_color",kind:"scalar",T:9},{no:2,name:"points",kind:"scalar",T:13},{no:3,name:"auto_hide_interval",kind:"scalar",T:4},{no:4,name:"insights_history_enabled",kind:"scalar",T:8},{no:5,name:"pick_history_enabled",kind:"scalar",T:8},{no:6,name:"correct_feedbacks",kind:"message",T:tn,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:tn,repeated:!0}]),vp=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationNotifications",()=>[{no:1,name:"default_image",kind:"scalar",T:9},{no:2,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}]),_p=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSponsorships",()=>[{no:1,name:"rotate",kind:"scalar",T:8},{no:2,name:"no_sponsor",kind:"scalar",T:8},{no:3,name:"sponsors",kind:"message",T:xn,repeated:!0}]),wp=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:Dp},{no:2,name:"notifications",kind:"message",T:vp},{no:3,name:"sponsorships",kind:"message",T:_p}]),ve=c.makeEnum("streamlayer.sdkSettings.SdkOverlayType",[{no:0,name:"SDK_OVERLAY_TYPE_UNSET",localName:"UNSET"},{no:1,name:"SDK_OVERLAY_TYPE_INPLAY",localName:"INPLAY"},{no:2,name:"SDK_OVERLAY_TYPE_MESSAGING",localName:"MESSAGING"},{no:3,name:"SDK_OVERLAY_TYPE_STATISTICS",localName:"STATISTICS"},{no:4,name:"SDK_OVERLAY_TYPE_BETTING",localName:"BETTING"},{no:5,name:"SDK_OVERLAY_TYPE_TWITTER",localName:"TWITTER"},{no:6,name:"SDK_OVERLAY_TYPE_MERCHANDISE",localName:"MERCHANDISE"},{no:7,name:"SDK_OVERLAY_TYPE_CONTESTS",localName:"CONTESTS"},{no:8,name:"SDK_OVERLAY_TYPE_VOICE_CHAT",localName:"VOICE_CHAT"},{no:9,name:"SDK_OVERLAY_TYPE_TICKETS",localName:"TICKETS"},{no:10,name:"SDK_OVERLAY_TYPE_WHOIS_WATCHING",localName:"WHOIS_WATCHING"},{no:11,name:"SDK_OVERLAY_TYPE_PROFILE",localName:"PROFILE"},{no:12,name:"SDK_OVERLAY_TYPE_GAMES",localName:"GAMES"},{no:13,name:"SDK_OVERLAY_TYPE_GOLF_STATISTICS",localName:"GOLF_STATISTICS"},{no:14,name:"SDK_OVERLAY_TYPE_HIGHLIGHTS",localName:"HIGHLIGHTS"},{no:15,name:"SDK_OVERLAY_TYPE_PUBLIC_CHAT",localName:"PUBLIC_CHAT"}]),jp=c.makeEnum("streamlayer.sdkSettings.BettingFavoriteType",[{no:0,name:"BETTING_FAVORITE_TYPE_UNSET",localName:"UNSET"},{no:1,name:"BETTING_FAVORITE_TYPE_LEAGUE",localName:"LEAGUE"},{no:2,name:"BETTING_FAVORITE_TYPE_TEAM",localName:"TEAM"}]),Op=c.makeEnum("streamlayer.sdkSettings.BettingSettingsTextColor",[{no:0,name:"BETTING_SETTINGS_TEXT_COLOR_UNSET",localName:"UNSET"},{no:1,name:"BETTING_SETTINGS_TEXT_COLOR_PRIMARY",localName:"PRIMARY"},{no:2,name:"BETTING_SETTINGS_TEXT_COLOR_GREY",localName:"GREY"},{no:3,name:"BETTING_SETTINGS_TEXT_COLOR_CUSTOM",localName:"CUSTOM"}]),Xa=c.makeEnum("streamlayer.sdkSettings.GetStreamChannelType",[{no:0,name:"GETSTREAM_CHANNEL_TYPE_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_TYPE_LIVESTREAM"},{no:2,name:"GETSTREAM_CHANNEL_TYPE_MESSAGING"},{no:3,name:"GETSTREAM_CHANNEL_TYPE_TEAM"},{no:4,name:"GETSTREAM_CHANNEL_TYPE_COMMERCE"},{no:5,name:"GETSTREAM_CHANNEL_TYPE_GAMING"},{no:6,name:"GETSTREAM_CHANNEL_TYPE_CUSTOM"}]),Lp=c.makeEnum("streamlayer.sdkSettings.GetStreamChannelDefault",[{no:0,name:"GETSTREAM_CHANNEL_DEFAULT_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_DEFAULT_TRUE"},{no:2,name:"GETSTREAM_CHANNEL_DEFAULT_FALSE"}]),$i=c.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),Rp=c.makeEnum("streamlayer.sdkSettings.LeaderboardKind",[{no:0,name:"LEADERBOARD_KIND_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_KIND_GLOBAL",localName:"GLOBAL"},{no:2,name:"LEADERBOARD_KIND_FRIENDS",localName:"FRIENDS"}]),xp=c.makeEnum("streamlayer.sdkSettings.PresetRuleKey",[{no:0,name:"PRESET_RULE_KEY_UNSET",localName:"UNSET"},{no:1,name:"PRESET_RULE_KEY_SPORT",localName:"SPORT"},{no:2,name:"PRESET_RULE_KEY_LEAGUE",localName:"LEAGUE"},{no:3,name:"PRESET_RULE_KEY_TEAMS",localName:"TEAMS"}]),Cp=c.makeEnum("streamlayer.sdkSettings.AdvertisingPlacement",[{no:0,name:"ADVERTISING_PLACEMENT_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_PLACEMENT_DEFAULT",localName:"DEFAULT"},{no:2,name:"ADVERTISING_PLACEMENT_WATCHPARTY_FULLSIZE",localName:"WATCHPARTY_FULLSIZE"},{no:3,name:"ADVERTISING_PLACEMENT_WATCHPARTY_VIDEOPANEL",localName:"WATCHPARTY_VIDEOPANEL"},{no:4,name:"ADVERTISING_PLACEMENT_OVERLAY_NAVBAR",localName:"OVERLAY_NAVBAR"}]);c.makeEnum("streamlayer.sdkSettings.AdvertisingType",[{no:0,name:"ADVERTISING_TYPE_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_TYPE_SPONSORS",localName:"SPONSORS"},{no:2,name:"ADVERTISING_TYPE_INTERSTITIALS",localName:"INTERSTITIALS"},{no:3,name:"ADVERTISING_TYPE_BANNERS",localName:"BANNERS"}]);const zp=c.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),Up=c.makeMessageType("streamlayer.sdkSettings.BettingFavorite",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"icon",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"type",kind:"enum",T:c.getEnumType(jp)}]),Pp=c.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),qi=c.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:Bp}]),Bp=c.makeMessageType("streamlayer.sdkSettings.BrandDefaults.Appearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}],{localName:"BrandDefaults_Appearance"}),qs=c.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:Up,repeated:!0},{no:2,name:"primary_color",kind:"scalar",T:9},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"text_color",kind:"enum",T:c.getEnumType(Op)},{no:5,name:"app_installed_text",kind:"scalar",T:9},{no:6,name:"app_not_installed_text",kind:"scalar",T:9},{no:7,name:"text_color_custom",kind:"scalar",T:9},{no:8,name:"cta_image",kind:"message",T:Pp}]),Qp=c.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:c.getEnumType($i)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:5,name:"default_channel_type",kind:"enum",T:c.getEnumType(Xa)}]),Tt=c.makeMessageType("streamlayer.sdkSettings.GetStreamChannel",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"channel_id",kind:"scalar",T:9},{no:4,name:"channel_type",kind:"enum",T:c.getEnumType(Xa)},{no:5,name:"is_default",kind:"enum",T:c.getEnumType(Lp)}]),Fp=c.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:c.getEnumType($i)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:4,name:"default_channel_type",kind:"enum",T:c.getEnumType(Xa)},{no:5,name:"default_channel",kind:"message",T:Tt},{no:6,name:"channels",kind:"message",T:Tt,repeated:!0}]),Wi=c.makeMessageType("streamlayer.sdkSettings.StreamSettings",()=>[{no:1,name:"overlays",kind:"message",T:jt,repeated:!0},{no:2,name:"custom",kind:"scalar",T:8},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"primary_color",kind:"scalar",T:9},{no:5,name:"secondary_color",kind:"scalar",T:9},{no:6,name:"moderation_primary_color",kind:"scalar",T:9},{no:7,name:"link_share_icon",kind:"scalar",T:9},{no:8,name:"link_share_text",kind:"scalar",T:9},{no:9,name:"brand_defaults",kind:"message",T:qi},{no:10,name:"getstream",kind:"message",T:Fp}]),Gp=c.makeMessageType("streamlayer.sdkSettings.JWK",()=>[{no:1,name:"alg",kind:"scalar",T:9,opt:!0},{no:2,name:"crv",kind:"scalar",T:9,opt:!0},{no:3,name:"d",kind:"scalar",T:9,opt:!0},{no:4,name:"dp",kind:"scalar",T:9,opt:!0},{no:5,name:"dq",kind:"scalar",T:9,opt:!0},{no:6,name:"e",kind:"scalar",T:9,opt:!0},{no:7,name:"ext",kind:"scalar",T:8,opt:!0},{no:8,name:"k",kind:"scalar",T:9,opt:!0},{no:9,name:"key_ops",kind:"scalar",T:9,repeated:!0},{no:10,name:"kid",kind:"scalar",T:9,opt:!0},{no:11,name:"kty",kind:"scalar",T:9,opt:!0},{no:12,name:"n",kind:"scalar",T:9,opt:!0},{no:13,name:"oth",kind:"message",T:Yp,repeated:!0},{no:14,name:"p",kind:"scalar",T:9,opt:!0},{no:15,name:"q",kind:"scalar",T:9,opt:!0},{no:16,name:"qi",kind:"scalar",T:9,opt:!0},{no:17,name:"use",kind:"scalar",T:9,opt:!0},{no:18,name:"x",kind:"scalar",T:9,opt:!0},{no:19,name:"y",kind:"scalar",T:9,opt:!0},{no:20,name:"x5c",kind:"scalar",T:9,repeated:!0},{no:21,name:"x5t",kind:"scalar",T:9,opt:!0},{no:22,name:"x5u",kind:"scalar",T:9,opt:!0}]),Yp=c.makeMessageType("streamlayer.sdkSettings.JWK.OTH",()=>[{no:1,name:"d",kind:"scalar",T:9,opt:!0},{no:2,name:"r",kind:"scalar",T:9,opt:!0},{no:3,name:"t",kind:"scalar",T:9,opt:!0}],{localName:"JWK_OTH"}),Hi=c.makeMessageType("streamlayer.sdkSettings.OrganizationSettings",()=>[{no:1,name:"overlays",kind:"message",T:jt,repeated:!0},{no:2,name:"button_icon",kind:"scalar",T:9},{no:3,name:"tinode_host",kind:"scalar",T:9},{no:4,name:"audience",kind:"scalar",T:9},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"provider",kind:"scalar",T:9},{no:7,name:"primary_color",kind:"scalar",T:9},{no:8,name:"secondary_color",kind:"scalar",T:9},{no:9,name:"moderation_primary_color",kind:"scalar",T:9},{no:10,name:"link_share_icon",kind:"scalar",T:9},{no:11,name:"link_share_text",kind:"scalar",T:9},{no:12,name:"brand_defaults",kind:"message",T:qi},{no:13,name:"pub",kind:"message",T:Gp},{no:14,name:"getstream",kind:"message",T:Qp}]),Vp=c.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:bp},{no:2,name:"moderation",kind:"message",T:wp},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:c.getEnumType(Rp)}]),Ws=c.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:Tt},{no:2,name:"channels",kind:"message",T:Tt,repeated:!0}]),Dn=c.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:zp,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:qs,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:qs,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:Vp,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:Ws,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:Ws,oneof:"overlay_settings"}]),$p=c.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:Dn},{no:2,name:"global_preset",kind:"message",T:Dn},{no:3,name:"preset",kind:"message",T:Dn},{no:4,name:"stream",kind:"message",T:Dn}]),jt=c.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(ve)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:Dn},{no:6,name:"meta",kind:"message",T:$p},{no:7,name:"enable",kind:"scalar",T:8},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:14,name:"enable_sdk_button",kind:"scalar",T:8}]);c.makeMessageType("streamlayer.sdkSettings.SdkOverlayUpdateData",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(ve)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:Dn},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"}]);c.makeMessageType("streamlayer.sdkSettings.OverlaysListRequest",[]);c.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse",()=>[{no:1,name:"data",kind:"message",T:qp}]);const qp=c.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse.OverlaysListResponseData",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:jt,repeated:!0}],{localName:"OverlaysListResponse_OverlaysListResponseData"});c.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Wp}]);const Wp=c.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse.GenerateSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateSdkKeyResponse_GenerateSdkKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Hp}]);const Hp=c.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse.RemoveSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveSdkKeyResponse_RemoveSdkKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.ListSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Zp}]);const Zp=c.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse.ListSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"ListSdkKeyResponse_ListSdkKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.RegisterTwitterRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"stream_id",kind:"scalar",T:9},{no:3,name:"account",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.RegisterTwitterResponse",[]);c.makeMessageType("streamlayer.sdkSettings.Preset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:Jp},{no:3,name:"settings",kind:"message",T:Kp}]);const Kp=c.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:jt,repeated:!0},{no:2,name:"advertising",kind:"message",T:Zi}]),Jp=c.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:c.getEnumType(xp)},{no:2,name:"value",kind:"scalar",T:9}]),Xp=c.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:Hs},{no:2,name:"videos",kind:"message",T:Hs}]),Hs=c.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraint",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5},{no:3,name:"max_file_size",kind:"scalar",T:1},{no:4,name:"mime",kind:"scalar",T:9}]),ey=c.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplate",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"constraints",kind:"map",K:9,V:{kind:"message",T:Xp}}]);c.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:ey,repeated:!0}]);const ny=c.makeMessageType("streamlayer.sdkSettings.AdvertisingImage",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"placement",kind:"enum",T:c.getEnumType(Cp)}]),ty=c.makeMessageType("streamlayer.sdkSettings.AdvertisingVideo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"background_color",kind:"scalar",T:9}]),ay=c.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:ny,repeated:!0},{no:3,name:"videos",kind:"message",T:ty,repeated:!0}]),sy=c.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:c.getEnumType(ve)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:ay}},{no:3,name:"enabled",kind:"scalar",T:8},{no:4,name:"overlay_name",kind:"scalar",T:9},{no:5,name:"use_custom",kind:"scalar",T:8,opt:!0}]),Zi=c.makeMessageType("streamlayer.sdkSettings.Advertising",()=>[{no:1,name:"template_id",kind:"scalar",T:9},{no:2,name:"overlay_settings",kind:"map",K:9,V:{kind:"message",T:sy}}]);c.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:ry}]);const ry=c.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse.GenerateApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateApiKeyResponse_GenerateApiKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"token",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:iy}]);const iy=c.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse.RemoveApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveApiKeyResponse_RemoveApiKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.GetApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:oy}]);const oy=c.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse.GetApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyResponse_GetApiKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse",()=>[{no:1,name:"data",kind:"message",T:cy}]);const cy=c.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse.GetApiKeyStudioResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyStudioResponse_GetApiKeyStudioResponseData"}),ly="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMTQuODA2MSA2LjczNjg0IDE2IDUuNjA1NzcgMTYgNC4yMTA1M1YyLjUyNjMyQzE2IDEuMTMxMDcgMTQuODA2MSAwIDEzLjMzMzMgMEgyLjY2NjY3Wk00LjQ0NDQ2IDEwLjk0NzNIMTMuMzMzM0MxMy44MjQzIDEwLjk0NzMgMTQuMjIyMiAxMS4zMjQzIDE0LjIyMjIgMTEuNzg5NFYxMy40NzM2QzE0LjIyMjIgMTMuOTM4NyAxMy44MjQzIDE0LjMxNTcgMTMuMzMzMyAxNC4zMTU3SDQuNDQ0NDZWMTAuOTQ3M1pNMCAxMS43ODk0QzAgMTAuMzk0MiAxLjE5MzkxIDkuMjYzMSAyLjY2NjY3IDkuMjYzMUgxMy4zMzMzQzE0LjgwNjEgOS4yNjMxIDE2IDEwLjM5NDIgMTYgMTEuNzg5NFYxMy40NzM2QzE2IDE0Ljg2ODkgMTQuODA2MSAxNS45OTk5IDEzLjMzMzMgMTUuOTk5OUgyLjY2NjY3QzEuMTkzOTEgMTUuOTk5OSAwIDE0Ljg2ODkgMCAxMy40NzM2VjExLjc4OTRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KPC9nPgo8L3N2Zz4K",uy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1ByZWRpY2l0b24iPgo8cGF0aCBpZD0iSWNvbi9QcmVkaWN0aW9uIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE2IDcuMDA1MjJDMTYgNy4wMDUyMiA5LjIwMDQ4IDYuODE2MDcgOS4yMDA0OCAwQzkuMjAwNDggNi4zNjE2OCAzLjI3NzI5IDYuOTUwNTYgMi40ODc1NiA3LjAwMDc4TDIuNDAwOTQgNy4wMDUyMkMyLjQwMDk0IDcuMDA1MjIgOS4yMDA0OCA3LjE5NDM1IDkuMjAwNDggMTQuMDEwNEM5LjIwMDQ4IDcuNjQ4NzcgMTUuMTIzNCA3LjA1OTg5IDE1LjkxMzEgNy4wMDk2NEwxNiA3LjAwNTIyWk02Ljk3MzgyIDEyLjU2NTJDNi45NzM4MiAxMi41NjUyIDMuNDg2OTEgMTIuNDcyNCAzLjQ4NjkxIDkuMTMwMzNDMy40ODY5MSAxMi4yNDk2IDAuNDQ5NDAyIDEyLjUzODQgMC4wNDQ0MTg2IDEyLjU2M0wwIDEyLjU2NTJDMCAxMi41NjUyIDMuNDg2OTEgMTIuNjU3OSAzLjQ4NjkxIDE2QzMuNDg2OTEgMTIuODgwNyA2LjUyNDI5IDEyLjU5MiA2LjkyOTI3IDEyLjU2NzNMNi45NzM4MiAxMi41NjUyWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",my="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1RyaXZpYSI+CjxwYXRoIGlkPSJOb3RpZmljYXRpb24vSWNvbi9Ucml2aWEiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi4wMTY2MyAxLjM4MDhDMC43Mzk5MTMgMS41NTU4NiAtMC4xNTMxNTMgMi43MzI3NiAwLjAyMTkxMiA0LjAwOTQ4TDEuMzgwOCAxMy45MTk2QzEuNTU1ODYgMTUuMTk2MyAyLjczMjc2IDE2LjA4OTQgNC4wMDk0OCAxNS45MTQzTDEzLjkxOTYgMTQuNTU1NEMxNS4xOTYzIDE0LjM4MDMgMTYuMDg5NCAxMy4yMDM0IDE1LjkxNDMgMTEuOTI2N0wxNC41NTU0IDIuMDE2NjNDMTQuMzgwMyAwLjczOTkxMyAxMy4yMDM0IC0wLjE1MzE1MyAxMS45MjY3IDAuMDIxOTEyTDIuMDE2NjMgMS4zODA4Wk05LjU5NjEzIDMuNzg4QzkuMTE0MzEgMy40Njk5MSA4LjQ3ODEzIDMuMzAxNTEgNy43NTY2IDMuMzAxNTFDNy41NDM3NyAzLjMwMTUxIDcuMzI2MjUgMy4zMTY3MSA3LjEwODcyIDMuMzQ0NzhDNi4zODgzNiAzLjQ0MDY3IDUuNjg5MDEgMy43OTAzNCA1LjE4OTY1IDQuMzAxMzhDNC42ODQ0NSA0LjgyMDYyIDQuNDM3NyA1LjQ1NTYzIDQuNTE3MjIgNi4wNDE1MUM0LjU3NDUyIDYuNDc0MiA0LjkwMDc4IDYuNzUzNyA1LjM0NjM1IDYuNzUzN0M1LjM5NDI5IDYuNzUzNyA1LjQ0MzQxIDYuNzUwMiA1LjQ5MTM2IDYuNzQ0MzVDNi4wODc3OCA2LjY2NDgzIDYuMjE2NDIgNi4yNTQzNiA2LjM0MDM2IDUuODU2NzVMNi4zNDA0NSA1Ljg1NjQ4QzYuNDgxOTIgNS40MDQwMSA2LjYxNTM0IDQuOTc3MzEgNy4zODU4NSA0Ljg3NDQ0QzcuNDY1MzcgNC44NjM5MSA3LjU0MTM4IDQuODU4MDYgNy42MTUwNiA0Ljg1ODA2QzguMTY5MzkgNC44NTgwNiA4LjUxNDM2IDUuMTUwNDIgOC41ODQ1NCA1LjY4MjUyQzguNjUzNTMgNi4yMDI5MyA4LjI0MzA3IDYuNjE4MDcgNy44MDY4NCA3LjA1NjZMNy44MDM5MyA3LjA1OTU0QzcuMzE1ODIgNy41NTIzMSA2Ljc2MzkgOC4xMDk1IDYuODY4OTUgOC45MDA4M0M2Ljg5NTg1IDkuMTA1NDggNi45ODU5IDkuMjk0OTMgNy4xMjI3MiA5LjQzNjQ0QzcuMjc4MjYgOS41OTkgNy40ODI5IDkuNjg0MzYgNy43MTMzMSA5LjY4NDM2QzcuNzU1NDEgOS42ODQzNiA3Ljc5ODY4IDkuNjgyMDMgNy44NDMxMSA5LjY3NjE4QzguNDY2OTEgOS41OTMyNCA4LjU1MTYyIDkuMjMxMzkgOC42MzMzOCA4Ljg4MjFMOC42MzM2NSA4Ljg4MDk3TDguNjM2NjEgOC44Njg1OUM4LjY2NzIzIDguNzQwMyA4LjY5ODc3IDguNjA4MTMgOC43NTk5NSA4LjQ4ODA0QzguODQ2NDkgOC4zMTYxMyA5LjA2MjgzIDguMTEyNjUgOS4zMTQyOCA3Ljg3ODc1QzkuOTE0MiA3LjMxODU4IDEwLjczNCA2LjU1MTQzIDEwLjU4MiA1LjQxNTg5QzEwLjQ4NzIgNC43MDYwMyAxMC4xNTUxIDQuMTU3NTcgOS41OTYxMSAzLjc4ODAyTDkuNTk2MTMgMy43ODhaTTguMTE2MDUgMTAuMjhDOC4wNjkyNyAxMC4yOCA4LjAyMTMyIDEwLjI4MzYgNy45NzQ1NCAxMC4yODk0QzcuMzgzOTYgMTAuMzY4OSA2Ljk2NzY1IDEwLjkxMjcgNy4wNDU5OSAxMS41MDMzQzcuMTE3MzMgMTIuMDM3NyA3LjU3ODA4IDEyLjQ0MTIgOC4xMTcyIDEyLjQ0MTJDOC4xNjM5NyAxMi40NDEyIDguMjExOTIgMTIuNDM3NyA4LjI1OTg3IDEyLjQzMThDOC44NTA0NSAxMi4zNTIzIDkuMjY1NiAxMS44MDg1IDkuMTg4NDIgMTEuMjE3OUM5LjExNTkxIDEwLjY4MjMgOC42NTUxNyAxMC4yOCA4LjExNjA1IDEwLjI4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",dy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEzLjQzMTUgMy4xODI0Nkw1LjUzMzIxIDExLjA4MDhMMS45OTc3MSA3LjU0NTI3QzEuNTQwNTYgNy4wODgxMSAwLjc5OTkxMyA3LjA4ODExIDAuMzQyODY0IDcuNTQ1MjdDLTAuMTE0Mjg4IDguMDAyNDIgLTAuMTE0Mjg4IDguNzQzMDcgMC4zNDI4NjQgOS4yMDAxMUw0LjcwNTY3IDEzLjU2MjlDNC45MzMzMSAxMy43OTA2IDUuMjM0MTUgMTMuOTA2MyA1LjUzMzA3IDEzLjkwNjNDNS44MzIwMiAxMy45MDYzIDYuMTMwOTYgMTMuNzkyNCA2LjM2MDQ4IDEzLjU2MjlMMTUuMDg2MSA0LjgzNzMxQzE1LjU0MzIgNC4zODAxNiAxNS41NDMyIDMuNjM5NTEgMTUuMDg2MSAzLjE4MjQ2QzE0LjYyOSAyLjcyNTMxIDEzLjg4ODQgMi43MjUzMSAxMy40MzEyIDMuMTgyNDZIMTMuNDMxNVoiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",py="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIyIiB5PSIwLjUwNjEwNCIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDIgMC41MDYxMDQpIiBmaWxsPSIjOWUwYTFmIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB4PSIwLjMzMzAwOCIgeT0iMTIuMTcyOSIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwLjMzMzAwOCAxMi4xNzI5KSIgZmlsbD0iIzllMGExZiIvPgo8L2c+Cjwvc3ZnPgo=",va="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const yy=I("div")({name:"Panel",class:"p1fl4kim",propsAsIs:!1}),gy=I("div")({name:"QuestionTypeIconWrap",class:"qqhwgfn",propsAsIs:!1}),fy=I("img")({name:"QuestionTypeIcon",class:"q1lyf5nv",propsAsIs:!1}),Ty=I("div")({name:"QuestionContent",class:"qlmoky7",propsAsIs:!1}),hy=I("div")({name:"QuestionTypeLabel",class:"qp1y7hu",propsAsIs:!1}),ky=I("div")({name:"QuestionSubject",class:"q1de583k",propsAsIs:!1}),My=I("button")({name:"QuestionActionTitle",class:"ql7tvph",propsAsIs:!1}),Ny=I("button")({name:"QuestionActionIcon",class:"qh0ibjl",propsAsIs:!1}),Iy=I("img")({name:"QuestionStatusIcon",class:"q1bdpn1b",propsAsIs:!1}),Sy=I("span")({name:"QuestionTypeTitle",class:"q6tdooc",propsAsIs:!1}),Ay=I("span")({name:"ExpiredQuestion",class:"e1f2al71",propsAsIs:!1}),Ey={[ge.POLL]:{label:"Poll",icon:ly},[ge.TRIVIA]:{label:"Trivia",icon:my},[ge.PREDICTION]:{label:"Prediction",icon:uy}},by={[Gn.LOST]:py,[Gn.WON]:dy,[Gn.UNSET]:va,[Gn.DNP]:va},Dy=({questionId:n,questionType:e,questionStatus:t,subject:s,openForVoting:a,openQuestion:r,status:i})=>{const l=Ey[e];return l===void 0?null:f.jsxs(yy,{onClick:()=>r==null?void 0:r(n),children:[f.jsx(gy,{children:f.jsx(fy,{alt:"question-type-icon",src:l.icon})}),f.jsxs(Ty,{children:[f.jsxs(hy,{children:[f.jsx(Sy,{children:l.label}),e===ge.TRIVIA&&t===Ze.RESOLVED&&f.jsx(Ay,{children:"Expired"})]}),f.jsx(ky,{children:s||""})]}),a?f.jsx(My,{children:"play"}):f.jsx(Ny,{children:f.jsx(Iy,{alt:"question-status-icon",src:by[i]})})]})};const vy=I("div")({name:"Container",class:"c4iwna9",propsAsIs:!1}),_y=I("div")({name:"Title",class:"th1ieuk",propsAsIs:!1}),wy=I("div")({name:"ItemsContainer",class:"iiqbvdu",propsAsIs:!1}),jy=({questions:n,openQuestion:e})=>f.jsxs(vy,{children:[f.jsx(_y,{children:"PICK HISTORY"}),f.jsx(wy,{children:n==null?void 0:n.map(t=>f.jsx(Dy,{openQuestion:e,...t},t.questionId))})]}),Oy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0LjU1OTkyIDEwLjg0OTcgNC45NDY2MyAxMC4zOTUzIDUuMzQ3NjhDOS45NDEgNS43NDg3MiA5LjM3NDkgNi4wMTg0NyA4LjY5NzAxIDYuMTU2OTJDOS4wNTI3OCA1LjM4MzQ4IDkuMjMwNjYgNC40OTc4NiA5LjIzMDY2IDMuNTAwMDJIMTEuMDc2OFpNMTIgNC4xODc1VjMuMjcwODNDMTIgMy4wNzk4NiAxMS45MzI3IDIuOTE3NTQgMTEuNzk4MSAyLjc4Mzg1QzExLjY2MzUgMi42NTAxNyAxMS41IDIuNTgzMzMgMTEuMzA3NyAyLjU4MzMzSDkuMjMwNzdWMS44OTU4M0M5LjIzMDc3IDEuNTgwNzMgOS4xMTc3OSAxLjMxMDk4IDguODkxODMgMS4wODY1OUM4LjY2NTg2IDAuODYyMTk1IDguMzk0MjMgMC43NSA4LjA3NjkyIDAuNzVIMy45MjMwOEMzLjYwNTc3IDAuNzUgMy4zMzQxNCAwLjg2MjE5NSAzLjEwODE3IDEuMDg2NTlDMi44ODIyMSAxLjMxMDk4IDIuNzY5MjMgMS41ODA3MyAyLjc2OTIzIDEuODk1ODNWMi41ODMzM0gwLjY5MjMwOEMwLjQ5OTk5OSAyLjU4MzMzIDAuMzM2NTM5IDIuNjUwMTcgMC4yMDE5MjMgMi43ODM4NUMwLjA2NzMwNyAyLjkxNzU0IDAgMy4wNzk4NiAwIDMuMjcwODNWNC4xODc1QzAgNC41MjY0OCAwLjA5OTc1ODYgNC44Njc4NCAwLjI5OTI3OSA1LjIxMTU5QzAuNDk4Nzk5IDUuNTU1MzQgMC43NjgwMjcgNS44NjU2NyAxLjEwNjk3IDYuMTQyNThDMS40NDU5MiA2LjQxOTQ5IDEuODYxNzggNi42NTIyMyAyLjM1NDU3IDYuODQwODJDMi44NDczNiA3LjAyOTQxIDMuMzY1MzggNy4xMzU2MyAzLjkwODY1IDcuMTU5NTFDNC4xMTA1OCA3LjQxNzMyIDQuMzM4OTQgNy42NDQxIDQuNTkzNzUgNy44Mzk4NEM0Ljc3NjQ0IDguMDAyMTcgNC45MDI2NCA4LjE3NTI0IDQuOTcyMzYgOC4zNTkwNUM1LjA0MjA3IDguNTQyODYgNS4wNzY5MiA4Ljc1NjUxIDUuMDc2OTIgOUM1LjA3NjkyIDkuMjU3ODEgNS4wMDM2MSA5LjQ3NTA0IDQuODU2OTcgOS42NTE2OUM0LjcxMDM0IDkuODI4MzQgNC40NzU5NiA5LjkxNjY3IDQuMTUzODUgOS45MTY2N0MzLjc5MzI3IDkuOTE2NjcgMy40NzIzNiAxMC4wMjUzIDMuMTkxMTEgMTAuMjQyNUMyLjkwOTg1IDEwLjQ1OTcgMi43NjkyMyAxMC43MzMxIDIuNzY5MjMgMTEuMDYyNVYxMS41MjA4QzIuNzY5MjMgMTEuNTg3NyAyLjc5MDg3IDExLjY0MjYgMi44MzQxMyAxMS42ODU1QzIuODc3NCAxMS43Mjg1IDIuOTMyNjkgMTEuNzUgMyAxMS43NUg5QzkuMDY3MzEgMTEuNzUgOS4xMjI2IDExLjcyODUgOS4xNjU4NiAxMS42ODU1QzkuMjA5MTMgMTEuNjQyNiA5LjIzMDc3IDExLjU4NzcgOS4yMzA3NyAxMS41MjA4VjExLjA2MjVDOS4yMzA3NyAxMC43MzMxIDkuMDkwMTUgMTAuNDU5NyA4LjgwODg5IDEwLjI0MjVDOC41Mjc2NCAxMC4wMjUzIDguMjA2NzMgOS45MTY2NyA3Ljg0NjE1IDkuOTE2NjdDNy41MjQwNCA5LjkxNjY3IDcuMjg5NjYgOS44MjgzNCA3LjE0MzAzIDkuNjUxNjlDNi45OTYzOSA5LjQ3NTA0IDYuOTIzMDggOS4yNTc4MSA2LjkyMzA4IDlDNi45MjMwOCA4Ljc1NjUxIDYuOTU3OTMgOC41NDI4NiA3LjAyNzY0IDguMzU5MDVDNy4wOTczNiA4LjE3NTI0IDcuMjIzNTYgOC4wMDIxNyA3LjQwNjI1IDcuODM5ODRDNy42NjEwNiA3LjY0NDEgNy44ODk0MiA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",Ly=n=>n.split(/\s+/).map(e=>e[0]).join("").toUpperCase();const Ry=I("div")({name:"Container",class:"c13i6lze",propsAsIs:!1}),xy=I("div")({name:"Indicator",class:"ix2bv9",propsAsIs:!1}),st=({indicator:n,title:e})=>f.jsxs(Ry,{children:[f.jsx(xy,{children:n}),f.jsx("p",{children:e})]});const Cy=I("div")({name:"Container",class:"c5ghaaw",propsAsIs:!1}),zy=I("div")({name:"Title",class:"txfzjhj",propsAsIs:!1}),Uy=I("div")({name:"Indicator",class:"i1v0wmto",propsAsIs:!1}),Zs=({indicator:n,title:e})=>f.jsxs(Cy,{children:[f.jsx(zy,{children:e}),f.jsx(Uy,{children:n})]});const Py=I("div")({name:"Container",class:"canai20",propsAsIs:!1}),By=I("div")({name:"TopInfo",class:"tda0d57",propsAsIs:!1}),Qy=I("div")({name:"BottomInfo",class:"boqy4xv",propsAsIs:!1}),Fy=I("div")({name:"User",class:"u1dtpq3t",propsAsIs:!1}),Gy=I("img")({name:"Avatar",class:"ar4jfc",propsAsIs:!1}),Yy=I("div")({name:"UserInfo",class:"u1trcvj0",propsAsIs:!1}),Vy=I("div")({name:"UserName",class:"u1pie8mc",propsAsIs:!1}),$y=I("div")({name:"UserRating",class:"ucsljfb",propsAsIs:!1}),qy=I("img")({name:"TrophyIcon",class:"tyemu1i",propsAsIs:!1}),Wy=I("div")({name:"Rts",class:"rggn4k7",propsAsIs:!1}),Hy=I("div")({name:"RtsIndicator",class:"rnmjsbm",propsAsIs:!1}),Zy=I("div")({name:"Top",class:"t1i7e651",propsAsIs:!1}),Ky=I("div")({name:"Ranks",class:"r1mt107z",propsAsIs:!1}),Jy=I("div")({name:"AvatarPlaceholder",class:"apag0gc",propsAsIs:!1}),Xy=I("button")({name:"UserAccountBtn",class:"uroanb5",propsAsIs:!1}),eg=({avatar:n,name:e,points:t,grade:s,friendsRank:a,globalRank:r,winStreak:i,correct:l,incorrect:m,successRate:d})=>f.jsxs(Py,{children:[f.jsxs(By,{children:[f.jsxs(Fy,{children:[f.jsxs(Xy,{children:[n&&f.jsx(Gy,{alt:"avatar",src:n}),!n&&f.jsx(Jy,{children:Ly(e)})]}),f.jsxs(Yy,{children:[f.jsx(Vy,{children:e}),f.jsxs($y,{children:[f.jsx(qy,{alt:"rank-icon",src:Oy}),f.jsxs(Wy,{children:[f.jsx(Hy,{children:t||"-"}),"RTS"]}),f.jsxs(Zy,{children:["TOP ",s,"%"]})]})]})]}),f.jsxs(Ky,{children:[f.jsx(Zs,{title:"Friens rank",indicator:a||"-"}),f.jsx(Zs,{title:"Global rank",indicator:r||"-"})]})]}),f.jsxs(Qy,{children:[f.jsx(st,{indicator:i||"-",title:"Win streak"}),f.jsx(st,{indicator:l||"-",title:"Correct"}),f.jsx(st,{indicator:m||"-",title:"Incorrect"}),f.jsx(st,{indicator:`${d||"-"}%`,title:"Success rate"})]})]}),_a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",ng="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Ks="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const Ki=I("div")({name:"Container",class:"c4emhbe",propsAsIs:!1}),tg=()=>Ki,ag=I(tg())({name:"AnsweredContainer",class:"a1a18ay2",propsAsIs:!0}),Js=I("div")({name:"ButtonPct",class:"bvdmnzn",propsAsIs:!1}),Xs=I("button")({name:"Button",class:"bz55cek",propsAsIs:!1}),er=I("img")({name:"Icon",class:"i1u5zlvm",propsAsIs:!1}),nr=I("span")({name:"Title",class:"tfilm7j",propsAsIs:!1}),tr=I("span")({name:"Indicators",class:"iqdzfbw",propsAsIs:!1}),ar=I("div")({name:"CheckIconWrap",class:"ciu4mnt",propsAsIs:!1}),Jt=I("div")({name:"Percentage",class:"pl06bzo",propsAsIs:!1}),sr=I("img")({name:"CheckIcon",class:"c5bwq34",propsAsIs:!1}),sg=({icon:n,id:e,title:t,questionId:s,disabled:a,percentage:r,onVote:i,toggleIsLoadingSubmitAnswer:l,correct:m,questionAnswered:d,hasCorrectAnswer:y,answered:h,points:T,questionType:M})=>{var E;return d&&h?f.jsxs(ag,{"data-answeredCorrect":(E=!y||m)==null?void 0:E.toString(),"data-questionAnswered":"false",children:[f.jsx(Js,{style:{width:`${r}%`}}),f.jsxs(Xs,{disabled:a,onClick:()=>i(s,e),children:[n&&f.jsx(er,{alt:"option-icon",src:n}),f.jsx(nr,{children:t}),f.jsxs(tr,{children:[y&&m&&f.jsx(ar,{children:f.jsx(sr,{alt:"icon-correct",src:h?Ks:_a})}),f.jsxs(Jt,{children:[r,"%"]})]})]})]}):f.jsxs(Ki,{"data-questionAnswered":d==null?void 0:d.toString(),children:[d&&f.jsx(Js,{style:{width:`${r}%`}}),f.jsxs(Xs,{disabled:a,onClick:()=>{l(!0),i(s,e)},children:[n&&f.jsx(er,{alt:"option-icon",src:n}),f.jsx(nr,{children:t}),d?f.jsxs(tr,{children:[y&&m&&f.jsx(ar,{children:f.jsx(sr,{alt:"icon-correct",src:h?Ks:_a})}),f.jsxs(Jt,{children:[r,"%"]})]}):M===ge.PREDICTION?f.jsxs(Jt,{children:[T," pts"]}):null]})]})};const rg=I("div")({name:"Container",class:"cgz6mxc",propsAsIs:!1}),ig=I("div")({name:"Title",class:"ta6van7",propsAsIs:!1}),og=I("div")({name:"Options",class:"o1msgqq4",propsAsIs:!1}),cg=I("div")({name:"Loader",class:"lq1mbhd",propsAsIs:!1}),lg=I("div")({name:"Feedback",class:"f9kw2xt",propsAsIs:!1}),ug=I("img")({name:"FeedbackIcon",class:"fn7neu6",propsAsIs:!1}),mg=I("div")({name:"FeedbackTitle",class:"fpdq7m5",propsAsIs:!1}),dg=I("div")({name:"FeedbackDescription",class:"f1ljy63t",propsAsIs:!1}),pg=({title:n,questionId:e,options:t,questionAnswered:s,feedbackMessages:a,questionAnsweredCorrectly:r,questionType:i})=>{const[l,m]=Q.useState(!1),d=Q.useCallback(y=>{m(y)},[m]);return Q.useEffect(()=>{d(!1)},[t,d]),f.jsxs(rg,{children:[f.jsx(ig,{children:n}),f.jsxs(og,{children:[l&&f.jsx(cg,{children:"Loading..."}),t.map(y=>f.jsx(sg,{toggleIsLoadingSubmitAnswer:d,questionId:e,questionType:i,...y},y.id))]}),s&&i===ge.TRIVIA&&f.jsxs(lg,{children:[f.jsx(ug,{alt:"reaction-to-answer",src:r?_a:ng}),f.jsxs("div",{children:[f.jsx(mg,{children:r?a.correctFeedback.title:a.incorrectFeedback.title}),f.jsx(dg,{children:r?a.correctFeedback.description:a.incorrectFeedback.description})]})]})]})};class yg{}window.slStore=Object.create(null);class Ot{constructor(e,t){S(this,"store");S(this,"name");this.store=e,this.name=t}getStore(){return this.store}}const gg=n=>{const e=Object.keys(n);return De.computed(e.map(t=>n[t].getStore()),(...t)=>Object.fromEntries(e.map((s,a)=>[s,t[a]])))};class Vn extends Ot{constructor(){super(...arguments);S(this,"getValues",()=>this.getStore().get());S(this,"getValue",t=>this.getStore().get()[t]);S(this,"setValue",(t,s)=>this.getStore().setKey(t,s));S(this,"subscribe",(...t)=>this.getStore().subscribe(...t));S(this,"unsubscribe",()=>this.getStore().off())}}const $n=n=>De.map(n);var An=(n=>(n.ORGANIZATION="ORGANIZATION",n.STREAM="STREAM",n))(An||{});const fg={[ve.BETTING]:"betting",[ve.GAMES]:"games",[ve.PUBLIC_CHAT]:"publicChat",[ve.TWITTER]:"twitter"};var He=(n=>(n.Ready="ready",n.Suspended="suspended",n))(He||{});class es{constructor({settings:e,...t},s){S(this,"status");S(this,"source");S(this,"config");S(this,"settings");S(this,"listeners",new Set);S(this,"settingsKey");S(this,"enable",()=>{this.status.set("ready")});S(this,"disable",()=>{this.status.set("suspended")});S(this,"setFeatureConfig",({settings:e,...t})=>{let s;for(s in t)this.config.setValue(s,t[s]);if((e==null?void 0:e.overlaySettings.case)===this.settingsKey){const a=e.overlaySettings.value;if(a!==void 0){let r;for(r in a)console.log(r,a[r]),a[r]!==0&&a[r]!==""&&this.settings.setValue(r,a[r])}}});S(this,"update",(e,t)=>{this.source==="STREAM"&&t==="ORGANIZATION"||(this.setFeatureConfig(e),this.source=t)});this.settingsKey=fg[t.type],this.status=De.atom("suspended"),this.config=new Vn($n(t),`feature:config:${this.settingsKey}`),this.settingsKey!==void 0&&(e==null?void 0:e.overlaySettings.case)===this.settingsKey?this.settings=new Vn($n(e.overlaySettings.value),`feature:settings:${this.settingsKey}`):this.settings=new Vn($n({}),`feature:settings:${this.settingsKey}`),this.source=s}get featureConfig(){return this.config.getStore()}get featureSettings(){return this.settings.getStore()}registerEventListener(e){this.listeners.add(e)}fireEvent(e){for(const t of this.listeners.values())try{t.onEvent(e)}catch(s){console.error(s)}}}class Le extends Ot{constructor(){super(...arguments);S(this,"getValue",()=>this.getStore().get());S(this,"setValue",t=>this.getStore().set(t));S(this,"subscribe",t=>this.getStore().subscribe(t));S(this,"unsubscribe",()=>this.getStore().off())}getValues(){throw new Error("not implemented")}listen(t){return this.getStore().listen(t)}get(){return this.getStore().get()}}const Re=n=>De.atom(n),ns=(n,e)=>De.computed(n,e);class ze extends Ot{constructor(t,s,a){super(t,`api:${s}`);S(this,"atomStore");S(this,"getAtomStore",()=>this.atomStore);S(this,"getValue",async()=>{const t=this.getStore();if(t.value===void 0)throw new Error("no store");return await t.value.promise,t.get().data});S(this,"getValues",()=>{throw new Error("not implemented")});S(this,"setValue",t=>this.getStore().set({loading:!1,data:t==null?void 0:t.data}));S(this,"subscribe",t=>this.getStore().subscribe(t));S(this,"unsubscribe",()=>{throw new Error("not implemented")});S(this,"invalidate",()=>{this.store.invalidate()});S(this,"listen",t=>this.getStore().listen(t));S(this,"key",()=>this.getStore().key);S(this,"off",()=>this.getStore().off());this.atomStore=De.atom(),a&&t.subscribe(r=>{this.atomStore.set(a(r))})}get(){throw new Error("not implemented")}}var ts={exports:{}};function Tg(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}var hg=kg;function kg(n,e,t){var s=t&&t.stringify||Tg,a=1;if(typeof n=="object"&&n!==null){var r=e.length+a;if(r===1)return n;var i=new Array(r);i[0]=s(n);for(var l=1;l<r;l++)i[l]=s(e[l]);return i.join(" ")}if(typeof n!="string")return n;var m=e.length;if(m===0)return n;for(var d="",y=1-a,h=-1,T=n&&n.length||0,M=0;M<T;){if(n.charCodeAt(M)===37&&M+1<T){switch(h=h>-1?h:0,n.charCodeAt(M+1)){case 100:case 102:if(y>=m||e[y]==null)break;h<M&&(d+=n.slice(h,M)),d+=Number(e[y]),h=M+2,M++;break;case 105:if(y>=m||e[y]==null)break;h<M&&(d+=n.slice(h,M)),d+=Math.floor(Number(e[y])),h=M+2,M++;break;case 79:case 111:case 106:if(y>=m||e[y]===void 0)break;h<M&&(d+=n.slice(h,M));var E=typeof e[y];if(E==="string"){d+="'"+e[y]+"'",h=M+2,M++;break}if(E==="function"){d+=e[y].name||"<anonymous>",h=M+2,M++;break}d+=s(e[y]),h=M+2,M++;break;case 115:if(y>=m)break;h<M&&(d+=n.slice(h,M)),d+=String(e[y]),h=M+2,M++;break;case 37:h<M&&(d+=n.slice(h,M)),d+="%",h=M+2,M++,y--;break}++y}++M}return h===-1?n:(h<T&&(d+=n.slice(h)),d)}const rr=hg;ts.exports=Ke;const Zn=Rg().console||{},Mg={mapHttpRequest:rt,mapHttpResponse:rt,wrapRequestSerializer:Xt,wrapResponseSerializer:Xt,wrapErrorSerializer:Xt,req:rt,res:rt,err:or,errWithCause:or};function ht(n,e){return n==="silent"?1/0:e.levels.values[n]}const as=Symbol("pino.logFuncs"),wa=Symbol("pino.hierarchy"),Ng={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function ir(n,e){const t={logger:e,parent:n[wa]};e[wa]=t}function Ig(n,e,t){const s={};e.forEach(a=>{s[a]=t[a]?t[a]:Zn[a]||Zn[Ng[a]||"log"]||Kn}),n[as]=s}function Sg(n,e){return Array.isArray(n)?n.filter(function(s){return s!=="!stdSerializers.err"}):n===!0?Object.keys(e):!1}function Ke(n){n=n||{},n.browser=n.browser||{};const e=n.browser.transmit;if(e&&typeof e.send!="function")throw Error("pino: transmit option must have a send function");const t=n.browser.write||Zn;n.browser.write&&(n.browser.asObject=!0);const s=n.serializers||{},a=Sg(n.browser.serialize,s);let r=n.browser.serialize;Array.isArray(n.browser.serialize)&&n.browser.serialize.indexOf("!stdSerializers.err")>-1&&(r=!1);const i=Object.keys(n.customLevels||{}),l=["error","fatal","warn","info","debug","trace"].concat(i);typeof t=="function"&&l.forEach(function(_){t[_]=t}),(n.enabled===!1||n.browser.disabled)&&(n.level="silent");const m=n.level||"info",d=Object.create(t);d.log||(d.log=Kn),Ig(d,l,t),ir({},d),Object.defineProperty(d,"levelVal",{get:h}),Object.defineProperty(d,"level",{get:T,set:M});const y={transmit:e,serialize:a,asObject:n.browser.asObject,levels:l,timestamp:jg(n)};d.levels=Ag(n),d.level=m,d.setMaxListeners=d.getMaxListeners=d.emit=d.addListener=d.on=d.prependListener=d.once=d.prependOnceListener=d.removeListener=d.removeAllListeners=d.listeners=d.listenerCount=d.eventNames=d.write=d.flush=Kn,d.serializers=s,d._serialize=a,d._stdErrSerialize=r,d.child=E,e&&(d._logEvent=ja());function h(){return ht(this.level,this)}function T(){return this._level}function M(_){if(_!=="silent"&&!this.levels.values[_])throw Error("unknown level "+_);this._level=_,rn(this,y,d,"error"),rn(this,y,d,"fatal"),rn(this,y,d,"warn"),rn(this,y,d,"info"),rn(this,y,d,"debug"),rn(this,y,d,"trace"),i.forEach(L=>{rn(this,y,d,L)})}function E(_,L){if(!_)throw new Error("missing bindings for child Pino");L=L||{},a&&_.serializers&&(L.serializers=_.serializers);const j=L.serializers;if(a&&j){var R=Object.assign({},s,j),x=n.browser.serialize===!0?Object.keys(R):a;delete _.serializers,Lt([_],x,R,this._stdErrSerialize)}function z(B){this._childLevel=(B._childLevel|0)+1,this.bindings=_,R&&(this.serializers=R,this._serialize=x),e&&(this._logEvent=ja([].concat(B._logEvent.bindings,_)))}z.prototype=this;const U=new z(this);return ir(this,U),U.level=this.level,U}return d}function Ag(n){const e=n.customLevels||{},t=Object.assign({},Ke.levels.values,e),s=Object.assign({},Ke.levels.labels,Eg(e));return{values:t,labels:s}}function Eg(n){const e={};return Object.keys(n).forEach(function(t){e[n[t]]=t}),e}Ke.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Ke.stdSerializers=Mg;Ke.stdTimeFunctions=Object.assign({},{nullTime:Ji,epochTime:Xi,unixTime:Og,isoTime:Lg});function bg(n){const e=[];n.bindings&&e.push(n.bindings);let t=n[wa];for(;t.parent;)t=t.parent,t.logger.bindings&&e.push(t.logger.bindings);return e.reverse()}function rn(n,e,t,s){if(n[s]=ht(n.level,t)>ht(s,t)?Kn:t[as][s],!e.transmit&&n[s]===Kn)return;n[s]=vg(n,e,t,s);const a=bg(n);a.length!==0&&(n[s]=Dg(a,n[s]))}function Dg(n,e){return function(){return e.apply(this,[...n,...arguments])}}function vg(n,e,t,s){return function(a){return function(){const i=e.timestamp(),l=new Array(arguments.length),m=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Zn?Zn:this;for(var d=0;d<l.length;d++)l[d]=arguments[d];if(e.serialize&&!e.asObject&&Lt(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?a.call(m,_g(this,s,l,i)):a.apply(m,l),e.transmit){const y=e.transmit.level||n._level,h=t.levels.values[y],T=t.levels.values[s];if(T<h)return;wg(this,{ts:i,methodLevel:s,methodValue:T,transmitLevel:y,transmitValue:t.levels.values[e.transmit.level||n._level],send:e.transmit.send,val:ht(n._level,t)},l)}}}(n[as][s])}function _g(n,e,t,s){n._serialize&&Lt(t,n._serialize,n.serializers,n._stdErrSerialize);const a=t.slice();let r=a[0];const i={};s&&(i.time=s),i.level=n.levels.values[e];let l=(n._childLevel|0)+1;if(l<1&&(l=1),r!==null&&typeof r=="object"){for(;l--&&typeof a[0]=="object";)Object.assign(i,a.shift());r=a.length?rr(a.shift(),a):void 0}else typeof r=="string"&&(r=rr(a.shift(),a));return r!==void 0&&(i.msg=r),i}function Lt(n,e,t,s){for(const a in n)if(s&&n[a]instanceof Error)n[a]=Ke.stdSerializers.err(n[a]);else if(typeof n[a]=="object"&&!Array.isArray(n[a]))for(const r in n[a])e&&e.indexOf(r)>-1&&r in t&&(n[a][r]=t[r](n[a][r]))}function wg(n,e,t){const s=e.send,a=e.ts,r=e.methodLevel,i=e.methodValue,l=e.val,m=n._logEvent.bindings;Lt(t,n._serialize||Object.keys(n.serializers),n.serializers,n._stdErrSerialize===void 0?!0:n._stdErrSerialize),n._logEvent.ts=a,n._logEvent.messages=t.filter(function(d){return m.indexOf(d)===-1}),n._logEvent.level.label=r,n._logEvent.level.value=i,s(r,n._logEvent,l),n._logEvent=ja(m)}function ja(n){return{ts:0,messages:[],bindings:n||[],level:{label:"",value:0}}}function or(n){const e={type:n.constructor.name,msg:n.message,stack:n.stack};for(const t in n)e[t]===void 0&&(e[t]=n[t]);return e}function jg(n){return typeof n.timestamp=="function"?n.timestamp:n.timestamp===!1?Ji:Xi}function rt(){return{}}function Xt(n){return n}function Kn(){}function Ji(){return!1}function Xi(){return Date.now()}function Og(){return Math.round(Date.now()/1e3)}function Lg(){return new Date(Date.now()).toISOString()}function Rg(){function n(e){return typeof e<"u"&&e}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return n(self)||n(window)||n(this)||{}}}ts.exports.default=Ke;var xg=ts.exports.pino=Ke;const Cg=xg({level:"trace"}),eo=(n,e)=>Cg.child({name:n},e);let zg=()=>({events:{},emit(n,...e){let t=this.events[n]||[];for(let s=0,a=t.length;s<a;s++)t[s](...e)},on(n,e){var t;return(t=this.events[n])!=null&&t.push(e)||(this.events[n]=[e]),()=>{var s;this.events[n]=(s=this.events[n])==null?void 0:s.filter(a=>e!==a)}}});const Ug=({cache:n=new Map,fetcher:e,...t}={})=>{const s=zg();let a=!0;dr("visibilitychange",()=>{a=!document.hidden,a&&s.emit(lr)}),dr("online",()=>s.emit(ur));const r=new Map,i=new Map,l=new Map;let m={};const d=async([j,R],x,z,U)=>{var B;if(!a)return;const C=oe=>{x.key===j&&(x.set(oe),s.emit(ea,j,oe,!0))},H=()=>{C({...x.value,...yr,promise:l.get(j)})},{dedupeTime:ne=4e3,fetcher:se}={...z,...m},ie=pr();if(l.has(j)){x.value.loading||H();return}if(!U){const oe=n.get(j);oe&&x.value.data!==oe&&C({data:oe,...on});const Z=i.get(j);if(Z&&Z+ne>ie)return}const ue=De.startTask();try{const oe=se(...R);i.set(j,ie),l.set(j,oe),H();const Z=await oe;n.set(j,Z),C({data:Z,...on}),i.set(j,pr())}catch(oe){(B=z.onError)==null||B.call(z,oe),C({data:x.value.data,error:oe,...on})}finally{ue(),l.delete(j)}},y=(j,{fetcher:R=e,...x}={})=>{const z=De.map({...on}),U={...t,...x,fetcher:R};z.invalidate=()=>{const{key:Z}=z;Z&&M(Z)},z.mutate=Z=>{const{key:me}=z;me&&E(me,Z)};let B,C,H,ne,se,ie=[];De.onStart(z,()=>{const Z=!B;[se,B]=Pg(j),ne=se.subscribe(Se=>{if(Se){const[K,N]=Se;z.key=K,d([K,N],z,U),C=K,H=N}else z.key=C=H=void 0});const me=se.get();me&&([C,H]=me,Z&&ue());const{refetchInterval:Ee=0,refetchOnFocus:xe,refetchOnReconnect:_e}=U,Ie=()=>{C&&d([C,H],z,U)};Ee>0&&r.set(j,setInterval(Ie,Ee)),xe&&ie.push(s.on(lr,Ie)),_e&&ie.push(s.on(ur,Ie)),ie.push(s.on(mr,Se=>{C&&na(C,Se)&&d([C,H],z,U,!0)}),s.on(ea,(Se,K,N)=>{C&&na(C,Se)&&z.value!==K&&z.value.data!==K&&z.set(N?K:{data:K,...on})}))});const ue=()=>{C&&H&&d([C,H],z,U)},oe=z.listen;return z.listen=Z=>{const me=oe(Z);return Z(z.value),ue(),me},De.onStop(z,()=>{z.value={...on},B==null||B(),ie.forEach(me=>me()),ie=[],ne==null||ne();const Z=r.get(j);Z&&clearInterval(Z)}),z},h=j=>{n.delete(j),i.delete(j)},T=(j,R)=>{for(const x of n.keys())na(x,j)&&R(x)},M=j=>{T(j,h),s.emit(mr,j)},E=(j,R)=>{T(j,x=>{R===void 0?h(x):n.set(x,R)}),s.emit(ea,j,R)};function _(j){const R=async z=>{var U,B;const C=(U=m.fetcher)!=null?U:j,H=[];try{x.set({error:void 0,data:void 0,mutate:R,...yr});const ne=await C({data:z,invalidate:se=>{H.push(se)},getCacheUpdater:(se,ie=!0)=>[ue=>{E(se,ue),ie&&H.push(se)},n.get(se)]});return x.setKey("data",ne),ne}catch(ne){(B=t==null?void 0:t.onError)==null||B.call(t,ne),x.setKey("error",ne)}finally{x.setKey("loading",!1),H.forEach(M)}},x=De.map({mutate:R,...on});return x.mutate=R,x}return[y,_,{__unsafeOverruleSettings:j=>{console.warn("You should only use __unsafeOverruleSettings in test environment"),m=j},invalidateKeys:M,mutateCache:E}]};function cr(n){return typeof n=="string"||typeof n=="number"}const Pg=n=>{if(cr(n))return[De.atom([""+n,[n]]),()=>{}];let e=De.atom(null),t=[];const s=()=>{t.some(r=>r==null)?e.set(null):e.set([t.join(""),t])},a=[];for(let r=0;r<n.length;r++){const i=n[r];if(cr(i)){t.push(i);continue}a.push(i.subscribe(l=>{t[r]=l,s()}))}return s(),[e,()=>a.forEach(r=>r())]},lr=1,ur=2,mr=3,ea=4,dr=(n,e)=>{typeof window>"u"||addEventListener(n,e)},na=(n,e)=>Array.isArray(e)?e.includes(n):typeof e=="function"?e(n):n===e,pr=()=>new Date().getTime(),yr={loading:!0},on={loading:!1};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));class Bg{constructor(e,t,s,a){S(this,"params");S(this,"stream");S(this,"method");S(this,"name");S(this,"headers");S(this,"listeners");S(this,"state");S(this,"store");S(this,"updateState",e=>{this.state.setValue("status",e),this.state.setValue("ts",new Date),this.addStateLog(`status => ${e}`)});S(this,"addStateLog",e=>{const t=this.state.getStore().get().log;this.state.setValue("log",[...t,`${new Date().toLocaleString()}: ${e}`])});S(this,"addListener",(e,t)=>this.listeners.has(e)?(this.addStateLog(`listener '${e}' not added`),!1):(this.listeners.set(e,t),this.addStateLog(`listener '${e}' added`),!0));S(this,"removeListener",e=>{this.listeners.delete(e),this.addStateLog(`listener '${e}' removed`)});S(this,"connect",()=>{this.updateState("connecting"),this.stream&&(this.addStateLog("disconnect prev connection"),this.stream());const e="get"in this.params&&typeof this.params.get=="function"?this.params.get():this.params;this.stream=this.method(e,this.onData,this.onStreamError,{headers:this.headers.getValues()}),this.updateState("connected")});S(this,"disconnect",()=>{this.stream&&this.stream(),this.listeners.clear(),this.updateState("disconnected")});S(this,"reconnect",()=>{this.updateState("reconnecting"),this.connect()});S(this,"getStore",()=>{var e;return(e=this.store)==null?void 0:e.getStore()});S(this,"onData",e=>{this.addStateLog(`received data => ${JSON.stringify(e)}`),this.store&&this.store.setValue(e);for(const[,t]of this.listeners)t(e);this.addStateLog(`data routed to ${this.listeners.size} listeners`)});S(this,"onStreamError",e=>{e!==void 0&&(e.code!==ee.Canceled&&e.rawMessage!=="[canceled] BodyStreamBuffer was aborted"?(this.updateState("failed"),this.state.setValue("error",e)):this.disconnect())});const r={status:"init",ts:new Date,log:[]};this.state=new Vn($n(r),`subscription:${a.name}:state`),this.name=a.name,this.headers=e,this.listeners=new Map,this.params=s,this.method=t,a.withStore&&(this.store=new Le(Re(null),`subscription:${a.name}:store`)),"subscribe"in s&&typeof s.subscribe=="function"&&s.subscribe(()=>{this.reconnect()}),this.updateState("ready")}}class Qg{constructor(e){S(this,"toJsonOptions",{emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1});S(this,"transport");S(this,"nanoquery");S(this,"host");S(this,"interceptors",[]);S(this,"$headers");S(this,"clients");S(this,"callbackClients");S(this,"subscriptions");S(this,"addSubscription",(e,t,s)=>{const a=this.subscriptions.get(t);if(a)return a;const r=new Bg(this.$headers,e,t,s);return this.subscriptions.set(t,r),r});S(this,"removeSubscription",e=>{e.disconnect(),this.subscriptions.delete(e.params)});S(this,"disconnect",()=>{for(const[e,t]of this.subscriptions)t.disconnect(),this.subscriptions.delete(e)});S(this,"registerInterceptor",e=>{this.interceptors.push(e)});S(this,"removeInterceptor",e=>{this.interceptors=this.interceptors.filter(t=>t!==e)});S(this,"getClient",e=>{const t=e.typeName;if(this.clients.has(t))return this.clients.get(t);const s=vt(e,this.transport);return this.clients.set(t,s),s});S(this,"getCallbackClient",e=>{const t=e.typeName;if(this.callbackClients.has(t))return this.callbackClients.get(t);const s=Pl(e,this.transport);return this.callbackClients.set(t,s),s});S(this,"createPromiseClient",(e,{params:t=[],method:s})=>{const a=this.getClient(e),r=e.methods[s].name,i=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1),...Array.isArray(t)?t:[t]],l=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1)];return{client:a,queryKey:i,queryKeyStr:l.join("")}});S(this,"createCallbackClient",e=>({client:this.getCallbackClient(e)}));S(this,"setSdkKey",e=>{this.$headers.setValue("sdk",e)});S(this,"setAuth",e=>{this.$headers.setValue("authorization",e)});S(this,"setHeader",(e,t)=>this.$headers.setValue(e,t));S(this,"getHeader",e=>this.$headers.getValue(e));S(this,"getHeaders",()=>this.$headers.getValues());S(this,"initInterceptors",()=>{if(this.interceptors.length!==0)return;const e=t=>s=>{const a=this.$headers.getValues();for(const r in a)s.header.set(r,a[r]);return t(s)};this.interceptors.push(e)});var r,i;this.host=e,this.$headers=new Vn($n({"sl-device-id":((i=(r=G.process)==null?void 0:r.env)==null?void 0:i.NX_DEVICE_ID)||"sdk-web-dev"}),"transport:headers"),this.initInterceptors(),this.clients=new Map,this.callbackClients=new Map,this.subscriptions=new Map;const[t,s,a]=Ug();this.nanoquery={createFetcherStore:t,createMutatorStore:s,utils:a},this.transport=_t({baseUrl:e,interceptors:this.interceptors,useBinaryFormat:!0})}}const Fg=c.makeEnum("streamlayer.sports.LeagueSyncStatus",[{no:0,name:"LEAGUE_SYNC_STATUS_UNSET",localName:"UNSET"},{no:1,name:"LEAGUE_SYNC_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"LEAGUE_SYNC_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"LEAGUE_SYNC_STATUS_SYNCED",localName:"SYNCED"},{no:4,name:"LEAGUE_SYNC_STATUS_ERROR",localName:"ERROR"}]),ss=c.makeEnum("streamlayer.sports.EventStatus",[{no:0,name:"EVENT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_STATUS_PREGAME",localName:"PREGAME"},{no:2,name:"EVENT_STATUS_ACTIVE",localName:"ACTIVE"},{no:3,name:"EVENT_STATUS_BREAK",localName:"BREAK"},{no:4,name:"EVENT_STATUS_OVERTIME",localName:"OVERTIME"},{no:5,name:"EVENT_STATUS_SHOOTOUTS",localName:"SHOOTOUTS"},{no:6,name:"EVENT_STATUS_POSTGAME",localName:"POSTGAME"},{no:7,name:"EVENT_STATUS_CANCELLED",localName:"CANCELLED"}]),rs=c.makeEnum("streamlayer.sports.EventEndless",[{no:0,name:"EVENT_ENDLESS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_ENDLESS_ENABLED",localName:"ENABLED"},{no:2,name:"EVENT_ENDLESS_DISABLED",localName:"DISABLED"}]),Rt=c.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),no=c.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),xt=c.makeMessageType("streamlayer.sports.Meta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}]),Ct=c.makeMessageType("streamlayer.sports.Venue",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"scalar",T:9},{no:3,name:"stadium",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sports.Team",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"alias",kind:"scalar",T:9},{no:5,name:"venue",kind:"message",T:Ct}]);const Xn=c.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),to=c.makeMessageType("streamlayer.sports.EventPeriod",()=>[{no:1,name:"number",kind:"scalar",T:5},{no:2,name:"score_home",kind:"scalar",T:5},{no:3,name:"score_away",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.Event",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"league_id",kind:"scalar",T:4},{no:4,name:"season_id",kind:"scalar",T:4},{no:5,name:"home_team_id",kind:"scalar",T:4},{no:6,name:"away_team_id",kind:"scalar",T:4},{no:7,name:"winner_team_id",kind:"scalar",T:4},{no:8,name:"scheduled",kind:"scalar",T:9},{no:9,name:"score_home",kind:"scalar",T:5},{no:10,name:"score_away",kind:"scalar",T:5},{no:11,name:"venue",kind:"message",T:Ct},{no:12,name:"event_time",kind:"message",T:Xn},{no:13,name:"status",kind:"enum",T:c.getEnumType(ss)},{no:14,name:"periods",kind:"message",T:to,repeated:!0},{no:15,name:"start_time",kind:"scalar",T:9},{no:16,name:"end_time",kind:"scalar",T:9},{no:17,name:"endless",kind:"enum",T:c.getEnumType(rs)}]);const ao=c.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),Gg=c.makeMessageType("streamlayer.sports.PlayerAttributes",()=>[{no:1,name:"display_id",kind:"scalar",T:5},{no:3,name:"full_first",kind:"scalar",T:9},{no:4,name:"full_last",kind:"scalar",T:9},{no:5,name:"uniform",kind:"scalar",T:9},{no:6,name:"height",kind:"message",T:Yg},{no:7,name:"weight",kind:"message",T:Vg},{no:8,name:"birth",kind:"message",T:$g}]),Yg=c.makeMessageType("streamlayer.sports.PlayerAttributes.Height",()=>[{no:1,name:"centimeters",kind:"scalar",T:5},{no:2,name:"inches",kind:"scalar",T:5}],{localName:"PlayerAttributes_Height"}),Vg=c.makeMessageType("streamlayer.sports.PlayerAttributes.Weight",()=>[{no:1,name:"kilograms",kind:"scalar",T:5},{no:2,name:"pounds",kind:"scalar",T:5}],{localName:"PlayerAttributes_Weight"}),$g=c.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:ao}],{localName:"PlayerAttributes_Birth"});c.makeMessageType("streamlayer.sports.PlayerAttributes.Birth.BirthDate",()=>[{no:1,name:"year",kind:"scalar",T:5},{no:2,name:"month",kind:"scalar",T:5},{no:3,name:"date",kind:"scalar",T:5},{no:4,name:"full",kind:"scalar",T:9}],{localName:"PlayerAttributes_Birth_BirthDate"});const qg=c.makeMessageType("streamlayer.sports.PlayerTeam",()=>[{no:1,name:"team_id",kind:"scalar",T:4},{no:2,name:"position",kind:"scalar",T:9},{no:3,name:"jersey_number",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.Player",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"first_name",kind:"scalar",T:9},{no:10,name:"last_name",kind:"scalar",T:9},{no:14,name:"display_name",kind:"scalar",T:9},{no:11,name:"birth_date",kind:"scalar",T:9},{no:12,name:"nationality",kind:"message",T:ao},{no:13,name:"attributes",kind:"message",T:Gg},{no:15,name:"teams",kind:"message",T:qg,repeated:!0}]);const an=c.makeMessageType("streamlayer.sports.TeamRecord",()=>[{no:1,name:"wins",kind:"scalar",T:5},{no:2,name:"losses",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.Season",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"scalar",T:9},{no:6,name:"year",kind:"scalar",T:5},{no:7,name:"league_id",kind:"scalar",T:4}]);const Fn=c.makeMessageType("streamlayer.sports.SyncStatusStage",()=>[{no:1,name:"stage",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:4},{no:3,name:"datetime",kind:"scalar",T:9},{no:4,name:"error",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:c.getEnumType(Fg)}]),Wg=c.makeMessageType("streamlayer.sports.SyncStatus",()=>[{no:1,name:"teams",kind:"message",T:Fn},{no:2,name:"event",kind:"message",T:Fn},{no:3,name:"events",kind:"message",T:Fn},{no:4,name:"players",kind:"message",T:Fn},{no:5,name:"leagues",kind:"message",T:Fn}]),Hg=c.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:Wg}]);c.makeMessageType("streamlayer.sports.League",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"country",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9},{no:13,name:"sync",kind:"scalar",T:8},{no:14,name:"sport_id",kind:"scalar",T:4},{no:12,name:"sync_status",kind:"message",T:Hg,repeated:!0}]);c.makeMessageType("streamlayer.sports.Sport",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"created",kind:"scalar",T:9},{no:3,name:"updated",kind:"scalar",T:9},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9}]);const Zg=c.makeMessageType("streamlayer.sports.NflEventStatistics",()=>[{no:1,name:"passes",kind:"scalar",T:5},{no:2,name:"rushes",kind:"scalar",T:5},{no:3,name:"penalties",kind:"scalar",T:5},{no:4,name:"turnovers",kind:"scalar",T:5}]),Kg=c.makeMessageType("streamlayer.sports.SoccerEventStatistics",()=>[{no:1,name:"ball_possession",kind:"scalar",T:5},{no:2,name:"throw_ins",kind:"scalar",T:5},{no:3,name:"fouls",kind:"scalar",T:5},{no:4,name:"goal_kicks",kind:"scalar",T:5},{no:5,name:"free_kicks",kind:"scalar",T:5},{no:6,name:"shots_on_target",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"shots_off_target",kind:"scalar",T:5},{no:9,name:"shots_saved",kind:"scalar",T:5},{no:10,name:"offsides",kind:"scalar",T:5},{no:11,name:"shots_blocked",kind:"scalar",T:5},{no:12,name:"yellow_cards",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.EventTeamStatistics",()=>[{no:1,name:"football",kind:"message",T:Zg,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:Kg,oneof:"statistics"}]);const sn=c.makeMessageType("streamlayer.sports.EventTeam",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"is_winner",kind:"scalar",T:8}]),Jg=c.makeMessageType("streamlayer.sports.EventCustomFields",()=>[{no:1,name:"preview",kind:"scalar",T:9},{no:2,name:"stream",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"event_ids",kind:"scalar",T:9,repeated:!0},{no:6,name:"subtitle",kind:"scalar",T:9},{no:7,name:"promotitle",kind:"scalar",T:9},{no:8,name:"slate",kind:"scalar",T:9},{no:9,name:"horizontal_preview",kind:"scalar",T:9},{no:10,name:"small_logo",kind:"scalar",T:9},{no:11,name:"description",kind:"scalar",T:9}]),Xg=c.makeMessageType("streamlayer.sports.EventProgram",()=>[{no:1,name:"id",kind:"scalar",T:9,opt:!0},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:9},{no:4,name:"end_time",kind:"scalar",T:9},{no:5,name:"thumbnail_url",kind:"scalar",T:9},{no:6,name:"square_thumbnail_url",kind:"scalar",T:9}]),ef=c.makeMessageType("streamlayer.sports.EventData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"sport",kind:"scalar",T:9},{no:3,name:"league",kind:"scalar",T:9},{no:4,name:"scheduled",kind:"scalar",T:9},{no:5,name:"home",kind:"message",T:sn},{no:6,name:"away",kind:"message",T:sn},{no:7,name:"status",kind:"enum",T:c.getEnumType(ss)},{no:8,name:"custom_fields",kind:"message",T:Jg},{no:9,name:"start_time",kind:"scalar",T:9},{no:10,name:"end_time",kind:"scalar",T:9},{no:11,name:"venue",kind:"message",T:Ct},{no:12,name:"schedule",kind:"message",T:Xg,repeated:!0},{no:13,name:"endless",kind:"enum",T:c.getEnumType(rs)}]),fn=c.makeMessageType("streamlayer.sports.EventSummary",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"scheduled",kind:"scalar",T:9},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"venue",kind:"message",T:Ct},{no:6,name:"event_time",kind:"message",T:Xn},{no:7,name:"home_team",kind:"message",T:sn},{no:8,name:"away_team",kind:"message",T:sn},{no:9,name:"status",kind:"enum",T:c.getEnumType(ss)},{no:10,name:"periods",kind:"message",T:to,repeated:!0},{no:11,name:"league",kind:"scalar",T:9},{no:12,name:"start_time",kind:"scalar",T:9},{no:13,name:"end_time",kind:"scalar",T:9},{no:14,name:"name",kind:"scalar",T:9},{no:15,name:"logo",kind:"scalar",T:9},{no:16,name:"stream_url",kind:"scalar",T:9}]),it=c.makeMessageType("streamlayer.sports.QueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]),gr=c.makeMessageType("streamlayer.sports.ArrayQueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9,repeated:!0}]);c.makeMessageType("streamlayer.sports.Query",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"match",kind:"message",T:it,repeated:!0},{no:3,name:"ne",kind:"message",T:it,repeated:!0},{no:4,name:"eq",kind:"message",T:it,repeated:!0},{no:5,name:"between",kind:"message",T:gr,repeated:!0},{no:6,name:"includes",kind:"message",T:gr,repeated:!0},{no:7,name:"is",kind:"message",T:it,repeated:!0}]);const nf=c.makeEnum("streamlayer.sports.baseball.PitcherStatus",[{no:0,name:"PITCHER_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PITCHER_STATUS_WIN",localName:"WIN"},{no:2,name:"PITCHER_STATUS_LOSS",localName:"LOSS"}]),tf=c.makeEnum("streamlayer.sports.baseball.BaseballBase",[{no:0,name:"BASEBALL_BASE_UNSET",localName:"UNSET"},{no:1,name:"BASEBALL_BASE_FIRST",localName:"FIRST"},{no:2,name:"BASEBALL_BASE_SECOND",localName:"SECOND"},{no:3,name:"BASEBALL_BASE_THIRD",localName:"THIRD"}]),fr=c.makeMessageType("streamlayer.sports.baseball.PitcherSummary",()=>[{no:1,name:"statistics",kind:"message",T:so},{no:2,name:"status",kind:"enum",T:c.getEnumType(nf)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),af=c.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),sf=c.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:c.getEnumType(tf)},{no:2,name:"player",kind:"message",T:af}]),rf=c.makeMessageType("streamlayer.sports.baseball.Hitting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"hits_per_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"run_batted_in",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"batting_average",kind:"scalar",T:9}]),of=c.makeMessageType("streamlayer.sports.baseball.Batting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"at_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"hits",kind:"scalar",T:9},{no:5,name:"batting_average",kind:"scalar",T:9}]),so=c.makeMessageType("streamlayer.sports.baseball.Pitching",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"innings_pitched",kind:"scalar",T:9},{no:3,name:"hits_by_pitch",kind:"scalar",T:9},{no:4,name:"earned_runs",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"strikeouts",kind:"scalar",T:9}]),Tr=c.makeMessageType("streamlayer.sports.baseball.BaseballTeamSummary",()=>[{no:1,name:"hitting",kind:"message",T:rf,repeated:!0},{no:2,name:"batting",kind:"message",T:of,repeated:!0},{no:3,name:"pitching",kind:"message",T:so,repeated:!0}]),cf=c.makeMessageType("streamlayer.sports.baseball.BaseballSummary",()=>[{no:1,name:"home_pitcher",kind:"message",T:fr},{no:2,name:"away_pitcher",kind:"message",T:fr},{no:3,name:"home_statistics",kind:"message",T:Tr},{no:4,name:"away_statistics",kind:"message",T:Tr}]),lf=c.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:uf,repeated:!0},{no:5,name:"runs",kind:"scalar",T:5},{no:6,name:"hits",kind:"scalar",T:5},{no:7,name:"errors",kind:"scalar",T:5}]),uf=c.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics.BaseballPlayByPlayDetailStatistics",()=>[{no:1,name:"score_home",kind:"scalar",T:5},{no:2,name:"score_away",kind:"scalar",T:5},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}],{localName:"BaseballPlayByPlayStatistics_BaseballPlayByPlayDetailStatistics"}),mf=c.makeMessageType("streamlayer.sports.baseball.EventScore",()=>[{no:1,name:"outs",kind:"scalar",T:5},{no:2,name:"inning",kind:"scalar",T:5},{no:3,name:"inning_division",kind:"scalar",T:9},{no:4,name:"is_delayed",kind:"scalar",T:8},{no:5,name:"reason_for_delay",kind:"scalar",T:9},{no:6,name:"runners_on_base",kind:"message",T:sf,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),df=c.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:lf,repeated:!0}]),pf=c.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:cf}]),yf=c.makeMessageType("streamlayer.sports.baseball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:gf},{no:11,name:"rank",kind:"message",T:ff},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),gf=c.makeMessageType("streamlayer.sports.baseball.TeamStanding.Streak",()=>[{no:1,name:"losses",kind:"scalar",T:5},{no:2,name:"wins",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),ff=c.makeMessageType("streamlayer.sports.baseball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),Tf=c.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:yf,repeated:!0}]),hf=c.makeEnum("streamlayer.sports.basketball.BasketballPerformerCategory",[{no:0,name:"BASKETBALL_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"BASKETBALL_PERFORMER_CATEGORY_POINTS",localName:"POINTS"},{no:2,name:"BASKETBALL_PERFORMER_CATEGORY_REBOUNDS",localName:"REBOUNDS"},{no:3,name:"BASKETBALL_PERFORMER_CATEGORY_ASSISTS",localName:"ASSISTS"}]),kf=c.makeMessageType("streamlayer.sports.basketball.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),hr=c.makeMessageType("streamlayer.sports.basketball.BasketballTeamSummary",()=>[{no:1,name:"field_goal_percentage",kind:"scalar",T:1},{no:2,name:"three_pts_percentage",kind:"scalar",T:1},{no:3,name:"free_throw_percentage",kind:"scalar",T:1},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5}]),kr=c.makeMessageType("streamlayer.sports.basketball.BasketballPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:9}]),Mf=c.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(hf)},{no:2,name:"home_player",kind:"message",T:kr},{no:3,name:"away_player",kind:"message",T:kr}]),Nf=c.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:hr},{no:2,name:"away_statistics",kind:"message",T:hr}]),If=c.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Nf},{no:2,name:"top_performers",kind:"message",T:Mf,repeated:!0},{no:3,name:"last_games",kind:"message",T:ro}]),Sf=c.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:Xn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),Af=c.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Sf,repeated:!0}]),Mr=c.makeMessageType("streamlayer.sports.basketball.PlayerScores",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"points",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5},{no:6,name:"minutes",kind:"scalar",T:1},{no:7,name:"starter",kind:"scalar",T:8}]),Ef=c.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Mr,repeated:!0},{no:2,name:"away_players",kind:"message",T:Mr,repeated:!0}]),bf=c.makeMessageType("streamlayer.sports.basketball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:Df},{no:11,name:"rank",kind:"message",T:vf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Df=c.makeMessageType("streamlayer.sports.basketball.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),vf=c.makeMessageType("streamlayer.sports.basketball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),_f=c.makeMessageType("streamlayer.sports.basketball.Standings",()=>[{no:1,name:"standings",kind:"message",T:bf,repeated:!0}]),Nr=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),Ir=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineup",()=>[{no:3,name:"start_players",kind:"message",T:Nr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Nr,repeated:!0}]),wf=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Ir},{no:2,name:"away_team",kind:"message",T:Ir}]),ta=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:jf}]),jf=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGame.BasketballLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"BasketballLastGame_BasketballLastGameAttributes"}),ro=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGames",()=>[{no:1,name:"home",kind:"message",T:ta,repeated:!0},{no:2,name:"away",kind:"message",T:ta,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:ta,repeated:!0}]),Of=c.makeEnum("streamlayer.sports.hockey.HockeyPerformerCategory",[{no:0,name:"HOCKEY_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PERFORMER_CATEGORY_GOALS",localName:"GOALS"},{no:2,name:"HOCKEY_PERFORMER_CATEGORY_SHOTS",localName:"SHOTS"},{no:3,name:"HOCKEY_PERFORMER_CATEGORY_HITS",localName:"HITS"},{no:4,name:"HOCKEY_PERFORMER_CATEGORY_SAVES",localName:"SAVES"}]),io=c.makeEnum("streamlayer.sports.hockey.HockeyPlayerPosition",[{no:0,name:"HOCKEY_PLAYER_POSITION_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PLAYER_POSITION_CENTER",localName:"CENTER"},{no:2,name:"HOCKEY_PLAYER_POSITION_LEFT_WIND",localName:"LEFT_WIND"},{no:3,name:"HOCKEY_PLAYER_POSITION_RIGHT_WING",localName:"RIGHT_WING"},{no:4,name:"HOCKEY_PLAYER_POSITION_DEFENSE",localName:"DEFENSE"},{no:5,name:"HOCKEY_PLAYER_POSITION_GOALTENDER",localName:"GOALTENDER"}]),Lf=c.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),Sr=c.makeMessageType("streamlayer.sports.hockey.HockeyPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),Rf=c.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(Of)},{no:2,name:"home_player",kind:"message",T:Sr,repeated:!0},{no:3,name:"away_player",kind:"message",T:Sr,repeated:!0}]),Ar=c.makeMessageType("streamlayer.sports.hockey.HockeyTeamSummary",()=>[{no:1,name:"shots_on_goal",kind:"scalar",T:5},{no:2,name:"faceoff",kind:"scalar",T:1},{no:3,name:"powerplay",kind:"scalar",T:5},{no:4,name:"penalty_minutes",kind:"scalar",T:5},{no:5,name:"hits",kind:"scalar",T:5},{no:6,name:"blocks",kind:"scalar",T:5},{no:7,name:"giveaways",kind:"scalar",T:5},{no:8,name:"takeaways",kind:"scalar",T:5}]),xf=c.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Ar},{no:2,name:"away_statistics",kind:"message",T:Ar}]),Cf=c.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:xf},{no:2,name:"top_performers",kind:"message",T:Rf,repeated:!0}]),zf=c.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:Xn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),Uf=c.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:zf,repeated:!0}]),aa=c.makeMessageType("streamlayer.sports.hockey.PlayerScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"goals",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"shots",kind:"scalar",T:5},{no:6,name:"penalty_minutes",kind:"scalar",T:1},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:c.getEnumType(io)}]),Er=c.makeMessageType("streamlayer.sports.hockey.GoaltenderScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"shots_againts",kind:"scalar",T:5},{no:4,name:"goals_againts",kind:"scalar",T:5},{no:5,name:"saves",kind:"scalar",T:5},{no:6,name:"saves_pct",kind:"scalar",T:5},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:c.getEnumType(io)}]),br=c.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:aa,repeated:!0},{no:2,name:"goaltender",kind:"message",T:Er},{no:3,name:"forwards",kind:"message",T:aa,repeated:!0},{no:4,name:"defensemen",kind:"message",T:aa,repeated:!0},{no:5,name:"goaltenders",kind:"message",T:Er,repeated:!0}]),Pf=c.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:br},{no:2,name:"away_players",kind:"message",T:br}]),Bf=c.makeMessageType("streamlayer.sports.hockey.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:Qf},{no:11,name:"rank",kind:"message",T:Ff},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Qf=c.makeMessageType("streamlayer.sports.hockey.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),Ff=c.makeMessageType("streamlayer.sports.hockey.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),Gf=c.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:Bf,repeated:!0}]),Yf=c.makeEnum("streamlayer.sports.soccer.SoccerPerformerCategory",[{no:0,name:"SOCCER_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"SOCCER_PERFORMER_CATEGORY_ATTACK",localName:"ATTACK"},{no:2,name:"SOCCER_PERFORMER_CATEGORY_MIDFIELD",localName:"MIDFIELD"},{no:3,name:"SOCCER_PERFORMER_CATEGORY_DEFENSE",localName:"DEFENSE"}]),Vf=c.makeEnum("streamlayer.sports.soccer.SoccerMatchActivityType",[{no:0,name:"SOCCER_MATCH_ACTIVITY_UNSET"},{no:1,name:"SOCCER_MATCH_ACTIVITY_GOAL"},{no:2,name:"SOCCER_MATCH_ACTIVITY_YELLOW_CARD"},{no:3,name:"SOCCER_MATCH_ACTIVITY_RED_CARD"},{no:4,name:"SOCCER_MATCH_ACTIVITY_SUBSTITUTION"},{no:5,name:"SOCCER_MATCH_ACTIVITY_HALF_TIME"},{no:6,name:"SOCCER_MATCH_ACTIVITY_FULL_TIME"}]),$f=c.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),is=c.makeMessageType("streamlayer.sports.soccer.SoccerPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),qf=c.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:is},{no:2,name:"attack_stats",kind:"message",T:tT}]),Wf=c.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:is},{no:2,name:"midfield_stats",kind:"message",T:aT}]),Hf=c.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:is},{no:2,name:"defense_stats",kind:"message",T:sT}]),Zf=c.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(Yf)},{no:2,name:"attack_performer",kind:"message",T:qf},{no:3,name:"midfield_performer",kind:"message",T:Wf},{no:4,name:"defense_performer",kind:"message",T:Hf}]),Kf=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamTopMatchStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"shots",kind:"scalar",T:5},{no:3,name:"shots_on_target",kind:"scalar",T:5},{no:4,name:"passes",kind:"scalar",T:5},{no:5,name:"offsides",kind:"scalar",T:5},{no:6,name:"yellow_cards",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"free_kicks",kind:"scalar",T:5},{no:9,name:"red_cards",kind:"scalar",T:5}]),Jf=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamAttackingStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"passing_accuracy",kind:"scalar",T:1},{no:3,name:"chances_created",kind:"scalar",T:5},{no:4,name:"successful_crosses",kind:"scalar",T:1}]),Xf=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamDefenseStats",()=>[{no:1,name:"tackles_made",kind:"scalar",T:5},{no:2,name:"interceptions",kind:"scalar",T:5},{no:3,name:"blocked_shots",kind:"scalar",T:5},{no:4,name:"clearances",kind:"scalar",T:5},{no:5,name:"duels_won",kind:"scalar",T:5}]),Dr=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:Kf},{no:2,name:"attacking_stats",kind:"message",T:Jf},{no:3,name:"defense_stats",kind:"message",T:Xf}]),eT=c.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Dr},{no:2,name:"away_statistics",kind:"message",T:Dr},{no:3,name:"perfomers",kind:"message",T:Zf}]),nT=c.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:eT},{no:2,name:"last_games",kind:"message",T:oo}]),tT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayerAttackingStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"shots",kind:"scalar",T:5},{no:4,name:"shots_on_goal",kind:"scalar",T:5},{no:5,name:"penalty_kick_goals",kind:"scalar",T:5}]),aT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayerMidfieldStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"key_passes",kind:"scalar",T:5},{no:4,name:"crosses",kind:"scalar",T:5},{no:5,name:"corners",kind:"scalar",T:5}]),sT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayerDefenseStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"tackles_made",kind:"scalar",T:5},{no:4,name:"interceptions",kind:"scalar",T:5},{no:5,name:"blocked_shots",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.soccer.SoccerMatchOdds",()=>[{no:1,name:"home_team_win",kind:"scalar",T:1},{no:2,name:"draw",kind:"scalar",T:1},{no:3,name:"away_team_win",kind:"scalar",T:1}]);const rT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrixPlayer",()=>[{no:1,name:"jersey_number",kind:"scalar",T:5},{no:2,name:"player_name",kind:"scalar",T:9},{no:3,name:"photo",kind:"scalar",T:9}]),iT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:rT,repeated:!0}]),vr=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),_r=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineup",()=>[{no:1,name:"formation_string",kind:"scalar",T:9},{no:2,name:"formation_matrix",kind:"message",T:iT,repeated:!0},{no:3,name:"start_players",kind:"message",T:vr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:vr,repeated:!0}]),oT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:_r},{no:2,name:"away_team",kind:"message",T:_r}]);c.makeMessageType("streamlayer.sports.soccer.SoccerMatchScore",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"mil",kind:"scalar",T:1},{no:3,name:"round",kind:"scalar",T:9},{no:4,name:"live_url",kind:"scalar",T:9}]);const cT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:Xn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5},{no:8,name:"type",kind:"enum",T:c.getEnumType(Vf)}]),lT=c.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:cT,repeated:!0}]),uT=c.makeMessageType("streamlayer.sports.soccer.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"draws",kind:"scalar",T:5},{no:9,name:"games_behind",kind:"scalar",T:5},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"points",kind:"scalar",T:5},{no:14,name:"position",kind:"scalar",T:5},{no:15,name:"total_goals",kind:"scalar",T:5},{no:16,name:"total_goals_received",kind:"scalar",T:5}]),mT=c.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:uT,repeated:!0}]),sa=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:dT}]),dT=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGame.SoccerLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"SoccerLastGame_SoccerLastGameAttributes"}),oo=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGames",()=>[{no:1,name:"home",kind:"message",T:sa,repeated:!0},{no:2,name:"away",kind:"message",T:sa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:sa,repeated:!0}]),Tn=c.makeEnum("streamlayer.sports.events.EventType",[{no:0,name:"EVENT_TYPE_UNSET",localName:"UNSET"},{no:1,name:"EVENT_TYPE_BASEBALL",localName:"BASEBALL"},{no:2,name:"EVENT_TYPE_BASKETBALL",localName:"BASKETBALL"},{no:3,name:"EVENT_TYPE_HOCKEY",localName:"HOCKEY"},{no:4,name:"EVENT_TYPE_SOCCER",localName:"SOCCER"},{no:5,name:"EVENT_TYPE_GOLF",localName:"GOLF"}]),pT=c.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:mf,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:kf,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:Lf,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:$f,oneof:"sport"}]),yT=c.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:pT}]),gT=c.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:ef}]),co=c.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:gT}]),fT=c.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:TT},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"sort",kind:"message",T:no},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),TT=c.makeMessageType("streamlayer.sports.events.ListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9},{no:3,name:"start_date_time",kind:"scalar",T:9},{no:4,name:"end_date_time",kind:"scalar",T:9},{no:5,name:"sport",kind:"scalar",T:9},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"endless",kind:"enum",T:c.getEnumType(rs)}],{localName:"ListRequest_Filter"}),hT=c.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:kT},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"sort",kind:"message",T:no}]),kT=c.makeMessageType("streamlayer.sports.events.DemoListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"DemoListRequest_Filter"}),MT=c.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:xt},{no:2,name:"data",kind:"message",T:co,repeated:!0}]),NT=c.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:xt},{no:2,name:"data",kind:"message",T:co,repeated:!0}]),wr=c.makeMessageType("streamlayer.sports.events.SummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),jr=c.makeMessageType("streamlayer.sports.events.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:IT}]),IT=c.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:ST}],{localName:"SummaryResponse_ResponseData"}),ST=c.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:pf,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:If,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Cf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:nT,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),AT=c.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),ET=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:bT}]),bT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:DT}],{localName:"AdminSummaryResponse_ResponseData"}),DT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),vT=c.makeMessageType("streamlayer.sports.events.PlayByPlayRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"order",kind:"scalar",T:9}]),_T=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse",()=>[{no:1,name:"data",kind:"message",T:wT},{no:2,name:"meta",kind:"message",T:xt}]),wT=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:jT}],{localName:"PlayByPlayResponse_ResponseData"}),jT=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:df,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Af,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Uf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:lT,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),OT=c.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:LT},{no:2,name:"pagination",kind:"message",T:Rt}]),LT=c.makeMessageType("streamlayer.sports.events.ScheduleRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleRequest_Filter"}),RT=c.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:yT,repeated:!0},{no:2,name:"meta",kind:"message",T:xt}]),xT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:CT}]),CT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),zT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),UT=c.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),PT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:BT}]),BT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:QT}],{localName:"BoxscoreResponse_ResponseData"}),QT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"basketball",kind:"message",T:Ef,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Pf,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),FT=c.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),GT=c.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:YT}]),YT=c.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:2,name:"attributes",kind:"message",T:VT}],{localName:"StandingsResponse_ResponseData"}),VT=c.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData.StandingsResponseAttributes",()=>[{no:2,name:"basketball",kind:"message",T:_f,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Gf,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:Tf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:mT,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),$T=c.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),qT=c.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:WT}]),WT=c.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:HT}],{localName:"LineupResponse_ResponseData"}),HT=c.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"soccer",kind:"message",T:oT,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:wf,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),ZT=c.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),KT=c.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:JT}]),JT=c.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:XT}],{localName:"LastGamesResponse_ResponseData"}),XT=c.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"soccer",kind:"message",T:oo,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:ro,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),eh=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),nh=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:th}]),th=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"}),ah={typeName:"streamlayer.sports.events.Events",methods:{list:{name:"List",I:fT,O:NT,kind:P.Unary},demoList:{name:"DemoList",I:hT,O:MT,kind:P.Unary},summary:{name:"Summary",I:wr,O:jr,kind:P.Unary},adminSummary:{name:"AdminSummary",I:AT,O:ET,kind:P.Unary},boxscore:{name:"Boxscore",I:UT,O:PT,kind:P.Unary},standings:{name:"Standings",I:FT,O:GT,kind:P.Unary},playByPlay:{name:"PlayByPlay",I:vT,O:_T,kind:P.Unary},schedule:{name:"Schedule",I:OT,O:RT,kind:P.Unary},scheduleDates:{name:"ScheduleDates",I:xT,O:zT,kind:P.Unary},lineup:{name:"Lineup",I:$T,O:qT,kind:P.Unary},retrieveEventId:{name:"RetrieveEventId",I:eh,O:nh,kind:P.Unary},lastGames:{name:"LastGames",I:ZT,O:KT,kind:P.Unary},summarySubscription:{name:"SummarySubscription",I:wr,O:jr,kind:P.ServerStreaming}}},sh=c.makeEnum("streamlayer.sdkSettings.client.VisibleStatus",[{no:0,name:"VISIBLE_STATUS_UNSET",localName:"UNSET"},{no:1,name:"VISIBLE_STATUS_INCOGNITO",localName:"INCOGNITO"},{no:2,name:"VISIBLE_STATUS_VISIBLE",localName:"VISIBLE"}]),rh=c.makeEnum("streamlayer.sdkSettings.client.MessagesNotify",[{no:0,name:"MESSAGES_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_NOTIFY_ALLOW",localName:"ALLOW"}]),ih=c.makeEnum("streamlayer.sdkSettings.client.FriendsNotify",[{no:0,name:"FRIENDS_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_NOTIFY_ALLOW",localName:"ALLOW"}]),oh=c.makeEnum("streamlayer.sdkSettings.client.TwitterNotify",[{no:0,name:"TWITTER_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_NOTIFY_ALLOW",localName:"ALLOW"}]),ch=c.makeEnum("streamlayer.sdkSettings.client.CallsSound",[{no:0,name:"CALLS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"CALLS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"CALLS_SOUND_ALLOW",localName:"ALLOW"}]),lh=c.makeEnum("streamlayer.sdkSettings.client.MessagesSound",[{no:0,name:"MESSAGES_SOUND_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_SOUND_ALLOW",localName:"ALLOW"}]),uh=c.makeEnum("streamlayer.sdkSettings.client.FriendsSound",[{no:0,name:"FRIENDS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_SOUND_ALLOW",localName:"ALLOW"}]),mh=c.makeEnum("streamlayer.sdkSettings.client.TwitterSound",[{no:0,name:"TWITTER_SOUND_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_SOUND_ALLOW",localName:"ALLOW"}]),lo=c.makeEnum("streamlayer.sdkSettings.client.SettingsAllow",[{no:0,name:"SETTINGS_ALLOW_UNSET",localName:"UNSET"},{no:1,name:"SETTINGS_ALLOW_DISALLOW",localName:"DISALLOW"},{no:2,name:"SETTINGS_ALLOW_ALLOW",localName:"ALLOW"}]),dh=c.makeEnum("streamlayer.sdkSettings.client.ManagedGroupType",[{no:0,name:"MANAGED_GROUP_TYPE_UNSET",localName:"UNSET"},{no:1,name:"MANAGED_GROUP_TYPE_CHAT",localName:"CHAT"},{no:2,name:"MANAGED_GROUP_TYPE_WP",localName:"WP"}]),ph=c.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:c.getEnumType(lo)}]),yh=c.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:c.getEnumType(lo)}]),ra=c.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:ph},{no:2,name:"sound",kind:"message",T:yh}]),os=c.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:c.getEnumType(sh)},{no:2,name:"messages_notify",kind:"enum",T:c.getEnumType(rh)},{no:3,name:"friends_notify",kind:"enum",T:c.getEnumType(ih)},{no:4,name:"calls_sound",kind:"enum",T:c.getEnumType(ch)},{no:5,name:"messages_sound",kind:"enum",T:c.getEnumType(lh)},{no:6,name:"friends_sound",kind:"enum",T:c.getEnumType(uh)},{no:7,name:"twitter_notify",kind:"enum",T:c.getEnumType(oh)},{no:8,name:"twitter_sound",kind:"enum",T:c.getEnumType(mh)},{no:9,name:"gamification",kind:"message",T:ra},{no:10,name:"watch_party_invitation",kind:"message",T:ra},{no:11,name:"twitter_question",kind:"message",T:ra}]),gh=c.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),fh=c.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:Th}]),Th=c.makeMessageType("streamlayer.sdkSettings.client.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:os}],{localName:"GetResponse_GetResponseData"}),hh=c.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:os}]),kh=c.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:Mh}]),Mh=c.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse.UpdateResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:os}],{localName:"UpdateResponse_UpdateResponseData"}),Nh=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ih=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:Sh}]),Sh=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Wi}],{localName:"GetStreamResponse_GetResponseData"}),Ah=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),Eh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:bh}]),bh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Hi}],{localName:"GetOrganizationResponse_GetResponseData"}),Dh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),vh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:_h}]),_h=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse.GetOrganizationAdvertisingResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Zi}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),wh=c.makeMessageType("streamlayer.sdkSettings.client.ManagedGroup",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"fantasy_group_id",kind:"scalar",T:9},{no:3,name:"group_type",kind:"enum",T:c.getEnumType(dh)}]),uo=c.makeMessageType("streamlayer.sdkSettings.client.DeepLinkData",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"gamification",kind:"scalar",T:8},{no:4,name:"managed_group",kind:"message",T:wh},{no:5,name:"external_event_id",kind:"scalar",T:9}]),jh=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:uo}]),Oh=c.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),Lh=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:Rh}]),Rh=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Oh}],{localName:"GenerateDeepLinkResponse_GenerateDeepLinkResponseData"});c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkRequest",()=>[{no:1,name:"url",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:xh}]);const xh=c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:uo}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),Ch=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),zh=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),Uh=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Ph}]),Ph=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Wi}],{localName:"StreamSubscriptionResponse_ResponseData"}),Bh=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Qh}]),Qh=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Hi}],{localName:"OrganizationSubscriptionResponse_ResponseData"}),zt={typeName:"streamlayer.sdkSettings.client.Client",methods:{get:{name:"Get",I:gh,O:fh,kind:P.Unary},update:{name:"Update",I:hh,O:kh,kind:P.Unary},getStream:{name:"GetStream",I:Nh,O:Ih,kind:P.Unary},getOrganization:{name:"GetOrganization",I:Ah,O:Eh,kind:P.Unary},getOrganizationAdvertising:{name:"GetOrganizationAdvertising",I:Dh,O:vh,kind:P.Unary},generateDeepLink:{name:"GenerateDeepLink",I:jh,O:Lh,kind:P.Unary},streamSubscription:{name:"StreamSubscription",I:Ch,O:Uh,kind:P.ServerStreaming},organizationSubscription:{name:"OrganizationSubscription",I:zh,O:Bh,kind:P.ServerStreaming}}},Fh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(ah,{method:"retrieveEventId",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var l;if(!i||typeof i!="string")return"";try{return((l=(await t.retrieveEventId({id:i})).data)==null?void 0:l.id)||""}catch{return""}}})},Gh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(zt,{method:"getStream",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m;return i?(m=(await t.getStream({id:i})).data)==null?void 0:m.attributes:void 0}})},Yh=(n,e)=>{const{queryKey:t,client:s}=e.createPromiseClient(Jn,{method:"me",params:[n]});return e.nanoquery.createFetcherStore(t,{fetcher:()=>s.me({})})},Vh=n=>{const{client:e,queryKeyStr:t}=n.createPromiseClient(Jn,{method:"bypassAuth"});return n.nanoquery.createMutatorStore(async({data:{userKey:s,schema:a,init:r},getCacheUpdater:i})=>{const[l]=i(t),m=await e.bypassAuth({userKey:s,schema:a,init:r});return l(m),m})},$h=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(zt,{method:"get",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async()=>{var r;return(r=(await t.get({})).data)==null?void 0:r.attributes}})},qh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(zt,{method:"getOrganization",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async()=>{const a=await t.getOrganization({});return a.data?{...a.data.attributes,id:a.data.id}:void 0}})},Wh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(zt,{method:"getOrganizationAdvertising",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async()=>{var r;return(r=(await t.getOrganizationAdvertising({})).data)==null?void 0:r.attributes}})},Hh=(n,e,t)=>{n.transport=new Qg(e.host),n.sdk.host=n.transport.host,n.transport.setSdkKey(e.sdkKey),t()};var En=(n=>(n.DISABLED="disabled",n.INITIALIZATION="initialization",n.READY="ready",n.FAILED="failed",n.SUSPENDED="suspended",n))(En||{});const Zh=n=>{const e=new Le(Re(),"enabled"),t=new Le(Re("disabled"),"status"),s=new Le(Re(),"userKey"),a=new Le(Re(),"userToken");a.listen(T=>{T?localStorage.setItem("sl-user-token",T):localStorage.removeItem("sl-user-token")});const r=new Le(Re(),"providerStreamId"),i=new ze(Fh(r.getStore(),n),"slStreamId",T=>T==null?void 0:T.data),l=new ze(Yh(a.getStore(),n),"user",T=>{var M,E;return(E=(M=T==null?void 0:T.data)==null?void 0:M.data)==null?void 0:E.id}),m=new ze($h(a.getStore(),n),"userSettings"),d=new ze(Gh(i.getAtomStore(),n),"streamSettings");i.getAtomStore().listen(T=>{(T===""||T===void 0)&&d.getStore().mutate(void 0)});const y=new ze(qh(e.getStore(),n),"organizationSettings",T=>{var M;return(M=T==null?void 0:T.data)==null?void 0:M.id}),h=new ze(Wh(y.getAtomStore(),n),"organizationAdvertising");return{enabled:e,status:t,providerStreamId:r,slStreamId:i,streamSettings:d,user:l,userKey:s,userToken:a,userSettings:m,organizationSettings:y,organizationAdvertising:h}};class Kh extends Ot{constructor(t){const s=Zh(t),a=gg(s);super(a,"core");S(this,"stores");S(this,"subscribe",t=>{let s;for(s in this.stores){const a=t[s];s in t&&a!==void 0&&this.stores[s].subscribe(t[s])}});S(this,"unsubscribe",()=>this.getStore().off());this.stores=s}getValue(){throw new Error("Not implemented")}getValues(){return this.stores}setValue(){throw new Error("Not implemented")}}const Jh=(n,e,t)=>{n.store=new Kh(n.transport),n.stores=n.store.getValues(),n.sdk.sdkStore=n.store.getStore(),n.sdk.organizationStore=()=>n.stores.organizationSettings.getStore(),n.storeUnsubscribe=()=>{n.store.unsubscribe()},t()},Ve={typeName:"streamlayer.interactive.feed.Feed",methods:{get:{name:"Get",I:cp,O:lp,kind:P.Unary},subscription:{name:"Subscription",I:dd,O:pd,kind:P.ServerStreaming},votingSubscription:{name:"VotingSubscription",I:gd,O:fd,kind:P.ServerStreaming},questionSubscription:{name:"QuestionSubscription",I:kd,O:Md,kind:P.ServerStreaming},questionByUser:{name:"QuestionByUser",I:Sd,O:Ad,kind:P.Unary},syncQuestion:{name:"SyncQuestion",I:bd,O:vd,kind:P.Unary},getQuestion:{name:"GetQuestion",I:wd,O:jd,kind:P.Unary},questionDetail:{name:"QuestionDetail",I:Ld,O:Rd,kind:P.Unary},submitAnswer:{name:"SubmitAnswer",I:Cd,O:Ud,kind:P.Unary},submitInplay:{name:"SubmitInplay",I:Bd,O:Fd,kind:P.Unary},skipQuestion:{name:"SkipQuestion",I:Gd,O:Vd,kind:P.Unary},pickHistory:{name:"PickHistory",I:qd,O:Hd,kind:P.Unary},insightHistory:{name:"InsightHistory",I:Jd,O:ep,kind:P.Unary},tweetHistory:{name:"TweetHistory",I:tp,O:sp,kind:P.Unary},promotionHistory:{name:"PromotionHistory",I:mp,O:pp,kind:P.Unary}}},Xh=c.makeEnum("streamlayer.interactive.leaderboard.LeaderboardType",[{no:0,name:"LEADERBOARD_TYPE_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_TYPE_TOURNAMENT",localName:"TOURNAMENT"},{no:2,name:"LEADERBOARD_TYPE_EVENT",localName:"EVENT"}]),mo=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(Xh)},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"event_ids",kind:"scalar",T:3,repeated:!0},{no:5,name:"leaderboards",kind:"message",T:mo,repeated:!0},{no:6,name:"created_at",kind:"scalar",T:3}]),cs=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardItem",()=>[{no:1,name:"streak",kind:"scalar",T:5},{no:2,name:"correct",kind:"scalar",T:5},{no:3,name:"incorrect",kind:"scalar",T:5},{no:4,name:"points",kind:"scalar",T:5},{no:5,name:"rank",kind:"scalar",T:5},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"avatar",kind:"scalar",T:9},{no:8,name:"user_id",kind:"scalar",T:9},{no:9,name:"recent_correct",kind:"scalar",T:5},{no:10,name:"streak_loss",kind:"scalar",T:5},{no:11,name:"friends_rank",kind:"scalar",T:5},{no:12,name:"in_top",kind:"scalar",T:5}]),ek=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem",()=>[{no:1,name:"summary",kind:"message",T:cs},{no:2,name:"percentage",kind:"message",T:nk}]),nk=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem.SummaryPercentage",()=>[{no:1,name:"correct",kind:"scalar",T:5},{no:2,name:"average",kind:"scalar",T:5}],{localName:"LeaderboardSummaryItem_SummaryPercentage"}),tk=c.makeMessageType("streamlayer.interactive.leaderboard.ListRequest",()=>[{no:1,name:"pagination",kind:"message",T:Za},{no:2,name:"users_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"event_id",kind:"scalar",T:4},{no:4,name:"leaderboard_id",kind:"scalar",T:9}]),ak=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse",()=>[{no:1,name:"data",kind:"message",T:sk,repeated:!0},{no:2,name:"meta",kind:"message",T:rk}]),sk=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cs}],{localName:"ListResponse_ListResponseData"}),rk=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"ListResponse_ListResponseMeta"}),ik=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"leaderboard_id",kind:"scalar",T:9},{no:4,name:"users_ids",kind:"scalar",T:9,repeated:!0}]),ok=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:ck}]),ck=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse.SummaryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:ek}],{localName:"SummaryResponse_SummaryResponseData"}),lk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9}]),uk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse",()=>[{no:2,name:"data",kind:"message",T:mk}]),mk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse.EventLeaderboardsResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:mo}],{localName:"EventLeaderboardsResponse_EventLeaderboardsResponseData"}),dk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"pagination",kind:"message",T:Za},{no:4,name:"sort",kind:"message",T:rd}]),pk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse",()=>[{no:1,name:"data",kind:"message",T:yk,repeated:!0},{no:2,name:"meta",kind:"message",T:gk}]),yk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cs}],{localName:"EventLeaderboardResponse_ListResponseData"}),gk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"EventLeaderboardResponse_ListResponseMeta"}),fk={typeName:"streamlayer.interactive.leaderboard.Leaderboard",methods:{list:{name:"List",I:tk,O:ak,kind:P.Unary},summary:{name:"Summary",I:ik,O:ok,kind:P.Unary},eventLeaderboards:{name:"EventLeaderboards",I:lk,O:uk,kind:P.Unary},eventLeaderboard:{name:"EventLeaderboard",I:dk,O:pk,kind:P.Unary}}},Tk=(n,e,t)=>{const{client:s,queryKey:a}=t.createPromiseClient(fk,{method:"summary",params:[n,e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,i,l,m)=>{var y;return(y=(await s.summary({eventId:l,userId:m})).data)==null?void 0:y.attributes}})},hk=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ve,{method:"syncQuestion",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m;return i?(m=(await t.syncQuestion({filter:{eventId:i}})).data)==null?void 0:m.attributes:void 0}})},kk=(n,e)=>{const{client:t}=e.createCallbackClient(Ve),s=De.atom({eventId:n.get()||"",feedId:""});return n.subscribe((r="")=>{s.set({eventId:r,feedId:""})}),e.addSubscription(t.subscription,s,{name:"feedSubscription"})},Mk=(n,e)=>{const{client:t}=e.createCallbackClient(Ve);return e.addSubscription(t.questionSubscription,{questionId:n},{name:"questionSubscription"})},Nk=async(n,e)=>{var a,r;const{client:t}=e.createPromiseClient(Ve,{method:"questionByUser",params:[n]});return(r=(a=(await t.questionByUser({questionId:n})).data)==null?void 0:a.attributes)==null?void 0:r.question},Ik=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ve,{method:"questionByUser",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m,d;return(d=(m=(await t.questionByUser({questionId:i})).data)==null?void 0:m.attributes)==null?void 0:d.question}})},Sk=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ve,{method:"pickHistory",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m;return i?(m=(await t.pickHistory({eventId:i})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},Ak=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ve,{method:"insightHistory",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m;return i?(m=(await t.insightHistory({eventId:i})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},po=n=>(n.gamification||(n.gamification=new Ek(n)),n.gamification);class Ek{constructor(e){S(this,"slStreamId");S(this,"organizationId");S(this,"userId");S(this,"openedQuestionId");S(this,"openedQuestion");S(this,"activeQuestionId");S(this,"moderationId");S(this,"feedSubscription");S(this,"questionSubscription");S(this,"notifications");S(this,"log");S(this,"getCurrentSessionId",e=>{const t=e.eventId||this.slStreamId.get()||"",s=e.userId||this.userId.get()||"",a=e.organizationId||this.organizationId.get()||"",r=e.entity||"",i=e.prefix||"";return[a,t,s,i,r].join(":")});S(this,"disconnect",()=>{var e;(e=this.feedSubscription)==null||e.disconnect()});S(this,"openQuestion",e=>{this.openedQuestionId.set(e),this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:e}))});S(this,"closeQuestion",e=>{this.openedQuestionId.set(void 0),e&&this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:e}))});if(e.gamification)throw new Error("GamificationBackground Singleton error");this.log=eo("gamification-background"),this.slStreamId=e.stores.slStreamId.getAtomStore(),this.organizationId=e.stores.organizationSettings.getAtomStore(),this.userId=e.stores.user.getAtomStore(),this.moderationId=new Le(Re(),"moderationId").getStore(),this.openedQuestionId=new Le(Re(),"openedQuestionId").getStore(),this.notifications=e.notifications,this.activeQuestionId=new ze(hk(this.slStreamId,e.transport),"gamification:activeQuestionId"),this.openedQuestion=new ze(Ik(this.openedQuestionId,e.transport),"gamification:activeQuestionId"),this.openedQuestionId.listen(t=>{var s;this.log.debug({questionId:t},"received question"),t?(this.questionSubscription=Mk(t,e.transport),this.questionSubscription.addListener("feed-subscription-opened-question",a=>{window.requestAnimationFrame(()=>{var r,i,l,m;(l=this.openedQuestion)==null||l.getStore().mutate((i=(r=a.data)==null?void 0:r.attributes)==null?void 0:i.question),(m=this.openedQuestion)==null||m.getStore().invalidate()})}),this.questionSubscription.connect()):(this.log.info("cleanup on close question"),(s=this.openedQuestion)==null||s.getStore().mutate(void 0),this.questionSubscription!==void 0&&(e.transport.removeSubscription(this.questionSubscription),this.questionSubscription=void 0))}),this.feedSubscription=kk(this.slStreamId,e.transport),this.feedSubscription.addListener("feed-subscription-active-question",t=>{window.requestAnimationFrame(()=>{var a;const s=this.activeQuestionId.getStore();s&&s.mutate((a=t.data)==null?void 0:a.attributes)})})}}class bk{constructor(e){S(this,"notificationsList");S(this,"notifications");S(this,"store");S(this,"timeouts");S(this,"waitingQueue");S(this,"activeQueue");S(this,"options");S(this,"logger");S(this,"addToQueue",e=>{if(this.store.has(e.id)){this.logger.debug({notification:e},"skip existed notification: %o");return}const t=e.close,s=e.action;this.store.set(e.id,{...e,close:(...a)=>{t&&t(...a),this.closeNotification(e.id)},action:(...a)=>{s&&s(...a),this.closeNotification(e.id)}}),this.waitingQueue.add(e.id),this.logger.debug({notification:e},"notification added to waiting queue"),this.tickWaitingQueue()});S(this,"tickWaitingQueue",()=>{if(this.activeQueue.size<this.options.concurrency){const[e]=this.waitingQueue;if(!e)return;this.activeQueue.add(e),this.waitingQueue.delete(e),this.logger.debug({job:e},"waiting queue tick"),this.tickActiveQueue(e)}else this.logger.debug({queueSize:this.activeQueue.size,concurrency:this.options.concurrency},"waiting queue tick skipped")});S(this,"tickActiveQueue",e=>{if(!e)return;const t=this.store.get(e);if(!t){this.logger.debug({notificationId:e},"active queue tick skipped, notification not exist");return}const s=setTimeout(()=>{const a=e,r=new Map(this.notifications.getValue());r.set(t.id,t),this.notifications.setValue(r);const i=setTimeout(()=>{this.logger.debug({notificationId:a},"notification hidding by autoHideDuration"),this.closeNotification(a)},t.autoHideDuration||5e3);this.timeouts.set(a,i),this.logger.debug({notificationId:a,queue:[...r.values()]},"notification displayed")},t.delay||0);this.timeouts.set(e,s),this.logger.debug({notificationId:e},"active queue tick completed"),this.tickWaitingQueue()});S(this,"closeNotification",e=>{const t=new Map(this.notifications.getValue()),s=t.get(e);if(s){s.hiding=!0,this.notifications.setValue(t);const a=setTimeout(()=>{const r=new Map(this.notifications.getValue());r.delete(e),this.notifications.setValue(r);const i=this.timeouts.get(e);i!==void 0&&(clearTimeout(i),this.timeouts.delete(e)),this.logger.debug({notificationId:e},"notification hidden")},this.options.animationDelay||0);this.timeouts.set(e,a)}this.store.delete(e),this.activeQueue.delete(e),this.waitingQueue.delete(e),this.tickWaitingQueue(),this.logger.debug({notificationId:e},"notification hidding")});this.options=e,this.logger=eo("notifications"),this.store=new Map,this.timeouts=new Map,this.waitingQueue=new Set,this.activeQueue=new Set,this.notifications=new Le(Re(new Map),"notifications-queue"),this.notificationsList=ns(this.notifications.getStore(),t=>t?[...t.values()]:[])}}var dn=(n=>(n[n.ONBOARDING=1]="ONBOARDING",n[n.QUESTION=2]="QUESTION",n))(dn||{});let Dk=class{constructor(e={}){S(this,"queue");S(this,"add",e=>{localStorage.getItem(`opened:${e.id}`)||this.queue.addToQueue(e)});S(this,"close",e=>{this.queue.closeNotification(e),this.markAsViewed(e)});S(this,"getQueueStore",()=>this.queue.notificationsList);S(this,"markAsViewed",e=>{localStorage.setItem(`opened:${e}`,e)});this.queue=new bk({concurrency:1,animationDelay:300,...e})}};const vk=(n,e,t)=>{n.notifications=new Dk,n.addNotification=n.notifications.add,n.sdk.getNotificationsStore=()=>n.notifications.getQueueStore(),t()},_k=(n,e)=>{const{client:t}=n.createPromiseClient(Ve,{method:"submitAnswer"});return t.submitAnswer({data:e})},wk=(n,e)=>{const{client:t}=n.createPromiseClient(Ve,{method:"submitInplay"});return t.submitInplay({data:{eventId:+e}})},jk=(n,e)=>{const{client:t}=n.createPromiseClient(Ve,{method:"skipQuestion"});return t.skipQuestion({data:{id:e}})},Or=new Set([ge.POLL,ge.PREDICTION,ge.TRIVIA]);class yo extends es{constructor(t,s,a){super(t,s);S(this,"userSummary");S(this,"questions");S(this,"leaderboardId");S(this,"onbordingComplete");S(this,"openedQuestion");S(this,"notifications");S(this,"transport");S(this,"closeFeature");S(this,"openFeature");S(this,"background");S(this,"showOnbordingInApp",t=>{var i,l,m,d;if(t)return;const{inplayGame:s}=this.featureSettings.get();if(!s)return;const{titleCard:a,overview:r}=s;this.notifications.add({type:dn.ONBOARDING,id:this.background.getCurrentSessionId({prefix:"onboarding"}),action:this.openFeature,close:this.closeFeature,autoHideDuration:1e5,data:{header:a==null?void 0:a.header,title:a==null?void 0:a.title,subtitle:a==null?void 0:a.subtitle,graphicBg:(i=a==null?void 0:a.appearance)==null?void 0:i.graphic,icon:(l=a==null?void 0:a.media)==null?void 0:l.icon,sponsorLogo:(m=a==null?void 0:a.media)==null?void 0:m.sponsorLogo,primaryColor:(d=r==null?void 0:r.appearance)==null?void 0:d.primaryColor}})});S(this,"connect",t=>{this.userSummary?this.userSummary.invalidate():this.userSummary=new ze(Tk(this.background.slStreamId,this.background.userId,t),"gamification:userSummary"),this.questions?this.questions.invalidate():this.questions=new ze(Sk(this.background.slStreamId,t),"gamification:questions"),this.background.feedSubscription.addListener("feed-subscription-prediction-close",s=>{window.requestAnimationFrame(async()=>{var m,d;const a=(d=(m=s.data)==null?void 0:m.attributes)==null?void 0:d.question;if(!a)return;const{status:r,type:i,id:l}=a;if(r===Ze.RESOLVED&&i===ge.PREDICTION){const y=this.background.getCurrentSessionId({prefix:`notification-id:${l}`}),h=await Nk(l,t),T=h==null?void 0:h.answers.find(({correct:M})=>M);this.notifications.add({type:dn.ONBOARDING,action:()=>this.openQuestion(l),close:()=>this.closeQuestion(l),autoHideDuration:5e3,id:y,data:{title:T!=null&&T.youVoted?`Congratulations! You answered correctly! You won ${T.points} pts!`:`Better luck next time! Correct: ${T==null?void 0:T.text}!`}})}})}),this.background.feedSubscription.addListener("feed-subscription-questions-list",()=>{window.requestAnimationFrame(()=>{var s;(s=this.questions)==null||s.invalidate()})})});S(this,"disconnect",()=>{this.background.feedSubscription.removeListener("feed-subscription-questions-list")});S(this,"submitInplay",async()=>{const t=this.background.slStreamId.get();t&&(await wk(this.transport,t),this.onbordingComplete.set(!0),localStorage.setItem(`sl-onbording:${this.background.userId.get()}:${t}`,"true"))});S(this,"submitAnswer",async(t,s)=>{var a;await _k(this.transport,{questionId:t,answerId:s}),(a=this.questions)==null||a.invalidate()});S(this,"skipQuestion",async t=>{var s;await jk(this.transport,t),(s=this.questions)==null||s.invalidate()});S(this,"openQuestion",t=>(this.openFeature(),this.background.openQuestion(t)));S(this,"closeQuestion",t=>this.background.closeQuestion(t));if(this.background=po(a),this.leaderboardId=new Le(Re(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.onbordingComplete=new Le(Re(!1),"onbordingComplete").getStore(),this.notifications=a.notifications,this.transport=a.transport,this.closeFeature=a.sdk.closeFeature,this.openFeature=()=>a.sdk.openFeature(ve.GAMES),this.openedQuestion=ns(this.background.openedQuestion.getStore(),r=>{var i;if((i=r.data)!=null&&i.type&&Or.has(r.data.type))return r.data}),!this.background.userId.get())this.background.userId.subscribe(r=>{r&&window.requestAnimationFrame(()=>{const l=!!localStorage.getItem(`sl-onbording:${r}:${this.background.slStreamId.get()}`);this.onbordingComplete.set(l),this.showOnbordingInApp(l)})});else{const r=this.background.userId.get(),l=!!localStorage.getItem(`sl-onbording:${r}:${this.background.slStreamId.get()}`);this.onbordingComplete.set(l),this.showOnbordingInApp(l)}this.status.subscribe(r=>{r===He.Ready?(this.notifications.close(this.background.getCurrentSessionId({prefix:"onboarding"})),this.connect(a.transport)):this.disconnect()}),this.onbordingComplete.subscribe(r=>{r&&this.background.activeQuestionId.invalidate()}),this.background.activeQuestionId.listen(r=>{r&&r.data&&this.onbordingComplete.get()&&Or.has(r.data.question.type)&&r.data.question.status===Ze.ACTIVE&&this.notifications.add({type:dn.QUESTION,action:()=>this.openQuestion(r.data.question.id),close:()=>this.closeQuestion(r.data.question.id),autoHideDuration:5e3,id:this.background.getCurrentSessionId({prefix:"notification",entity:r.data.question.id}),data:{title:r.data.notification.title,color:r.data.notification.indicatorColor,icon:r.data.notification.image,imageMode:r.data.notification.imageMode,imagePosition:r.data.notification.imagePosition}})})}}class go extends es{constructor(t,s,a){super(t,s);S(this,"insights");S(this,"closeFeature");S(this,"openFeature");S(this,"openedInsight");S(this,"notifications");S(this,"transport");S(this,"background");S(this,"connect",()=>{this.insights?this.insights.invalidate():this.insights=new ze(Ak(this.background.slStreamId,this.transport),"gamification:insights"),this.background.feedSubscription.addListener("feed-subscription-insights-list",()=>{window.requestAnimationFrame(()=>{var t;(t=this.insights)==null||t.invalidate()})})});S(this,"disconnect",()=>{this.background.feedSubscription.removeListener("feed-subscription-insights-list")});S(this,"openHighlight",t=>(this.openFeature(),this.background.openQuestion(t)));S(this,"closeHighlight",t=>this.background.closeQuestion(t));this.background=po(a),this.notifications=a.notifications,this.transport=a.transport,this.closeFeature=a.sdk.closeFeature,this.openFeature=()=>a.sdk.openFeature(ve.HIGHLIGHTS),this.status.subscribe(r=>{r===He.Ready?this.connect():this.disconnect()}),this.background.activeQuestionId.listen(r=>{r&&r.data&&r.data.question.type===ge.FACTOID&&r.data.question.status===Ze.ACTIVE&&this.notifications.add({type:dn.QUESTION,action:()=>this.openHighlight(r.data.question.id),close:()=>this.closeHighlight(r.data.question.id),autoHideDuration:5e3,id:this.background.getCurrentSessionId({prefix:"notification",entity:r.data.question.id}),data:{title:r.data.notification.title,color:r.data.notification.indicatorColor,icon:r.data.notification.image,imageMode:r.data.notification.imageMode,imagePosition:r.data.notification.imagePosition}})}),this.openedInsight=ns(this.background.openedQuestion.getStore(),r=>{var i;if(((i=r.data)==null?void 0:i.type)===ge.FACTOID)return r.data})}}const Ok={[ve.GAMES]:!0,[ve.HIGHLIGHTS]:!0};class Lk extends es{constructor(e,t){super(e,t)}}const Rk=(n,e,t)=>n.type===ve.GAMES?new yo(n,e,t):n.type===ve.HIGHLIGHTS?new go(n,e,t):new Lk(n,e),xk=(n,e,t)=>{n.features=new Map,n.activeFeature=new Le(Re(),"activeFeature"),n.sdk.getFeatures=()=>n.features,n.sdk.getFeature=s=>n.features.get(s),n.sdk.getActiveFeature=()=>n.activeFeature.getStore(),n.sdk.openFeature=s=>{n.activeFeature.setValue(s)},n.sdk.closeFeature=()=>{n.activeFeature.setValue(void 0)},n.initFeature=(s,a=An.ORGANIZATION)=>{const r=Rk(s,a,n);n.features.set(s.type,r)},n.updateFeature=(s,a)=>{var r;(r=n.features.get(s.type))==null||r.update(s,a)},n.destroyFeature=s=>{n.features.delete(s.type)},n.reinitializeFeatures=async()=>{const s=await n.stores.organizationSettings.getValue();n.features.clear();for(const a of(s==null?void 0:s.overlays)||[])n.initFeature(a,An.ORGANIZATION)},n.stores.providerStreamId.listen(s=>{s||n.reinitializeFeatures()}),n.storeSubscribe=()=>{const s=(r,i)=>{if(i!=null&&i.overlays){r===An.STREAM&&n.features.clear();for(const l of i.overlays)l.sdkEnable===!0&&(n.features.has(l.type)?n.updateFeature(l,r):n.initFeature(l,r))}},a={organizationSettings:r=>{if(r.data)try{s(An.ORGANIZATION,r.data)}catch(i){console.log(i)}},streamSettings:r=>{if(r.data)try{s(An.STREAM,r.data)}catch(i){console.log(i)}}};n.store.subscribe(a)},t()},Ck="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=";const zk=I("div")({name:"Container",class:"c1nck5pb",propsAsIs:!1}),Uk=I("div")({name:"BackgroundBlock",class:"b1kix5tm",propsAsIs:!1}),Pk=I("img")({name:"Icon",class:"i1ey0b10",propsAsIs:!1}),Bk=I("div")({name:"ContentWrap",class:"cizx07o",propsAsIs:!1}),Qk=I("img")({name:"SponsorLogo",class:"s1pv3lf6",propsAsIs:!1}),Fk=I("span")({name:"SponsorText",class:"s18vymlp",propsAsIs:!1}),Gk=I("div")({name:"ContentTitle",class:"c17v2g7n",propsAsIs:!1}),Yk=I("div")({name:"ContentSubtitle",class:"c146qhfh",propsAsIs:!1}),Vk=I("button")({name:"ActionBtn",class:"aeuxca5",propsAsIs:!1}),$k=I("button")({name:"CloseBtn",class:"c10v7vcj",propsAsIs:!1}),qk=I("img")({name:"IconClose",class:"i2g9z26",propsAsIs:!1}),Wk=({close:n,action:e,data:{icon:t,header:s,title:a,subtitle:r,graphicBg:i,sponsorLogo:l}})=>f.jsxs(zk,{children:[f.jsx($k,{onClick:n,children:f.jsx(qk,{alt:"icon-close-onboarding-inapp",src:Ck})}),f.jsx(Uk,{style:{backgroundImage:`url(${i||""})`},children:t&&f.jsx(Pk,{alt:"onboarding-inapp-icon",src:t})}),f.jsxs(Bk,{children:[f.jsxs("div",{children:[f.jsx("div",{children:l?f.jsxs(f.Fragment,{children:[f.jsx(Qk,{alt:"sponsor-logo",src:l}),f.jsx(Fk,{children:"Presents"})]}):s||""}),f.jsx(Gk,{children:a||""}),f.jsx(Yk,{children:r||""})]}),f.jsx(Vk,{onClick:e,children:"Play"})]})]});const Hk=I("div")({name:"NotificationContainer",class:"n1bhrb8h",propsAsIs:!1}),Zk={[dn.ONBOARDING]:Wk,[dn.QUESTION]:ci},Kk=({index:n,total:e,...t})=>{const s=Q.useRef(null),a=Zk[t.type]||ci;return Q.useEffect(()=>{s.current!==null&&t.hiding&&s.current.animate([{right:"0"},{right:"-100%"}],{duration:300,fill:"forwards"})},[t.hiding]),f.jsx(Hk,{ref:s,style:{zIndex:n+1,transform:`translateY(${100*(e-n-1)}%)`},children:f.jsx(a,{...t})})};const Jk=I("div")({name:"NotificationsContainer",class:"ntlmi04",propsAsIs:!1}),Xk=({notificationsStore:n})=>{const e=Ne.useStore(n);return f.jsx(Jk,{children:e==null?void 0:e.map((t,s)=>f.jsx(Kk,{index:s,total:e.length,...t},t.id))})},eM=({store:n})=>{var t;const{data:e}=Ne.useStore(n);return e!=null&&e.summary?f.jsx(eg,{avatar:e.summary.avatar,name:e.summary.name,points:e.summary.points,grade:"0",friendsRank:e.summary.friendsRank,globalRank:e.summary.rank,winStreak:e.summary.streak,correct:e.summary.correct,incorrect:e.summary.incorrect,successRate:(t=e.percentage)==null?void 0:t.average}):f.jsx("div",{children:"wait user..."})},nM=({store:n,openQuestion:e})=>{const t=Ne.useStore(n);return t!=null&&t.data?f.jsx(jy,{openQuestion:e,questions:t.data}):f.jsx("div",{children:"wait questions..."})},tM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDUuMzgzNDggMy4zMDI4MiA2LjE1NjkyQzIuNjI0OTMgNi4wMTg0NyAyLjA1ODgzIDUuNzQ4NzIgMS42MDQ1IDUuMzQ3NjhDMS4xNTAxNyA0Ljk0NjYzIDAuOTIzMDA4IDQuNTU5OTIgMC45MjMwMDggNC4xODc1MlYzLjUwMDAySDIuNzY5MTZaTTExLjA3NjggMy41MDAwMlY0LjE4NzUyQzExLjA3NjggNC41NTk5MiAxMC44NDk3IDQuOTQ2NjMgMTAuMzk1MyA1LjM0NzY4QzkuOTQxIDUuNzQ4NzIgOS4zNzQ5IDYuMDE4NDcgOC42OTcwMSA2LjE1NjkyQzkuMDUyNzggNS4zODM0OCA5LjIzMDY2IDQuNDk3ODYgOS4yMzA2NiAzLjUwMDAySDExLjA3NjhaTTEyIDQuMTg3NVYzLjI3MDgzQzEyIDMuMDc5ODYgMTEuOTMyNyAyLjkxNzU0IDExLjc5ODEgMi43ODM4NUMxMS42NjM1IDIuNjUwMTcgMTEuNSAyLjU4MzMzIDExLjMwNzcgMi41ODMzM0g5LjIzMDc3VjEuODk1ODNDOS4yMzA3NyAxLjU4MDczIDkuMTE3NzkgMS4zMTA5OCA4Ljg5MTgzIDEuMDg2NTlDOC42NjU4NiAwLjg2MjE5NSA4LjM5NDIzIDAuNzUgOC4wNzY5MiAwLjc1SDMuOTIzMDhDMy42MDU3NyAwLjc1IDMuMzM0MTQgMC44NjIxOTUgMy4xMDgxNyAxLjA4NjU5QzIuODgyMjEgMS4zMTA5OCAyLjc2OTIzIDEuNTgwNzMgMi43NjkyMyAxLjg5NTgzVjIuNTgzMzNIMC42OTIzMDhDMC40OTk5OTkgMi41ODMzMyAwLjMzNjUzOSAyLjY1MDE3IDAuMjAxOTIzIDIuNzgzODVDMC4wNjczMDcgMi45MTc1NCAwIDMuMDc5ODYgMCAzLjI3MDgzVjQuMTg3NUMwIDQuNTI2NDggMC4wOTk3NTg2IDQuODY3ODQgMC4yOTkyNzkgNS4yMTE1OUMwLjQ5ODc5OSA1LjU1NTM0IDAuNzY4MDI3IDUuODY1NjcgMS4xMDY5NyA2LjE0MjU4QzEuNDQ1OTIgNi40MTk0OSAxLjg2MTc4IDYuNjUyMjMgMi4zNTQ1NyA2Ljg0MDgyQzIuODQ3MzYgNy4wMjk0MSAzLjM2NTM4IDcuMTM1NjMgMy45MDg2NSA3LjE1OTUxQzQuMTEwNTggNy40MTczMiA0LjMzODk0IDcuNjQ0MSA0LjU5Mzc1IDcuODM5ODRDNC43NzY0NCA4LjAwMjE3IDQuOTAyNjQgOC4xNzUyNCA0Ljk3MjM2IDguMzU5MDVDNS4wNDIwNyA4LjU0Mjg2IDUuMDc2OTIgOC43NTY1MSA1LjA3NjkyIDlDNS4wNzY5MiA5LjI1NzgxIDUuMDAzNjEgOS40NzUwNCA0Ljg1Njk3IDkuNjUxNjlDNC43MTAzNCA5LjgyODM0IDQuNDc1OTYgOS45MTY2NyA0LjE1Mzg1IDkuOTE2NjdDMy43OTMyNyA5LjkxNjY3IDMuNDcyMzYgMTAuMDI1MyAzLjE5MTExIDEwLjI0MjVDMi45MDk4NSAxMC40NTk3IDIuNzY5MjMgMTAuNzMzMSAyLjc2OTIzIDExLjA2MjVWMTEuNTIwOEMyLjc2OTIzIDExLjU4NzcgMi43OTA4NyAxMS42NDI2IDIuODM0MTMgMTEuNjg1NUMyLjg3NzQgMTEuNzI4NSAyLjkzMjY5IDExLjc1IDMgMTEuNzVIOUM5LjA2NzMxIDExLjc1IDkuMTIyNiAxMS43Mjg1IDkuMTY1ODYgMTEuNjg1NUM5LjIwOTEzIDExLjY0MjYgOS4yMzA3NyAxMS41ODc3IDkuMjMwNzcgMTEuNTIwOFYxMS4wNjI1QzkuMjMwNzcgMTAuNzMzMSA5LjA5MDE1IDEwLjQ1OTcgOC44MDg4OSAxMC4yNDI1QzguNTI3NjQgMTAuMDI1MyA4LjIwNjczIDkuOTE2NjcgNy44NDYxNSA5LjkxNjY3QzcuNTI0MDQgOS45MTY2NyA3LjI4OTY2IDkuODI4MzQgNy4xNDMwMyA5LjY1MTY5QzYuOTk2MzkgOS40NzUwNCA2LjkyMzA4IDkuMjU3ODEgNi45MjMwOCA5QzYuOTIzMDggOC43NTY1MSA2Ljk1NzkzIDguNTQyODYgNy4wMjc2NCA4LjM1OTA1QzcuMDk3MzYgOC4xNzUyNCA3LjIyMzU2IDguMDAyMTcgNy40MDYyNSA3LjgzOTg0QzcuNjYxMDYgNy42NDQxIDcuODg5NDIgNy40MTczMiA4LjA5MTM1IDcuMTU5NTFDOC42MzQ2MiA3LjEzNTYzIDkuMTUyNjQgNy4wMjk0MSA5LjY0NTQzIDYuODQwODJDMTAuMTM4MiA2LjY1MjIzIDEwLjU1NDEgNi40MTk0OSAxMC44OTMgNi4xNDI1OEMxMS4yMzIgNS44NjU2NyAxMS41MDEyIDUuNTU1MzQgMTEuNzAwNyA1LjIxMTU5QzExLjkwMDIgNC44Njc4NCAxMiA0LjUyNjQ4IDEyIDQuMTg3NVpNNS4wNzAzMyA1LjM4NDkxTDYuMDM4MyA0Ljg3NTAzTDcuMDA2MjcgNS4zODQ5MUw2LjgyMTQgNC4zMDQ5N0w3LjYwNDUxIDMuNTQwMTZMNi41MjIyOCAzLjM4MjZMNi4wMzgzIDIuNDAwMDNMNS41NTQzMSAzLjM4MjZMNC40NzIwOSAzLjU0MDE2TDUuMjU1MTkgNC4zMDQ5N0w1LjA3MDMzIDUuMzg0OTFaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogIDwvc3ZnPgo=",aM="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDIyIDIyIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik01LjUgMi43ODg2N1YxMi40MTM3QzUuNSAxMy4xNzI5IDQuODg0MjYgMTMuNzUgNC4xMjUgMTMuNzVIMS4zNzVDMC42MTU3NDIgMTMuNzUgMCAxMy4xMzQzIDAgMTIuNDEzN1YyLjgyNzM0QzAgMi4wNjgwOCAwLjYxNTc0MiAxLjQ5MTAyIDEuMzc1IDEuNDkxMDJINC4xMjVDNC44ODU1NSAxLjQxMzY3IDUuNSAxLjk5Mzc1IDUuNSAyLjc4ODY3Wk0yMiAxMi4zNzA3QzIyIDEzLjUwOTQgMjEuMDc3IDE0LjQzMjMgMTkuOTM3NSAxNC40MzIzSDEzLjY0MjZDMTQuNjIxIDE2LjA2MTMgMTUuMTI1OSAxNy45MDc3IDE1LjEyNTkgMTguNTU4MkMxNS4xMjUgMTkuNTcxNCAxNC4zMzAxIDIwLjYyNSAxMi45OTggMjAuNjI1QzEwLjI4NTQgMjAuNjI1IDExLjg2NTQgMTcuMzUyOSA4LjM0ODgzIDE0LjU0MDZMNy42NDg0NCAxMy45ODJDNy4xNDE0MSAxMy41NzM4IDYuODgzNTkgMTIuOTc2NiA2Ljg3OTMgMTIuMzc1QzYuODc4MjkgMTIuMzc0IDYuODc5MyAxMi4zNzUgNi44NzkzIDEyLjM3NUw2Ljg3NSA1LjVDNi44NzUgNC44NTExNyA3LjE4MDY0IDQuMjM5NzMgNy43IDMuODUwNDNMOS4xNjY5NSAyLjc1MDg2QzEwLjM1NTUgMS44NTYyNSAxMS44MDM1IDEuMzc1IDEzLjI5MDIgMS4zNzVIMTUuODEyNUMxNi45NTIgMS4zNzUgMTcuODc1IDIuMjk3NTQgMTcuODc1IDMuNDM2NjRDMTcuODc1IDMuNTkyODMgMTcuODU0NCAzLjc0MzU3IDE3LjgyMTUgMy44ODk5NkMxOC42NDg0IDQuMTU5MzcgMTkuMjUgNC45MjQyMiAxOS4yNSA1Ljg0Mzc1QzE5LjI1IDYuMjM2ODMgMTkuMTM0MSA2LjYwMDQzIDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=";const sM=I("div")({name:"Container",class:"c1ibttgl",propsAsIs:!1}),rM=I("img")({name:"Logo",class:"l16el447",propsAsIs:!1}),iM=I("div")({name:"RightBlock",class:"rb3jndy",propsAsIs:!1}),oM=I("button")({name:"ExitBtn",class:"e162i9w9",propsAsIs:!1}),cM=I("img")({name:"ExitIcon",class:"e1uh0tpp",propsAsIs:!1}),lM=I("div")({name:"Interactive",class:"i13726cq",propsAsIs:!1}),uM=()=>n=>n.isSuccess?"#f1be1c":"#da3732",Lr=I("div")({name:"ReactionIconWrap",class:"r1weckaj",propsAsIs:!1,vars:{"r1weckaj-0":[uM()]}}),Rr=I("img")({name:"ReactionIcon",class:"r1u8ekkw",propsAsIs:!1});const mM=I("div")({name:"Container",class:"c1kt0nvm",propsAsIs:!1}),dM=I("div")({name:"Title",class:"tavk3hk",propsAsIs:!1}),pM=I("div")({name:"PointContainer",class:"p1vdx5su",propsAsIs:!1}),yM=I("span")({name:"Point",class:"p68apx3",propsAsIs:!1}),gM=I("span")({name:"PointLabel",class:"p157xd4a",propsAsIs:!1}),ia=({points:n})=>f.jsxs(mM,{children:[f.jsx(dM,{children:"YOU WON"}),f.jsxs(pM,{children:[f.jsx(yM,{children:n}),f.jsx(gM,{children:"PTS"})]})]}),fM=({logo:n,points:e,questionAnswered:t,questionAnsweredCorrectly:s,questionType:a,closeQuestion:r,setTimeToExpire:i})=>{const l=!t&&a!==ge.PREDICTION,m=t&&a===ge.TRIVIA,d=m&&s,y=m&&!s,h=t&&a===ge.PREDICTION;return f.jsxs(sM,{children:[f.jsxs(iM,{children:[f.jsxs(lM,{children:[l&&f.jsx(mi,{setTimeToExpire:i}),d&&f.jsxs(f.Fragment,{children:[f.jsx(ia,{points:e}),f.jsx(Lr,{isSuccess:!0,children:f.jsx(Rr,{alt:"reaction-icon",src:tM})})]}),y&&f.jsxs(f.Fragment,{children:[f.jsx(ia,{points:0}),f.jsx(Lr,{isSuccess:!1,children:f.jsx(Rr,{alt:"reaction-icon",src:aM})})]}),h&&f.jsx(ia,{points:e})]}),f.jsx(oM,{onClick:r,children:f.jsx(cM,{alt:"exit-icon",src:Et})})]}),n&&f.jsx(rM,{src:n})]})},TM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAxMy44MzQ4TDY3Ljc2MzYgNy40NDE0Nkg2Mi4wNjA2TDU5LjM4OTcgMTAuNTYwMkw1Ni42MTU1IDcuNDQxNDZaTTYyLjI3MjEgNy45MTY1OUw1OS4zOTY0IDExLjI3NDdMNTYuNDA5MiA3LjkxNjU5SDUxLjc0NDZMNTYuOTMwNyAxMy44NjE1TDUxLjc0NDcgMTkuODA1NEg1Ni4yMjU3TDU5LjE1NzEgMTYuNDIxM0w2Mi4xMTU2IDE5LjgwNTRINjYuNzk4N0w2MS41NjYgMTMuODM1N0w2Ni43MjYxIDcuOTE2NTlINjIuMjcyMVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDQuMzYzNSA3LjQ0MTQ2VjQuNTY0MDZINTAuNzA2NlYwLjA1NTk5OThIMzkuNzAyVjIwLjI4MDVINTAuNzA2NlYxNS43NjAxSDQ0LjM2MzVWMTEuNzc5NEg1MC43MDY2VjcuNDQxNDZINDQuMzYzNVpNNTAuMjQwOCA3LjkxNjU5SDQzLjg5NzhWNC4wODg5M0g1MC4yNDA4VjAuNTMxMTMySDQwLjE2NzhWMTkuODA1NEg1MC4yNDA4VjE2LjIzNTJINDMuODk3OFYxMS4zMDQzSDUwLjI0MDhWNy45MTY1OVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0zNS4wNiAwLjA1NTk5OThWOC4zMzI4MUgzNS4wMDg3QzMzLjk4MDMgNy4xMjc4NyAzMi42OTY2IDYuNzA4ODEgMzEuMjA3IDYuNzA4ODFDMjguMTU1MiA2LjcwODgxIDI1Ljg1NjEgOC44MjYgMjUuMDQ5MyAxMS42MjM2QzI0LjEyOCA4LjU0MDkyIDIxLjc1NDQgNi42NTA4NCAxOC4yMzQ5IDYuNjUwODRDMTUuMzc2OSA2LjY1MDg0IDEzLjExOTcgNy45NTkzNiAxMS45NDIyIDEwLjA5MThWNy40NDE0Nkg2LjAzNDE2VjQuNTY0MDZIMTIuNDgxNVYwLjA1NTk5OThIMC43NjgwMDVWMjAuMjgwNUg2LjAzNDE2VjExLjc3OTRIMTEuMjgzNkMxMS4xMjcgMTIuNDAzNyAxMS4wNDMyIDEzLjA3MjcgMTEuMDQzMiAxMy43Nzg4QzExLjA0MzIgMTcuOTk3IDE0LjIwMzEgMjAuOTU4IDE4LjIzNDkgMjAuOTU4QzIxLjYyNTggMjAuOTU4IDIzLjg2MDcgMTkuMzM0IDI1LjA0MTkgMTYuMzc0SDIwLjUyODRDMTkuOTE4MyAxNy4yNjQ0IDE5LjQ1NTMgMTcuNTI3NiAxOC4yMzQ5IDE3LjUyNzZDMTYuODE5OSAxNy41Mjc2IDE1LjU5OTUgMTYuMjY4NSAxNS41OTk1IDE0Ljc3NTZIMjQuNzg5NEMyNS4xODgxIDE4LjEyNjIgMjcuNzQ3MiAyMS4wMTYgMzEuMjU4MiAyMS4wMTZDMzIuNzczIDIxLjAxNiAzNC4xNjAxIDIwLjI1NTggMzUuMDA3OCAxOC45NzI5SDM1LjA1OVYyMC4yODI0SDM5LjcwMUwzOS43MDIgMC4wNTU5OTk4SDM1LjA2Wk0xNS43NDY3IDExLjgzOTNDMTYuMDM5MiAxMC41NTQ1IDE3LjAxNjQgOS43MTU0NSAxOC4yMzU4IDkuNzE1NDVDMTkuNTc4MiA5LjcxNTQ1IDIwLjUwNTEgMTAuNTI4OSAyMC43NDkyIDExLjgzOTNDMjAuODUxNyAxMS44MzkzIDE1Ljc0NjcgMTEuODM5MyAxNS43NDY3IDExLjgzOTNaTTMyLjI0MiAxNy4yMDE2QzMwLjUzMDcgMTcuMjAxNiAyOS40NjY4IDE1LjU3NDggMjkuNDY2OCAxMy44NzY3QzI5LjQ2NjggMTIuMDYxNyAzMC4zOTE5IDEwLjMxNiAzMi4yNDIgMTAuMzE2QzM0LjE2MDEgMTAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const hM=I("div")({name:"QuestionContainer",class:"q15yq4tu",propsAsIs:!1}),kM=({openedQuestion:n,closeQuestion:e,vote:t})=>{var m;const[s,a]=Q.useState(!1),r=Q.useCallback(d=>{a(d)},[a]),i=Q.useMemo(()=>n==null?void 0:n.answers.find(d=>d.youVoted===!0),[n]),l=Q.useMemo(()=>!!(n!=null&&n.answers.find(d=>d.correct===!0)),[n]);return n?f.jsx(hM,{children:f.jsxs("div",{children:[f.jsx(fM,{points:(i==null?void 0:i.points)||0,questionAnswered:!!i,questionAnsweredCorrectly:i==null?void 0:i.correct,logo:TM,closeQuestion:e,setTimeToExpire:r,questionType:n.type}),f.jsx("div",{children:f.jsx(pg,{title:n.subject,feedbackMessages:(m=n.options)==null?void 0:m.options.value,questionType:n.type,questionId:n.id,questionAnswered:!!i,questionAnsweredCorrectly:i==null?void 0:i.correct,options:n.answers.map(d=>({id:d.id,title:d.text,icon:d.icon,type:n.type,correct:d.correct,percentage:d.percentage,answered:d.youVoted,disabled:!!i||n.marketClosed||s,questionAnswered:!!i,hasCorrectAnswer:l,points:d.points,onVote:t}))})})]})}):null};const MM=I("div")({name:"Container",class:"cqrci8d",propsAsIs:!1}),NM=I("div")({name:"Content",class:"c1hep1a5",propsAsIs:!1}),IM=I("div")({name:"Graphic",class:"g1s87azu",propsAsIs:!1}),SM=I("img")({name:"InsightIconDefault",class:"i19cupvp",propsAsIs:!1}),AM=I("img")({name:"InsightIconCircle",class:"i7kr6s3",propsAsIs:!1}),EM=I("img")({name:"InsightIconAbsolute",class:"ikea8mb",propsAsIs:!1}),bM=I("div")({name:"Title",class:"tn29zk0",propsAsIs:!1}),DM=I("img")({name:"NextIcon",class:"ni1hvml",propsAsIs:!1}),vM=(n,e)=>{switch(n){case nn.ROUNDED:return f.jsx(AM,{alt:"insight-icon",src:e});case nn.TRANSPARENT:return f.jsx(EM,{alt:"insight-icon",src:e});case nn.CENTERED:return f.jsx(SM,{alt:"insight-icon",src:e});default:return null}},_M=({title:n,image:e,questionId:t,imageMode:s,openInsight:a})=>f.jsxs(MM,{onClick:()=>a(t),children:[f.jsx(IM,{children:e&&vM(s,e)}),f.jsxs(NM,{children:[f.jsx(bM,{children:n||""}),f.jsx(DM,{alt:"next-icon",src:va})]})]});const wM=I("div")({name:"Container",class:"c1ii4cav",propsAsIs:!1}),jM=I("div")({name:"ItemsContainer",class:"irn7lif",propsAsIs:!1}),OM=({insights:n,openInsight:e})=>f.jsx(wM,{children:f.jsx(jM,{children:n==null?void 0:n.map(t=>f.jsx(_M,{openInsight:e,...t},t.questionId))})}),LM=({highlights:n,store:e})=>{const{data:t}=Ne.useStore(e);return t?f.jsx(OM,{insights:t,openInsight:n.openHighlight}):f.jsx("div",{children:"wait insights..."})},RM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=",xM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNNiAxMS45OTlDNiAxMi4xNzI1IDYuMDMxMzQgMTIuMzM0IDYuMDk0MDEgMTIuNDgzN0M2LjE1NjY5IDEyLjYzMzQgNi4yNTQyOCAxMi43NzU2IDYuMzg2OCAxMi45MTAzTDE0LjA0MzYgMjAuNjU2NUMxNC4yNjQ4IDIwLjg4NTUgMTQuNTMyMyAyMSAxNC44NDU5IDIxQzE1LjA2MDcgMjEgMTUuMjU0NCAyMC45NDc1IDE1LjQyNzEgMjAuODQyNkMxNS41OTk4IDIwLjczNzcgMTUuNzM4NCAyMC41OTY1IDE1Ljg0MzEgMjAuNDE5MUMxNS45NDc3IDIwLjI0MTYgMTYgMjAuMDQyNSAxNiAxOS44MjE3QzE2IDE5LjQ5ODkgMTUuODgxNiAxOS4yMTM0IDE1LjY0NDggMTguOTY1NEw4Ljc0MTgzIDExLjk5NzFMMTUuNjQ0OCA1LjAzMjcxQzE1Ljg4MTYgNC43ODcwOSAxNiA0LjUwMjMgMTYgNC4xNzgzNEMxNiAzLjk1NzQ5IDE1Ljk0NzcgMy43NTgzNSAxNS44NDMxIDMuNTgwOTFDMTUuNzM4NCAzLjQwMzQ3IDE1LjU5OTggMy4yNjIyOSAxNS40MjcxIDMuMTU3MzhDMTUuMjU0NCAzLjA1MjQ2IDE1LjA2MDcgMyAxNC44NDU5IDNDMTQuNTMyMyAzIDE0LjI2NDggMy4xMTE2OSAxNC4wNDM2IDMuMzM1MDhMNi4zODY4IDExLjA4NzhDNi4yNTU1MSAxMS4yMjI1IDYuMTU4NTMgMTEuMzY0NCA2LjA5NTg2IDExLjUxMzRDNi4wMzMxOCAxMS42NjI1IDYuMDAxMjMgMTEuODI0NCA2IDExLjk5OVoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const CM=I("div")({name:"Container",class:"c1n31p0r",propsAsIs:!1}),xr=I("button")({name:"Button",class:"bh1dfyy",propsAsIs:!1}),zM=I("img")({name:"HeaderIcon",class:"h1gjjnyi",propsAsIs:!1}),UM=({icon:n,comeBack:e,close:t})=>f.jsxs(CM,{children:[f.jsxs("div",{children:[e&&f.jsx(xr,{onClick:e,children:f.jsx("img",{alt:"header-back-icon",src:xM})}),n&&f.jsx(zM,{alt:"header-icon",src:n})]}),f.jsx("div",{children:t&&f.jsx(xr,{onClick:t,children:f.jsx("img",{alt:"header-close-icon",src:Et})})})]});const PM=I("div")({name:"Container",class:"c2g1lnc",propsAsIs:!1}),BM=I("img")({name:"Image",class:"i1czhbqi",propsAsIs:!1}),QM=I("div")({name:"AdditionalContent",class:"axpm0mb",propsAsIs:!1}),FM=I("div")({name:"Title",class:"t1kppby5",propsAsIs:!1}),GM=I("div")({name:"Description",class:"d18tbzq5",propsAsIs:!1}),YM=I("a")({name:"AdditionalBtn",class:"a6y6po9",propsAsIs:!1}),VM=I("img")({name:"LinkIcon",class:"lii8ybz",propsAsIs:!1}),$M=({image:n,title:e,description:t,webLinkLabel:s,webLink:a,closeHighlights:r,closeInsight:i})=>f.jsxs(PM,{children:[f.jsx(UM,{close:r,comeBack:i}),n&&f.jsx(BM,{alt:"detail-insight-image",src:n}),f.jsxs(QM,{children:[e&&f.jsx(FM,{children:e}),t&&f.jsx(GM,{children:t})]}),a&&s&&f.jsxs(YM,{href:a,target:"_blank",children:[s,f.jsx(VM,{alt:"link-icon",src:RM})]})]}),qM=({openedInsight:n,closeHighlights:e,closeInsight:t})=>{var i,l,m,d,y;const s=((i=n.options)==null?void 0:i.options.case)==="factoid"?{image:n.options.options.value.image,body:n.options.options.value.body,webLink:(l=n.options.options.value.webLink)==null?void 0:l.url,webLinkLabel:(m=n.options.options.value.webLink)==null?void 0:m.label}:{},a=n.subject||((d=n.notification)==null?void 0:d.title),r=s.body||((y=n.notification)==null?void 0:y.body);return f.jsx($M,{image:s.image,title:a,description:r,webLink:s.webLink,webLinkLabel:s.webLinkLabel,closeInsight:t,closeHighlights:e})};const mn=I("div")({name:"DemoContainer",class:"dp9wag8",propsAsIs:!1}),WM=I("div")({name:"UserStatisticsContainer",class:"u15x0q1l",propsAsIs:!1}),HM=I("div")({name:"QuestionsContainer",class:"q13pbrok",propsAsIs:!1}),ZM=I("div")({name:"Buttons",class:"baw537u",propsAsIs:!1}),Cr=I("button")({name:"Button",class:"bwry012",propsAsIs:!1}),KM=({gamification:n,sdk:e})=>{var y,h,T,M,E,_,L,j,R,x,z,U,B,C,H,ne,se,ie,ue,oe,Z,me,Ee;const t=Ne.useStore(n.status),s=Ne.useStore(n.onbordingComplete),a=Ne.useStore(n.openedQuestion),{slStreamId:r}=Ne.useStore(e.sdkStore),i=Ne.useStore(n.featureSettings);if(t!==He.Ready)return f.jsx("div",{children:"wait..."});if(r!=null&&r.loading)return f.jsx(mn,{children:f.jsx("div",{children:"Event is loading"})});if(!(r!=null&&r.data))return f.jsx(mn,{children:f.jsx("div",{children:"Event is forbidden"})});if(!s)return f.jsx(mn,{children:f.jsx(Em,{closeFeature:e.closeFeature,gamification:n,steps:(h=(y=i.inplayGame)==null?void 0:y.onboarding)==null?void 0:h.steps,gameIcon:(E=(M=(T=i.inplayGame)==null?void 0:T.overview)==null?void 0:M.media)==null?void 0:E.gameIcon,sponsorLogo:(j=(L=(_=i.inplayGame)==null?void 0:_.overview)==null?void 0:L.media)==null?void 0:j.sponsorLogo,rules:(x=(R=i.inplayGame)==null?void 0:R.rules)==null?void 0:x.rules,rulesBtnLabel:(U=(z=i.inplayGame)==null?void 0:z.rules)==null?void 0:U.buttonLabel,rulesTitle:(C=(B=i.inplayGame)==null?void 0:B.rules)==null?void 0:C.heading,primaryColor:(se=(ne=(H=i.inplayGame)==null?void 0:H.overview)==null?void 0:ne.appearance)==null?void 0:se.primaryColor,inviteCardTitle:(ue=(ie=i.inplayGame)==null?void 0:ie.inviteCard)==null?void 0:ue.heading,inviteCardSubtext:(Z=(oe=i.inplayGame)==null?void 0:oe.inviteCard)==null?void 0:Z.subtext,inviteCardBtnLabel:(Ee=(me=i.inplayGame)==null?void 0:me.inviteCard)==null?void 0:Ee.buttonLabel})});const l=xe=>{n.openQuestion(xe)},m=()=>{n.closeQuestion()},d=(xe,_e)=>{n.submitAnswer(xe,_e)};return f.jsxs(mn,{children:[f.jsx(WM,{children:n.userSummary&&f.jsx(eM,{store:n.userSummary.getStore()})}),f.jsxs(HM,{children:[n.questions&&f.jsx(nM,{openQuestion:l,store:n.questions.getStore()}),a&&f.jsx(kM,{closeQuestion:m,vote:d,openedQuestion:a})]})]})},JM=({highlights:n,sdk:e})=>{const t=Ne.useStore(n.status),s=Ne.useStore(n.openedInsight),{slStreamId:a}=Ne.useStore(e.sdkStore);return t!==He.Ready?f.jsx("div",{children:"wait..."}):a!=null&&a.loading?f.jsx(mn,{children:f.jsx("div",{children:"Event is loading"})}):a!=null&&a.data?n.insights===void 0?f.jsx("div",{children:"wait insights..."}):f.jsxs(mn,{children:[!s&&f.jsx(LM,{highlights:n,store:n.insights.getStore()}),s&&f.jsx(qM,{openedInsight:s,closeHighlights:n.closeFeature,closeInsight:n.closeHighlight})]}):f.jsx(mn,{children:f.jsx("div",{children:"Event is forbidden"})})},XM=({sdk:n})=>{const e=async t=>{try{await n.authorizationBypass("streamlayer:streamlayer",t)}catch(s){throw console.log("login err",s),s}};return f.jsx(qu,{login:e,anonymousLogin:n.anonymousAuthorization,host:n.host})},eN=({activeFeature:n,sdk:e})=>{const[t,s]=Q.useState(null),{organizationSettings:a,streamSettings:r}=Ne.useStore(e.sdkStore),i=Q.useMemo(()=>{const m=(r==null?void 0:r.data)||(a==null?void 0:a.data);return m!=null&&m.overlays?m.overlays:[]},[a,r]);Q.useEffect(()=>{const m=e.getFeatures();if(n)for(const[d,y]of m)d===n?y.status.get()===He.Suspended&&(y.enable(),s(y)):y.status.get()===He.Ready&&y.disable();else{for(const[,d]of m)d.status.get()===He.Ready&&d.disable();s(null)}return()=>{for(const[,d]of m)d.status.get()===He.Ready&&d.disable()}},[n,e]);const l=Q.useMemo(()=>t instanceof yo?t?f.jsx("div",{children:f.jsx(KM,{gamification:t,sdk:e})}):f.jsx("div",{children:"wait gamification..."}):t instanceof go?t?f.jsx("div",{children:f.jsx(JM,{highlights:t,sdk:e})}):f.jsx("div",{children:"wait highlights..."}):null,[e,t]);return f.jsxs("div",{children:[f.jsxs(ZM,{children:[f.jsx(Cr,{onClick:()=>e.logout(),children:"logout"}),i.map(m=>f.jsxs(Cr,{onClick:()=>e.openFeature(m.type),disabled:!(m.type in Ok),"data-enableSdkButton":m.enableSdkButton.toString(),"data-selected":m.type===n,children:[f.jsx("img",{src:m.icon,alt:""}),m.name]},m.name))]}),l]})},nN=({sdk:n})=>{const e=Ne.useStore(n.organizationStore()),t=Ne.useStore(n.getUserStore()),s=Ne.useStore(n.getActiveFeature());return e.loading?f.jsx("div",{children:"authentificating..."}):e.data?t.loading?f.jsx("div",{children:"authentificating..."}):t.data?f.jsxs(f.Fragment,{children:[f.jsx(Xk,{notificationsStore:n.getNotificationsStore()}),f.jsx(eN,{sdk:n,activeFeature:s})]}):f.jsx(XM,{sdk:n}):f.jsx("div",{children:"wrong sdk key..."})};const tN="t12mji3x",aN=({children:n})=>f.jsx("div",{className:tN,children:n});class sN extends yg{constructor(t,s){super();S(this,"$coreStore");S(this,"transport");S(this,"$bypassLogin");S(this,"me",async()=>{const t=await this.$coreStore.getValues().user.getValue();return t==null?void 0:t.data});S(this,"login",async(t,s)=>(this.$coreStore.getValues().userKey.setValue(s),await this.$bypassLogin.mutate({schema:t,userKey:s,init:!1}),this.me()));S(this,"isAuthenticated",()=>this.me());S(this,"logout",()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("")});S(this,"subscribe",()=>{this.$bypassLogin.subscribe((t,s)=>{var a,r,i,l;s==="data"&&(this.transport.setAuth((r=(a=t==null?void 0:t.data)==null?void 0:a.meta)==null?void 0:r.jwt),this.$coreStore.getValues().userToken.setValue((l=(i=t==null?void 0:t.data)==null?void 0:i.meta)==null?void 0:l.jwt))})});this.$coreStore=t,this.transport=s,this.$bypassLogin=Vh(this.transport),this.subscribe()}}const rN=async(n,e,t)=>{n.auth=new sN(n.store,n.transport);const s=localStorage.getItem("sl-user-schema"),a=localStorage.getItem("sl-user-token");s&&a&&(console.log("try to login prev user"),await n.auth.login(s,a)),n.sdk.authorizationBypass=async(r,i)=>{await n.auth.login(r,i),localStorage.setItem("sl-user-schema","streamlayer:streamlayer")},n.sdk.logout=()=>{n.auth.logout()},n.sdk.getUserStore=()=>n.stores.user.getStore(),n.sdk.isUserAuthorized=()=>n.auth.isAuthenticated(),t()},iN=(n,e,t)=>{n.sdk=Object.create(null),n.sdk.initializeApp=async()=>{n.storeSubscribe(),n.stores.enabled.setValue("on"),n.stores.status.setValue(En.INITIALIZATION);try{const s=await n.stores.organizationSettings.getValue();return s?(n.stores.status.setValue(En.READY),{enabled:!!s}):(n.stores.status.setValue(En.FAILED),{err:"failed"})}catch(s){return n.stores.enabled.setValue(),n.stores.status.setValue(En.FAILED),{err:`${s}`}}},n.sdk.disableApp=()=>{n.stores.enabled.setValue(),n.stores.status.setValue(En.DISABLED),n.storeUnsubscribe()},n.sdk.createEventSession=s=>{n.stores.providerStreamId.setValue(""),n.stores.providerStreamId.setValue(s)},t()};var ls={exports:{}},us={exports:{}};function oN(n){var e=new n,t=e;function s(){var r=e;return r.next?e=r.next:(e=new n,t=e),r.next=null,r}function a(r){t.next=r,t=r}return{get:s,release:a}}var cN=oN,lN=cN;function fo(n,e,t){if(typeof n=="function"&&(t=e,e=n,n=null),t<1)throw new Error("fastqueue concurrency must be greater than 1");var s=lN(uN),a=null,r=null,i=0,l=null,m={push:_,drain:Oe,saturated:Oe,pause:y,paused:!1,concurrency:t,running:d,resume:M,idle:E,length:h,getQueue:T,unshift:L,empty:Oe,kill:R,killAndDrain:x,error:z};return m;function d(){return i}function y(){m.paused=!0}function h(){for(var U=a,B=0;U;)U=U.next,B++;return B}function T(){for(var U=a,B=[];U;)B.push(U.value),U=U.next;return B}function M(){if(m.paused){m.paused=!1;for(var U=0;U<m.concurrency;U++)i++,j()}}function E(){return i===0&&m.length()===0}function _(U,B){var C=s.get();C.context=n,C.release=j,C.value=U,C.callback=B||Oe,C.errorHandler=l,i===m.concurrency||m.paused?r?(r.next=C,r=C):(a=C,r=C,m.saturated()):(i++,e.call(n,C.value,C.worked))}function L(U,B){var C=s.get();C.context=n,C.release=j,C.value=U,C.callback=B||Oe,i===m.concurrency||m.paused?a?(C.next=a,a=C):(a=C,r=C,m.saturated()):(i++,e.call(n,C.value,C.worked))}function j(U){U&&s.release(U);var B=a;B?m.paused?i--:(r===a&&(r=null),a=B.next,B.next=null,e.call(n,B.value,B.worked),r===null&&m.empty()):--i===0&&m.drain()}function R(){a=null,r=null,m.drain=Oe}function x(){a=null,r=null,m.drain(),m.drain=Oe}function z(U){l=U}}function Oe(){}function uN(){this.value=null,this.callback=Oe,this.next=null,this.release=Oe,this.context=null,this.errorHandler=null;var n=this;this.worked=function(t,s){var a=n.callback,r=n.errorHandler,i=n.value;n.value=null,n.callback=Oe,n.errorHandler&&r(t,i),a.call(n.context,t,s),n.release(n)}}function mN(n,e,t){typeof n=="function"&&(t=e,e=n,n=null);function s(y,h){e.call(this,y).then(function(T){h(null,T)},h)}var a=fo(n,s,t),r=a.push,i=a.unshift;return a.push=l,a.unshift=m,a.drained=d,a;function l(y){var h=new Promise(function(T,M){r(y,function(E,_){if(E){M(E);return}T(_)})});return h.catch(Oe),h}function m(y){var h=new Promise(function(T,M){i(y,function(E,_){if(E){M(E);return}T(_)})});return h.catch(Oe),h}function d(){if(a.idle())return new Promise(function(T){T()});var y=a.drain,h=new Promise(function(T){a.drain=function(){y(),T()}});return h}}us.exports=fo;us.exports.promise=mN;var To=us.exports,ms={exports:{}},wn=typeof Reflect=="object"?Reflect:null,zr=wn&&typeof wn.apply=="function"?wn.apply:function(e,t,s){return Function.prototype.apply.call(e,t,s)},mt;wn&&typeof wn.ownKeys=="function"?mt=wn.ownKeys:Object.getOwnPropertySymbols?mt=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:mt=function(e){return Object.getOwnPropertyNames(e)};function dN(n){console&&console.warn&&console.warn(n)}var ho=Number.isNaN||function(e){return e!==e};function te(){te.init.call(this)}ms.exports=te;ms.exports.once=fN;te.EventEmitter=te;te.prototype._events=void 0;te.prototype._eventsCount=0;te.prototype._maxListeners=void 0;var Ur=10;function Ut(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(te,"defaultMaxListeners",{enumerable:!0,get:function(){return Ur},set:function(n){if(typeof n!="number"||n<0||ho(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");Ur=n}});te.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};te.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||ho(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function ko(n){return n._maxListeners===void 0?te.defaultMaxListeners:n._maxListeners}te.prototype.getMaxListeners=function(){return ko(this)};te.prototype.emit=function(e){for(var t=[],s=1;s<arguments.length;s++)t.push(arguments[s]);var a=e==="error",r=this._events;if(r!==void 0)a=a&&r.error===void 0;else if(!a)return!1;if(a){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var m=r[e];if(m===void 0)return!1;if(typeof m=="function")zr(m,this,t);else for(var d=m.length,y=Ao(m,d),s=0;s<d;++s)zr(y[s],this,t);return!0};function Mo(n,e,t,s){var a,r,i;if(Ut(t),r=n._events,r===void 0?(r=n._events=Object.create(null),n._eventsCount=0):(r.newListener!==void 0&&(n.emit("newListener",e,t.listener?t.listener:t),r=n._events),i=r[e]),i===void 0)i=r[e]=t,++n._eventsCount;else if(typeof i=="function"?i=r[e]=s?[t,i]:[i,t]:s?i.unshift(t):i.push(t),a=ko(n),a>0&&i.length>a&&!i.warned){i.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=n,l.type=e,l.count=i.length,dN(l)}return n}te.prototype.addListener=function(e,t){return Mo(this,e,t,!1)};te.prototype.on=te.prototype.addListener;te.prototype.prependListener=function(e,t){return Mo(this,e,t,!0)};function pN(){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 No(n,e,t){var s={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},a=pN.bind(s);return a.listener=t,s.wrapFn=a,a}te.prototype.once=function(e,t){return Ut(t),this.on(e,No(this,e,t)),this};te.prototype.prependOnceListener=function(e,t){return Ut(t),this.prependListener(e,No(this,e,t)),this};te.prototype.removeListener=function(e,t){var s,a,r,i,l;if(Ut(t),a=this._events,a===void 0)return this;if(s=a[e],s===void 0)return this;if(s===t||s.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,s.listener||t));else if(typeof s!="function"){for(r=-1,i=s.length-1;i>=0;i--)if(s[i]===t||s[i].listener===t){l=s[i].listener,r=i;break}if(r<0)return this;r===0?s.shift():yN(s,r),s.length===1&&(a[e]=s[0]),a.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this};te.prototype.off=te.prototype.removeListener;te.prototype.removeAllListeners=function(e){var t,s,a;if(s=this._events,s===void 0)return this;if(s.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):s[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete s[e]),this;if(arguments.length===0){var r=Object.keys(s),i;for(a=0;a<r.length;++a)i=r[a],i!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=s[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(a=t.length-1;a>=0;a--)this.removeListener(e,t[a]);return this};function Io(n,e,t){var s=n._events;if(s===void 0)return[];var a=s[e];return a===void 0?[]:typeof a=="function"?t?[a.listener||a]:[a]:t?gN(a):Ao(a,a.length)}te.prototype.listeners=function(e){return Io(this,e,!0)};te.prototype.rawListeners=function(e){return Io(this,e,!1)};te.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):So.call(n,e)};te.prototype.listenerCount=So;function So(n){var e=this._events;if(e!==void 0){var t=e[n];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}te.prototype.eventNames=function(){return this._eventsCount>0?mt(this._events):[]};function Ao(n,e){for(var t=new Array(e),s=0;s<e;++s)t[s]=n[s];return t}function yN(n,e){for(;e+1<n.length;e++)n[e]=n[e+1];n.pop()}function gN(n){for(var e=new Array(n.length),t=0;t<e.length;++t)e[t]=n[t].listener||n[t];return e}function fN(n,e){return new Promise(function(t,s){function a(i){n.removeListener(e,r),s(i)}function r(){typeof n.removeListener=="function"&&n.removeListener("error",a),t([].slice.call(arguments))}Eo(n,e,r,{once:!0}),e!=="error"&&TN(n,a,{once:!0})})}function TN(n,e,t){typeof n.on=="function"&&Eo(n,"error",e,t)}function Eo(n,e,t,s){if(typeof n.on=="function")s.once?n.once(e,t):n.on(e,t);else if(typeof n.addEventListener=="function")n.addEventListener(e,function a(r){s.once&&n.removeEventListener(e,a),t(r)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var bo=ms.exports,Pt={},Do={},vo=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),s=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var a=42;e[t]=a;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 r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==a||i.enumerable!==!0)return!1}return!0},hN=vo,ds=function(){return hN()&&!!Symbol.toStringTag},Pr=typeof Symbol<"u"&&Symbol,kN=vo,MN=function(){return typeof Pr!="function"||typeof Symbol!="function"||typeof Pr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:kN()},Br={foo:{}},NN=Object,IN=function(){return{__proto__:Br}.foo===Br.foo&&!({__proto__:null}instanceof NN)},SN="Function.prototype.bind called on incompatible ",AN=Object.prototype.toString,EN=Math.max,bN="[object Function]",Qr=function(e,t){for(var s=[],a=0;a<e.length;a+=1)s[a]=e[a];for(var r=0;r<t.length;r+=1)s[r+e.length]=t[r];return s},DN=function(e,t){for(var s=[],a=t||0,r=0;a<e.length;a+=1,r+=1)s[r]=e[a];return s},vN=function(n,e){for(var t="",s=0;s<n.length;s+=1)t+=n[s],s+1<n.length&&(t+=e);return t},_N=function(e){var t=this;if(typeof t!="function"||AN.apply(t)!==bN)throw new TypeError(SN+t);for(var s=DN(arguments,1),a,r=function(){if(this instanceof a){var y=t.apply(this,Qr(s,arguments));return Object(y)===y?y:this}return t.apply(e,Qr(s,arguments))},i=EN(0,t.length-s.length),l=[],m=0;m<i;m++)l[m]="$"+m;if(a=Function("binder","return function ("+vN(l,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var d=function(){};d.prototype=t.prototype,a.prototype=new d,d.prototype=null}return a},wN=_N,_o=Function.prototype.bind||wN,Fr={}.hasOwnProperty,oa=Function.prototype.call,jN=oa.bind?oa.bind(Fr):function(n,e){return oa.call(Fr,n,e)},q,Ln=SyntaxError,wo=Function,jn=TypeError,ca=function(n){try{return wo('"use strict"; return ('+n+").constructor;")()}catch{}},pn=Object.getOwnPropertyDescriptor;if(pn)try{pn({},"")}catch{pn=null}var la=function(){throw new jn},ON=pn?function(){try{return arguments.callee,la}catch{try{return pn(arguments,"callee").get}catch{return la}}}():la,In=MN(),LN=IN(),fe=Object.getPrototypeOf||(LN?function(n){return n.__proto__}:null),bn={},RN=typeof Uint8Array>"u"||!fe?q:fe(Uint8Array),yn={"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":In&&fe?fe([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":bn,"%AsyncGenerator%":bn,"%AsyncGeneratorFunction%":bn,"%AsyncIteratorPrototype%":bn,"%Atomics%":typeof Atomics>"u"?q:Atomics,"%BigInt%":typeof BigInt>"u"?q:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?q:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?q:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?q:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?q:Float32Array,"%Float64Array%":typeof Float64Array>"u"?q:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?q:FinalizationRegistry,"%Function%":wo,"%GeneratorFunction%":bn,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":In&&fe?fe(fe([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!In||!fe?q:fe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?q:Promise,"%Proxy%":typeof Proxy>"u"?q:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?q:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?q:Set,"%SetIteratorPrototype%":typeof Set>"u"||!In||!fe?q:fe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":In&&fe?fe(""[Symbol.iterator]()):q,"%Symbol%":In?Symbol:q,"%SyntaxError%":Ln,"%ThrowTypeError%":ON,"%TypedArray%":RN,"%TypeError%":jn,"%Uint8Array%":typeof Uint8Array>"u"?q:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?q:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?q:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?q:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?q:WeakMap,"%WeakRef%":typeof WeakRef>"u"?q:WeakRef,"%WeakSet%":typeof WeakSet>"u"?q:WeakSet};if(fe)try{null.error}catch(n){var xN=fe(fe(n));yn["%Error.prototype%"]=xN}var CN=function n(e){var t;if(e==="%AsyncFunction%")t=ca("async function () {}");else if(e==="%GeneratorFunction%")t=ca("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=ca("async function* () {}");else if(e==="%AsyncGenerator%"){var s=n("%AsyncGeneratorFunction%");s&&(t=s.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=n("%AsyncGenerator%");a&&fe&&(t=fe(a.prototype))}return yn[e]=t,t},Gr={"%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"]},et=_o,kt=jN,zN=et.call(Function.call,Array.prototype.concat),UN=et.call(Function.apply,Array.prototype.splice),Yr=et.call(Function.call,String.prototype.replace),Mt=et.call(Function.call,String.prototype.slice),PN=et.call(Function.call,RegExp.prototype.exec),BN=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,QN=/\\(\\)?/g,FN=function(e){var t=Mt(e,0,1),s=Mt(e,-1);if(t==="%"&&s!=="%")throw new Ln("invalid intrinsic syntax, expected closing `%`");if(s==="%"&&t!=="%")throw new Ln("invalid intrinsic syntax, expected opening `%`");var a=[];return Yr(e,BN,function(r,i,l,m){a[a.length]=l?Yr(m,QN,"$1"):i||r}),a},GN=function(e,t){var s=e,a;if(kt(Gr,s)&&(a=Gr[s],s="%"+a[0]+"%"),kt(yn,s)){var r=yn[s];if(r===bn&&(r=CN(s)),typeof r>"u"&&!t)throw new jn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:s,value:r}}throw new Ln("intrinsic "+e+" does not exist!")},Cn=function(e,t){if(typeof e!="string"||e.length===0)throw new jn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new jn('"allowMissing" argument must be a boolean');if(PN(/^%?[^%]*%?$/,e)===null)throw new Ln("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=FN(e),a=s.length>0?s[0]:"",r=GN("%"+a+"%",t),i=r.name,l=r.value,m=!1,d=r.alias;d&&(a=d[0],UN(s,zN([0,1],d)));for(var y=1,h=!0;y<s.length;y+=1){var T=s[y],M=Mt(T,0,1),E=Mt(T,-1);if((M==='"'||M==="'"||M==="`"||E==='"'||E==="'"||E==="`")&&M!==E)throw new Ln("property names with quotes must have matching quotes");if((T==="constructor"||!h)&&(m=!0),a+="."+T,i="%"+a+"%",kt(yn,i))l=yn[i];else if(l!=null){if(!(T in l)){if(!t)throw new jn("base intrinsic for "+e+" exists, but the property is not available.");return}if(pn&&y+1>=s.length){var _=pn(l,T);h=!!_,h&&"get"in _&&!("originalValue"in _.get)?l=_.get:l=l[T]}else h=kt(l,T),l=l[T];h&&!m&&(yn[i]=l)}}return l},jo={exports:{}},YN=Cn,Oa=YN("%Object.defineProperty%",!0),La=function(){if(Oa)try{return Oa({},"a",{value:1}),!0}catch{return!1}return!1};La.hasArrayLengthDefineBug=function(){if(!La())return null;try{return Oa([],"length",{value:1}).length!==1}catch{return!0}};var Oo=La,VN=Cn,dt=VN("%Object.getOwnPropertyDescriptor%",!0);if(dt)try{dt([],"length")}catch{dt=null}var ps=dt,$N=Oo(),ys=Cn,qn=$N&&ys("%Object.defineProperty%",!0);if(qn)try{qn({},"a",{value:1})}catch{qn=!1}var qN=ys("%SyntaxError%"),Sn=ys("%TypeError%"),Vr=ps,WN=function(e,t,s){if(!e||typeof e!="object"&&typeof e!="function")throw new Sn("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Sn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Sn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Sn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Sn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Sn("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,m=!!Vr&&Vr(e,t);if(qn)qn(e,t,{configurable:i===null&&m?m.configurable:!i,enumerable:a===null&&m?m.enumerable:!a,value:s,writable:r===null&&m?m.writable:!r});else if(l||!a&&!r&&!i)e[t]=s;else throw new qN("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Lo=Cn,$r=WN,HN=Oo(),qr=ps,Wr=Lo("%TypeError%"),ZN=Lo("%Math.floor%"),KN=function(e,t){if(typeof e!="function")throw new Wr("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||ZN(t)!==t)throw new Wr("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],a=!0,r=!0;if("length"in e&&qr){var i=qr(e,"length");i&&!i.configurable&&(a=!1),i&&!i.writable&&(r=!1)}return(a||r||!s)&&(HN?$r(e,"length",t,!0,!0):$r(e,"length",t)),e};(function(n){var e=_o,t=Cn,s=KN,a=t("%TypeError%"),r=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(i,r),m=t("%Object.defineProperty%",!0),d=t("%Math.max%");if(m)try{m({},"a",{value:1})}catch{m=null}n.exports=function(T){if(typeof T!="function")throw new a("a function is required");var M=l(e,i,arguments);return s(M,1+d(0,T.length-(arguments.length-1)),!0)};var y=function(){return l(e,r,arguments)};m?m(n.exports,"apply",{value:y}):n.exports.apply=y})(jo);var Ro=jo.exports,xo=Cn,Co=Ro,JN=Co(xo("String.prototype.indexOf")),zo=function(e,t){var s=xo(e,!!t);return typeof s=="function"&&JN(e,".prototype.")>-1?Co(s):s},XN=ds(),eI=zo,Ra=eI("Object.prototype.toString"),Bt=function(e){return XN&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Ra(e)==="[object Arguments]"},Uo=function(e){return Bt(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ra(e)!=="[object Array]"&&Ra(e.callee)==="[object Function]"},nI=function(){return Bt(arguments)}();Bt.isLegacyArguments=Uo;var tI=nI?Bt:Uo,aI=Object.prototype.toString,sI=Function.prototype.toString,rI=/^\s*(?:function)?\*/,Po=ds(),ua=Object.getPrototypeOf,iI=function(){if(!Po)return!1;try{return Function("return function*() {}")()}catch{}},ma,oI=function(e){if(typeof e!="function")return!1;if(rI.test(sI.call(e)))return!0;if(!Po){var t=aI.call(e);return t==="[object GeneratorFunction]"}if(!ua)return!1;if(typeof ma>"u"){var s=iI();ma=s?ua(s):!1}return ua(e)===ma},Bo=Function.prototype.toString,vn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,xa,pt;if(typeof vn=="function"&&typeof Object.defineProperty=="function")try{xa=Object.defineProperty({},"length",{get:function(){throw pt}}),pt={},vn(function(){throw 42},null,xa)}catch(n){n!==pt&&(vn=null)}else vn=null;var cI=/^\s*class\b/,Ca=function(e){try{var t=Bo.call(e);return cI.test(t)}catch{return!1}},da=function(e){try{return Ca(e)?!1:(Bo.call(e),!0)}catch{return!1}},yt=Object.prototype.toString,lI="[object Object]",uI="[object Function]",mI="[object GeneratorFunction]",dI="[object HTMLAllCollection]",pI="[object HTML document.all class]",yI="[object HTMLCollection]",gI=typeof Symbol=="function"&&!!Symbol.toStringTag,fI=!(0 in[,]),za=function(){return!1};if(typeof document=="object"){var TI=document.all;yt.call(TI)===yt.call(document.all)&&(za=function(e){if((fI||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=yt.call(e);return(t===dI||t===pI||t===yI||t===lI)&&e("")==null}catch{}return!1})}var hI=vn?function(e){if(za(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{vn(e,null,xa)}catch(t){if(t!==pt)return!1}return!Ca(e)&&da(e)}:function(e){if(za(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(gI)return da(e);if(Ca(e))return!1;var t=yt.call(e);return t!==uI&&t!==mI&&!/^\[object HTML/.test(t)?!1:da(e)},kI=hI,MI=Object.prototype.toString,Qo=Object.prototype.hasOwnProperty,NI=function(e,t,s){for(var a=0,r=e.length;a<r;a++)Qo.call(e,a)&&(s==null?t(e[a],a,e):t.call(s,e[a],a,e))},II=function(e,t,s){for(var a=0,r=e.length;a<r;a++)s==null?t(e.charAt(a),a,e):t.call(s,e.charAt(a),a,e)},SI=function(e,t,s){for(var a in e)Qo.call(e,a)&&(s==null?t(e[a],a,e):t.call(s,e[a],a,e))},AI=function(e,t,s){if(!kI(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=s),MI.call(e)==="[object Array]"?NI(e,t,a):typeof e=="string"?II(e,t,a):SI(e,t,a)},EI=AI,pa=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],bI=typeof globalThis>"u"?si:globalThis,DI=function(){for(var e=[],t=0;t<pa.length;t++)typeof bI[pa[t]]=="function"&&(e[e.length]=pa[t]);return e},Nt=EI,vI=DI,Hr=Ro,gs=zo,gt=ps,_I=gs("Object.prototype.toString"),Fo=ds(),Zr=typeof globalThis>"u"?si:globalThis,Ua=vI(),fs=gs("String.prototype.slice"),ya=Object.getPrototypeOf,wI=gs("Array.prototype.indexOf",!0)||function(e,t){for(var s=0;s<e.length;s+=1)if(e[s]===t)return s;return-1},It={__proto__:null};Fo&&gt&&ya?Nt(Ua,function(n){var e=new Zr[n];if(Symbol.toStringTag in e){var t=ya(e),s=gt(t,Symbol.toStringTag);if(!s){var a=ya(t);s=gt(a,Symbol.toStringTag)}It["$"+n]=Hr(s.get)}}):Nt(Ua,function(n){var e=new Zr[n],t=e.slice||e.set;t&&(It["$"+n]=Hr(t))});var jI=function(e){var t=!1;return Nt(It,function(s,a){if(!t)try{"$"+s(e)===a&&(t=fs(a,1))}catch{}}),t},OI=function(e){var t=!1;return Nt(It,function(s,a){if(!t)try{s(e),t=fs(a,1)}catch{}}),t},Go=function(e){if(!e||typeof e!="object")return!1;if(!Fo){var t=fs(_I(e),8,-1);return wI(Ua,t)>-1?t:t!=="Object"?!1:OI(e)}return gt?jI(e):null},LI=Go,RI=function(e){return!!LI(e)};(function(n){var e=tI,t=oI,s=Go,a=RI;function r(w){return w.call.bind(w)}var i=typeof BigInt<"u",l=typeof Symbol<"u",m=r(Object.prototype.toString),d=r(Number.prototype.valueOf),y=r(String.prototype.valueOf),h=r(Boolean.prototype.valueOf);if(i)var T=r(BigInt.prototype.valueOf);if(l)var M=r(Symbol.prototype.valueOf);function E(w,tt){if(typeof w!="object")return!1;try{return tt(w),!0}catch{return!1}}n.isArgumentsObject=e,n.isGeneratorFunction=t,n.isTypedArray=a;function _(w){return typeof Promise<"u"&&w instanceof Promise||w!==null&&typeof w=="object"&&typeof w.then=="function"&&typeof w.catch=="function"}n.isPromise=_;function L(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(w):a(w)||D(w)}n.isArrayBufferView=L;function j(w){return s(w)==="Uint8Array"}n.isUint8Array=j;function R(w){return s(w)==="Uint8ClampedArray"}n.isUint8ClampedArray=R;function x(w){return s(w)==="Uint16Array"}n.isUint16Array=x;function z(w){return s(w)==="Uint32Array"}n.isUint32Array=z;function U(w){return s(w)==="Int8Array"}n.isInt8Array=U;function B(w){return s(w)==="Int16Array"}n.isInt16Array=B;function C(w){return s(w)==="Int32Array"}n.isInt32Array=C;function H(w){return s(w)==="Float32Array"}n.isFloat32Array=H;function ne(w){return s(w)==="Float64Array"}n.isFloat64Array=ne;function se(w){return s(w)==="BigInt64Array"}n.isBigInt64Array=se;function ie(w){return s(w)==="BigUint64Array"}n.isBigUint64Array=ie;function ue(w){return m(w)==="[object Map]"}ue.working=typeof Map<"u"&&ue(new Map);function oe(w){return typeof Map>"u"?!1:ue.working?ue(w):w instanceof Map}n.isMap=oe;function Z(w){return m(w)==="[object Set]"}Z.working=typeof Set<"u"&&Z(new Set);function me(w){return typeof Set>"u"?!1:Z.working?Z(w):w instanceof Set}n.isSet=me;function Ee(w){return m(w)==="[object WeakMap]"}Ee.working=typeof WeakMap<"u"&&Ee(new WeakMap);function xe(w){return typeof WeakMap>"u"?!1:Ee.working?Ee(w):w instanceof WeakMap}n.isWeakMap=xe;function _e(w){return m(w)==="[object WeakSet]"}_e.working=typeof WeakSet<"u"&&_e(new WeakSet);function Ie(w){return _e(w)}n.isWeakSet=Ie;function Se(w){return m(w)==="[object ArrayBuffer]"}Se.working=typeof ArrayBuffer<"u"&&Se(new ArrayBuffer);function K(w){return typeof ArrayBuffer>"u"?!1:Se.working?Se(w):w instanceof ArrayBuffer}n.isArrayBuffer=K;function N(w){return m(w)==="[object DataView]"}N.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&N(new DataView(new ArrayBuffer(1),0,1));function D(w){return typeof DataView>"u"?!1:N.working?N(w):w instanceof DataView}n.isDataView=D;var O=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function F(w){return m(w)==="[object SharedArrayBuffer]"}function W(w){return typeof O>"u"?!1:(typeof F.working>"u"&&(F.working=F(new O)),F.working?F(w):w instanceof O)}n.isSharedArrayBuffer=W;function J(w){return m(w)==="[object AsyncFunction]"}n.isAsyncFunction=J;function Y(w){return m(w)==="[object Map Iterator]"}n.isMapIterator=Y;function $(w){return m(w)==="[object Set Iterator]"}n.isSetIterator=$;function X(w){return m(w)==="[object Generator]"}n.isGeneratorObject=X;function Me(w){return m(w)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=Me;function Ue(w){return E(w,d)}n.isNumberObject=Ue;function Ce(w){return E(w,y)}n.isStringObject=Ce;function we(w){return E(w,h)}n.isBooleanObject=we;function hn(w){return i&&E(w,T)}n.isBigIntObject=hn;function nt(w){return l&&E(w,M)}n.isSymbolObject=nt;function Un(w){return Ue(w)||Ce(w)||we(w)||hn(w)||nt(w)}n.isBoxedPrimitive=Un;function Qt(w){return typeof Uint8Array<"u"&&(K(w)||W(w))}n.isAnyArrayBuffer=Qt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(w){Object.defineProperty(n,w,{enumerable:!1,value:function(){throw new Error(w+" is not supported in userland")}})})})(Do);var xI=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Pa={exports:{}};typeof Object.create=="function"?Pa.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Pa.exports=function(e,t){if(t){e.super_=t;var s=function(){};s.prototype=t.prototype,e.prototype=new s,e.prototype.constructor=e}};var CI=Pa.exports;(function(n){var e=Object.getOwnPropertyDescriptors||function(D){for(var O=Object.keys(D),F={},W=0;W<O.length;W++)F[O[W]]=Object.getOwnPropertyDescriptor(D,O[W]);return F},t=/%[sdj%]/g;n.format=function(N){if(!U(N)){for(var D=[],O=0;O<arguments.length;O++)D.push(i(arguments[O]));return D.join(" ")}for(var O=1,F=arguments,W=F.length,J=String(N).replace(t,function($){if($==="%%")return"%";if(O>=W)return $;switch($){case"%s":return String(F[O++]);case"%d":return Number(F[O++]);case"%j":try{return JSON.stringify(F[O++])}catch{return"[Circular]"}default:return $}}),Y=F[O];O<W;Y=F[++O])R(Y)||!ne(Y)?J+=" "+Y:J+=" "+i(Y);return J},n.deprecate=function(N,D){if(typeof G.process<"u"&&G.process.noDeprecation===!0)return N;if(typeof G.process>"u")return function(){return n.deprecate(N,D).apply(this,arguments)};var O=!1;function F(){if(!O){if(G.process.throwDeprecation)throw new Error(D);G.process.traceDeprecation?console.trace(D):console.error(D),O=!0}return N.apply(this,arguments)}return F};var s={},a=/^$/;if(G.process.env.NODE_DEBUG){var r=G.process.env.NODE_DEBUG;r=r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+r+"$","i")}n.debuglog=function(N){if(N=N.toUpperCase(),!s[N])if(a.test(N)){var D=G.process.pid;s[N]=function(){var O=n.format.apply(n,arguments);console.error("%s %d: %s",N,D,O)}}else s[N]=function(){};return s[N]};function i(N,D){var O={seen:[],stylize:m};return arguments.length>=3&&(O.depth=arguments[2]),arguments.length>=4&&(O.colors=arguments[3]),j(D)?O.showHidden=D:D&&n._extend(O,D),C(O.showHidden)&&(O.showHidden=!1),C(O.depth)&&(O.depth=2),C(O.colors)&&(O.colors=!1),C(O.customInspect)&&(O.customInspect=!0),O.colors&&(O.stylize=l),y(O,N,O.depth)}n.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(N,D){var O=i.styles[D];return O?"\x1B["+i.colors[O][0]+"m"+N+"\x1B["+i.colors[O][1]+"m":N}function m(N,D){return N}function d(N){var D={};return N.forEach(function(O,F){D[O]=!0}),D}function y(N,D,O){if(N.customInspect&&D&&ue(D.inspect)&&D.inspect!==n.inspect&&!(D.constructor&&D.constructor.prototype===D)){var F=D.inspect(O,N);return U(F)||(F=y(N,F,O)),F}var W=h(N,D);if(W)return W;var J=Object.keys(D),Y=d(J);if(N.showHidden&&(J=Object.getOwnPropertyNames(D)),ie(D)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return T(D);if(J.length===0){if(ue(D)){var $=D.name?": "+D.name:"";return N.stylize("[Function"+$+"]","special")}if(H(D))return N.stylize(RegExp.prototype.toString.call(D),"regexp");if(se(D))return N.stylize(Date.prototype.toString.call(D),"date");if(ie(D))return T(D)}var X="",Me=!1,Ue=["{","}"];if(L(D)&&(Me=!0,Ue=["[","]"]),ue(D)){var Ce=D.name?": "+D.name:"";X=" [Function"+Ce+"]"}if(H(D)&&(X=" "+RegExp.prototype.toString.call(D)),se(D)&&(X=" "+Date.prototype.toUTCString.call(D)),ie(D)&&(X=" "+T(D)),J.length===0&&(!Me||D.length==0))return Ue[0]+X+Ue[1];if(O<0)return H(D)?N.stylize(RegExp.prototype.toString.call(D),"regexp"):N.stylize("[Object]","special");N.seen.push(D);var we;return Me?we=M(N,D,O,Y,J):we=J.map(function(hn){return E(N,D,O,Y,hn,Me)}),N.seen.pop(),_(we,X,Ue)}function h(N,D){if(C(D))return N.stylize("undefined","undefined");if(U(D)){var O="'"+JSON.stringify(D).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return N.stylize(O,"string")}if(z(D))return N.stylize(""+D,"number");if(j(D))return N.stylize(""+D,"boolean");if(R(D))return N.stylize("null","null")}function T(N){return"["+Error.prototype.toString.call(N)+"]"}function M(N,D,O,F,W){for(var J=[],Y=0,$=D.length;Y<$;++Y)_e(D,String(Y))?J.push(E(N,D,O,F,String(Y),!0)):J.push("");return W.forEach(function(X){X.match(/^\d+$/)||J.push(E(N,D,O,F,X,!0))}),J}function E(N,D,O,F,W,J){var Y,$,X;if(X=Object.getOwnPropertyDescriptor(D,W)||{value:D[W]},X.get?X.set?$=N.stylize("[Getter/Setter]","special"):$=N.stylize("[Getter]","special"):X.set&&($=N.stylize("[Setter]","special")),_e(F,W)||(Y="["+W+"]"),$||(N.seen.indexOf(X.value)<0?(R(O)?$=y(N,X.value,null):$=y(N,X.value,O-1),$.indexOf(`
14
+ */(function(n){const e=bt,t=Ya,s=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=l,n.SlowBuffer=R,n.INSPECT_MAX_BYTES=50;const a=2147483647;n.kMaxLength=a,l.TYPED_ARRAY_SUPPORT=r(),!l.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function r(){try{const p=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(p,o),p.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function i(p){if(p>a)throw new RangeError('The value "'+p+'" is invalid for option "size"');const o=new Uint8Array(p);return Object.setPrototypeOf(o,l.prototype),o}function l(p,o,u){if(typeof p=="number"){if(typeof o=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(p)}return m(p,o,u)}l.poolSize=8192;function m(p,o,u){if(typeof p=="string")return T(p,o);if(ArrayBuffer.isView(p))return E(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(Pe(p,ArrayBuffer)||p&&Pe(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(p,SharedArrayBuffer)||p&&Pe(p.buffer,SharedArrayBuffer)))return D(p,o,u);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=p.valueOf&&p.valueOf();if(g!=null&&g!==p)return l.from(g,o,u);const k=L(p);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return l.from(p[Symbol.toPrimitive]("string"),o,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}l.from=function(p,o,u){return m(p,o,u)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function y(p,o,u){return d(p),p<=0?i(p):o!==void 0?typeof u=="string"?i(p).fill(o,u):i(p).fill(o):i(p)}l.alloc=function(p,o,u){return y(p,o,u)};function h(p){return d(p),i(p<0?0:j(p)|0)}l.allocUnsafe=function(p){return h(p)},l.allocUnsafeSlow=function(p){return h(p)};function T(p,o){if((typeof o!="string"||o==="")&&(o="utf8"),!l.isEncoding(o))throw new TypeError("Unknown encoding: "+o);const u=x(p,o)|0;let g=i(u);const k=g.write(p,o);return k!==u&&(g=g.slice(0,k)),g}function M(p){const o=p.length<0?0:j(p.length)|0,u=i(o);for(let g=0;g<o;g+=1)u[g]=p[g]&255;return u}function E(p){if(Pe(p,Uint8Array)){const o=new Uint8Array(p);return D(o.buffer,o.byteOffset,o.byteLength)}return M(p)}function D(p,o,u){if(o<0||p.byteLength<o)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<o+(u||0))throw new RangeError('"length" is outside of buffer bounds');let g;return o===void 0&&u===void 0?g=new Uint8Array(p):u===void 0?g=new Uint8Array(p,o):g=new Uint8Array(p,o,u),Object.setPrototypeOf(g,l.prototype),g}function L(p){if(l.isBuffer(p)){const o=j(p.length)|0,u=i(o);return u.length===0||p.copy(u,0,0,o),u}if(p.length!==void 0)return typeof p.length!="number"||Ft(p.length)?i(0):M(p);if(p.type==="Buffer"&&Array.isArray(p.data))return M(p.data)}function j(p){if(p>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return p|0}function R(p){return+p!=p&&(p=0),l.alloc(+p)}l.isBuffer=function(o){return o!=null&&o._isBuffer===!0&&o!==l.prototype},l.compare=function(o,u){if(Pe(o,Uint8Array)&&(o=l.from(o,o.offset,o.byteLength)),Pe(u,Uint8Array)&&(u=l.from(u,u.offset,u.byteLength)),!l.isBuffer(o)||!l.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(o===u)return 0;let g=o.length,k=u.length;for(let A=0,b=Math.min(g,k);A<b;++A)if(o[A]!==u[A]){g=o[A],k=u[A];break}return g<k?-1:k<g?1:0},l.isEncoding=function(o){switch(String(o).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(o,u){if(!Array.isArray(o))throw new TypeError('"list" argument must be an Array of Buffers');if(o.length===0)return l.alloc(0);let g;if(u===void 0)for(u=0,g=0;g<o.length;++g)u+=o[g].length;const k=l.allocUnsafe(u);let A=0;for(g=0;g<o.length;++g){let b=o[g];if(Pe(b,Uint8Array))A+b.length>k.length?(l.isBuffer(b)||(b=l.from(b)),b.copy(k,A)):Uint8Array.prototype.set.call(k,b,A);else if(l.isBuffer(b))b.copy(k,A);else throw new TypeError('"list" argument must be an Array of Buffers');A+=b.length}return k};function x(p,o){if(l.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Pe(p,ArrayBuffer))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const u=p.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&u===0)return 0;let k=!1;for(;;)switch(o){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return Un(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return tt(p).length;default:if(k)return g?-1:Un(p).length;o=(""+o).toLowerCase(),k=!0}}l.byteLength=x;function z(p,o,u){let g=!1;if((o===void 0||o<0)&&(o=0),o>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,o>>>=0,u<=o))return"";for(p||(p="utf8");;)switch(p){case"hex":return Ie(this,o,u);case"utf8":case"utf-8":return Z(this,o,u);case"ascii":return xe(this,o,u);case"latin1":case"binary":return we(this,o,u);case"base64":return oe(this,o,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,o,u);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}l.prototype._isBuffer=!0;function U(p,o,u){const g=p[o];p[o]=p[u],p[u]=g}l.prototype.swap16=function(){const o=this.length;if(o%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let u=0;u<o;u+=2)U(this,u,u+1);return this},l.prototype.swap32=function(){const o=this.length;if(o%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let u=0;u<o;u+=4)U(this,u,u+3),U(this,u+1,u+2);return this},l.prototype.swap64=function(){const o=this.length;if(o%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let u=0;u<o;u+=8)U(this,u,u+7),U(this,u+1,u+6),U(this,u+2,u+5),U(this,u+3,u+4);return this},l.prototype.toString=function(){const o=this.length;return o===0?"":arguments.length===0?Z(this,0,o):z.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(o){if(!l.isBuffer(o))throw new TypeError("Argument must be a Buffer");return this===o?!0:l.compare(this,o)===0},l.prototype.inspect=function(){let o="";const u=n.INSPECT_MAX_BYTES;return o=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(o+=" ... "),"<Buffer "+o+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(o,u,g,k,A){if(Pe(o,Uint8Array)&&(o=l.from(o,o.offset,o.byteLength)),!l.isBuffer(o))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof o);if(u===void 0&&(u=0),g===void 0&&(g=o?o.length:0),k===void 0&&(k=0),A===void 0&&(A=this.length),u<0||g>o.length||k<0||A>this.length)throw new RangeError("out of range index");if(k>=A&&u>=g)return 0;if(k>=A)return-1;if(u>=g)return 1;if(u>>>=0,g>>>=0,k>>>=0,A>>>=0,this===o)return 0;let b=A-k,V=g-u;const ce=Math.min(b,V),re=this.slice(k,A),le=o.slice(u,g);for(let ae=0;ae<ce;++ae)if(re[ae]!==le[ae]){b=re[ae],V=le[ae];break}return b<V?-1:V<b?1:0};function B(p,o,u,g,k){if(p.length===0)return-1;if(typeof u=="string"?(g=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Ft(u)&&(u=k?0:p.length-1),u<0&&(u=p.length+u),u>=p.length){if(k)return-1;u=p.length-1}else if(u<0)if(k)u=0;else return-1;if(typeof o=="string"&&(o=l.from(o,g)),l.isBuffer(o))return o.length===0?-1:C(p,o,u,g,k);if(typeof o=="number")return o=o&255,typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(p,o,u):Uint8Array.prototype.lastIndexOf.call(p,o,u):C(p,[o],u,g,k);throw new TypeError("val must be string, number or Buffer")}function C(p,o,u,g,k){let A=1,b=p.length,V=o.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||o.length<2)return-1;A=2,b/=2,V/=2,u/=2}function ce(le,ae){return A===1?le[ae]:le.readUInt16BE(ae*A)}let re;if(k){let le=-1;for(re=u;re<b;re++)if(ce(p,re)===ce(o,le===-1?0:re-le)){if(le===-1&&(le=re),re-le+1===V)return le*A}else le!==-1&&(re-=re-le),le=-1}else for(u+V>b&&(u=b-V),re=u;re>=0;re--){let le=!0;for(let ae=0;ae<V;ae++)if(ce(p,re+ae)!==ce(o,ae)){le=!1;break}if(le)return re}return-1}l.prototype.includes=function(o,u,g){return this.indexOf(o,u,g)!==-1},l.prototype.indexOf=function(o,u,g){return B(this,o,u,g,!0)},l.prototype.lastIndexOf=function(o,u,g){return B(this,o,u,g,!1)};function H(p,o,u,g){u=Number(u)||0;const k=p.length-u;g?(g=Number(g),g>k&&(g=k)):g=k;const A=o.length;g>A/2&&(g=A/2);let b;for(b=0;b<g;++b){const V=parseInt(o.substr(b*2,2),16);if(Ft(V))return b;p[u+b]=V}return b}function ne(p,o,u,g){return Pn(Un(o,p.length-u),p,u,g)}function se(p,o,u,g){return Pn(Qt(o),p,u,g)}function ie(p,o,u,g){return Pn(tt(o),p,u,g)}function ue(p,o,u,g){return Pn(_(o,p.length-u),p,u,g)}l.prototype.write=function(o,u,g,k){if(u===void 0)k="utf8",g=this.length,u=0;else if(g===void 0&&typeof u=="string")k=u,g=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(g)?(g=g>>>0,k===void 0&&(k="utf8")):(k=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const A=this.length-u;if((g===void 0||g>A)&&(g=A),o.length>0&&(g<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");k||(k="utf8");let b=!1;for(;;)switch(k){case"hex":return H(this,o,u,g);case"utf8":case"utf-8":return ne(this,o,u,g);case"ascii":case"latin1":case"binary":return se(this,o,u,g);case"base64":return ie(this,o,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,o,u,g);default:if(b)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),b=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(p,o,u){return o===0&&u===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(o,u))}function Z(p,o,u){u=Math.min(p.length,u);const g=[];let k=o;for(;k<u;){const A=p[k];let b=null,V=A>239?4:A>223?3:A>191?2:1;if(k+V<=u){let ce,re,le,ae;switch(V){case 1:A<128&&(b=A);break;case 2:ce=p[k+1],(ce&192)===128&&(ae=(A&31)<<6|ce&63,ae>127&&(b=ae));break;case 3:ce=p[k+1],re=p[k+2],(ce&192)===128&&(re&192)===128&&(ae=(A&15)<<12|(ce&63)<<6|re&63,ae>2047&&(ae<55296||ae>57343)&&(b=ae));break;case 4:ce=p[k+1],re=p[k+2],le=p[k+3],(ce&192)===128&&(re&192)===128&&(le&192)===128&&(ae=(A&15)<<18|(ce&63)<<12|(re&63)<<6|le&63,ae>65535&&ae<1114112&&(b=ae))}}b===null?(b=65533,V=1):b>65535&&(b-=65536,g.push(b>>>10&1023|55296),b=56320|b&1023),g.push(b),k+=V}return Ee(g)}const me=4096;function Ee(p){const o=p.length;if(o<=me)return String.fromCharCode.apply(String,p);let u="",g=0;for(;g<o;)u+=String.fromCharCode.apply(String,p.slice(g,g+=me));return u}function xe(p,o,u){let g="";u=Math.min(p.length,u);for(let k=o;k<u;++k)g+=String.fromCharCode(p[k]&127);return g}function we(p,o,u){let g="";u=Math.min(p.length,u);for(let k=o;k<u;++k)g+=String.fromCharCode(p[k]);return g}function Ie(p,o,u){const g=p.length;(!o||o<0)&&(o=0),(!u||u<0||u>g)&&(u=g);let k="";for(let A=o;A<u;++A)k+=Ko[p[A]];return k}function Se(p,o,u){const g=p.slice(o,u);let k="";for(let A=0;A<g.length-1;A+=2)k+=String.fromCharCode(g[A]+g[A+1]*256);return k}l.prototype.slice=function(o,u){const g=this.length;o=~~o,u=u===void 0?g:~~u,o<0?(o+=g,o<0&&(o=0)):o>g&&(o=g),u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),u<o&&(u=o);const k=this.subarray(o,u);return Object.setPrototypeOf(k,l.prototype),k};function K(p,o,u){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+o>u)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(o,u,g){o=o>>>0,u=u>>>0,g||K(o,u,this.length);let k=this[o],A=1,b=0;for(;++b<u&&(A*=256);)k+=this[o+b]*A;return k},l.prototype.readUintBE=l.prototype.readUIntBE=function(o,u,g){o=o>>>0,u=u>>>0,g||K(o,u,this.length);let k=this[o+--u],A=1;for(;u>0&&(A*=256);)k+=this[o+--u]*A;return k},l.prototype.readUint8=l.prototype.readUInt8=function(o,u){return o=o>>>0,u||K(o,1,this.length),this[o]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(o,u){return o=o>>>0,u||K(o,2,this.length),this[o]|this[o+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(o,u){return o=o>>>0,u||K(o,2,this.length),this[o]<<8|this[o+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(o,u){return o=o>>>0,u||K(o,4,this.length),(this[o]|this[o+1]<<8|this[o+2]<<16)+this[o+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]*16777216+(this[o+1]<<16|this[o+2]<<8|this[o+3])},l.prototype.readBigUInt64LE=Xe(function(o){o=o>>>0,Ce(o,"offset");const u=this[o],g=this[o+7];(u===void 0||g===void 0)&&_e(o,this.length-8);const k=u+this[++o]*2**8+this[++o]*2**16+this[++o]*2**24,A=this[++o]+this[++o]*2**8+this[++o]*2**16+g*2**24;return BigInt(k)+(BigInt(A)<<BigInt(32))}),l.prototype.readBigUInt64BE=Xe(function(o){o=o>>>0,Ce(o,"offset");const u=this[o],g=this[o+7];(u===void 0||g===void 0)&&_e(o,this.length-8);const k=u*2**24+this[++o]*2**16+this[++o]*2**8+this[++o],A=this[++o]*2**24+this[++o]*2**16+this[++o]*2**8+g;return(BigInt(k)<<BigInt(32))+BigInt(A)}),l.prototype.readIntLE=function(o,u,g){o=o>>>0,u=u>>>0,g||K(o,u,this.length);let k=this[o],A=1,b=0;for(;++b<u&&(A*=256);)k+=this[o+b]*A;return A*=128,k>=A&&(k-=Math.pow(2,8*u)),k},l.prototype.readIntBE=function(o,u,g){o=o>>>0,u=u>>>0,g||K(o,u,this.length);let k=u,A=1,b=this[o+--k];for(;k>0&&(A*=256);)b+=this[o+--k]*A;return A*=128,b>=A&&(b-=Math.pow(2,8*u)),b},l.prototype.readInt8=function(o,u){return o=o>>>0,u||K(o,1,this.length),this[o]&128?(255-this[o]+1)*-1:this[o]},l.prototype.readInt16LE=function(o,u){o=o>>>0,u||K(o,2,this.length);const g=this[o]|this[o+1]<<8;return g&32768?g|4294901760:g},l.prototype.readInt16BE=function(o,u){o=o>>>0,u||K(o,2,this.length);const g=this[o+1]|this[o]<<8;return g&32768?g|4294901760:g},l.prototype.readInt32LE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]|this[o+1]<<8|this[o+2]<<16|this[o+3]<<24},l.prototype.readInt32BE=function(o,u){return o=o>>>0,u||K(o,4,this.length),this[o]<<24|this[o+1]<<16|this[o+2]<<8|this[o+3]},l.prototype.readBigInt64LE=Xe(function(o){o=o>>>0,Ce(o,"offset");const u=this[o],g=this[o+7];(u===void 0||g===void 0)&&_e(o,this.length-8);const k=this[o+4]+this[o+5]*2**8+this[o+6]*2**16+(g<<24);return(BigInt(k)<<BigInt(32))+BigInt(u+this[++o]*2**8+this[++o]*2**16+this[++o]*2**24)}),l.prototype.readBigInt64BE=Xe(function(o){o=o>>>0,Ce(o,"offset");const u=this[o],g=this[o+7];(u===void 0||g===void 0)&&_e(o,this.length-8);const k=(u<<24)+this[++o]*2**16+this[++o]*2**8+this[++o];return(BigInt(k)<<BigInt(32))+BigInt(this[++o]*2**24+this[++o]*2**16+this[++o]*2**8+g)}),l.prototype.readFloatLE=function(o,u){return o=o>>>0,u||K(o,4,this.length),t.read(this,o,!0,23,4)},l.prototype.readFloatBE=function(o,u){return o=o>>>0,u||K(o,4,this.length),t.read(this,o,!1,23,4)},l.prototype.readDoubleLE=function(o,u){return o=o>>>0,u||K(o,8,this.length),t.read(this,o,!0,52,8)},l.prototype.readDoubleBE=function(o,u){return o=o>>>0,u||K(o,8,this.length),t.read(this,o,!1,52,8)};function I(p,o,u,g,k,A){if(!l.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(o>k||o<A)throw new RangeError('"value" argument is out of bounds');if(u+g>p.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(o,u,g,k){if(o=+o,u=u>>>0,g=g>>>0,!k){const V=Math.pow(2,8*g)-1;I(this,o,u,g,V,0)}let A=1,b=0;for(this[u]=o&255;++b<g&&(A*=256);)this[u+b]=o/A&255;return u+g},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(o,u,g,k){if(o=+o,u=u>>>0,g=g>>>0,!k){const V=Math.pow(2,8*g)-1;I(this,o,u,g,V,0)}let A=g-1,b=1;for(this[u+A]=o&255;--A>=0&&(b*=256);)this[u+A]=o/b&255;return u+g},l.prototype.writeUint8=l.prototype.writeUInt8=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,1,255,0),this[u]=o&255,u+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,2,65535,0),this[u]=o&255,this[u+1]=o>>>8,u+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,2,65535,0),this[u]=o>>>8,this[u+1]=o&255,u+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,4,4294967295,0),this[u+3]=o>>>24,this[u+2]=o>>>16,this[u+1]=o>>>8,this[u]=o&255,u+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,4,4294967295,0),this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255,u+4};function v(p,o,u,g,k){Ue(o,g,k,p,u,7);let A=Number(o&BigInt(4294967295));p[u++]=A,A=A>>8,p[u++]=A,A=A>>8,p[u++]=A,A=A>>8,p[u++]=A;let b=Number(o>>BigInt(32)&BigInt(4294967295));return p[u++]=b,b=b>>8,p[u++]=b,b=b>>8,p[u++]=b,b=b>>8,p[u++]=b,u}function O(p,o,u,g,k){Ue(o,g,k,p,u,7);let A=Number(o&BigInt(4294967295));p[u+7]=A,A=A>>8,p[u+6]=A,A=A>>8,p[u+5]=A,A=A>>8,p[u+4]=A;let b=Number(o>>BigInt(32)&BigInt(4294967295));return p[u+3]=b,b=b>>8,p[u+2]=b,b=b>>8,p[u+1]=b,b=b>>8,p[u]=b,u+8}l.prototype.writeBigUInt64LE=Xe(function(o,u=0){return v(this,o,u,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Xe(function(o,u=0){return O(this,o,u,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(o,u,g,k){if(o=+o,u=u>>>0,!k){const ce=Math.pow(2,8*g-1);I(this,o,u,g,ce-1,-ce)}let A=0,b=1,V=0;for(this[u]=o&255;++A<g&&(b*=256);)o<0&&V===0&&this[u+A-1]!==0&&(V=1),this[u+A]=(o/b>>0)-V&255;return u+g},l.prototype.writeIntBE=function(o,u,g,k){if(o=+o,u=u>>>0,!k){const ce=Math.pow(2,8*g-1);I(this,o,u,g,ce-1,-ce)}let A=g-1,b=1,V=0;for(this[u+A]=o&255;--A>=0&&(b*=256);)o<0&&V===0&&this[u+A+1]!==0&&(V=1),this[u+A]=(o/b>>0)-V&255;return u+g},l.prototype.writeInt8=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,1,127,-128),o<0&&(o=255+o+1),this[u]=o&255,u+1},l.prototype.writeInt16LE=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,2,32767,-32768),this[u]=o&255,this[u+1]=o>>>8,u+2},l.prototype.writeInt16BE=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,2,32767,-32768),this[u]=o>>>8,this[u+1]=o&255,u+2},l.prototype.writeInt32LE=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,4,2147483647,-2147483648),this[u]=o&255,this[u+1]=o>>>8,this[u+2]=o>>>16,this[u+3]=o>>>24,u+4},l.prototype.writeInt32BE=function(o,u,g){return o=+o,u=u>>>0,g||I(this,o,u,4,2147483647,-2147483648),o<0&&(o=4294967295+o+1),this[u]=o>>>24,this[u+1]=o>>>16,this[u+2]=o>>>8,this[u+3]=o&255,u+4},l.prototype.writeBigInt64LE=Xe(function(o,u=0){return v(this,o,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Xe(function(o,u=0){return O(this,o,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function F(p,o,u,g,k,A){if(u+g>p.length)throw new RangeError("Index out of range");if(u<0)throw new RangeError("Index out of range")}function W(p,o,u,g,k){return o=+o,u=u>>>0,k||F(p,o,u,4),t.write(p,o,u,g,23,4),u+4}l.prototype.writeFloatLE=function(o,u,g){return W(this,o,u,!0,g)},l.prototype.writeFloatBE=function(o,u,g){return W(this,o,u,!1,g)};function J(p,o,u,g,k){return o=+o,u=u>>>0,k||F(p,o,u,8),t.write(p,o,u,g,52,8),u+8}l.prototype.writeDoubleLE=function(o,u,g){return J(this,o,u,!0,g)},l.prototype.writeDoubleBE=function(o,u,g){return J(this,o,u,!1,g)},l.prototype.copy=function(o,u,g,k){if(!l.isBuffer(o))throw new TypeError("argument should be a Buffer");if(g||(g=0),!k&&k!==0&&(k=this.length),u>=o.length&&(u=o.length),u||(u=0),k>0&&k<g&&(k=g),k===g||o.length===0||this.length===0)return 0;if(u<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(k<0)throw new RangeError("sourceEnd out of bounds");k>this.length&&(k=this.length),o.length-u<k-g&&(k=o.length-u+g);const A=k-g;return this===o&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,g,k):Uint8Array.prototype.set.call(o,this.subarray(g,k),u),A},l.prototype.fill=function(o,u,g,k){if(typeof o=="string"){if(typeof u=="string"?(k=u,u=0,g=this.length):typeof g=="string"&&(k=g,g=this.length),k!==void 0&&typeof k!="string")throw new TypeError("encoding must be a string");if(typeof k=="string"&&!l.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(o.length===1){const b=o.charCodeAt(0);(k==="utf8"&&b<128||k==="latin1")&&(o=b)}}else typeof o=="number"?o=o&255:typeof o=="boolean"&&(o=Number(o));if(u<0||this.length<u||this.length<g)throw new RangeError("Out of range index");if(g<=u)return this;u=u>>>0,g=g===void 0?this.length:g>>>0,o||(o=0);let A;if(typeof o=="number")for(A=u;A<g;++A)this[A]=o;else{const b=l.isBuffer(o)?o:l.from(o,k),V=b.length;if(V===0)throw new TypeError('The value "'+o+'" is invalid for argument "value"');for(A=0;A<g-u;++A)this[A+u]=b[A%V]}return this};const Y={};function $(p,o,u){Y[p]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:o.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(k){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:k,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}$("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$("ERR_INVALID_ARG_TYPE",function(p,o){return`The "${p}" argument must be of type number. Received type ${typeof o}`},TypeError),$("ERR_OUT_OF_RANGE",function(p,o,u){let g=`The value of "${p}" is out of range.`,k=u;return Number.isInteger(u)&&Math.abs(u)>2**32?k=X(String(u)):typeof u=="bigint"&&(k=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(k=X(k)),k+="n"),g+=` It must be ${o}. Received ${k}`,g},RangeError);function X(p){let o="",u=p.length;const g=p[0]==="-"?1:0;for(;u>=g+4;u-=3)o=`_${p.slice(u-3,u)}${o}`;return`${p.slice(0,u)}${o}`}function Me(p,o,u){Ce(o,"offset"),(p[o]===void 0||p[o+u]===void 0)&&_e(o,p.length-(u+1))}function Ue(p,o,u,g,k,A){if(p>u||p<o){const b=typeof o=="bigint"?"n":"";let V;throw A>3?o===0||o===BigInt(0)?V=`>= 0${b} and < 2${b} ** ${(A+1)*8}${b}`:V=`>= -(2${b} ** ${(A+1)*8-1}${b}) and < 2 ** ${(A+1)*8-1}${b}`:V=`>= ${o}${b} and <= ${u}${b}`,new Y.ERR_OUT_OF_RANGE("value",V,p)}Me(g,k,A)}function Ce(p,o){if(typeof p!="number")throw new Y.ERR_INVALID_ARG_TYPE(o,"number",p)}function _e(p,o,u){throw Math.floor(p)!==p?(Ce(p,u),new Y.ERR_OUT_OF_RANGE(u||"offset","an integer",p)):o<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(u||"offset",`>= ${u?1:0} and <= ${o}`,p)}const hn=/[^+/0-9A-Za-z-_]/g;function nt(p){if(p=p.split("=")[0],p=p.trim().replace(hn,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function Un(p,o){o=o||1/0;let u;const g=p.length;let k=null;const A=[];for(let b=0;b<g;++b){if(u=p.charCodeAt(b),u>55295&&u<57344){if(!k){if(u>56319){(o-=3)>-1&&A.push(239,191,189);continue}else if(b+1===g){(o-=3)>-1&&A.push(239,191,189);continue}k=u;continue}if(u<56320){(o-=3)>-1&&A.push(239,191,189),k=u;continue}u=(k-55296<<10|u-56320)+65536}else k&&(o-=3)>-1&&A.push(239,191,189);if(k=null,u<128){if((o-=1)<0)break;A.push(u)}else if(u<2048){if((o-=2)<0)break;A.push(u>>6|192,u&63|128)}else if(u<65536){if((o-=3)<0)break;A.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((o-=4)<0)break;A.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return A}function Qt(p){const o=[];for(let u=0;u<p.length;++u)o.push(p.charCodeAt(u)&255);return o}function _(p,o){let u,g,k;const A=[];for(let b=0;b<p.length&&!((o-=2)<0);++b)u=p.charCodeAt(b),g=u>>8,k=u%256,A.push(k),A.push(g);return A}function tt(p){return e.toByteArray(nt(p))}function Pn(p,o,u,g){let k;for(k=0;k<g&&!(k+u>=o.length||k>=p.length);++k)o[k+u]=p[k];return k}function Pe(p,o){return p instanceof o||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===o.name}function Ft(p){return p!==p}const Ko=function(){const p="0123456789abcdef",o=new Array(256);for(let u=0;u<16;++u){const g=u*16;for(let k=0;k<16;++k)o[g+k]=p[u]+p[k]}return o}();function Xe(p){return typeof BigInt>"u"?Jo:p}function Jo(){throw new Error("BigInt not supported")}})(ki);var Ni={exports:{}},pe=Ni.exports={},Be,Qe;function Sa(){throw new Error("setTimeout has not been defined")}function Aa(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Be=setTimeout:Be=Sa}catch{Be=Sa}try{typeof clearTimeout=="function"?Qe=clearTimeout:Qe=Aa}catch{Qe=Aa}})();function Ii(n){if(Be===setTimeout)return setTimeout(n,0);if((Be===Sa||!Be)&&setTimeout)return Be=setTimeout,setTimeout(n,0);try{return Be(n,0)}catch{try{return Be.call(null,n,0)}catch{return Be.call(this,n,0)}}}function il(n){if(Qe===clearTimeout)return clearTimeout(n);if((Qe===Aa||!Qe)&&clearTimeout)return Qe=clearTimeout,clearTimeout(n);try{return Qe(n)}catch{try{return Qe.call(null,n)}catch{return Qe.call(this,n)}}}var qe=[],wn=!1,ln,lt=-1;function ol(){!wn||!ln||(wn=!1,ln.length?qe=ln.concat(qe):lt=-1,qe.length&&Si())}function Si(){if(!wn){var n=Ii(ol);wn=!0;for(var e=qe.length;e;){for(ln=qe,qe=[];++lt<e;)ln&&ln[lt].run();lt=-1,e=qe.length}ln=null,wn=!1,il(n)}}pe.nextTick=function(n){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];qe.push(new Ai(n,e)),qe.length===1&&!wn&&Ii(Si)};function Ai(n,e){this.fun=n,this.array=e}Ai.prototype.run=function(){this.fun.apply(null,this.array)};pe.title="browser";pe.browser=!0;pe.env={};pe.argv=[];pe.version="";pe.versions={};function Je(){}pe.on=Je;pe.addListener=Je;pe.once=Je;pe.off=Je;pe.removeListener=Je;pe.removeAllListeners=Je;pe.emit=Je;pe.prependListener=Je;pe.prependOnceListener=Je;pe.listeners=function(n){return[]};pe.binding=function(n){throw new Error("process.binding is not supported")};pe.cwd=function(){return"/"};pe.chdir=function(n){throw new Error("process.chdir is not supported")};pe.umask=function(){return 0};var cl=Ni.exports;(function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const e=ki,t=cl,s=i=>i&&i.__esModule?i:{default:i},a=s(t),r=globalThis||void 0||self;Object.defineProperty(n,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(n,"process",{enumerable:!0,get:()=>a.default}),n.global=r})(G);function ll(){const n=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof n.getBigInt64=="function"&&typeof n.getBigUint64=="function"&&typeof n.setBigInt64=="function"&&typeof n.setBigUint64=="function"&&(typeof G.process!="object"||typeof G.process.env!="object"||!1)){const a=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),i=BigInt("0"),l=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(m){const d=typeof m=="bigint"?m:BigInt(m);if(d>r||d<a)throw new Error(`int64 invalid: ${m}`);return d},uParse(m){const d=typeof m=="bigint"?m:BigInt(m);if(d>l||d<i)throw new Error(`uint64 invalid: ${m}`);return d},enc(m){return n.setBigInt64(0,this.parse(m),!0),{lo:n.getInt32(0,!0),hi:n.getInt32(4,!0)}},uEnc(m){return n.setBigInt64(0,this.uParse(m),!0),{lo:n.getInt32(0,!0),hi:n.getInt32(4,!0)}},dec(m,d){return n.setInt32(0,m,!0),n.setInt32(4,d,!0),n.getBigInt64(0,!0)},uDec(m,d){return n.setInt32(0,m,!0),n.setInt32(4,d,!0),n.getBigUint64(0,!0)}}}const t=a=>be(/^-?[0-9]+$/.test(a),`int64 invalid: ${a}`),s=a=>be(/^[0-9]+$/.test(a),`uint64 invalid: ${a}`);return{zero:"0",supported:!1,parse(a){return typeof a!="string"&&(a=a.toString()),t(a),a},uParse(a){return typeof a!="string"&&(a=a.toString()),s(a),a},enc(a){return typeof a!="string"&&(a=a.toString()),t(a),As(a)},uEnc(a){return typeof a!="string"&&(a=a.toString()),s(a),As(a)},dec(a,r){return Hc(a,r)},uDec(a,r){return Ti(a,r)}}}const he=ll();var de;(function(n){n[n.Varint=0]="Varint",n[n.Bit64=1]="Bit64",n[n.LengthDelimited=2]="LengthDelimited",n[n.StartGroup=3]="StartGroup",n[n.EndGroup=4]="EndGroup",n[n.Bit32=5]="Bit32"})(de||(de={}));class ul{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let a=0;a<this.chunks.length;a++)e+=this.chunks[a].length;let t=new Uint8Array(e),s=0;for(let a=0;a<this.chunks.length;a++)t.set(this.chunks[a],s),s+=this.chunks[a].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(Ia(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return ot(e),bs(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){di(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){Ia(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){ot(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return ot(e),e=(e<<1^e>>31)>>>0,bs(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),s=new DataView(t.buffer),a=he.enc(e);return s.setInt32(0,a.lo,!0),s.setInt32(4,a.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),s=new DataView(t.buffer),a=he.uEnc(e);return s.setInt32(0,a.lo,!0),s.setInt32(4,a.hi,!0),this.raw(t)}int64(e){let t=he.enc(e);return $t(t.lo,t.hi,this.buf),this}sint64(e){let t=he.enc(e),s=t.hi>>31,a=t.lo<<1^s,r=(t.hi<<1|t.lo>>>31)^s;return $t(a,r,this.buf),this}uint64(e){let t=he.uEnc(e);return $t(t.lo,t.hi,this.buf),this}}class ml{constructor(e,t){this.varint64=Wc,this.uint32=Kc,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=t??new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,s=e&7;if(t<=0||s<0||s>5)throw new Error("illegal tag: field no "+t+" wire type "+s);return[t,s]}skip(e){let t=this.pos;switch(e){case de.Varint:for(;this.buf[this.pos++]&128;);break;case de.Bit64:this.pos+=4;case de.Bit32:this.pos+=4;break;case de.LengthDelimited:let s=this.uint32();this.pos+=s;break;case de.StartGroup:let a;for(;(a=this.tag()[1])!==de.EndGroup;)this.skip(a);break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return he.dec(...this.varint64())}uint64(){return he.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),s=-(e&1);return e=(e>>>1|(t&1)<<31)^s,t=t>>>1^s,he.dec(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return he.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return he.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}function Ea(n,e){return e instanceof Ye||!n.fieldWrapper?e:n.fieldWrapper.wrapField(e)}w.DOUBLE,w.FLOAT,w.INT64,w.UINT64,w.INT32,w.UINT32,w.BOOL,w.STRING,w.BYTES;function en(n,e,t){if(e===t)return!0;if(n==w.BYTES){if(!(e instanceof Uint8Array)||!(t instanceof Uint8Array)||e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}switch(n){case w.UINT64:case w.FIXED64:case w.INT64:case w.SFIXED64:case w.SINT64:return e==t}return!1}function ba(n,e){switch(n){case w.BOOL:return!1;case w.UINT64:case w.FIXED64:case w.INT64:case w.SFIXED64:case w.SINT64:return e==0?he.zero:"0";case w.DOUBLE:case w.FLOAT:return 0;case w.BYTES:return new Uint8Array(0);case w.STRING:return"";default:return 0}}function Ei(n,e){const t=e===void 0;let s=de.Varint,a=e===0;switch(n){case w.STRING:a=t||!e.length,s=de.LengthDelimited;break;case w.BOOL:a=e===!1;break;case w.DOUBLE:s=de.Bit64;break;case w.FLOAT:s=de.Bit32;break;case w.INT64:a=t||e==0;break;case w.UINT64:a=t||e==0;break;case w.FIXED64:a=t||e==0,s=de.Bit64;break;case w.BYTES:a=t||!e.byteLength,s=de.LengthDelimited;break;case w.FIXED32:s=de.Bit32;break;case w.SFIXED32:s=de.Bit32;break;case w.SFIXED64:a=t||e==0,s=de.Bit64;break;case w.SINT64:a=t||e==0;break}const r=w[n].toLowerCase();return[s,r,t||a]}const Mn=Symbol("@bufbuild/protobuf/unknown-fields"),Ds={readUnknownFields:!0,readerFactory:n=>new ml(n)},vs={writeUnknownFields:!0,writerFactory:()=>new ul};function dl(n){return n?Object.assign(Object.assign({},Ds),n):Ds}function pl(n){return n?Object.assign(Object.assign({},vs),n):vs}function yl(){return{makeReadOptions:dl,makeWriteOptions:pl,listUnknownFields(n){var e;return(e=n[Mn])!==null&&e!==void 0?e:[]},discardUnknownFields(n){delete n[Mn]},writeUnknownFields(n,e){const s=n[Mn];if(s)for(const a of s)e.tag(a.no,a.wireType).raw(a.data)},onUnknownField(n,e,t,s){const a=n;Array.isArray(a[Mn])||(a[Mn]=[]),a[Mn].push({no:e,wireType:t,data:s})},readMessage(n,e,t,s){const a=n.getType(),r=t===void 0?e.len:e.pos+t;for(;e.pos<r;){const[i,l]=e.tag(),m=a.fields.find(i);if(!m){const T=e.skip(l);s.readUnknownFields&&this.onUnknownField(n,i,l,T);continue}let d=n,y=m.repeated,h=m.localName;switch(m.oneof&&(d=d[m.oneof.localName],d.case!=h&&delete d.value,d.case=h,h="value"),m.kind){case"scalar":case"enum":const T=m.kind=="enum"?w.INT32:m.T;let M=ft;if(m.kind=="scalar"&&m.L>0&&(M=fl),y){let j=d[h];if(l==de.LengthDelimited&&T!=w.STRING&&T!=w.BYTES){let R=e.uint32()+e.pos;for(;e.pos<R;)j.push(M(e,T))}else j.push(M(e,T))}else d[h]=M(e,T);break;case"message":const E=m.T;y?d[h].push(ut(e,new E,s)):d[h]instanceof Ye?ut(e,d[h],s):(d[h]=ut(e,new E,s),E.fieldWrapper&&!m.oneof&&!m.repeated&&(d[h]=E.fieldWrapper.unwrapField(d[h])));break;case"map":let[D,L]=gl(m,e,s);d[h][D]=L;break}}}}}function ut(n,e,t){return e.getType().runtime.bin.readMessage(e,n,n.uint32(),t),e}function gl(n,e,t){const s=e.uint32(),a=e.pos+s;let r,i;for(;e.pos<a;){let[l]=e.tag();switch(l){case 1:r=ft(e,n.K);break;case 2:switch(n.V.kind){case"scalar":i=ft(e,n.V.T);break;case"enum":i=e.int32();break;case"message":i=ut(e,new n.V.T,t);break}break}}if(r===void 0){let l=ba(n.K,gn.BIGINT);r=n.K==w.BOOL?l.toString():l}if(typeof r!="string"&&typeof r!="number"&&(r=r.toString()),i===void 0)switch(n.V.kind){case"scalar":i=ba(n.V.T,gn.BIGINT);break;case"enum":i=0;break;case"message":i=new n.V.T;break}return[r,i]}function fl(n,e){const t=ft(n,e);return typeof t=="bigint"?t.toString():t}function ft(n,e){switch(e){case w.STRING:return n.string();case w.BOOL:return n.bool();case w.DOUBLE:return n.double();case w.FLOAT:return n.float();case w.INT32:return n.int32();case w.INT64:return n.int64();case w.UINT64:return n.uint64();case w.FIXED64:return n.fixed64();case w.BYTES:return n.bytes();case w.FIXED32:return n.fixed32();case w.SFIXED32:return n.sfixed32();case w.SFIXED64:return n.sfixed64();case w.SINT64:return n.sint64();case w.UINT32:return n.uint32();case w.SINT32:return n.sint32()}}function Tl(n,e,t,s,a){n.tag(t.no,de.LengthDelimited),n.fork();let r=s;switch(t.K){case w.INT32:case w.FIXED32:case w.UINT32:case w.SFIXED32:case w.SINT32:r=Number.parseInt(s);break;case w.BOOL:be(s=="true"||s=="false"),r=s=="true";break}switch(Yn(n,t.K,1,r,!0),t.V.kind){case"scalar":Yn(n,t.V.T,2,a,!0);break;case"enum":Yn(n,w.INT32,2,a,!0);break;case"message":Da(n,e,t.V.T,2,a);break}n.join()}function Da(n,e,t,s,a){if(a!==void 0){const r=Ea(t,a);n.tag(s,de.LengthDelimited).bytes(r.toBinary(e))}}function Yn(n,e,t,s,a){let[r,i,l]=Ei(e,s);(!l||a)&&n.tag(t,r)[i](s)}function hl(n,e,t,s){if(!s.length)return;n.tag(t,de.LengthDelimited).fork();let[,a]=Ei(e);for(let r=0;r<s.length;r++)n[a](s[r]);n.join()}function kl(){return Object.assign(Object.assign({},yl()),{writeMessage(n,e,t){const s=n.getType();for(const a of s.fields.byNumber()){let r,i=a.repeated,l=a.localName;if(a.oneof){const m=n[a.oneof.localName];if(m.case!==l)continue;r=m.value}else r=n[l];switch(a.kind){case"scalar":case"enum":let m=a.kind=="enum"?w.INT32:a.T;if(i)if(a.packed)hl(e,m,a.no,r);else for(const d of r)Yn(e,m,a.no,d,!0);else r!==void 0&&Yn(e,m,a.no,r,!!a.oneof||a.opt);break;case"message":if(i)for(const d of r)Da(e,t,a.T,a.no,d);else Da(e,t,a.T,a.no,r);break;case"map":for(const[d,y]of Object.entries(r))Tl(e,t,a,d,y);break}}return t.writeUnknownFields&&this.writeUnknownFields(n,e),e}})}let $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Dt=[];for(let n=0;n<$e.length;n++)Dt[$e[n].charCodeAt(0)]=n;Dt["-".charCodeAt(0)]=$e.indexOf("+");Dt["_".charCodeAt(0)]=$e.indexOf("/");const Va={dec(n){let e=n.length*3/4;n[n.length-2]=="="?e-=2:n[n.length-1]=="="&&(e-=1);let t=new Uint8Array(e),s=0,a=0,r,i=0;for(let l=0;l<n.length;l++){if(r=Dt[n.charCodeAt(l)],r===void 0)switch(n[l]){case"=":a=0;case`
15
+ `:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(a){case 0:i=r,a=1;break;case 1:t[s++]=i<<2|(r&48)>>4,i=r,a=2;break;case 2:t[s++]=(i&15)<<4|(r&60)>>2,i=r,a=3;break;case 3:t[s++]=(i&3)<<6|r,a=0;break}}if(a==1)throw Error("invalid base64 string.");return t.subarray(0,s)},enc(n){let e="",t=0,s,a=0;for(let r=0;r<n.length;r++)switch(s=n[r],t){case 0:e+=$e[s>>2],a=(s&3)<<4,t=1;break;case 1:e+=$e[a|s>>4],a=(s&15)<<2,t=2;break;case 2:e+=$e[a|s>>6],e+=$e[s&63],t=0;break}return t&&(e+=$e[a],e+="=",t==1&&(e+="=")),e}},ws={ignoreUnknownFields:!1},_s={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function Ml(n){return n?Object.assign(Object.assign({},ws),n):ws}function Nl(n){return n?Object.assign(Object.assign({},_s),n):_s}function Il(n){const e=n(Sl,js);return{makeReadOptions:Ml,makeWriteOptions:Nl,readMessage(t,s,a,r){if(s==null||Array.isArray(s)||typeof s!="object")throw new Error(`cannot decode message ${t.typeName} from JSON: ${this.debug(s)}`);r=r??new t;const i={};for(const[l,m]of Object.entries(s)){const d=t.fields.findJsonName(l);if(!d){if(!a.ignoreUnknownFields)throw new Error(`cannot decode message ${t.typeName} from JSON: key "${l}" is unknown`);continue}let y=d.localName,h=r;if(d.oneof){if(m===null&&d.kind=="scalar")continue;const T=i[d.oneof.localName];if(T)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${d.oneof.name}" present: "${T}", "${l}"`);i[d.oneof.localName]=l,h=h[d.oneof.localName]={case:y},y="value"}if(d.repeated){if(m===null)continue;if(!Array.isArray(m))throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`);const T=h[y];for(const M of m){if(M===null)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(M)}`);let E;switch(d.kind){case"message":E=d.T.fromJson(M,a);break;case"enum":if(E=Wt(d.T,M,a.ignoreUnknownFields),E===void 0)continue;break;case"scalar":try{E=Bn(d.T,M,d.L)}catch(D){let L=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(M)}`;throw D instanceof Error&&D.message.length>0&&(L+=`: ${D.message}`),new Error(L)}break}T.push(E)}}else if(d.kind=="map"){if(m===null)continue;if(Array.isArray(m)||typeof m!="object")throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`);const T=h[y];for(const[M,E]of Object.entries(m)){if(E===null)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: map value null`);let D;switch(d.V.kind){case"message":D=d.V.T.fromJson(E,a);break;case"enum":if(D=Wt(d.V.T,E,a.ignoreUnknownFields),D===void 0)continue;break;case"scalar":try{D=Bn(d.V.T,E,gn.BIGINT)}catch(L){let j=`cannot decode map value for field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw L instanceof Error&&L.message.length>0&&(j+=`: ${L.message}`),new Error(j)}break}try{T[Bn(d.K,d.K==w.BOOL?M=="true"?!0:M=="false"?!1:M:M,gn.BIGINT).toString()]=D}catch(L){let j=`cannot decode map key for field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw L instanceof Error&&L.message.length>0&&(j+=`: ${L.message}`),new Error(j)}}}else switch(d.kind){case"message":const T=d.T;if(m===null&&T.typeName!="google.protobuf.Value"){if(d.oneof)throw new Error(`cannot decode field ${t.typeName}.${d.name} from JSON: null is invalid for oneof field "${l}"`);continue}h[y]instanceof Ye?h[y].fromJson(m,a):(h[y]=T.fromJson(m,a),T.fieldWrapper&&!d.oneof&&(h[y]=T.fieldWrapper.unwrapField(h[y])));break;case"enum":const M=Wt(d.T,m,a.ignoreUnknownFields);M!==void 0&&(h[y]=M);break;case"scalar":try{h[y]=Bn(d.T,m,d.L)}catch(E){let D=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw E instanceof Error&&E.message.length>0&&(D+=`: ${E.message}`),new Error(D)}break}}return r},writeMessage(t,s){const a=t.getType(),r={};let i;try{for(const l of a.fields.byMember()){let m;if(l.kind=="oneof"){const d=t[l.localName];if(d.value===void 0)continue;if(i=l.findField(d.case),!i)throw"oneof case not found: "+d.case;m=e(i,d.value,s)}else i=l,m=e(i,t[i.localName],s);m!==void 0&&(r[s.useProtoFieldName?i.name:i.jsonName]=m)}}catch(l){const m=i?`cannot encode field ${a.typeName}.${i.name} to JSON`:`cannot encode message ${a.typeName} to JSON`,d=l instanceof Error?l.message:String(l);throw new Error(m+(d.length>0?`: ${d}`:""))}return r},readScalar:Bn,writeScalar:js,debug:bi}}function bi(n){if(n===null)return"null";switch(typeof n){case"object":return Array.isArray(n)?"array":"object";case"string":return n.length>100?"string":`"${n.split('"').join('\\"')}"`;default:return String(n)}}function Bn(n,e,t){switch(n){case w.DOUBLE:case w.FLOAT:if(e===null)return 0;if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""||typeof e=="string"&&e.trim().length!==e.length||typeof e!="string"&&typeof e!="number")break;const s=Number(e);if(Number.isNaN(s)||!Number.isFinite(s))break;return n==w.FLOAT&&di(s),s;case w.INT32:case w.FIXED32:case w.SFIXED32:case w.SINT32:case w.UINT32:if(e===null)return 0;let a;if(typeof e=="number"?a=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(a=Number(e)),a===void 0)break;return n==w.UINT32?Ia(a):ot(a),a;case w.INT64:case w.SFIXED64:case w.SINT64:if(e===null)return he.zero;if(typeof e!="number"&&typeof e!="string")break;const r=he.parse(e);return t?r.toString():r;case w.FIXED64:case w.UINT64:if(e===null)return he.zero;if(typeof e!="number"&&typeof e!="string")break;const i=he.uParse(e);return t?i.toString():i;case w.BOOL:if(e===null)return!1;if(typeof e!="boolean")break;return e;case w.STRING:if(e===null)return"";if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case w.BYTES:if(e===null||e==="")return new Uint8Array(0);if(typeof e!="string")break;return Va.dec(e)}throw new Error}function Wt(n,e,t){if(e===null)return 0;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":const s=n.findName(e);if(s||t)return s==null?void 0:s.no;break}throw new Error(`cannot decode enum ${n.typeName} from JSON: ${bi(e)}`)}function Sl(n,e,t,s){var a;if(e===void 0)return e;if(e===0&&!t)return;if(s)return e;if(n.typeName=="google.protobuf.NullValue")return null;const r=n.findNumber(e);return(a=r==null?void 0:r.name)!==null&&a!==void 0?a:e}function js(n,e,t){if(e!==void 0)switch(n){case w.INT32:case w.SFIXED32:case w.SINT32:case w.FIXED32:case w.UINT32:return be(typeof e=="number"),e!=0||t?e:void 0;case w.FLOAT:case w.DOUBLE:return be(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e!==0||t?e:void 0;case w.STRING:return be(typeof e=="string"),e.length>0||t?e:void 0;case w.BOOL:return be(typeof e=="boolean"),e||t?e:void 0;case w.UINT64:case w.FIXED64:case w.INT64:case w.SFIXED64:case w.SINT64:return be(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),t||e!=0?e.toString(10):void 0;case w.BYTES:return be(e instanceof Uint8Array),t||e.byteLength>0?Va.enc(e):void 0}}function Al(){return Il((n,e)=>function(s,a,r){if(s.kind=="map"){const i={};switch(s.V.kind){case"scalar":for(const[m,d]of Object.entries(a)){const y=e(s.V.T,d,!0);be(y!==void 0),i[m.toString()]=y}break;case"message":for(const[m,d]of Object.entries(a))i[m.toString()]=d.toJson(r);break;case"enum":const l=s.V.T;for(const[m,d]of Object.entries(a)){be(d===void 0||typeof d=="number");const y=n(l,d,!0,r.enumAsInteger);be(y!==void 0),i[m.toString()]=y}break}return r.emitDefaultValues||Object.keys(i).length>0?i:void 0}else if(s.repeated){const i=[];switch(s.kind){case"scalar":for(let l=0;l<a.length;l++)i.push(e(s.T,a[l],!0));break;case"enum":for(let l=0;l<a.length;l++)i.push(n(s.T,a[l],!0,r.enumAsInteger));break;case"message":for(let l=0;l<a.length;l++)i.push(Ea(s.T,a[l]).toJson(r));break}return r.emitDefaultValues||i.length>0?i:void 0}else switch(s.kind){case"scalar":return e(s.T,a,!!s.oneof||s.opt||r.emitDefaultValues);case"enum":return n(s.T,a,!!s.oneof||s.opt||r.emitDefaultValues,r.enumAsInteger);case"message":return a!==void 0?Ea(s.T,a).toJson(r):void 0}})}function El(){return{setEnumType:yi,initPartial(n,e){if(n===void 0)return;const t=e.getType();for(const s of t.fields.byMember()){const a=s.localName,r=e,i=n;if(i[a]!==void 0)switch(s.kind){case"oneof":const l=i[a].case;if(l===void 0)continue;const m=s.findField(l);let d=i[a].value;m&&m.kind=="message"&&!(d instanceof m.T)?d=new m.T(d):m&&m.kind==="scalar"&&m.T===w.BYTES&&(d=Qn(d)),r[a]={case:l,value:d};break;case"scalar":case"enum":let y=i[a];s.T===w.BYTES&&(y=s.repeated?y.map(Qn):Qn(y)),r[a]=y;break;case"map":switch(s.V.kind){case"scalar":case"enum":if(s.V.T===w.BYTES)for(const[M,E]of Object.entries(i[a]))r[a][M]=Qn(E);else Object.assign(r[a],i[a]);break;case"message":const T=s.V.T;for(const M of Object.keys(i[a])){let E=i[a][M];T.fieldWrapper||(E=new T(E)),r[a][M]=E}break}break;case"message":const h=s.T;if(s.repeated)r[a]=i[a].map(T=>T instanceof h?T:new h(T));else if(i[a]!==void 0){const T=i[a];h.fieldWrapper?h.typeName==="google.protobuf.BytesValue"?r[a]=Qn(T):r[a]=T:r[a]=T instanceof h?T:new h(T)}break}}},equals(n,e,t){return e===t?!0:!e||!t?!1:n.fields.byMember().every(s=>{const a=e[s.localName],r=t[s.localName];if(s.repeated){if(a.length!==r.length)return!1;switch(s.kind){case"message":return a.every((i,l)=>s.T.equals(i,r[l]));case"scalar":return a.every((i,l)=>en(s.T,i,r[l]));case"enum":return a.every((i,l)=>en(w.INT32,i,r[l]))}throw new Error(`repeated cannot contain ${s.kind}`)}switch(s.kind){case"message":return s.T.equals(a,r);case"enum":return en(w.INT32,a,r);case"scalar":return en(s.T,a,r);case"oneof":if(a.case!==r.case)return!1;const i=s.findField(a.case);if(i===void 0)return!0;switch(i.kind){case"message":return i.T.equals(a.value,r.value);case"enum":return en(w.INT32,a.value,r.value);case"scalar":return en(i.T,a.value,r.value)}throw new Error(`oneof cannot contain ${i.kind}`);case"map":const l=Object.keys(a).concat(Object.keys(r));switch(s.V.kind){case"message":const m=s.V.T;return l.every(y=>m.equals(a[y],r[y]));case"enum":return l.every(y=>en(w.INT32,a[y],r[y]));case"scalar":const d=s.V.T;return l.every(y=>en(d,a[y],r[y]))}break}})},clone(n){const e=n.getType(),t=new e,s=t;for(const a of e.fields.byMember()){const r=n[a.localName];let i;if(a.repeated)i=r.map(at);else if(a.kind=="map"){i=s[a.localName];for(const[l,m]of Object.entries(r))i[l]=at(m)}else a.kind=="oneof"?i=a.findField(r.case)?{case:r.case,value:at(r.value)}:{case:void 0}:i=at(r);s[a.localName]=i}return t}}}function at(n){if(n===void 0)return n;if(n instanceof Ye)return n.clone();if(n instanceof Uint8Array){const e=new Uint8Array(n.byteLength);return e.set(n),e}return n}function Qn(n){return n instanceof Uint8Array?n:new Uint8Array(n)}class bl{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){const t={};for(const s of this.list())t[s.jsonName]=t[s.name]=s;this.jsonNames=t}return this.jsonNames[e]}find(e){if(!this.numbers){const t={};for(const s of this.list())t[s.no]=s;this.numbers=t}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,t)=>e.no-t.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let t;for(const s of this.list())s.oneof?s.oneof!==t&&(t=s.oneof,e.push(t)):e.push(s)}return this.members}}function Di(n,e){const t=vi(n);return e?t:Ol(jl(t))}function Dl(n){return Di(n,!1)}const vl=vi;function vi(n){let e=!1;const t=[];for(let s=0;s<n.length;s++){let a=n.charAt(s);switch(a){case"_":e=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":t.push(a),e=!1;break;default:e&&(e=!1,a=a.toUpperCase()),t.push(a);break}}return t.join("")}const wl=new Set(["constructor","toString","toJSON","valueOf"]),_l=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),wi=n=>`${n}$`,jl=n=>_l.has(n)?wi(n):n,Ol=n=>wl.has(n)?wi(n):n;class Ll{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=Dl(e)}addField(e){be(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let t=0;t<this.fields.length;t++)this._lookup[this.fields[t].localName]=this.fields[t]}return this._lookup[e]}}const c=qc("proto3",Al(),kl(),Object.assign(Object.assign({},El()),{newFieldList(n){return new bl(n,Rl)},initFields(n){for(const e of n.getType().fields.byMember()){if(e.opt)continue;const t=e.localName,s=n;if(e.repeated){s[t]=[];continue}switch(e.kind){case"oneof":s[t]={case:void 0};break;case"enum":s[t]=0;break;case"map":s[t]={};break;case"scalar":s[t]=ba(e.T,e.L);break}}}}));function Rl(n){var e,t,s,a;const r=[];let i;for(const l of typeof n=="function"?n():n){const m=l;if(m.localName=Di(l.name,l.oneof!==void 0),m.jsonName=(e=l.jsonName)!==null&&e!==void 0?e:vl(l.name),m.repeated=(t=l.repeated)!==null&&t!==void 0?t:!1,l.kind=="scalar"&&(m.L=(s=l.L)!==null&&s!==void 0?s:gn.BIGINT),m.packed=(a=l.packed)!==null&&a!==void 0?a:l.kind=="enum"||l.kind=="scalar"&&l.T!=w.BYTES&&l.T!=w.STRING,l.oneof!==void 0){const d=typeof l.oneof=="string"?l.oneof:l.oneof.name;(!i||i.name!=d)&&(i=new Ll(d)),m.oneof=i,i.addField(m)}r.push(m)}return r}var P;(function(n){n[n.Unary=0]="Unary",n[n.ServerStreaming=1]="ServerStreaming",n[n.ClientStreaming=2]="ClientStreaming",n[n.BiDiStreaming=3]="BiDiStreaming"})(P||(P={}));var Os;(function(n){n[n.NoSideEffects=1]="NoSideEffects",n[n.Idempotent=2]="Idempotent"})(Os||(Os={}));class Ae extends Ye{constructor(e){super(),this.seconds=he.zero,this.nanos=0,c.util.initPartial(e,this)}fromJson(e,t){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${c.json.debug(e)}`);const s=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!s)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const a=Date.parse(s[1]+"-"+s[2]+"-"+s[3]+"T"+s[4]+":"+s[5]+":"+s[6]+(s[8]?s[8]:"Z"));if(Number.isNaN(a))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(a<Date.parse("0001-01-01T00:00:00Z")||a>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=he.parse(a/1e3),this.nanos=0,s[7]&&(this.nanos=parseInt("1"+s[7]+"0".repeat(9-s[7].length))-1e9),this}toJson(e){const t=Number(this.seconds)*1e3;if(t<Date.parse("0001-01-01T00:00:00Z")||t>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let s="Z";if(this.nanos>0){const a=(this.nanos+1e9).toString().substring(1);a.substring(3)==="000000"?s="."+a.substring(0,3)+"Z":a.substring(6)==="000"?s="."+a.substring(0,6)+"Z":s="."+a+"Z"}return new Date(t).toISOString().replace(".000Z",s)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return Ae.fromDate(new Date)}static fromDate(e){const t=e.getTime();return new Ae({seconds:he.parse(Math.floor(t/1e3)),nanos:t%1e3*1e6})}static fromBinary(e,t){return new Ae().fromBinary(e,t)}static fromJson(e,t){return new Ae().fromJson(e,t)}static fromJsonString(e,t){return new Ae().fromJsonString(e,t)}static equals(e,t){return c.util.equals(Ae,e,t)}}Ae.runtime=c;Ae.typeName="google.protobuf.Timestamp";Ae.fields=c.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class Ge extends Ye{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),c.util.initPartial(e,this)}toJson(e){var t;if(this.typeUrl==="")return{};const s=this.typeUrlToName(this.typeUrl),a=(t=e==null?void 0:e.typeRegistry)===null||t===void 0?void 0:t.findMessage(s);if(!a)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let i=a.fromBinary(this.value).toJson(e);return(s.startsWith("google.protobuf.")||i===null||Array.isArray(i)||typeof i!="object")&&(i={value:i}),i["@type"]=this.typeUrl,i}fromJson(e,t){var s;if(e===null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e===null?"null":Array.isArray(e)?"array":typeof e}`);if(Object.keys(e).length==0)return this;const a=e["@type"];if(typeof a!="string"||a=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const r=this.typeUrlToName(a),i=(s=t==null?void 0:t.typeRegistry)===null||s===void 0?void 0:s.findMessage(r);if(!i)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${a} is not in the type registry`);let l;if(r.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))l=i.fromJson(e.value,t);else{const m=Object.assign({},e);delete m["@type"],l=i.fromJson(m,t)}return this.packFrom(l),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return this.is(e.getType())?(e.fromBinary(this.value),!0):!1}unpack(e){if(this.typeUrl==="")return;const t=e.findMessage(this.typeUrlToName(this.typeUrl));if(t)return t.fromBinary(this.value)}is(e){if(this.typeUrl==="")return!1;const t=this.typeUrlToName(this.typeUrl);let s="";return typeof e=="string"?s=e:s=e.typeName,t===s}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw new Error(`invalid type url: ${e}`);const t=e.lastIndexOf("/"),s=t>0?e.substring(t+1):e;if(!s.length)throw new Error(`invalid type url: ${e}`);return s}static pack(e){const t=new Ge;return t.packFrom(e),t}static fromBinary(e,t){return new Ge().fromBinary(e,t)}static fromJson(e,t){return new Ge().fromJson(e,t)}static fromJsonString(e,t){return new Ge().fromJsonString(e,t)}static equals(e,t){return c.util.equals(Ge,e,t)}}Ge.runtime=c;Ge.typeName="google.protobuf.Any";Ge.fields=c.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);var ee;(function(n){n[n.Canceled=1]="Canceled",n[n.Unknown=2]="Unknown",n[n.InvalidArgument=3]="InvalidArgument",n[n.DeadlineExceeded=4]="DeadlineExceeded",n[n.NotFound=5]="NotFound",n[n.AlreadyExists=6]="AlreadyExists",n[n.PermissionDenied=7]="PermissionDenied",n[n.ResourceExhausted=8]="ResourceExhausted",n[n.FailedPrecondition=9]="FailedPrecondition",n[n.Aborted=10]="Aborted",n[n.OutOfRange=11]="OutOfRange",n[n.Unimplemented=12]="Unimplemented",n[n.Internal=13]="Internal",n[n.Unavailable=14]="Unavailable",n[n.DataLoss=15]="DataLoss",n[n.Unauthenticated=16]="Unauthenticated"})(ee||(ee={}));function Ls(n){const e=ee[n];return typeof e!="string"?n.toString():e[0].toLowerCase()+e.substring(1).replace(/[A-Z]/g,t=>"_"+t.toLowerCase())}class ye extends Error{constructor(e,t=ee.Unknown,s,a,r){super(xl(e,t)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=t,this.metadata=new Headers(s??{}),this.details=a??[],this.cause=r}static from(e,t=ee.Unknown){return e instanceof ye?e:e instanceof Error?e.name=="AbortError"?new ye(e.message,ee.Canceled):new ye(e.message,t,void 0,void 0,e):new ye(String(e),t,void 0,void 0,e)}findDetails(e){const t="typeName"in e?{findMessage:a=>a===e.typeName?e:void 0}:e,s=[];for(const a of this.details){if(a instanceof Ye){t.findMessage(a.getType().typeName)&&s.push(a);continue}const r=t.findMessage(a.type);if(r)try{s.push(r.fromBinary(a.value))}catch{}}return s}}function xl(n,e){return n.length?`[${Ls(e)}] ${n}`:`[${Ls(e)}]`}function Cl(n,e,t){try{const s=Va.dec(n);return e?e.fromBinary(s,t):s}catch(s){throw ye.from(s,ee.DataLoss)}}function _i(n,e){const t={};for(const[s,a]of Object.entries(n.methods)){const r=e(Object.assign(Object.assign({},a),{localName:s,service:n}));r!=null&&(t[s]=r)}return t}function Rs(n){let e,t=new Uint8Array(0);function s(a){const r=new Uint8Array(t.length+a.length);r.set(t),r.set(a,t.length),t=r}return new ReadableStream({start(){e=n.getReader()},async pull(a){let r;for(;;){if(r===void 0&&t.byteLength>=5){let m=0;for(let d=1;d<5;d++)m=(m<<8)+t[d];r={flags:t[0],length:m}}if(r!==void 0&&t.byteLength>=r.length+5)break;const l=await e.read();if(l.done)break;s(l.value)}if(r===void 0){if(t.byteLength==0){a.close();return}a.error(new ye("premature end of stream",ee.DataLoss));return}const i=t.subarray(5,5+r.length);t=t.subarray(5+r.length),a.enqueue({flags:r.flags,data:i})}})}function xs(n,e){const t=new Uint8Array(e.length+5);t.set(e,5);const s=new DataView(t.buffer,t.byteOffset,t.byteLength);return s.setUint8(0,n),s.setUint32(1,e.length),t}var zl=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(r){t[r]=n[r]&&function(i){return new Promise(function(l,m){i=n[r](i),a(l,m,i.done,i.value)})}}function a(r,i,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},i)}},Hn=globalThis&&globalThis.__await||function(n){return this instanceof Hn?(this.v=n,this):new Hn(n)},Ul=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),a,r=[];return a={},i("next"),i("throw"),i("return"),a[Symbol.asyncIterator]=function(){return this},a;function i(T){s[T]&&(a[T]=function(M){return new Promise(function(E,D){r.push([T,M,E,D])>1||l(T,M)})})}function l(T,M){try{m(s[T](M))}catch(E){h(r[0][3],E)}}function m(T){T.value instanceof Hn?Promise.resolve(T.value.v).then(d,y):h(r[0][2],T)}function d(T){l("next",T)}function y(T){l("throw",T)}function h(T,M){T(M),r.shift(),r.length&&l(r[0][0],r[0][1])}},Pl=globalThis&&globalThis.__asyncDelegator||function(n){var e,t;return e={},s("next"),s("throw",function(a){throw a}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(a,r){e[a]=n[a]?function(i){return(t=!t)?{value:Hn(n[a](i)),done:!1}:r?r(i):i}:r}};function ji(n){return Ul(this,arguments,function*(){yield Hn(yield*Pl(zl(n)))})}var Bl=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(r){t[r]=n[r]&&function(i){return new Promise(function(l,m){i=n[r](i),a(l,m,i.done,i.value)})}}function a(r,i,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},i)}};function Ql(n,e){return _i(n,t=>{switch(t.kind){case P.Unary:return Fl(e,n,t);case P.ServerStreaming:return Gl(e,n,t);default:return null}})}function Fl(n,e,t){return function(s,a,r){const i=new AbortController;return r=Oi(i,r),n.unary(e,t,i.signal,r.timeoutMs,r.headers,s,r.contextValues).then(l=>{var m,d;(m=r==null?void 0:r.onHeader)===null||m===void 0||m.call(r,l.header),(d=r==null?void 0:r.onTrailer)===null||d===void 0||d.call(r,l.trailer),a(void 0,l.message)},l=>{const m=ye.from(l,ee.Internal);m.code===ee.Canceled&&i.signal.aborted||a(m,new t.O)}),()=>i.abort()}}function Gl(n,e,t){return function(s,a,r,i){const l=new AbortController;async function m(){var d,y,h,T,M,E;i=Oi(l,i);const D=await n.stream(e,t,i.signal,i.timeoutMs,i.headers,ji([s]),i.contextValues);(M=i.onHeader)===null||M===void 0||M.call(i,D.header);try{for(var L=!0,j=Bl(D.message),R;R=await j.next(),d=R.done,!d;L=!0)T=R.value,L=!1,a(T)}catch(x){y={error:x}}finally{try{!L&&!d&&(h=j.return)&&await h.call(j)}finally{if(y)throw y.error}}(E=i.onTrailer)===null||E===void 0||E.call(i,D.trailer),r(void 0)}return m().catch(d=>{const y=ye.from(d,ee.Internal);y.code===ee.Canceled&&l.signal.aborted?r(void 0):r(y)}),()=>l.abort()}}function Oi(n,e){return e!=null&&e.signal&&(e.signal.addEventListener("abort",()=>n.abort()),e.signal.aborted&&n.abort()),Object.assign(Object.assign({},e),{signal:n.signal})}var Li=globalThis&&globalThis.__asyncValues||function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof __values=="function"?__values(n):n[Symbol.iterator](),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(r){t[r]=n[r]&&function(i){return new Promise(function(l,m){i=n[r](i),a(l,m,i.done,i.value)})}}function a(r,i,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},i)}},On=globalThis&&globalThis.__await||function(n){return this instanceof On?(this.v=n,this):new On(n)},Yl=globalThis&&globalThis.__asyncDelegator||function(n){var e,t;return e={},s("next"),s("throw",function(a){throw a}),s("return"),e[Symbol.iterator]=function(){return this},e;function s(a,r){e[a]=n[a]?function(i){return(t=!t)?{value:On(n[a](i)),done:!1}:r?r(i):i}:r}},Vl=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),a,r=[];return a={},i("next"),i("throw"),i("return"),a[Symbol.asyncIterator]=function(){return this},a;function i(T){s[T]&&(a[T]=function(M){return new Promise(function(E,D){r.push([T,M,E,D])>1||l(T,M)})})}function l(T,M){try{m(s[T](M))}catch(E){h(r[0][3],E)}}function m(T){T.value instanceof On?Promise.resolve(T.value.v).then(d,y):h(r[0][2],T)}function d(T){l("next",T)}function y(T){l("throw",T)}function h(T,M){T(M),r.shift(),r.length&&l(r[0][0],r[0][1])}};function vt(n,e){return _i(n,t=>{switch(t.kind){case P.Unary:return $l(e,n,t);case P.ServerStreaming:return ql(e,n,t);case P.ClientStreaming:return Wl(e,n,t);case P.BiDiStreaming:return Hl(e,n,t);default:return null}})}function $l(n,e,t){return async function(s,a){var r,i;const l=await n.unary(e,t,a==null?void 0:a.signal,a==null?void 0:a.timeoutMs,a==null?void 0:a.headers,s,a==null?void 0:a.contextValues);return(r=a==null?void 0:a.onHeader)===null||r===void 0||r.call(a,l.header),(i=a==null?void 0:a.onTrailer)===null||i===void 0||i.call(a,l.trailer),l.message}}function ql(n,e,t){return function(s,a){return Ri(n.stream(e,t,a==null?void 0:a.signal,a==null?void 0:a.timeoutMs,a==null?void 0:a.headers,ji([s]),a==null?void 0:a.contextValues),a)}}function Wl(n,e,t){return async function(s,a){var r,i,l,m,d,y;const h=await n.stream(e,t,a==null?void 0:a.signal,a==null?void 0:a.timeoutMs,a==null?void 0:a.headers,s,a==null?void 0:a.contextValues);(d=a==null?void 0:a.onHeader)===null||d===void 0||d.call(a,h.header);let T;try{for(var M=!0,E=Li(h.message),D;D=await E.next(),r=D.done,!r;M=!0)m=D.value,M=!1,T=m}catch(L){i={error:L}}finally{try{!M&&!r&&(l=E.return)&&await l.call(E)}finally{if(i)throw i.error}}if(!T)throw new ye("protocol error: missing response message",ee.Internal);return(y=a==null?void 0:a.onTrailer)===null||y===void 0||y.call(a,h.trailer),T}}function Hl(n,e,t){return function(s,a){return Ri(n.stream(e,t,a==null?void 0:a.signal,a==null?void 0:a.timeoutMs,a==null?void 0:a.headers,s,a==null?void 0:a.contextValues),a)}}function Ri(n,e){const t=function(){var s,a;return Vl(this,arguments,function*(){const r=yield On(n);(s=e==null?void 0:e.onHeader)===null||s===void 0||s.call(e,r.header),yield On(yield*Yl(Li(r.message))),(a=e==null?void 0:e.onTrailer)===null||a===void 0||a.call(e,r.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>t.next()})}}function Zl(...n){const e=new AbortController,t=n.filter(a=>a!==void 0).concat(e.signal);for(const a of t){if(a.aborted){s.apply(a);break}a.addEventListener("abort",s)}function s(){e.signal.aborted||e.abort(xi(this));for(const a of t)a.removeEventListener("abort",s)}return e}function Kl(n){const e=new AbortController,t=()=>{e.abort(new ye("the operation timed out",ee.DeadlineExceeded))};let s;return n!==void 0&&(n<=0?t():s=setTimeout(t,n)),{signal:e.signal,cleanup:()=>clearTimeout(s)}}function xi(n){if(!n.aborted)return;if(n.reason!==void 0)return n.reason;const e=new Error("This operation was aborted");return e.name="AbortError",e}function Cs(){return{get(n){return n.id in this?this[n.id]:n.defaultValue},set(n,e){return this[n.id]=e,this},delete(n){return delete this[n.id],this}}}const Ht=128;function zs(n){const e=new Headers,t=new TextDecoder().decode(n).split(`\r
16
+ `);for(const s of t){if(s==="")continue;const a=s.indexOf(":");if(a>0){const r=s.substring(0,a).trim(),i=s.substring(a+1).trim();e.append(r,i)}}return e}const Jl="Content-Type",Xl="Grpc-Timeout",Ci="Grpc-Status",zi="Grpc-Message",eu="Grpc-Status-Details-Bin",nu="User-Agent",tu="X-User-Agent",au="X-Grpc-Web",su="application/grpc-web+proto",ru="application/grpc-web+json";class We extends Ye{constructor(e){super(),this.code=0,this.message="",this.details=[],c.util.initPartial(e,this)}static fromBinary(e,t){return new We().fromBinary(e,t)}static fromJson(e,t){return new We().fromJson(e,t)}static fromJsonString(e,t){return new We().fromJsonString(e,t)}static equals(e,t){return c.util.equals(We,e,t)}}We.runtime=c;We.typeName="google.rpc.Status";We.fields=c.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Ge,repeated:!0}]);const iu="0";function Ui(n){var e;const t=n.get(eu);if(t!=null){const a=Cl(t,We);if(a.code==0)return;const r=new ye(a.message,a.code,n);return r.details=a.details.map(i=>({type:i.typeUrl.substring(i.typeUrl.lastIndexOf("/")+1),value:i.value})),r}const s=n.get(Ci);if(s!=null){if(s===iu)return;const a=parseInt(s,10);return a in ee?new ye(decodeURIComponent((e=n.get(zi))!==null&&e!==void 0?e:""),a,n):new ye(`invalid grpc-status: ${s}`,ee.Internal,n)}}function Us(n,e,t){const s=typeof e=="string"?e:e.typeName,a=typeof t=="string"?t:t.name;return n.toString().replace(/\/?$/,`/${s}/${a}`)}function Pi(n,e){return e instanceof Ye?e:new n(e)}function ou(n,e){function t(s){return s.done===!0?s:{done:s.done,value:Pi(n,s.value)}}return{[Symbol.asyncIterator](){const s=e[Symbol.asyncIterator](),a={next:()=>s.next().then(t)};return s.throw!==void 0&&(a.throw=r=>s.throw(r).then(t)),s.return!==void 0&&(a.return=r=>s.return(r).then(t)),a}}}function cu(n){var e;const t=Object.assign({},n);return(e=t.ignoreUnknownFields)!==null&&e!==void 0||(t.ignoreUnknownFields=!0),t}function Ps(n,e,t,s){const a=e?Bs(n.I,s):Qs(n.I,t);return{parse:(e?Bs(n.O,s):Qs(n.O,t)).parse,serialize:a.serialize}}function Bs(n,e){return{parse(t){try{return n.fromBinary(t,e)}catch(s){const a=s instanceof Error?s.message:String(s);throw new ye(`parse binary: ${a}`,ee.InvalidArgument)}},serialize(t){try{return t.toBinary(e)}catch(s){const a=s instanceof Error?s.message:String(s);throw new ye(`serialize binary: ${a}`,ee.Internal)}}}}function Qs(n,e){var t,s;const a=(t=e==null?void 0:e.textEncoder)!==null&&t!==void 0?t:new TextEncoder,r=(s=e==null?void 0:e.textDecoder)!==null&&s!==void 0?s:new TextDecoder,i=cu(e);return{parse(l){try{const m=r.decode(l);return n.fromJsonString(m,i)}catch(m){throw ye.from(m,ee.InvalidArgument)}},serialize(l){try{const m=l.toJsonString(i);return a.encode(m)}catch(m){throw ye.from(m,ee.Internal)}}}}function lu(n){const e=Qi(n.next,n.interceptors),[t,s,a]=Bi(n),r=Object.assign(Object.assign({},n.req),{message:Pi(n.req.method.I,n.req.message),signal:t});return e(r).then(i=>(a(),i),s)}function uu(n){const e=Qi(n.next,n.interceptors),[t,s,a]=Bi(n),r=Object.assign(Object.assign({},n.req),{message:ou(n.req.method.I,n.req.message),signal:t});let i=!1;return t.addEventListener("abort",function(){var l,m;const d=n.req.message[Symbol.asyncIterator]();i||(l=d.throw)===null||l===void 0||l.call(d,this.reason).catch(()=>{}),(m=d.return)===null||m===void 0||m.call(d).catch(()=>{})}),e(r).then(l=>Object.assign(Object.assign({},l),{message:{[Symbol.asyncIterator](){const m=l.message[Symbol.asyncIterator]();return{next(){return m.next().then(d=>(d.done==!0&&(i=!0,a()),d),s)}}}}}),s)}function Bi(n){const{signal:e,cleanup:t}=Kl(n.timeoutMs),s=Zl(n.signal,e);return[s.signal,function(r){const i=ye.from(e.aborted?xi(e):r);return s.abort(i),t(),Promise.reject(i)},function(){t(),s.abort()}]}function Qi(n,e){var t;return(t=e==null?void 0:e.concat().reverse().reduce((s,a)=>a(s),n))!==null&&t!==void 0?t:n}function mu(){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 Fs(n){const e=Ui(n);if(e)throw e}function Gs(n,e,t){const s=new Headers(t??{});return s.set(Jl,n?su:ru),s.set(au,"1"),s.set(tu,"connect-es/1.1.2"),s.set(nu,"connect-es/1.1.2"),e!==void 0&&s.set(Xl,`${e}m`),s}function du(n){switch(n){case 400:return ee.Internal;case 401:return ee.Unauthenticated;case 403:return ee.PermissionDenied;case 404:return ee.Unimplemented;case 429:return ee.Unavailable;case 502:return ee.Unavailable;case 503:return ee.Unavailable;case 504:return ee.Unavailable;default:return ee.Unknown}}function Ys(n,e){var t;if(n>=200&&n<300){const s=Ui(e);if(s)throw s;return{foundStatus:e.has(Ci)}}throw new ye(decodeURIComponent((t=e.get(zi))!==null&&t!==void 0?t:`HTTP ${n}`),du(n),e)}var un=globalThis&&globalThis.__await||function(n){return this instanceof un?(this.v=n,this):new un(n)},pu=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=t.apply(n,e||[]),a,r=[];return a={},i("next"),i("throw"),i("return"),a[Symbol.asyncIterator]=function(){return this},a;function i(T){s[T]&&(a[T]=function(M){return new Promise(function(E,D){r.push([T,M,E,D])>1||l(T,M)})})}function l(T,M){try{m(s[T](M))}catch(E){h(r[0][3],E)}}function m(T){T.value instanceof un?Promise.resolve(T.value.v).then(d,y):h(r[0][2],T)}function d(T){l("next",T)}function y(T){l("throw",T)}function h(T,M){T(M),r.shift(),r.length&&l(r[0][0],r[0][1])}};function wt(n){var e;mu();const t=(e=n.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(s,a,r,i,l,m,d){var y;const{serialize:h,parse:T}=Ps(a,t,n.jsonOptions,n.binaryOptions);return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,await lu({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!1,service:s,method:a,url:Us(n.baseUrl,s,a),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Gs(t,i,l),contextValues:d??Cs(),message:m},next:async M=>{var E;const L=await((E=n.fetch)!==null&&E!==void 0?E:globalThis.fetch)(M.url,Object.assign(Object.assign({},M.init),{headers:M.header,signal:M.signal,body:xs(0,h(M.message))}));if(Ys(L.status,L.headers),!L.body)throw"missing response body";const j=Rs(L.body).getReader();let R,x;for(;;){const z=await j.read();if(z.done)break;const{flags:U,data:B}=z.value;if(U===Ht){if(R!==void 0)throw"extra trailer";R=zs(B);continue}if(x!==void 0)throw"extra message";x=T(B)}if(R===void 0)throw"missing trailer";if(Fs(R),x===void 0)throw"missing message";return{stream:!1,header:L.headers,message:x,trailer:R}}})},async stream(s,a,r,i,l,m,d){var y;const{serialize:h,parse:T}=Ps(a,t,n.jsonOptions,n.binaryOptions);function M(D,L,j){return pu(this,arguments,function*(){const x=Rs(D).getReader();if(L){if(!(yield un(x.read())).done)throw"extra data for trailers-only";return yield un(void 0)}let z=!1;for(;;){const U=yield un(x.read());if(U.done)break;const{flags:B,data:C}=U.value;if((B&Ht)===Ht){if(z)throw"extra trailer";z=!0;const H=zs(C);Fs(H),H.forEach((ne,se)=>j.set(se,ne));continue}if(z)throw"extra message";yield yield un(T(C))}if(!z)throw"missing trailer"})}async function E(D){if(a.kind!=P.ServerStreaming)throw"The fetch API does not support streaming request bodies";const L=await D[Symbol.asyncIterator]().next();if(L.done==!0)throw"missing request message";return xs(0,h(L.value))}return i=i===void 0?n.defaultTimeoutMs:i<=0?void 0:i,uu({interceptors:n.interceptors,signal:r,timeoutMs:i,req:{stream:!0,service:s,method:a,url:Us(n.baseUrl,s,a),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Gs(t,i,l),contextValues:d??Cs(),message:m},next:async D=>{var L;const R=await((L=n.fetch)!==null&&L!==void 0?L:globalThis.fetch)(D.url,Object.assign(Object.assign({},D.init),{headers:D.header,signal:D.signal,body:await E(D.message)})),{foundStatus:x}=Ys(R.status,R.headers);if(!R.body)throw"missing response body";const z=new Headers;return Object.assign(Object.assign({},D),{header:R.headers,trailer:z,message:M(R.body,x,z)})}})}}}const yu=c.makeEnum("streamlayer.users.UserNotificationPreference",[{no:0,name:"USER_NOTIFICATION_PREFERENCE_UNSET",localName:"UNSET"},{no:1,name:"USER_NOTIFICATION_PREFERENCE_ALL_EVENTS",localName:"ALL_EVENTS"},{no:2,name:"USER_NOTIFICATION_PREFERENCE_IMPORTANT_EVENTS_ONLY",localName:"IMPORTANT_EVENTS_ONLY"},{no:3,name:"USER_NOTIFICATION_PREFERENCE_DAILY_SUMMARY_AND_MENTIONS",localName:"DAILY_SUMMARY_AND_MENTIONS"}]),gu=c.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),fu=c.makeMessageType("streamlayer.users.UserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:5,name:"avatar",kind:"scalar",T:9},{no:6,name:"public_chat",kind:"message",T:gu},{no:7,name:"public_name",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const Tu=c.makeMessageType("streamlayer.users.UserMetadata",()=>[{no:2,name:"avatar",kind:"scalar",T:9},{no:3,name:"avatar_background_colour",kind:"scalar",T:9},{no:4,name:"timezone",kind:"scalar",T:9},{no:5,name:"notification_preference",kind:"enum",T:c.getEnumType(yu)},{no:6,name:"active",kind:"scalar",T:8},{no:7,name:"first_name",kind:"scalar",T:9},{no:8,name:"last_name",kind:"scalar",T:9},{no:9,name:"roles",kind:"scalar",T:9,repeated:!0}]),hu=c.makeMessageType("streamlayer.users.ExtendedUserAttributes",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"metadata",kind:"message",T:Tu}]),$a=c.makeMessageType("streamlayer.users.User",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:fu}]);c.makeMessageType("streamlayer.users.ExtendedUser",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:hu}]);const ku=c.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),Mu=c.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:Nu},{no:2,name:"data",kind:"message",T:$a}]),Nu=c.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),Iu=c.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Su=c.makeMessageType("streamlayer.users.Referral",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"watching_game",kind:"scalar",T:9}]),Au=c.makeMessageType("streamlayer.users.RegisterResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"requires_activation",kind:"scalar",T:8},{no:3,name:"referral",kind:"message",T:Su}]),Eu=c.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),bu=c.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),Du=c.makeMessageType("streamlayer.users.MeRequest",[]),vu=c.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:$a}]),wu=c.makeMessageType("streamlayer.users.UpdateMetadataRequest",()=>[{no:1,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:2,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),_u=c.makeMessageType("streamlayer.users.UpdateAvatarRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_avatar",kind:"scalar",T:9,oneof:"avatar"},{no:3,name:"del_avatar",kind:"scalar",T:9,oneof:"avatar"}]),ju=c.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),Ou=c.makeMessageType("streamlayer.users.UpdatePublicChatNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),Lu=c.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),Ru=c.makeMessageType("streamlayer.users.UpdatePublicNameRequest",()=>[{no:1,name:"username",kind:"scalar",T:9},{no:2,name:"set_name",kind:"scalar",T:9,oneof:"name"},{no:3,name:"del_name",kind:"scalar",T:9,oneof:"name"}]),xu=c.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),Cu=c.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),zu=c.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:Uu}]),Uu=c.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),Pu=c.makeMessageType("streamlayer.users.InviteResponse",[]),Bu=c.makeMessageType("streamlayer.users.BypassAuthRequest",()=>[{no:1,name:"user_key",kind:"scalar",T:9},{no:2,name:"schema",kind:"scalar",T:9},{no:3,name:"init",kind:"scalar",T:8}]),Qu=c.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:Fu},{no:2,name:"data",kind:"message",T:$a,opt:!0}]),Fu=c.makeMessageType("streamlayer.users.BypassAuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9,opt:!0},{no:3,name:"token",kind:"scalar",T:9,opt:!0},{no:4,name:"getstream",kind:"scalar",T:9}],{localName:"BypassAuthResponse_AuthResponseMetadata"}),Jn={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:ku,O:Mu,kind:P.Unary},register:{name:"Register",I:Iu,O:Au,kind:P.Unary},requestPassword:{name:"RequestPassword",I:Eu,O:bu,kind:P.Unary},me:{name:"Me",I:Du,O:vu,kind:P.Unary},invite:{name:"Invite",I:zu,O:Pu,kind:P.Unary},bypassAuth:{name:"BypassAuth",I:Bu,O:Qu,kind:P.Unary},updateMetadata:{name:"UpdateMetadata",I:wu,O:Cu,kind:P.Unary},updateAvatar:{name:"UpdateAvatar",I:_u,O:ju,kind:P.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:Ou,O:Lu,kind:P.Unary},updatePublicName:{name:"UpdatePublicName",I:Ru,O:xu,kind:P.Unary}}},Gu=async(n,e)=>{const t=wt({baseUrl:n});return await vt(Jn,t).requestPassword({id:e}),!0},Yu=async(n,e)=>{const t=wt({baseUrl:n});return await vt(Jn,t).register({id:e}),!0},Vu=async(n,e,t)=>{var i;const s=wt({baseUrl:n}),r=await vt(Jn,s).login({id:e,password:t});return(i=r==null?void 0:r.meta)==null?void 0:i.jwt};const $u=S("div")({name:"Panel",class:"pkueuwk",propsAsIs:!1}),Vs=S("form")({name:"Form",class:"fp66u19",propsAsIs:!1}),$s=S("div")({name:"FormTitle",class:"fwojs5e",propsAsIs:!1}),Zt=S("div")({name:"FormDescription",class:"fwvt1dc",propsAsIs:!1}),Kt=S("button")({name:"FormSubmit",class:"f16e2wbc",propsAsIs:!1}),qu=S("div")({name:"FormInputContainer",class:"f1xkchzs",propsAsIs:!1}),Wu=S("div")({name:"Digits",class:"d132q1j",propsAsIs:!1}),Hu=({login:n,anonymousLogin:e,host:t})=>{const[s,a]=Q.useState(""),[r,i]=Q.useState(""),[l,m]=Q.useState(""),d=async h=>{h.preventDefault();try{const T=s.replaceAll("+","");try{await Gu(t,T)}catch{await Yu(t,T)}i(T)}catch(T){window.alert(T)}},y=async h=>{if(h.preventDefault(),r&&l)try{const T=await Vu(t,r,l);T&&n?await n(T):console.log("token",T)}catch(T){window.alert(T)}};return f.jsxs($u,{children:[!r&&f.jsxs("div",{children:[f.jsxs(Vs,{onSubmit:d,children:[f.jsx($s,{children:"Enter your phone number"}),f.jsx(Zt,{children:"Enter your phone up for number to log in or sign an account."}),f.jsx(qu,{children:f.jsx(Gt,{value:s,onChange:h=>a(`${h}`)})}),f.jsx(Kt,{disabled:!Gt.isValidPhoneNumber(s),type:"submit",children:"request code"})]}),e&&f.jsx(Kt,{style:{display:"block",margin:"auto"},onClick:e,children:"anonymous login"})]}),r&&f.jsxs(Vs,{onSubmit:y,children:[f.jsx($s,{children:"Enter Verification Code"}),f.jsxs(Zt,{children:["Please enter the verification code ",f.jsx("br",{}),"sent to ",f.jsx("b",{children:Gt.formatPhoneNumberIntl(s)})]}),f.jsx(Wu,{children:f.jsx(nc,{autoFocus:!0,allowedCharacters:"numeric",length:4,onChange:m})}),f.jsx(Kt,{disabled:l.length!==4,type:"submit",children:"login"}),f.jsxs(Zt,{children:["Didn't get 59 the code? ",f.jsx("br",{}),"Resend Code in",f.jsx(mi,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const Zu=S("div")({name:"Container",class:"c18fa2p6",propsAsIs:!1}),Ku=S("div")({name:"Content",class:"cthywkn",propsAsIs:!1}),Ju=S("div")({name:"OnboardingHeader",class:"obeaxxh",propsAsIs:!1}),Xu=S("div")({name:"LeftBlock",class:"l1jam9nb",propsAsIs:!1}),em=S("div")({name:"RightBlock",class:"r17ziiq1",propsAsIs:!1}),nm=S("img")({name:"GameIcon",class:"gxb34q2",propsAsIs:!1}),tm=S("img")({name:"SponsorLogo",class:"s10k8h8y",propsAsIs:!1}),am=S("button")({name:"CloseBtn",class:"ca5j1zk",propsAsIs:!1}),sm=S("img")({name:"IconClose",class:"i6wd7es",propsAsIs:!1}),rm=S("button")({name:"OnboardingActionBtn",class:"onaxor0",propsAsIs:!1});const im=S("div")({name:"Container",class:"c1tc3ie1",propsAsIs:!1}),om=S("div")({name:"Content",class:"cenyr9j",propsAsIs:!1}),cm=S("img")({name:"Graphic",class:"g17082th",propsAsIs:!1}),lm=S("div")({name:"Headline",class:"hr58r57",propsAsIs:!1}),um=({graphic:n,headline:e})=>f.jsx(im,{children:f.jsxs(om,{children:[f.jsx(cm,{alt:"graphic-img-instrucrions",src:n}),f.jsx(lm,{children:e})]})});const mm=S("div")({name:"Container",class:"c1k109z3",propsAsIs:!1}),dm=S("div")({name:"Title",class:"tl3o9j9",propsAsIs:!1}),pm=S("div")({name:"RulesList",class:"rp7yn67",propsAsIs:!1}),ym=S("div")({name:"RulesItem",class:"r18km3gu",propsAsIs:!1}),gm=S("div")({name:"RuleNumber",class:"rtu7hsj",propsAsIs:!1}),fm=S("div")({name:"RuleText",class:"rfkkuag",propsAsIs:!1}),Tm=({rules:n,rulesTitle:e,primaryColor:t})=>f.jsxs(mm,{children:[f.jsx(dm,{children:e}),f.jsx(pm,{children:n==null?void 0:n.map((s,a)=>f.jsxs(ym,{children:[f.jsx(gm,{style:{backgroundColor:t},children:a+1}),f.jsx(fm,{children:s})]},a))})]}),hm="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyaWVuZHMiPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNNC4xOTIzMSA3LjAzMTI1QzIuNjYzNDYgNy4wMzEyNSAxLjQyMzA4IDguMTk5NzMgMS40MjMwOCA5LjYzOTk0QzEuNDIzMDggMTEuMDgwMiAyLjY2MzQ2IDEyLjI0ODYgNC4xOTIzMSAxMi4yNDg2QzUuNzIxMTUgMTIuMjQ4NiA2Ljk2MTU0IDExLjA4MDIgNi45NjE1NCA5LjYzOTk0QzYuOTYxNTQgOC4xOTk3MyA1LjcyMTE1IDcuMDMxMjUgNC4xOTIzMSA3LjAzMTI1Wk00LjE5MjMxIDEyLjI0ODZDMi4xNjIyNiAxMi4yNDg2IDAuNSAxMy44MTQ1IDAuNSAxNS43MjY5VjE3LjYyOUMwLjUgMTcuNjI5IDEuNDIzMDggMTguMzM1NiA0LjE5MjMxIDE4LjMzNTZDNi45NjE1NCAxOC4zMzU2IDcuODg0NjEgMTcuNjI5IDcuODg0NjEgMTcuNjI5VjE1LjcyNjlDNy44ODQ2MSAxMy44MTQ1IDYuMjIyMzYgMTIuMjQ4NiA0LjE5MjMxIDEyLjI0ODZaTTIwLjgwNzcgNy4wMzEyNUMxOS4yNzg4IDcuMDMxMjUgMTguMDM4NSA4LjE5OTczIDE4LjAzODUgOS42Mzk5NEMxOC4wMzg1IDExLjA4MDIgMTkuMjc4OCAxMi4yNDg2IDIwLjgwNzcgMTIuMjQ4NkMyMi4zMzY1IDEyLjI0ODYgMjMuNTc2OSAxMS4wODAyIDIzLjU3NjkgOS42Mzk5NEMyMy41NzY5IDguMTk5NzMgMjIuMzM2NSA3LjAzMTI1IDIwLjgwNzcgNy4wMzEyNVpNMjAuODA3NyAxMi4yNDg2QzE4Ljc3NzYgMTIuMjQ4NiAxNy4xMTU0IDEzLjgxNDUgMTcuMTE1NCAxNS43MjY5VjE3LjYyOUMxNy4xMTU0IDE3LjYyOSAxOC4wMzg1IDE4LjMzNTYgMjAuODA3NyAxOC4zMzU2QzIzLjU3NjkgMTguMzM1NiAyNC41IDE3LjYyOSAyNC41IDE3LjYyOVYxNS43MjY5QzI0LjUgMTMuODE0NSAyMi44Mzc3IDEyLjI0ODYgMjAuODA3NyAxMi4yNDg2Wk0xMi41IDEwLjUwOTVDMTAuOTcxMiAxMC41MDk1IDkuNzMwNzcgMTEuNjc4IDkuNzMwNzcgMTMuMTE4MkM5LjczMDc3IDE0LjU1ODQgMTAuOTcxMiAxNS43MjY5IDEyLjUgMTUuNzI2OUMxNC4wMjg4IDE1LjcyNjkgMTUuMjY5MiAxNC41NTg0IDE1LjI2OTIgMTMuMTE4MkMxNS4yNjkyIDExLjY3OCAxNC4wMjg4IDEwLjUwOTUgMTIuNSAxMC41MDk1Wk0xMi41IDE1LjcyNjlDMTAuNDcgMTUuNzI2OSA4LjgwNzY5IDE3LjI5MjggOC44MDc2OSAxOS4yMDUxVjIxLjEwNzNDOC44MDc2OSAyMS4xMDczIDkuNzMwNzcgMjEuODEzOCAxMi41IDIxLjgxMzhDMTUuMjY5MiAyMS44MTM4IDE2LjE5MjMgMjEuMTA3MyAxNi4xOTIzIDIxLjEwNzNWMTkuMjA1MUMxNi4xOTIzIDE3LjI5MjggMTQuNTMgMTUuNzI2OSAxMi41IDE1LjcyNjlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik04LjU4NDczIDEuNUM2Ljk2MzkyIDEuNSA1LjY0ODkzIDIuNzM4NzYgNS42NDg5MyA0LjI2NTZDNS42NDg5MyA1Ljc5MjQ1IDYuOTYzOTIgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFDMTAuMjA1NSA3LjAzMTIxIDExLjUyMDUgNS43OTI0NSAxMS41MjA1IDQuMjY1NkMxMS41MjA1IDIuNzM4NzYgMTAuMjA1NSAxLjUgOC41ODQ3MyAxLjVaTTguNTg0NzMgNy4wMzEyMUM4LjI5MDM4IDcuMDMxMjEgNy45OTIyMSA3LjAyNCA3LjY5Nzg3IDcuMTE3NjNDOC4yODY1NiA3Ljg1NTg0IDguNTg0NzMgOC43ODEzMSA4LjU4NDczIDkuNzk2ODFDOC41ODQ3MyAxMC4xNjQxIDguNDkyOTggMTAuNTI0MiA4LjQ5Mjk4IDEwLjg5MTVDOS4yNzY2MyA5Ljc4NjAxIDEwLjU0MTkgOS4wNTg1OSAxMi4wMDk4IDguODc0OTRDMTEuMzI1NiA3Ljc2OTQyIDEwLjA1MjYgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFaTTE2LjQxMzUgMS41QzE0Ljc5MjcgMS41IDEzLjQ3NzcgMi43Mzg3NiAxMy40Nzc3IDQuMjY1NkMxMy40Nzc3IDUuNzkyNDUgMTQuNzkyNyA3LjAzMTIxIDE2LjQxMzUgNy4wMzEyMUMxOC4wMzQzIDcuMDMxMjEgMTkuMzQ5MyA1Ljc5MjQ1IDE5LjM0OTMgNC4yNjU2QzE5LjM0OTMgMi43Mzg3NiAxOC4wMzQzIDEuNSAxNi40MTM1IDEuNVpNMTYuNDEzNSA3LjAzMTIxQzE0Ljk0NTYgNy4wMzEyMSAxMy42NzI3IDcuNzY5NDIgMTIuOTg4NCA4Ljg3NDk0QzE0LjQ1NjMgOS4wNTg1OSAxNS43MjE2IDkuNzg2MDEgMTYuNTA1MyAxMC44OTE1QzE2LjUwNTMgMTAuNTI0MiAxNi40MTM1IDEwLjE2NDEgMTYuNDEzNSA5Ljc5NjgxQzE2LjQxMzUgOC43ODEzMSAxNi43MTE3IDcuODU1ODQgMTcuMzAwNCA3LjExNzYzQzE3LjAwNiA3LjAyNCAxNi43MDc5IDcuMDMxMjEgMTYuNDEzNSA3LjAzMTIxWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC40Ii8+CjwvZz4KPC9zdmc+Cg==";const km=S("div")({name:"Container",class:"ckff0a9",propsAsIs:!1}),Mm=S("div")({name:"Content",class:"czw1kx1",propsAsIs:!1}),Nm=S("div")({name:"InviteGameIconWrap",class:"i2e7ir3",propsAsIs:!1}),Im=S("img")({name:"InviteGameIcon",class:"i2tfvcu",propsAsIs:!1}),Sm=S("div")({name:"Heading",class:"hnq23ee",propsAsIs:!1}),Am=S("div")({name:"Subtext",class:"s2drh5v",propsAsIs:!1}),Em=S("button")({name:"InvateBtn",class:"iiwwayv",propsAsIs:!1}),bm=({inviteCardTitle:n,inviteCardSubtext:e,primaryColor:t})=>f.jsx(km,{children:f.jsxs(Mm,{children:[f.jsx(Nm,{style:{backgroundColor:t},children:f.jsx(Im,{alt:"invite-game-icon",src:hm})}),f.jsx(Sm,{children:n||""}),f.jsx(Am,{children:e||""}),f.jsx(Em,{onClick:()=>{},style:{backgroundColor:t},children:"Invite friends!"})]})}),Nn={steps:!1,rules:!1,inviteCard:!1},Dm=({gamification:n,closeFeature:e,steps:t,gameIcon:s,sponsorLogo:a,rules:r,rulesBtnLabel:i,rulesTitle:l,primaryColor:m,inviteCardTitle:d,inviteCardSubtext:y,inviteCardBtnLabel:h})=>{const T=async()=>{await n.submitInplay()},M=()=>{e()},[E,D]=Q.useState(0),[L,j]=Q.useState(Nn);Q.useEffect(()=>{t!=null&&t.length?j({...Nn,steps:!0}):r!=null&&r.length?j({...Nn,rules:!0}):j({...Nn,inviteCard:!0})},[]);const R=Q.useCallback(()=>{t!=null&&t.length&&E<t.length-1?D(x=>++x):r!=null&&r.length&&L.steps?j({...Nn,rules:!0}):L.rules&&j({...Nn,inviteCard:!0})},[E,t==null?void 0:t.length,r==null?void 0:r.length,L,D,j]);return f.jsxs(Zu,{children:[f.jsxs(Ju,{children:[f.jsx(Xu,{children:s&&f.jsx(nm,{alt:"sponsor-one-onboarding-icon",src:s})}),f.jsxs(em,{children:[a&&f.jsx(tm,{alt:"sponsor-two-onboarding-icon",src:a}),f.jsx(am,{onClick:M,children:f.jsx(sm,{alt:"icon-close-onboarding",src:Et})})]})]}),f.jsxs(Ku,{children:[L.steps&&(t==null?void 0:t.length)&&f.jsx(um,{graphic:t[E].graphic,headline:t[E].headline}),L.rules&&f.jsx(Tm,{rules:r,rulesTitle:l,primaryColor:m}),L.inviteCard&&f.jsx(bm,{inviteCardTitle:d,inviteCardSubtext:y,primaryColor:m})]}),f.jsx(rm,{onClick:L.inviteCard?T:R,children:L.rules?i||"Got it!":L.inviteCard?h||"Play now!":"Next"})]})},ge=c.makeEnum("streamlayer.interactive.QuestionType",[{no:0,name:"QUESTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_TYPE_POLL",localName:"POLL"},{no:2,name:"QUESTION_TYPE_TRIVIA",localName:"TRIVIA"},{no:3,name:"QUESTION_TYPE_PREDICTION",localName:"PREDICTION"},{no:4,name:"QUESTION_TYPE_FACTOID",localName:"FACTOID"},{no:5,name:"QUESTION_TYPE_TWEET",localName:"TWEET"},{no:6,name:"QUESTION_TYPE_PROMOTION",localName:"PROMOTION"}]),vm=c.makeEnum("streamlayer.interactive.QuestionSource",[{no:0,name:"QUESTION_SOURCE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SOURCE_AI",localName:"AI"},{no:2,name:"QUESTION_SOURCE_CSV_IMPORT",localName:"CSV_IMPORT"}]),Ze=c.makeEnum("streamlayer.interactive.QuestionStatus",[{no:0,name:"QUESTION_STATUS_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_STATUS_NOT_SCHEDULED",localName:"NOT_SCHEDULED"},{no:2,name:"QUESTION_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:3,name:"QUESTION_STATUS_ACTIVE",localName:"ACTIVE"},{no:4,name:"QUESTION_STATUS_RESOLVED",localName:"RESOLVED"}]),wm=c.makeEnum("streamlayer.interactive.QuestionPosition",[{no:0,name:"QUESTION_POSITION_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_POSITION_DEFAULT",localName:"DEFAULT"},{no:2,name:"QUESTION_POSITION_FIXED_BOTTOM",localName:"FIXED_BOTTOM"}]),_m=c.makeEnum("streamlayer.interactive.QuestionLayout",[{no:0,name:"QUESTION_LAYOUT_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_LAYOUT_LIST_VIEW",localName:"LIST_VIEW"},{no:2,name:"QUESTION_LAYOUT_GRID_VIEW",localName:"GRID_VIEW"}]),nn=c.makeEnum("streamlayer.interactive.QuestionImages",[{no:0,name:"QUESTION_IMAGES_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_IMAGES_NONE",localName:"NONE"},{no:2,name:"QUESTION_IMAGES_ROUNDED",localName:"ROUNDED"},{no:3,name:"QUESTION_IMAGES_TRANSPARENT",localName:"TRANSPARENT"},{no:4,name:"QUESTION_IMAGES_CENTERED",localName:"CENTERED"}]),Fi=c.makeEnum("streamlayer.interactive.ImagePosition",[{no:0,name:"IMAGE_POSITION_UNSET",localName:"UNSET"},{no:1,name:"IMAGE_POSITION_LEFT",localName:"LEFT"},{no:2,name:"IMAGE_POSITION_RIGHT",localName:"RIGHT"}]),jm=c.makeEnum("streamlayer.interactive.PromotionType",[{no:0,name:"PROMOTION_TYPE_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_TYPE_INGAME_IAB21",localName:"INGAME_IAB21"},{no:2,name:"PROMOTION_TYPE_INGAME_IAB11",localName:"INGAME_IAB11"},{no:3,name:"PROMOTION_TYPE_INGAME_IAB61",localName:"INGAME_IAB61"}]),Om=c.makeEnum("streamlayer.interactive.PromotionWallet",[{no:0,name:"PROMOTION_WALLET_UNSET",localName:"UNSET"},{no:1,name:"PROMOTION_WALLET_ENABLED",localName:"ENABLED"},{no:2,name:"PROMOTION_WALLET_DISABLED",localName:"DISABLED"}]),Lm=c.makeEnum("streamlayer.interactive.QuestionAutoPostState",[{no:0,name:"QUESTION_AUTO_POST_STATE_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_AUTO_POST_STATE_ON",localName:"ON"},{no:2,name:"QUESTION_AUTO_POST_STATE_OFF",localName:"OFF"},{no:3,name:"QUESTION_AUTO_POST_STATE_PAUSED",localName:"PAUSED"},{no:4,name:"QUESTION_AUTO_POST_STATE_IDLE",localName:"IDLE"}]),Rm=c.makeEnum("streamlayer.interactive.QuestionAutoPostStart",[{no:0,name:"QUESTION_AUTO_POST_START_NONE",localName:"NONE"},{no:1,name:"QUESTION_AUTO_POST_START_TIME",localName:"TIME"}]),xm=c.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),Cm=c.makeEnum("streamlayer.interactive.SilenceSetting",[{no:0,name:"SILENCE_SETTING_UNSET",localName:"UNSET"},{no:1,name:"SILENCE_SETTING_ON",localName:"ON"},{no:2,name:"SILENCE_SETTING_OFF",localName:"OFF"}]),zm=c.makeEnum("streamlayer.interactive.ImportStatus",[{no:0,name:"IMPORT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"IMPORT_STATUS_PLANNED",localName:"PLANNED"},{no:2,name:"IMPORT_STATUS_RUNNING",localName:"RUNNING"},{no:3,name:"IMPORT_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"IMPORT_STATUS_FAILED",localName:"FAILED"}]),qa=c.makeMessageType("streamlayer.interactive.QuestionAppearance",()=>[{no:1,name:"layout",kind:"enum",T:c.getEnumType(_m)},{no:2,name:"images",kind:"enum",T:c.getEnumType(nn)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:c.getEnumType(wm)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),xn=c.makeMessageType("streamlayer.interactive.Sponsorship",()=>[{no:1,name:"logo",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),_t=c.makeMessageType("streamlayer.interactive.QuestionNotification",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9},{no:3,name:"indicator_color",kind:"scalar",T:9},{no:4,name:"image_position",kind:"enum",T:c.getEnumType(Fi)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}]),Um=c.makeMessageType("streamlayer.interactive.QuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13}]),Pm=c.makeMessageType("streamlayer.interactive.ExtendedQuestionAnswer",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"icon",kind:"scalar",T:9},{no:4,name:"correct",kind:"scalar",T:8},{no:5,name:"points",kind:"scalar",T:13},{no:6,name:"percentage",kind:"scalar",T:13},{no:7,name:"you_voted",kind:"scalar",T:8},{no:8,name:"percentage_decimal",kind:"scalar",T:1}]),tn=c.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),Bm=c.makeMessageType("streamlayer.interactive.FileLink",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"thumbnail_url",kind:"scalar",T:9}]),Qm=c.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),Fm=c.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),Gm=c.makeMessageType("streamlayer.interactive.Banner",()=>[{no:1,name:"image_url",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"cta_button",kind:"message",T:Fm}]),Wa=c.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:Ym,oneof:"options"},{no:2,name:"trivia",kind:"message",T:Vm,oneof:"options"},{no:3,name:"prediction",kind:"message",T:$m,oneof:"options"},{no:4,name:"factoid",kind:"message",T:qm,oneof:"options"},{no:5,name:"tweet",kind:"message",T:Wm,oneof:"options"},{no:6,name:"promotion",kind:"message",T:Zm,oneof:"options"}]),Ym=c.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),Vm=c.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:tn},{no:2,name:"incorrect_feedback",kind:"message",T:tn},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),$m=c.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:tn},{no:2,name:"incorrect_feedback",kind:"message",T:tn}],{localName:"QuestionOptions_PredictionOptions"}),qm=c.makeMessageType("streamlayer.interactive.QuestionOptions.FactoidOptions",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"video",kind:"message",T:Bm},{no:4,name:"web_link",kind:"message",T:Qm}],{localName:"QuestionOptions_FactoidOptions"}),Wm=c.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions",()=>[{no:1,name:"tweet_url",kind:"scalar",T:9},{no:2,name:"tweet_id",kind:"scalar",T:9},{no:3,name:"tweet_meta",kind:"message",T:Hm}],{localName:"QuestionOptions_TweetOptions"}),Hm=c.makeMessageType("streamlayer.interactive.QuestionOptions.TweetOptions.TweetMetadata",()=>[{no:1,name:"account",kind:"scalar",T:9},{no:2,name:"account_verified",kind:"scalar",T:8},{no:3,name:"has_media",kind:"scalar",T:8}],{localName:"QuestionOptions_TweetOptions_TweetMetadata"}),Zm=c.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(jm)},{no:2,name:"sponsor",kind:"message",T:xn},{no:3,name:"banner",kind:"message",T:Gm},{no:4,name:"enable_wallet",kind:"enum",T:c.getEnumType(Om)}],{localName:"QuestionOptions_PromotionOptions"}),Km=c.makeMessageType("streamlayer.interactive.Tag",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"last_used_time",kind:"scalar",T:4}]),Jm=c.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),Gi=c.makeMessageType("streamlayer.interactive.Question",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ge)},{no:3,name:"subject",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:Wa},{no:5,name:"appearance",kind:"message",T:qa},{no:6,name:"sponsorship",kind:"message",T:xn},{no:7,name:"notification",kind:"message",T:_t},{no:8,name:"answers",kind:"message",T:Um,repeated:!0},{no:9,name:"status",kind:"enum",T:c.getEnumType(Ze)},{no:10,name:"position",kind:"scalar",T:13,opt:!0},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"overrides",kind:"map",K:9,V:{kind:"scalar",T:8}},{no:15,name:"event_id",kind:"scalar",T:9},{no:16,name:"stream_timestamp",kind:"message",T:Ae},{no:17,name:"tags",kind:"message",T:Km,repeated:!0},{no:18,name:"bypass_notifications",kind:"message",T:Ka},{no:19,name:"import_id",kind:"scalar",T:9},{no:20,name:"activation_trigger_count",kind:"scalar",T:13,opt:!0},{no:21,name:"source",kind:"enum",T:c.getEnumType(vm)},{no:22,name:"ai",kind:"message",T:Jm}]),Ha=c.makeMessageType("streamlayer.interactive.ExtendedQuestion",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ge)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"options",kind:"message",T:Wa},{no:5,name:"appearance",kind:"message",T:qa},{no:6,name:"sponsorship",kind:"message",T:xn},{no:7,name:"notification",kind:"message",T:_t},{no:8,name:"answers",kind:"message",T:Pm,repeated:!0},{no:9,name:"status",kind:"enum",T:c.getEnumType(Ze)},{no:10,name:"position",kind:"scalar",T:13},{no:11,name:"market_closed",kind:"scalar",T:8},{no:12,name:"activated_at",kind:"scalar",T:9},{no:13,name:"answer_set_at",kind:"scalar",T:9},{no:14,name:"event_id",kind:"scalar",T:9},{no:15,name:"bypass_notifications",kind:"message",T:Ka}]);c.makeMessageType("streamlayer.interactive.QuestionTimeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(ge)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"activated_at",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:c.getEnumType(Ze)},{no:6,name:"options",kind:"message",T:Wa},{no:7,name:"notification",kind:"message",T:_t}]);const Yi=c.makeMessageType("streamlayer.interactive.EventModeration",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"sponsorship",kind:"message",T:xn},{no:4,name:"onboarding_enabled",kind:"scalar",T:8},{no:5,name:"question",kind:"message",T:Xm},{no:6,name:"sponsors",kind:"message",T:td},{no:7,name:"notification",kind:"message",T:ad},{no:8,name:"activated_at",kind:"message",T:Ae},{no:9,name:"deactivated_at",kind:"message",T:Ae},{no:10,name:"question_auto_post",kind:"message",T:sd},{no:11,name:"bypass_notifications",kind:"message",T:Ka},{no:12,name:"importer_collaboration",kind:"message",T:pd}]),Xm=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:qa},{no:2,name:"trivia",kind:"message",T:ed},{no:3,name:"prediction",kind:"message",T:nd},{no:4,name:"correct_feedbacks",kind:"message",T:tn,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:tn,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),ed=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),nd=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),td=c.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:xn,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),ad=c.makeMessageType("streamlayer.interactive.EventModeration.NotificationSettings",()=>[{no:1,name:"image",kind:"scalar",T:9},{no:2,name:"indicator_color",kind:"scalar",T:9},{no:3,name:"image_position",kind:"enum",T:c.getEnumType(Fi)},{no:4,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}],{localName:"EventModeration_NotificationSettings"}),sd=c.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:c.getEnumType(Lm)},{no:2,name:"interval",kind:"scalar",T:13},{no:3,name:"next_post_time",kind:"message",T:Ae},{no:4,name:"start_mode",kind:"enum",T:c.getEnumType(Rm)},{no:5,name:"start_options",kind:"message",T:rd}]),rd=c.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:id,oneof:"options"}]),id=c.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions.TimeOptions",()=>[{no:1,name:"timestamp",kind:"scalar",T:4}],{localName:"QuestionAutoPostStartOptions_TimeOptions"});c.makeMessageType("streamlayer.interactive.AnswerData",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13}]);const Za=c.makeMessageType("streamlayer.interactive.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5},{no:3,name:"cursor",kind:"scalar",T:9}]),od=c.makeMessageType("streamlayer.interactive.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.interactive.QuestionStats",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"question",kind:"message",T:cd},{no:3,name:"statistics",kind:"message",T:ld,repeated:!0}]);const cd=c.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:c.getEnumType(Ze)}],{localName:"QuestionStats_QuestionData"}),ld=c.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:ud}]),ud=c.makeMessageType("streamlayer.interactive.AnswerVotesStats.AnswerVotesData",()=>[{no:1,name:"count",kind:"scalar",T:13},{no:2,name:"percentage",kind:"scalar",T:13}],{localName:"AnswerVotesStats_AnswerVotesData"});c.makeMessageType("streamlayer.interactive.ServerNotificationOptions",()=>[{no:1,name:"silence",kind:"scalar",T:8},{no:2,name:"skip_update",kind:"scalar",T:8}]);const Ka=c.makeMessageType("streamlayer.interactive.BypassNotifications",()=>[{no:1,name:"in_app_silence",kind:"enum",T:c.getEnumType(Cm)}]),md=c.makeMessageType("streamlayer.interactive.ImportError",()=>[{no:1,name:"row_id",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}]),dd=c.makeMessageType("streamlayer.interactive.ImportProgress",()=>[{no:1,name:"import_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:c.getEnumType(zm)},{no:3,name:"errors",kind:"message",T:md,repeated:!0},{no:4,name:"last_updated",kind:"message",T:Ae}]),pd=c.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:dd}}]),Gn=c.makeEnum("streamlayer.interactive.feed.PickHistoryStatus",[{no:0,name:"PICK_HISTORY_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PICK_HISTORY_STATUS_WON",localName:"WON"},{no:2,name:"PICK_HISTORY_STATUS_LOST",localName:"LOST"},{no:3,name:"PICK_HISTORY_STATUS_DNP",localName:"DNP"}]),Vi=c.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:Gi},{no:2,name:"notification",kind:"message",T:_t},{no:3,name:"moderation",kind:"message",T:Yi}]),yd=c.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]),gd=c.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:fd}]),fd=c.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse.SubscriptionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Vi}],{localName:"SubscriptionResponse_SubscriptionResponseData"}),Td=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]),hd=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:kd}]),kd=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse.VotingSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ja,repeated:!0}],{localName:"VotingSubscriptionResponse_VotingSubscriptionResponseData"}),Md=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:Ha}]),Nd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),Id=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Sd}]),Sd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse.QuestionSubscriptionResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Md}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),Ad=c.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:Ha}]),Ed=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),bd=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:Dd}]),Dd=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse.QuestionByUserResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ad}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"}),vd=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:wd}]),wd=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"}),_d=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:jd}]),jd=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse.SyncQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Vi}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"}),Od=c.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ld=c.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Rd}]),Rd=c.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse.GetQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Gi}],{localName:"GetQuestionResponse_GetQuestionResponseData"}),xd=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Cd=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:zd}]),zd=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse.QuestionDetailResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ha}],{localName:"QuestionDetailResponse_QuestionDetailResponseData"}),Ja=c.makeMessageType("streamlayer.interactive.feed.AnswerVoteResult",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13},{no:3,name:"voted",kind:"scalar",T:8},{no:4,name:"correct",kind:"scalar",T:8}]),Ud=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:Pd}]),Pd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest.SubmitRequestData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9}],{localName:"SubmitAnswerRequest_SubmitRequestData"}),Bd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:Qd}]),Qd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse.SubmitAnswerResponseData",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ja,repeated:!0}],{localName:"SubmitAnswerResponse_SubmitAnswerResponseData"}),Fd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:Gd}]),Gd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"}),Yd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]),Vd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:$d}]),$d=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:c.getEnumType(xm)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"}),qd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Wd}]),Wd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse.SkipQuestionResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Ja,repeated:!0}],{localName:"SkipQuestionResponse_SkipQuestionResponseData"}),Hd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryRequest",()=>[{no:1,name:"question_type",kind:"enum",T:c.getEnumType(ge),repeated:!0},{no:3,name:"event_id",kind:"scalar",T:9},{no:2,name:"pagination",kind:"message",T:Za}]),Zd=c.makeMessageType("streamlayer.interactive.feed.PickHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"answer_id",kind:"scalar",T:9},{no:3,name:"status",kind:"enum",T:c.getEnumType(Gn)},{no:4,name:"question_type",kind:"enum",T:c.getEnumType(ge)},{no:5,name:"subject",kind:"scalar",T:9},{no:6,name:"text",kind:"scalar",T:9},{no:7,name:"open_for_voting",kind:"scalar",T:8},{no:8,name:"question_status",kind:"enum",T:c.getEnumType(Ze)}]),Kd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Jd,repeated:!0},{no:2,name:"meta",kind:"message",T:Xd}]),Jd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Zd}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),Xd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseMetadata",()=>[{no:1,name:"total",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"PickHistoryResponse_PickHistoryResponseMetadata"}),ep=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),np=c.makeMessageType("streamlayer.interactive.feed.InsightHistory",()=>[{no:1,name:"question_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}]),tp=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:ap,repeated:!0}]),ap=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse.InsightHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:np}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"}),sp=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),rp=c.makeMessageType("streamlayer.interactive.feed.TweetHistory",()=>[{no:1,name:"tweet_id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9},{no:4,name:"body",kind:"scalar",T:9},{no:5,name:"account",kind:"scalar",T:9},{no:6,name:"account_verified",kind:"scalar",T:8}]),ip=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:op,repeated:!0}]),op=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse.TweetHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:rp}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),cp=c.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:lp},{no:3,name:"moderation",kind:"message",T:Yi}]),lp=c.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]),up=c.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),mp=c.makeMessageType("streamlayer.interactive.feed.GetResponse",()=>[{no:1,name:"data",kind:"message",T:dp}]),dp=c.makeMessageType("streamlayer.interactive.feed.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cp}],{localName:"GetResponse_GetResponseData"}),pp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),yp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistory",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:9}]),gp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:fp,repeated:!0}]),fp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse.PromotionHistoryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yp}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),Tp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameAppearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}]),hp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameMedia",()=>[{no:1,name:"game_icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),kp=c.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),Mp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameOverview",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"auto_activate",kind:"scalar",T:8},{no:4,name:"scoring",kind:"scalar",T:8},{no:5,name:"media",kind:"message",T:hp},{no:6,name:"appearance",kind:"message",T:Tp},{no:7,name:"prizes",kind:"message",T:kp,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),Np=c.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),Ip=c.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),Sp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameTitleCard",()=>[{no:1,name:"visible",kind:"scalar",T:8},{no:2,name:"opt_in",kind:"scalar",T:8},{no:3,name:"title",kind:"scalar",T:9},{no:4,name:"subtitle",kind:"scalar",T:9},{no:5,name:"header",kind:"scalar",T:9},{no:6,name:"media",kind:"message",T:Np},{no:7,name:"appearance",kind:"message",T:Ip},{no:8,name:"completed",kind:"scalar",T:8}]),Ap=c.makeMessageType("streamlayer.sdkSettings.game.common.OnboardingStep",()=>[{no:1,name:"headline",kind:"scalar",T:9},{no:2,name:"body",kind:"scalar",T:9},{no:3,name:"graphic",kind:"scalar",T:9}]),Ep=c.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:Ap,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),bp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameRules",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"button_label",kind:"scalar",T:9},{no:4,name:"numbers_color",kind:"scalar",T:9},{no:5,name:"rules",kind:"scalar",T:9,repeated:!0},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"terms",kind:"scalar",T:9},{no:8,name:"terms_url",kind:"scalar",T:9}]),Dp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameInviteCard",()=>[{no:1,name:"heading",kind:"scalar",T:9},{no:2,name:"typeface",kind:"scalar",T:9},{no:3,name:"subtext",kind:"scalar",T:9},{no:4,name:"button_label",kind:"scalar",T:9},{no:5,name:"icon_color",kind:"scalar",T:9},{no:6,name:"terms",kind:"scalar",T:9},{no:7,name:"completed",kind:"scalar",T:8}]),vp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:Mp},{no:2,name:"title_card",kind:"message",T:Sp},{no:3,name:"onboarding",kind:"message",T:Ep},{no:4,name:"rules",kind:"message",T:bp},{no:5,name:"invite_card",kind:"message",T:Dp},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),wp=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationGeneral",()=>[{no:1,name:"default_color",kind:"scalar",T:9},{no:2,name:"points",kind:"scalar",T:13},{no:3,name:"auto_hide_interval",kind:"scalar",T:4},{no:4,name:"insights_history_enabled",kind:"scalar",T:8},{no:5,name:"pick_history_enabled",kind:"scalar",T:8},{no:6,name:"correct_feedbacks",kind:"message",T:tn,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:tn,repeated:!0}]),_p=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationNotifications",()=>[{no:1,name:"default_image",kind:"scalar",T:9},{no:2,name:"image_mode",kind:"enum",T:c.getEnumType(nn)}]),jp=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSponsorships",()=>[{no:1,name:"rotate",kind:"scalar",T:8},{no:2,name:"no_sponsor",kind:"scalar",T:8},{no:3,name:"sponsors",kind:"message",T:xn,repeated:!0}]),Op=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:wp},{no:2,name:"notifications",kind:"message",T:_p},{no:3,name:"sponsorships",kind:"message",T:jp}]),ve=c.makeEnum("streamlayer.sdkSettings.SdkOverlayType",[{no:0,name:"SDK_OVERLAY_TYPE_UNSET",localName:"UNSET"},{no:1,name:"SDK_OVERLAY_TYPE_INPLAY",localName:"INPLAY"},{no:2,name:"SDK_OVERLAY_TYPE_MESSAGING",localName:"MESSAGING"},{no:3,name:"SDK_OVERLAY_TYPE_STATISTICS",localName:"STATISTICS"},{no:4,name:"SDK_OVERLAY_TYPE_BETTING",localName:"BETTING"},{no:5,name:"SDK_OVERLAY_TYPE_TWITTER",localName:"TWITTER"},{no:6,name:"SDK_OVERLAY_TYPE_MERCHANDISE",localName:"MERCHANDISE"},{no:7,name:"SDK_OVERLAY_TYPE_CONTESTS",localName:"CONTESTS"},{no:8,name:"SDK_OVERLAY_TYPE_VOICE_CHAT",localName:"VOICE_CHAT"},{no:9,name:"SDK_OVERLAY_TYPE_TICKETS",localName:"TICKETS"},{no:10,name:"SDK_OVERLAY_TYPE_WHOIS_WATCHING",localName:"WHOIS_WATCHING"},{no:11,name:"SDK_OVERLAY_TYPE_PROFILE",localName:"PROFILE"},{no:12,name:"SDK_OVERLAY_TYPE_GAMES",localName:"GAMES"},{no:13,name:"SDK_OVERLAY_TYPE_GOLF_STATISTICS",localName:"GOLF_STATISTICS"},{no:14,name:"SDK_OVERLAY_TYPE_HIGHLIGHTS",localName:"HIGHLIGHTS"},{no:15,name:"SDK_OVERLAY_TYPE_PUBLIC_CHAT",localName:"PUBLIC_CHAT"}]),Lp=c.makeEnum("streamlayer.sdkSettings.BettingFavoriteType",[{no:0,name:"BETTING_FAVORITE_TYPE_UNSET",localName:"UNSET"},{no:1,name:"BETTING_FAVORITE_TYPE_LEAGUE",localName:"LEAGUE"},{no:2,name:"BETTING_FAVORITE_TYPE_TEAM",localName:"TEAM"}]),Rp=c.makeEnum("streamlayer.sdkSettings.BettingSettingsTextColor",[{no:0,name:"BETTING_SETTINGS_TEXT_COLOR_UNSET",localName:"UNSET"},{no:1,name:"BETTING_SETTINGS_TEXT_COLOR_PRIMARY",localName:"PRIMARY"},{no:2,name:"BETTING_SETTINGS_TEXT_COLOR_GREY",localName:"GREY"},{no:3,name:"BETTING_SETTINGS_TEXT_COLOR_CUSTOM",localName:"CUSTOM"}]),Xa=c.makeEnum("streamlayer.sdkSettings.GetStreamChannelType",[{no:0,name:"GETSTREAM_CHANNEL_TYPE_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_TYPE_LIVESTREAM"},{no:2,name:"GETSTREAM_CHANNEL_TYPE_MESSAGING"},{no:3,name:"GETSTREAM_CHANNEL_TYPE_TEAM"},{no:4,name:"GETSTREAM_CHANNEL_TYPE_COMMERCE"},{no:5,name:"GETSTREAM_CHANNEL_TYPE_GAMING"},{no:6,name:"GETSTREAM_CHANNEL_TYPE_CUSTOM"}]),xp=c.makeEnum("streamlayer.sdkSettings.GetStreamChannelDefault",[{no:0,name:"GETSTREAM_CHANNEL_DEFAULT_UNSET"},{no:1,name:"GETSTREAM_CHANNEL_DEFAULT_TRUE"},{no:2,name:"GETSTREAM_CHANNEL_DEFAULT_FALSE"}]),$i=c.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),Cp=c.makeEnum("streamlayer.sdkSettings.LeaderboardKind",[{no:0,name:"LEADERBOARD_KIND_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_KIND_GLOBAL",localName:"GLOBAL"},{no:2,name:"LEADERBOARD_KIND_FRIENDS",localName:"FRIENDS"}]),zp=c.makeEnum("streamlayer.sdkSettings.PresetRuleKey",[{no:0,name:"PRESET_RULE_KEY_UNSET",localName:"UNSET"},{no:1,name:"PRESET_RULE_KEY_SPORT",localName:"SPORT"},{no:2,name:"PRESET_RULE_KEY_LEAGUE",localName:"LEAGUE"},{no:3,name:"PRESET_RULE_KEY_TEAMS",localName:"TEAMS"}]),Up=c.makeEnum("streamlayer.sdkSettings.AdvertisingPlacement",[{no:0,name:"ADVERTISING_PLACEMENT_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_PLACEMENT_DEFAULT",localName:"DEFAULT"},{no:2,name:"ADVERTISING_PLACEMENT_WATCHPARTY_FULLSIZE",localName:"WATCHPARTY_FULLSIZE"},{no:3,name:"ADVERTISING_PLACEMENT_WATCHPARTY_VIDEOPANEL",localName:"WATCHPARTY_VIDEOPANEL"},{no:4,name:"ADVERTISING_PLACEMENT_OVERLAY_NAVBAR",localName:"OVERLAY_NAVBAR"}]);c.makeEnum("streamlayer.sdkSettings.AdvertisingType",[{no:0,name:"ADVERTISING_TYPE_UNSET",localName:"UNSET"},{no:1,name:"ADVERTISING_TYPE_SPONSORS",localName:"SPONSORS"},{no:2,name:"ADVERTISING_TYPE_INTERSTITIALS",localName:"INTERSTITIALS"},{no:3,name:"ADVERTISING_TYPE_BANNERS",localName:"BANNERS"}]);const Pp=c.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),Bp=c.makeMessageType("streamlayer.sdkSettings.BettingFavorite",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"icon",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"type",kind:"enum",T:c.getEnumType(Lp)}]),Qp=c.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),qi=c.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:Fp}]),Fp=c.makeMessageType("streamlayer.sdkSettings.BrandDefaults.Appearance",()=>[{no:1,name:"primary_color",kind:"scalar",T:9},{no:2,name:"secondary_color",kind:"scalar",T:9},{no:3,name:"accent_color",kind:"scalar",T:9}],{localName:"BrandDefaults_Appearance"}),qs=c.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:Bp,repeated:!0},{no:2,name:"primary_color",kind:"scalar",T:9},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"text_color",kind:"enum",T:c.getEnumType(Rp)},{no:5,name:"app_installed_text",kind:"scalar",T:9},{no:6,name:"app_not_installed_text",kind:"scalar",T:9},{no:7,name:"text_color_custom",kind:"scalar",T:9},{no:8,name:"cta_image",kind:"message",T:Qp}]),Gp=c.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:c.getEnumType($i)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:5,name:"default_channel_type",kind:"enum",T:c.getEnumType(Xa)}]),Tt=c.makeMessageType("streamlayer.sdkSettings.GetStreamChannel",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"channel_id",kind:"scalar",T:9},{no:4,name:"channel_type",kind:"enum",T:c.getEnumType(Xa)},{no:5,name:"is_default",kind:"enum",T:c.getEnumType(xp)}]),Yp=c.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:c.getEnumType($i)},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"app_id",kind:"scalar",T:9},{no:4,name:"default_channel_type",kind:"enum",T:c.getEnumType(Xa)},{no:5,name:"default_channel",kind:"message",T:Tt},{no:6,name:"channels",kind:"message",T:Tt,repeated:!0}]),Wi=c.makeMessageType("streamlayer.sdkSettings.StreamSettings",()=>[{no:1,name:"overlays",kind:"message",T:jt,repeated:!0},{no:2,name:"custom",kind:"scalar",T:8},{no:3,name:"button_icon",kind:"scalar",T:9},{no:4,name:"primary_color",kind:"scalar",T:9},{no:5,name:"secondary_color",kind:"scalar",T:9},{no:6,name:"moderation_primary_color",kind:"scalar",T:9},{no:7,name:"link_share_icon",kind:"scalar",T:9},{no:8,name:"link_share_text",kind:"scalar",T:9},{no:9,name:"brand_defaults",kind:"message",T:qi},{no:10,name:"getstream",kind:"message",T:Yp}]),Vp=c.makeMessageType("streamlayer.sdkSettings.JWK",()=>[{no:1,name:"alg",kind:"scalar",T:9,opt:!0},{no:2,name:"crv",kind:"scalar",T:9,opt:!0},{no:3,name:"d",kind:"scalar",T:9,opt:!0},{no:4,name:"dp",kind:"scalar",T:9,opt:!0},{no:5,name:"dq",kind:"scalar",T:9,opt:!0},{no:6,name:"e",kind:"scalar",T:9,opt:!0},{no:7,name:"ext",kind:"scalar",T:8,opt:!0},{no:8,name:"k",kind:"scalar",T:9,opt:!0},{no:9,name:"key_ops",kind:"scalar",T:9,repeated:!0},{no:10,name:"kid",kind:"scalar",T:9,opt:!0},{no:11,name:"kty",kind:"scalar",T:9,opt:!0},{no:12,name:"n",kind:"scalar",T:9,opt:!0},{no:13,name:"oth",kind:"message",T:$p,repeated:!0},{no:14,name:"p",kind:"scalar",T:9,opt:!0},{no:15,name:"q",kind:"scalar",T:9,opt:!0},{no:16,name:"qi",kind:"scalar",T:9,opt:!0},{no:17,name:"use",kind:"scalar",T:9,opt:!0},{no:18,name:"x",kind:"scalar",T:9,opt:!0},{no:19,name:"y",kind:"scalar",T:9,opt:!0},{no:20,name:"x5c",kind:"scalar",T:9,repeated:!0},{no:21,name:"x5t",kind:"scalar",T:9,opt:!0},{no:22,name:"x5u",kind:"scalar",T:9,opt:!0}]),$p=c.makeMessageType("streamlayer.sdkSettings.JWK.OTH",()=>[{no:1,name:"d",kind:"scalar",T:9,opt:!0},{no:2,name:"r",kind:"scalar",T:9,opt:!0},{no:3,name:"t",kind:"scalar",T:9,opt:!0}],{localName:"JWK_OTH"}),Hi=c.makeMessageType("streamlayer.sdkSettings.OrganizationSettings",()=>[{no:1,name:"overlays",kind:"message",T:jt,repeated:!0},{no:2,name:"button_icon",kind:"scalar",T:9},{no:3,name:"tinode_host",kind:"scalar",T:9},{no:4,name:"audience",kind:"scalar",T:9},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"provider",kind:"scalar",T:9},{no:7,name:"primary_color",kind:"scalar",T:9},{no:8,name:"secondary_color",kind:"scalar",T:9},{no:9,name:"moderation_primary_color",kind:"scalar",T:9},{no:10,name:"link_share_icon",kind:"scalar",T:9},{no:11,name:"link_share_text",kind:"scalar",T:9},{no:12,name:"brand_defaults",kind:"message",T:qi},{no:13,name:"pub",kind:"message",T:Vp},{no:14,name:"getstream",kind:"message",T:Gp}]),qp=c.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:vp},{no:2,name:"moderation",kind:"message",T:Op},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:c.getEnumType(Cp)}]),Ws=c.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:Tt},{no:2,name:"channels",kind:"message",T:Tt,repeated:!0}]),Dn=c.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:Pp,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:qs,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:qs,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:qp,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:Ws,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:Ws,oneof:"overlay_settings"}]),Wp=c.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:Dn},{no:2,name:"global_preset",kind:"message",T:Dn},{no:3,name:"preset",kind:"message",T:Dn},{no:4,name:"stream",kind:"message",T:Dn}]),jt=c.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(ve)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:Dn},{no:6,name:"meta",kind:"message",T:Wp},{no:7,name:"enable",kind:"scalar",T:8},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:14,name:"enable_sdk_button",kind:"scalar",T:8}]);c.makeMessageType("streamlayer.sdkSettings.SdkOverlayUpdateData",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(ve)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:Dn},{no:8,name:"sdk_enable",kind:"scalar",T:8},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"icon",kind:"scalar",T:9},{no:11,name:"svg_icon",kind:"scalar",T:9},{no:12,name:"enable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"},{no:13,name:"disable_overwrite",kind:"scalar",T:9,oneof:"overwrite_flag"}]);c.makeMessageType("streamlayer.sdkSettings.OverlaysListRequest",[]);c.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse",()=>[{no:1,name:"data",kind:"message",T:Hp}]);const Hp=c.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse.OverlaysListResponseData",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:jt,repeated:!0}],{localName:"OverlaysListResponse_OverlaysListResponseData"});c.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Zp}]);const Zp=c.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse.GenerateSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateSdkKeyResponse_GenerateSdkKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Kp}]);const Kp=c.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse.RemoveSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveSdkKeyResponse_RemoveSdkKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.ListSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Jp}]);const Jp=c.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse.ListSdkKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"ListSdkKeyResponse_ListSdkKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.RegisterTwitterRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"stream_id",kind:"scalar",T:9},{no:3,name:"account",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.RegisterTwitterResponse",[]);c.makeMessageType("streamlayer.sdkSettings.Preset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:ey},{no:3,name:"settings",kind:"message",T:Xp}]);const Xp=c.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:jt,repeated:!0},{no:2,name:"advertising",kind:"message",T:Zi}]),ey=c.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:c.getEnumType(zp)},{no:2,name:"value",kind:"scalar",T:9}]),ny=c.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:Hs},{no:2,name:"videos",kind:"message",T:Hs}]),Hs=c.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraint",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5},{no:3,name:"max_file_size",kind:"scalar",T:1},{no:4,name:"mime",kind:"scalar",T:9}]),ty=c.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplate",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"constraints",kind:"map",K:9,V:{kind:"message",T:ny}}]);c.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:ty,repeated:!0}]);const ay=c.makeMessageType("streamlayer.sdkSettings.AdvertisingImage",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"placement",kind:"enum",T:c.getEnumType(Up)}]),sy=c.makeMessageType("streamlayer.sdkSettings.AdvertisingVideo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"preview_url",kind:"scalar",T:9},{no:3,name:"file_url",kind:"scalar",T:9},{no:4,name:"background_color",kind:"scalar",T:9}]),ry=c.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:ay,repeated:!0},{no:3,name:"videos",kind:"message",T:sy,repeated:!0}]),iy=c.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:c.getEnumType(ve)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:ry}},{no:3,name:"enabled",kind:"scalar",T:8},{no:4,name:"overlay_name",kind:"scalar",T:9},{no:5,name:"use_custom",kind:"scalar",T:8,opt:!0}]),Zi=c.makeMessageType("streamlayer.sdkSettings.Advertising",()=>[{no:1,name:"template_id",kind:"scalar",T:9},{no:2,name:"overlay_settings",kind:"map",K:9,V:{kind:"message",T:iy}}]);c.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:oy}]);const oy=c.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse.GenerateApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GenerateApiKeyResponse_GenerateApiKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"token",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:cy}]);const cy=c.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse.RemoveApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9,repeated:!0}],{localName:"RemoveApiKeyResponse_RemoveApiKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.GetApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:ly}]);const ly=c.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse.GetApiKeyResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyResponse_GetApiKeyResponseData"});c.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse",()=>[{no:1,name:"data",kind:"message",T:uy}]);const uy=c.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse.GetApiKeyStudioResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"scalar",T:9}],{localName:"GetApiKeyStudioResponse_GetApiKeyStudioResponseData"}),my="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMTQuODA2MSA2LjczNjg0IDE2IDUuNjA1NzcgMTYgNC4yMTA1M1YyLjUyNjMyQzE2IDEuMTMxMDcgMTQuODA2MSAwIDEzLjMzMzMgMEgyLjY2NjY3Wk00LjQ0NDQ2IDEwLjk0NzNIMTMuMzMzM0MxMy44MjQzIDEwLjk0NzMgMTQuMjIyMiAxMS4zMjQzIDE0LjIyMjIgMTEuNzg5NFYxMy40NzM2QzE0LjIyMjIgMTMuOTM4NyAxMy44MjQzIDE0LjMxNTcgMTMuMzMzMyAxNC4zMTU3SDQuNDQ0NDZWMTAuOTQ3M1pNMCAxMS43ODk0QzAgMTAuMzk0MiAxLjE5MzkxIDkuMjYzMSAyLjY2NjY3IDkuMjYzMUgxMy4zMzMzQzE0LjgwNjEgOS4yNjMxIDE2IDEwLjM5NDIgMTYgMTEuNzg5NFYxMy40NzM2QzE2IDE0Ljg2ODkgMTQuODA2MSAxNS45OTk5IDEzLjMzMzMgMTUuOTk5OUgyLjY2NjY3QzEuMTkzOTEgMTUuOTk5OSAwIDE0Ljg2ODkgMCAxMy40NzM2VjExLjc4OTRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KPC9nPgo8L3N2Zz4K",dy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1ByZWRpY2l0b24iPgo8cGF0aCBpZD0iSWNvbi9QcmVkaWN0aW9uIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE2IDcuMDA1MjJDMTYgNy4wMDUyMiA5LjIwMDQ4IDYuODE2MDcgOS4yMDA0OCAwQzkuMjAwNDggNi4zNjE2OCAzLjI3NzI5IDYuOTUwNTYgMi40ODc1NiA3LjAwMDc4TDIuNDAwOTQgNy4wMDUyMkMyLjQwMDk0IDcuMDA1MjIgOS4yMDA0OCA3LjE5NDM1IDkuMjAwNDggMTQuMDEwNEM5LjIwMDQ4IDcuNjQ4NzcgMTUuMTIzNCA3LjA1OTg5IDE1LjkxMzEgNy4wMDk2NEwxNiA3LjAwNTIyWk02Ljk3MzgyIDEyLjU2NTJDNi45NzM4MiAxMi41NjUyIDMuNDg2OTEgMTIuNDcyNCAzLjQ4NjkxIDkuMTMwMzNDMy40ODY5MSAxMi4yNDk2IDAuNDQ5NDAyIDEyLjUzODQgMC4wNDQ0MTg2IDEyLjU2M0wwIDEyLjU2NTJDMCAxMi41NjUyIDMuNDg2OTEgMTIuNjU3OSAzLjQ4NjkxIDE2QzMuNDg2OTEgMTIuODgwNyA2LjUyNDI5IDEyLjU5MiA2LjkyOTI3IDEyLjU2NzNMNi45NzM4MiAxMi41NjUyWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",py="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1RyaXZpYSI+CjxwYXRoIGlkPSJOb3RpZmljYXRpb24vSWNvbi9Ucml2aWEiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi4wMTY2MyAxLjM4MDhDMC43Mzk5MTMgMS41NTU4NiAtMC4xNTMxNTMgMi43MzI3NiAwLjAyMTkxMiA0LjAwOTQ4TDEuMzgwOCAxMy45MTk2QzEuNTU1ODYgMTUuMTk2MyAyLjczMjc2IDE2LjA4OTQgNC4wMDk0OCAxNS45MTQzTDEzLjkxOTYgMTQuNTU1NEMxNS4xOTYzIDE0LjM4MDMgMTYuMDg5NCAxMy4yMDM0IDE1LjkxNDMgMTEuOTI2N0wxNC41NTU0IDIuMDE2NjNDMTQuMzgwMyAwLjczOTkxMyAxMy4yMDM0IC0wLjE1MzE1MyAxMS45MjY3IDAuMDIxOTEyTDIuMDE2NjMgMS4zODA4Wk05LjU5NjEzIDMuNzg4QzkuMTE0MzEgMy40Njk5MSA4LjQ3ODEzIDMuMzAxNTEgNy43NTY2IDMuMzAxNTFDNy41NDM3NyAzLjMwMTUxIDcuMzI2MjUgMy4zMTY3MSA3LjEwODcyIDMuMzQ0NzhDNi4zODgzNiAzLjQ0MDY3IDUuNjg5MDEgMy43OTAzNCA1LjE4OTY1IDQuMzAxMzhDNC42ODQ0NSA0LjgyMDYyIDQuNDM3NyA1LjQ1NTYzIDQuNTE3MjIgNi4wNDE1MUM0LjU3NDUyIDYuNDc0MiA0LjkwMDc4IDYuNzUzNyA1LjM0NjM1IDYuNzUzN0M1LjM5NDI5IDYuNzUzNyA1LjQ0MzQxIDYuNzUwMiA1LjQ5MTM2IDYuNzQ0MzVDNi4wODc3OCA2LjY2NDgzIDYuMjE2NDIgNi4yNTQzNiA2LjM0MDM2IDUuODU2NzVMNi4zNDA0NSA1Ljg1NjQ4QzYuNDgxOTIgNS40MDQwMSA2LjYxNTM0IDQuOTc3MzEgNy4zODU4NSA0Ljg3NDQ0QzcuNDY1MzcgNC44NjM5MSA3LjU0MTM4IDQuODU4MDYgNy42MTUwNiA0Ljg1ODA2QzguMTY5MzkgNC44NTgwNiA4LjUxNDM2IDUuMTUwNDIgOC41ODQ1NCA1LjY4MjUyQzguNjUzNTMgNi4yMDI5MyA4LjI0MzA3IDYuNjE4MDcgNy44MDY4NCA3LjA1NjZMNy44MDM5MyA3LjA1OTU0QzcuMzE1ODIgNy41NTIzMSA2Ljc2MzkgOC4xMDk1IDYuODY4OTUgOC45MDA4M0M2Ljg5NTg1IDkuMTA1NDggNi45ODU5IDkuMjk0OTMgNy4xMjI3MiA5LjQzNjQ0QzcuMjc4MjYgOS41OTkgNy40ODI5IDkuNjg0MzYgNy43MTMzMSA5LjY4NDM2QzcuNzU1NDEgOS42ODQzNiA3Ljc5ODY4IDkuNjgyMDMgNy44NDMxMSA5LjY3NjE4QzguNDY2OTEgOS41OTMyNCA4LjU1MTYyIDkuMjMxMzkgOC42MzMzOCA4Ljg4MjFMOC42MzM2NSA4Ljg4MDk3TDguNjM2NjEgOC44Njg1OUM4LjY2NzIzIDguNzQwMyA4LjY5ODc3IDguNjA4MTMgOC43NTk5NSA4LjQ4ODA0QzguODQ2NDkgOC4zMTYxMyA5LjA2MjgzIDguMTEyNjUgOS4zMTQyOCA3Ljg3ODc1QzkuOTE0MiA3LjMxODU4IDEwLjczNCA2LjU1MTQzIDEwLjU4MiA1LjQxNTg5QzEwLjQ4NzIgNC43MDYwMyAxMC4xNTUxIDQuMTU3NTcgOS41OTYxMSAzLjc4ODAyTDkuNTk2MTMgMy43ODhaTTguMTE2MDUgMTAuMjhDOC4wNjkyNyAxMC4yOCA4LjAyMTMyIDEwLjI4MzYgNy45NzQ1NCAxMC4yODk0QzcuMzgzOTYgMTAuMzY4OSA2Ljk2NzY1IDEwLjkxMjcgNy4wNDU5OSAxMS41MDMzQzcuMTE3MzMgMTIuMDM3NyA3LjU3ODA4IDEyLjQ0MTIgOC4xMTcyIDEyLjQ0MTJDOC4xNjM5NyAxMi40NDEyIDguMjExOTIgMTIuNDM3NyA4LjI1OTg3IDEyLjQzMThDOC44NTA0NSAxMi4zNTIzIDkuMjY1NiAxMS44MDg1IDkuMTg4NDIgMTEuMjE3OUM5LjExNTkxIDEwLjY4MjMgOC42NTUxNyAxMC4yOCA4LjExNjA1IDEwLjI4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",yy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEzLjQzMTUgMy4xODI0Nkw1LjUzMzIxIDExLjA4MDhMMS45OTc3MSA3LjU0NTI3QzEuNTQwNTYgNy4wODgxMSAwLjc5OTkxMyA3LjA4ODExIDAuMzQyODY0IDcuNTQ1MjdDLTAuMTE0Mjg4IDguMDAyNDIgLTAuMTE0Mjg4IDguNzQzMDcgMC4zNDI4NjQgOS4yMDAxMUw0LjcwNTY3IDEzLjU2MjlDNC45MzMzMSAxMy43OTA2IDUuMjM0MTUgMTMuOTA2MyA1LjUzMzA3IDEzLjkwNjNDNS44MzIwMiAxMy45MDYzIDYuMTMwOTYgMTMuNzkyNCA2LjM2MDQ4IDEzLjU2MjlMMTUuMDg2MSA0LjgzNzMxQzE1LjU0MzIgNC4zODAxNiAxNS41NDMyIDMuNjM5NTEgMTUuMDg2MSAzLjE4MjQ2QzE0LjYyOSAyLjcyNTMxIDEzLjg4ODQgMi43MjUzMSAxMy40MzEyIDMuMTgyNDZIMTMuNDMxNVoiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",gy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIyIiB5PSIwLjUwNjEwNCIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDIgMC41MDYxMDQpIiBmaWxsPSIjOWUwYTFmIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB4PSIwLjMzMzAwOCIgeT0iMTIuMTcyOSIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwLjMzMzAwOCAxMi4xNzI5KSIgZmlsbD0iIzllMGExZiIvPgo8L2c+Cjwvc3ZnPgo=",va="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const fy=S("div")({name:"Panel",class:"p1fl4kim",propsAsIs:!1}),Ty=S("div")({name:"QuestionTypeIconWrap",class:"qqhwgfn",propsAsIs:!1}),hy=S("img")({name:"QuestionTypeIcon",class:"q1lyf5nv",propsAsIs:!1}),ky=S("div")({name:"QuestionContent",class:"qlmoky7",propsAsIs:!1}),My=S("div")({name:"QuestionTypeLabel",class:"qp1y7hu",propsAsIs:!1}),Ny=S("div")({name:"QuestionSubject",class:"q1de583k",propsAsIs:!1}),Iy=S("button")({name:"QuestionActionTitle",class:"ql7tvph",propsAsIs:!1}),Sy=S("button")({name:"QuestionActionIcon",class:"qh0ibjl",propsAsIs:!1}),Ay=S("img")({name:"QuestionStatusIcon",class:"q1bdpn1b",propsAsIs:!1}),Ey=S("span")({name:"QuestionTypeTitle",class:"q6tdooc",propsAsIs:!1}),by=S("span")({name:"ExpiredQuestion",class:"e1f2al71",propsAsIs:!1}),Dy={[ge.POLL]:{label:"Poll",icon:my},[ge.TRIVIA]:{label:"Trivia",icon:py},[ge.PREDICTION]:{label:"Prediction",icon:dy}},vy={[Gn.LOST]:gy,[Gn.WON]:yy,[Gn.UNSET]:va,[Gn.DNP]:va},wy=({questionId:n,questionType:e,questionStatus:t,subject:s,openForVoting:a,openQuestion:r,status:i})=>{const l=Dy[e];return l===void 0?null:f.jsxs(fy,{onClick:()=>r==null?void 0:r(n),children:[f.jsx(Ty,{children:f.jsx(hy,{alt:"question-type-icon",src:l.icon})}),f.jsxs(ky,{children:[f.jsxs(My,{children:[f.jsx(Ey,{children:l.label}),e===ge.TRIVIA&&t===Ze.RESOLVED&&f.jsx(by,{children:"Expired"})]}),f.jsx(Ny,{children:s||""})]}),a?f.jsx(Iy,{children:"play"}):f.jsx(Sy,{children:f.jsx(Ay,{alt:"question-status-icon",src:vy[i]})})]})};const _y=S("div")({name:"Container",class:"c4iwna9",propsAsIs:!1}),jy=S("div")({name:"Title",class:"th1ieuk",propsAsIs:!1}),Oy=S("div")({name:"ItemsContainer",class:"iiqbvdu",propsAsIs:!1}),Ly=({questions:n,openQuestion:e})=>f.jsxs(_y,{children:[f.jsx(jy,{children:"PICK HISTORY"}),f.jsx(Oy,{children:n==null?void 0:n.map(t=>f.jsx(wy,{openQuestion:e,...t},t.questionId))})]}),Ry="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0LjU1OTkyIDEwLjg0OTcgNC45NDY2MyAxMC4zOTUzIDUuMzQ3NjhDOS45NDEgNS43NDg3MiA5LjM3NDkgNi4wMTg0NyA4LjY5NzAxIDYuMTU2OTJDOS4wNTI3OCA1LjM4MzQ4IDkuMjMwNjYgNC40OTc4NiA5LjIzMDY2IDMuNTAwMDJIMTEuMDc2OFpNMTIgNC4xODc1VjMuMjcwODNDMTIgMy4wNzk4NiAxMS45MzI3IDIuOTE3NTQgMTEuNzk4MSAyLjc4Mzg1QzExLjY2MzUgMi42NTAxNyAxMS41IDIuNTgzMzMgMTEuMzA3NyAyLjU4MzMzSDkuMjMwNzdWMS44OTU4M0M5LjIzMDc3IDEuNTgwNzMgOS4xMTc3OSAxLjMxMDk4IDguODkxODMgMS4wODY1OUM4LjY2NTg2IDAuODYyMTk1IDguMzk0MjMgMC43NSA4LjA3NjkyIDAuNzVIMy45MjMwOEMzLjYwNTc3IDAuNzUgMy4zMzQxNCAwLjg2MjE5NSAzLjEwODE3IDEuMDg2NTlDMi44ODIyMSAxLjMxMDk4IDIuNzY5MjMgMS41ODA3MyAyLjc2OTIzIDEuODk1ODNWMi41ODMzM0gwLjY5MjMwOEMwLjQ5OTk5OSAyLjU4MzMzIDAuMzM2NTM5IDIuNjUwMTcgMC4yMDE5MjMgMi43ODM4NUMwLjA2NzMwNyAyLjkxNzU0IDAgMy4wNzk4NiAwIDMuMjcwODNWNC4xODc1QzAgNC41MjY0OCAwLjA5OTc1ODYgNC44Njc4NCAwLjI5OTI3OSA1LjIxMTU5QzAuNDk4Nzk5IDUuNTU1MzQgMC43NjgwMjcgNS44NjU2NyAxLjEwNjk3IDYuMTQyNThDMS40NDU5MiA2LjQxOTQ5IDEuODYxNzggNi42NTIyMyAyLjM1NDU3IDYuODQwODJDMi44NDczNiA3LjAyOTQxIDMuMzY1MzggNy4xMzU2MyAzLjkwODY1IDcuMTU5NTFDNC4xMTA1OCA3LjQxNzMyIDQuMzM4OTQgNy42NDQxIDQuNTkzNzUgNy44Mzk4NEM0Ljc3NjQ0IDguMDAyMTcgNC45MDI2NCA4LjE3NTI0IDQuOTcyMzYgOC4zNTkwNUM1LjA0MjA3IDguNTQyODYgNS4wNzY5MiA4Ljc1NjUxIDUuMDc2OTIgOUM1LjA3NjkyIDkuMjU3ODEgNS4wMDM2MSA5LjQ3NTA0IDQuODU2OTcgOS42NTE2OUM0LjcxMDM0IDkuODI4MzQgNC40NzU5NiA5LjkxNjY3IDQuMTUzODUgOS45MTY2N0MzLjc5MzI3IDkuOTE2NjcgMy40NzIzNiAxMC4wMjUzIDMuMTkxMTEgMTAuMjQyNUMyLjkwOTg1IDEwLjQ1OTcgMi43NjkyMyAxMC43MzMxIDIuNzY5MjMgMTEuMDYyNVYxMS41MjA4QzIuNzY5MjMgMTEuNTg3NyAyLjc5MDg3IDExLjY0MjYgMi44MzQxMyAxMS42ODU1QzIuODc3NCAxMS43Mjg1IDIuOTMyNjkgMTEuNzUgMyAxMS43NUg5QzkuMDY3MzEgMTEuNzUgOS4xMjI2IDExLjcyODUgOS4xNjU4NiAxMS42ODU1QzkuMjA5MTMgMTEuNjQyNiA5LjIzMDc3IDExLjU4NzcgOS4yMzA3NyAxMS41MjA4VjExLjA2MjVDOS4yMzA3NyAxMC43MzMxIDkuMDkwMTUgMTAuNDU5NyA4LjgwODg5IDEwLjI0MjVDOC41Mjc2NCAxMC4wMjUzIDguMjA2NzMgOS45MTY2NyA3Ljg0NjE1IDkuOTE2NjdDNy41MjQwNCA5LjkxNjY3IDcuMjg5NjYgOS44MjgzNCA3LjE0MzAzIDkuNjUxNjlDNi45OTYzOSA5LjQ3NTA0IDYuOTIzMDggOS4yNTc4MSA2LjkyMzA4IDlDNi45MjMwOCA4Ljc1NjUxIDYuOTU3OTMgOC41NDI4NiA3LjAyNzY0IDguMzU5MDVDNy4wOTczNiA4LjE3NTI0IDcuMjIzNTYgOC4wMDIxNyA3LjQwNjI1IDcuODM5ODRDNy42NjEwNiA3LjY0NDEgNy44ODk0MiA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",xy=n=>n.split(/\s+/).map(e=>e[0]).join("").toUpperCase();const Cy=S("div")({name:"Container",class:"c13i6lze",propsAsIs:!1}),zy=S("div")({name:"Indicator",class:"ix2bv9",propsAsIs:!1}),st=({indicator:n,title:e})=>f.jsxs(Cy,{children:[f.jsx(zy,{children:n}),f.jsx("p",{children:e})]});const Uy=S("div")({name:"Container",class:"c5ghaaw",propsAsIs:!1}),Py=S("div")({name:"Title",class:"txfzjhj",propsAsIs:!1}),By=S("div")({name:"Indicator",class:"i1v0wmto",propsAsIs:!1}),Zs=({indicator:n,title:e})=>f.jsxs(Uy,{children:[f.jsx(Py,{children:e}),f.jsx(By,{children:n})]});const Qy=S("div")({name:"Container",class:"canai20",propsAsIs:!1}),Fy=S("div")({name:"TopInfo",class:"tda0d57",propsAsIs:!1}),Gy=S("div")({name:"BottomInfo",class:"boqy4xv",propsAsIs:!1}),Yy=S("div")({name:"User",class:"u1dtpq3t",propsAsIs:!1}),Vy=S("img")({name:"Avatar",class:"ar4jfc",propsAsIs:!1}),$y=S("div")({name:"UserInfo",class:"u1trcvj0",propsAsIs:!1}),qy=S("div")({name:"UserName",class:"u1pie8mc",propsAsIs:!1}),Wy=S("div")({name:"UserRating",class:"ucsljfb",propsAsIs:!1}),Hy=S("img")({name:"TrophyIcon",class:"tyemu1i",propsAsIs:!1}),Zy=S("div")({name:"Rts",class:"rggn4k7",propsAsIs:!1}),Ky=S("div")({name:"RtsIndicator",class:"rnmjsbm",propsAsIs:!1}),Jy=S("div")({name:"Top",class:"t1i7e651",propsAsIs:!1}),Xy=S("div")({name:"Ranks",class:"r1mt107z",propsAsIs:!1}),eg=S("div")({name:"AvatarPlaceholder",class:"apag0gc",propsAsIs:!1}),ng=S("button")({name:"UserAccountBtn",class:"uroanb5",propsAsIs:!1}),tg=({avatar:n,name:e,points:t,grade:s,friendsRank:a,globalRank:r,winStreak:i,correct:l,incorrect:m,successRate:d})=>f.jsxs(Qy,{children:[f.jsxs(Fy,{children:[f.jsxs(Yy,{children:[f.jsxs(ng,{children:[n&&f.jsx(Vy,{alt:"avatar",src:n}),!n&&f.jsx(eg,{children:xy(e)})]}),f.jsxs($y,{children:[f.jsx(qy,{children:e}),f.jsxs(Wy,{children:[f.jsx(Hy,{alt:"rank-icon",src:Ry}),f.jsxs(Zy,{children:[f.jsx(Ky,{children:t||"-"}),"RTS"]}),f.jsxs(Jy,{children:["TOP ",s,"%"]})]})]})]}),f.jsxs(Xy,{children:[f.jsx(Zs,{title:"Friens rank",indicator:a||"-"}),f.jsx(Zs,{title:"Global rank",indicator:r||"-"})]})]}),f.jsxs(Gy,{children:[f.jsx(st,{indicator:i||"-",title:"Win streak"}),f.jsx(st,{indicator:l||"-",title:"Correct"}),f.jsx(st,{indicator:m||"-",title:"Incorrect"}),f.jsx(st,{indicator:`${d||"-"}%`,title:"Success rate"})]})]}),wa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",ag="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Ks="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const Ki=S("div")({name:"Container",class:"c4emhbe",propsAsIs:!1}),sg=()=>Ki,rg=S(sg())({name:"AnsweredContainer",class:"a1a18ay2",propsAsIs:!0}),Js=S("div")({name:"ButtonPct",class:"bvdmnzn",propsAsIs:!1}),Xs=S("button")({name:"Button",class:"bz55cek",propsAsIs:!1}),er=S("img")({name:"Icon",class:"i1u5zlvm",propsAsIs:!1}),nr=S("span")({name:"Title",class:"tfilm7j",propsAsIs:!1}),tr=S("span")({name:"Indicators",class:"iqdzfbw",propsAsIs:!1}),ar=S("div")({name:"CheckIconWrap",class:"ciu4mnt",propsAsIs:!1}),Jt=S("div")({name:"Percentage",class:"pl06bzo",propsAsIs:!1}),sr=S("img")({name:"CheckIcon",class:"c5bwq34",propsAsIs:!1}),ig=({icon:n,id:e,title:t,questionId:s,disabled:a,percentage:r,onVote:i,toggleIsLoadingSubmitAnswer:l,correct:m,questionAnswered:d,hasCorrectAnswer:y,answered:h,points:T,questionType:M})=>{var E;return d&&h?f.jsxs(rg,{"data-answeredCorrect":(E=!y||m)==null?void 0:E.toString(),"data-questionAnswered":"false",children:[f.jsx(Js,{style:{width:`${r}%`}}),f.jsxs(Xs,{disabled:a,onClick:()=>i(s,e),children:[n&&f.jsx(er,{alt:"option-icon",src:n}),f.jsx(nr,{children:t}),f.jsxs(tr,{children:[y&&m&&f.jsx(ar,{children:f.jsx(sr,{alt:"icon-correct",src:h?Ks:wa})}),f.jsxs(Jt,{children:[r,"%"]})]})]})]}):f.jsxs(Ki,{"data-questionAnswered":d==null?void 0:d.toString(),children:[d&&f.jsx(Js,{style:{width:`${r}%`}}),f.jsxs(Xs,{disabled:a,onClick:()=>{l(!0),i(s,e)},children:[n&&f.jsx(er,{alt:"option-icon",src:n}),f.jsx(nr,{children:t}),d?f.jsxs(tr,{children:[y&&m&&f.jsx(ar,{children:f.jsx(sr,{alt:"icon-correct",src:h?Ks:wa})}),f.jsxs(Jt,{children:[r,"%"]})]}):M===ge.PREDICTION?f.jsxs(Jt,{children:[T," pts"]}):null]})]})};const og=S("div")({name:"Container",class:"cgz6mxc",propsAsIs:!1}),cg=S("div")({name:"Title",class:"ta6van7",propsAsIs:!1}),lg=S("div")({name:"Options",class:"o1msgqq4",propsAsIs:!1}),ug=S("div")({name:"Loader",class:"lq1mbhd",propsAsIs:!1}),mg=S("div")({name:"Feedback",class:"f9kw2xt",propsAsIs:!1}),dg=S("img")({name:"FeedbackIcon",class:"fn7neu6",propsAsIs:!1}),pg=S("div")({name:"FeedbackTitle",class:"fpdq7m5",propsAsIs:!1}),yg=S("div")({name:"FeedbackDescription",class:"f1ljy63t",propsAsIs:!1}),gg=({title:n,questionId:e,options:t,questionAnswered:s,feedbackMessages:a,questionAnsweredCorrectly:r,questionType:i})=>{const[l,m]=Q.useState(!1),d=Q.useCallback(y=>{m(y)},[m]);return Q.useEffect(()=>{d(!1)},[t,d]),f.jsxs(og,{children:[f.jsx(cg,{children:n}),f.jsxs(lg,{children:[l&&f.jsx(ug,{children:"Loading..."}),t.map(y=>f.jsx(ig,{toggleIsLoadingSubmitAnswer:d,questionId:e,questionType:i,...y},y.id))]}),s&&i===ge.TRIVIA&&f.jsxs(mg,{children:[f.jsx(dg,{alt:"reaction-to-answer",src:r?wa:ag}),f.jsxs("div",{children:[f.jsx(pg,{children:r?a.correctFeedback.title:a.incorrectFeedback.title}),f.jsx(yg,{children:r?a.correctFeedback.description:a.incorrectFeedback.description})]})]})]})};class fg{}window.slStore=Object.create(null);class Ot{constructor(e,t){N(this,"store");N(this,"name");this.store=e,this.name=t}getStore(){return this.store}}const Tg=n=>{const e=Object.keys(n);return De.computed(e.map(t=>n[t].getStore()),(...t)=>Object.fromEntries(e.map((s,a)=>[s,t[a]])))};class Vn extends Ot{constructor(){super(...arguments);N(this,"getValues",()=>this.getStore().get());N(this,"getValue",t=>this.getStore().get()[t]);N(this,"setValue",(t,s)=>this.getStore().setKey(t,s));N(this,"subscribe",(...t)=>this.getStore().subscribe(...t));N(this,"unsubscribe",()=>this.getStore().off())}}const $n=n=>De.map(n);var An=(n=>(n.ORGANIZATION="ORGANIZATION",n.STREAM="STREAM",n))(An||{});const hg={[ve.BETTING]:"betting",[ve.GAMES]:"games",[ve.PUBLIC_CHAT]:"publicChat",[ve.TWITTER]:"twitter"};var He=(n=>(n.Ready="ready",n.Suspended="suspended",n))(He||{});class es{constructor({settings:e,...t},s){N(this,"status");N(this,"source");N(this,"config");N(this,"settings");N(this,"listeners",new Set);N(this,"settingsKey");N(this,"enable",()=>{this.status.set("ready")});N(this,"disable",()=>{this.status.set("suspended")});N(this,"setFeatureConfig",({settings:e,...t})=>{let s;for(s in t)this.config.setValue(s,t[s]);if((e==null?void 0:e.overlaySettings.case)===this.settingsKey){const a=e.overlaySettings.value;if(a!==void 0){let r;for(r in a)console.log(r,a[r]),a[r]!==0&&a[r]!==""&&this.settings.setValue(r,a[r])}}});N(this,"update",(e,t)=>{this.source==="STREAM"&&t==="ORGANIZATION"||(this.setFeatureConfig(e),this.source=t)});this.settingsKey=hg[t.type],this.status=De.atom("suspended"),this.config=new Vn($n(t),`feature:config:${this.settingsKey}`),this.settingsKey!==void 0&&(e==null?void 0:e.overlaySettings.case)===this.settingsKey?this.settings=new Vn($n(e.overlaySettings.value),`feature:settings:${this.settingsKey}`):this.settings=new Vn($n({}),`feature:settings:${this.settingsKey}`),this.source=s}get featureConfig(){return this.config.getStore()}get featureSettings(){return this.settings.getStore()}registerEventListener(e){this.listeners.add(e)}fireEvent(e){for(const t of this.listeners.values())try{t.onEvent(e)}catch(s){console.error(s)}}}class Le extends Ot{constructor(){super(...arguments);N(this,"getValue",()=>this.getStore().get());N(this,"setValue",t=>this.getStore().set(t));N(this,"subscribe",t=>this.getStore().subscribe(t));N(this,"unsubscribe",()=>this.getStore().off())}getValues(){throw new Error("not implemented")}listen(t){return this.getStore().listen(t)}get(){return this.getStore().get()}}const Re=n=>De.atom(n),ns=(n,e)=>De.computed(n,e);class ze extends Ot{constructor(t,s,a){super(t,`api:${s}`);N(this,"atomStore");N(this,"getAtomStore",()=>this.atomStore);N(this,"getValue",async()=>{const t=this.getStore();if(t.value===void 0)throw new Error("no store");return await t.value.promise,t.get().data});N(this,"getValues",()=>{throw new Error("not implemented")});N(this,"setValue",t=>this.getStore().set({loading:!1,data:t==null?void 0:t.data}));N(this,"subscribe",t=>this.getStore().subscribe(t));N(this,"unsubscribe",()=>{throw new Error("not implemented")});N(this,"invalidate",()=>{this.store.invalidate()});N(this,"listen",t=>this.getStore().listen(t));N(this,"key",()=>this.getStore().key);N(this,"off",()=>this.getStore().off());this.atomStore=De.atom(),a&&t.subscribe(r=>{this.atomStore.set(a(r))})}get(){throw new Error("not implemented")}}var ts={exports:{}};function kg(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}var Mg=Ng;function Ng(n,e,t){var s=t&&t.stringify||kg,a=1;if(typeof n=="object"&&n!==null){var r=e.length+a;if(r===1)return n;var i=new Array(r);i[0]=s(n);for(var l=1;l<r;l++)i[l]=s(e[l]);return i.join(" ")}if(typeof n!="string")return n;var m=e.length;if(m===0)return n;for(var d="",y=1-a,h=-1,T=n&&n.length||0,M=0;M<T;){if(n.charCodeAt(M)===37&&M+1<T){switch(h=h>-1?h:0,n.charCodeAt(M+1)){case 100:case 102:if(y>=m||e[y]==null)break;h<M&&(d+=n.slice(h,M)),d+=Number(e[y]),h=M+2,M++;break;case 105:if(y>=m||e[y]==null)break;h<M&&(d+=n.slice(h,M)),d+=Math.floor(Number(e[y])),h=M+2,M++;break;case 79:case 111:case 106:if(y>=m||e[y]===void 0)break;h<M&&(d+=n.slice(h,M));var E=typeof e[y];if(E==="string"){d+="'"+e[y]+"'",h=M+2,M++;break}if(E==="function"){d+=e[y].name||"<anonymous>",h=M+2,M++;break}d+=s(e[y]),h=M+2,M++;break;case 115:if(y>=m)break;h<M&&(d+=n.slice(h,M)),d+=String(e[y]),h=M+2,M++;break;case 37:h<M&&(d+=n.slice(h,M)),d+="%",h=M+2,M++,y--;break}++y}++M}return h===-1?n:(h<T&&(d+=n.slice(h)),d)}const rr=Mg;ts.exports=Ke;const Zn=Cg().console||{},Ig={mapHttpRequest:rt,mapHttpResponse:rt,wrapRequestSerializer:Xt,wrapResponseSerializer:Xt,wrapErrorSerializer:Xt,req:rt,res:rt,err:or,errWithCause:or};function ht(n,e){return n==="silent"?1/0:e.levels.values[n]}const as=Symbol("pino.logFuncs"),_a=Symbol("pino.hierarchy"),Sg={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function ir(n,e){const t={logger:e,parent:n[_a]};e[_a]=t}function Ag(n,e,t){const s={};e.forEach(a=>{s[a]=t[a]?t[a]:Zn[a]||Zn[Sg[a]||"log"]||Kn}),n[as]=s}function Eg(n,e){return Array.isArray(n)?n.filter(function(s){return s!=="!stdSerializers.err"}):n===!0?Object.keys(e):!1}function Ke(n){n=n||{},n.browser=n.browser||{};const e=n.browser.transmit;if(e&&typeof e.send!="function")throw Error("pino: transmit option must have a send function");const t=n.browser.write||Zn;n.browser.write&&(n.browser.asObject=!0);const s=n.serializers||{},a=Eg(n.browser.serialize,s);let r=n.browser.serialize;Array.isArray(n.browser.serialize)&&n.browser.serialize.indexOf("!stdSerializers.err")>-1&&(r=!1);const i=Object.keys(n.customLevels||{}),l=["error","fatal","warn","info","debug","trace"].concat(i);typeof t=="function"&&l.forEach(function(D){t[D]=t}),(n.enabled===!1||n.browser.disabled)&&(n.level="silent");const m=n.level||"info",d=Object.create(t);d.log||(d.log=Kn),Ag(d,l,t),ir({},d),Object.defineProperty(d,"levelVal",{get:h}),Object.defineProperty(d,"level",{get:T,set:M});const y={transmit:e,serialize:a,asObject:n.browser.asObject,levels:l,timestamp:Lg(n)};d.levels=bg(n),d.level=m,d.setMaxListeners=d.getMaxListeners=d.emit=d.addListener=d.on=d.prependListener=d.once=d.prependOnceListener=d.removeListener=d.removeAllListeners=d.listeners=d.listenerCount=d.eventNames=d.write=d.flush=Kn,d.serializers=s,d._serialize=a,d._stdErrSerialize=r,d.child=E,e&&(d._logEvent=ja());function h(){return ht(this.level,this)}function T(){return this._level}function M(D){if(D!=="silent"&&!this.levels.values[D])throw Error("unknown level "+D);this._level=D,rn(this,y,d,"error"),rn(this,y,d,"fatal"),rn(this,y,d,"warn"),rn(this,y,d,"info"),rn(this,y,d,"debug"),rn(this,y,d,"trace"),i.forEach(L=>{rn(this,y,d,L)})}function E(D,L){if(!D)throw new Error("missing bindings for child Pino");L=L||{},a&&D.serializers&&(L.serializers=D.serializers);const j=L.serializers;if(a&&j){var R=Object.assign({},s,j),x=n.browser.serialize===!0?Object.keys(R):a;delete D.serializers,Lt([D],x,R,this._stdErrSerialize)}function z(B){this._childLevel=(B._childLevel|0)+1,this.bindings=D,R&&(this.serializers=R,this._serialize=x),e&&(this._logEvent=ja([].concat(B._logEvent.bindings,D)))}z.prototype=this;const U=new z(this);return ir(this,U),U.level=this.level,U}return d}function bg(n){const e=n.customLevels||{},t=Object.assign({},Ke.levels.values,e),s=Object.assign({},Ke.levels.labels,Dg(e));return{values:t,labels:s}}function Dg(n){const e={};return Object.keys(n).forEach(function(t){e[n[t]]=t}),e}Ke.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};Ke.stdSerializers=Ig;Ke.stdTimeFunctions=Object.assign({},{nullTime:Ji,epochTime:Xi,unixTime:Rg,isoTime:xg});function vg(n){const e=[];n.bindings&&e.push(n.bindings);let t=n[_a];for(;t.parent;)t=t.parent,t.logger.bindings&&e.push(t.logger.bindings);return e.reverse()}function rn(n,e,t,s){if(n[s]=ht(n.level,t)>ht(s,t)?Kn:t[as][s],!e.transmit&&n[s]===Kn)return;n[s]=_g(n,e,t,s);const a=vg(n);a.length!==0&&(n[s]=wg(a,n[s]))}function wg(n,e){return function(){return e.apply(this,[...n,...arguments])}}function _g(n,e,t,s){return function(a){return function(){const i=e.timestamp(),l=new Array(arguments.length),m=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Zn?Zn:this;for(var d=0;d<l.length;d++)l[d]=arguments[d];if(e.serialize&&!e.asObject&&Lt(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?a.call(m,jg(this,s,l,i)):a.apply(m,l),e.transmit){const y=e.transmit.level||n._level,h=t.levels.values[y],T=t.levels.values[s];if(T<h)return;Og(this,{ts:i,methodLevel:s,methodValue:T,transmitLevel:y,transmitValue:t.levels.values[e.transmit.level||n._level],send:e.transmit.send,val:ht(n._level,t)},l)}}}(n[as][s])}function jg(n,e,t,s){n._serialize&&Lt(t,n._serialize,n.serializers,n._stdErrSerialize);const a=t.slice();let r=a[0];const i={};s&&(i.time=s),i.level=n.levels.values[e];let l=(n._childLevel|0)+1;if(l<1&&(l=1),r!==null&&typeof r=="object"){for(;l--&&typeof a[0]=="object";)Object.assign(i,a.shift());r=a.length?rr(a.shift(),a):void 0}else typeof r=="string"&&(r=rr(a.shift(),a));return r!==void 0&&(i.msg=r),i}function Lt(n,e,t,s){for(const a in n)if(s&&n[a]instanceof Error)n[a]=Ke.stdSerializers.err(n[a]);else if(typeof n[a]=="object"&&!Array.isArray(n[a]))for(const r in n[a])e&&e.indexOf(r)>-1&&r in t&&(n[a][r]=t[r](n[a][r]))}function Og(n,e,t){const s=e.send,a=e.ts,r=e.methodLevel,i=e.methodValue,l=e.val,m=n._logEvent.bindings;Lt(t,n._serialize||Object.keys(n.serializers),n.serializers,n._stdErrSerialize===void 0?!0:n._stdErrSerialize),n._logEvent.ts=a,n._logEvent.messages=t.filter(function(d){return m.indexOf(d)===-1}),n._logEvent.level.label=r,n._logEvent.level.value=i,s(r,n._logEvent,l),n._logEvent=ja(m)}function ja(n){return{ts:0,messages:[],bindings:n||[],level:{label:"",value:0}}}function or(n){const e={type:n.constructor.name,msg:n.message,stack:n.stack};for(const t in n)e[t]===void 0&&(e[t]=n[t]);return e}function Lg(n){return typeof n.timestamp=="function"?n.timestamp:n.timestamp===!1?Ji:Xi}function rt(){return{}}function Xt(n){return n}function Kn(){}function Ji(){return!1}function Xi(){return Date.now()}function Rg(){return Math.round(Date.now()/1e3)}function xg(){return new Date(Date.now()).toISOString()}function Cg(){function n(e){return typeof e<"u"&&e}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return n(self)||n(window)||n(this)||{}}}ts.exports.default=Ke;var zg=ts.exports.pino=Ke;const Ug=zg({level:"trace"}),eo=(n,e)=>Ug.child({name:n},e);let Pg=()=>({events:{},emit(n,...e){let t=this.events[n]||[];for(let s=0,a=t.length;s<a;s++)t[s](...e)},on(n,e){var t;return(t=this.events[n])!=null&&t.push(e)||(this.events[n]=[e]),()=>{var s;this.events[n]=(s=this.events[n])==null?void 0:s.filter(a=>e!==a)}}});const Bg=({cache:n=new Map,fetcher:e,...t}={})=>{const s=Pg();let a=!0;dr("visibilitychange",()=>{a=!document.hidden,a&&s.emit(lr)}),dr("online",()=>s.emit(ur));const r=new Map,i=new Map,l=new Map;let m={};const d=async([j,R],x,z,U)=>{var B;if(!a)return;const C=oe=>{x.key===j&&(x.set(oe),s.emit(ea,j,oe,!0))},H=()=>{C({...x.value,...yr,promise:l.get(j)})},{dedupeTime:ne=4e3,fetcher:se}={...z,...m},ie=pr();if(l.has(j)){x.value.loading||H();return}if(!U){const oe=n.get(j);oe&&x.value.data!==oe&&C({data:oe,...on});const Z=i.get(j);if(Z&&Z+ne>ie)return}const ue=De.startTask();try{const oe=se(...R);i.set(j,ie),l.set(j,oe),H();const Z=await oe;n.set(j,Z),C({data:Z,...on}),i.set(j,pr())}catch(oe){(B=z.onError)==null||B.call(z,oe),C({data:x.value.data,error:oe,...on})}finally{ue(),l.delete(j)}},y=(j,{fetcher:R=e,...x}={})=>{const z=De.map({...on}),U={...t,...x,fetcher:R};z.invalidate=()=>{const{key:Z}=z;Z&&M(Z)},z.mutate=Z=>{const{key:me}=z;me&&E(me,Z)};let B,C,H,ne,se,ie=[];De.onStart(z,()=>{const Z=!B;[se,B]=Qg(j),ne=se.subscribe(Se=>{if(Se){const[K,I]=Se;z.key=K,d([K,I],z,U),C=K,H=I}else z.key=C=H=void 0});const me=se.get();me&&([C,H]=me,Z&&ue());const{refetchInterval:Ee=0,refetchOnFocus:xe,refetchOnReconnect:we}=U,Ie=()=>{C&&d([C,H],z,U)};Ee>0&&r.set(j,setInterval(Ie,Ee)),xe&&ie.push(s.on(lr,Ie)),we&&ie.push(s.on(ur,Ie)),ie.push(s.on(mr,Se=>{C&&na(C,Se)&&d([C,H],z,U,!0)}),s.on(ea,(Se,K,I)=>{C&&na(C,Se)&&z.value!==K&&z.value.data!==K&&z.set(I?K:{data:K,...on})}))});const ue=()=>{C&&H&&d([C,H],z,U)},oe=z.listen;return z.listen=Z=>{const me=oe(Z);return Z(z.value),ue(),me},De.onStop(z,()=>{z.value={...on},B==null||B(),ie.forEach(me=>me()),ie=[],ne==null||ne();const Z=r.get(j);Z&&clearInterval(Z)}),z},h=j=>{n.delete(j),i.delete(j)},T=(j,R)=>{for(const x of n.keys())na(x,j)&&R(x)},M=j=>{T(j,h),s.emit(mr,j)},E=(j,R)=>{T(j,x=>{R===void 0?h(x):n.set(x,R)}),s.emit(ea,j,R)};function D(j){const R=async z=>{var U,B;const C=(U=m.fetcher)!=null?U:j,H=[];try{x.set({error:void 0,data:void 0,mutate:R,...yr});const ne=await C({data:z,invalidate:se=>{H.push(se)},getCacheUpdater:(se,ie=!0)=>[ue=>{E(se,ue),ie&&H.push(se)},n.get(se)]});return x.setKey("data",ne),ne}catch(ne){(B=t==null?void 0:t.onError)==null||B.call(t,ne),x.setKey("error",ne)}finally{x.setKey("loading",!1),H.forEach(M)}},x=De.map({mutate:R,...on});return x.mutate=R,x}return[y,D,{__unsafeOverruleSettings:j=>{console.warn("You should only use __unsafeOverruleSettings in test environment"),m=j},invalidateKeys:M,mutateCache:E}]};function cr(n){return typeof n=="string"||typeof n=="number"}const Qg=n=>{if(cr(n))return[De.atom([""+n,[n]]),()=>{}];let e=De.atom(null),t=[];const s=()=>{t.some(r=>r==null)?e.set(null):e.set([t.join(""),t])},a=[];for(let r=0;r<n.length;r++){const i=n[r];if(cr(i)){t.push(i);continue}a.push(i.subscribe(l=>{t[r]=l,s()}))}return s(),[e,()=>a.forEach(r=>r())]},lr=1,ur=2,mr=3,ea=4,dr=(n,e)=>{typeof window>"u"||addEventListener(n,e)},na=(n,e)=>Array.isArray(e)?e.includes(n):typeof e=="function"?e(n):n===e,pr=()=>new Date().getTime(),yr={loading:!0},on={loading:!1};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));class Fg{constructor(e,t,s,a){N(this,"params");N(this,"stream");N(this,"method");N(this,"name");N(this,"headers");N(this,"listeners");N(this,"state");N(this,"store");N(this,"updateState",e=>{this.state.setValue("status",e),this.state.setValue("ts",new Date),this.addStateLog(`status => ${e}`)});N(this,"addStateLog",e=>{const t=this.state.getStore().get().log;this.state.setValue("log",[...t,`${new Date().toLocaleString()}: ${e}`])});N(this,"addListener",(e,t)=>this.listeners.has(e)?(this.addStateLog(`listener '${e}' not added`),!1):(this.listeners.set(e,t),this.addStateLog(`listener '${e}' added`),!0));N(this,"removeListener",e=>{this.listeners.delete(e),this.addStateLog(`listener '${e}' removed`)});N(this,"connect",()=>{this.updateState("connecting"),this.stream&&(this.addStateLog("disconnect prev connection"),this.stream());const e="get"in this.params&&typeof this.params.get=="function"?this.params.get():this.params;this.stream=this.method(e,this.onData,this.onStreamError,{headers:this.headers.getValues()}),this.updateState("connected")});N(this,"disconnect",()=>{this.stream&&this.stream(),this.listeners.clear(),this.updateState("disconnected")});N(this,"reconnect",()=>{this.updateState("reconnecting"),this.connect()});N(this,"getStore",()=>{var e;return(e=this.store)==null?void 0:e.getStore()});N(this,"onData",e=>{this.addStateLog(`received data => ${JSON.stringify(e)}`),this.store&&this.store.setValue(e);for(const[,t]of this.listeners)t(e);this.addStateLog(`data routed to ${this.listeners.size} listeners`)});N(this,"onStreamError",e=>{e!==void 0&&(e.code!==ee.Canceled&&e.rawMessage!=="[canceled] BodyStreamBuffer was aborted"?(this.updateState("failed"),this.state.setValue("error",e)):this.disconnect())});const r={status:"init",ts:new Date,log:[]};this.state=new Vn($n(r),`subscription:${a.name}:state`),this.name=a.name,this.headers=e,this.listeners=new Map,this.params=s,this.method=t,a.withStore&&(this.store=new Le(Re(null),`subscription:${a.name}:store`)),"subscribe"in s&&typeof s.subscribe=="function"&&s.subscribe(()=>{this.reconnect()}),this.updateState("ready")}}class Gg{constructor(e){N(this,"toJsonOptions",{emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1});N(this,"transport");N(this,"nanoquery");N(this,"host");N(this,"interceptors",[]);N(this,"$headers");N(this,"clients");N(this,"callbackClients");N(this,"subscriptions");N(this,"addSubscription",(e,t,s)=>{const a=this.subscriptions.get(t);if(a)return a;const r=new Fg(this.$headers,e,t,s);return this.subscriptions.set(t,r),r});N(this,"removeSubscription",e=>{e.disconnect(),this.subscriptions.delete(e.params)});N(this,"disconnect",()=>{for(const[e,t]of this.subscriptions)t.disconnect(),this.subscriptions.delete(e)});N(this,"registerInterceptor",e=>{this.interceptors.push(e)});N(this,"removeInterceptor",e=>{this.interceptors=this.interceptors.filter(t=>t!==e)});N(this,"getClient",e=>{const t=e.typeName;if(this.clients.has(t))return this.clients.get(t);const s=vt(e,this.transport);return this.clients.set(t,s),s});N(this,"getCallbackClient",e=>{const t=e.typeName;if(this.callbackClients.has(t))return this.callbackClients.get(t);const s=Ql(e,this.transport);return this.callbackClients.set(t,s),s});N(this,"createPromiseClient",(e,{params:t=[],method:s})=>{const a=this.getClient(e),r=e.methods[s].name,i=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1),...Array.isArray(t)?t:[t]],l=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1)];return{client:a,queryKey:i,queryKeyStr:l.join("")}});N(this,"createCallbackClient",e=>({client:this.getCallbackClient(e)}));N(this,"setSdkKey",e=>{this.$headers.setValue("sdk",e)});N(this,"setAuth",e=>{this.$headers.setValue("authorization",e)});N(this,"setHeader",(e,t)=>this.$headers.setValue(e,t));N(this,"getHeader",e=>this.$headers.getValue(e));N(this,"getHeaders",()=>this.$headers.getValues());N(this,"initInterceptors",()=>{if(this.interceptors.length!==0)return;const e=t=>s=>{const a=this.$headers.getValues();for(const r in a)s.header.set(r,a[r]);return t(s)};this.interceptors.push(e)});var r,i;this.host=e,this.$headers=new Vn($n({"sl-device-id":((i=(r=G.process)==null?void 0:r.env)==null?void 0:i.NX_DEVICE_ID)||"sdk-web-dev"}),"transport:headers"),this.initInterceptors(),this.clients=new Map,this.callbackClients=new Map,this.subscriptions=new Map;const[t,s,a]=Bg();this.nanoquery={createFetcherStore:t,createMutatorStore:s,utils:a},this.transport=wt({baseUrl:e,interceptors:this.interceptors,useBinaryFormat:!0})}}const Yg=c.makeEnum("streamlayer.sports.LeagueSyncStatus",[{no:0,name:"LEAGUE_SYNC_STATUS_UNSET",localName:"UNSET"},{no:1,name:"LEAGUE_SYNC_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"LEAGUE_SYNC_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"LEAGUE_SYNC_STATUS_SYNCED",localName:"SYNCED"},{no:4,name:"LEAGUE_SYNC_STATUS_ERROR",localName:"ERROR"}]),ss=c.makeEnum("streamlayer.sports.EventStatus",[{no:0,name:"EVENT_STATUS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_STATUS_PREGAME",localName:"PREGAME"},{no:2,name:"EVENT_STATUS_ACTIVE",localName:"ACTIVE"},{no:3,name:"EVENT_STATUS_BREAK",localName:"BREAK"},{no:4,name:"EVENT_STATUS_OVERTIME",localName:"OVERTIME"},{no:5,name:"EVENT_STATUS_SHOOTOUTS",localName:"SHOOTOUTS"},{no:6,name:"EVENT_STATUS_POSTGAME",localName:"POSTGAME"},{no:7,name:"EVENT_STATUS_CANCELLED",localName:"CANCELLED"}]),rs=c.makeEnum("streamlayer.sports.EventEndless",[{no:0,name:"EVENT_ENDLESS_UNSET",localName:"UNSET"},{no:1,name:"EVENT_ENDLESS_ENABLED",localName:"ENABLED"},{no:2,name:"EVENT_ENDLESS_DISABLED",localName:"DISABLED"}]),Rt=c.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),no=c.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),xt=c.makeMessageType("streamlayer.sports.Meta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}]),Ct=c.makeMessageType("streamlayer.sports.Venue",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"scalar",T:9},{no:3,name:"stadium",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sports.Team",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"alias",kind:"scalar",T:9},{no:5,name:"venue",kind:"message",T:Ct}]);const Xn=c.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),to=c.makeMessageType("streamlayer.sports.EventPeriod",()=>[{no:1,name:"number",kind:"scalar",T:5},{no:2,name:"score_home",kind:"scalar",T:5},{no:3,name:"score_away",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.Event",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"custom_fields",kind:"scalar",T:9},{no:3,name:"league_id",kind:"scalar",T:4},{no:4,name:"season_id",kind:"scalar",T:4},{no:5,name:"home_team_id",kind:"scalar",T:4},{no:6,name:"away_team_id",kind:"scalar",T:4},{no:7,name:"winner_team_id",kind:"scalar",T:4},{no:8,name:"scheduled",kind:"scalar",T:9},{no:9,name:"score_home",kind:"scalar",T:5},{no:10,name:"score_away",kind:"scalar",T:5},{no:11,name:"venue",kind:"message",T:Ct},{no:12,name:"event_time",kind:"message",T:Xn},{no:13,name:"status",kind:"enum",T:c.getEnumType(ss)},{no:14,name:"periods",kind:"message",T:to,repeated:!0},{no:15,name:"start_time",kind:"scalar",T:9},{no:16,name:"end_time",kind:"scalar",T:9},{no:17,name:"endless",kind:"enum",T:c.getEnumType(rs)}]);const ao=c.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),Vg=c.makeMessageType("streamlayer.sports.PlayerAttributes",()=>[{no:1,name:"display_id",kind:"scalar",T:5},{no:3,name:"full_first",kind:"scalar",T:9},{no:4,name:"full_last",kind:"scalar",T:9},{no:5,name:"uniform",kind:"scalar",T:9},{no:6,name:"height",kind:"message",T:$g},{no:7,name:"weight",kind:"message",T:qg},{no:8,name:"birth",kind:"message",T:Wg}]),$g=c.makeMessageType("streamlayer.sports.PlayerAttributes.Height",()=>[{no:1,name:"centimeters",kind:"scalar",T:5},{no:2,name:"inches",kind:"scalar",T:5}],{localName:"PlayerAttributes_Height"}),qg=c.makeMessageType("streamlayer.sports.PlayerAttributes.Weight",()=>[{no:1,name:"kilograms",kind:"scalar",T:5},{no:2,name:"pounds",kind:"scalar",T:5}],{localName:"PlayerAttributes_Weight"}),Wg=c.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:ao}],{localName:"PlayerAttributes_Birth"});c.makeMessageType("streamlayer.sports.PlayerAttributes.Birth.BirthDate",()=>[{no:1,name:"year",kind:"scalar",T:5},{no:2,name:"month",kind:"scalar",T:5},{no:3,name:"date",kind:"scalar",T:5},{no:4,name:"full",kind:"scalar",T:9}],{localName:"PlayerAttributes_Birth_BirthDate"});const Hg=c.makeMessageType("streamlayer.sports.PlayerTeam",()=>[{no:1,name:"team_id",kind:"scalar",T:4},{no:2,name:"position",kind:"scalar",T:9},{no:3,name:"jersey_number",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.Player",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"first_name",kind:"scalar",T:9},{no:10,name:"last_name",kind:"scalar",T:9},{no:14,name:"display_name",kind:"scalar",T:9},{no:11,name:"birth_date",kind:"scalar",T:9},{no:12,name:"nationality",kind:"message",T:ao},{no:13,name:"attributes",kind:"message",T:Vg},{no:15,name:"teams",kind:"message",T:Hg,repeated:!0}]);const an=c.makeMessageType("streamlayer.sports.TeamRecord",()=>[{no:1,name:"wins",kind:"scalar",T:5},{no:2,name:"losses",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.Season",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"scalar",T:9},{no:6,name:"year",kind:"scalar",T:5},{no:7,name:"league_id",kind:"scalar",T:4}]);const Fn=c.makeMessageType("streamlayer.sports.SyncStatusStage",()=>[{no:1,name:"stage",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:4},{no:3,name:"datetime",kind:"scalar",T:9},{no:4,name:"error",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:c.getEnumType(Yg)}]),Zg=c.makeMessageType("streamlayer.sports.SyncStatus",()=>[{no:1,name:"teams",kind:"message",T:Fn},{no:2,name:"event",kind:"message",T:Fn},{no:3,name:"events",kind:"message",T:Fn},{no:4,name:"players",kind:"message",T:Fn},{no:5,name:"leagues",kind:"message",T:Fn}]),Kg=c.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:Zg}]);c.makeMessageType("streamlayer.sports.League",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:9,name:"country",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9},{no:13,name:"sync",kind:"scalar",T:8},{no:14,name:"sport_id",kind:"scalar",T:4},{no:12,name:"sync_status",kind:"message",T:Kg,repeated:!0}]);c.makeMessageType("streamlayer.sports.Sport",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"created",kind:"scalar",T:9},{no:3,name:"updated",kind:"scalar",T:9},{no:8,name:"custom_fields",kind:"scalar",T:9},{no:10,name:"name",kind:"scalar",T:9},{no:11,name:"alias",kind:"scalar",T:9}]);const Jg=c.makeMessageType("streamlayer.sports.NflEventStatistics",()=>[{no:1,name:"passes",kind:"scalar",T:5},{no:2,name:"rushes",kind:"scalar",T:5},{no:3,name:"penalties",kind:"scalar",T:5},{no:4,name:"turnovers",kind:"scalar",T:5}]),Xg=c.makeMessageType("streamlayer.sports.SoccerEventStatistics",()=>[{no:1,name:"ball_possession",kind:"scalar",T:5},{no:2,name:"throw_ins",kind:"scalar",T:5},{no:3,name:"fouls",kind:"scalar",T:5},{no:4,name:"goal_kicks",kind:"scalar",T:5},{no:5,name:"free_kicks",kind:"scalar",T:5},{no:6,name:"shots_on_target",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"shots_off_target",kind:"scalar",T:5},{no:9,name:"shots_saved",kind:"scalar",T:5},{no:10,name:"offsides",kind:"scalar",T:5},{no:11,name:"shots_blocked",kind:"scalar",T:5},{no:12,name:"yellow_cards",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.EventTeamStatistics",()=>[{no:1,name:"football",kind:"message",T:Jg,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:Xg,oneof:"statistics"}]);const sn=c.makeMessageType("streamlayer.sports.EventTeam",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"is_winner",kind:"scalar",T:8}]),ef=c.makeMessageType("streamlayer.sports.EventCustomFields",()=>[{no:1,name:"preview",kind:"scalar",T:9},{no:2,name:"stream",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"event_ids",kind:"scalar",T:9,repeated:!0},{no:6,name:"subtitle",kind:"scalar",T:9},{no:7,name:"promotitle",kind:"scalar",T:9},{no:8,name:"slate",kind:"scalar",T:9},{no:9,name:"horizontal_preview",kind:"scalar",T:9},{no:10,name:"small_logo",kind:"scalar",T:9},{no:11,name:"description",kind:"scalar",T:9}]),nf=c.makeMessageType("streamlayer.sports.EventProgram",()=>[{no:1,name:"id",kind:"scalar",T:9,opt:!0},{no:2,name:"title",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:9},{no:4,name:"end_time",kind:"scalar",T:9},{no:5,name:"thumbnail_url",kind:"scalar",T:9},{no:6,name:"square_thumbnail_url",kind:"scalar",T:9}]),tf=c.makeMessageType("streamlayer.sports.EventData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"sport",kind:"scalar",T:9},{no:3,name:"league",kind:"scalar",T:9},{no:4,name:"scheduled",kind:"scalar",T:9},{no:5,name:"home",kind:"message",T:sn},{no:6,name:"away",kind:"message",T:sn},{no:7,name:"status",kind:"enum",T:c.getEnumType(ss)},{no:8,name:"custom_fields",kind:"message",T:ef},{no:9,name:"start_time",kind:"scalar",T:9},{no:10,name:"end_time",kind:"scalar",T:9},{no:11,name:"venue",kind:"message",T:Ct},{no:12,name:"schedule",kind:"message",T:nf,repeated:!0},{no:13,name:"endless",kind:"enum",T:c.getEnumType(rs)}]),fn=c.makeMessageType("streamlayer.sports.EventSummary",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"scheduled",kind:"scalar",T:9},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"venue",kind:"message",T:Ct},{no:6,name:"event_time",kind:"message",T:Xn},{no:7,name:"home_team",kind:"message",T:sn},{no:8,name:"away_team",kind:"message",T:sn},{no:9,name:"status",kind:"enum",T:c.getEnumType(ss)},{no:10,name:"periods",kind:"message",T:to,repeated:!0},{no:11,name:"league",kind:"scalar",T:9},{no:12,name:"start_time",kind:"scalar",T:9},{no:13,name:"end_time",kind:"scalar",T:9},{no:14,name:"name",kind:"scalar",T:9},{no:15,name:"logo",kind:"scalar",T:9},{no:16,name:"stream_url",kind:"scalar",T:9}]),it=c.makeMessageType("streamlayer.sports.QueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]),gr=c.makeMessageType("streamlayer.sports.ArrayQueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9,repeated:!0}]);c.makeMessageType("streamlayer.sports.Query",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"match",kind:"message",T:it,repeated:!0},{no:3,name:"ne",kind:"message",T:it,repeated:!0},{no:4,name:"eq",kind:"message",T:it,repeated:!0},{no:5,name:"between",kind:"message",T:gr,repeated:!0},{no:6,name:"includes",kind:"message",T:gr,repeated:!0},{no:7,name:"is",kind:"message",T:it,repeated:!0}]);const af=c.makeEnum("streamlayer.sports.baseball.PitcherStatus",[{no:0,name:"PITCHER_STATUS_UNSET",localName:"UNSET"},{no:1,name:"PITCHER_STATUS_WIN",localName:"WIN"},{no:2,name:"PITCHER_STATUS_LOSS",localName:"LOSS"}]),sf=c.makeEnum("streamlayer.sports.baseball.BaseballBase",[{no:0,name:"BASEBALL_BASE_UNSET",localName:"UNSET"},{no:1,name:"BASEBALL_BASE_FIRST",localName:"FIRST"},{no:2,name:"BASEBALL_BASE_SECOND",localName:"SECOND"},{no:3,name:"BASEBALL_BASE_THIRD",localName:"THIRD"}]),fr=c.makeMessageType("streamlayer.sports.baseball.PitcherSummary",()=>[{no:1,name:"statistics",kind:"message",T:so},{no:2,name:"status",kind:"enum",T:c.getEnumType(af)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),rf=c.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),of=c.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:c.getEnumType(sf)},{no:2,name:"player",kind:"message",T:rf}]),cf=c.makeMessageType("streamlayer.sports.baseball.Hitting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"hits_per_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"run_batted_in",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"batting_average",kind:"scalar",T:9}]),lf=c.makeMessageType("streamlayer.sports.baseball.Batting",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"at_bat",kind:"scalar",T:9},{no:3,name:"runs",kind:"scalar",T:9},{no:4,name:"hits",kind:"scalar",T:9},{no:5,name:"batting_average",kind:"scalar",T:9}]),so=c.makeMessageType("streamlayer.sports.baseball.Pitching",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"innings_pitched",kind:"scalar",T:9},{no:3,name:"hits_by_pitch",kind:"scalar",T:9},{no:4,name:"earned_runs",kind:"scalar",T:9},{no:5,name:"walks",kind:"scalar",T:9},{no:6,name:"strikeouts",kind:"scalar",T:9}]),Tr=c.makeMessageType("streamlayer.sports.baseball.BaseballTeamSummary",()=>[{no:1,name:"hitting",kind:"message",T:cf,repeated:!0},{no:2,name:"batting",kind:"message",T:lf,repeated:!0},{no:3,name:"pitching",kind:"message",T:so,repeated:!0}]),uf=c.makeMessageType("streamlayer.sports.baseball.BaseballSummary",()=>[{no:1,name:"home_pitcher",kind:"message",T:fr},{no:2,name:"away_pitcher",kind:"message",T:fr},{no:3,name:"home_statistics",kind:"message",T:Tr},{no:4,name:"away_statistics",kind:"message",T:Tr}]),mf=c.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:df,repeated:!0},{no:5,name:"runs",kind:"scalar",T:5},{no:6,name:"hits",kind:"scalar",T:5},{no:7,name:"errors",kind:"scalar",T:5}]),df=c.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics.BaseballPlayByPlayDetailStatistics",()=>[{no:1,name:"score_home",kind:"scalar",T:5},{no:2,name:"score_away",kind:"scalar",T:5},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}],{localName:"BaseballPlayByPlayStatistics_BaseballPlayByPlayDetailStatistics"}),pf=c.makeMessageType("streamlayer.sports.baseball.EventScore",()=>[{no:1,name:"outs",kind:"scalar",T:5},{no:2,name:"inning",kind:"scalar",T:5},{no:3,name:"inning_division",kind:"scalar",T:9},{no:4,name:"is_delayed",kind:"scalar",T:8},{no:5,name:"reason_for_delay",kind:"scalar",T:9},{no:6,name:"runners_on_base",kind:"message",T:of,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),yf=c.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:mf,repeated:!0}]),gf=c.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:uf}]),ff=c.makeMessageType("streamlayer.sports.baseball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:Tf},{no:11,name:"rank",kind:"message",T:hf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Tf=c.makeMessageType("streamlayer.sports.baseball.TeamStanding.Streak",()=>[{no:1,name:"losses",kind:"scalar",T:5},{no:2,name:"wins",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),hf=c.makeMessageType("streamlayer.sports.baseball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),kf=c.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:ff,repeated:!0}]),Mf=c.makeEnum("streamlayer.sports.basketball.BasketballPerformerCategory",[{no:0,name:"BASKETBALL_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"BASKETBALL_PERFORMER_CATEGORY_POINTS",localName:"POINTS"},{no:2,name:"BASKETBALL_PERFORMER_CATEGORY_REBOUNDS",localName:"REBOUNDS"},{no:3,name:"BASKETBALL_PERFORMER_CATEGORY_ASSISTS",localName:"ASSISTS"}]),Nf=c.makeMessageType("streamlayer.sports.basketball.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),hr=c.makeMessageType("streamlayer.sports.basketball.BasketballTeamSummary",()=>[{no:1,name:"field_goal_percentage",kind:"scalar",T:1},{no:2,name:"three_pts_percentage",kind:"scalar",T:1},{no:3,name:"free_throw_percentage",kind:"scalar",T:1},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5}]),kr=c.makeMessageType("streamlayer.sports.basketball.BasketballPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:9}]),If=c.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(Mf)},{no:2,name:"home_player",kind:"message",T:kr},{no:3,name:"away_player",kind:"message",T:kr}]),Sf=c.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:hr},{no:2,name:"away_statistics",kind:"message",T:hr}]),Af=c.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Sf},{no:2,name:"top_performers",kind:"message",T:If,repeated:!0},{no:3,name:"last_games",kind:"message",T:ro}]),Ef=c.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:Xn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),bf=c.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Ef,repeated:!0}]),Mr=c.makeMessageType("streamlayer.sports.basketball.PlayerScores",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"points",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"rebounds",kind:"scalar",T:5},{no:6,name:"minutes",kind:"scalar",T:1},{no:7,name:"starter",kind:"scalar",T:8}]),Df=c.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Mr,repeated:!0},{no:2,name:"away_players",kind:"message",T:Mr,repeated:!0}]),vf=c.makeMessageType("streamlayer.sports.basketball.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:wf},{no:11,name:"rank",kind:"message",T:_f},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),wf=c.makeMessageType("streamlayer.sports.basketball.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),_f=c.makeMessageType("streamlayer.sports.basketball.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),jf=c.makeMessageType("streamlayer.sports.basketball.Standings",()=>[{no:1,name:"standings",kind:"message",T:vf,repeated:!0}]),Nr=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),Ir=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineup",()=>[{no:3,name:"start_players",kind:"message",T:Nr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Nr,repeated:!0}]),Of=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Ir},{no:2,name:"away_team",kind:"message",T:Ir}]),ta=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:Lf}]),Lf=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGame.BasketballLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"BasketballLastGame_BasketballLastGameAttributes"}),ro=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGames",()=>[{no:1,name:"home",kind:"message",T:ta,repeated:!0},{no:2,name:"away",kind:"message",T:ta,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:ta,repeated:!0}]),Rf=c.makeEnum("streamlayer.sports.hockey.HockeyPerformerCategory",[{no:0,name:"HOCKEY_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PERFORMER_CATEGORY_GOALS",localName:"GOALS"},{no:2,name:"HOCKEY_PERFORMER_CATEGORY_SHOTS",localName:"SHOTS"},{no:3,name:"HOCKEY_PERFORMER_CATEGORY_HITS",localName:"HITS"},{no:4,name:"HOCKEY_PERFORMER_CATEGORY_SAVES",localName:"SAVES"}]),io=c.makeEnum("streamlayer.sports.hockey.HockeyPlayerPosition",[{no:0,name:"HOCKEY_PLAYER_POSITION_UNSET",localName:"UNSET"},{no:1,name:"HOCKEY_PLAYER_POSITION_CENTER",localName:"CENTER"},{no:2,name:"HOCKEY_PLAYER_POSITION_LEFT_WIND",localName:"LEFT_WIND"},{no:3,name:"HOCKEY_PLAYER_POSITION_RIGHT_WING",localName:"RIGHT_WING"},{no:4,name:"HOCKEY_PLAYER_POSITION_DEFENSE",localName:"DEFENSE"},{no:5,name:"HOCKEY_PLAYER_POSITION_GOALTENDER",localName:"GOALTENDER"}]),xf=c.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),Sr=c.makeMessageType("streamlayer.sports.hockey.HockeyPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),Cf=c.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(Rf)},{no:2,name:"home_player",kind:"message",T:Sr,repeated:!0},{no:3,name:"away_player",kind:"message",T:Sr,repeated:!0}]),Ar=c.makeMessageType("streamlayer.sports.hockey.HockeyTeamSummary",()=>[{no:1,name:"shots_on_goal",kind:"scalar",T:5},{no:2,name:"faceoff",kind:"scalar",T:1},{no:3,name:"powerplay",kind:"scalar",T:5},{no:4,name:"penalty_minutes",kind:"scalar",T:5},{no:5,name:"hits",kind:"scalar",T:5},{no:6,name:"blocks",kind:"scalar",T:5},{no:7,name:"giveaways",kind:"scalar",T:5},{no:8,name:"takeaways",kind:"scalar",T:5}]),zf=c.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Ar},{no:2,name:"away_statistics",kind:"message",T:Ar}]),Uf=c.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:zf},{no:2,name:"top_performers",kind:"message",T:Cf,repeated:!0}]),Pf=c.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:Xn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5}]),Bf=c.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Pf,repeated:!0}]),aa=c.makeMessageType("streamlayer.sports.hockey.PlayerScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"goals",kind:"scalar",T:5},{no:4,name:"assists",kind:"scalar",T:5},{no:5,name:"shots",kind:"scalar",T:5},{no:6,name:"penalty_minutes",kind:"scalar",T:1},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:c.getEnumType(io)}]),Er=c.makeMessageType("streamlayer.sports.hockey.GoaltenderScore",()=>[{no:1,name:"jersey",kind:"scalar",T:5},{no:2,name:"full_name",kind:"scalar",T:9},{no:3,name:"shots_againts",kind:"scalar",T:5},{no:4,name:"goals_againts",kind:"scalar",T:5},{no:5,name:"saves",kind:"scalar",T:5},{no:6,name:"saves_pct",kind:"scalar",T:5},{no:7,name:"minutes",kind:"scalar",T:9},{no:8,name:"position",kind:"enum",T:c.getEnumType(io)}]),br=c.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:aa,repeated:!0},{no:2,name:"goaltender",kind:"message",T:Er},{no:3,name:"forwards",kind:"message",T:aa,repeated:!0},{no:4,name:"defensemen",kind:"message",T:aa,repeated:!0},{no:5,name:"goaltenders",kind:"message",T:Er,repeated:!0}]),Qf=c.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:br},{no:2,name:"away_players",kind:"message",T:br}]),Ff=c.makeMessageType("streamlayer.sports.hockey.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"pct",kind:"scalar",T:1},{no:9,name:"games_behind",kind:"scalar",T:5},{no:10,name:"streak",kind:"message",T:Gf},{no:11,name:"rank",kind:"message",T:Yf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Gf=c.makeMessageType("streamlayer.sports.hockey.TeamStanding.Streak",()=>[{no:1,name:"kind",kind:"scalar",T:9},{no:2,name:"length",kind:"scalar",T:5}],{localName:"TeamStanding_Streak"}),Yf=c.makeMessageType("streamlayer.sports.hockey.TeamStanding.Rank",()=>[{no:1,name:"division",kind:"scalar",T:5},{no:2,name:"conference",kind:"scalar",T:5}],{localName:"TeamStanding_Rank"}),Vf=c.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:Ff,repeated:!0}]),$f=c.makeEnum("streamlayer.sports.soccer.SoccerPerformerCategory",[{no:0,name:"SOCCER_PERFORMER_CATEGORY_UNSET",localName:"UNSET"},{no:1,name:"SOCCER_PERFORMER_CATEGORY_ATTACK",localName:"ATTACK"},{no:2,name:"SOCCER_PERFORMER_CATEGORY_MIDFIELD",localName:"MIDFIELD"},{no:3,name:"SOCCER_PERFORMER_CATEGORY_DEFENSE",localName:"DEFENSE"}]),qf=c.makeEnum("streamlayer.sports.soccer.SoccerMatchActivityType",[{no:0,name:"SOCCER_MATCH_ACTIVITY_UNSET"},{no:1,name:"SOCCER_MATCH_ACTIVITY_GOAL"},{no:2,name:"SOCCER_MATCH_ACTIVITY_YELLOW_CARD"},{no:3,name:"SOCCER_MATCH_ACTIVITY_RED_CARD"},{no:4,name:"SOCCER_MATCH_ACTIVITY_SUBSTITUTION"},{no:5,name:"SOCCER_MATCH_ACTIVITY_HALF_TIME"},{no:6,name:"SOCCER_MATCH_ACTIVITY_FULL_TIME"}]),Wf=c.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:an},{no:9,name:"away_team_record",kind:"message",T:an}]),is=c.makeMessageType("streamlayer.sports.soccer.SoccerPerformer",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"photo",kind:"scalar",T:9},{no:3,name:"score",kind:"scalar",T:5}]),Hf=c.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:is},{no:2,name:"attack_stats",kind:"message",T:sT}]),Zf=c.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:is},{no:2,name:"midfield_stats",kind:"message",T:rT}]),Kf=c.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:is},{no:2,name:"defense_stats",kind:"message",T:iT}]),Jf=c.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType($f)},{no:2,name:"attack_performer",kind:"message",T:Hf},{no:3,name:"midfield_performer",kind:"message",T:Zf},{no:4,name:"defense_performer",kind:"message",T:Kf}]),Xf=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamTopMatchStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"shots",kind:"scalar",T:5},{no:3,name:"shots_on_target",kind:"scalar",T:5},{no:4,name:"passes",kind:"scalar",T:5},{no:5,name:"offsides",kind:"scalar",T:5},{no:6,name:"yellow_cards",kind:"scalar",T:5},{no:7,name:"corner_kicks",kind:"scalar",T:5},{no:8,name:"free_kicks",kind:"scalar",T:5},{no:9,name:"red_cards",kind:"scalar",T:5}]),eT=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamAttackingStats",()=>[{no:1,name:"possession",kind:"scalar",T:1},{no:2,name:"passing_accuracy",kind:"scalar",T:1},{no:3,name:"chances_created",kind:"scalar",T:5},{no:4,name:"successful_crosses",kind:"scalar",T:1}]),nT=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamDefenseStats",()=>[{no:1,name:"tackles_made",kind:"scalar",T:5},{no:2,name:"interceptions",kind:"scalar",T:5},{no:3,name:"blocked_shots",kind:"scalar",T:5},{no:4,name:"clearances",kind:"scalar",T:5},{no:5,name:"duels_won",kind:"scalar",T:5}]),Dr=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:Xf},{no:2,name:"attacking_stats",kind:"message",T:eT},{no:3,name:"defense_stats",kind:"message",T:nT}]),tT=c.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Dr},{no:2,name:"away_statistics",kind:"message",T:Dr},{no:3,name:"perfomers",kind:"message",T:Jf}]),aT=c.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:tT},{no:2,name:"last_games",kind:"message",T:oo}]),sT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayerAttackingStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"shots",kind:"scalar",T:5},{no:4,name:"shots_on_goal",kind:"scalar",T:5},{no:5,name:"penalty_kick_goals",kind:"scalar",T:5}]),rT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayerMidfieldStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"key_passes",kind:"scalar",T:5},{no:4,name:"crosses",kind:"scalar",T:5},{no:5,name:"corners",kind:"scalar",T:5}]),iT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayerDefenseStats",()=>[{no:1,name:"goals",kind:"scalar",T:5},{no:2,name:"assists",kind:"scalar",T:5},{no:3,name:"tackles_made",kind:"scalar",T:5},{no:4,name:"interceptions",kind:"scalar",T:5},{no:5,name:"blocked_shots",kind:"scalar",T:5}]);c.makeMessageType("streamlayer.sports.soccer.SoccerMatchOdds",()=>[{no:1,name:"home_team_win",kind:"scalar",T:1},{no:2,name:"draw",kind:"scalar",T:1},{no:3,name:"away_team_win",kind:"scalar",T:1}]);const oT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrixPlayer",()=>[{no:1,name:"jersey_number",kind:"scalar",T:5},{no:2,name:"player_name",kind:"scalar",T:9},{no:3,name:"photo",kind:"scalar",T:9}]),cT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:oT,repeated:!0}]),vr=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchPlayer",()=>[{no:1,name:"first_name",kind:"scalar",T:9},{no:2,name:"last_name",kind:"scalar",T:9},{no:3,name:"display_name",kind:"scalar",T:9},{no:4,name:"photo",kind:"scalar",T:9},{no:5,name:"position",kind:"scalar",T:9},{no:6,name:"jersey",kind:"scalar",T:5}]),wr=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineup",()=>[{no:1,name:"formation_string",kind:"scalar",T:9},{no:2,name:"formation_matrix",kind:"message",T:cT,repeated:!0},{no:3,name:"start_players",kind:"message",T:vr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:vr,repeated:!0}]),lT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:wr},{no:2,name:"away_team",kind:"message",T:wr}]);c.makeMessageType("streamlayer.sports.soccer.SoccerMatchScore",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"mil",kind:"scalar",T:1},{no:3,name:"round",kind:"scalar",T:9},{no:4,name:"live_url",kind:"scalar",T:9}]);const uT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:sn},{no:2,name:"event_time",kind:"message",T:Xn},{no:3,name:"score_home",kind:"scalar",T:5},{no:4,name:"score_away",kind:"scalar",T:5},{no:5,name:"play_text",kind:"scalar",T:9},{no:6,name:"scoring",kind:"scalar",T:8},{no:7,name:"play_id",kind:"scalar",T:5},{no:8,name:"type",kind:"enum",T:c.getEnumType(qf)}]),mT=c.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:uT,repeated:!0}]),dT=c.makeMessageType("streamlayer.sports.soccer.TeamStanding",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"alias",kind:"scalar",T:9},{no:4,name:"logo",kind:"scalar",T:9},{no:5,name:"colors",kind:"scalar",T:9,repeated:!0},{no:6,name:"wins",kind:"scalar",T:5},{no:7,name:"losses",kind:"scalar",T:5},{no:8,name:"draws",kind:"scalar",T:5},{no:9,name:"games_behind",kind:"scalar",T:5},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"points",kind:"scalar",T:5},{no:14,name:"position",kind:"scalar",T:5},{no:15,name:"total_goals",kind:"scalar",T:5},{no:16,name:"total_goals_received",kind:"scalar",T:5}]),pT=c.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:dT,repeated:!0}]),sa=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:yT}]),yT=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGame.SoccerLastGameAttributes",()=>[{no:1,name:"league",kind:"scalar",T:9},{no:2,name:"home_team",kind:"scalar",T:9},{no:3,name:"away_team",kind:"scalar",T:9},{no:5,name:"home_score",kind:"scalar",T:5},{no:6,name:"away_score",kind:"scalar",T:5},{no:7,name:"date",kind:"scalar",T:9}],{localName:"SoccerLastGame_SoccerLastGameAttributes"}),oo=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGames",()=>[{no:1,name:"home",kind:"message",T:sa,repeated:!0},{no:2,name:"away",kind:"message",T:sa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:sa,repeated:!0}]),Tn=c.makeEnum("streamlayer.sports.events.EventType",[{no:0,name:"EVENT_TYPE_UNSET",localName:"UNSET"},{no:1,name:"EVENT_TYPE_BASEBALL",localName:"BASEBALL"},{no:2,name:"EVENT_TYPE_BASKETBALL",localName:"BASKETBALL"},{no:3,name:"EVENT_TYPE_HOCKEY",localName:"HOCKEY"},{no:4,name:"EVENT_TYPE_SOCCER",localName:"SOCCER"},{no:5,name:"EVENT_TYPE_GOLF",localName:"GOLF"}]),gT=c.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:pf,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:Nf,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:xf,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:Wf,oneof:"sport"}]),fT=c.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:gT}]),TT=c.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:tf}]),co=c.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:TT}]),hT=c.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:kT},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"sort",kind:"message",T:no},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),kT=c.makeMessageType("streamlayer.sports.events.ListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9},{no:3,name:"start_date_time",kind:"scalar",T:9},{no:4,name:"end_date_time",kind:"scalar",T:9},{no:5,name:"sport",kind:"scalar",T:9},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"endless",kind:"enum",T:c.getEnumType(rs)}],{localName:"ListRequest_Filter"}),MT=c.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:NT},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"sort",kind:"message",T:no}]),NT=c.makeMessageType("streamlayer.sports.events.DemoListRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"DemoListRequest_Filter"}),IT=c.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:xt},{no:2,name:"data",kind:"message",T:co,repeated:!0}]),ST=c.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:xt},{no:2,name:"data",kind:"message",T:co,repeated:!0}]),_r=c.makeMessageType("streamlayer.sports.events.SummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),jr=c.makeMessageType("streamlayer.sports.events.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:AT}]),AT=c.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:ET}],{localName:"SummaryResponse_ResponseData"}),ET=c.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:gf,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Af,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Uf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:aT,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),bT=c.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),DT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:vT}]),vT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:wT}],{localName:"AdminSummaryResponse_ResponseData"}),wT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),_T=c.makeMessageType("streamlayer.sports.events.PlayByPlayRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"order",kind:"scalar",T:9}]),jT=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse",()=>[{no:1,name:"data",kind:"message",T:OT},{no:2,name:"meta",kind:"message",T:xt}]),OT=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:LT}],{localName:"PlayByPlayResponse_ResponseData"}),LT=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"baseball",kind:"message",T:yf,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:bf,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Bf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:mT,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),RT=c.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:xT},{no:2,name:"pagination",kind:"message",T:Rt}]),xT=c.makeMessageType("streamlayer.sports.events.ScheduleRequest.Filter",()=>[{no:1,name:"date",kind:"scalar",T:9},{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleRequest_Filter"}),CT=c.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:fT,repeated:!0},{no:2,name:"meta",kind:"message",T:xt}]),zT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:UT}]),UT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),PT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),BT=c.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),QT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:FT}]),FT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:GT}],{localName:"BoxscoreResponse_ResponseData"}),GT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"basketball",kind:"message",T:Df,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Qf,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),YT=c.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),VT=c.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:$T}]),$T=c.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:2,name:"attributes",kind:"message",T:qT}],{localName:"StandingsResponse_ResponseData"}),qT=c.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData.StandingsResponseAttributes",()=>[{no:2,name:"basketball",kind:"message",T:jf,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Vf,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:kf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:pT,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),WT=c.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),HT=c.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:ZT}]),ZT=c.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:KT}],{localName:"LineupResponse_ResponseData"}),KT=c.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"soccer",kind:"message",T:lT,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Of,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),JT=c.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),XT=c.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:eh}]),eh=c.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(Tn)},{no:3,name:"attributes",kind:"message",T:nh}],{localName:"LastGamesResponse_ResponseData"}),nh=c.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:fn},{no:2,name:"soccer",kind:"message",T:oo,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:ro,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),th=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ah=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:sh}]),sh=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"}),rh={typeName:"streamlayer.sports.events.Events",methods:{list:{name:"List",I:hT,O:ST,kind:P.Unary},demoList:{name:"DemoList",I:MT,O:IT,kind:P.Unary},summary:{name:"Summary",I:_r,O:jr,kind:P.Unary},adminSummary:{name:"AdminSummary",I:bT,O:DT,kind:P.Unary},boxscore:{name:"Boxscore",I:BT,O:QT,kind:P.Unary},standings:{name:"Standings",I:YT,O:VT,kind:P.Unary},playByPlay:{name:"PlayByPlay",I:_T,O:jT,kind:P.Unary},schedule:{name:"Schedule",I:RT,O:CT,kind:P.Unary},scheduleDates:{name:"ScheduleDates",I:zT,O:PT,kind:P.Unary},lineup:{name:"Lineup",I:WT,O:HT,kind:P.Unary},retrieveEventId:{name:"RetrieveEventId",I:th,O:ah,kind:P.Unary},lastGames:{name:"LastGames",I:JT,O:XT,kind:P.Unary},summarySubscription:{name:"SummarySubscription",I:_r,O:jr,kind:P.ServerStreaming}}},ih=c.makeEnum("streamlayer.sdkSettings.client.VisibleStatus",[{no:0,name:"VISIBLE_STATUS_UNSET",localName:"UNSET"},{no:1,name:"VISIBLE_STATUS_INCOGNITO",localName:"INCOGNITO"},{no:2,name:"VISIBLE_STATUS_VISIBLE",localName:"VISIBLE"}]),oh=c.makeEnum("streamlayer.sdkSettings.client.MessagesNotify",[{no:0,name:"MESSAGES_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_NOTIFY_ALLOW",localName:"ALLOW"}]),ch=c.makeEnum("streamlayer.sdkSettings.client.FriendsNotify",[{no:0,name:"FRIENDS_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_NOTIFY_ALLOW",localName:"ALLOW"}]),lh=c.makeEnum("streamlayer.sdkSettings.client.TwitterNotify",[{no:0,name:"TWITTER_NOTIFY_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_NOTIFY_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_NOTIFY_ALLOW",localName:"ALLOW"}]),uh=c.makeEnum("streamlayer.sdkSettings.client.CallsSound",[{no:0,name:"CALLS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"CALLS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"CALLS_SOUND_ALLOW",localName:"ALLOW"}]),mh=c.makeEnum("streamlayer.sdkSettings.client.MessagesSound",[{no:0,name:"MESSAGES_SOUND_UNSET",localName:"UNSET"},{no:1,name:"MESSAGES_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"MESSAGES_SOUND_ALLOW",localName:"ALLOW"}]),dh=c.makeEnum("streamlayer.sdkSettings.client.FriendsSound",[{no:0,name:"FRIENDS_SOUND_UNSET",localName:"UNSET"},{no:1,name:"FRIENDS_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"FRIENDS_SOUND_ALLOW",localName:"ALLOW"}]),ph=c.makeEnum("streamlayer.sdkSettings.client.TwitterSound",[{no:0,name:"TWITTER_SOUND_UNSET",localName:"UNSET"},{no:1,name:"TWITTER_SOUND_DISALLOW",localName:"DISALLOW"},{no:2,name:"TWITTER_SOUND_ALLOW",localName:"ALLOW"}]),lo=c.makeEnum("streamlayer.sdkSettings.client.SettingsAllow",[{no:0,name:"SETTINGS_ALLOW_UNSET",localName:"UNSET"},{no:1,name:"SETTINGS_ALLOW_DISALLOW",localName:"DISALLOW"},{no:2,name:"SETTINGS_ALLOW_ALLOW",localName:"ALLOW"}]),yh=c.makeEnum("streamlayer.sdkSettings.client.ManagedGroupType",[{no:0,name:"MANAGED_GROUP_TYPE_UNSET",localName:"UNSET"},{no:1,name:"MANAGED_GROUP_TYPE_CHAT",localName:"CHAT"},{no:2,name:"MANAGED_GROUP_TYPE_WP",localName:"WP"}]),gh=c.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:c.getEnumType(lo)}]),fh=c.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:c.getEnumType(lo)}]),ra=c.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:gh},{no:2,name:"sound",kind:"message",T:fh}]),os=c.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:c.getEnumType(ih)},{no:2,name:"messages_notify",kind:"enum",T:c.getEnumType(oh)},{no:3,name:"friends_notify",kind:"enum",T:c.getEnumType(ch)},{no:4,name:"calls_sound",kind:"enum",T:c.getEnumType(uh)},{no:5,name:"messages_sound",kind:"enum",T:c.getEnumType(mh)},{no:6,name:"friends_sound",kind:"enum",T:c.getEnumType(dh)},{no:7,name:"twitter_notify",kind:"enum",T:c.getEnumType(lh)},{no:8,name:"twitter_sound",kind:"enum",T:c.getEnumType(ph)},{no:9,name:"gamification",kind:"message",T:ra},{no:10,name:"watch_party_invitation",kind:"message",T:ra},{no:11,name:"twitter_question",kind:"message",T:ra}]),Th=c.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),hh=c.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:kh}]),kh=c.makeMessageType("streamlayer.sdkSettings.client.GetResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:os}],{localName:"GetResponse_GetResponseData"}),Mh=c.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:os}]),Nh=c.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:Ih}]),Ih=c.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse.UpdateResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:os}],{localName:"UpdateResponse_UpdateResponseData"}),Sh=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ah=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:Eh}]),Eh=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Wi}],{localName:"GetStreamResponse_GetResponseData"}),bh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),Dh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:vh}]),vh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse.GetResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Hi}],{localName:"GetOrganizationResponse_GetResponseData"}),wh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),_h=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:jh}]),jh=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse.GetOrganizationAdvertisingResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Zi}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),Oh=c.makeMessageType("streamlayer.sdkSettings.client.ManagedGroup",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"fantasy_group_id",kind:"scalar",T:9},{no:3,name:"group_type",kind:"enum",T:c.getEnumType(yh)}]),uo=c.makeMessageType("streamlayer.sdkSettings.client.DeepLinkData",()=>[{no:1,name:"group_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9},{no:3,name:"gamification",kind:"scalar",T:8},{no:4,name:"managed_group",kind:"message",T:Oh},{no:5,name:"external_event_id",kind:"scalar",T:9}]),Lh=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:uo}]),Rh=c.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),xh=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:Ch}]),Ch=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Rh}],{localName:"GenerateDeepLinkResponse_GenerateDeepLinkResponseData"});c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkRequest",()=>[{no:1,name:"url",kind:"scalar",T:9}]);c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:zh}]);const zh=c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:uo}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),Uh=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ph=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),Bh=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Qh}]),Qh=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Wi}],{localName:"StreamSubscriptionResponse_ResponseData"}),Fh=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Gh}]),Gh=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:Hi}],{localName:"OrganizationSubscriptionResponse_ResponseData"}),zt={typeName:"streamlayer.sdkSettings.client.Client",methods:{get:{name:"Get",I:Th,O:hh,kind:P.Unary},update:{name:"Update",I:Mh,O:Nh,kind:P.Unary},getStream:{name:"GetStream",I:Sh,O:Ah,kind:P.Unary},getOrganization:{name:"GetOrganization",I:bh,O:Dh,kind:P.Unary},getOrganizationAdvertising:{name:"GetOrganizationAdvertising",I:wh,O:_h,kind:P.Unary},generateDeepLink:{name:"GenerateDeepLink",I:Lh,O:xh,kind:P.Unary},streamSubscription:{name:"StreamSubscription",I:Uh,O:Bh,kind:P.ServerStreaming},organizationSubscription:{name:"OrganizationSubscription",I:Ph,O:Fh,kind:P.ServerStreaming}}},Yh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(rh,{method:"retrieveEventId",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var l;if(!i||typeof i!="string")return"";try{return((l=(await t.retrieveEventId({id:i})).data)==null?void 0:l.id)||""}catch{return""}}})},Vh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(zt,{method:"getStream",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m;return i?(m=(await t.getStream({id:i})).data)==null?void 0:m.attributes:void 0}})},$h=(n,e)=>{const{queryKey:t,client:s}=e.createPromiseClient(Jn,{method:"me",params:[n]});return e.nanoquery.createFetcherStore(t,{fetcher:()=>s.me({})})},qh=n=>{const{client:e,queryKeyStr:t}=n.createPromiseClient(Jn,{method:"bypassAuth"});return n.nanoquery.createMutatorStore(async({data:{userKey:s,schema:a,init:r},getCacheUpdater:i})=>{const[l]=i(t),m=await e.bypassAuth({userKey:s,schema:a,init:r});return l(m),m})},Wh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(zt,{method:"get",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async()=>{var r;return(r=(await t.get({})).data)==null?void 0:r.attributes}})},Hh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(zt,{method:"getOrganization",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async()=>{const a=await t.getOrganization({});return a.data?{...a.data.attributes,id:a.data.id}:void 0}})},Zh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(zt,{method:"getOrganizationAdvertising",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async()=>{var r;return(r=(await t.getOrganizationAdvertising({})).data)==null?void 0:r.attributes}})},Kh=(n,e,t)=>{n.transport=new Gg(e.host),n.sdk.host=n.transport.host,n.transport.setSdkKey(e.sdkKey),t()};class mo{constructor(e="main"){N(this,"delimiter",":");N(this,"prefix");N(this,"clear",()=>{for(const e in window.localStorage)e.startsWith(this.prefix)&&window.localStorage.removeItem(e)});N(this,"generateKey",e=>`${this.prefix}${this.delimiter}${e.join(this.delimiter)}`);N(this,"write",(...e)=>{const t=e.pop()||"";window.localStorage.setItem(this.generateKey(e),t)});N(this,"read",(...e)=>{const t=window.localStorage.getItem(this.generateKey(e));return t===null?void 0:t});N(this,"remove",(...e)=>{window.localStorage.removeItem(this.generateKey(e))});this.prefix=`sl-sdk${this.delimiter}${e}`}}class po extends mo{constructor(){super("user");N(this,"setSchema",t=>{this.write("schema",t)});N(this,"getSchema",()=>this.read("schema"));N(this,"setToken",t=>{this.write("token",t)});N(this,"getToken",()=>this.read("token"));N(this,"removeToken",()=>{this.remove("token")});N(this,"clearNotification",()=>{this.clear()})}}var En=(n=>(n.DISABLED="disabled",n.INITIALIZATION="initialization",n.READY="ready",n.FAILED="failed",n.SUSPENDED="suspended",n))(En||{});const Jh=n=>{const e=new Le(Re(),"enabled"),t=new Le(Re("disabled"),"status"),s=new Le(Re(),"userKey"),a=new Le(Re(),"userToken"),r=new po;a.listen(M=>{M?r.setToken(M):r.removeToken()});const i=new Le(Re(),"providerStreamId"),l=new ze(Yh(i.getStore(),n),"slStreamId",M=>M==null?void 0:M.data),m=new ze($h(a.getStore(),n),"user",M=>{var E,D;return(D=(E=M==null?void 0:M.data)==null?void 0:E.data)==null?void 0:D.id}),d=new ze(Wh(a.getStore(),n),"userSettings"),y=new ze(Vh(l.getAtomStore(),n),"streamSettings");l.getAtomStore().listen(M=>{(M===""||M===void 0)&&y.getStore().mutate(void 0)});const h=new ze(Hh(e.getStore(),n),"organizationSettings",M=>{var E;return(E=M==null?void 0:M.data)==null?void 0:E.id}),T=new ze(Zh(h.getAtomStore(),n),"organizationAdvertising");return{enabled:e,status:t,providerStreamId:i,slStreamId:l,streamSettings:y,user:m,userKey:s,userToken:a,userSettings:d,organizationSettings:h,organizationAdvertising:T}};class Xh extends Ot{constructor(t){const s=Jh(t),a=Tg(s);super(a,"core");N(this,"stores");N(this,"subscribe",t=>{let s;for(s in this.stores){const a=t[s];s in t&&a!==void 0&&this.stores[s].subscribe(t[s])}});N(this,"unsubscribe",()=>this.getStore().off());this.stores=s}getValue(){throw new Error("Not implemented")}getValues(){return this.stores}setValue(){throw new Error("Not implemented")}}const ek=(n,e,t)=>{n.store=new Xh(n.transport),n.stores=n.store.getValues(),n.sdk.sdkStore=n.store.getStore(),n.sdk.organizationStore=()=>n.stores.organizationSettings.getStore(),n.storeUnsubscribe=()=>{n.store.unsubscribe()},t()},Ve={typeName:"streamlayer.interactive.feed.Feed",methods:{get:{name:"Get",I:up,O:mp,kind:P.Unary},subscription:{name:"Subscription",I:yd,O:gd,kind:P.ServerStreaming},votingSubscription:{name:"VotingSubscription",I:Td,O:hd,kind:P.ServerStreaming},questionSubscription:{name:"QuestionSubscription",I:Nd,O:Id,kind:P.ServerStreaming},questionByUser:{name:"QuestionByUser",I:Ed,O:bd,kind:P.Unary},syncQuestion:{name:"SyncQuestion",I:vd,O:_d,kind:P.Unary},getQuestion:{name:"GetQuestion",I:Od,O:Ld,kind:P.Unary},questionDetail:{name:"QuestionDetail",I:xd,O:Cd,kind:P.Unary},submitAnswer:{name:"SubmitAnswer",I:Ud,O:Bd,kind:P.Unary},submitInplay:{name:"SubmitInplay",I:Fd,O:Yd,kind:P.Unary},skipQuestion:{name:"SkipQuestion",I:Vd,O:qd,kind:P.Unary},pickHistory:{name:"PickHistory",I:Hd,O:Kd,kind:P.Unary},insightHistory:{name:"InsightHistory",I:ep,O:tp,kind:P.Unary},tweetHistory:{name:"TweetHistory",I:sp,O:ip,kind:P.Unary},promotionHistory:{name:"PromotionHistory",I:pp,O:gp,kind:P.Unary}}},nk=c.makeEnum("streamlayer.interactive.leaderboard.LeaderboardType",[{no:0,name:"LEADERBOARD_TYPE_UNSET",localName:"UNSET"},{no:1,name:"LEADERBOARD_TYPE_TOURNAMENT",localName:"TOURNAMENT"},{no:2,name:"LEADERBOARD_TYPE_EVENT",localName:"EVENT"}]),yo=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(nk)},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"event_ids",kind:"scalar",T:3,repeated:!0},{no:5,name:"leaderboards",kind:"message",T:yo,repeated:!0},{no:6,name:"created_at",kind:"scalar",T:3}]),cs=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardItem",()=>[{no:1,name:"streak",kind:"scalar",T:5},{no:2,name:"correct",kind:"scalar",T:5},{no:3,name:"incorrect",kind:"scalar",T:5},{no:4,name:"points",kind:"scalar",T:5},{no:5,name:"rank",kind:"scalar",T:5},{no:6,name:"name",kind:"scalar",T:9},{no:7,name:"avatar",kind:"scalar",T:9},{no:8,name:"user_id",kind:"scalar",T:9},{no:9,name:"recent_correct",kind:"scalar",T:5},{no:10,name:"streak_loss",kind:"scalar",T:5},{no:11,name:"friends_rank",kind:"scalar",T:5},{no:12,name:"in_top",kind:"scalar",T:5}]),tk=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem",()=>[{no:1,name:"summary",kind:"message",T:cs},{no:2,name:"percentage",kind:"message",T:ak}]),ak=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem.SummaryPercentage",()=>[{no:1,name:"correct",kind:"scalar",T:5},{no:2,name:"average",kind:"scalar",T:5}],{localName:"LeaderboardSummaryItem_SummaryPercentage"}),sk=c.makeMessageType("streamlayer.interactive.leaderboard.ListRequest",()=>[{no:1,name:"pagination",kind:"message",T:Za},{no:2,name:"users_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"event_id",kind:"scalar",T:4},{no:4,name:"leaderboard_id",kind:"scalar",T:9}]),rk=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse",()=>[{no:1,name:"data",kind:"message",T:ik,repeated:!0},{no:2,name:"meta",kind:"message",T:ok}]),ik=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cs}],{localName:"ListResponse_ListResponseData"}),ok=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"ListResponse_ListResponseMeta"}),ck=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:4},{no:2,name:"user_id",kind:"scalar",T:9},{no:3,name:"leaderboard_id",kind:"scalar",T:9},{no:4,name:"users_ids",kind:"scalar",T:9,repeated:!0}]),lk=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:uk}]),uk=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse.SummaryResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:tk}],{localName:"SummaryResponse_SummaryResponseData"}),mk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9}]),dk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse",()=>[{no:2,name:"data",kind:"message",T:pk}]),pk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse.EventLeaderboardsResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yo}],{localName:"EventLeaderboardsResponse_EventLeaderboardsResponseData"}),yk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"pagination",kind:"message",T:Za},{no:4,name:"sort",kind:"message",T:od}]),gk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse",()=>[{no:1,name:"data",kind:"message",T:fk,repeated:!0},{no:2,name:"meta",kind:"message",T:Tk}]),fk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:cs}],{localName:"EventLeaderboardResponse_ListResponseData"}),Tk=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse.ListResponseMeta",()=>[{no:1,name:"count",kind:"scalar",T:5},{no:2,name:"page",kind:"scalar",T:5},{no:3,name:"page_size",kind:"scalar",T:5}],{localName:"EventLeaderboardResponse_ListResponseMeta"}),hk={typeName:"streamlayer.interactive.leaderboard.Leaderboard",methods:{list:{name:"List",I:sk,O:rk,kind:P.Unary},summary:{name:"Summary",I:ck,O:lk,kind:P.Unary},eventLeaderboards:{name:"EventLeaderboards",I:mk,O:dk,kind:P.Unary},eventLeaderboard:{name:"EventLeaderboard",I:yk,O:gk,kind:P.Unary}}},kk=(n,e,t)=>{const{client:s,queryKey:a}=t.createPromiseClient(hk,{method:"summary",params:[n,e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,i,l,m)=>{var y;return(y=(await s.summary({eventId:l,userId:m})).data)==null?void 0:y.attributes}})},Mk=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ve,{method:"syncQuestion",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m;return i?(m=(await t.syncQuestion({filter:{eventId:i}})).data)==null?void 0:m.attributes:void 0}})},Nk=(n,e)=>{const{client:t}=e.createCallbackClient(Ve),s=De.atom({eventId:n.get()||"",feedId:""});return n.subscribe((r="")=>{s.set({eventId:r,feedId:""})}),e.addSubscription(t.subscription,s,{name:"feedSubscription"})},Ik=(n,e)=>{const{client:t}=e.createCallbackClient(Ve);return e.addSubscription(t.questionSubscription,{questionId:n},{name:"questionSubscription"})},Sk=async(n,e)=>{var a,r;const{client:t}=e.createPromiseClient(Ve,{method:"questionByUser",params:[n]});return(r=(a=(await t.questionByUser({questionId:n})).data)==null?void 0:a.attributes)==null?void 0:r.question},Ak=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ve,{method:"questionByUser",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m,d;return(d=(m=(await t.questionByUser({questionId:i})).data)==null?void 0:m.attributes)==null?void 0:d.question}})},Ek=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ve,{method:"pickHistory",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m;return i?(m=(await t.pickHistory({eventId:i})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},bk=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ve,{method:"insightHistory",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,i)=>{var m;return i?(m=(await t.insightHistory({eventId:i})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},go=n=>(n.gamification||(n.gamification=new Dk(n)),n.gamification);class Dk{constructor(e){N(this,"slStreamId");N(this,"organizationId");N(this,"userId");N(this,"openedQuestionId");N(this,"openedQuestion");N(this,"activeQuestionId");N(this,"moderationId");N(this,"feedSubscription");N(this,"questionSubscription");N(this,"notifications");N(this,"log");N(this,"getCurrentSessionId",e=>{const t=e.eventId||this.slStreamId.get()||"",s=e.userId||this.userId.get()||"",a=e.organizationId||this.organizationId.get()||"",r=e.entity||"",i=e.prefix||"";return[a,t,s,i,r].join(":")});N(this,"disconnect",()=>{var e;(e=this.feedSubscription)==null||e.disconnect()});N(this,"openQuestion",e=>{this.openedQuestionId.set(e),this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:e}))});N(this,"closeQuestion",e=>{this.openedQuestionId.set(void 0),e&&this.notifications.markAsViewed(this.getCurrentSessionId({prefix:"notification",entity:e}))});if(e.gamification)throw new Error("GamificationBackground Singleton error");this.log=eo("gamification-background"),this.slStreamId=e.stores.slStreamId.getAtomStore(),this.organizationId=e.stores.organizationSettings.getAtomStore(),this.userId=e.stores.user.getAtomStore(),this.moderationId=new Le(Re(),"moderationId").getStore(),this.openedQuestionId=new Le(Re(),"openedQuestionId").getStore(),this.notifications=e.notifications,this.activeQuestionId=new ze(Mk(this.slStreamId,e.transport),"gamification:activeQuestionId"),this.openedQuestion=new ze(Ak(this.openedQuestionId,e.transport),"gamification:activeQuestionId"),this.openedQuestionId.listen(t=>{var s;this.log.debug({questionId:t},"received question"),t?(this.questionSubscription=Ik(t,e.transport),this.questionSubscription.addListener("feed-subscription-opened-question",a=>{window.requestAnimationFrame(()=>{var r,i,l,m;(l=this.openedQuestion)==null||l.getStore().mutate((i=(r=a.data)==null?void 0:r.attributes)==null?void 0:i.question),(m=this.openedQuestion)==null||m.getStore().invalidate()})}),this.questionSubscription.connect()):(this.log.info("cleanup on close question"),(s=this.openedQuestion)==null||s.getStore().mutate(void 0),this.questionSubscription!==void 0&&(e.transport.removeSubscription(this.questionSubscription),this.questionSubscription=void 0))}),this.feedSubscription=Nk(this.slStreamId,e.transport),this.feedSubscription.addListener("feed-subscription-active-question",t=>{window.requestAnimationFrame(()=>{var a;const s=this.activeQuestionId.getStore();s&&s.mutate((a=t.data)==null?void 0:a.attributes)})})}}class vk{constructor(e){N(this,"notificationsList");N(this,"notifications");N(this,"store");N(this,"timeouts");N(this,"waitingQueue");N(this,"activeQueue");N(this,"options");N(this,"logger");N(this,"addToQueue",e=>{if(this.store.has(e.id)){this.logger.debug({notification:e},"skip existed notification: %o");return}const t=e.close,s=e.action;this.store.set(e.id,{...e,close:(...a)=>{t&&t(...a),this.closeNotification(e.id)},action:(...a)=>{s&&s(...a),this.closeNotification(e.id)}}),this.waitingQueue.add(e.id),this.logger.debug({notification:e},"notification added to waiting queue"),this.tickWaitingQueue()});N(this,"tickWaitingQueue",()=>{if(this.activeQueue.size<this.options.concurrency){const[e]=this.waitingQueue;if(!e)return;this.activeQueue.add(e),this.waitingQueue.delete(e),this.logger.debug({job:e},"waiting queue tick"),this.tickActiveQueue(e)}else this.logger.debug({queueSize:this.activeQueue.size,concurrency:this.options.concurrency},"waiting queue tick skipped")});N(this,"tickActiveQueue",e=>{if(!e)return;const t=this.store.get(e);if(!t){this.logger.debug({notificationId:e},"active queue tick skipped, notification not exist");return}const s=setTimeout(()=>{const a=e,r=new Map(this.notifications.getValue());r.set(t.id,t),this.notifications.setValue(r);const i=setTimeout(()=>{this.logger.debug({notificationId:a},"notification hidding by autoHideDuration"),this.closeNotification(a)},t.autoHideDuration||5e3);this.timeouts.set(a,i),this.logger.debug({notificationId:a,queue:[...r.values()]},"notification displayed")},t.delay||0);this.timeouts.set(e,s),this.logger.debug({notificationId:e},"active queue tick completed"),this.tickWaitingQueue()});N(this,"closeNotification",e=>{const t=new Map(this.notifications.getValue()),s=t.get(e);if(s){s.hiding=!0,this.notifications.setValue(t);const a=setTimeout(()=>{const r=new Map(this.notifications.getValue());r.delete(e),this.notifications.setValue(r);const i=this.timeouts.get(e);i!==void 0&&(clearTimeout(i),this.timeouts.delete(e)),this.logger.debug({notificationId:e},"notification hidden")},this.options.animationDelay||0);this.timeouts.set(e,a)}this.store.delete(e),this.activeQueue.delete(e),this.waitingQueue.delete(e),this.tickWaitingQueue(),this.logger.debug({notificationId:e},"notification hidding")});this.options=e,this.logger=eo("notifications"),this.store=new Map,this.timeouts=new Map,this.waitingQueue=new Set,this.activeQueue=new Set,this.notifications=new Le(Re(new Map),"notifications-queue"),this.notificationsList=ns(this.notifications.getStore(),t=>t?[...t.values()]:[])}}class wk extends mo{constructor(){super("notification");N(this,"setOpened",t=>{this.write("opened",t,"true")});N(this,"isOpened",t=>this.read("opened",t));N(this,"clearNotification",()=>{this.clear()})}}var dn=(n=>(n[n.ONBOARDING=1]="ONBOARDING",n[n.QUESTION=2]="QUESTION",n))(dn||{});let _k=class{constructor(e={}){N(this,"queue");N(this,"storage");N(this,"add",e=>{this.storage.isOpened(e.id)||this.queue.addToQueue(e)});N(this,"close",e=>{this.queue.closeNotification(e),this.markAsViewed(e)});N(this,"getQueueStore",()=>this.queue.notificationsList);N(this,"markAsViewed",e=>{this.storage.setOpened(e)});this.storage=new wk,this.queue=new vk({concurrency:1,animationDelay:300,...e})}};const jk=(n,e,t)=>{n.notifications=new _k,n.addNotification=n.notifications.add,n.sdk.getNotificationsStore=()=>n.notifications.getQueueStore(),t()},Ok=(n,e)=>{const{client:t}=n.createPromiseClient(Ve,{method:"submitAnswer"});return t.submitAnswer({data:e})},Lk=(n,e)=>{const{client:t}=n.createPromiseClient(Ve,{method:"submitInplay"});return t.submitInplay({data:{eventId:+e}})},Rk=(n,e)=>{const{client:t}=n.createPromiseClient(Ve,{method:"skipQuestion"});return t.skipQuestion({data:{id:e}})},Or=new Set([ge.POLL,ge.PREDICTION,ge.TRIVIA]);class fo extends es{constructor(t,s,a){super(t,s);N(this,"userSummary");N(this,"questions");N(this,"leaderboardId");N(this,"onbordingComplete");N(this,"openedQuestion");N(this,"notifications");N(this,"transport");N(this,"closeFeature");N(this,"openFeature");N(this,"background");N(this,"showOnbordingInApp",t=>{var i,l,m,d;if(t)return;const{inplayGame:s}=this.featureSettings.get();if(!s)return;const{titleCard:a,overview:r}=s;this.notifications.add({type:dn.ONBOARDING,id:this.background.getCurrentSessionId({prefix:"onboarding"}),action:this.openFeature,close:this.closeFeature,autoHideDuration:1e5,data:{header:a==null?void 0:a.header,title:a==null?void 0:a.title,subtitle:a==null?void 0:a.subtitle,graphicBg:(i=a==null?void 0:a.appearance)==null?void 0:i.graphic,icon:(l=a==null?void 0:a.media)==null?void 0:l.icon,sponsorLogo:(m=a==null?void 0:a.media)==null?void 0:m.sponsorLogo,primaryColor:(d=r==null?void 0:r.appearance)==null?void 0:d.primaryColor}})});N(this,"connect",t=>{this.userSummary?this.userSummary.invalidate():this.userSummary=new ze(kk(this.background.slStreamId,this.background.userId,t),"gamification:userSummary"),this.questions?this.questions.invalidate():this.questions=new ze(Ek(this.background.slStreamId,t),"gamification:questions"),this.background.feedSubscription.addListener("feed-subscription-prediction-close",s=>{window.requestAnimationFrame(async()=>{var m,d;const a=(d=(m=s.data)==null?void 0:m.attributes)==null?void 0:d.question;if(!a)return;const{status:r,type:i,id:l}=a;if(r===Ze.RESOLVED&&i===ge.PREDICTION){const y=this.background.getCurrentSessionId({prefix:`notification-id:${l}`}),h=await Sk(l,t),T=h==null?void 0:h.answers.find(({correct:M})=>M);this.notifications.add({type:dn.ONBOARDING,action:()=>this.openQuestion(l),close:()=>this.closeQuestion(l),autoHideDuration:5e3,id:y,data:{title:T!=null&&T.youVoted?`Congratulations! You answered correctly! You won ${T.points} pts!`:`Better luck next time! Correct: ${T==null?void 0:T.text}!`}})}})}),this.background.feedSubscription.addListener("feed-subscription-questions-list",()=>{window.requestAnimationFrame(()=>{var s;(s=this.questions)==null||s.invalidate()})})});N(this,"disconnect",()=>{this.background.feedSubscription.removeListener("feed-subscription-questions-list")});N(this,"submitInplay",async()=>{const t=this.background.slStreamId.get();t&&(await Lk(this.transport,t),this.onbordingComplete.set(!0),localStorage.setItem(`sl-onbording:${this.background.userId.get()}:${t}`,"true"))});N(this,"submitAnswer",async(t,s)=>{var a;await Ok(this.transport,{questionId:t,answerId:s}),(a=this.questions)==null||a.invalidate()});N(this,"skipQuestion",async t=>{var s;await Rk(this.transport,t),(s=this.questions)==null||s.invalidate()});N(this,"openQuestion",t=>(this.openFeature(),this.background.openQuestion(t)));N(this,"closeQuestion",t=>this.background.closeQuestion(t));if(this.background=go(a),this.leaderboardId=new Le(Re(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.onbordingComplete=new Le(Re(!1),"onbordingComplete").getStore(),this.notifications=a.notifications,this.transport=a.transport,this.closeFeature=a.sdk.closeFeature,this.openFeature=()=>a.sdk.openFeature(ve.GAMES),this.openedQuestion=ns(this.background.openedQuestion.getStore(),r=>{var i;if((i=r.data)!=null&&i.type&&Or.has(r.data.type))return r.data}),!this.background.userId.get())this.background.userId.subscribe(r=>{r&&window.requestAnimationFrame(()=>{const l=!!localStorage.getItem(`sl-onbording:${r}:${this.background.slStreamId.get()}`);this.onbordingComplete.set(l),this.showOnbordingInApp(l)})});else{const r=this.background.userId.get(),l=!!localStorage.getItem(`sl-onbording:${r}:${this.background.slStreamId.get()}`);this.onbordingComplete.set(l),this.showOnbordingInApp(l)}this.status.subscribe(r=>{r===He.Ready?(this.notifications.close(this.background.getCurrentSessionId({prefix:"onboarding"})),this.connect(a.transport)):this.disconnect()}),this.onbordingComplete.subscribe(r=>{r&&this.background.activeQuestionId.invalidate()}),this.background.activeQuestionId.listen(r=>{r&&r.data&&this.onbordingComplete.get()&&Or.has(r.data.question.type)&&r.data.question.status===Ze.ACTIVE&&this.notifications.add({type:dn.QUESTION,action:()=>this.openQuestion(r.data.question.id),close:()=>this.closeQuestion(r.data.question.id),autoHideDuration:5e3,id:this.background.getCurrentSessionId({prefix:"notification",entity:r.data.question.id}),data:{title:r.data.notification.title,color:r.data.notification.indicatorColor,icon:r.data.notification.image,imageMode:r.data.notification.imageMode,imagePosition:r.data.notification.imagePosition}})})}}class To extends es{constructor(t,s,a){super(t,s);N(this,"insights");N(this,"closeFeature");N(this,"openFeature");N(this,"openedInsight");N(this,"notifications");N(this,"transport");N(this,"background");N(this,"connect",()=>{this.insights?this.insights.invalidate():this.insights=new ze(bk(this.background.slStreamId,this.transport),"gamification:insights"),this.background.feedSubscription.addListener("feed-subscription-insights-list",()=>{window.requestAnimationFrame(()=>{var t;(t=this.insights)==null||t.invalidate()})})});N(this,"disconnect",()=>{this.background.feedSubscription.removeListener("feed-subscription-insights-list")});N(this,"openHighlight",t=>(this.openFeature(),this.background.openQuestion(t)));N(this,"closeHighlight",t=>this.background.closeQuestion(t));this.background=go(a),this.notifications=a.notifications,this.transport=a.transport,this.closeFeature=a.sdk.closeFeature,this.openFeature=()=>a.sdk.openFeature(ve.HIGHLIGHTS),this.status.subscribe(r=>{r===He.Ready?this.connect():this.disconnect()}),this.background.activeQuestionId.listen(r=>{r&&r.data&&r.data.question.type===ge.FACTOID&&r.data.question.status===Ze.ACTIVE&&this.notifications.add({type:dn.QUESTION,action:()=>this.openHighlight(r.data.question.id),close:()=>this.closeHighlight(r.data.question.id),autoHideDuration:5e3,id:this.background.getCurrentSessionId({prefix:"notification",entity:r.data.question.id}),data:{title:r.data.notification.title,color:r.data.notification.indicatorColor,icon:r.data.notification.image,imageMode:r.data.notification.imageMode,imagePosition:r.data.notification.imagePosition}})}),this.openedInsight=ns(this.background.openedQuestion.getStore(),r=>{var i;if(((i=r.data)==null?void 0:i.type)===ge.FACTOID)return r.data})}}const xk={[ve.GAMES]:!0,[ve.HIGHLIGHTS]:!0};class Ck extends es{constructor(e,t){super(e,t)}}const zk=(n,e,t)=>n.type===ve.GAMES?new fo(n,e,t):n.type===ve.HIGHLIGHTS?new To(n,e,t):new Ck(n,e),Uk=(n,e,t)=>{n.features=new Map,n.activeFeature=new Le(Re(),"activeFeature"),n.sdk.getFeatures=()=>n.features,n.sdk.getFeature=s=>n.features.get(s),n.sdk.getActiveFeature=()=>n.activeFeature.getStore(),n.sdk.openFeature=s=>{n.activeFeature.setValue(s)},n.sdk.closeFeature=()=>{n.activeFeature.setValue(void 0)},n.initFeature=(s,a=An.ORGANIZATION)=>{const r=zk(s,a,n);n.features.set(s.type,r)},n.updateFeature=(s,a)=>{var r;(r=n.features.get(s.type))==null||r.update(s,a)},n.destroyFeature=s=>{n.features.delete(s.type)},n.reinitializeFeatures=async()=>{const s=await n.stores.organizationSettings.getValue();n.features.clear();for(const a of(s==null?void 0:s.overlays)||[])n.initFeature(a,An.ORGANIZATION)},n.stores.providerStreamId.listen(s=>{s||n.reinitializeFeatures()}),n.storeSubscribe=()=>{const s=(r,i)=>{if(i!=null&&i.overlays){r===An.STREAM&&n.features.clear();for(const l of i.overlays)l.sdkEnable===!0&&(n.features.has(l.type)?n.updateFeature(l,r):n.initFeature(l,r))}},a={organizationSettings:r=>{if(r.data)try{s(An.ORGANIZATION,r.data)}catch(i){console.log(i)}},streamSettings:r=>{if(r.data)try{s(An.STREAM,r.data)}catch(i){console.log(i)}}};n.store.subscribe(a)},t()},Pk="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=";const Bk=S("div")({name:"Container",class:"c1nck5pb",propsAsIs:!1}),Qk=S("div")({name:"BackgroundBlock",class:"b1kix5tm",propsAsIs:!1}),Fk=S("img")({name:"Icon",class:"i1ey0b10",propsAsIs:!1}),Gk=S("div")({name:"ContentWrap",class:"cizx07o",propsAsIs:!1}),Yk=S("img")({name:"SponsorLogo",class:"s1pv3lf6",propsAsIs:!1}),Vk=S("span")({name:"SponsorText",class:"s18vymlp",propsAsIs:!1}),$k=S("div")({name:"ContentTitle",class:"c17v2g7n",propsAsIs:!1}),qk=S("div")({name:"ContentSubtitle",class:"c146qhfh",propsAsIs:!1}),Wk=S("button")({name:"ActionBtn",class:"aeuxca5",propsAsIs:!1}),Hk=S("button")({name:"CloseBtn",class:"c10v7vcj",propsAsIs:!1}),Zk=S("img")({name:"IconClose",class:"i2g9z26",propsAsIs:!1}),Kk=({close:n,action:e,data:{icon:t,header:s,title:a,subtitle:r,graphicBg:i,sponsorLogo:l}})=>f.jsxs(Bk,{children:[f.jsx(Hk,{onClick:n,children:f.jsx(Zk,{alt:"icon-close-onboarding-inapp",src:Pk})}),f.jsx(Qk,{style:{backgroundImage:`url(${i||""})`},children:t&&f.jsx(Fk,{alt:"onboarding-inapp-icon",src:t})}),f.jsxs(Gk,{children:[f.jsxs("div",{children:[f.jsx("div",{children:l?f.jsxs(f.Fragment,{children:[f.jsx(Yk,{alt:"sponsor-logo",src:l}),f.jsx(Vk,{children:"Presents"})]}):s||""}),f.jsx($k,{children:a||""}),f.jsx(qk,{children:r||""})]}),f.jsx(Wk,{onClick:e,children:"Play"})]})]});const Jk=S("div")({name:"NotificationContainer",class:"n1bhrb8h",propsAsIs:!1}),Xk={[dn.ONBOARDING]:Kk,[dn.QUESTION]:ci},eM=({index:n,total:e,...t})=>{const s=Q.useRef(null),a=Xk[t.type]||ci;return Q.useEffect(()=>{s.current!==null&&t.hiding&&s.current.animate([{right:"0"},{right:"-100%"}],{duration:300,fill:"forwards"})},[t.hiding]),f.jsx(Jk,{ref:s,style:{zIndex:n+1,transform:`translateY(${100*(e-n-1)}%)`},children:f.jsx(a,{...t})})};const nM=S("div")({name:"NotificationsContainer",class:"ntlmi04",propsAsIs:!1}),tM=({notificationsStore:n})=>{const e=Ne.useStore(n);return f.jsx(nM,{children:e==null?void 0:e.map((t,s)=>f.jsx(eM,{index:s,total:e.length,...t},t.id))})},aM=({store:n})=>{var t;const{data:e}=Ne.useStore(n);return e!=null&&e.summary?f.jsx(tg,{avatar:e.summary.avatar,name:e.summary.name,points:e.summary.points,grade:"0",friendsRank:e.summary.friendsRank,globalRank:e.summary.rank,winStreak:e.summary.streak,correct:e.summary.correct,incorrect:e.summary.incorrect,successRate:(t=e.percentage)==null?void 0:t.average}):f.jsx("div",{children:"wait user..."})},sM=({store:n,openQuestion:e})=>{const t=Ne.useStore(n);return t!=null&&t.data?f.jsx(Ly,{openQuestion:e,questions:t.data}):f.jsx("div",{children:"wait questions..."})},rM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDUuMzgzNDggMy4zMDI4MiA2LjE1NjkyQzIuNjI0OTMgNi4wMTg0NyAyLjA1ODgzIDUuNzQ4NzIgMS42MDQ1IDUuMzQ3NjhDMS4xNTAxNyA0Ljk0NjYzIDAuOTIzMDA4IDQuNTU5OTIgMC45MjMwMDggNC4xODc1MlYzLjUwMDAySDIuNzY5MTZaTTExLjA3NjggMy41MDAwMlY0LjE4NzUyQzExLjA3NjggNC41NTk5MiAxMC44NDk3IDQuOTQ2NjMgMTAuMzk1MyA1LjM0NzY4QzkuOTQxIDUuNzQ4NzIgOS4zNzQ5IDYuMDE4NDcgOC42OTcwMSA2LjE1NjkyQzkuMDUyNzggNS4zODM0OCA5LjIzMDY2IDQuNDk3ODYgOS4yMzA2NiAzLjUwMDAySDExLjA3NjhaTTEyIDQuMTg3NVYzLjI3MDgzQzEyIDMuMDc5ODYgMTEuOTMyNyAyLjkxNzU0IDExLjc5ODEgMi43ODM4NUMxMS42NjM1IDIuNjUwMTcgMTEuNSAyLjU4MzMzIDExLjMwNzcgMi41ODMzM0g5LjIzMDc3VjEuODk1ODNDOS4yMzA3NyAxLjU4MDczIDkuMTE3NzkgMS4zMTA5OCA4Ljg5MTgzIDEuMDg2NTlDOC42NjU4NiAwLjg2MjE5NSA4LjM5NDIzIDAuNzUgOC4wNzY5MiAwLjc1SDMuOTIzMDhDMy42MDU3NyAwLjc1IDMuMzM0MTQgMC44NjIxOTUgMy4xMDgxNyAxLjA4NjU5QzIuODgyMjEgMS4zMTA5OCAyLjc2OTIzIDEuNTgwNzMgMi43NjkyMyAxLjg5NTgzVjIuNTgzMzNIMC42OTIzMDhDMC40OTk5OTkgMi41ODMzMyAwLjMzNjUzOSAyLjY1MDE3IDAuMjAxOTIzIDIuNzgzODVDMC4wNjczMDcgMi45MTc1NCAwIDMuMDc5ODYgMCAzLjI3MDgzVjQuMTg3NUMwIDQuNTI2NDggMC4wOTk3NTg2IDQuODY3ODQgMC4yOTkyNzkgNS4yMTE1OUMwLjQ5ODc5OSA1LjU1NTM0IDAuNzY4MDI3IDUuODY1NjcgMS4xMDY5NyA2LjE0MjU4QzEuNDQ1OTIgNi40MTk0OSAxLjg2MTc4IDYuNjUyMjMgMi4zNTQ1NyA2Ljg0MDgyQzIuODQ3MzYgNy4wMjk0MSAzLjM2NTM4IDcuMTM1NjMgMy45MDg2NSA3LjE1OTUxQzQuMTEwNTggNy40MTczMiA0LjMzODk0IDcuNjQ0MSA0LjU5Mzc1IDcuODM5ODRDNC43NzY0NCA4LjAwMjE3IDQuOTAyNjQgOC4xNzUyNCA0Ljk3MjM2IDguMzU5MDVDNS4wNDIwNyA4LjU0Mjg2IDUuMDc2OTIgOC43NTY1MSA1LjA3NjkyIDlDNS4wNzY5MiA5LjI1NzgxIDUuMDAzNjEgOS40NzUwNCA0Ljg1Njk3IDkuNjUxNjlDNC43MTAzNCA5LjgyODM0IDQuNDc1OTYgOS45MTY2NyA0LjE1Mzg1IDkuOTE2NjdDMy43OTMyNyA5LjkxNjY3IDMuNDcyMzYgMTAuMDI1MyAzLjE5MTExIDEwLjI0MjVDMi45MDk4NSAxMC40NTk3IDIuNzY5MjMgMTAuNzMzMSAyLjc2OTIzIDExLjA2MjVWMTEuNTIwOEMyLjc2OTIzIDExLjU4NzcgMi43OTA4NyAxMS42NDI2IDIuODM0MTMgMTEuNjg1NUMyLjg3NzQgMTEuNzI4NSAyLjkzMjY5IDExLjc1IDMgMTEuNzVIOUM5LjA2NzMxIDExLjc1IDkuMTIyNiAxMS43Mjg1IDkuMTY1ODYgMTEuNjg1NUM5LjIwOTEzIDExLjY0MjYgOS4yMzA3NyAxMS41ODc3IDkuMjMwNzcgMTEuNTIwOFYxMS4wNjI1QzkuMjMwNzcgMTAuNzMzMSA5LjA5MDE1IDEwLjQ1OTcgOC44MDg4OSAxMC4yNDI1QzguNTI3NjQgMTAuMDI1MyA4LjIwNjczIDkuOTE2NjcgNy44NDYxNSA5LjkxNjY3QzcuNTI0MDQgOS45MTY2NyA3LjI4OTY2IDkuODI4MzQgNy4xNDMwMyA5LjY1MTY5QzYuOTk2MzkgOS40NzUwNCA2LjkyMzA4IDkuMjU3ODEgNi45MjMwOCA5QzYuOTIzMDggOC43NTY1MSA2Ljk1NzkzIDguNTQyODYgNy4wMjc2NCA4LjM1OTA1QzcuMDk3MzYgOC4xNzUyNCA3LjIyMzU2IDguMDAyMTcgNy40MDYyNSA3LjgzOTg0QzcuNjYxMDYgNy42NDQxIDcuODg5NDIgNy40MTczMiA4LjA5MTM1IDcuMTU5NTFDOC42MzQ2MiA3LjEzNTYzIDkuMTUyNjQgNy4wMjk0MSA5LjY0NTQzIDYuODQwODJDMTAuMTM4MiA2LjY1MjIzIDEwLjU1NDEgNi40MTk0OSAxMC44OTMgNi4xNDI1OEMxMS4yMzIgNS44NjU2NyAxMS41MDEyIDUuNTU1MzQgMTEuNzAwNyA1LjIxMTU5QzExLjkwMDIgNC44Njc4NCAxMiA0LjUyNjQ4IDEyIDQuMTg3NVpNNS4wNzAzMyA1LjM4NDkxTDYuMDM4MyA0Ljg3NTAzTDcuMDA2MjcgNS4zODQ5MUw2LjgyMTQgNC4zMDQ5N0w3LjYwNDUxIDMuNTQwMTZMNi41MjIyOCAzLjM4MjZMNi4wMzgzIDIuNDAwMDNMNS41NTQzMSAzLjM4MjZMNC40NzIwOSAzLjU0MDE2TDUuMjU1MTkgNC4zMDQ5N0w1LjA3MDMzIDUuMzg0OTFaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogIDwvc3ZnPgo=",iM="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDIyIDIyIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik01LjUgMi43ODg2N1YxMi40MTM3QzUuNSAxMy4xNzI5IDQuODg0MjYgMTMuNzUgNC4xMjUgMTMuNzVIMS4zNzVDMC42MTU3NDIgMTMuNzUgMCAxMy4xMzQzIDAgMTIuNDEzN1YyLjgyNzM0QzAgMi4wNjgwOCAwLjYxNTc0MiAxLjQ5MTAyIDEuMzc1IDEuNDkxMDJINC4xMjVDNC44ODU1NSAxLjQxMzY3IDUuNSAxLjk5Mzc1IDUuNSAyLjc4ODY3Wk0yMiAxMi4zNzA3QzIyIDEzLjUwOTQgMjEuMDc3IDE0LjQzMjMgMTkuOTM3NSAxNC40MzIzSDEzLjY0MjZDMTQuNjIxIDE2LjA2MTMgMTUuMTI1OSAxNy45MDc3IDE1LjEyNTkgMTguNTU4MkMxNS4xMjUgMTkuNTcxNCAxNC4zMzAxIDIwLjYyNSAxMi45OTggMjAuNjI1QzEwLjI4NTQgMjAuNjI1IDExLjg2NTQgMTcuMzUyOSA4LjM0ODgzIDE0LjU0MDZMNy42NDg0NCAxMy45ODJDNy4xNDE0MSAxMy41NzM4IDYuODgzNTkgMTIuOTc2NiA2Ljg3OTMgMTIuMzc1QzYuODc4MjkgMTIuMzc0IDYuODc5MyAxMi4zNzUgNi44NzkzIDEyLjM3NUw2Ljg3NSA1LjVDNi44NzUgNC44NTExNyA3LjE4MDY0IDQuMjM5NzMgNy43IDMuODUwNDNMOS4xNjY5NSAyLjc1MDg2QzEwLjM1NTUgMS44NTYyNSAxMS44MDM1IDEuMzc1IDEzLjI5MDIgMS4zNzVIMTUuODEyNUMxNi45NTIgMS4zNzUgMTcuODc1IDIuMjk3NTQgMTcuODc1IDMuNDM2NjRDMTcuODc1IDMuNTkyODMgMTcuODU0NCAzLjc0MzU3IDE3LjgyMTUgMy44ODk5NkMxOC42NDg0IDQuMTU5MzcgMTkuMjUgNC45MjQyMiAxOS4yNSA1Ljg0Mzc1QzE5LjI1IDYuMjM2ODMgMTkuMTM0MSA2LjYwMDQzIDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=";const oM=S("div")({name:"Container",class:"c1ibttgl",propsAsIs:!1}),cM=S("img")({name:"Logo",class:"l16el447",propsAsIs:!1}),lM=S("div")({name:"RightBlock",class:"rb3jndy",propsAsIs:!1}),uM=S("button")({name:"ExitBtn",class:"e162i9w9",propsAsIs:!1}),mM=S("img")({name:"ExitIcon",class:"e1uh0tpp",propsAsIs:!1}),dM=S("div")({name:"Interactive",class:"i13726cq",propsAsIs:!1}),pM=()=>n=>n.isSuccess?"#f1be1c":"#da3732",Lr=S("div")({name:"ReactionIconWrap",class:"r1weckaj",propsAsIs:!1,vars:{"r1weckaj-0":[pM()]}}),Rr=S("img")({name:"ReactionIcon",class:"r1u8ekkw",propsAsIs:!1});const yM=S("div")({name:"Container",class:"c1kt0nvm",propsAsIs:!1}),gM=S("div")({name:"Title",class:"tavk3hk",propsAsIs:!1}),fM=S("div")({name:"PointContainer",class:"p1vdx5su",propsAsIs:!1}),TM=S("span")({name:"Point",class:"p68apx3",propsAsIs:!1}),hM=S("span")({name:"PointLabel",class:"p157xd4a",propsAsIs:!1}),ia=({points:n})=>f.jsxs(yM,{children:[f.jsx(gM,{children:"YOU WON"}),f.jsxs(fM,{children:[f.jsx(TM,{children:n}),f.jsx(hM,{children:"PTS"})]})]}),kM=({logo:n,points:e,questionAnswered:t,questionAnsweredCorrectly:s,questionType:a,closeQuestion:r,setTimeToExpire:i})=>{const l=!t&&a!==ge.PREDICTION,m=t&&a===ge.TRIVIA,d=m&&s,y=m&&!s,h=t&&a===ge.PREDICTION;return f.jsxs(oM,{children:[f.jsxs(lM,{children:[f.jsxs(dM,{children:[l&&f.jsx(mi,{setTimeToExpire:i}),d&&f.jsxs(f.Fragment,{children:[f.jsx(ia,{points:e}),f.jsx(Lr,{isSuccess:!0,children:f.jsx(Rr,{alt:"reaction-icon",src:rM})})]}),y&&f.jsxs(f.Fragment,{children:[f.jsx(ia,{points:0}),f.jsx(Lr,{isSuccess:!1,children:f.jsx(Rr,{alt:"reaction-icon",src:iM})})]}),h&&f.jsx(ia,{points:e})]}),f.jsx(uM,{onClick:r,children:f.jsx(mM,{alt:"exit-icon",src:Et})})]}),n&&f.jsx(cM,{src:n})]})},MM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAxMy44MzQ4TDY3Ljc2MzYgNy40NDE0Nkg2Mi4wNjA2TDU5LjM4OTcgMTAuNTYwMkw1Ni42MTU1IDcuNDQxNDZaTTYyLjI3MjEgNy45MTY1OUw1OS4zOTY0IDExLjI3NDdMNTYuNDA5MiA3LjkxNjU5SDUxLjc0NDZMNTYuOTMwNyAxMy44NjE1TDUxLjc0NDcgMTkuODA1NEg1Ni4yMjU3TDU5LjE1NzEgMTYuNDIxM0w2Mi4xMTU2IDE5LjgwNTRINjYuNzk4N0w2MS41NjYgMTMuODM1N0w2Ni43MjYxIDcuOTE2NTlINjIuMjcyMVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDQuMzYzNSA3LjQ0MTQ2VjQuNTY0MDZINTAuNzA2NlYwLjA1NTk5OThIMzkuNzAyVjIwLjI4MDVINTAuNzA2NlYxNS43NjAxSDQ0LjM2MzVWMTEuNzc5NEg1MC43MDY2VjcuNDQxNDZINDQuMzYzNVpNNTAuMjQwOCA3LjkxNjU5SDQzLjg5NzhWNC4wODg5M0g1MC4yNDA4VjAuNTMxMTMySDQwLjE2NzhWMTkuODA1NEg1MC4yNDA4VjE2LjIzNTJINDMuODk3OFYxMS4zMDQzSDUwLjI0MDhWNy45MTY1OVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0zNS4wNiAwLjA1NTk5OThWOC4zMzI4MUgzNS4wMDg3QzMzLjk4MDMgNy4xMjc4NyAzMi42OTY2IDYuNzA4ODEgMzEuMjA3IDYuNzA4ODFDMjguMTU1MiA2LjcwODgxIDI1Ljg1NjEgOC44MjYgMjUuMDQ5MyAxMS42MjM2QzI0LjEyOCA4LjU0MDkyIDIxLjc1NDQgNi42NTA4NCAxOC4yMzQ5IDYuNjUwODRDMTUuMzc2OSA2LjY1MDg0IDEzLjExOTcgNy45NTkzNiAxMS45NDIyIDEwLjA5MThWNy40NDE0Nkg2LjAzNDE2VjQuNTY0MDZIMTIuNDgxNVYwLjA1NTk5OThIMC43NjgwMDVWMjAuMjgwNUg2LjAzNDE2VjExLjc3OTRIMTEuMjgzNkMxMS4xMjcgMTIuNDAzNyAxMS4wNDMyIDEzLjA3MjcgMTEuMDQzMiAxMy43Nzg4QzExLjA0MzIgMTcuOTk3IDE0LjIwMzEgMjAuOTU4IDE4LjIzNDkgMjAuOTU4QzIxLjYyNTggMjAuOTU4IDIzLjg2MDcgMTkuMzM0IDI1LjA0MTkgMTYuMzc0SDIwLjUyODRDMTkuOTE4MyAxNy4yNjQ0IDE5LjQ1NTMgMTcuNTI3NiAxOC4yMzQ5IDE3LjUyNzZDMTYuODE5OSAxNy41Mjc2IDE1LjU5OTUgMTYuMjY4NSAxNS41OTk1IDE0Ljc3NTZIMjQuNzg5NEMyNS4xODgxIDE4LjEyNjIgMjcuNzQ3MiAyMS4wMTYgMzEuMjU4MiAyMS4wMTZDMzIuNzczIDIxLjAxNiAzNC4xNjAxIDIwLjI1NTggMzUuMDA3OCAxOC45NzI5SDM1LjA1OVYyMC4yODI0SDM5LjcwMUwzOS43MDIgMC4wNTU5OTk4SDM1LjA2Wk0xNS43NDY3IDExLjgzOTNDMTYuMDM5MiAxMC41NTQ1IDE3LjAxNjQgOS43MTU0NSAxOC4yMzU4IDkuNzE1NDVDMTkuNTc4MiA5LjcxNTQ1IDIwLjUwNTEgMTAuNTI4OSAyMC43NDkyIDExLjgzOTNDMjAuODUxNyAxMS44MzkzIDE1Ljc0NjcgMTEuODM5MyAxNS43NDY3IDExLjgzOTNaTTMyLjI0MiAxNy4yMDE2QzMwLjUzMDcgMTcuMjAxNiAyOS40NjY4IDE1LjU3NDggMjkuNDY2OCAxMy44NzY3QzI5LjQ2NjggMTIuMDYxNyAzMC4zOTE5IDEwLjMxNiAzMi4yNDIgMTAuMzE2QzM0LjE2MDEgMTAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const NM=S("div")({name:"QuestionContainer",class:"q15yq4tu",propsAsIs:!1}),IM=({openedQuestion:n,closeQuestion:e,vote:t})=>{var m;const[s,a]=Q.useState(!1),r=Q.useCallback(d=>{a(d)},[a]),i=Q.useMemo(()=>n==null?void 0:n.answers.find(d=>d.youVoted===!0),[n]),l=Q.useMemo(()=>!!(n!=null&&n.answers.find(d=>d.correct===!0)),[n]);return n?f.jsx(NM,{children:f.jsxs("div",{children:[f.jsx(kM,{points:(i==null?void 0:i.points)||0,questionAnswered:!!i,questionAnsweredCorrectly:i==null?void 0:i.correct,logo:MM,closeQuestion:e,setTimeToExpire:r,questionType:n.type}),f.jsx("div",{children:f.jsx(gg,{title:n.subject,feedbackMessages:(m=n.options)==null?void 0:m.options.value,questionType:n.type,questionId:n.id,questionAnswered:!!i,questionAnsweredCorrectly:i==null?void 0:i.correct,options:n.answers.map(d=>({id:d.id,title:d.text,icon:d.icon,type:n.type,correct:d.correct,percentage:d.percentage,answered:d.youVoted,disabled:!!i||n.marketClosed||s,questionAnswered:!!i,hasCorrectAnswer:l,points:d.points,onVote:t}))})})]})}):null};const SM=S("div")({name:"Container",class:"cqrci8d",propsAsIs:!1}),AM=S("div")({name:"Content",class:"c1hep1a5",propsAsIs:!1}),EM=S("div")({name:"Graphic",class:"g1s87azu",propsAsIs:!1}),bM=S("img")({name:"InsightIconDefault",class:"i19cupvp",propsAsIs:!1}),DM=S("img")({name:"InsightIconCircle",class:"i7kr6s3",propsAsIs:!1}),vM=S("img")({name:"InsightIconAbsolute",class:"ikea8mb",propsAsIs:!1}),wM=S("div")({name:"Title",class:"tn29zk0",propsAsIs:!1}),_M=S("img")({name:"NextIcon",class:"ni1hvml",propsAsIs:!1}),jM=(n,e)=>{switch(n){case nn.ROUNDED:return f.jsx(DM,{alt:"insight-icon",src:e});case nn.TRANSPARENT:return f.jsx(vM,{alt:"insight-icon",src:e});case nn.CENTERED:return f.jsx(bM,{alt:"insight-icon",src:e});default:return null}},OM=({title:n,image:e,questionId:t,imageMode:s,openInsight:a})=>f.jsxs(SM,{onClick:()=>a(t),children:[f.jsx(EM,{children:e&&jM(s,e)}),f.jsxs(AM,{children:[f.jsx(wM,{children:n||""}),f.jsx(_M,{alt:"next-icon",src:va})]})]});const LM=S("div")({name:"Container",class:"c1ii4cav",propsAsIs:!1}),RM=S("div")({name:"ItemsContainer",class:"irn7lif",propsAsIs:!1}),xM=({insights:n,openInsight:e})=>f.jsx(LM,{children:f.jsx(RM,{children:n==null?void 0:n.map(t=>f.jsx(OM,{openInsight:e,...t},t.questionId))})}),CM=({highlights:n,store:e})=>{const{data:t}=Ne.useStore(e);return t?f.jsx(xM,{insights:t,openInsight:n.openHighlight}):f.jsx("div",{children:"wait insights..."})},zM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=",UM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNNiAxMS45OTlDNiAxMi4xNzI1IDYuMDMxMzQgMTIuMzM0IDYuMDk0MDEgMTIuNDgzN0M2LjE1NjY5IDEyLjYzMzQgNi4yNTQyOCAxMi43NzU2IDYuMzg2OCAxMi45MTAzTDE0LjA0MzYgMjAuNjU2NUMxNC4yNjQ4IDIwLjg4NTUgMTQuNTMyMyAyMSAxNC44NDU5IDIxQzE1LjA2MDcgMjEgMTUuMjU0NCAyMC45NDc1IDE1LjQyNzEgMjAuODQyNkMxNS41OTk4IDIwLjczNzcgMTUuNzM4NCAyMC41OTY1IDE1Ljg0MzEgMjAuNDE5MUMxNS45NDc3IDIwLjI0MTYgMTYgMjAuMDQyNSAxNiAxOS44MjE3QzE2IDE5LjQ5ODkgMTUuODgxNiAxOS4yMTM0IDE1LjY0NDggMTguOTY1NEw4Ljc0MTgzIDExLjk5NzFMMTUuNjQ0OCA1LjAzMjcxQzE1Ljg4MTYgNC43ODcwOSAxNiA0LjUwMjMgMTYgNC4xNzgzNEMxNiAzLjk1NzQ5IDE1Ljk0NzcgMy43NTgzNSAxNS44NDMxIDMuNTgwOTFDMTUuNzM4NCAzLjQwMzQ3IDE1LjU5OTggMy4yNjIyOSAxNS40MjcxIDMuMTU3MzhDMTUuMjU0NCAzLjA1MjQ2IDE1LjA2MDcgMyAxNC44NDU5IDNDMTQuNTMyMyAzIDE0LjI2NDggMy4xMTE2OSAxNC4wNDM2IDMuMzM1MDhMNi4zODY4IDExLjA4NzhDNi4yNTU1MSAxMS4yMjI1IDYuMTU4NTMgMTEuMzY0NCA2LjA5NTg2IDExLjUxMzRDNi4wMzMxOCAxMS42NjI1IDYuMDAxMjMgMTEuODI0NCA2IDExLjk5OVoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const PM=S("div")({name:"Container",class:"c1n31p0r",propsAsIs:!1}),xr=S("button")({name:"Button",class:"bh1dfyy",propsAsIs:!1}),BM=S("img")({name:"HeaderIcon",class:"h1gjjnyi",propsAsIs:!1}),QM=({icon:n,comeBack:e,close:t})=>f.jsxs(PM,{children:[f.jsxs("div",{children:[e&&f.jsx(xr,{onClick:e,children:f.jsx("img",{alt:"header-back-icon",src:UM})}),n&&f.jsx(BM,{alt:"header-icon",src:n})]}),f.jsx("div",{children:t&&f.jsx(xr,{onClick:t,children:f.jsx("img",{alt:"header-close-icon",src:Et})})})]});const FM=S("div")({name:"Container",class:"c2g1lnc",propsAsIs:!1}),GM=S("img")({name:"Image",class:"i1czhbqi",propsAsIs:!1}),YM=S("div")({name:"AdditionalContent",class:"axpm0mb",propsAsIs:!1}),VM=S("div")({name:"Title",class:"t1kppby5",propsAsIs:!1}),$M=S("div")({name:"Description",class:"d18tbzq5",propsAsIs:!1}),qM=S("a")({name:"AdditionalBtn",class:"a6y6po9",propsAsIs:!1}),WM=S("img")({name:"LinkIcon",class:"lii8ybz",propsAsIs:!1}),HM=({image:n,title:e,description:t,webLinkLabel:s,webLink:a,closeHighlights:r,closeInsight:i})=>f.jsxs(FM,{children:[f.jsx(QM,{close:r,comeBack:i}),n&&f.jsx(GM,{alt:"detail-insight-image",src:n}),f.jsxs(YM,{children:[e&&f.jsx(VM,{children:e}),t&&f.jsx($M,{children:t})]}),a&&s&&f.jsxs(qM,{href:a,target:"_blank",children:[s,f.jsx(WM,{alt:"link-icon",src:zM})]})]}),ZM=({openedInsight:n,closeHighlights:e,closeInsight:t})=>{var i,l,m,d,y;const s=((i=n.options)==null?void 0:i.options.case)==="factoid"?{image:n.options.options.value.image,body:n.options.options.value.body,webLink:(l=n.options.options.value.webLink)==null?void 0:l.url,webLinkLabel:(m=n.options.options.value.webLink)==null?void 0:m.label}:{},a=n.subject||((d=n.notification)==null?void 0:d.title),r=s.body||((y=n.notification)==null?void 0:y.body);return f.jsx(HM,{image:s.image,title:a,description:r,webLink:s.webLink,webLinkLabel:s.webLinkLabel,closeInsight:t,closeHighlights:e})};const mn=S("div")({name:"DemoContainer",class:"dp9wag8",propsAsIs:!1}),KM=S("div")({name:"UserStatisticsContainer",class:"u15x0q1l",propsAsIs:!1}),JM=S("div")({name:"QuestionsContainer",class:"q13pbrok",propsAsIs:!1}),XM=S("div")({name:"Buttons",class:"baw537u",propsAsIs:!1}),Cr=S("button")({name:"Button",class:"bwry012",propsAsIs:!1}),eN=({gamification:n,sdk:e})=>{var y,h,T,M,E,D,L,j,R,x,z,U,B,C,H,ne,se,ie,ue,oe,Z,me,Ee;const t=Ne.useStore(n.status),s=Ne.useStore(n.onbordingComplete),a=Ne.useStore(n.openedQuestion),{slStreamId:r}=Ne.useStore(e.sdkStore),i=Ne.useStore(n.featureSettings);if(t!==He.Ready)return f.jsx("div",{children:"wait..."});if(r!=null&&r.loading)return f.jsx(mn,{children:f.jsx("div",{children:"Event is loading"})});if(!(r!=null&&r.data))return f.jsx(mn,{children:f.jsx("div",{children:"Event is forbidden"})});if(!s)return f.jsx(mn,{children:f.jsx(Dm,{closeFeature:e.closeFeature,gamification:n,steps:(h=(y=i.inplayGame)==null?void 0:y.onboarding)==null?void 0:h.steps,gameIcon:(E=(M=(T=i.inplayGame)==null?void 0:T.overview)==null?void 0:M.media)==null?void 0:E.gameIcon,sponsorLogo:(j=(L=(D=i.inplayGame)==null?void 0:D.overview)==null?void 0:L.media)==null?void 0:j.sponsorLogo,rules:(x=(R=i.inplayGame)==null?void 0:R.rules)==null?void 0:x.rules,rulesBtnLabel:(U=(z=i.inplayGame)==null?void 0:z.rules)==null?void 0:U.buttonLabel,rulesTitle:(C=(B=i.inplayGame)==null?void 0:B.rules)==null?void 0:C.heading,primaryColor:(se=(ne=(H=i.inplayGame)==null?void 0:H.overview)==null?void 0:ne.appearance)==null?void 0:se.primaryColor,inviteCardTitle:(ue=(ie=i.inplayGame)==null?void 0:ie.inviteCard)==null?void 0:ue.heading,inviteCardSubtext:(Z=(oe=i.inplayGame)==null?void 0:oe.inviteCard)==null?void 0:Z.subtext,inviteCardBtnLabel:(Ee=(me=i.inplayGame)==null?void 0:me.inviteCard)==null?void 0:Ee.buttonLabel})});const l=xe=>{n.openQuestion(xe)},m=()=>{n.closeQuestion()},d=(xe,we)=>{n.submitAnswer(xe,we)};return f.jsxs(mn,{children:[f.jsx(KM,{children:n.userSummary&&f.jsx(aM,{store:n.userSummary.getStore()})}),f.jsxs(JM,{children:[n.questions&&f.jsx(sM,{openQuestion:l,store:n.questions.getStore()}),a&&f.jsx(IM,{closeQuestion:m,vote:d,openedQuestion:a})]})]})},nN=({highlights:n,sdk:e})=>{const t=Ne.useStore(n.status),s=Ne.useStore(n.openedInsight),{slStreamId:a}=Ne.useStore(e.sdkStore);return t!==He.Ready?f.jsx("div",{children:"wait..."}):a!=null&&a.loading?f.jsx(mn,{children:f.jsx("div",{children:"Event is loading"})}):a!=null&&a.data?n.insights===void 0?f.jsx("div",{children:"wait insights..."}):f.jsxs(mn,{children:[!s&&f.jsx(CM,{highlights:n,store:n.insights.getStore()}),s&&f.jsx(ZM,{openedInsight:s,closeHighlights:n.closeFeature,closeInsight:n.closeHighlight})]}):f.jsx(mn,{children:f.jsx("div",{children:"Event is forbidden"})})},tN=({sdk:n})=>{const e=async t=>{try{await n.authorizationBypass("streamlayer:streamlayer",t)}catch(s){throw console.log("login err",s),s}};return f.jsx(Hu,{login:e,anonymousLogin:n.anonymousAuthorization,host:n.host})},aN=({activeFeature:n,sdk:e})=>{const[t,s]=Q.useState(null),{organizationSettings:a,streamSettings:r}=Ne.useStore(e.sdkStore),i=Q.useMemo(()=>{const m=(r==null?void 0:r.data)||(a==null?void 0:a.data);return m!=null&&m.overlays?m.overlays:[]},[a,r]);Q.useEffect(()=>{const m=e.getFeatures();if(n)for(const[d,y]of m)d===n?y.status.get()===He.Suspended&&(y.enable(),s(y)):y.status.get()===He.Ready&&y.disable();else{for(const[,d]of m)d.status.get()===He.Ready&&d.disable();s(null)}return()=>{for(const[,d]of m)d.status.get()===He.Ready&&d.disable()}},[n,e]);const l=Q.useMemo(()=>t instanceof fo?t?f.jsx("div",{children:f.jsx(eN,{gamification:t,sdk:e})}):f.jsx("div",{children:"wait gamification..."}):t instanceof To?t?f.jsx("div",{children:f.jsx(nN,{highlights:t,sdk:e})}):f.jsx("div",{children:"wait highlights..."}):null,[e,t]);return f.jsxs("div",{children:[f.jsxs(XM,{children:[f.jsx(Cr,{onClick:()=>e.logout(),children:"logout"}),i.map(m=>f.jsxs(Cr,{onClick:()=>e.openFeature(m.type),disabled:!(m.type in xk),"data-enableSdkButton":m.enableSdkButton.toString(),"data-selected":m.type===n,children:[f.jsx("img",{src:m.icon,alt:""}),m.name]},m.name))]}),l]})},sN=({sdk:n})=>{const e=Ne.useStore(n.organizationStore()),t=Ne.useStore(n.getUserStore()),s=Ne.useStore(n.getActiveFeature());return e.loading?f.jsx("div",{children:"authentificating..."}):e.data?t.loading?f.jsx("div",{children:"authentificating..."}):t.data?f.jsxs(f.Fragment,{children:[f.jsx(tM,{notificationsStore:n.getNotificationsStore()}),f.jsx(aN,{sdk:n,activeFeature:s})]}):f.jsx(tN,{sdk:n}):f.jsx("div",{children:"wrong sdk key..."})};const rN="t12mji3x",iN=({children:n})=>f.jsx("div",{className:rN,children:n});class oN extends fg{constructor(t,s){super();N(this,"$coreStore");N(this,"transport");N(this,"$bypassLogin");N(this,"me",async()=>{const t=await this.$coreStore.getValues().user.getValue();return t==null?void 0:t.data});N(this,"login",async(t,s)=>(this.$coreStore.getValues().userKey.setValue(s),await this.$bypassLogin.mutate({schema:t,userKey:s,init:!1}),this.me()));N(this,"isAuthenticated",()=>this.me());N(this,"logout",()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("")});N(this,"subscribe",()=>{this.$bypassLogin.subscribe((t,s)=>{var a,r,i,l;s==="data"&&(this.transport.setAuth((r=(a=t==null?void 0:t.data)==null?void 0:a.meta)==null?void 0:r.jwt),this.$coreStore.getValues().userToken.setValue((l=(i=t==null?void 0:t.data)==null?void 0:i.meta)==null?void 0:l.jwt))})});this.$coreStore=t,this.transport=s,this.$bypassLogin=qh(this.transport),this.subscribe()}}const cN=async(n,e,t)=>{n.auth=new oN(n.store,n.transport);const s=new po,a=s.getSchema(),r=s.getToken();a&&r&&(console.log("try to login prev user"),await n.auth.login(a,r)),n.sdk.authorizationBypass=async(i,l)=>{await n.auth.login(i,l),s.setSchema("streamlayer:streamlayer")},n.sdk.logout=()=>{n.auth.logout()},n.sdk.getUserStore=()=>n.stores.user.getStore(),n.sdk.isUserAuthorized=()=>n.auth.isAuthenticated(),t()},lN=(n,e,t)=>{n.sdk=Object.create(null),n.sdk.initializeApp=async()=>{n.storeSubscribe(),n.stores.enabled.setValue("on"),n.stores.status.setValue(En.INITIALIZATION);try{const s=await n.stores.organizationSettings.getValue();return s?(n.stores.status.setValue(En.READY),{enabled:!!s}):(n.stores.status.setValue(En.FAILED),{err:"failed"})}catch(s){return n.stores.enabled.setValue(),n.stores.status.setValue(En.FAILED),{err:`${s}`}}},n.sdk.disableApp=()=>{n.stores.enabled.setValue(),n.stores.status.setValue(En.DISABLED),n.storeUnsubscribe()},n.sdk.createEventSession=s=>{n.stores.providerStreamId.setValue(""),n.stores.providerStreamId.setValue(s)},t()};var ls={exports:{}},us={exports:{}};function uN(n){var e=new n,t=e;function s(){var r=e;return r.next?e=r.next:(e=new n,t=e),r.next=null,r}function a(r){t.next=r,t=r}return{get:s,release:a}}var mN=uN,dN=mN;function ho(n,e,t){if(typeof n=="function"&&(t=e,e=n,n=null),t<1)throw new Error("fastqueue concurrency must be greater than 1");var s=dN(pN),a=null,r=null,i=0,l=null,m={push:D,drain:Oe,saturated:Oe,pause:y,paused:!1,concurrency:t,running:d,resume:M,idle:E,length:h,getQueue:T,unshift:L,empty:Oe,kill:R,killAndDrain:x,error:z};return m;function d(){return i}function y(){m.paused=!0}function h(){for(var U=a,B=0;U;)U=U.next,B++;return B}function T(){for(var U=a,B=[];U;)B.push(U.value),U=U.next;return B}function M(){if(m.paused){m.paused=!1;for(var U=0;U<m.concurrency;U++)i++,j()}}function E(){return i===0&&m.length()===0}function D(U,B){var C=s.get();C.context=n,C.release=j,C.value=U,C.callback=B||Oe,C.errorHandler=l,i===m.concurrency||m.paused?r?(r.next=C,r=C):(a=C,r=C,m.saturated()):(i++,e.call(n,C.value,C.worked))}function L(U,B){var C=s.get();C.context=n,C.release=j,C.value=U,C.callback=B||Oe,i===m.concurrency||m.paused?a?(C.next=a,a=C):(a=C,r=C,m.saturated()):(i++,e.call(n,C.value,C.worked))}function j(U){U&&s.release(U);var B=a;B?m.paused?i--:(r===a&&(r=null),a=B.next,B.next=null,e.call(n,B.value,B.worked),r===null&&m.empty()):--i===0&&m.drain()}function R(){a=null,r=null,m.drain=Oe}function x(){a=null,r=null,m.drain(),m.drain=Oe}function z(U){l=U}}function Oe(){}function pN(){this.value=null,this.callback=Oe,this.next=null,this.release=Oe,this.context=null,this.errorHandler=null;var n=this;this.worked=function(t,s){var a=n.callback,r=n.errorHandler,i=n.value;n.value=null,n.callback=Oe,n.errorHandler&&r(t,i),a.call(n.context,t,s),n.release(n)}}function yN(n,e,t){typeof n=="function"&&(t=e,e=n,n=null);function s(y,h){e.call(this,y).then(function(T){h(null,T)},h)}var a=ho(n,s,t),r=a.push,i=a.unshift;return a.push=l,a.unshift=m,a.drained=d,a;function l(y){var h=new Promise(function(T,M){r(y,function(E,D){if(E){M(E);return}T(D)})});return h.catch(Oe),h}function m(y){var h=new Promise(function(T,M){i(y,function(E,D){if(E){M(E);return}T(D)})});return h.catch(Oe),h}function d(){if(a.idle())return new Promise(function(T){T()});var y=a.drain,h=new Promise(function(T){a.drain=function(){y(),T()}});return h}}us.exports=ho;us.exports.promise=yN;var ko=us.exports,ms={exports:{}},_n=typeof Reflect=="object"?Reflect:null,zr=_n&&typeof _n.apply=="function"?_n.apply:function(e,t,s){return Function.prototype.apply.call(e,t,s)},mt;_n&&typeof _n.ownKeys=="function"?mt=_n.ownKeys:Object.getOwnPropertySymbols?mt=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:mt=function(e){return Object.getOwnPropertyNames(e)};function gN(n){console&&console.warn&&console.warn(n)}var Mo=Number.isNaN||function(e){return e!==e};function te(){te.init.call(this)}ms.exports=te;ms.exports.once=kN;te.EventEmitter=te;te.prototype._events=void 0;te.prototype._eventsCount=0;te.prototype._maxListeners=void 0;var Ur=10;function Ut(n){if(typeof n!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n)}Object.defineProperty(te,"defaultMaxListeners",{enumerable:!0,get:function(){return Ur},set:function(n){if(typeof n!="number"||n<0||Mo(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");Ur=n}});te.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};te.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Mo(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function No(n){return n._maxListeners===void 0?te.defaultMaxListeners:n._maxListeners}te.prototype.getMaxListeners=function(){return No(this)};te.prototype.emit=function(e){for(var t=[],s=1;s<arguments.length;s++)t.push(arguments[s]);var a=e==="error",r=this._events;if(r!==void 0)a=a&&r.error===void 0;else if(!a)return!1;if(a){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var m=r[e];if(m===void 0)return!1;if(typeof m=="function")zr(m,this,t);else for(var d=m.length,y=bo(m,d),s=0;s<d;++s)zr(y[s],this,t);return!0};function Io(n,e,t,s){var a,r,i;if(Ut(t),r=n._events,r===void 0?(r=n._events=Object.create(null),n._eventsCount=0):(r.newListener!==void 0&&(n.emit("newListener",e,t.listener?t.listener:t),r=n._events),i=r[e]),i===void 0)i=r[e]=t,++n._eventsCount;else if(typeof i=="function"?i=r[e]=s?[t,i]:[i,t]:s?i.unshift(t):i.push(t),a=No(n),a>0&&i.length>a&&!i.warned){i.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=n,l.type=e,l.count=i.length,gN(l)}return n}te.prototype.addListener=function(e,t){return Io(this,e,t,!1)};te.prototype.on=te.prototype.addListener;te.prototype.prependListener=function(e,t){return Io(this,e,t,!0)};function fN(){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 So(n,e,t){var s={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},a=fN.bind(s);return a.listener=t,s.wrapFn=a,a}te.prototype.once=function(e,t){return Ut(t),this.on(e,So(this,e,t)),this};te.prototype.prependOnceListener=function(e,t){return Ut(t),this.prependListener(e,So(this,e,t)),this};te.prototype.removeListener=function(e,t){var s,a,r,i,l;if(Ut(t),a=this._events,a===void 0)return this;if(s=a[e],s===void 0)return this;if(s===t||s.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,s.listener||t));else if(typeof s!="function"){for(r=-1,i=s.length-1;i>=0;i--)if(s[i]===t||s[i].listener===t){l=s[i].listener,r=i;break}if(r<0)return this;r===0?s.shift():TN(s,r),s.length===1&&(a[e]=s[0]),a.removeListener!==void 0&&this.emit("removeListener",e,l||t)}return this};te.prototype.off=te.prototype.removeListener;te.prototype.removeAllListeners=function(e){var t,s,a;if(s=this._events,s===void 0)return this;if(s.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):s[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete s[e]),this;if(arguments.length===0){var r=Object.keys(s),i;for(a=0;a<r.length;++a)i=r[a],i!=="removeListener"&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=s[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(a=t.length-1;a>=0;a--)this.removeListener(e,t[a]);return this};function Ao(n,e,t){var s=n._events;if(s===void 0)return[];var a=s[e];return a===void 0?[]:typeof a=="function"?t?[a.listener||a]:[a]:t?hN(a):bo(a,a.length)}te.prototype.listeners=function(e){return Ao(this,e,!0)};te.prototype.rawListeners=function(e){return Ao(this,e,!1)};te.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):Eo.call(n,e)};te.prototype.listenerCount=Eo;function Eo(n){var e=this._events;if(e!==void 0){var t=e[n];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}te.prototype.eventNames=function(){return this._eventsCount>0?mt(this._events):[]};function bo(n,e){for(var t=new Array(e),s=0;s<e;++s)t[s]=n[s];return t}function TN(n,e){for(;e+1<n.length;e++)n[e]=n[e+1];n.pop()}function hN(n){for(var e=new Array(n.length),t=0;t<e.length;++t)e[t]=n[t].listener||n[t];return e}function kN(n,e){return new Promise(function(t,s){function a(i){n.removeListener(e,r),s(i)}function r(){typeof n.removeListener=="function"&&n.removeListener("error",a),t([].slice.call(arguments))}Do(n,e,r,{once:!0}),e!=="error"&&MN(n,a,{once:!0})})}function MN(n,e,t){typeof n.on=="function"&&Do(n,"error",e,t)}function Do(n,e,t,s){if(typeof n.on=="function")s.once?n.once(e,t):n.on(e,t);else if(typeof n.addEventListener=="function")n.addEventListener(e,function a(r){s.once&&n.removeEventListener(e,a),t(r)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var vo=ms.exports,Pt={},wo={},_o=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),s=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var a=42;e[t]=a;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 r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(e,t);if(i.value!==a||i.enumerable!==!0)return!1}return!0},NN=_o,ds=function(){return NN()&&!!Symbol.toStringTag},Pr=typeof Symbol<"u"&&Symbol,IN=_o,SN=function(){return typeof Pr!="function"||typeof Symbol!="function"||typeof Pr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:IN()},Br={foo:{}},AN=Object,EN=function(){return{__proto__:Br}.foo===Br.foo&&!({__proto__:null}instanceof AN)},bN="Function.prototype.bind called on incompatible ",DN=Object.prototype.toString,vN=Math.max,wN="[object Function]",Qr=function(e,t){for(var s=[],a=0;a<e.length;a+=1)s[a]=e[a];for(var r=0;r<t.length;r+=1)s[r+e.length]=t[r];return s},_N=function(e,t){for(var s=[],a=t||0,r=0;a<e.length;a+=1,r+=1)s[r]=e[a];return s},jN=function(n,e){for(var t="",s=0;s<n.length;s+=1)t+=n[s],s+1<n.length&&(t+=e);return t},ON=function(e){var t=this;if(typeof t!="function"||DN.apply(t)!==wN)throw new TypeError(bN+t);for(var s=_N(arguments,1),a,r=function(){if(this instanceof a){var y=t.apply(this,Qr(s,arguments));return Object(y)===y?y:this}return t.apply(e,Qr(s,arguments))},i=vN(0,t.length-s.length),l=[],m=0;m<i;m++)l[m]="$"+m;if(a=Function("binder","return function ("+jN(l,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var d=function(){};d.prototype=t.prototype,a.prototype=new d,d.prototype=null}return a},LN=ON,jo=Function.prototype.bind||LN,Fr={}.hasOwnProperty,oa=Function.prototype.call,RN=oa.bind?oa.bind(Fr):function(n,e){return oa.call(Fr,n,e)},q,Ln=SyntaxError,Oo=Function,jn=TypeError,ca=function(n){try{return Oo('"use strict"; return ('+n+").constructor;")()}catch{}},pn=Object.getOwnPropertyDescriptor;if(pn)try{pn({},"")}catch{pn=null}var la=function(){throw new jn},xN=pn?function(){try{return arguments.callee,la}catch{try{return pn(arguments,"callee").get}catch{return la}}}():la,In=SN(),CN=EN(),fe=Object.getPrototypeOf||(CN?function(n){return n.__proto__}:null),bn={},zN=typeof Uint8Array>"u"||!fe?q:fe(Uint8Array),yn={"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":In&&fe?fe([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":bn,"%AsyncGenerator%":bn,"%AsyncGeneratorFunction%":bn,"%AsyncIteratorPrototype%":bn,"%Atomics%":typeof Atomics>"u"?q:Atomics,"%BigInt%":typeof BigInt>"u"?q:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?q:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?q:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?q:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?q:Float32Array,"%Float64Array%":typeof Float64Array>"u"?q:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?q:FinalizationRegistry,"%Function%":Oo,"%GeneratorFunction%":bn,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":In&&fe?fe(fe([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!In||!fe?q:fe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?q:Promise,"%Proxy%":typeof Proxy>"u"?q:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?q:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?q:Set,"%SetIteratorPrototype%":typeof Set>"u"||!In||!fe?q:fe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":In&&fe?fe(""[Symbol.iterator]()):q,"%Symbol%":In?Symbol:q,"%SyntaxError%":Ln,"%ThrowTypeError%":xN,"%TypedArray%":zN,"%TypeError%":jn,"%Uint8Array%":typeof Uint8Array>"u"?q:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?q:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?q:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?q:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?q:WeakMap,"%WeakRef%":typeof WeakRef>"u"?q:WeakRef,"%WeakSet%":typeof WeakSet>"u"?q:WeakSet};if(fe)try{null.error}catch(n){var UN=fe(fe(n));yn["%Error.prototype%"]=UN}var PN=function n(e){var t;if(e==="%AsyncFunction%")t=ca("async function () {}");else if(e==="%GeneratorFunction%")t=ca("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=ca("async function* () {}");else if(e==="%AsyncGenerator%"){var s=n("%AsyncGeneratorFunction%");s&&(t=s.prototype)}else if(e==="%AsyncIteratorPrototype%"){var a=n("%AsyncGenerator%");a&&fe&&(t=fe(a.prototype))}return yn[e]=t,t},Gr={"%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"]},et=jo,kt=RN,BN=et.call(Function.call,Array.prototype.concat),QN=et.call(Function.apply,Array.prototype.splice),Yr=et.call(Function.call,String.prototype.replace),Mt=et.call(Function.call,String.prototype.slice),FN=et.call(Function.call,RegExp.prototype.exec),GN=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,YN=/\\(\\)?/g,VN=function(e){var t=Mt(e,0,1),s=Mt(e,-1);if(t==="%"&&s!=="%")throw new Ln("invalid intrinsic syntax, expected closing `%`");if(s==="%"&&t!=="%")throw new Ln("invalid intrinsic syntax, expected opening `%`");var a=[];return Yr(e,GN,function(r,i,l,m){a[a.length]=l?Yr(m,YN,"$1"):i||r}),a},$N=function(e,t){var s=e,a;if(kt(Gr,s)&&(a=Gr[s],s="%"+a[0]+"%"),kt(yn,s)){var r=yn[s];if(r===bn&&(r=PN(s)),typeof r>"u"&&!t)throw new jn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:s,value:r}}throw new Ln("intrinsic "+e+" does not exist!")},Cn=function(e,t){if(typeof e!="string"||e.length===0)throw new jn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new jn('"allowMissing" argument must be a boolean');if(FN(/^%?[^%]*%?$/,e)===null)throw new Ln("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=VN(e),a=s.length>0?s[0]:"",r=$N("%"+a+"%",t),i=r.name,l=r.value,m=!1,d=r.alias;d&&(a=d[0],QN(s,BN([0,1],d)));for(var y=1,h=!0;y<s.length;y+=1){var T=s[y],M=Mt(T,0,1),E=Mt(T,-1);if((M==='"'||M==="'"||M==="`"||E==='"'||E==="'"||E==="`")&&M!==E)throw new Ln("property names with quotes must have matching quotes");if((T==="constructor"||!h)&&(m=!0),a+="."+T,i="%"+a+"%",kt(yn,i))l=yn[i];else if(l!=null){if(!(T in l)){if(!t)throw new jn("base intrinsic for "+e+" exists, but the property is not available.");return}if(pn&&y+1>=s.length){var D=pn(l,T);h=!!D,h&&"get"in D&&!("originalValue"in D.get)?l=D.get:l=l[T]}else h=kt(l,T),l=l[T];h&&!m&&(yn[i]=l)}}return l},Lo={exports:{}},qN=Cn,Oa=qN("%Object.defineProperty%",!0),La=function(){if(Oa)try{return Oa({},"a",{value:1}),!0}catch{return!1}return!1};La.hasArrayLengthDefineBug=function(){if(!La())return null;try{return Oa([],"length",{value:1}).length!==1}catch{return!0}};var Ro=La,WN=Cn,dt=WN("%Object.getOwnPropertyDescriptor%",!0);if(dt)try{dt([],"length")}catch{dt=null}var ps=dt,HN=Ro(),ys=Cn,qn=HN&&ys("%Object.defineProperty%",!0);if(qn)try{qn({},"a",{value:1})}catch{qn=!1}var ZN=ys("%SyntaxError%"),Sn=ys("%TypeError%"),Vr=ps,KN=function(e,t,s){if(!e||typeof e!="object"&&typeof e!="function")throw new Sn("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Sn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Sn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Sn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Sn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Sn("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,m=!!Vr&&Vr(e,t);if(qn)qn(e,t,{configurable:i===null&&m?m.configurable:!i,enumerable:a===null&&m?m.enumerable:!a,value:s,writable:r===null&&m?m.writable:!r});else if(l||!a&&!r&&!i)e[t]=s;else throw new ZN("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},xo=Cn,$r=KN,JN=Ro(),qr=ps,Wr=xo("%TypeError%"),XN=xo("%Math.floor%"),eI=function(e,t){if(typeof e!="function")throw new Wr("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||XN(t)!==t)throw new Wr("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],a=!0,r=!0;if("length"in e&&qr){var i=qr(e,"length");i&&!i.configurable&&(a=!1),i&&!i.writable&&(r=!1)}return(a||r||!s)&&(JN?$r(e,"length",t,!0,!0):$r(e,"length",t)),e};(function(n){var e=jo,t=Cn,s=eI,a=t("%TypeError%"),r=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(i,r),m=t("%Object.defineProperty%",!0),d=t("%Math.max%");if(m)try{m({},"a",{value:1})}catch{m=null}n.exports=function(T){if(typeof T!="function")throw new a("a function is required");var M=l(e,i,arguments);return s(M,1+d(0,T.length-(arguments.length-1)),!0)};var y=function(){return l(e,r,arguments)};m?m(n.exports,"apply",{value:y}):n.exports.apply=y})(Lo);var Co=Lo.exports,zo=Cn,Uo=Co,nI=Uo(zo("String.prototype.indexOf")),Po=function(e,t){var s=zo(e,!!t);return typeof s=="function"&&nI(e,".prototype.")>-1?Uo(s):s},tI=ds(),aI=Po,Ra=aI("Object.prototype.toString"),Bt=function(e){return tI&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Ra(e)==="[object Arguments]"},Bo=function(e){return Bt(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Ra(e)!=="[object Array]"&&Ra(e.callee)==="[object Function]"},sI=function(){return Bt(arguments)}();Bt.isLegacyArguments=Bo;var rI=sI?Bt:Bo,iI=Object.prototype.toString,oI=Function.prototype.toString,cI=/^\s*(?:function)?\*/,Qo=ds(),ua=Object.getPrototypeOf,lI=function(){if(!Qo)return!1;try{return Function("return function*() {}")()}catch{}},ma,uI=function(e){if(typeof e!="function")return!1;if(cI.test(oI.call(e)))return!0;if(!Qo){var t=iI.call(e);return t==="[object GeneratorFunction]"}if(!ua)return!1;if(typeof ma>"u"){var s=lI();ma=s?ua(s):!1}return ua(e)===ma},Fo=Function.prototype.toString,vn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,xa,pt;if(typeof vn=="function"&&typeof Object.defineProperty=="function")try{xa=Object.defineProperty({},"length",{get:function(){throw pt}}),pt={},vn(function(){throw 42},null,xa)}catch(n){n!==pt&&(vn=null)}else vn=null;var mI=/^\s*class\b/,Ca=function(e){try{var t=Fo.call(e);return mI.test(t)}catch{return!1}},da=function(e){try{return Ca(e)?!1:(Fo.call(e),!0)}catch{return!1}},yt=Object.prototype.toString,dI="[object Object]",pI="[object Function]",yI="[object GeneratorFunction]",gI="[object HTMLAllCollection]",fI="[object HTML document.all class]",TI="[object HTMLCollection]",hI=typeof Symbol=="function"&&!!Symbol.toStringTag,kI=!(0 in[,]),za=function(){return!1};if(typeof document=="object"){var MI=document.all;yt.call(MI)===yt.call(document.all)&&(za=function(e){if((kI||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=yt.call(e);return(t===gI||t===fI||t===TI||t===dI)&&e("")==null}catch{}return!1})}var NI=vn?function(e){if(za(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{vn(e,null,xa)}catch(t){if(t!==pt)return!1}return!Ca(e)&&da(e)}:function(e){if(za(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(hI)return da(e);if(Ca(e))return!1;var t=yt.call(e);return t!==pI&&t!==yI&&!/^\[object HTML/.test(t)?!1:da(e)},II=NI,SI=Object.prototype.toString,Go=Object.prototype.hasOwnProperty,AI=function(e,t,s){for(var a=0,r=e.length;a<r;a++)Go.call(e,a)&&(s==null?t(e[a],a,e):t.call(s,e[a],a,e))},EI=function(e,t,s){for(var a=0,r=e.length;a<r;a++)s==null?t(e.charAt(a),a,e):t.call(s,e.charAt(a),a,e)},bI=function(e,t,s){for(var a in e)Go.call(e,a)&&(s==null?t(e[a],a,e):t.call(s,e[a],a,e))},DI=function(e,t,s){if(!II(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=s),SI.call(e)==="[object Array]"?AI(e,t,a):typeof e=="string"?EI(e,t,a):bI(e,t,a)},vI=DI,pa=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],wI=typeof globalThis>"u"?si:globalThis,_I=function(){for(var e=[],t=0;t<pa.length;t++)typeof wI[pa[t]]=="function"&&(e[e.length]=pa[t]);return e},Nt=vI,jI=_I,Hr=Co,gs=Po,gt=ps,OI=gs("Object.prototype.toString"),Yo=ds(),Zr=typeof globalThis>"u"?si:globalThis,Ua=jI(),fs=gs("String.prototype.slice"),ya=Object.getPrototypeOf,LI=gs("Array.prototype.indexOf",!0)||function(e,t){for(var s=0;s<e.length;s+=1)if(e[s]===t)return s;return-1},It={__proto__:null};Yo&&gt&&ya?Nt(Ua,function(n){var e=new Zr[n];if(Symbol.toStringTag in e){var t=ya(e),s=gt(t,Symbol.toStringTag);if(!s){var a=ya(t);s=gt(a,Symbol.toStringTag)}It["$"+n]=Hr(s.get)}}):Nt(Ua,function(n){var e=new Zr[n],t=e.slice||e.set;t&&(It["$"+n]=Hr(t))});var RI=function(e){var t=!1;return Nt(It,function(s,a){if(!t)try{"$"+s(e)===a&&(t=fs(a,1))}catch{}}),t},xI=function(e){var t=!1;return Nt(It,function(s,a){if(!t)try{s(e),t=fs(a,1)}catch{}}),t},Vo=function(e){if(!e||typeof e!="object")return!1;if(!Yo){var t=fs(OI(e),8,-1);return LI(Ua,t)>-1?t:t!=="Object"?!1:xI(e)}return gt?RI(e):null},CI=Vo,zI=function(e){return!!CI(e)};(function(n){var e=rI,t=uI,s=Vo,a=zI;function r(_){return _.call.bind(_)}var i=typeof BigInt<"u",l=typeof Symbol<"u",m=r(Object.prototype.toString),d=r(Number.prototype.valueOf),y=r(String.prototype.valueOf),h=r(Boolean.prototype.valueOf);if(i)var T=r(BigInt.prototype.valueOf);if(l)var M=r(Symbol.prototype.valueOf);function E(_,tt){if(typeof _!="object")return!1;try{return tt(_),!0}catch{return!1}}n.isArgumentsObject=e,n.isGeneratorFunction=t,n.isTypedArray=a;function D(_){return typeof Promise<"u"&&_ instanceof Promise||_!==null&&typeof _=="object"&&typeof _.then=="function"&&typeof _.catch=="function"}n.isPromise=D;function L(_){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(_):a(_)||v(_)}n.isArrayBufferView=L;function j(_){return s(_)==="Uint8Array"}n.isUint8Array=j;function R(_){return s(_)==="Uint8ClampedArray"}n.isUint8ClampedArray=R;function x(_){return s(_)==="Uint16Array"}n.isUint16Array=x;function z(_){return s(_)==="Uint32Array"}n.isUint32Array=z;function U(_){return s(_)==="Int8Array"}n.isInt8Array=U;function B(_){return s(_)==="Int16Array"}n.isInt16Array=B;function C(_){return s(_)==="Int32Array"}n.isInt32Array=C;function H(_){return s(_)==="Float32Array"}n.isFloat32Array=H;function ne(_){return s(_)==="Float64Array"}n.isFloat64Array=ne;function se(_){return s(_)==="BigInt64Array"}n.isBigInt64Array=se;function ie(_){return s(_)==="BigUint64Array"}n.isBigUint64Array=ie;function ue(_){return m(_)==="[object Map]"}ue.working=typeof Map<"u"&&ue(new Map);function oe(_){return typeof Map>"u"?!1:ue.working?ue(_):_ instanceof Map}n.isMap=oe;function Z(_){return m(_)==="[object Set]"}Z.working=typeof Set<"u"&&Z(new Set);function me(_){return typeof Set>"u"?!1:Z.working?Z(_):_ instanceof Set}n.isSet=me;function Ee(_){return m(_)==="[object WeakMap]"}Ee.working=typeof WeakMap<"u"&&Ee(new WeakMap);function xe(_){return typeof WeakMap>"u"?!1:Ee.working?Ee(_):_ instanceof WeakMap}n.isWeakMap=xe;function we(_){return m(_)==="[object WeakSet]"}we.working=typeof WeakSet<"u"&&we(new WeakSet);function Ie(_){return we(_)}n.isWeakSet=Ie;function Se(_){return m(_)==="[object ArrayBuffer]"}Se.working=typeof ArrayBuffer<"u"&&Se(new ArrayBuffer);function K(_){return typeof ArrayBuffer>"u"?!1:Se.working?Se(_):_ instanceof ArrayBuffer}n.isArrayBuffer=K;function I(_){return m(_)==="[object DataView]"}I.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&I(new DataView(new ArrayBuffer(1),0,1));function v(_){return typeof DataView>"u"?!1:I.working?I(_):_ instanceof DataView}n.isDataView=v;var O=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function F(_){return m(_)==="[object SharedArrayBuffer]"}function W(_){return typeof O>"u"?!1:(typeof F.working>"u"&&(F.working=F(new O)),F.working?F(_):_ instanceof O)}n.isSharedArrayBuffer=W;function J(_){return m(_)==="[object AsyncFunction]"}n.isAsyncFunction=J;function Y(_){return m(_)==="[object Map Iterator]"}n.isMapIterator=Y;function $(_){return m(_)==="[object Set Iterator]"}n.isSetIterator=$;function X(_){return m(_)==="[object Generator]"}n.isGeneratorObject=X;function Me(_){return m(_)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=Me;function Ue(_){return E(_,d)}n.isNumberObject=Ue;function Ce(_){return E(_,y)}n.isStringObject=Ce;function _e(_){return E(_,h)}n.isBooleanObject=_e;function hn(_){return i&&E(_,T)}n.isBigIntObject=hn;function nt(_){return l&&E(_,M)}n.isSymbolObject=nt;function Un(_){return Ue(_)||Ce(_)||_e(_)||hn(_)||nt(_)}n.isBoxedPrimitive=Un;function Qt(_){return typeof Uint8Array<"u"&&(K(_)||W(_))}n.isAnyArrayBuffer=Qt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(_){Object.defineProperty(n,_,{enumerable:!1,value:function(){throw new Error(_+" is not supported in userland")}})})})(wo);var UI=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Pa={exports:{}};typeof Object.create=="function"?Pa.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Pa.exports=function(e,t){if(t){e.super_=t;var s=function(){};s.prototype=t.prototype,e.prototype=new s,e.prototype.constructor=e}};var PI=Pa.exports;(function(n){var e=Object.getOwnPropertyDescriptors||function(v){for(var O=Object.keys(v),F={},W=0;W<O.length;W++)F[O[W]]=Object.getOwnPropertyDescriptor(v,O[W]);return F},t=/%[sdj%]/g;n.format=function(I){if(!U(I)){for(var v=[],O=0;O<arguments.length;O++)v.push(i(arguments[O]));return v.join(" ")}for(var O=1,F=arguments,W=F.length,J=String(I).replace(t,function($){if($==="%%")return"%";if(O>=W)return $;switch($){case"%s":return String(F[O++]);case"%d":return Number(F[O++]);case"%j":try{return JSON.stringify(F[O++])}catch{return"[Circular]"}default:return $}}),Y=F[O];O<W;Y=F[++O])R(Y)||!ne(Y)?J+=" "+Y:J+=" "+i(Y);return J},n.deprecate=function(I,v){if(typeof G.process<"u"&&G.process.noDeprecation===!0)return I;if(typeof G.process>"u")return function(){return n.deprecate(I,v).apply(this,arguments)};var O=!1;function F(){if(!O){if(G.process.throwDeprecation)throw new Error(v);G.process.traceDeprecation?console.trace(v):console.error(v),O=!0}return I.apply(this,arguments)}return F};var s={},a=/^$/;if(G.process.env.NODE_DEBUG){var r=G.process.env.NODE_DEBUG;r=r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+r+"$","i")}n.debuglog=function(I){if(I=I.toUpperCase(),!s[I])if(a.test(I)){var v=G.process.pid;s[I]=function(){var O=n.format.apply(n,arguments);console.error("%s %d: %s",I,v,O)}}else s[I]=function(){};return s[I]};function i(I,v){var O={seen:[],stylize:m};return arguments.length>=3&&(O.depth=arguments[2]),arguments.length>=4&&(O.colors=arguments[3]),j(v)?O.showHidden=v:v&&n._extend(O,v),C(O.showHidden)&&(O.showHidden=!1),C(O.depth)&&(O.depth=2),C(O.colors)&&(O.colors=!1),C(O.customInspect)&&(O.customInspect=!0),O.colors&&(O.stylize=l),y(O,I,O.depth)}n.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(I,v){var O=i.styles[v];return O?"\x1B["+i.colors[O][0]+"m"+I+"\x1B["+i.colors[O][1]+"m":I}function m(I,v){return I}function d(I){var v={};return I.forEach(function(O,F){v[O]=!0}),v}function y(I,v,O){if(I.customInspect&&v&&ue(v.inspect)&&v.inspect!==n.inspect&&!(v.constructor&&v.constructor.prototype===v)){var F=v.inspect(O,I);return U(F)||(F=y(I,F,O)),F}var W=h(I,v);if(W)return W;var J=Object.keys(v),Y=d(J);if(I.showHidden&&(J=Object.getOwnPropertyNames(v)),ie(v)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return T(v);if(J.length===0){if(ue(v)){var $=v.name?": "+v.name:"";return I.stylize("[Function"+$+"]","special")}if(H(v))return I.stylize(RegExp.prototype.toString.call(v),"regexp");if(se(v))return I.stylize(Date.prototype.toString.call(v),"date");if(ie(v))return T(v)}var X="",Me=!1,Ue=["{","}"];if(L(v)&&(Me=!0,Ue=["[","]"]),ue(v)){var Ce=v.name?": "+v.name:"";X=" [Function"+Ce+"]"}if(H(v)&&(X=" "+RegExp.prototype.toString.call(v)),se(v)&&(X=" "+Date.prototype.toUTCString.call(v)),ie(v)&&(X=" "+T(v)),J.length===0&&(!Me||v.length==0))return Ue[0]+X+Ue[1];if(O<0)return H(v)?I.stylize(RegExp.prototype.toString.call(v),"regexp"):I.stylize("[Object]","special");I.seen.push(v);var _e;return Me?_e=M(I,v,O,Y,J):_e=J.map(function(hn){return E(I,v,O,Y,hn,Me)}),I.seen.pop(),D(_e,X,Ue)}function h(I,v){if(C(v))return I.stylize("undefined","undefined");if(U(v)){var O="'"+JSON.stringify(v).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return I.stylize(O,"string")}if(z(v))return I.stylize(""+v,"number");if(j(v))return I.stylize(""+v,"boolean");if(R(v))return I.stylize("null","null")}function T(I){return"["+Error.prototype.toString.call(I)+"]"}function M(I,v,O,F,W){for(var J=[],Y=0,$=v.length;Y<$;++Y)we(v,String(Y))?J.push(E(I,v,O,F,String(Y),!0)):J.push("");return W.forEach(function(X){X.match(/^\d+$/)||J.push(E(I,v,O,F,X,!0))}),J}function E(I,v,O,F,W,J){var Y,$,X;if(X=Object.getOwnPropertyDescriptor(v,W)||{value:v[W]},X.get?X.set?$=I.stylize("[Getter/Setter]","special"):$=I.stylize("[Getter]","special"):X.set&&($=I.stylize("[Setter]","special")),we(F,W)||(Y="["+W+"]"),$||(I.seen.indexOf(X.value)<0?(R(O)?$=y(I,X.value,null):$=y(I,X.value,O-1),$.indexOf(`
17
17
  `)>-1&&(J?$=$.split(`
18
18
  `).map(function(Me){return" "+Me}).join(`
19
19
  `).slice(2):$=`
20
20
  `+$.split(`
21
21
  `).map(function(Me){return" "+Me}).join(`
22
- `))):$=N.stylize("[Circular]","special")),C(Y)){if(J&&W.match(/^\d+$/))return $;Y=JSON.stringify(""+W),Y.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Y=Y.slice(1,-1),Y=N.stylize(Y,"name")):(Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=N.stylize(Y,"string"))}return Y+": "+$}function _(N,D,O){var F=N.reduce(function(W,J){return J.indexOf(`
23
- `)>=0,W+J.replace(/\u001b\[\d\d?m/g,"").length+1},0);return F>60?O[0]+(D===""?"":D+`
24
- `)+" "+N.join(`,
25
- `)+" "+O[1]:O[0]+D+" "+N.join(", ")+" "+O[1]}n.types=Do;function L(N){return Array.isArray(N)}n.isArray=L;function j(N){return typeof N=="boolean"}n.isBoolean=j;function R(N){return N===null}n.isNull=R;function x(N){return N==null}n.isNullOrUndefined=x;function z(N){return typeof N=="number"}n.isNumber=z;function U(N){return typeof N=="string"}n.isString=U;function B(N){return typeof N=="symbol"}n.isSymbol=B;function C(N){return N===void 0}n.isUndefined=C;function H(N){return ne(N)&&Z(N)==="[object RegExp]"}n.isRegExp=H,n.types.isRegExp=H;function ne(N){return typeof N=="object"&&N!==null}n.isObject=ne;function se(N){return ne(N)&&Z(N)==="[object Date]"}n.isDate=se,n.types.isDate=se;function ie(N){return ne(N)&&(Z(N)==="[object Error]"||N instanceof Error)}n.isError=ie,n.types.isNativeError=ie;function ue(N){return typeof N=="function"}n.isFunction=ue;function oe(N){return N===null||typeof N=="boolean"||typeof N=="number"||typeof N=="string"||typeof N=="symbol"||typeof N>"u"}n.isPrimitive=oe,n.isBuffer=xI;function Z(N){return Object.prototype.toString.call(N)}function me(N){return N<10?"0"+N.toString(10):N.toString(10)}var Ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(){var N=new Date,D=[me(N.getHours()),me(N.getMinutes()),me(N.getSeconds())].join(":");return[N.getDate(),Ee[N.getMonth()],D].join(" ")}n.log=function(){console.log("%s - %s",xe(),n.format.apply(n,arguments))},n.inherits=CI,n._extend=function(N,D){if(!D||!ne(D))return N;for(var O=Object.keys(D),F=O.length;F--;)N[O[F]]=D[O[F]];return N};function _e(N,D){return Object.prototype.hasOwnProperty.call(N,D)}var Ie=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(D){if(typeof D!="function")throw new TypeError('The "original" argument must be of type Function');if(Ie&&D[Ie]){var O=D[Ie];if(typeof O!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(O,Ie,{value:O,enumerable:!1,writable:!1,configurable:!0}),O}function O(){for(var F,W,J=new Promise(function(X,Me){F=X,W=Me}),Y=[],$=0;$<arguments.length;$++)Y.push(arguments[$]);Y.push(function(X,Me){X?W(X):F(Me)});try{D.apply(this,Y)}catch(X){W(X)}return J}return Object.setPrototypeOf(O,Object.getPrototypeOf(D)),Ie&&Object.defineProperty(O,Ie,{value:O,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(O,e(D))},n.promisify.custom=Ie;function Se(N,D){if(!N){var O=new Error("Promise was rejected with a falsy value");O.reason=N,N=O}return D(N)}function K(N){if(typeof N!="function")throw new TypeError('The "original" argument must be of type Function');function D(){for(var O=[],F=0;F<arguments.length;F++)O.push(arguments[F]);var W=O.pop();if(typeof W!="function")throw new TypeError("The last argument must be of type Function");var J=this,Y=function(){return W.apply(J,arguments)};N.apply(this,O).then(function($){G.process.nextTick(Y.bind(null,null,$))},function($){G.process.nextTick(Se.bind(null,$,Y))})}return Object.setPrototypeOf(D,Object.getPrototypeOf(N)),Object.defineProperties(D,e(N)),D}n.callbackify=K})(Pt);const{inherits:zI,format:ga}=Pt;function cn(n,e,t=Error){if(!n)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function s(a,r,i){if(!new.target)return new s(a,r,i);Error.captureStackTrace(this,s),this.code=n,this.message=e,this.name="AvvioError",a&&r&&i?this.message=ga(e,a,r,i):a&&r?this.message=ga(e,a,r):a?this.message=ga(e,a):this.message=e}return s.prototype[Symbol.toStringTag]="Error",s.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},zI(s,t),s}var Yo={createError:cn,AVV_ERR_EXPOSE_ALREADY_DEFINED:cn("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:cn("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:cn("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:cn("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:cn("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:cn("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},UI=function n(e,t,s){t===void 0&&(t=""),s||(s={});var a=function(m){var d={"│":"|","└":"`","├":"+","─":"-","┬":"-"};return s.unicode===!1?d[m]:m};typeof e=="string"&&(e={label:e});var r=e.nodes||[],i=(e.label||"").split(`
22
+ `))):$=I.stylize("[Circular]","special")),C(Y)){if(J&&W.match(/^\d+$/))return $;Y=JSON.stringify(""+W),Y.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Y=Y.slice(1,-1),Y=I.stylize(Y,"name")):(Y=Y.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Y=I.stylize(Y,"string"))}return Y+": "+$}function D(I,v,O){var F=I.reduce(function(W,J){return J.indexOf(`
23
+ `)>=0,W+J.replace(/\u001b\[\d\d?m/g,"").length+1},0);return F>60?O[0]+(v===""?"":v+`
24
+ `)+" "+I.join(`,
25
+ `)+" "+O[1]:O[0]+v+" "+I.join(", ")+" "+O[1]}n.types=wo;function L(I){return Array.isArray(I)}n.isArray=L;function j(I){return typeof I=="boolean"}n.isBoolean=j;function R(I){return I===null}n.isNull=R;function x(I){return I==null}n.isNullOrUndefined=x;function z(I){return typeof I=="number"}n.isNumber=z;function U(I){return typeof I=="string"}n.isString=U;function B(I){return typeof I=="symbol"}n.isSymbol=B;function C(I){return I===void 0}n.isUndefined=C;function H(I){return ne(I)&&Z(I)==="[object RegExp]"}n.isRegExp=H,n.types.isRegExp=H;function ne(I){return typeof I=="object"&&I!==null}n.isObject=ne;function se(I){return ne(I)&&Z(I)==="[object Date]"}n.isDate=se,n.types.isDate=se;function ie(I){return ne(I)&&(Z(I)==="[object Error]"||I instanceof Error)}n.isError=ie,n.types.isNativeError=ie;function ue(I){return typeof I=="function"}n.isFunction=ue;function oe(I){return I===null||typeof I=="boolean"||typeof I=="number"||typeof I=="string"||typeof I=="symbol"||typeof I>"u"}n.isPrimitive=oe,n.isBuffer=UI;function Z(I){return Object.prototype.toString.call(I)}function me(I){return I<10?"0"+I.toString(10):I.toString(10)}var Ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(){var I=new Date,v=[me(I.getHours()),me(I.getMinutes()),me(I.getSeconds())].join(":");return[I.getDate(),Ee[I.getMonth()],v].join(" ")}n.log=function(){console.log("%s - %s",xe(),n.format.apply(n,arguments))},n.inherits=PI,n._extend=function(I,v){if(!v||!ne(v))return I;for(var O=Object.keys(v),F=O.length;F--;)I[O[F]]=v[O[F]];return I};function we(I,v){return Object.prototype.hasOwnProperty.call(I,v)}var Ie=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(v){if(typeof v!="function")throw new TypeError('The "original" argument must be of type Function');if(Ie&&v[Ie]){var O=v[Ie];if(typeof O!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(O,Ie,{value:O,enumerable:!1,writable:!1,configurable:!0}),O}function O(){for(var F,W,J=new Promise(function(X,Me){F=X,W=Me}),Y=[],$=0;$<arguments.length;$++)Y.push(arguments[$]);Y.push(function(X,Me){X?W(X):F(Me)});try{v.apply(this,Y)}catch(X){W(X)}return J}return Object.setPrototypeOf(O,Object.getPrototypeOf(v)),Ie&&Object.defineProperty(O,Ie,{value:O,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(O,e(v))},n.promisify.custom=Ie;function Se(I,v){if(!I){var O=new Error("Promise was rejected with a falsy value");O.reason=I,I=O}return v(I)}function K(I){if(typeof I!="function")throw new TypeError('The "original" argument must be of type Function');function v(){for(var O=[],F=0;F<arguments.length;F++)O.push(arguments[F]);var W=O.pop();if(typeof W!="function")throw new TypeError("The last argument must be of type Function");var J=this,Y=function(){return W.apply(J,arguments)};I.apply(this,O).then(function($){G.process.nextTick(Y.bind(null,null,$))},function($){G.process.nextTick(Se.bind(null,$,Y))})}return Object.setPrototypeOf(v,Object.getPrototypeOf(I)),Object.defineProperties(v,e(I)),v}n.callbackify=K})(Pt);const{inherits:BI,format:ga}=Pt;function cn(n,e,t=Error){if(!n)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function s(a,r,i){if(!new.target)return new s(a,r,i);Error.captureStackTrace(this,s),this.code=n,this.message=e,this.name="AvvioError",a&&r&&i?this.message=ga(e,a,r,i):a&&r?this.message=ga(e,a,r):a?this.message=ga(e,a):this.message=e}return s.prototype[Symbol.toStringTag]="Error",s.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},BI(s,t),s}var $o={createError:cn,AVV_ERR_EXPOSE_ALREADY_DEFINED:cn("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:cn("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:cn("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:cn("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:cn("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:cn("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},QI=function n(e,t,s){t===void 0&&(t=""),s||(s={});var a=function(m){var d={"│":"|","└":"`","├":"+","─":"-","┬":"-"};return s.unicode===!1?d[m]:m};typeof e=="string"&&(e={label:e});var r=e.nodes||[],i=(e.label||"").split(`
26
26
  `),l=`
27
27
  `+t+(r.length?a("│"):" ")+" ";return t+i.join(l)+`
28
- `+r.map(function(m,d){var y=d===r.length-1,h=m.nodes&&m.nodes.length,T=t+(y?" ":a("│"))+" ";return t+a(y?"└":"├")+a("─")+a(h?"┬":"─")+" "+n(m,T,s).slice(t.length+2)}).join("")};const PI=UI,Kr=Symbol("avvio.TimeTree.untrackNode"),fa=Symbol("avvio.TimeTree.trackNode"),Jr=Symbol("avvio.TimeTree.getParent"),Xr=Symbol("avvio.TimeTree.getNode"),ei=Symbol("avvio.TimeTree.addNode");let BI=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[fa](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[Kr](e){this.tableId.delete(e.id);const t=this.tableLabel.get(e.label);if(t.id){this.tableLabel.delete(e.label);return}t.pop(),t.length===0&&this.tableLabel.delete(e.label)}[Jr](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[Xr](e){return this.tableId.get(e)}[ei](e,t,s){if(e===null)return this.root={id:"root",label:t,start:s,nodes:[]},this[fa](this.root),this.root.id;const r=this[Jr](e),i=`${t}-${Math.random()}`,l={id:i,parent:e,start:s,label:t,nodes:[]};return r.nodes.push(l),this[fa](l),i}start(e,t,s=Date.now()){return this[ei](e,t,s)}stop(e,t=Date.now()){const s=this[Xr](e);s&&(s.stop=t,s.diff=s.stop-s.start||0,this[Kr](s))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const e=s=>(s.label=`${s.label} ${s.diff} ms`,s.nodes.length>0&&(s.nodes=s.nodes.map(a=>e(a))),s),t=e(this.toJSON());return PI(t)}};var QI=BI,Ts={exports:{}},Ba={exports:{}},Ta,ni;function FI(){if(ni)return Ta;ni=1;var n=1e3,e=n*60,t=e*60,s=t*24,a=s*7,r=s*365.25;Ta=function(y,h){h=h||{};var T=typeof y;if(T==="string"&&y.length>0)return i(y);if(T==="number"&&isFinite(y))return h.long?m(y):l(y);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(y))};function i(y){if(y=String(y),!(y.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(y);if(h){var T=parseFloat(h[1]),M=(h[2]||"ms").toLowerCase();switch(M){case"years":case"year":case"yrs":case"yr":case"y":return T*r;case"weeks":case"week":case"w":return T*a;case"days":case"day":case"d":return T*s;case"hours":case"hour":case"hrs":case"hr":case"h":return T*t;case"minutes":case"minute":case"mins":case"min":case"m":return T*e;case"seconds":case"second":case"secs":case"sec":case"s":return T*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return T;default:return}}}}function l(y){var h=Math.abs(y);return h>=s?Math.round(y/s)+"d":h>=t?Math.round(y/t)+"h":h>=e?Math.round(y/e)+"m":h>=n?Math.round(y/n)+"s":y+"ms"}function m(y){var h=Math.abs(y);return h>=s?d(y,h,s,"day"):h>=t?d(y,h,t,"hour"):h>=e?d(y,h,e,"minute"):h>=n?d(y,h,n,"second"):y+" ms"}function d(y,h,T,M){var E=h>=T*1.5;return Math.round(y/T)+" "+M+(E?"s":"")}return Ta}function GI(n){t.debug=t,t.default=t,t.coerce=m,t.disable=r,t.enable=a,t.enabled=i,t.humanize=FI(),t.destroy=d,Object.keys(n).forEach(y=>{t[y]=n[y]}),t.names=[],t.skips=[],t.formatters={};function e(y){let h=0;for(let T=0;T<y.length;T++)h=(h<<5)-h+y.charCodeAt(T),h|=0;return t.colors[Math.abs(h)%t.colors.length]}t.selectColor=e;function t(y){let h,T=null,M,E;function _(...L){if(!_.enabled)return;const j=_,R=Number(new Date),x=R-(h||R);j.diff=x,j.prev=h,j.curr=R,h=R,L[0]=t.coerce(L[0]),typeof L[0]!="string"&&L.unshift("%O");let z=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,(B,C)=>{if(B==="%%")return"%";z++;const H=t.formatters[C];if(typeof H=="function"){const ne=L[z];B=H.call(j,ne),L.splice(z,1),z--}return B}),t.formatArgs.call(j,L),(j.log||t.log).apply(j,L)}return _.namespace=y,_.useColors=t.useColors(),_.color=t.selectColor(y),_.extend=s,_.destroy=t.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>T!==null?T:(M!==t.namespaces&&(M=t.namespaces,E=t.enabled(y)),E),set:L=>{T=L}}),typeof t.init=="function"&&t.init(_),_}function s(y,h){const T=t(this.namespace+(typeof h>"u"?":":h)+y);return T.log=this.log,T}function a(y){t.save(y),t.namespaces=y,t.names=[],t.skips=[];let h;const T=(typeof y=="string"?y:"").split(/[\s,]+/),M=T.length;for(h=0;h<M;h++)T[h]&&(y=T[h].replace(/\*/g,".*?"),y[0]==="-"?t.skips.push(new RegExp("^"+y.slice(1)+"$")):t.names.push(new RegExp("^"+y+"$")))}function r(){const y=[...t.names.map(l),...t.skips.map(l).map(h=>"-"+h)].join(",");return t.enable(""),y}function i(y){if(y[y.length-1]==="*")return!0;let h,T;for(h=0,T=t.skips.length;h<T;h++)if(t.skips[h].test(y))return!1;for(h=0,T=t.names.length;h<T;h++)if(t.names[h].test(y))return!0;return!1}function l(y){return y.toString().substring(2,y.toString().length-2).replace(/\.\*\?$/,"*")}function m(y){return y instanceof Error?y.stack||y.message:y}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 t.enable(t.load()),t}var YI=GI;(function(n,e){e.formatArgs=s,e.save=a,e.load=r,e.useColors=t,e.storage=i(),e.destroy=(()=>{let m=!1;return()=>{m||(m=!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`."))}})(),e.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 t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function s(m){if(m[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+m[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;m.splice(1,0,d,"color: inherit");let y=0,h=0;m[0].replace(/%[a-zA-Z%]/g,T=>{T!=="%%"&&(y++,T==="%c"&&(h=y))}),m.splice(h,0,d)}e.log=console.debug||console.log||(()=>{});function a(m){try{m?e.storage.setItem("debug",m):e.storage.removeItem("debug")}catch{}}function r(){let m;try{m=e.storage.getItem("debug")}catch{}return!m&&typeof G.process<"u"&&"env"in G.process&&(m=G.process.env.DEBUG),m}function i(){try{return localStorage}catch{}}n.exports=YI(e);const{formatters:l}=n.exports;l.j=function(m){try{return JSON.stringify(m)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(Ba,Ba.exports);var Vo=Ba.exports;const VI=To,$I=bo.EventEmitter,qI=Pt.inherits,Te=Vo("avvio"),{AVV_ERR_READY_TIMEOUT:WI}=Yo,ha=Symbol.for("plugin-meta");function HI(n,e){return n[ha]&&n[ha].name?n[ha].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:n.name?n.name:n.toString().split(`
29
- `).slice(0,2).map(t=>t.trim()).join(" -- ")}function ZI(){const n={};return n.promise=new Promise((e,t)=>{n.resolve=e,n.reject=t}),n}function zn(n,e,t,s,a){this.started=!1,this.func=e,this.opts=t,this.onFinish=null,this.parent=n,this.timeout=a===void 0?n._timeout:a,this.name=HI(e,t),this.isAfter=s,this.q=VI(n,KI,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}qI(zn,$I);zn.prototype.exec=function(n,e){const t=this.func;let s=!1;const a=this.name;if(this.parent._error&&!this.isAfter){Te("skipping loading of plugin as parent errored and it is not an after",a),G.process.nextTick(e);return}if(this.isAfter)this.server=n;else try{this.server=this.parent.override(n,t,this.opts)}catch(m){return Te("override errored",a),e(m)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Te("exec",a);let r;const i=m=>{if(s){Te("loading complete",a);return}this._error=m,Te(m?"exec errored":"exec completed",a),s=!0,r&&clearTimeout(r),e(m)};this.timeout>0&&(Te("setting up timeout",a,this.timeout),r=setTimeout(function(){Te("timed out",a),r=null;const m=new WI(a);m.fn=t,i(m)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const l=t(this.server,this.opts,i);l&&typeof l.then=="function"&&(Te("exec: resolving promise",a),l.then(()=>G.process.nextTick(i),m=>G.process.nextTick(i,m)))};zn.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const n=()=>{this.server.after((t,s)=>{this._error=t,this.q.pause(),t?(Te("rejecting promise",this.name,t),this._promise.reject(t)):(Te("resolving promise",this.name),this._promise.resolve()),this._promise=null,G.process.nextTick(s,t)}),this.q.resume()};let e;return this._promise?e=Promise.resolve():(this._promise=ZI(),e=this._promise.promise,this.server?n():this.on("start",n)),e};zn.prototype.enqueue=function(n,e){Te("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,e)};zn.prototype.finish=function(n,e){Te("finish",this.name,n);const t=()=>{this.loaded||(Te("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(n))};if(n){this._promise&&(this._promise.reject(n),this._promise=null),t();return}const s=()=>{if(Te("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const a=()=>{Te("wrap"),queueMicrotask(s)};this._promise.resolve(),this._promise.promise.then(a,a),this._promise=null}else t();else Te("delayed",this.name),this.q.drain=()=>{Te("drain",this.name),this.q.drain=JI,queueMicrotask(s)}};queueMicrotask(s),this.q.resume()};function KI(n,e){const t=this;G.process.nextTick(hs.bind(t),n,e)}function hs(n,e){if(typeof n.func.then=="function"){n.func.then(s=>{typeof s.default=="function"&&(s=s.default),n.func=s,hs.call(this,n,e)},e);return}const t=this._current[0];this._current.unshift(n),n.exec(t&&t.server||this._server,s=>{n.finish(s,a=>{this._current.shift(),e(a)})})}function JI(){}Ts.exports=zn;Ts.exports.loadPlugin=hs;var XI=Ts.exports;const ti=To,eS=bo.EventEmitter,nS=Pt.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:ka,AVV_ERR_CALLBACK_NOT_FN:Wn,AVV_ERR_PLUGIN_NOT_VALID:tS,AVV_ERR_ROOT_PLG_BOOTED:aS,AVV_ERR_READY_TIMEOUT:sS}=Yo,rS=QI,Qa=XI,Rn=Vo("avvio"),St=Symbol("kAvvio"),Ma=Symbol("kThenifyDoNotWrap");function iS(n,e,t){const s=e.expose||{},a=s.use||"use",r=s.after||"after",i=s.ready||"ready",l=s.onClose||"onClose",m=s.close||"close";if(n[a])throw new ka(a);if(n[r])throw new ka(r);if(n[i])throw new ka(i);n[a]=function(d,y){return t.use(d,y),this},Object.defineProperty(n,"then",{get:$o.bind(t)}),n[St]=!0,n[r]=function(d){return typeof d!="function"?t._loadRegistered():(t.after(Na(d,this)),this)},n[i]=function(d){if(d&&typeof d!="function")throw new Wn(i,typeof d);return t.ready(d?Na(d,this):void 0)},n[l]=function(d){if(typeof d!="function")throw new Wn(l,typeof d);return t.onClose(mS(d,this)),this},n[m]=function(d){if(d&&typeof d!="function")throw new Wn(m,typeof d);return d?(t.close(Na(d,this)),this):t.close()}}function ke(n,e,t){if(typeof n=="function"&&arguments.length===1&&(t=n,e={},n=null),typeof e=="function"&&(t=e,e={}),e=e||{},!(this instanceof ke)){const s=new ke(n,e,t);return n&&iS(n,e,s),s}e.autostart!==!1&&(e.autostart=!0),n=n||this,this._timeout=Number(e.timeout)||0,this._server=n,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),t&&this.once("start",t),this.started=!1,this.booted=!1,this.pluginTree=new rS,this._readyQ=ti(this,qo,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=ai},this._closeQ=ti(this,uS,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=ai},this._doStart=null,this._root=new Qa(this,oS.bind(this),e,!1,0),this._root.once("start",(s,a,r)=>{const i=this.pluginTree.start(null,a,r);this._root.once("loaded",(l,m,d)=>{this.pluginTree.stop(i,d)})}),Qa.loadPlugin.call(this,this._root,s=>{Rn("root plugin ready");try{this.emit("preReady"),this._root=null}catch(a){s=s||this._error||a}if(s){if(this._error=s,this._readyQ.length()===0)throw s}else this.booted=!0;this._readyQ.resume()})}function oS(n,e,t){this._doStart=t,e.autostart&&this.start()}nS(ke,eS);ke.prototype.start=function(){return this.started=!0,G.process.nextTick(this._doStart),this};ke.prototype.override=function(n,e,t){return n};function cS(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new tS(typeof n);return n}ke.prototype[St]=!0;ke.prototype.use=function(n,e){return this._lastUsed=this._addPlugin(n,e,!1),this};ke.prototype._loadRegistered=function(){const n=this._current[0];return!this.started&&!this.booted&&G.process.nextTick(()=>this._root.q.resume()),n?n.loadedSoFar():Promise.resolve()};Object.defineProperty(ke.prototype,"then",{get:$o});ke.prototype._addPlugin=function(n,e,t){if(n=cS(n),e=e||{},this.booted)throw new aS;const s=this._current[0],a=new Qa(this,n,e,t);if(a.once("start",(r,i,l)=>{const m=this.pluginTree.start(s.name,i,l);a.once("loaded",(d,y,h)=>{this.pluginTree.stop(m,h)})}),s.loaded)throw new Error(a.name,s.name);return s.enqueue(a,r=>{r&&(this._error=r)}),a};ke.prototype.after=function(n){if(!n)return this._loadRegistered();this._addPlugin(e.bind(this),{},!0);function e(t,s,a){qo.call(this,n,a)}return this};ke.prototype.onClose=function(n){if(typeof n!="function")throw new Error("not a function");n[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(n,e.bind(this));function e(t){t&&(this._error=t)}return this};ke.prototype.close=function(n){let e;if(n){if(typeof n!="function")throw new Wn("close",typeof n)}else e=new Promise(function(t,s){n=function(a){if(a)return s(a);t()}});return this.ready(()=>{this._error=null,this._closeQ.push(n),G.process.nextTick(this._closeQ.resume.bind(this._closeQ))}),e};ke.prototype.ready=function(n){if(n){if(typeof n!="function")throw new Wn("ready",typeof n);this._readyQ.push(n),queueMicrotask(this.start.bind(this));return}return new Promise((e,t)=>{this._readyQ.push(a),this.start();const s=this._current[0].server;function a(r,i,l){r?t(r):e(s),G.process.nextTick(l)}})};ke.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};ke.prototype.toJSON=function(){return this.pluginTree.toJSON()};function ai(){}function $o(){if(this.booted){Rn("thenify returning null because we are already booted");return}if(this[Ma]){this[Ma]=!1;return}return Rn("thenify"),(n,e)=>this._loadRegistered().then(()=>(this[Ma]=!0,n(this._server)),e)}function qo(n,e){const t=this._server,s=this._error;let a;if(this._error=null,n.length===0)this._error=s,a=n(),a&&!a[St]&&typeof a.then=="function"?a.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r)):G.process.nextTick(e);else if(n.length===1)a=n(s),a&&!a[St]&&typeof a.then=="function"?a.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r)):G.process.nextTick(e);else if(this._timeout===0){const r=i=>{this._error=i,e(this._error)};n.length===2?n(s,r):n(s,t,r)}else lS.call(this,n,s,t,e)}function lS(n,e,t,s){const a=n.name;Rn("setting up ready timeout",a,this._timeout);let r=setTimeout(()=>{Rn("timed out",a),r=null;const l=new sS(a);l.fn=n,this._error=l,s(l)},this._timeout);n.length===2?n(e,i.bind(this)):n(e,t,i.bind(this));function i(l){r&&(clearTimeout(r),this._error=l,s(this._error))}}function uS(n,e){const t=this._server,s=n[this._isOnCloseHandlerKey];if(n.length===0||n.length===1){let a;s?a=n(t):a=n(this._error),a&&typeof a.then=="function"?(Rn("resolving close/onClose promise"),a.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r))):G.process.nextTick(e)}else n.length===2?n(s?t:this._error,e):s?n(t,e):n(this._error,t,e)}function mS(n,e){return t.bind(e);function t(s,a){let r;n.length===0?(r=n(),r&&r.then?r.then(function(){G.process.nextTick(a)},a):G.process.nextTick(a)):n.length===1?(r=n(this),r&&r.then?r.then(function(){G.process.nextTick(a)},a):G.process.nextTick(a)):n(this,a)}}function Na(n,e){return t.bind(e);function t(s,a){let r;n?n.length===0?(r=n(),r&&r.then?r.then(function(){G.process.nextTick(a,s)},a):G.process.nextTick(a,s)):n.length===1?(r=n(s),r&&r.then?r.then(function(){G.process.nextTick(a)},a):G.process.nextTick(a)):n.length===2?n(s,a):n(s,this,a):G.process.nextTick(a)}}ls.exports=ke;ls.exports.express=function(n){return ke(n,{expose:{use:"load"}})};var dS=ls.exports;const pS=ec(dS);function yS(n,e=!0){const t=e?"https://grpc-web.streamlayer.io:443":"https://grpc-web.next.streamlayer.io:443",s=pS(Object.create(null),{autostart:!1});return s.use(iN),s.use(Hh,{sdkKey:n,host:t}),s.use(Jh),s.use(rN),s.use(xk),s.use(vk),s.after(async(a,r,i)=>{if(a)throw a;await r.sdk.initializeApp(),i()}),s.onClose(()=>{console.log("close")}),s}const Wo=(n,e,t)=>{const[s,a]=Q.useState(null);return Q.useEffect(()=>{let r=!1;if(!n)return console.error("streamlayer sdk key should be provided"),a(l=>(l!==null&&typeof l.disableApp=="function"&&l.disableApp(),null)),()=>{r=!0};const i=yS(n,t);if(e)for(const l of e)i.use(l);return i.ready().then(l=>{r||a(l.sdk)}).catch(l=>console.log(l)),()=>{r=!0,i.close(function(l){if(l)throw l})}},[n]),s};var Fa=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(Fa||{});const ks=Q.createContext({status:0,sdk:null}),gS=({sdkKey:n,plugins:e,children:t,production:s=!0})=>{const a=Wo(n,e,s),r=Q.useMemo(()=>a?{sdk:a,status:2}:{status:1,sdk:null},[a]);return f.jsx(aN,{children:f.jsx(ks.Provider,{value:r,children:t})})},fS=()=>{const{sdk:n}=Q.useContext(ks);return n},TS=()=>{const{sdk:n,status:e}=Q.useContext(ks);if(e===Fa.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return e===Fa.CONNECTED?f.jsx("div",{className:"StreamLayerSDK",children:"wait"}):n===null?f.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):f.jsx("div",{className:"StreamLayerSDK",children:f.jsx(nN,{sdk:n})})};exports.StreamLayerProvider=gS;exports.StreamLayerSDKReact=TS;exports.useStreamLayer=fS;exports.useStreamLayerApp=Wo;
28
+ `+r.map(function(m,d){var y=d===r.length-1,h=m.nodes&&m.nodes.length,T=t+(y?" ":a("│"))+" ";return t+a(y?"└":"├")+a("─")+a(h?"┬":"─")+" "+n(m,T,s).slice(t.length+2)}).join("")};const FI=QI,Kr=Symbol("avvio.TimeTree.untrackNode"),fa=Symbol("avvio.TimeTree.trackNode"),Jr=Symbol("avvio.TimeTree.getParent"),Xr=Symbol("avvio.TimeTree.getNode"),ei=Symbol("avvio.TimeTree.addNode");let GI=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[fa](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[Kr](e){this.tableId.delete(e.id);const t=this.tableLabel.get(e.label);if(t.id){this.tableLabel.delete(e.label);return}t.pop(),t.length===0&&this.tableLabel.delete(e.label)}[Jr](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[Xr](e){return this.tableId.get(e)}[ei](e,t,s){if(e===null)return this.root={id:"root",label:t,start:s,nodes:[]},this[fa](this.root),this.root.id;const r=this[Jr](e),i=`${t}-${Math.random()}`,l={id:i,parent:e,start:s,label:t,nodes:[]};return r.nodes.push(l),this[fa](l),i}start(e,t,s=Date.now()){return this[ei](e,t,s)}stop(e,t=Date.now()){const s=this[Xr](e);s&&(s.stop=t,s.diff=s.stop-s.start||0,this[Kr](s))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const e=s=>(s.label=`${s.label} ${s.diff} ms`,s.nodes.length>0&&(s.nodes=s.nodes.map(a=>e(a))),s),t=e(this.toJSON());return FI(t)}};var YI=GI,Ts={exports:{}},Ba={exports:{}},Ta,ni;function VI(){if(ni)return Ta;ni=1;var n=1e3,e=n*60,t=e*60,s=t*24,a=s*7,r=s*365.25;Ta=function(y,h){h=h||{};var T=typeof y;if(T==="string"&&y.length>0)return i(y);if(T==="number"&&isFinite(y))return h.long?m(y):l(y);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(y))};function i(y){if(y=String(y),!(y.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(y);if(h){var T=parseFloat(h[1]),M=(h[2]||"ms").toLowerCase();switch(M){case"years":case"year":case"yrs":case"yr":case"y":return T*r;case"weeks":case"week":case"w":return T*a;case"days":case"day":case"d":return T*s;case"hours":case"hour":case"hrs":case"hr":case"h":return T*t;case"minutes":case"minute":case"mins":case"min":case"m":return T*e;case"seconds":case"second":case"secs":case"sec":case"s":return T*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return T;default:return}}}}function l(y){var h=Math.abs(y);return h>=s?Math.round(y/s)+"d":h>=t?Math.round(y/t)+"h":h>=e?Math.round(y/e)+"m":h>=n?Math.round(y/n)+"s":y+"ms"}function m(y){var h=Math.abs(y);return h>=s?d(y,h,s,"day"):h>=t?d(y,h,t,"hour"):h>=e?d(y,h,e,"minute"):h>=n?d(y,h,n,"second"):y+" ms"}function d(y,h,T,M){var E=h>=T*1.5;return Math.round(y/T)+" "+M+(E?"s":"")}return Ta}function $I(n){t.debug=t,t.default=t,t.coerce=m,t.disable=r,t.enable=a,t.enabled=i,t.humanize=VI(),t.destroy=d,Object.keys(n).forEach(y=>{t[y]=n[y]}),t.names=[],t.skips=[],t.formatters={};function e(y){let h=0;for(let T=0;T<y.length;T++)h=(h<<5)-h+y.charCodeAt(T),h|=0;return t.colors[Math.abs(h)%t.colors.length]}t.selectColor=e;function t(y){let h,T=null,M,E;function D(...L){if(!D.enabled)return;const j=D,R=Number(new Date),x=R-(h||R);j.diff=x,j.prev=h,j.curr=R,h=R,L[0]=t.coerce(L[0]),typeof L[0]!="string"&&L.unshift("%O");let z=0;L[0]=L[0].replace(/%([a-zA-Z%])/g,(B,C)=>{if(B==="%%")return"%";z++;const H=t.formatters[C];if(typeof H=="function"){const ne=L[z];B=H.call(j,ne),L.splice(z,1),z--}return B}),t.formatArgs.call(j,L),(j.log||t.log).apply(j,L)}return D.namespace=y,D.useColors=t.useColors(),D.color=t.selectColor(y),D.extend=s,D.destroy=t.destroy,Object.defineProperty(D,"enabled",{enumerable:!0,configurable:!1,get:()=>T!==null?T:(M!==t.namespaces&&(M=t.namespaces,E=t.enabled(y)),E),set:L=>{T=L}}),typeof t.init=="function"&&t.init(D),D}function s(y,h){const T=t(this.namespace+(typeof h>"u"?":":h)+y);return T.log=this.log,T}function a(y){t.save(y),t.namespaces=y,t.names=[],t.skips=[];let h;const T=(typeof y=="string"?y:"").split(/[\s,]+/),M=T.length;for(h=0;h<M;h++)T[h]&&(y=T[h].replace(/\*/g,".*?"),y[0]==="-"?t.skips.push(new RegExp("^"+y.slice(1)+"$")):t.names.push(new RegExp("^"+y+"$")))}function r(){const y=[...t.names.map(l),...t.skips.map(l).map(h=>"-"+h)].join(",");return t.enable(""),y}function i(y){if(y[y.length-1]==="*")return!0;let h,T;for(h=0,T=t.skips.length;h<T;h++)if(t.skips[h].test(y))return!1;for(h=0,T=t.names.length;h<T;h++)if(t.names[h].test(y))return!0;return!1}function l(y){return y.toString().substring(2,y.toString().length-2).replace(/\.\*\?$/,"*")}function m(y){return y instanceof Error?y.stack||y.message:y}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 t.enable(t.load()),t}var qI=$I;(function(n,e){e.formatArgs=s,e.save=a,e.load=r,e.useColors=t,e.storage=i(),e.destroy=(()=>{let m=!1;return()=>{m||(m=!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`."))}})(),e.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 t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function s(m){if(m[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+m[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const d="color: "+this.color;m.splice(1,0,d,"color: inherit");let y=0,h=0;m[0].replace(/%[a-zA-Z%]/g,T=>{T!=="%%"&&(y++,T==="%c"&&(h=y))}),m.splice(h,0,d)}e.log=console.debug||console.log||(()=>{});function a(m){try{m?e.storage.setItem("debug",m):e.storage.removeItem("debug")}catch{}}function r(){let m;try{m=e.storage.getItem("debug")}catch{}return!m&&typeof G.process<"u"&&"env"in G.process&&(m=G.process.env.DEBUG),m}function i(){try{return localStorage}catch{}}n.exports=qI(e);const{formatters:l}=n.exports;l.j=function(m){try{return JSON.stringify(m)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(Ba,Ba.exports);var qo=Ba.exports;const WI=ko,HI=vo.EventEmitter,ZI=Pt.inherits,Te=qo("avvio"),{AVV_ERR_READY_TIMEOUT:KI}=$o,ha=Symbol.for("plugin-meta");function JI(n,e){return n[ha]&&n[ha].name?n[ha].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:n.name?n.name:n.toString().split(`
29
+ `).slice(0,2).map(t=>t.trim()).join(" -- ")}function XI(){const n={};return n.promise=new Promise((e,t)=>{n.resolve=e,n.reject=t}),n}function zn(n,e,t,s,a){this.started=!1,this.func=e,this.opts=t,this.onFinish=null,this.parent=n,this.timeout=a===void 0?n._timeout:a,this.name=JI(e,t),this.isAfter=s,this.q=WI(n,eS,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}ZI(zn,HI);zn.prototype.exec=function(n,e){const t=this.func;let s=!1;const a=this.name;if(this.parent._error&&!this.isAfter){Te("skipping loading of plugin as parent errored and it is not an after",a),G.process.nextTick(e);return}if(this.isAfter)this.server=n;else try{this.server=this.parent.override(n,t,this.opts)}catch(m){return Te("override errored",a),e(m)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Te("exec",a);let r;const i=m=>{if(s){Te("loading complete",a);return}this._error=m,Te(m?"exec errored":"exec completed",a),s=!0,r&&clearTimeout(r),e(m)};this.timeout>0&&(Te("setting up timeout",a,this.timeout),r=setTimeout(function(){Te("timed out",a),r=null;const m=new KI(a);m.fn=t,i(m)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const l=t(this.server,this.opts,i);l&&typeof l.then=="function"&&(Te("exec: resolving promise",a),l.then(()=>G.process.nextTick(i),m=>G.process.nextTick(i,m)))};zn.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const n=()=>{this.server.after((t,s)=>{this._error=t,this.q.pause(),t?(Te("rejecting promise",this.name,t),this._promise.reject(t)):(Te("resolving promise",this.name),this._promise.resolve()),this._promise=null,G.process.nextTick(s,t)}),this.q.resume()};let e;return this._promise?e=Promise.resolve():(this._promise=XI(),e=this._promise.promise,this.server?n():this.on("start",n)),e};zn.prototype.enqueue=function(n,e){Te("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,e)};zn.prototype.finish=function(n,e){Te("finish",this.name,n);const t=()=>{this.loaded||(Te("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(n))};if(n){this._promise&&(this._promise.reject(n),this._promise=null),t();return}const s=()=>{if(Te("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const a=()=>{Te("wrap"),queueMicrotask(s)};this._promise.resolve(),this._promise.promise.then(a,a),this._promise=null}else t();else Te("delayed",this.name),this.q.drain=()=>{Te("drain",this.name),this.q.drain=nS,queueMicrotask(s)}};queueMicrotask(s),this.q.resume()};function eS(n,e){const t=this;G.process.nextTick(hs.bind(t),n,e)}function hs(n,e){if(typeof n.func.then=="function"){n.func.then(s=>{typeof s.default=="function"&&(s=s.default),n.func=s,hs.call(this,n,e)},e);return}const t=this._current[0];this._current.unshift(n),n.exec(t&&t.server||this._server,s=>{n.finish(s,a=>{this._current.shift(),e(a)})})}function nS(){}Ts.exports=zn;Ts.exports.loadPlugin=hs;var tS=Ts.exports;const ti=ko,aS=vo.EventEmitter,sS=Pt.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:ka,AVV_ERR_CALLBACK_NOT_FN:Wn,AVV_ERR_PLUGIN_NOT_VALID:rS,AVV_ERR_ROOT_PLG_BOOTED:iS,AVV_ERR_READY_TIMEOUT:oS}=$o,cS=YI,Qa=tS,Rn=qo("avvio"),St=Symbol("kAvvio"),Ma=Symbol("kThenifyDoNotWrap");function lS(n,e,t){const s=e.expose||{},a=s.use||"use",r=s.after||"after",i=s.ready||"ready",l=s.onClose||"onClose",m=s.close||"close";if(n[a])throw new ka(a);if(n[r])throw new ka(r);if(n[i])throw new ka(i);n[a]=function(d,y){return t.use(d,y),this},Object.defineProperty(n,"then",{get:Wo.bind(t)}),n[St]=!0,n[r]=function(d){return typeof d!="function"?t._loadRegistered():(t.after(Na(d,this)),this)},n[i]=function(d){if(d&&typeof d!="function")throw new Wn(i,typeof d);return t.ready(d?Na(d,this):void 0)},n[l]=function(d){if(typeof d!="function")throw new Wn(l,typeof d);return t.onClose(yS(d,this)),this},n[m]=function(d){if(d&&typeof d!="function")throw new Wn(m,typeof d);return d?(t.close(Na(d,this)),this):t.close()}}function ke(n,e,t){if(typeof n=="function"&&arguments.length===1&&(t=n,e={},n=null),typeof e=="function"&&(t=e,e={}),e=e||{},!(this instanceof ke)){const s=new ke(n,e,t);return n&&lS(n,e,s),s}e.autostart!==!1&&(e.autostart=!0),n=n||this,this._timeout=Number(e.timeout)||0,this._server=n,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),t&&this.once("start",t),this.started=!1,this.booted=!1,this.pluginTree=new cS,this._readyQ=ti(this,Ho,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=ai},this._closeQ=ti(this,pS,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=ai},this._doStart=null,this._root=new Qa(this,uS.bind(this),e,!1,0),this._root.once("start",(s,a,r)=>{const i=this.pluginTree.start(null,a,r);this._root.once("loaded",(l,m,d)=>{this.pluginTree.stop(i,d)})}),Qa.loadPlugin.call(this,this._root,s=>{Rn("root plugin ready");try{this.emit("preReady"),this._root=null}catch(a){s=s||this._error||a}if(s){if(this._error=s,this._readyQ.length()===0)throw s}else this.booted=!0;this._readyQ.resume()})}function uS(n,e,t){this._doStart=t,e.autostart&&this.start()}sS(ke,aS);ke.prototype.start=function(){return this.started=!0,G.process.nextTick(this._doStart),this};ke.prototype.override=function(n,e,t){return n};function mS(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new rS(typeof n);return n}ke.prototype[St]=!0;ke.prototype.use=function(n,e){return this._lastUsed=this._addPlugin(n,e,!1),this};ke.prototype._loadRegistered=function(){const n=this._current[0];return!this.started&&!this.booted&&G.process.nextTick(()=>this._root.q.resume()),n?n.loadedSoFar():Promise.resolve()};Object.defineProperty(ke.prototype,"then",{get:Wo});ke.prototype._addPlugin=function(n,e,t){if(n=mS(n),e=e||{},this.booted)throw new iS;const s=this._current[0],a=new Qa(this,n,e,t);if(a.once("start",(r,i,l)=>{const m=this.pluginTree.start(s.name,i,l);a.once("loaded",(d,y,h)=>{this.pluginTree.stop(m,h)})}),s.loaded)throw new Error(a.name,s.name);return s.enqueue(a,r=>{r&&(this._error=r)}),a};ke.prototype.after=function(n){if(!n)return this._loadRegistered();this._addPlugin(e.bind(this),{},!0);function e(t,s,a){Ho.call(this,n,a)}return this};ke.prototype.onClose=function(n){if(typeof n!="function")throw new Error("not a function");n[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(n,e.bind(this));function e(t){t&&(this._error=t)}return this};ke.prototype.close=function(n){let e;if(n){if(typeof n!="function")throw new Wn("close",typeof n)}else e=new Promise(function(t,s){n=function(a){if(a)return s(a);t()}});return this.ready(()=>{this._error=null,this._closeQ.push(n),G.process.nextTick(this._closeQ.resume.bind(this._closeQ))}),e};ke.prototype.ready=function(n){if(n){if(typeof n!="function")throw new Wn("ready",typeof n);this._readyQ.push(n),queueMicrotask(this.start.bind(this));return}return new Promise((e,t)=>{this._readyQ.push(a),this.start();const s=this._current[0].server;function a(r,i,l){r?t(r):e(s),G.process.nextTick(l)}})};ke.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};ke.prototype.toJSON=function(){return this.pluginTree.toJSON()};function ai(){}function Wo(){if(this.booted){Rn("thenify returning null because we are already booted");return}if(this[Ma]){this[Ma]=!1;return}return Rn("thenify"),(n,e)=>this._loadRegistered().then(()=>(this[Ma]=!0,n(this._server)),e)}function Ho(n,e){const t=this._server,s=this._error;let a;if(this._error=null,n.length===0)this._error=s,a=n(),a&&!a[St]&&typeof a.then=="function"?a.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r)):G.process.nextTick(e);else if(n.length===1)a=n(s),a&&!a[St]&&typeof a.then=="function"?a.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r)):G.process.nextTick(e);else if(this._timeout===0){const r=i=>{this._error=i,e(this._error)};n.length===2?n(s,r):n(s,t,r)}else dS.call(this,n,s,t,e)}function dS(n,e,t,s){const a=n.name;Rn("setting up ready timeout",a,this._timeout);let r=setTimeout(()=>{Rn("timed out",a),r=null;const l=new oS(a);l.fn=n,this._error=l,s(l)},this._timeout);n.length===2?n(e,i.bind(this)):n(e,t,i.bind(this));function i(l){r&&(clearTimeout(r),this._error=l,s(this._error))}}function pS(n,e){const t=this._server,s=n[this._isOnCloseHandlerKey];if(n.length===0||n.length===1){let a;s?a=n(t):a=n(this._error),a&&typeof a.then=="function"?(Rn("resolving close/onClose promise"),a.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r))):G.process.nextTick(e)}else n.length===2?n(s?t:this._error,e):s?n(t,e):n(this._error,t,e)}function yS(n,e){return t.bind(e);function t(s,a){let r;n.length===0?(r=n(),r&&r.then?r.then(function(){G.process.nextTick(a)},a):G.process.nextTick(a)):n.length===1?(r=n(this),r&&r.then?r.then(function(){G.process.nextTick(a)},a):G.process.nextTick(a)):n(this,a)}}function Na(n,e){return t.bind(e);function t(s,a){let r;n?n.length===0?(r=n(),r&&r.then?r.then(function(){G.process.nextTick(a,s)},a):G.process.nextTick(a,s)):n.length===1?(r=n(s),r&&r.then?r.then(function(){G.process.nextTick(a)},a):G.process.nextTick(a)):n.length===2?n(s,a):n(s,this,a):G.process.nextTick(a)}}ls.exports=ke;ls.exports.express=function(n){return ke(n,{expose:{use:"load"}})};var gS=ls.exports;const fS=tc(gS);function TS(n,e=!0){const t=e?"https://grpc-web.streamlayer.io:443":"https://grpc-web.next.streamlayer.io:443",s=fS(Object.create(null),{autostart:!1});return s.use(lN),s.use(Kh,{sdkKey:n,host:t}),s.use(ek),s.use(cN),s.use(Uk),s.use(jk),s.after(async(a,r,i)=>{if(a)throw a;await r.sdk.initializeApp(),i()}),s.onClose(()=>{console.log("close")}),s}const Zo=(n,e,t)=>{const[s,a]=Q.useState(null);return Q.useEffect(()=>{let r=!1;if(!n)return console.error("streamlayer sdk key should be provided"),a(l=>(l!==null&&typeof l.disableApp=="function"&&l.disableApp(),null)),()=>{r=!0};const i=TS(n,t);if(e)for(const l of e)i.use(l);return i.ready().then(l=>{r||a(l.sdk)}).catch(l=>console.log(l)),()=>{r=!0,i.close(function(l){if(l)throw l})}},[n]),s};var Fa=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(Fa||{});const ks=Q.createContext({status:0,sdk:null}),hS=({sdkKey:n,plugins:e,children:t,production:s=!0})=>{const a=Zo(n,e,s),r=Q.useMemo(()=>a?{sdk:a,status:2}:{status:1,sdk:null},[a]);return f.jsx(iN,{children:f.jsx(ks.Provider,{value:r,children:t})})},kS=()=>{const{sdk:n}=Q.useContext(ks);return n},MS=()=>{const{sdk:n,status:e}=Q.useContext(ks);if(e===Fa.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return e===Fa.CONNECTED?f.jsx("div",{className:"StreamLayerSDK",children:"wait"}):n===null?f.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):f.jsx("div",{className:"StreamLayerSDK",children:f.jsx(sN,{sdk:n})})};exports.StreamLayerProvider=hS;exports.StreamLayerSDKReact=MS;exports.useStreamLayer=kS;exports.useStreamLayerApp=Zo;