@streamlayer/react 0.18.2 → 0.18.4

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.
Files changed (3) hide show
  1. package/lib/cjs/index.js +14 -14
  2. package/lib/es/index.js +4539 -4695
  3. package/package.json +2 -2
package/lib/cjs/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var qo=Object.defineProperty;var Wo=(n,e,t)=>e in n?qo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var A=(n,e,t)=>(Wo(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"),Ho=require("react-auth-code-input"),be=require("nanostores"),De=require("@nanostores/react");var ni=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zo(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ti={exports:{}},At={};/**
1
+ "use strict";var Vo=Object.defineProperty;var $o=(n,e,t)=>e in n?Vo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var S=(n,e,t)=>($o(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Q=require("react"),Ft=require("react-phone-number-input"),qo=require("react-auth-code-input"),be=require("nanostores"),Le=require("@nanostores/react");var ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wo(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ni={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 Ko=Q,Jo=Symbol.for("react.element"),Xo=Symbol.for("react.fragment"),ec=Object.prototype.hasOwnProperty,nc=Ko.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tc={key:!0,ref:!0,__self:!0,__source:!0};function ai(n,e,t){var a,s={},r=null,o=null;t!==void 0&&(r=""+t),e.key!==void 0&&(r=""+e.key),e.ref!==void 0&&(o=e.ref);for(a in e)ec.call(e,a)&&!tc.hasOwnProperty(a)&&(s[a]=e[a]);if(n&&n.defaultProps)for(a in e=n.defaultProps,e)s[a]===void 0&&(s[a]=e[a]);return{$$typeof:Jo,type:n,key:r,ref:o,props:s,_owner:nc.current}}At.Fragment=Xo;At.jsx=ai;At.jsxs=ai;ti.exports=At;var f=ti.exports;const Et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSIxMiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CiAgPHJlY3QgeD0iOC4yNSIgeT0iNyIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcpIiBmaWxsPSJ3aGl0ZSIvPgogIDxyZWN0IHg9IjciIHk9IjE1Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSA3IDE1Ljc1KSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==";function ac(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var sc=/^((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=ac(function(n){return sc.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),rc=function(){const e=Array.prototype.slice.call(arguments).filter(Boolean),t={},a=[];e.forEach(r=>{(r?r.split(" "):[]).forEach(c=>{if(c.startsWith("atm_")){const[,m]=c.split("_");t[m]=c}else a.push(c)})});const s=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&s.push(t[r]);return s.push(...a),s.join(" ")},ks=rc,ic=n=>n.toUpperCase()===n,oc=n=>e=>n.indexOf(e)===-1,si=(n,e)=>{const t={};return Object.keys(n).filter(oc(e)).forEach(a=>{t[a]=n[a]}),t};function cc(n,e,t){const a=si(e,t);if(!n){const s=typeof Yt=="function"?{default:Yt}:Yt;Object.keys(a).forEach(r=>{s.default(r)||delete a[r]})}return a}var lc=(n,e)=>{};function uc(n){let e="";return t=>{const a=(r,o)=>{const{as:c=n,class:m=e}=r,d=t.propsAsIs===void 0?!(typeof c=="string"&&c.indexOf("-")===-1&&!ic(c[0])):t.propsAsIs,y=cc(d,r,["as","class"]);y.ref=o,y.className=t.atomic?ks(t.class,y.className||m):ks(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;lc(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!==c?(y.as=c,Q.createElement(n,y)):Q.createElement(c,y)},s=Q.forwardRef?Q.forwardRef(a):r=>{const o=si(r,["innerRef"]);return a(o,r.innerRef)};return s.displayName=t.name,s.__linaria={className:t.class||e,extends:n},s}}var I=uc;const mc=I("div")({name:"Container",class:"c13cgims",propsAsIs:!1}),dc=I("div")({name:"IconWrap",class:"irnp5ce",propsAsIs:!1}),pc=I("img")({name:"Icon",class:"i19tgr4e",propsAsIs:!1}),yc=I("div")({name:"Content",class:"cczx66p",propsAsIs:!1}),gc=I("div")({name:"TitleWrap",class:"t9bb349",propsAsIs:!1}),fc=I("div")({name:"Title",class:"t1hgdyin",propsAsIs:!1}),Tc=I("div")({name:"CloseBtnWrap",class:"cdhbq9i",propsAsIs:!1}),hc=I("button")({name:"CloseBtn",class:"c1dwe42p",propsAsIs:!1}),kc=I("img")({name:"CloseIcon",class:"covang7",propsAsIs:!1}),ri=({close:n,action:e,data:{color:t,icon:a,title:s}})=>{const r=Q.useCallback(o=>{o.stopPropagation(),n==null||n()},[n]);return f.jsxs(mc,{onClick:e,children:[f.jsx(dc,{style:t?{backgroundColor:t}:{},children:a&&f.jsx(pc,{alt:"in-app-icon",src:a})}),f.jsxs(yc,{children:[f.jsx(gc,{children:f.jsx(fc,{id:"in-app-title",children:s||""})}),f.jsx(Tc,{children:f.jsx(hc,{onClick:r,children:f.jsx(kc,{alt:"close-in-app-icon",src:Et})})})]})]})};var Ms=typeof window>"u"?Q.useEffect:Q.useLayoutEffect,Mc=({isPlaying:n,duration:e,startAt:t=0,updateInterval:a=0,onComplete:s,onUpdate:r})=>{let[o,c]=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+(a===0?z:(z/a|0)*a),B=d.current+z,C=typeof e=="number"&&B>=e;c(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,c(R),n&&(h.current=requestAnimationFrame(E))},[n,t]);return Ms(()=>{if(r==null||r(o),e&&o>=e){y.current+=e*1e3;let{shouldRepeat:j=!1,delay:R=0,newStartAt:x}=(s==null?void 0:s(y.current/1e3))||{};j&&(M.current=setTimeout(()=>L(x),R*1e3))}},[o,e]),Ms(()=>(n&&(h.current=requestAnimationFrame(E)),D),[n,e,a]),{elapsedTime:o,reset:L}},Nc=(n,e,t)=>{let a=n/2,s=e/2,r=a-s,o=2*r,c=t==="clockwise"?"1,0":"0,1",m=2*Math.PI*r;return{path:`m ${a},${s} a ${r},${r} 0 ${c} 0,${o} a ${r},${r} 0 ${c} 0,-${o}`,pathLength:m}},Ns=(n,e)=>n===0||n===e?0:typeof e=="number"?n-e:0,Ic=n=>({position:"relative",width:n,height:n}),Sc={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},ii=(n,e,t,a,s)=>{if(a===0)return e;let r=(s?a-n:n)/a;return e+t*r},Is=n=>{var e,t;return(t=(e=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(a,s,r,o)=>`#${s}${s}${r}${r}${o}${o}`).substring(1).match(/.{2}/g))==null?void 0:e.map(a=>parseInt(a,16)))!=null?t:[]},Ac=(n,e)=>{var t;let{colors:a,colorsTime:s,isSmoothColorTransition:r=!0}=n;if(typeof a=="string")return a;let o=(t=s==null?void 0:s.findIndex((T,M)=>T>=e&&e>=s[M+1]))!=null?t:-1;if(!s||o===-1)return a[0];if(!r)return a[o];let c=s[o]-e,m=s[o]-s[o+1],d=Is(a[o]),y=Is(a[o+1]),h=!!n.isGrowing;return`rgb(${d.map((T,M)=>ii(c,T,y[M]-T,m,h)|0).join(",")})`},Ec=n=>{let{duration:e,initialRemainingTime:t,updateInterval:a,size:s=180,strokeWidth:r=12,trailStrokeWidth:o,isPlaying:c=!1,isGrowing:m=!1,rotation:d="clockwise",onComplete:y,onUpdate:h}=n,T=Q.useRef(),M=Math.max(r,o??0),{path:E,pathLength:D}=Nc(s,M,d),{elapsedTime:L}=Mc({isPlaying:c,duration:e,startAt:Ns(e,t),updateInterval:a,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:Ns(e,B)}}:void 0}),j=e-L;return{elapsedTime:L,path:E,pathLength:D,remainingTime:Math.ceil(j),rotation:d,size:s,stroke:Ac(n,j),strokeDashoffset:ii(L,0,D,e,m),strokeWidth:r}},oi=n=>{let{children:e,strokeLinecap:t,trailColor:a,trailStrokeWidth:s}=n,{path:r,pathLength:o,stroke:c,strokeDashoffset:m,remainingTime:d,elapsedTime:y,size:h,strokeWidth:T}=Ec(n);return Q.createElement("div",{style:Ic(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:a??"#d9d9d9",strokeWidth:s??T}),Q.createElement("path",{d:r,fill:"none",stroke:c,strokeLinecap:t??"round",strokeWidth:T,strokeDasharray:o,strokeDashoffset:m})),typeof e=="function"&&Q.createElement("div",{style:Sc},e({remainingTime:d,elapsedTime:y,color:c})))};oi.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 bc=I("div")({name:"RemainingTime",class:"r1l1rnv7",propsAsIs:!1}),Dc=[Vt.BLUE_PRIMARY,Vt.GREEN_1,Vt.RED_1],_c=[10,6,0],vc=30,wc=32,jc=4,Oc=0,ci=({isPlaying:n=!0,duration:e=vc,setTimeToExpire:t})=>{const a=({remainingTime:s})=>f.jsx(bc,{style:{color:s?"inherit":void 0},children:s});return Q.useEffect(()=>{t(!1)},[t]),f.jsx(oi,{isPlaying:n,duration:e,colors:Dc,colorsTime:_c,size:wc,strokeWidth:jc,trailStrokeWidth:Oc,onComplete:()=>t(!0),children:a})};function Ee(n,e){if(!n)throw new Error(e)}const Lc=34028234663852886e22,Rc=-34028234663852886e22,xc=4294967295,Cc=2147483647,zc=-2147483648;function ot(n){if(typeof n!="number")throw new Error("invalid int 32: "+typeof n);if(!Number.isInteger(n)||n>Cc||n<zc)throw new Error("invalid int 32: "+n)}function Sa(n){if(typeof n!="number")throw new Error("invalid uint 32: "+typeof n);if(!Number.isInteger(n)||n>xc||n<0)throw new Error("invalid uint 32: "+n)}function li(n){if(typeof n!="number")throw new Error("invalid float 32: "+typeof n);if(Number.isFinite(n)&&(n>Lc||n<Rc))throw new Error("invalid float 32: "+n)}const ui=Symbol("@bufbuild/protobuf/enum-type");function Uc(n){const e=n[ui];return Ee(e,"missing enum type on enum object"),e}function mi(n,e,t,a){n[ui]=di(e,t.map(s=>({no:s.no,name:s.name,localName:n[s.no]})))}function di(n,e,t){const a=Object.create(null),s=Object.create(null),r=[];for(const o of e){const c=pi(o);r.push(c),a[o.name]=c,s[o.no]=c}return{typeName:n,values:r,findName(o){return a[o]},findNumber(o){return s[o]}}}function Pc(n,e,t){const a={};for(const s of e){const r=pi(s);a[r.localName]=r.no,a[r.no]=r.localName}return mi(a,n,e),a}function pi(n){return"localName"in n?n:Object.assign(Object.assign({},n),{localName:n.name})}class Ge{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){const a=this.getType(),s=a.runtime.bin,r=s.makeReadOptions(t);return s.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){const a=this.getType(),s=a.runtime.json,r=s.makeReadOptions(t);return s.readMessage(a,e,r,this),this}fromJsonString(e,t){let a;try{a=JSON.parse(e)}catch(s){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${s instanceof Error?s.message:String(s)}`)}return this.fromJson(a,t)}toBinary(e){const t=this.getType(),a=t.runtime.bin,s=a.makeWriteOptions(e),r=s.writerFactory();return a.writeMessage(this,r,s),r.finish()}toJson(e){const t=this.getType(),a=t.runtime.json,s=a.makeWriteOptions(e);return a.writeMessage(this,s)}toJsonString(e){var t;const a=this.toJson(e);return JSON.stringify(a,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 Bc(n,e,t,a){var s;const r=(s=a==null?void 0:a.localName)!==null&&s!==void 0?s:e.substring(e.lastIndexOf(".")+1),o={[r]:function(c){n.util.initFields(this),n.util.initPartial(c,this)}}[r];return Object.setPrototypeOf(o.prototype,new Ge),Object.assign(o,{runtime:n,typeName:e,fields:n.util.newFieldList(t),fromBinary(c,m){return new o().fromBinary(c,m)},fromJson(c,m){return new o().fromJson(c,m)},fromJsonString(c,m){return new o().fromJsonString(c,m)},equals(c,m){return n.util.equals(o,c,m)}}),o}function Qc(n,e,t,a){return{syntax:n,json:e,bin:t,util:a,makeMessageType(s,r,o){return Bc(this,s,r,o)},makeEnum:Pc,makeEnumType:di,getEnumType:Uc}}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 pn;(function(n){n[n.BIGINT=0]="BIGINT",n[n.STRING=1]="STRING"})(pn||(pn={}));function Fc(){let n=0,e=0;for(let a=0;a<28;a+=7){let s=this.buf[this.pos++];if(n|=(s&127)<<a,!(s&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 a=3;a<=31;a+=7){let s=this.buf[this.pos++];if(e|=(s&127)<<a,!(s&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 o=n>>>r,c=!(!(o>>>7)&&e==0),m=(c?o|128:o)&255;if(t.push(m),!c)return}const a=n>>>28&15|(e&7)<<4,s=!!(e>>3);if(t.push((s?a|128:a)&255),!!s){for(let r=3;r<31;r=r+7){const o=e>>>r,c=!!(o>>>7),m=(c?o|128:o)&255;if(t.push(m),!c)return}t.push(e>>>31&1)}}const ct=4294967296;function Ss(n){const e=n[0]==="-";e&&(n=n.slice(1));const t=1e6;let a=0,s=0;function r(o,c){const m=Number(n.slice(o,c));s*=t,a=a*t+m,a>=ct&&(s=s+(a/ct|0),a=a%ct)}return r(-24,-18),r(-18,-12),r(-12,-6),r(-6),e?gi(a,s):Ya(a,s)}function Gc(n,e){let t=Ya(n,e);const a=t.hi&2147483648;a&&(t=gi(t.lo,t.hi));const s=yi(t.lo,t.hi);return a?"-"+s:s}function yi(n,e){if({lo:n,hi:e}=Yc(n,e),e<=2097151)return String(ct*e+n);const t=n&16777215,a=(n>>>24|e<<8)&16777215,s=e>>16&65535;let r=t+a*6777216+s*6710656,o=a+s*8147497,c=s*2;const m=1e7;return r>=m&&(o+=Math.floor(r/m),r%=m),o>=m&&(c+=Math.floor(o/m),o%=m),c.toString()+As(o)+As(r)}function Yc(n,e){return{lo:n>>>0,hi:e>>>0}}function Ya(n,e){return{lo:n|0,hi:e|0}}function gi(n,e){return e=~e,n?n=~n+1:e+=1,Ya(n,e)}const As=n=>{const e=String(n);return"0000000".slice(e.length)+e};function Es(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 Vc(){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={},fi={},bt={};bt.byteLength=Wc;bt.toByteArray=Zc;bt.fromByteArray=Xc;var Qe=[],Oe=[],$c=typeof Uint8Array<"u"?Uint8Array:Array,qt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Tn=0,qc=qt.length;Tn<qc;++Tn)Qe[Tn]=qt[Tn],Oe[qt.charCodeAt(Tn)]=Tn;Oe["-".charCodeAt(0)]=62;Oe["_".charCodeAt(0)]=63;function Ti(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 a=t===e?0:4-t%4;return[t,a]}function Wc(n){var e=Ti(n),t=e[0],a=e[1];return(t+a)*3/4-a}function Hc(n,e,t){return(e+t)*3/4-t}function Zc(n){var e,t=Ti(n),a=t[0],s=t[1],r=new $c(Hc(n,a,s)),o=0,c=s>0?a-4:a,m;for(m=0;m<c;m+=4)e=Oe[n.charCodeAt(m)]<<18|Oe[n.charCodeAt(m+1)]<<12|Oe[n.charCodeAt(m+2)]<<6|Oe[n.charCodeAt(m+3)],r[o++]=e>>16&255,r[o++]=e>>8&255,r[o++]=e&255;return s===2&&(e=Oe[n.charCodeAt(m)]<<2|Oe[n.charCodeAt(m+1)]>>4,r[o++]=e&255),s===1&&(e=Oe[n.charCodeAt(m)]<<10|Oe[n.charCodeAt(m+1)]<<4|Oe[n.charCodeAt(m+2)]>>2,r[o++]=e>>8&255,r[o++]=e&255),r}function Kc(n){return Qe[n>>18&63]+Qe[n>>12&63]+Qe[n>>6&63]+Qe[n&63]}function Jc(n,e,t){for(var a,s=[],r=e;r<t;r+=3)a=(n[r]<<16&16711680)+(n[r+1]<<8&65280)+(n[r+2]&255),s.push(Kc(a));return s.join("")}function Xc(n){for(var e,t=n.length,a=t%3,s=[],r=16383,o=0,c=t-a;o<c;o+=r)s.push(Jc(n,o,o+r>c?c:o+r));return a===1?(e=n[t-1],s.push(Qe[e>>2]+Qe[e<<4&63]+"==")):a===2&&(e=(n[t-2]<<8)+n[t-1],s.push(Qe[e>>10]+Qe[e>>4&63]+Qe[e<<2&63]+"=")),s.join("")}var Va={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Va.read=function(n,e,t,a,s){var r,o,c=s*8-a-1,m=(1<<c)-1,d=m>>1,y=-7,h=t?s-1:0,T=t?-1:1,M=n[e+h];for(h+=T,r=M&(1<<-y)-1,M>>=-y,y+=c;y>0;r=r*256+n[e+h],h+=T,y-=8);for(o=r&(1<<-y)-1,r>>=-y,y+=a;y>0;o=o*256+n[e+h],h+=T,y-=8);if(r===0)r=1-d;else{if(r===m)return o?NaN:(M?-1:1)*(1/0);o=o+Math.pow(2,a),r=r-d}return(M?-1:1)*o*Math.pow(2,r-a)};Va.write=function(n,e,t,a,s,r){var o,c,m,d=r*8-s-1,y=(1<<d)-1,h=y>>1,T=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=a?0:r-1,E=a?1:-1,D=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,o=y):(o=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-o))<1&&(o--,m*=2),o+h>=1?e+=T/m:e+=T*Math.pow(2,1-h),e*m>=2&&(o++,m/=2),o+h>=y?(c=0,o=y):o+h>=1?(c=(e*m-1)*Math.pow(2,s),o=o+h):(c=e*Math.pow(2,h-1)*Math.pow(2,s),o=0));s>=8;n[t+M]=c&255,M+=E,c/=256,s-=8);for(o=o<<s|c,d+=s;d>0;n[t+M]=o&255,M+=E,o/=256,d-=8);n[t+M-E]|=D*128};/*!
9
+ */var Ho=Q,Zo=Symbol.for("react.element"),Ko=Symbol.for("react.fragment"),Jo=Object.prototype.hasOwnProperty,Xo=Ho.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ec={key:!0,ref:!0,__self:!0,__source:!0};function ti(n,e,t){var s,a={},r=null,o=null;t!==void 0&&(r=""+t),e.key!==void 0&&(r=""+e.key),e.ref!==void 0&&(o=e.ref);for(s in e)Jo.call(e,s)&&!ec.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:Zo,type:n,key:r,ref:o,props:a,_owner:Xo.current}}At.Fragment=Ko;At.jsx=ti;At.jsxs=ti;ni.exports=At;var k=ni.exports;const Fa="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSIxMiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC4xIi8+CiAgPHJlY3QgeD0iOC4yNSIgeT0iNyIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcpIiBmaWxsPSJ3aGl0ZSIvPgogIDxyZWN0IHg9IjciIHk9IjE1Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSA3IDE1Ljc1KSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==";function nc(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var tc=/^((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)-.*))$/,Gt=nc(function(n){return tc.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),ac=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(" ")},ks=ac,sc=n=>n.toUpperCase()===n,rc=n=>e=>n.indexOf(e)===-1,ai=(n,e)=>{const t={};return Object.keys(n).filter(rc(e)).forEach(s=>{t[s]=n[s]}),t};function ic(n,e,t){const s=ai(e,t);if(!n){const a=typeof Gt=="function"?{default:Gt}:Gt;Object.keys(s).forEach(r=>{a.default(r)||delete s[r]})}return s}var oc=(n,e)=>{};function cc(n){let e="";return t=>{const s=(r,o)=>{const{as:l=n,class:m=e}=r,d=t.propsAsIs===void 0?!(typeof l=="string"&&l.indexOf("-")===-1&&!sc(l[0])):t.propsAsIs,y=ic(d,r,["as","class"]);y.ref=o,y.className=t.atomic?ks(t.class,y.className||m):ks(y.className||m,t.class);const{vars:T}=t;if(T){const f={};for(const w in T){const L=T[w],O=L[0],R=L[1]||"",x=typeof O=="function"?O(r):O;oc(x,t.name),f[`--${w}`]=`${x}${R}`}const M=y.style||{},E=Object.keys(M);E.length>0&&E.forEach(w=>{f[w]=M[w]}),y.style=f}return n.__linaria&&n!==l?(y.as=l,Q.createElement(n,y)):Q.createElement(l,y)},a=Q.forwardRef?Q.forwardRef(s):r=>{const o=ai(r,["innerRef"]);return s(o,r.innerRef)};return a.displayName=t.name,a.__linaria={className:t.class||e,extends:n},a}}var A=cc;const lc=A("div")({name:"Container",class:"c13cgims",propsAsIs:!1}),uc=A("div")({name:"IconWrap",class:"irnp5ce",propsAsIs:!1}),mc=A("img")({name:"Icon",class:"i19tgr4e",propsAsIs:!1}),dc=A("div")({name:"Content",class:"cczx66p",propsAsIs:!1}),pc=A("div")({name:"TitleWrap",class:"t9bb349",propsAsIs:!1}),yc=A("div")({name:"Title",class:"t1hgdyin",propsAsIs:!1}),gc=A("div")({name:"CloseBtnWrap",class:"cdhbq9i",propsAsIs:!1}),fc=A("button")({name:"CloseBtn",class:"c1dwe42p",propsAsIs:!1}),Tc=A("img")({name:"CloseIcon",class:"covang7",propsAsIs:!1}),si=({close:n,action:e,data:{color:t,icon:s,title:a}})=>{const r=Q.useCallback(o=>{o.stopPropagation(),n==null||n()},[n]);return k.jsxs(lc,{onClick:e,children:[k.jsx(uc,{style:t?{backgroundColor:t}:{},children:s&&k.jsx(mc,{alt:"in-app-icon",src:s})}),k.jsxs(dc,{children:[k.jsx(pc,{children:k.jsx(yc,{id:"in-app-title",children:a||""})}),k.jsx(gc,{children:k.jsx(fc,{onClick:r,children:k.jsx(Tc,{alt:"close-in-app-icon",src:Fa})})})]})]})};var hs=typeof window>"u"?Q.useEffect:Q.useLayoutEffect,kc=({isPlaying:n,duration:e,startAt:t=0,updateInterval:s=0,onComplete:a,onUpdate:r})=>{let[o,l]=Q.useState(t),m=Q.useRef(0),d=Q.useRef(t),y=Q.useRef(t*-1e3),T=Q.useRef(null),f=Q.useRef(null),M=Q.useRef(null),E=O=>{let R=O/1e3;if(f.current===null){f.current=R,T.current=requestAnimationFrame(E);return}let x=R-f.current,z=m.current+x;f.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||(T.current=requestAnimationFrame(E))},w=()=>{T.current&&cancelAnimationFrame(T.current),M.current&&clearTimeout(M.current),f.current=null},L=Q.useCallback(O=>{w(),m.current=0;let R=typeof O=="number"?O:t;d.current=R,l(R),n&&(T.current=requestAnimationFrame(E))},[n,t]);return hs(()=>{if(r==null||r(o),e&&o>=e){y.current+=e*1e3;let{shouldRepeat:O=!1,delay:R=0,newStartAt:x}=(a==null?void 0:a(y.current/1e3))||{};O&&(M.current=setTimeout(()=>L(x),R*1e3))}},[o,e]),hs(()=>(n&&(T.current=requestAnimationFrame(E)),w),[n,e,s]),{elapsedTime:o,reset:L}},hc=(n,e,t)=>{let s=n/2,a=e/2,r=s-a,o=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,${o} a ${r},${r} 0 ${l} 0,-${o}`,pathLength:m}},Ms=(n,e)=>n===0||n===e?0:typeof e=="number"?n-e:0,Mc=n=>({position:"relative",width:n,height:n}),Nc={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},ri=(n,e,t,s,a)=>{if(s===0)return e;let r=(a?s-n:n)/s;return e+t*r},Ns=n=>{var e,t;return(t=(e=n.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(s,a,r,o)=>`#${a}${a}${r}${r}${o}${o}`).substring(1).match(/.{2}/g))==null?void 0:e.map(s=>parseInt(s,16)))!=null?t:[]},Ic=(n,e)=>{var t;let{colors:s,colorsTime:a,isSmoothColorTransition:r=!0}=n;if(typeof s=="string")return s;let o=(t=a==null?void 0:a.findIndex((f,M)=>f>=e&&e>=a[M+1]))!=null?t:-1;if(!a||o===-1)return s[0];if(!r)return s[o];let l=a[o]-e,m=a[o]-a[o+1],d=Ns(s[o]),y=Ns(s[o+1]),T=!!n.isGrowing;return`rgb(${d.map((f,M)=>ri(l,f,y[M]-f,m,T)|0).join(",")})`},Sc=n=>{let{duration:e,initialRemainingTime:t,updateInterval:s,size:a=180,strokeWidth:r=12,trailStrokeWidth:o,isPlaying:l=!1,isGrowing:m=!1,rotation:d="clockwise",onComplete:y,onUpdate:T}=n,f=Q.useRef(),M=Math.max(r,o??0),{path:E,pathLength:w}=hc(a,M,d),{elapsedTime:L}=kc({isPlaying:l,duration:e,startAt:Ms(e,t),updateInterval:s,onUpdate:typeof T=="function"?R=>{let x=Math.ceil(e-R);x!==f.current&&(f.current=x,T(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:Ms(e,B)}}:void 0}),O=e-L;return{elapsedTime:L,path:E,pathLength:w,remainingTime:Math.ceil(O),rotation:d,size:a,stroke:Ic(n,O),strokeDashoffset:ri(L,0,w,e,m),strokeWidth:r}},ii=n=>{let{children:e,strokeLinecap:t,trailColor:s,trailStrokeWidth:a}=n,{path:r,pathLength:o,stroke:l,strokeDashoffset:m,remainingTime:d,elapsedTime:y,size:T,strokeWidth:f}=Sc(n);return Q.createElement("div",{style:Mc(T)},Q.createElement("svg",{viewBox:`0 0 ${T} ${T}`,width:T,height:T,xmlns:"http://www.w3.org/2000/svg"},Q.createElement("path",{d:r,fill:"none",stroke:s??"#d9d9d9",strokeWidth:a??f}),Q.createElement("path",{d:r,fill:"none",stroke:l,strokeLinecap:t??"round",strokeWidth:f,strokeDasharray:o,strokeDashoffset:m})),typeof e=="function"&&Q.createElement("div",{style:Nc},e({remainingTime:d,elapsedTime:y,color:l})))};ii.displayName="CountdownCircleTimer";const Yt={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 Ac=A("div")({name:"RemainingTime",class:"r1l1rnv7",propsAsIs:!1}),Ec=[Yt.BLUE_PRIMARY,Yt.GREEN_1,Yt.RED_1],bc=[10,6,0],Dc=30,_c=32,wc=4,vc=0,oi=({isPlaying:n=!0,duration:e=Dc,setTimeToExpire:t})=>{const s=({remainingTime:a})=>k.jsx(Ac,{style:{color:a?"inherit":void 0},children:a});return Q.useEffect(()=>{t(!1)},[t]),k.jsx(ii,{isPlaying:n,duration:e,colors:Ec,colorsTime:bc,size:_c,strokeWidth:wc,trailStrokeWidth:vc,onComplete:()=>t(!0),children:s})};function Ee(n,e){if(!n)throw new Error(e)}const Oc=34028234663852886e22,jc=-34028234663852886e22,Lc=4294967295,Rc=2147483647,xc=-2147483648;function ot(n){if(typeof n!="number")throw new Error("invalid int 32: "+typeof n);if(!Number.isInteger(n)||n>Rc||n<xc)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>Lc||n<0)throw new Error("invalid uint 32: "+n)}function ci(n){if(typeof n!="number")throw new Error("invalid float 32: "+typeof n);if(Number.isFinite(n)&&(n>Oc||n<jc))throw new Error("invalid float 32: "+n)}const li=Symbol("@bufbuild/protobuf/enum-type");function Cc(n){const e=n[li];return Ee(e,"missing enum type on enum object"),e}function ui(n,e,t,s){n[li]=mi(e,t.map(a=>({no:a.no,name:a.name,localName:n[a.no]})))}function mi(n,e,t){const s=Object.create(null),a=Object.create(null),r=[];for(const o of e){const l=di(o);r.push(l),s[o.name]=l,a[o.no]=l}return{typeName:n,values:r,findName(o){return s[o]},findNumber(o){return a[o]}}}function zc(n,e,t){const s={};for(const a of e){const r=di(a);s[r.localName]=r.no,s[r.no]=r.localName}return ui(s,n,e),s}function di(n){return"localName"in n?n:Object.assign(Object.assign({},n),{localName:n.name})}class Ge{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 Uc(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),o={[r]:function(l){n.util.initFields(this),n.util.initPartial(l,this)}}[r];return Object.setPrototypeOf(o.prototype,new Ge),Object.assign(o,{runtime:n,typeName:e,fields:n.util.newFieldList(t),fromBinary(l,m){return new o().fromBinary(l,m)},fromJson(l,m){return new o().fromJson(l,m)},fromJsonString(l,m){return new o().fromJsonString(l,m)},equals(l,m){return n.util.equals(o,l,m)}}),o}function Pc(n,e,t,s){return{syntax:n,json:e,bin:t,util:s,makeMessageType(a,r,o){return Uc(this,a,r,o)},makeEnum:zc,makeEnumType:mi,getEnumType:Cc}}var _;(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"})(_||(_={}));var dn;(function(n){n[n.BIGINT=0]="BIGINT",n[n.STRING=1]="STRING"})(dn||(dn={}));function Bc(){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 Vt(n,e,t){for(let r=0;r<28;r=r+7){const o=n>>>r,l=!(!(o>>>7)&&e==0),m=(l?o|128:o)&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 o=e>>>r,l=!!(o>>>7),m=(l?o|128:o)&255;if(t.push(m),!l)return}t.push(e>>>31&1)}}const ct=4294967296;function Is(n){const e=n[0]==="-";e&&(n=n.slice(1));const t=1e6;let s=0,a=0;function r(o,l){const m=Number(n.slice(o,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?yi(s,a):Ga(s,a)}function Qc(n,e){let t=Ga(n,e);const s=t.hi&2147483648;s&&(t=yi(t.lo,t.hi));const a=pi(t.lo,t.hi);return s?"-"+a:a}function pi(n,e){if({lo:n,hi:e}=Fc(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,o=s+a*8147497,l=a*2;const m=1e7;return r>=m&&(o+=Math.floor(r/m),r%=m),o>=m&&(l+=Math.floor(o/m),o%=m),l.toString()+Ss(o)+Ss(r)}function Fc(n,e){return{lo:n>>>0,hi:e>>>0}}function Ga(n,e){return{lo:n|0,hi:e|0}}function yi(n,e){return e=~e,n?n=~n+1:e+=1,Ga(n,e)}const Ss=n=>{const e=String(n);return"0000000".slice(e.length)+e};function As(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 Gc(){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={},gi={},Et={};Et.byteLength=$c;Et.toByteArray=Wc;Et.fromByteArray=Kc;var Qe=[],Oe=[],Yc=typeof Uint8Array<"u"?Uint8Array:Array,$t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var fn=0,Vc=$t.length;fn<Vc;++fn)Qe[fn]=$t[fn],Oe[$t.charCodeAt(fn)]=fn;Oe["-".charCodeAt(0)]=62;Oe["_".charCodeAt(0)]=63;function fi(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 $c(n){var e=fi(n),t=e[0],s=e[1];return(t+s)*3/4-s}function qc(n,e,t){return(e+t)*3/4-t}function Wc(n){var e,t=fi(n),s=t[0],a=t[1],r=new Yc(qc(n,s,a)),o=0,l=a>0?s-4:s,m;for(m=0;m<l;m+=4)e=Oe[n.charCodeAt(m)]<<18|Oe[n.charCodeAt(m+1)]<<12|Oe[n.charCodeAt(m+2)]<<6|Oe[n.charCodeAt(m+3)],r[o++]=e>>16&255,r[o++]=e>>8&255,r[o++]=e&255;return a===2&&(e=Oe[n.charCodeAt(m)]<<2|Oe[n.charCodeAt(m+1)]>>4,r[o++]=e&255),a===1&&(e=Oe[n.charCodeAt(m)]<<10|Oe[n.charCodeAt(m+1)]<<4|Oe[n.charCodeAt(m+2)]>>2,r[o++]=e>>8&255,r[o++]=e&255),r}function Hc(n){return Qe[n>>18&63]+Qe[n>>12&63]+Qe[n>>6&63]+Qe[n&63]}function Zc(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(Hc(s));return a.join("")}function Kc(n){for(var e,t=n.length,s=t%3,a=[],r=16383,o=0,l=t-s;o<l;o+=r)a.push(Zc(n,o,o+r>l?l:o+r));return s===1?(e=n[t-1],a.push(Qe[e>>2]+Qe[e<<4&63]+"==")):s===2&&(e=(n[t-2]<<8)+n[t-1],a.push(Qe[e>>10]+Qe[e>>4&63]+Qe[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,o,l=a*8-s-1,m=(1<<l)-1,d=m>>1,y=-7,T=t?a-1:0,f=t?-1:1,M=n[e+T];for(T+=f,r=M&(1<<-y)-1,M>>=-y,y+=l;y>0;r=r*256+n[e+T],T+=f,y-=8);for(o=r&(1<<-y)-1,r>>=-y,y+=s;y>0;o=o*256+n[e+T],T+=f,y-=8);if(r===0)r=1-d;else{if(r===m)return o?NaN:(M?-1:1)*(1/0);o=o+Math.pow(2,s),r=r-d}return(M?-1:1)*o*Math.pow(2,r-s)};Ya.write=function(n,e,t,s,a,r){var o,l,m,d=r*8-a-1,y=(1<<d)-1,T=y>>1,f=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=s?0:r-1,E=s?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,o=y):(o=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-o))<1&&(o--,m*=2),o+T>=1?e+=f/m:e+=f*Math.pow(2,1-T),e*m>=2&&(o++,m/=2),o+T>=y?(l=0,o=y):o+T>=1?(l=(e*m-1)*Math.pow(2,a),o=o+T):(l=e*Math.pow(2,T-1)*Math.pow(2,a),o=0));a>=8;n[t+M]=l&255,M+=E,l/=256,a-=8);for(o=o<<a|l,d+=a;d>0;n[t+M]=o&255,M+=E,o/=256,d-=8);n[t+M-E]|=w*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=Va,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=c,n.SlowBuffer=R,n.INSPECT_MAX_BYTES=50;const s=2147483647;n.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=r(),!c.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),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(p,i),p.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function o(p){if(p>s)throw new RangeError('The value "'+p+'" is invalid for option "size"');const i=new Uint8Array(p);return Object.setPrototypeOf(i,c.prototype),i}function c(p,i,u){if(typeof p=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(p)}return m(p,i,u)}c.poolSize=8192;function m(p,i,u){if(typeof p=="string")return T(p,i);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(Ue(p,ArrayBuffer)||p&&Ue(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ue(p,SharedArrayBuffer)||p&&Ue(p.buffer,SharedArrayBuffer)))return D(p,i,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 c.from(g,i,u);const k=L(p);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return c.from(p[Symbol.toPrimitive]("string"),i,u);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}c.from=function(p,i,u){return m(p,i,u)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,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,i,u){return d(p),p<=0?o(p):i!==void 0?typeof u=="string"?o(p).fill(i,u):o(p).fill(i):o(p)}c.alloc=function(p,i,u){return y(p,i,u)};function h(p){return d(p),o(p<0?0:j(p)|0)}c.allocUnsafe=function(p){return h(p)},c.allocUnsafeSlow=function(p){return h(p)};function T(p,i){if((typeof i!="string"||i==="")&&(i="utf8"),!c.isEncoding(i))throw new TypeError("Unknown encoding: "+i);const u=x(p,i)|0;let g=o(u);const k=g.write(p,i);return k!==u&&(g=g.slice(0,k)),g}function M(p){const i=p.length<0?0:j(p.length)|0,u=o(i);for(let g=0;g<i;g+=1)u[g]=p[g]&255;return u}function E(p){if(Ue(p,Uint8Array)){const i=new Uint8Array(p);return D(i.buffer,i.byteOffset,i.byteLength)}return M(p)}function D(p,i,u){if(i<0||p.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<i+(u||0))throw new RangeError('"length" is outside of buffer bounds');let g;return i===void 0&&u===void 0?g=new Uint8Array(p):u===void 0?g=new Uint8Array(p,i):g=new Uint8Array(p,i,u),Object.setPrototypeOf(g,c.prototype),g}function L(p){if(c.isBuffer(p)){const i=j(p.length)|0,u=o(i);return u.length===0||p.copy(u,0,0,i),u}if(p.length!==void 0)return typeof p.length!="number"||Ft(p.length)?o(0):M(p);if(p.type==="Buffer"&&Array.isArray(p.data))return M(p.data)}function j(p){if(p>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return p|0}function R(p){return+p!=p&&(p=0),c.alloc(+p)}c.isBuffer=function(i){return i!=null&&i._isBuffer===!0&&i!==c.prototype},c.compare=function(i,u){if(Ue(i,Uint8Array)&&(i=c.from(i,i.offset,i.byteLength)),Ue(u,Uint8Array)&&(u=c.from(u,u.offset,u.byteLength)),!c.isBuffer(i)||!c.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(i===u)return 0;let g=i.length,k=u.length;for(let S=0,b=Math.min(g,k);S<b;++S)if(i[S]!==u[S]){g=i[S],k=u[S];break}return g<k?-1:k<g?1:0},c.isEncoding=function(i){switch(String(i).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}},c.concat=function(i,u){if(!Array.isArray(i))throw new TypeError('"list" argument must be an Array of Buffers');if(i.length===0)return c.alloc(0);let g;if(u===void 0)for(u=0,g=0;g<i.length;++g)u+=i[g].length;const k=c.allocUnsafe(u);let S=0;for(g=0;g<i.length;++g){let b=i[g];if(Ue(b,Uint8Array))S+b.length>k.length?(c.isBuffer(b)||(b=c.from(b)),b.copy(k,S)):Uint8Array.prototype.set.call(k,b,S);else if(c.isBuffer(b))b.copy(k,S);else throw new TypeError('"list" argument must be an Array of Buffers');S+=b.length}return k};function x(p,i){if(c.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Ue(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(i){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;i=(""+i).toLowerCase(),k=!0}}c.byteLength=x;function z(p,i,u){let g=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,i>>>=0,u<=i))return"";for(p||(p="utf8");;)switch(p){case"hex":return Ne(this,i,u);case"utf8":case"utf-8":return Z(this,i,u);case"ascii":return Ve(this,i,u);case"latin1":case"binary":return Ce(this,i,u);case"base64":return oe(this,i,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ie(this,i,u);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}c.prototype._isBuffer=!0;function U(p,i,u){const g=p[i];p[i]=p[u],p[u]=g}c.prototype.swap16=function(){const i=this.length;if(i%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let u=0;u<i;u+=2)U(this,u,u+1);return this},c.prototype.swap32=function(){const i=this.length;if(i%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let u=0;u<i;u+=4)U(this,u,u+3),U(this,u+1,u+2);return this},c.prototype.swap64=function(){const i=this.length;if(i%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let u=0;u<i;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},c.prototype.toString=function(){const i=this.length;return i===0?"":arguments.length===0?Z(this,0,i):z.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(i){if(!c.isBuffer(i))throw new TypeError("Argument must be a Buffer");return this===i?!0:c.compare(this,i)===0},c.prototype.inspect=function(){let i="";const u=n.INSPECT_MAX_BYTES;return i=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(i+=" ... "),"<Buffer "+i+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(i,u,g,k,S){if(Ue(i,Uint8Array)&&(i=c.from(i,i.offset,i.byteLength)),!c.isBuffer(i))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof i);if(u===void 0&&(u=0),g===void 0&&(g=i?i.length:0),k===void 0&&(k=0),S===void 0&&(S=this.length),u<0||g>i.length||k<0||S>this.length)throw new RangeError("out of range index");if(k>=S&&u>=g)return 0;if(k>=S)return-1;if(u>=g)return 1;if(u>>>=0,g>>>=0,k>>>=0,S>>>=0,this===i)return 0;let b=S-k,V=g-u;const ce=Math.min(b,V),re=this.slice(k,S),le=i.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,i,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 i=="string"&&(i=c.from(i,g)),c.isBuffer(i))return i.length===0?-1:C(p,i,u,g,k);if(typeof i=="number")return i=i&255,typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(p,i,u):Uint8Array.prototype.lastIndexOf.call(p,i,u):C(p,[i],u,g,k);throw new TypeError("val must be string, number or Buffer")}function C(p,i,u,g,k){let S=1,b=p.length,V=i.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||i.length<2)return-1;S=2,b/=2,V/=2,u/=2}function ce(le,ae){return S===1?le[ae]:le.readUInt16BE(ae*S)}let re;if(k){let le=-1;for(re=u;re<b;re++)if(ce(p,re)===ce(i,le===-1?0:re-le)){if(le===-1&&(le=re),re-le+1===V)return le*S}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(i,ae)){le=!1;break}if(le)return re}return-1}c.prototype.includes=function(i,u,g){return this.indexOf(i,u,g)!==-1},c.prototype.indexOf=function(i,u,g){return B(this,i,u,g,!0)},c.prototype.lastIndexOf=function(i,u,g){return B(this,i,u,g,!1)};function H(p,i,u,g){u=Number(u)||0;const k=p.length-u;g?(g=Number(g),g>k&&(g=k)):g=k;const S=i.length;g>S/2&&(g=S/2);let b;for(b=0;b<g;++b){const V=parseInt(i.substr(b*2,2),16);if(Ft(V))return b;p[u+b]=V}return b}function ne(p,i,u,g){return Pn(Un(i,p.length-u),p,u,g)}function se(p,i,u,g){return Pn(Qt(i),p,u,g)}function ie(p,i,u,g){return Pn(tt(i),p,u,g)}function ue(p,i,u,g){return Pn(w(i,p.length-u),p,u,g)}c.prototype.write=function(i,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 S=this.length-u;if((g===void 0||g>S)&&(g=S),i.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,i,u,g);case"utf8":case"utf-8":return ne(this,i,u,g);case"ascii":case"latin1":case"binary":return se(this,i,u,g);case"base64":return ie(this,i,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,i,u,g);default:if(b)throw new TypeError("Unknown encoding: "+k);k=(""+k).toLowerCase(),b=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(p,i,u){return i===0&&u===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(i,u))}function Z(p,i,u){u=Math.min(p.length,u);const g=[];let k=i;for(;k<u;){const S=p[k];let b=null,V=S>239?4:S>223?3:S>191?2:1;if(k+V<=u){let ce,re,le,ae;switch(V){case 1:S<128&&(b=S);break;case 2:ce=p[k+1],(ce&192)===128&&(ae=(S&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=(S&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=(S&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 Me(g)}const me=4096;function Me(p){const i=p.length;if(i<=me)return String.fromCharCode.apply(String,p);let u="",g=0;for(;g<i;)u+=String.fromCharCode.apply(String,p.slice(g,g+=me));return u}function Ve(p,i,u){let g="";u=Math.min(p.length,u);for(let k=i;k<u;++k)g+=String.fromCharCode(p[k]&127);return g}function Ce(p,i,u){let g="";u=Math.min(p.length,u);for(let k=i;k<u;++k)g+=String.fromCharCode(p[k]);return g}function Ne(p,i,u){const g=p.length;(!i||i<0)&&(i=0),(!u||u<0||u>g)&&(u=g);let k="";for(let S=i;S<u;++S)k+=Vo[p[S]];return k}function Ie(p,i,u){const g=p.slice(i,u);let k="";for(let S=0;S<g.length-1;S+=2)k+=String.fromCharCode(g[S]+g[S+1]*256);return k}c.prototype.slice=function(i,u){const g=this.length;i=~~i,u=u===void 0?g:~~u,i<0?(i+=g,i<0&&(i=0)):i>g&&(i=g),u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),u<i&&(u=i);const k=this.subarray(i,u);return Object.setPrototypeOf(k,c.prototype),k};function K(p,i,u){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+i>u)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(i,u,g){i=i>>>0,u=u>>>0,g||K(i,u,this.length);let k=this[i],S=1,b=0;for(;++b<u&&(S*=256);)k+=this[i+b]*S;return k},c.prototype.readUintBE=c.prototype.readUIntBE=function(i,u,g){i=i>>>0,u=u>>>0,g||K(i,u,this.length);let k=this[i+--u],S=1;for(;u>0&&(S*=256);)k+=this[i+--u]*S;return k},c.prototype.readUint8=c.prototype.readUInt8=function(i,u){return i=i>>>0,u||K(i,1,this.length),this[i]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(i,u){return i=i>>>0,u||K(i,2,this.length),this[i]|this[i+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(i,u){return i=i>>>0,u||K(i,2,this.length),this[i]<<8|this[i+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(i,u){return i=i>>>0,u||K(i,4,this.length),(this[i]|this[i+1]<<8|this[i+2]<<16)+this[i+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(i,u){return i=i>>>0,u||K(i,4,this.length),this[i]*16777216+(this[i+1]<<16|this[i+2]<<8|this[i+3])},c.prototype.readBigUInt64LE=Ke(function(i){i=i>>>0,Re(i,"offset");const u=this[i],g=this[i+7];(u===void 0||g===void 0)&&je(i,this.length-8);const k=u+this[++i]*2**8+this[++i]*2**16+this[++i]*2**24,S=this[++i]+this[++i]*2**8+this[++i]*2**16+g*2**24;return BigInt(k)+(BigInt(S)<<BigInt(32))}),c.prototype.readBigUInt64BE=Ke(function(i){i=i>>>0,Re(i,"offset");const u=this[i],g=this[i+7];(u===void 0||g===void 0)&&je(i,this.length-8);const k=u*2**24+this[++i]*2**16+this[++i]*2**8+this[++i],S=this[++i]*2**24+this[++i]*2**16+this[++i]*2**8+g;return(BigInt(k)<<BigInt(32))+BigInt(S)}),c.prototype.readIntLE=function(i,u,g){i=i>>>0,u=u>>>0,g||K(i,u,this.length);let k=this[i],S=1,b=0;for(;++b<u&&(S*=256);)k+=this[i+b]*S;return S*=128,k>=S&&(k-=Math.pow(2,8*u)),k},c.prototype.readIntBE=function(i,u,g){i=i>>>0,u=u>>>0,g||K(i,u,this.length);let k=u,S=1,b=this[i+--k];for(;k>0&&(S*=256);)b+=this[i+--k]*S;return S*=128,b>=S&&(b-=Math.pow(2,8*u)),b},c.prototype.readInt8=function(i,u){return i=i>>>0,u||K(i,1,this.length),this[i]&128?(255-this[i]+1)*-1:this[i]},c.prototype.readInt16LE=function(i,u){i=i>>>0,u||K(i,2,this.length);const g=this[i]|this[i+1]<<8;return g&32768?g|4294901760:g},c.prototype.readInt16BE=function(i,u){i=i>>>0,u||K(i,2,this.length);const g=this[i+1]|this[i]<<8;return g&32768?g|4294901760:g},c.prototype.readInt32LE=function(i,u){return i=i>>>0,u||K(i,4,this.length),this[i]|this[i+1]<<8|this[i+2]<<16|this[i+3]<<24},c.prototype.readInt32BE=function(i,u){return i=i>>>0,u||K(i,4,this.length),this[i]<<24|this[i+1]<<16|this[i+2]<<8|this[i+3]},c.prototype.readBigInt64LE=Ke(function(i){i=i>>>0,Re(i,"offset");const u=this[i],g=this[i+7];(u===void 0||g===void 0)&&je(i,this.length-8);const k=this[i+4]+this[i+5]*2**8+this[i+6]*2**16+(g<<24);return(BigInt(k)<<BigInt(32))+BigInt(u+this[++i]*2**8+this[++i]*2**16+this[++i]*2**24)}),c.prototype.readBigInt64BE=Ke(function(i){i=i>>>0,Re(i,"offset");const u=this[i],g=this[i+7];(u===void 0||g===void 0)&&je(i,this.length-8);const k=(u<<24)+this[++i]*2**16+this[++i]*2**8+this[++i];return(BigInt(k)<<BigInt(32))+BigInt(this[++i]*2**24+this[++i]*2**16+this[++i]*2**8+g)}),c.prototype.readFloatLE=function(i,u){return i=i>>>0,u||K(i,4,this.length),t.read(this,i,!0,23,4)},c.prototype.readFloatBE=function(i,u){return i=i>>>0,u||K(i,4,this.length),t.read(this,i,!1,23,4)},c.prototype.readDoubleLE=function(i,u){return i=i>>>0,u||K(i,8,this.length),t.read(this,i,!0,52,8)},c.prototype.readDoubleBE=function(i,u){return i=i>>>0,u||K(i,8,this.length),t.read(this,i,!1,52,8)};function N(p,i,u,g,k,S){if(!c.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>k||i<S)throw new RangeError('"value" argument is out of bounds');if(u+g>p.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(i,u,g,k){if(i=+i,u=u>>>0,g=g>>>0,!k){const V=Math.pow(2,8*g)-1;N(this,i,u,g,V,0)}let S=1,b=0;for(this[u]=i&255;++b<g&&(S*=256);)this[u+b]=i/S&255;return u+g},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(i,u,g,k){if(i=+i,u=u>>>0,g=g>>>0,!k){const V=Math.pow(2,8*g)-1;N(this,i,u,g,V,0)}let S=g-1,b=1;for(this[u+S]=i&255;--S>=0&&(b*=256);)this[u+S]=i/b&255;return u+g},c.prototype.writeUint8=c.prototype.writeUInt8=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,1,255,0),this[u]=i&255,u+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,2,65535,0),this[u]=i&255,this[u+1]=i>>>8,u+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,2,65535,0),this[u]=i>>>8,this[u+1]=i&255,u+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,4,4294967295,0),this[u+3]=i>>>24,this[u+2]=i>>>16,this[u+1]=i>>>8,this[u]=i&255,u+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,4,4294967295,0),this[u]=i>>>24,this[u+1]=i>>>16,this[u+2]=i>>>8,this[u+3]=i&255,u+4};function _(p,i,u,g,k){ze(i,g,k,p,u,7);let S=Number(i&BigInt(4294967295));p[u++]=S,S=S>>8,p[u++]=S,S=S>>8,p[u++]=S,S=S>>8,p[u++]=S;let b=Number(i>>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,i,u,g,k){ze(i,g,k,p,u,7);let S=Number(i&BigInt(4294967295));p[u+7]=S,S=S>>8,p[u+6]=S,S=S>>8,p[u+5]=S,S=S>>8,p[u+4]=S;let b=Number(i>>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}c.prototype.writeBigUInt64LE=Ke(function(i,u=0){return _(this,i,u,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Ke(function(i,u=0){return O(this,i,u,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(i,u,g,k){if(i=+i,u=u>>>0,!k){const ce=Math.pow(2,8*g-1);N(this,i,u,g,ce-1,-ce)}let S=0,b=1,V=0;for(this[u]=i&255;++S<g&&(b*=256);)i<0&&V===0&&this[u+S-1]!==0&&(V=1),this[u+S]=(i/b>>0)-V&255;return u+g},c.prototype.writeIntBE=function(i,u,g,k){if(i=+i,u=u>>>0,!k){const ce=Math.pow(2,8*g-1);N(this,i,u,g,ce-1,-ce)}let S=g-1,b=1,V=0;for(this[u+S]=i&255;--S>=0&&(b*=256);)i<0&&V===0&&this[u+S+1]!==0&&(V=1),this[u+S]=(i/b>>0)-V&255;return u+g},c.prototype.writeInt8=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,1,127,-128),i<0&&(i=255+i+1),this[u]=i&255,u+1},c.prototype.writeInt16LE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,2,32767,-32768),this[u]=i&255,this[u+1]=i>>>8,u+2},c.prototype.writeInt16BE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,2,32767,-32768),this[u]=i>>>8,this[u+1]=i&255,u+2},c.prototype.writeInt32LE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,4,2147483647,-2147483648),this[u]=i&255,this[u+1]=i>>>8,this[u+2]=i>>>16,this[u+3]=i>>>24,u+4},c.prototype.writeInt32BE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,4,2147483647,-2147483648),i<0&&(i=4294967295+i+1),this[u]=i>>>24,this[u+1]=i>>>16,this[u+2]=i>>>8,this[u+3]=i&255,u+4},c.prototype.writeBigInt64LE=Ke(function(i,u=0){return _(this,i,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Ke(function(i,u=0){return O(this,i,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function F(p,i,u,g,k,S){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,i,u,g,k){return i=+i,u=u>>>0,k||F(p,i,u,4),t.write(p,i,u,g,23,4),u+4}c.prototype.writeFloatLE=function(i,u,g){return W(this,i,u,!0,g)},c.prototype.writeFloatBE=function(i,u,g){return W(this,i,u,!1,g)};function J(p,i,u,g,k){return i=+i,u=u>>>0,k||F(p,i,u,8),t.write(p,i,u,g,52,8),u+8}c.prototype.writeDoubleLE=function(i,u,g){return J(this,i,u,!0,g)},c.prototype.writeDoubleBE=function(i,u,g){return J(this,i,u,!1,g)},c.prototype.copy=function(i,u,g,k){if(!c.isBuffer(i))throw new TypeError("argument should be a Buffer");if(g||(g=0),!k&&k!==0&&(k=this.length),u>=i.length&&(u=i.length),u||(u=0),k>0&&k<g&&(k=g),k===g||i.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),i.length-u<k-g&&(k=i.length-u+g);const S=k-g;return this===i&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,g,k):Uint8Array.prototype.set.call(i,this.subarray(g,k),u),S},c.prototype.fill=function(i,u,g,k){if(typeof i=="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"&&!c.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(i.length===1){const b=i.charCodeAt(0);(k==="utf8"&&b<128||k==="latin1")&&(i=b)}}else typeof i=="number"?i=i&255:typeof i=="boolean"&&(i=Number(i));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,i||(i=0);let S;if(typeof i=="number")for(S=u;S<g;++S)this[S]=i;else{const b=c.isBuffer(i)?i:c.from(i,k),V=b.length;if(V===0)throw new TypeError('The value "'+i+'" is invalid for argument "value"');for(S=0;S<g-u;++S)this[S+u]=b[S%V]}return this};const Y={};function $(p,i,u){Y[p]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:i.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,i){return`The "${p}" argument must be of type number. Received type ${typeof i}`},TypeError),$("ERR_OUT_OF_RANGE",function(p,i,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 ${i}. Received ${k}`,g},RangeError);function X(p){let i="",u=p.length;const g=p[0]==="-"?1:0;for(;u>=g+4;u-=3)i=`_${p.slice(u-3,u)}${i}`;return`${p.slice(0,u)}${i}`}function ke(p,i,u){Re(i,"offset"),(p[i]===void 0||p[i+u]===void 0)&&je(i,p.length-(u+1))}function ze(p,i,u,g,k,S){if(p>u||p<i){const b=typeof i=="bigint"?"n":"";let V;throw S>3?i===0||i===BigInt(0)?V=`>= 0${b} and < 2${b} ** ${(S+1)*8}${b}`:V=`>= -(2${b} ** ${(S+1)*8-1}${b}) and < 2 ** ${(S+1)*8-1}${b}`:V=`>= ${i}${b} and <= ${u}${b}`,new Y.ERR_OUT_OF_RANGE("value",V,p)}ke(g,k,S)}function Re(p,i){if(typeof p!="number")throw new Y.ERR_INVALID_ARG_TYPE(i,"number",p)}function je(p,i,u){throw Math.floor(p)!==p?(Re(p,u),new Y.ERR_OUT_OF_RANGE(u||"offset","an integer",p)):i<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(u||"offset",`>= ${u?1:0} and <= ${i}`,p)}const fn=/[^+/0-9A-Za-z-_]/g;function nt(p){if(p=p.split("=")[0],p=p.trim().replace(fn,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function Un(p,i){i=i||1/0;let u;const g=p.length;let k=null;const S=[];for(let b=0;b<g;++b){if(u=p.charCodeAt(b),u>55295&&u<57344){if(!k){if(u>56319){(i-=3)>-1&&S.push(239,191,189);continue}else if(b+1===g){(i-=3)>-1&&S.push(239,191,189);continue}k=u;continue}if(u<56320){(i-=3)>-1&&S.push(239,191,189),k=u;continue}u=(k-55296<<10|u-56320)+65536}else k&&(i-=3)>-1&&S.push(239,191,189);if(k=null,u<128){if((i-=1)<0)break;S.push(u)}else if(u<2048){if((i-=2)<0)break;S.push(u>>6|192,u&63|128)}else if(u<65536){if((i-=3)<0)break;S.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((i-=4)<0)break;S.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return S}function Qt(p){const i=[];for(let u=0;u<p.length;++u)i.push(p.charCodeAt(u)&255);return i}function w(p,i){let u,g,k;const S=[];for(let b=0;b<p.length&&!((i-=2)<0);++b)u=p.charCodeAt(b),g=u>>8,k=u%256,S.push(k),S.push(g);return S}function tt(p){return e.toByteArray(nt(p))}function Pn(p,i,u,g){let k;for(k=0;k<g&&!(k+u>=i.length||k>=p.length);++k)i[k+u]=p[k];return k}function Ue(p,i){return p instanceof i||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===i.name}function Ft(p){return p!==p}const Vo=function(){const p="0123456789abcdef",i=new Array(256);for(let u=0;u<16;++u){const g=u*16;for(let k=0;k<16;++k)i[g+k]=p[u]+p[k]}return i}();function Ke(p){return typeof BigInt>"u"?$o:p}function $o(){throw new Error("BigInt not supported")}})(fi);var hi={exports:{}},pe=hi.exports={},Pe,Be;function Aa(){throw new Error("setTimeout has not been defined")}function Ea(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Pe=setTimeout:Pe=Aa}catch{Pe=Aa}try{typeof clearTimeout=="function"?Be=clearTimeout:Be=Ea}catch{Be=Ea}})();function ki(n){if(Pe===setTimeout)return setTimeout(n,0);if((Pe===Aa||!Pe)&&setTimeout)return Pe=setTimeout,setTimeout(n,0);try{return Pe(n,0)}catch{try{return Pe.call(null,n,0)}catch{return Pe.call(this,n,0)}}}function el(n){if(Be===clearTimeout)return clearTimeout(n);if((Be===Ea||!Be)&&clearTimeout)return Be=clearTimeout,clearTimeout(n);try{return Be(n)}catch{try{return Be.call(null,n)}catch{return Be.call(this,n)}}}var qe=[],_n=!1,cn,lt=-1;function nl(){!_n||!cn||(_n=!1,cn.length?qe=cn.concat(qe):lt=-1,qe.length&&Mi())}function Mi(){if(!_n){var n=ki(nl);_n=!0;for(var e=qe.length;e;){for(cn=qe,qe=[];++lt<e;)cn&&cn[lt].run();lt=-1,e=qe.length}cn=null,_n=!1,el(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 Ni(n,e)),qe.length===1&&!_n&&ki(Mi)};function Ni(n,e){this.fun=n,this.array=e}Ni.prototype.run=function(){this.fun.apply(null,this.array)};pe.title="browser";pe.browser=!0;pe.env={};pe.argv=[];pe.version="";pe.versions={};function Ze(){}pe.on=Ze;pe.addListener=Ze;pe.once=Ze;pe.off=Ze;pe.removeListener=Ze;pe.removeAllListeners=Ze;pe.emit=Ze;pe.prependListener=Ze;pe.prependOnceListener=Ze;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 tl=hi.exports;(function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const e=fi,t=tl,a=o=>o&&o.__esModule?o:{default:o},s=a(t),r=globalThis||void 0||self;Object.defineProperty(n,"Buffer",{enumerable:!0,get:()=>e.Buffer}),Object.defineProperty(n,"process",{enumerable:!0,get:()=>s.default}),n.global=r})(G);function al(){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 s=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),o=BigInt("0"),c=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(m){const d=typeof m=="bigint"?m:BigInt(m);if(d>r||d<s)throw new Error(`int64 invalid: ${m}`);return d},uParse(m){const d=typeof m=="bigint"?m:BigInt(m);if(d>c||d<o)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=s=>Ee(/^-?[0-9]+$/.test(s),`int64 invalid: ${s}`),a=s=>Ee(/^[0-9]+$/.test(s),`uint64 invalid: ${s}`);return{zero:"0",supported:!1,parse(s){return typeof s!="string"&&(s=s.toString()),t(s),s},uParse(s){return typeof s!="string"&&(s=s.toString()),a(s),s},enc(s){return typeof s!="string"&&(s=s.toString()),t(s),Ss(s)},uEnc(s){return typeof s!="string"&&(s=s.toString()),a(s),Ss(s)},dec(s,r){return Gc(s,r)},uDec(s,r){return yi(s,r)}}}const Te=al();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 sl{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 s=0;s<this.chunks.length;s++)e+=this.chunks[s].length;let t=new Uint8Array(e),a=0;for(let s=0;s<this.chunks.length;s++)t.set(this.chunks[s],a),a+=this.chunks[s].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(Sa(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return ot(e),Es(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){li(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){Sa(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,Es(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),a=new DataView(t.buffer),s=Te.enc(e);return a.setInt32(0,s.lo,!0),a.setInt32(4,s.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),a=new DataView(t.buffer),s=Te.uEnc(e);return a.setInt32(0,s.lo,!0),a.setInt32(4,s.hi,!0),this.raw(t)}int64(e){let t=Te.enc(e);return $t(t.lo,t.hi,this.buf),this}sint64(e){let t=Te.enc(e),a=t.hi>>31,s=t.lo<<1^a,r=(t.hi<<1|t.lo>>>31)^a;return $t(s,r,this.buf),this}uint64(e){let t=Te.uEnc(e);return $t(t.lo,t.hi,this.buf),this}}class rl{constructor(e,t){this.varint64=Fc,this.uint32=Vc,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,a=e&7;if(t<=0||a<0||a>5)throw new Error("illegal tag: field no "+t+" wire type "+a);return[t,a]}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 a=this.uint32();this.pos+=a;break;case de.StartGroup:let s;for(;(s=this.tag()[1])!==de.EndGroup;)this.skip(s);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 Te.dec(...this.varint64())}uint64(){return Te.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),a=-(e&1);return e=(e>>>1|(t&1)<<31)^a,t=t>>>1^a,Te.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 Te.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Te.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 ba(n,e){return e instanceof Ge||!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 Je(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 a=0;a<e.length;a++)if(e[a]!==t[a])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 Da(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?Te.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 Ii(n,e){const t=e===void 0;let a=de.Varint,s=e===0;switch(n){case v.STRING:s=t||!e.length,a=de.LengthDelimited;break;case v.BOOL:s=e===!1;break;case v.DOUBLE:a=de.Bit64;break;case v.FLOAT:a=de.Bit32;break;case v.INT64:s=t||e==0;break;case v.UINT64:s=t||e==0;break;case v.FIXED64:s=t||e==0,a=de.Bit64;break;case v.BYTES:s=t||!e.byteLength,a=de.LengthDelimited;break;case v.FIXED32:a=de.Bit32;break;case v.SFIXED32:a=de.Bit32;break;case v.SFIXED64:s=t||e==0,a=de.Bit64;break;case v.SINT64:s=t||e==0;break}const r=v[n].toLowerCase();return[a,r,t||s]}const hn=Symbol("@bufbuild/protobuf/unknown-fields"),bs={readUnknownFields:!0,readerFactory:n=>new rl(n)},Ds={writeUnknownFields:!0,writerFactory:()=>new sl};function il(n){return n?Object.assign(Object.assign({},bs),n):bs}function ol(n){return n?Object.assign(Object.assign({},Ds),n):Ds}function cl(){return{makeReadOptions:il,makeWriteOptions:ol,listUnknownFields(n){var e;return(e=n[hn])!==null&&e!==void 0?e:[]},discardUnknownFields(n){delete n[hn]},writeUnknownFields(n,e){const a=n[hn];if(a)for(const s of a)e.tag(s.no,s.wireType).raw(s.data)},onUnknownField(n,e,t,a){const s=n;Array.isArray(s[hn])||(s[hn]=[]),s[hn].push({no:e,wireType:t,data:a})},readMessage(n,e,t,a){const s=n.getType(),r=t===void 0?e.len:e.pos+t;for(;e.pos<r;){const[o,c]=e.tag(),m=s.fields.find(o);if(!m){const T=e.skip(c);a.readUnknownFields&&this.onUnknownField(n,o,c,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=ul),y){let j=d[h];if(c==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,a)):d[h]instanceof Ge?ut(e,d[h],a):(d[h]=ut(e,new E,a),E.fieldWrapper&&!m.oneof&&!m.repeated&&(d[h]=E.fieldWrapper.unwrapField(d[h])));break;case"map":let[D,L]=ll(m,e,a);d[h][D]=L;break}}}}}function ut(n,e,t){return e.getType().runtime.bin.readMessage(e,n,n.uint32(),t),e}function ll(n,e,t){const a=e.uint32(),s=e.pos+a;let r,o;for(;e.pos<s;){let[c]=e.tag();switch(c){case 1:r=ft(e,n.K);break;case 2:switch(n.V.kind){case"scalar":o=ft(e,n.V.T);break;case"enum":o=e.int32();break;case"message":o=ut(e,new n.V.T,t);break}break}}if(r===void 0){let c=Da(n.K,pn.BIGINT);r=n.K==v.BOOL?c.toString():c}if(typeof r!="string"&&typeof r!="number"&&(r=r.toString()),o===void 0)switch(n.V.kind){case"scalar":o=Da(n.V.T,pn.BIGINT);break;case"enum":o=0;break;case"message":o=new n.V.T;break}return[r,o]}function ul(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 ml(n,e,t,a,s){n.tag(t.no,de.LengthDelimited),n.fork();let r=a;switch(t.K){case v.INT32:case v.FIXED32:case v.UINT32:case v.SFIXED32:case v.SINT32:r=Number.parseInt(a);break;case v.BOOL:Ee(a=="true"||a=="false"),r=a=="true";break}switch(Yn(n,t.K,1,r,!0),t.V.kind){case"scalar":Yn(n,t.V.T,2,s,!0);break;case"enum":Yn(n,v.INT32,2,s,!0);break;case"message":_a(n,e,t.V.T,2,s);break}n.join()}function _a(n,e,t,a,s){if(s!==void 0){const r=ba(t,s);n.tag(a,de.LengthDelimited).bytes(r.toBinary(e))}}function Yn(n,e,t,a,s){let[r,o,c]=Ii(e,a);(!c||s)&&n.tag(t,r)[o](a)}function dl(n,e,t,a){if(!a.length)return;n.tag(t,de.LengthDelimited).fork();let[,s]=Ii(e);for(let r=0;r<a.length;r++)n[s](a[r]);n.join()}function pl(){return Object.assign(Object.assign({},cl()),{writeMessage(n,e,t){const a=n.getType();for(const s of a.fields.byNumber()){let r,o=s.repeated,c=s.localName;if(s.oneof){const m=n[s.oneof.localName];if(m.case!==c)continue;r=m.value}else r=n[c];switch(s.kind){case"scalar":case"enum":let m=s.kind=="enum"?v.INT32:s.T;if(o)if(s.packed)dl(e,m,s.no,r);else for(const d of r)Yn(e,m,s.no,d,!0);else r!==void 0&&Yn(e,m,s.no,r,!!s.oneof||s.opt);break;case"message":if(o)for(const d of r)_a(e,t,s.T,s.no,d);else _a(e,t,s.T,s.no,r);break;case"map":for(const[d,y]of Object.entries(r))ml(e,t,s,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 $a={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),a=0,s=0,r,o=0;for(let c=0;c<n.length;c++){if(r=Dt[n.charCodeAt(c)],r===void 0)switch(n[c]){case"=":s=0;case`
15
- `:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:o=r,s=1;break;case 1:t[a++]=o<<2|(r&48)>>4,o=r,s=2;break;case 2:t[a++]=(o&15)<<4|(r&60)>>2,o=r,s=3;break;case 3:t[a++]=(o&3)<<6|r,s=0;break}}if(s==1)throw Error("invalid base64 string.");return t.subarray(0,a)},enc(n){let e="",t=0,a,s=0;for(let r=0;r<n.length;r++)switch(a=n[r],t){case 0:e+=$e[a>>2],s=(a&3)<<4,t=1;break;case 1:e+=$e[s|a>>4],s=(a&15)<<2,t=2;break;case 2:e+=$e[s|a>>6],e+=$e[a&63],t=0;break}return t&&(e+=$e[s],e+="=",t==1&&(e+="=")),e}},_s={ignoreUnknownFields:!1},vs={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function yl(n){return n?Object.assign(Object.assign({},_s),n):_s}function gl(n){return n?Object.assign(Object.assign({},vs),n):vs}function fl(n){const e=n(Tl,ws);return{makeReadOptions:yl,makeWriteOptions:gl,readMessage(t,a,s,r){if(a==null||Array.isArray(a)||typeof a!="object")throw new Error(`cannot decode message ${t.typeName} from JSON: ${this.debug(a)}`);r=r??new t;const o={};for(const[c,m]of Object.entries(a)){const d=t.fields.findJsonName(c);if(!d){if(!s.ignoreUnknownFields)throw new Error(`cannot decode message ${t.typeName} from JSON: key "${c}" is unknown`);continue}let y=d.localName,h=r;if(d.oneof){if(m===null&&d.kind=="scalar")continue;const T=o[d.oneof.localName];if(T)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${d.oneof.name}" present: "${T}", "${c}"`);o[d.oneof.localName]=c,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,s);break;case"enum":if(E=Wt(d.T,M,s.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,s);break;case"enum":if(D=Wt(d.V.T,E,s.ignoreUnknownFields),D===void 0)continue;break;case"scalar":try{D=Bn(d.V.T,E,pn.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,pn.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 "${c}"`);continue}h[y]instanceof Ge?h[y].fromJson(m,s):(h[y]=T.fromJson(m,s),T.fieldWrapper&&!d.oneof&&(h[y]=T.fieldWrapper.unwrapField(h[y])));break;case"enum":const M=Wt(d.T,m,s.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,a){const s=t.getType(),r={};let o;try{for(const c of s.fields.byMember()){let m;if(c.kind=="oneof"){const d=t[c.localName];if(d.value===void 0)continue;if(o=c.findField(d.case),!o)throw"oneof case not found: "+d.case;m=e(o,d.value,a)}else o=c,m=e(o,t[o.localName],a);m!==void 0&&(r[a.useProtoFieldName?o.name:o.jsonName]=m)}}catch(c){const m=o?`cannot encode field ${s.typeName}.${o.name} to JSON`:`cannot encode message ${s.typeName} to JSON`,d=c instanceof Error?c.message:String(c);throw new Error(m+(d.length>0?`: ${d}`:""))}return r},readScalar:Bn,writeScalar:ws,debug:Si}}function Si(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 a=Number(e);if(Number.isNaN(a)||!Number.isFinite(a))break;return n==v.FLOAT&&li(a),a;case v.INT32:case v.FIXED32:case v.SFIXED32:case v.SINT32:case v.UINT32:if(e===null)return 0;let s;if(typeof e=="number"?s=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(s=Number(e)),s===void 0)break;return n==v.UINT32?Sa(s):ot(s),s;case v.INT64:case v.SFIXED64:case v.SINT64:if(e===null)return Te.zero;if(typeof e!="number"&&typeof e!="string")break;const r=Te.parse(e);return t?r.toString():r;case v.FIXED64:case v.UINT64:if(e===null)return Te.zero;if(typeof e!="number"&&typeof e!="string")break;const o=Te.uParse(e);return t?o.toString():o;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 $a.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 a=n.findName(e);if(a||t)return a==null?void 0:a.no;break}throw new Error(`cannot decode enum ${n.typeName} from JSON: ${Si(e)}`)}function Tl(n,e,t,a){var s;if(e===void 0)return e;if(e===0&&!t)return;if(a)return e;if(n.typeName=="google.protobuf.NullValue")return null;const r=n.findNumber(e);return(s=r==null?void 0:r.name)!==null&&s!==void 0?s:e}function ws(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 Ee(typeof e=="number"),e!=0||t?e:void 0;case v.FLOAT:case v.DOUBLE:return Ee(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 Ee(typeof e=="string"),e.length>0||t?e:void 0;case v.BOOL:return Ee(typeof e=="boolean"),e||t?e:void 0;case v.UINT64:case v.FIXED64:case v.INT64:case v.SFIXED64:case v.SINT64:return Ee(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),t||e!=0?e.toString(10):void 0;case v.BYTES:return Ee(e instanceof Uint8Array),t||e.byteLength>0?$a.enc(e):void 0}}function hl(){return fl((n,e)=>function(a,s,r){if(a.kind=="map"){const o={};switch(a.V.kind){case"scalar":for(const[m,d]of Object.entries(s)){const y=e(a.V.T,d,!0);Ee(y!==void 0),o[m.toString()]=y}break;case"message":for(const[m,d]of Object.entries(s))o[m.toString()]=d.toJson(r);break;case"enum":const c=a.V.T;for(const[m,d]of Object.entries(s)){Ee(d===void 0||typeof d=="number");const y=n(c,d,!0,r.enumAsInteger);Ee(y!==void 0),o[m.toString()]=y}break}return r.emitDefaultValues||Object.keys(o).length>0?o:void 0}else if(a.repeated){const o=[];switch(a.kind){case"scalar":for(let c=0;c<s.length;c++)o.push(e(a.T,s[c],!0));break;case"enum":for(let c=0;c<s.length;c++)o.push(n(a.T,s[c],!0,r.enumAsInteger));break;case"message":for(let c=0;c<s.length;c++)o.push(ba(a.T,s[c]).toJson(r));break}return r.emitDefaultValues||o.length>0?o:void 0}else switch(a.kind){case"scalar":return e(a.T,s,!!a.oneof||a.opt||r.emitDefaultValues);case"enum":return n(a.T,s,!!a.oneof||a.opt||r.emitDefaultValues,r.enumAsInteger);case"message":return s!==void 0?ba(a.T,s).toJson(r):void 0}})}function kl(){return{setEnumType:mi,initPartial(n,e){if(n===void 0)return;const t=e.getType();for(const a of t.fields.byMember()){const s=a.localName,r=e,o=n;if(o[s]!==void 0)switch(a.kind){case"oneof":const c=o[s].case;if(c===void 0)continue;const m=a.findField(c);let d=o[s].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[s]={case:c,value:d};break;case"scalar":case"enum":let y=o[s];a.T===v.BYTES&&(y=a.repeated?y.map(Qn):Qn(y)),r[s]=y;break;case"map":switch(a.V.kind){case"scalar":case"enum":if(a.V.T===v.BYTES)for(const[M,E]of Object.entries(o[s]))r[s][M]=Qn(E);else Object.assign(r[s],o[s]);break;case"message":const T=a.V.T;for(const M of Object.keys(o[s])){let E=o[s][M];T.fieldWrapper||(E=new T(E)),r[s][M]=E}break}break;case"message":const h=a.T;if(a.repeated)r[s]=o[s].map(T=>T instanceof h?T:new h(T));else if(o[s]!==void 0){const T=o[s];h.fieldWrapper?h.typeName==="google.protobuf.BytesValue"?r[s]=Qn(T):r[s]=T:r[s]=T instanceof h?T:new h(T)}break}}},equals(n,e,t){return e===t?!0:!e||!t?!1:n.fields.byMember().every(a=>{const s=e[a.localName],r=t[a.localName];if(a.repeated){if(s.length!==r.length)return!1;switch(a.kind){case"message":return s.every((o,c)=>a.T.equals(o,r[c]));case"scalar":return s.every((o,c)=>Je(a.T,o,r[c]));case"enum":return s.every((o,c)=>Je(v.INT32,o,r[c]))}throw new Error(`repeated cannot contain ${a.kind}`)}switch(a.kind){case"message":return a.T.equals(s,r);case"enum":return Je(v.INT32,s,r);case"scalar":return Je(a.T,s,r);case"oneof":if(s.case!==r.case)return!1;const o=a.findField(s.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(s.value,r.value);case"enum":return Je(v.INT32,s.value,r.value);case"scalar":return Je(o.T,s.value,r.value)}throw new Error(`oneof cannot contain ${o.kind}`);case"map":const c=Object.keys(s).concat(Object.keys(r));switch(a.V.kind){case"message":const m=a.V.T;return c.every(y=>m.equals(s[y],r[y]));case"enum":return c.every(y=>Je(v.INT32,s[y],r[y]));case"scalar":const d=a.V.T;return c.every(y=>Je(d,s[y],r[y]))}break}})},clone(n){const e=n.getType(),t=new e,a=t;for(const s of e.fields.byMember()){const r=n[s.localName];let o;if(s.repeated)o=r.map(at);else if(s.kind=="map"){o=a[s.localName];for(const[c,m]of Object.entries(r))o[c]=at(m)}else s.kind=="oneof"?o=s.findField(r.case)?{case:r.case,value:at(r.value)}:{case:void 0}:o=at(r);a[s.localName]=o}return t}}}function at(n){if(n===void 0)return n;if(n instanceof Ge)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 Ml{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){const t={};for(const a of this.list())t[a.jsonName]=t[a.name]=a;this.jsonNames=t}return this.jsonNames[e]}find(e){if(!this.numbers){const t={};for(const a of this.list())t[a.no]=a;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 a of this.list())a.oneof?a.oneof!==t&&(t=a.oneof,e.push(t)):e.push(a)}return this.members}}function Ai(n,e){const t=Ei(n);return e?t:bl(El(t))}function Nl(n){return Ai(n,!1)}const Il=Ei;function Ei(n){let e=!1;const t=[];for(let a=0;a<n.length;a++){let s=n.charAt(a);switch(s){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(s),e=!1;break;default:e&&(e=!1,s=s.toUpperCase()),t.push(s);break}}return t.join("")}const Sl=new Set(["constructor","toString","toJSON","valueOf"]),Al=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),bi=n=>`${n}$`,El=n=>Al.has(n)?bi(n):n,bl=n=>Sl.has(n)?bi(n):n;class Dl{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=Nl(e)}addField(e){Ee(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 l=Qc("proto3",hl(),pl(),Object.assign(Object.assign({},kl()),{newFieldList(n){return new Ml(n,_l)},initFields(n){for(const e of n.getType().fields.byMember()){if(e.opt)continue;const t=e.localName,a=n;if(e.repeated){a[t]=[];continue}switch(e.kind){case"oneof":a[t]={case:void 0};break;case"enum":a[t]=0;break;case"map":a[t]={};break;case"scalar":a[t]=Da(e.T,e.L);break}}}}));function _l(n){var e,t,a,s;const r=[];let o;for(const c of typeof n=="function"?n():n){const m=c;if(m.localName=Ai(c.name,c.oneof!==void 0),m.jsonName=(e=c.jsonName)!==null&&e!==void 0?e:Il(c.name),m.repeated=(t=c.repeated)!==null&&t!==void 0?t:!1,c.kind=="scalar"&&(m.L=(a=c.L)!==null&&a!==void 0?a:pn.BIGINT),m.packed=(s=c.packed)!==null&&s!==void 0?s:c.kind=="enum"||c.kind=="scalar"&&c.T!=v.BYTES&&c.T!=v.STRING,c.oneof!==void 0){const d=typeof c.oneof=="string"?c.oneof:c.oneof.name;(!o||o.name!=d)&&(o=new Dl(d)),m.oneof=o,o.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 js;(function(n){n[n.NoSideEffects=1]="NoSideEffects",n[n.Idempotent=2]="Idempotent"})(js||(js={}));class Se extends Ge{constructor(e){super(),this.seconds=Te.zero,this.nanos=0,l.util.initPartial(e,this)}fromJson(e,t){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${l.json.debug(e)}`);const a=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(!a)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const s=Date.parse(a[1]+"-"+a[2]+"-"+a[3]+"T"+a[4]+":"+a[5]+":"+a[6]+(a[8]?a[8]:"Z"));if(Number.isNaN(s))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(s<Date.parse("0001-01-01T00:00:00Z")||s>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=Te.parse(s/1e3),this.nanos=0,a[7]&&(this.nanos=parseInt("1"+a[7]+"0".repeat(9-a[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 a="Z";if(this.nanos>0){const s=(this.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?a="."+s.substring(0,3)+"Z":s.substring(6)==="000"?a="."+s.substring(0,6)+"Z":a="."+s+"Z"}return new Date(t).toISOString().replace(".000Z",a)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return Se.fromDate(new Date)}static fromDate(e){const t=e.getTime();return new Se({seconds:Te.parse(Math.floor(t/1e3)),nanos:t%1e3*1e6})}static fromBinary(e,t){return new Se().fromBinary(e,t)}static fromJson(e,t){return new Se().fromJson(e,t)}static fromJsonString(e,t){return new Se().fromJsonString(e,t)}static equals(e,t){return l.util.equals(Se,e,t)}}Se.runtime=l;Se.typeName="google.protobuf.Timestamp";Se.fields=l.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class Fe extends Ge{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),l.util.initPartial(e,this)}toJson(e){var t;if(this.typeUrl==="")return{};const a=this.typeUrlToName(this.typeUrl),s=(t=e==null?void 0:e.typeRegistry)===null||t===void 0?void 0:t.findMessage(a);if(!s)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let o=s.fromBinary(this.value).toJson(e);return(a.startsWith("google.protobuf.")||o===null||Array.isArray(o)||typeof o!="object")&&(o={value:o}),o["@type"]=this.typeUrl,o}fromJson(e,t){var a;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 s=e["@type"];if(typeof s!="string"||s=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const r=this.typeUrlToName(s),o=(a=t==null?void 0:t.typeRegistry)===null||a===void 0?void 0:a.findMessage(r);if(!o)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${s} is not in the type registry`);let c;if(r.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))c=o.fromJson(e.value,t);else{const m=Object.assign({},e);delete m["@type"],c=o.fromJson(m,t)}return this.packFrom(c),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 a="";return typeof e=="string"?a=e:a=e.typeName,t===a}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw new Error(`invalid type url: ${e}`);const t=e.lastIndexOf("/"),a=t>0?e.substring(t+1):e;if(!a.length)throw new Error(`invalid type url: ${e}`);return a}static pack(e){const t=new Fe;return t.packFrom(e),t}static fromBinary(e,t){return new Fe().fromBinary(e,t)}static fromJson(e,t){return new Fe().fromJson(e,t)}static fromJsonString(e,t){return new Fe().fromJsonString(e,t)}static equals(e,t){return l.util.equals(Fe,e,t)}}Fe.runtime=l;Fe.typeName="google.protobuf.Any";Fe.fields=l.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 Os(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,a,s,r){super(vl(e,t)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=t,this.metadata=new Headers(a??{}),this.details=s??[],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:s=>s===e.typeName?e:void 0}:e,a=[];for(const s of this.details){if(s instanceof Ge){t.findMessage(s.getType().typeName)&&a.push(s);continue}const r=t.findMessage(s.type);if(r)try{a.push(r.fromBinary(s.value))}catch{}}return a}}function vl(n,e){return n.length?`[${Os(e)}] ${n}`:`[${Os(e)}]`}function wl(n,e,t){try{const a=$a.dec(n);return e?e.fromBinary(a,t):a}catch(a){throw ye.from(a,ee.DataLoss)}}function Di(n,e){const t={};for(const[a,s]of Object.entries(n.methods)){const r=e(Object.assign(Object.assign({},s),{localName:a,service:n}));r!=null&&(t[a]=r)}return t}function Ls(n){let e,t=new Uint8Array(0);function a(s){const r=new Uint8Array(t.length+s.length);r.set(t),r.set(s,t.length),t=r}return new ReadableStream({start(){e=n.getReader()},async pull(s){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 c=await e.read();if(c.done)break;a(c.value)}if(r===void 0){if(t.byteLength==0){s.close();return}s.error(new ye("premature end of stream",ee.DataLoss));return}const o=t.subarray(5,5+r.length);t=t.subarray(5+r.length),s.enqueue({flags:r.flags,data:o})}})}function Rs(n,e){const t=new Uint8Array(e.length+5);t.set(e,5);const a=new DataView(t.buffer,t.byteOffset,t.byteLength);return a.setUint8(0,n),a.setUint32(1,e.length),t}var jl=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={},a("next"),a("throw"),a("return"),t[Symbol.asyncIterator]=function(){return this},t);function a(r){t[r]=n[r]&&function(o){return new Promise(function(c,m){o=n[r](o),s(c,m,o.done,o.value)})}}function s(r,o,c,m){Promise.resolve(m).then(function(d){r({value:d,done:c})},o)}},Hn=globalThis&&globalThis.__await||function(n){return this instanceof Hn?(this.v=n,this):new Hn(n)},Ol=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=t.apply(n,e||[]),s,r=[];return s={},o("next"),o("throw"),o("return"),s[Symbol.asyncIterator]=function(){return this},s;function o(T){a[T]&&(s[T]=function(M){return new Promise(function(E,D){r.push([T,M,E,D])>1||c(T,M)})})}function c(T,M){try{m(a[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){c("next",T)}function y(T){c("throw",T)}function h(T,M){T(M),r.shift(),r.length&&c(r[0][0],r[0][1])}},Ll=globalThis&&globalThis.__asyncDelegator||function(n){var e,t;return e={},a("next"),a("throw",function(s){throw s}),a("return"),e[Symbol.iterator]=function(){return this},e;function a(s,r){e[s]=n[s]?function(o){return(t=!t)?{value:Hn(n[s](o)),done:!1}:r?r(o):o}:r}};function _i(n){return Ol(this,arguments,function*(){yield Hn(yield*Ll(jl(n)))})}var Rl=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={},a("next"),a("throw"),a("return"),t[Symbol.asyncIterator]=function(){return this},t);function a(r){t[r]=n[r]&&function(o){return new Promise(function(c,m){o=n[r](o),s(c,m,o.done,o.value)})}}function s(r,o,c,m){Promise.resolve(m).then(function(d){r({value:d,done:c})},o)}};function xl(n,e){return Di(n,t=>{switch(t.kind){case P.Unary:return Cl(e,n,t);case P.ServerStreaming:return zl(e,n,t);default:return null}})}function Cl(n,e,t){return function(a,s,r){const o=new AbortController;return r=vi(o,r),n.unary(e,t,o.signal,r.timeoutMs,r.headers,a,r.contextValues).then(c=>{var m,d;(m=r==null?void 0:r.onHeader)===null||m===void 0||m.call(r,c.header),(d=r==null?void 0:r.onTrailer)===null||d===void 0||d.call(r,c.trailer),s(void 0,c.message)},c=>{const m=ye.from(c,ee.Internal);m.code===ee.Canceled&&o.signal.aborted||s(m,new t.O)}),()=>o.abort()}}function zl(n,e,t){return function(a,s,r,o){const c=new AbortController;async function m(){var d,y,h,T,M,E;o=vi(c,o);const D=await n.stream(e,t,o.signal,o.timeoutMs,o.headers,_i([a]),o.contextValues);(M=o.onHeader)===null||M===void 0||M.call(o,D.header);try{for(var L=!0,j=Rl(D.message),R;R=await j.next(),d=R.done,!d;L=!0)T=R.value,L=!1,s(T)}catch(x){y={error:x}}finally{try{!L&&!d&&(h=j.return)&&await h.call(j)}finally{if(y)throw y.error}}(E=o.onTrailer)===null||E===void 0||E.call(o,D.trailer),r(void 0)}return m().catch(d=>{const y=ye.from(d,ee.Internal);y.code===ee.Canceled&&c.signal.aborted?r(void 0):r(y)}),()=>c.abort()}}function vi(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 wi=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={},a("next"),a("throw"),a("return"),t[Symbol.asyncIterator]=function(){return this},t);function a(r){t[r]=n[r]&&function(o){return new Promise(function(c,m){o=n[r](o),s(c,m,o.done,o.value)})}}function s(r,o,c,m){Promise.resolve(m).then(function(d){r({value:d,done:c})},o)}},On=globalThis&&globalThis.__await||function(n){return this instanceof On?(this.v=n,this):new On(n)},Ul=globalThis&&globalThis.__asyncDelegator||function(n){var e,t;return e={},a("next"),a("throw",function(s){throw s}),a("return"),e[Symbol.iterator]=function(){return this},e;function a(s,r){e[s]=n[s]?function(o){return(t=!t)?{value:On(n[s](o)),done:!1}:r?r(o):o}:r}},Pl=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=t.apply(n,e||[]),s,r=[];return s={},o("next"),o("throw"),o("return"),s[Symbol.asyncIterator]=function(){return this},s;function o(T){a[T]&&(s[T]=function(M){return new Promise(function(E,D){r.push([T,M,E,D])>1||c(T,M)})})}function c(T,M){try{m(a[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){c("next",T)}function y(T){c("throw",T)}function h(T,M){T(M),r.shift(),r.length&&c(r[0][0],r[0][1])}};function _t(n,e){return Di(n,t=>{switch(t.kind){case P.Unary:return Bl(e,n,t);case P.ServerStreaming:return Ql(e,n,t);case P.ClientStreaming:return Fl(e,n,t);case P.BiDiStreaming:return Gl(e,n,t);default:return null}})}function Bl(n,e,t){return async function(a,s){var r,o;const c=await n.unary(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,a,s==null?void 0:s.contextValues);return(r=s==null?void 0:s.onHeader)===null||r===void 0||r.call(s,c.header),(o=s==null?void 0:s.onTrailer)===null||o===void 0||o.call(s,c.trailer),c.message}}function Ql(n,e,t){return function(a,s){return ji(n.stream(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,_i([a]),s==null?void 0:s.contextValues),s)}}function Fl(n,e,t){return async function(a,s){var r,o,c,m,d,y;const h=await n.stream(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,a,s==null?void 0:s.contextValues);(d=s==null?void 0:s.onHeader)===null||d===void 0||d.call(s,h.header);let T;try{for(var M=!0,E=wi(h.message),D;D=await E.next(),r=D.done,!r;M=!0)m=D.value,M=!1,T=m}catch(L){o={error:L}}finally{try{!M&&!r&&(c=E.return)&&await c.call(E)}finally{if(o)throw o.error}}if(!T)throw new ye("protocol error: missing response message",ee.Internal);return(y=s==null?void 0:s.onTrailer)===null||y===void 0||y.call(s,h.trailer),T}}function Gl(n,e,t){return function(a,s){return ji(n.stream(e,t,s==null?void 0:s.signal,s==null?void 0:s.timeoutMs,s==null?void 0:s.headers,a,s==null?void 0:s.contextValues),s)}}function ji(n,e){const t=function(){var a,s;return Pl(this,arguments,function*(){const r=yield On(n);(a=e==null?void 0:e.onHeader)===null||a===void 0||a.call(e,r.header),yield On(yield*Ul(wi(r.message))),(s=e==null?void 0:e.onTrailer)===null||s===void 0||s.call(e,r.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>t.next()})}}function Yl(...n){const e=new AbortController,t=n.filter(s=>s!==void 0).concat(e.signal);for(const s of t){if(s.aborted){a.apply(s);break}s.addEventListener("abort",a)}function a(){e.signal.aborted||e.abort(Oi(this));for(const s of t)s.removeEventListener("abort",a)}return e}function Vl(n){const e=new AbortController,t=()=>{e.abort(new ye("the operation timed out",ee.DeadlineExceeded))};let a;return n!==void 0&&(n<=0?t():a=setTimeout(t,n)),{signal:e.signal,cleanup:()=>clearTimeout(a)}}function Oi(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 xs(){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 Cs(n){const e=new Headers,t=new TextDecoder().decode(n).split(`\r
16
- `);for(const a of t){if(a==="")continue;const s=a.indexOf(":");if(s>0){const r=a.substring(0,s).trim(),o=a.substring(s+1).trim();e.append(r,o)}}return e}const $l="Content-Type",ql="Grpc-Timeout",Li="Grpc-Status",Ri="Grpc-Message",Wl="Grpc-Status-Details-Bin",Hl="User-Agent",Zl="X-User-Agent",Kl="X-Grpc-Web",Jl="application/grpc-web+proto",Xl="application/grpc-web+json";class We extends Ge{constructor(e){super(),this.code=0,this.message="",this.details=[],l.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 l.util.equals(We,e,t)}}We.runtime=l;We.typeName="google.rpc.Status";We.fields=l.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:Fe,repeated:!0}]);const eu="0";function xi(n){var e;const t=n.get(Wl);if(t!=null){const s=wl(t,We);if(s.code==0)return;const r=new ye(s.message,s.code,n);return r.details=s.details.map(o=>({type:o.typeUrl.substring(o.typeUrl.lastIndexOf("/")+1),value:o.value})),r}const a=n.get(Li);if(a!=null){if(a===eu)return;const s=parseInt(a,10);return s in ee?new ye(decodeURIComponent((e=n.get(Ri))!==null&&e!==void 0?e:""),s,n):new ye(`invalid grpc-status: ${a}`,ee.Internal,n)}}function zs(n,e,t){const a=typeof e=="string"?e:e.typeName,s=typeof t=="string"?t:t.name;return n.toString().replace(/\/?$/,`/${a}/${s}`)}function Ci(n,e){return e instanceof Ge?e:new n(e)}function nu(n,e){function t(a){return a.done===!0?a:{done:a.done,value:Ci(n,a.value)}}return{[Symbol.asyncIterator](){const a=e[Symbol.asyncIterator](),s={next:()=>a.next().then(t)};return a.throw!==void 0&&(s.throw=r=>a.throw(r).then(t)),a.return!==void 0&&(s.return=r=>a.return(r).then(t)),s}}}function tu(n){var e;const t=Object.assign({},n);return(e=t.ignoreUnknownFields)!==null&&e!==void 0||(t.ignoreUnknownFields=!0),t}function Us(n,e,t,a){const s=e?Ps(n.I,a):Bs(n.I,t);return{parse:(e?Ps(n.O,a):Bs(n.O,t)).parse,serialize:s.serialize}}function Ps(n,e){return{parse(t){try{return n.fromBinary(t,e)}catch(a){const s=a instanceof Error?a.message:String(a);throw new ye(`parse binary: ${s}`,ee.InvalidArgument)}},serialize(t){try{return t.toBinary(e)}catch(a){const s=a instanceof Error?a.message:String(a);throw new ye(`serialize binary: ${s}`,ee.Internal)}}}}function Bs(n,e){var t,a;const s=(t=e==null?void 0:e.textEncoder)!==null&&t!==void 0?t:new TextEncoder,r=(a=e==null?void 0:e.textDecoder)!==null&&a!==void 0?a:new TextDecoder,o=tu(e);return{parse(c){try{const m=r.decode(c);return n.fromJsonString(m,o)}catch(m){throw ye.from(m,ee.InvalidArgument)}},serialize(c){try{const m=c.toJsonString(o);return s.encode(m)}catch(m){throw ye.from(m,ee.Internal)}}}}function au(n){const e=Ui(n.next,n.interceptors),[t,a,s]=zi(n),r=Object.assign(Object.assign({},n.req),{message:Ci(n.req.method.I,n.req.message),signal:t});return e(r).then(o=>(s(),o),a)}function su(n){const e=Ui(n.next,n.interceptors),[t,a,s]=zi(n),r=Object.assign(Object.assign({},n.req),{message:nu(n.req.method.I,n.req.message),signal:t});let o=!1;return t.addEventListener("abort",function(){var c,m;const d=n.req.message[Symbol.asyncIterator]();o||(c=d.throw)===null||c===void 0||c.call(d,this.reason).catch(()=>{}),(m=d.return)===null||m===void 0||m.call(d).catch(()=>{})}),e(r).then(c=>Object.assign(Object.assign({},c),{message:{[Symbol.asyncIterator](){const m=c.message[Symbol.asyncIterator]();return{next(){return m.next().then(d=>(d.done==!0&&(o=!0,s()),d),a)}}}}}),a)}function zi(n){const{signal:e,cleanup:t}=Vl(n.timeoutMs),a=Yl(n.signal,e);return[a.signal,function(r){const o=ye.from(e.aborted?Oi(e):r);return a.abort(o),t(),Promise.reject(o)},function(){t(),a.abort()}]}function Ui(n,e){var t;return(t=e==null?void 0:e.concat().reverse().reduce((a,s)=>s(a),n))!==null&&t!==void 0?t:n}function ru(){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 Qs(n){const e=xi(n);if(e)throw e}function Fs(n,e,t){const a=new Headers(t??{});return a.set($l,n?Jl:Xl),a.set(Kl,"1"),a.set(Zl,"connect-es/1.1.2"),a.set(Hl,"connect-es/1.1.2"),e!==void 0&&a.set(ql,`${e}m`),a}function iu(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 Gs(n,e){var t;if(n>=200&&n<300){const a=xi(e);if(a)throw a;return{foundStatus:e.has(Li)}}throw new ye(decodeURIComponent((t=e.get(Ri))!==null&&t!==void 0?t:`HTTP ${n}`),iu(n),e)}var ln=globalThis&&globalThis.__await||function(n){return this instanceof ln?(this.v=n,this):new ln(n)},ou=globalThis&&globalThis.__asyncGenerator||function(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=t.apply(n,e||[]),s,r=[];return s={},o("next"),o("throw"),o("return"),s[Symbol.asyncIterator]=function(){return this},s;function o(T){a[T]&&(s[T]=function(M){return new Promise(function(E,D){r.push([T,M,E,D])>1||c(T,M)})})}function c(T,M){try{m(a[T](M))}catch(E){h(r[0][3],E)}}function m(T){T.value instanceof ln?Promise.resolve(T.value.v).then(d,y):h(r[0][2],T)}function d(T){c("next",T)}function y(T){c("throw",T)}function h(T,M){T(M),r.shift(),r.length&&c(r[0][0],r[0][1])}};function vt(n){var e;ru();const t=(e=n.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(a,s,r,o,c,m,d){var y;const{serialize:h,parse:T}=Us(s,t,n.jsonOptions,n.binaryOptions);return o=o===void 0?n.defaultTimeoutMs:o<=0?void 0:o,await au({interceptors:n.interceptors,signal:r,timeoutMs:o,req:{stream:!1,service:a,method:s,url:zs(n.baseUrl,a,s),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Fs(t,o,c),contextValues:d??xs(),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:Rs(0,h(M.message))}));if(Gs(L.status,L.headers),!L.body)throw"missing response body";const j=Ls(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=Cs(B);continue}if(x!==void 0)throw"extra message";x=T(B)}if(R===void 0)throw"missing trailer";if(Qs(R),x===void 0)throw"missing message";return{stream:!1,header:L.headers,message:x,trailer:R}}})},async stream(a,s,r,o,c,m,d){var y;const{serialize:h,parse:T}=Us(s,t,n.jsonOptions,n.binaryOptions);function M(D,L,j){return ou(this,arguments,function*(){const x=Ls(D).getReader();if(L){if(!(yield ln(x.read())).done)throw"extra data for trailers-only";return yield ln(void 0)}let z=!1;for(;;){const U=yield ln(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=Cs(C);Qs(H),H.forEach((ne,se)=>j.set(se,ne));continue}if(z)throw"extra message";yield yield ln(T(C))}if(!z)throw"missing trailer"})}async function E(D){if(s.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 Rs(0,h(L.value))}return o=o===void 0?n.defaultTimeoutMs:o<=0?void 0:o,su({interceptors:n.interceptors,signal:r,timeoutMs:o,req:{stream:!0,service:a,method:s,url:zs(n.baseUrl,a,s),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Fs(t,o,c),contextValues:d??xs(),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}=Gs(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 cu=l.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"}]),lu=l.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),uu=l.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:lu},{no:7,name:"public_name",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.users.UserOrganization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"permissions",kind:"scalar",T:9,repeated:!0}]);const mu=l.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:l.getEnumType(cu)},{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}]),du=l.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:mu}]),qa=l.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:uu}]);l.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:du}]);const pu=l.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),yu=l.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:gu},{no:2,name:"data",kind:"message",T:qa}]),gu=l.makeMessageType("streamlayer.users.AuthResponse.AuthResponseMetadata",()=>[{no:1,name:"jwt",kind:"scalar",T:9},{no:3,name:"getstream",kind:"scalar",T:9}],{localName:"AuthResponse_AuthResponseMetadata"}),fu=l.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Tu=l.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}]),hu=l.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:Tu}]),ku=l.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Mu=l.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),Nu=l.makeMessageType("streamlayer.users.MeRequest",[]),Iu=l.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:qa}]),Su=l.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"}]),Au=l.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"}]),Eu=l.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),bu=l.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"}]),Du=l.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),_u=l.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"}]),vu=l.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),wu=l.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),ju=l.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:Ou}]),Ou=l.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),Lu=l.makeMessageType("streamlayer.users.InviteResponse",[]),Ru=l.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}]),xu=l.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:Cu},{no:2,name:"data",kind:"message",T:qa,opt:!0}]),Cu=l.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:pu,O:yu,kind:P.Unary},register:{name:"Register",I:fu,O:hu,kind:P.Unary},requestPassword:{name:"RequestPassword",I:ku,O:Mu,kind:P.Unary},me:{name:"Me",I:Nu,O:Iu,kind:P.Unary},invite:{name:"Invite",I:ju,O:Lu,kind:P.Unary},bypassAuth:{name:"BypassAuth",I:Ru,O:xu,kind:P.Unary},updateMetadata:{name:"UpdateMetadata",I:Su,O:wu,kind:P.Unary},updateAvatar:{name:"UpdateAvatar",I:Au,O:Eu,kind:P.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:bu,O:Du,kind:P.Unary},updatePublicName:{name:"UpdatePublicName",I:_u,O:vu,kind:P.Unary}}},zu=async(n,e)=>{const t=vt({baseUrl:n});return await _t(Jn,t).requestPassword({id:e}),!0},Uu=async(n,e)=>{const t=vt({baseUrl:n});return await _t(Jn,t).register({id:e}),!0},Pu=async(n,e,t)=>{var o;const a=vt({baseUrl:n}),r=await _t(Jn,a).login({id:e,password:t});return(o=r==null?void 0:r.meta)==null?void 0:o.jwt};const Bu=I("div")({name:"Panel",class:"pkueuwk",propsAsIs:!1}),Ys=I("form")({name:"Form",class:"fp66u19",propsAsIs:!1}),Vs=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}),Qu=I("div")({name:"FormInputContainer",class:"f1xkchzs",propsAsIs:!1}),Fu=I("div")({name:"Digits",class:"d132q1j",propsAsIs:!1}),Gu=({login:n,anonymousLogin:e,host:t})=>{const[a,s]=Q.useState(""),[r,o]=Q.useState(""),[c,m]=Q.useState(""),d=async h=>{h.preventDefault();try{const T=a.replaceAll("+","");try{await zu(t,T)}catch{await Uu(t,T)}o(T)}catch(T){window.alert(T)}},y=async h=>{if(h.preventDefault(),r&&c)try{const T=await Pu(t,r,c);T&&n?await n(T):console.log("token",T)}catch(T){window.alert(T)}};return f.jsxs(Bu,{children:[!r&&f.jsxs("div",{children:[f.jsxs(Ys,{onSubmit:d,children:[f.jsx(Vs,{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:a,onChange:h=>s(`${h}`)})}),f.jsx(Kt,{disabled:!Gt.isValidPhoneNumber(a),type:"submit",children:"request code"})]}),e&&f.jsx(Kt,{style:{display:"block",margin:"auto"},onClick:e,children:"anonymous login"})]}),r&&f.jsxs(Ys,{onSubmit:y,children:[f.jsx(Vs,{children:"Enter Verification Code"}),f.jsxs(Zt,{children:["Please enter the verification code ",f.jsx("br",{}),"sent to ",f.jsx("b",{children:Gt.formatPhoneNumberIntl(a)})]}),f.jsx(Fu,{children:f.jsx(Ho,{autoFocus:!0,allowedCharacters:"numeric",length:4,onChange:m})}),f.jsx(Kt,{disabled:c.length!==4,type:"submit",children:"login"}),f.jsxs(Zt,{children:["Didn't get 59 the code? ",f.jsx("br",{}),"Resend Code in",f.jsx(ci,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const Yu=I("div")({name:"Container",class:"c18fa2p6",propsAsIs:!1}),Vu=I("div")({name:"Content",class:"cthywkn",propsAsIs:!1}),$u=I("div")({name:"OnboardingHeader",class:"obeaxxh",propsAsIs:!1}),qu=I("div")({name:"LeftBlock",class:"l1jam9nb",propsAsIs:!1}),Wu=I("div")({name:"RightBlock",class:"r17ziiq1",propsAsIs:!1}),Hu=I("img")({name:"GameIcon",class:"gxb34q2",propsAsIs:!1}),Zu=I("img")({name:"SponsorLogo",class:"s10k8h8y",propsAsIs:!1}),Ku=I("button")({name:"CloseBtn",class:"ca5j1zk",propsAsIs:!1}),Ju=I("img")({name:"IconClose",class:"i6wd7es",propsAsIs:!1}),Xu=I("button")({name:"OnboardingActionBtn",class:"onaxor0",propsAsIs:!1});const em=I("div")({name:"Container",class:"c1tc3ie1",propsAsIs:!1}),nm=I("div")({name:"Content",class:"cenyr9j",propsAsIs:!1}),tm=I("img")({name:"Graphic",class:"g17082th",propsAsIs:!1}),am=I("div")({name:"Headline",class:"hr58r57",propsAsIs:!1}),sm=({graphic:n,headline:e})=>f.jsx(em,{children:f.jsxs(nm,{children:[f.jsx(tm,{alt:"graphic-img-instrucrions",src:n}),f.jsx(am,{children:e})]})});const rm=I("div")({name:"Container",class:"c1k109z3",propsAsIs:!1}),im=I("div")({name:"Title",class:"tl3o9j9",propsAsIs:!1}),om=I("div")({name:"RulesList",class:"rp7yn67",propsAsIs:!1}),cm=I("div")({name:"RulesItem",class:"r18km3gu",propsAsIs:!1}),lm=I("div")({name:"RuleNumber",class:"rtu7hsj",propsAsIs:!1}),um=I("div")({name:"RuleText",class:"rfkkuag",propsAsIs:!1}),mm=({rules:n,rulesTitle:e,primaryColor:t})=>f.jsxs(rm,{children:[f.jsx(im,{children:e}),f.jsx(om,{children:n==null?void 0:n.map((a,s)=>f.jsxs(cm,{children:[f.jsx(lm,{style:{backgroundColor:t},children:s+1}),f.jsx(um,{children:a})]},s))})]}),dm="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyaWVuZHMiPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNNC4xOTIzMSA3LjAzMTI1QzIuNjYzNDYgNy4wMzEyNSAxLjQyMzA4IDguMTk5NzMgMS40MjMwOCA5LjYzOTk0QzEuNDIzMDggMTEuMDgwMiAyLjY2MzQ2IDEyLjI0ODYgNC4xOTIzMSAxMi4yNDg2QzUuNzIxMTUgMTIuMjQ4NiA2Ljk2MTU0IDExLjA4MDIgNi45NjE1NCA5LjYzOTk0QzYuOTYxNTQgOC4xOTk3MyA1LjcyMTE1IDcuMDMxMjUgNC4xOTIzMSA3LjAzMTI1Wk00LjE5MjMxIDEyLjI0ODZDMi4xNjIyNiAxMi4yNDg2IDAuNSAxMy44MTQ1IDAuNSAxNS43MjY5VjE3LjYyOUMwLjUgMTcuNjI5IDEuNDIzMDggMTguMzM1NiA0LjE5MjMxIDE4LjMzNTZDNi45NjE1NCAxOC4zMzU2IDcuODg0NjEgMTcuNjI5IDcuODg0NjEgMTcuNjI5VjE1LjcyNjlDNy44ODQ2MSAxMy44MTQ1IDYuMjIyMzYgMTIuMjQ4NiA0LjE5MjMxIDEyLjI0ODZaTTIwLjgwNzcgNy4wMzEyNUMxOS4yNzg4IDcuMDMxMjUgMTguMDM4NSA4LjE5OTczIDE4LjAzODUgOS42Mzk5NEMxOC4wMzg1IDExLjA4MDIgMTkuMjc4OCAxMi4yNDg2IDIwLjgwNzcgMTIuMjQ4NkMyMi4zMzY1IDEyLjI0ODYgMjMuNTc2OSAxMS4wODAyIDIzLjU3NjkgOS42Mzk5NEMyMy41NzY5IDguMTk5NzMgMjIuMzM2NSA3LjAzMTI1IDIwLjgwNzcgNy4wMzEyNVpNMjAuODA3NyAxMi4yNDg2QzE4Ljc3NzYgMTIuMjQ4NiAxNy4xMTU0IDEzLjgxNDUgMTcuMTE1NCAxNS43MjY5VjE3LjYyOUMxNy4xMTU0IDE3LjYyOSAxOC4wMzg1IDE4LjMzNTYgMjAuODA3NyAxOC4zMzU2QzIzLjU3NjkgMTguMzM1NiAyNC41IDE3LjYyOSAyNC41IDE3LjYyOVYxNS43MjY5QzI0LjUgMTMuODE0NSAyMi44Mzc3IDEyLjI0ODYgMjAuODA3NyAxMi4yNDg2Wk0xMi41IDEwLjUwOTVDMTAuOTcxMiAxMC41MDk1IDkuNzMwNzcgMTEuNjc4IDkuNzMwNzcgMTMuMTE4MkM5LjczMDc3IDE0LjU1ODQgMTAuOTcxMiAxNS43MjY5IDEyLjUgMTUuNzI2OUMxNC4wMjg4IDE1LjcyNjkgMTUuMjY5MiAxNC41NTg0IDE1LjI2OTIgMTMuMTE4MkMxNS4yNjkyIDExLjY3OCAxNC4wMjg4IDEwLjUwOTUgMTIuNSAxMC41MDk1Wk0xMi41IDE1LjcyNjlDMTAuNDcgMTUuNzI2OSA4LjgwNzY5IDE3LjI5MjggOC44MDc2OSAxOS4yMDUxVjIxLjEwNzNDOC44MDc2OSAyMS4xMDczIDkuNzMwNzcgMjEuODEzOCAxMi41IDIxLjgxMzhDMTUuMjY5MiAyMS44MTM4IDE2LjE5MjMgMjEuMTA3MyAxNi4xOTIzIDIxLjEwNzNWMTkuMjA1MUMxNi4xOTIzIDE3LjI5MjggMTQuNTMgMTUuNzI2OSAxMi41IDE1LjcyNjlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik04LjU4NDczIDEuNUM2Ljk2MzkyIDEuNSA1LjY0ODkzIDIuNzM4NzYgNS42NDg5MyA0LjI2NTZDNS42NDg5MyA1Ljc5MjQ1IDYuOTYzOTIgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFDMTAuMjA1NSA3LjAzMTIxIDExLjUyMDUgNS43OTI0NSAxMS41MjA1IDQuMjY1NkMxMS41MjA1IDIuNzM4NzYgMTAuMjA1NSAxLjUgOC41ODQ3MyAxLjVaTTguNTg0NzMgNy4wMzEyMUM4LjI5MDM4IDcuMDMxMjEgNy45OTIyMSA3LjAyNCA3LjY5Nzg3IDcuMTE3NjNDOC4yODY1NiA3Ljg1NTg0IDguNTg0NzMgOC43ODEzMSA4LjU4NDczIDkuNzk2ODFDOC41ODQ3MyAxMC4xNjQxIDguNDkyOTggMTAuNTI0MiA4LjQ5Mjk4IDEwLjg5MTVDOS4yNzY2MyA5Ljc4NjAxIDEwLjU0MTkgOS4wNTg1OSAxMi4wMDk4IDguODc0OTRDMTEuMzI1NiA3Ljc2OTQyIDEwLjA1MjYgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFaTTE2LjQxMzUgMS41QzE0Ljc5MjcgMS41IDEzLjQ3NzcgMi43Mzg3NiAxMy40Nzc3IDQuMjY1NkMxMy40Nzc3IDUuNzkyNDUgMTQuNzkyNyA3LjAzMTIxIDE2LjQxMzUgNy4wMzEyMUMxOC4wMzQzIDcuMDMxMjEgMTkuMzQ5MyA1Ljc5MjQ1IDE5LjM0OTMgNC4yNjU2QzE5LjM0OTMgMi43Mzg3NiAxOC4wMzQzIDEuNSAxNi40MTM1IDEuNVpNMTYuNDEzNSA3LjAzMTIxQzE0Ljk0NTYgNy4wMzEyMSAxMy42NzI3IDcuNzY5NDIgMTIuOTg4NCA4Ljg3NDk0QzE0LjQ1NjMgOS4wNTg1OSAxNS43MjE2IDkuNzg2MDEgMTYuNTA1MyAxMC44OTE1QzE2LjUwNTMgMTAuNTI0MiAxNi40MTM1IDEwLjE2NDEgMTYuNDEzNSA5Ljc5NjgxQzE2LjQxMzUgOC43ODEzMSAxNi43MTE3IDcuODU1ODQgMTcuMzAwNCA3LjExNzYzQzE3LjAwNiA3LjAyNCAxNi43MDc5IDcuMDMxMjEgMTYuNDEzNSA3LjAzMTIxWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC40Ii8+CjwvZz4KPC9zdmc+Cg==";const pm=I("div")({name:"Container",class:"ckff0a9",propsAsIs:!1}),ym=I("div")({name:"Content",class:"czw1kx1",propsAsIs:!1}),gm=I("div")({name:"InviteGameIconWrap",class:"i2e7ir3",propsAsIs:!1}),fm=I("img")({name:"InviteGameIcon",class:"i2tfvcu",propsAsIs:!1}),Tm=I("div")({name:"Heading",class:"hnq23ee",propsAsIs:!1}),hm=I("div")({name:"Subtext",class:"s2drh5v",propsAsIs:!1}),km=I("button")({name:"InvateBtn",class:"iiwwayv",propsAsIs:!1}),Mm=({inviteCardTitle:n,inviteCardSubtext:e,primaryColor:t})=>f.jsx(pm,{children:f.jsxs(ym,{children:[f.jsx(gm,{style:{backgroundColor:t},children:f.jsx(fm,{alt:"invite-game-icon",src:dm})}),f.jsx(Tm,{children:n||""}),f.jsx(hm,{children:e||""}),f.jsx(km,{onClick:()=>{},style:{backgroundColor:t},children:"Invite friends!"})]})}),kn={steps:!1,rules:!1,inviteCard:!1},Nm=({gamification:n,closeFeature:e,steps:t,gameIcon:a,sponsorLogo:s,rules:r,rulesBtnLabel:o,rulesTitle:c,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(kn);Q.useEffect(()=>{t!=null&&t.length?j({...kn,steps:!0}):r!=null&&r.length?j({...kn,rules:!0}):j({...kn,inviteCard:!0})},[]);const R=Q.useCallback(()=>{t!=null&&t.length&&E<t.length-1?D(x=>++x):r!=null&&r.length&&L.steps?j({...kn,rules:!0}):L.rules&&j({...kn,inviteCard:!0})},[E,t==null?void 0:t.length,r==null?void 0:r.length,L,D,j]);return f.jsxs(Yu,{children:[f.jsxs($u,{children:[f.jsx(qu,{children:a&&f.jsx(Hu,{alt:"sponsor-one-onboarding-icon",src:a})}),f.jsxs(Wu,{children:[s&&f.jsx(Zu,{alt:"sponsor-two-onboarding-icon",src:s}),f.jsx(Ku,{onClick:M,children:f.jsx(Ju,{alt:"icon-close-onboarding",src:Et})})]})]}),f.jsxs(Vu,{children:[L.steps&&(t==null?void 0:t.length)&&f.jsx(sm,{graphic:t[E].graphic,headline:t[E].headline}),L.rules&&f.jsx(mm,{rules:r,rulesTitle:c,primaryColor:m}),L.inviteCard&&f.jsx(Mm,{inviteCardTitle:d,inviteCardSubtext:y,primaryColor:m})]}),f.jsx(Xu,{onClick:L.inviteCard?T:R,children:L.rules?o||"Got it!":L.inviteCard?h||"Play now!":"Next"})]})},Ae=l.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"}]),Im=l.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"}]),en=l.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"}]),Sm=l.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"}]),Am=l.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"}]),Xe=l.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"}]),Pi=l.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"}]),Em=l.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"}]),bm=l.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"}]),Dm=l.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"}]),_m=l.makeEnum("streamlayer.interactive.QuestionAutoPostStart",[{no:0,name:"QUESTION_AUTO_POST_START_NONE",localName:"NONE"},{no:1,name:"QUESTION_AUTO_POST_START_TIME",localName:"TIME"}]),vm=l.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),wm=l.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"}]),jm=l.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"}]),Wa=l.makeMessageType("streamlayer.interactive.QuestionAppearance",()=>[{no:1,name:"layout",kind:"enum",T:l.getEnumType(Am)},{no:2,name:"images",kind:"enum",T:l.getEnumType(Xe)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:l.getEnumType(Sm)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),xn=l.makeMessageType("streamlayer.interactive.Sponsorship",()=>[{no:1,name:"logo",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),wt=l.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:l.getEnumType(Pi)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:l.getEnumType(Xe)}]),Om=l.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}]),Lm=l.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}]),nn=l.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),Rm=l.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}]),xm=l.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),Cm=l.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),zm=l.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:Cm}]),Ha=l.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:Um,oneof:"options"},{no:2,name:"trivia",kind:"message",T:Pm,oneof:"options"},{no:3,name:"prediction",kind:"message",T:Bm,oneof:"options"},{no:4,name:"factoid",kind:"message",T:Qm,oneof:"options"},{no:5,name:"tweet",kind:"message",T:Fm,oneof:"options"},{no:6,name:"promotion",kind:"message",T:Ym,oneof:"options"}]),Um=l.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),Pm=l.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:nn},{no:2,name:"incorrect_feedback",kind:"message",T:nn},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),Bm=l.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:nn},{no:2,name:"incorrect_feedback",kind:"message",T:nn}],{localName:"QuestionOptions_PredictionOptions"}),Qm=l.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:Rm},{no:4,name:"web_link",kind:"message",T:xm}],{localName:"QuestionOptions_FactoidOptions"}),Fm=l.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:Gm}],{localName:"QuestionOptions_TweetOptions"}),Gm=l.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"}),Ym=l.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(Em)},{no:2,name:"sponsor",kind:"message",T:xn},{no:3,name:"banner",kind:"message",T:zm},{no:4,name:"enable_wallet",kind:"enum",T:l.getEnumType(bm)}],{localName:"QuestionOptions_PromotionOptions"}),Vm=l.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}]),$m=l.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),Bi=l.makeMessageType("streamlayer.interactive.Question",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ae)},{no:3,name:"subject",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:Ha},{no:5,name:"appearance",kind:"message",T:Wa},{no:6,name:"sponsorship",kind:"message",T:xn},{no:7,name:"notification",kind:"message",T:wt},{no:8,name:"answers",kind:"message",T:Om,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(en)},{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:Se},{no:17,name:"tags",kind:"message",T:Vm,repeated:!0},{no:18,name:"bypass_notifications",kind:"message",T:Ja},{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:l.getEnumType(Im)},{no:22,name:"ai",kind:"message",T:$m}]),Za=l.makeMessageType("streamlayer.interactive.ExtendedQuestion",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ae)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"options",kind:"message",T:Ha},{no:5,name:"appearance",kind:"message",T:Wa},{no:6,name:"sponsorship",kind:"message",T:xn},{no:7,name:"notification",kind:"message",T:wt},{no:8,name:"answers",kind:"message",T:Lm,repeated:!0},{no:9,name:"status",kind:"enum",T:l.getEnumType(en)},{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:Ja}]);l.makeMessageType("streamlayer.interactive.QuestionTimeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(Ae)},{no:3,name:"subject",kind:"scalar",T:9},{no:4,name:"activated_at",kind:"scalar",T:9},{no:5,name:"status",kind:"enum",T:l.getEnumType(en)},{no:6,name:"options",kind:"message",T:Ha},{no:7,name:"notification",kind:"message",T:wt}]);const Qi=l.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:qm},{no:6,name:"sponsors",kind:"message",T:Zm},{no:7,name:"notification",kind:"message",T:Km},{no:8,name:"activated_at",kind:"message",T:Se},{no:9,name:"deactivated_at",kind:"message",T:Se},{no:10,name:"question_auto_post",kind:"message",T:Jm},{no:11,name:"bypass_notifications",kind:"message",T:Ja},{no:12,name:"importer_collaboration",kind:"message",T:od}]),qm=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:Wa},{no:2,name:"trivia",kind:"message",T:Wm},{no:3,name:"prediction",kind:"message",T:Hm},{no:4,name:"correct_feedbacks",kind:"message",T:nn,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:nn,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),Wm=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),Hm=l.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),Zm=l.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:xn,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),Km=l.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:l.getEnumType(Pi)},{no:4,name:"image_mode",kind:"enum",T:l.getEnumType(Xe)}],{localName:"EventModeration_NotificationSettings"}),Jm=l.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:l.getEnumType(Dm)},{no:2,name:"interval",kind:"scalar",T:13},{no:3,name:"next_post_time",kind:"message",T:Se},{no:4,name:"start_mode",kind:"enum",T:l.getEnumType(_m)},{no:5,name:"start_options",kind:"message",T:Xm}]),Xm=l.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:ed,oneof:"options"}]),ed=l.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions.TimeOptions",()=>[{no:1,name:"timestamp",kind:"scalar",T:4}],{localName:"QuestionAutoPostStartOptions_TimeOptions"});l.makeMessageType("streamlayer.interactive.AnswerData",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"percentage",kind:"scalar",T:13}]);const Ka=l.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}]),nd=l.makeMessageType("streamlayer.interactive.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.interactive.QuestionStats",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"question",kind:"message",T:td},{no:3,name:"statistics",kind:"message",T:ad,repeated:!0}]);const td=l.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:l.getEnumType(en)}],{localName:"QuestionStats_QuestionData"}),ad=l.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:sd}]),sd=l.makeMessageType("streamlayer.interactive.AnswerVotesStats.AnswerVotesData",()=>[{no:1,name:"count",kind:"scalar",T:13},{no:2,name:"percentage",kind:"scalar",T:13}],{localName:"AnswerVotesStats_AnswerVotesData"});l.makeMessageType("streamlayer.interactive.ServerNotificationOptions",()=>[{no:1,name:"silence",kind:"scalar",T:8},{no:2,name:"skip_update",kind:"scalar",T:8}]);const Ja=l.makeMessageType("streamlayer.interactive.BypassNotifications",()=>[{no:1,name:"in_app_silence",kind:"enum",T:l.getEnumType(wm)}]),rd=l.makeMessageType("streamlayer.interactive.ImportError",()=>[{no:1,name:"row_id",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}]),id=l.makeMessageType("streamlayer.interactive.ImportProgress",()=>[{no:1,name:"import_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:l.getEnumType(jm)},{no:3,name:"errors",kind:"message",T:rd,repeated:!0},{no:4,name:"last_updated",kind:"message",T:Se}]),od=l.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:id}}]),Gn=l.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"}]),Fi=l.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:Bi},{no:2,name:"notification",kind:"message",T:wt},{no:3,name:"moderation",kind:"message",T:Qi}]),cd=l.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]),ld=l.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:ud}]),ud=l.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:Fi}],{localName:"SubscriptionResponse_SubscriptionResponseData"}),md=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]),dd=l.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:pd}]),pd=l.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:Xa,repeated:!0}],{localName:"VotingSubscriptionResponse_VotingSubscriptionResponseData"}),yd=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:Za}]),gd=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),fd=l.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Td}]),Td=l.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:yd}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),hd=l.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:Za}]),kd=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),Md=l.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:Nd}]),Nd=l.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:hd}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"}),Id=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:Sd}]),Sd=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"}),Ad=l.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Ed}]),Ed=l.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:Fi}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"}),bd=l.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Dd=l.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:_d}]),_d=l.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:Bi}],{localName:"GetQuestionResponse_GetQuestionResponseData"}),vd=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),wd=l.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:jd}]),jd=l.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:Za}],{localName:"QuestionDetailResponse_QuestionDetailResponseData"}),Xa=l.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}]),Od=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:Ld}]),Ld=l.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"}),Rd=l.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:xd}]),xd=l.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:Xa,repeated:!0}],{localName:"SubmitAnswerResponse_SubmitAnswerResponseData"}),Cd=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:zd}]),zd=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"}),Ud=l.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]),Pd=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:Bd}]),Bd=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:l.getEnumType(vm)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"}),Qd=l.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Fd}]),Fd=l.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:Xa,repeated:!0}],{localName:"SkipQuestionResponse_SkipQuestionResponseData"}),Gd=l.makeMessageType("streamlayer.interactive.feed.PickHistoryRequest",()=>[{no:1,name:"question_type",kind:"enum",T:l.getEnumType(Ae),repeated:!0},{no:3,name:"event_id",kind:"scalar",T:9},{no:2,name:"pagination",kind:"message",T:Ka}]),Yd=l.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:l.getEnumType(Gn)},{no:4,name:"question_type",kind:"enum",T:l.getEnumType(Ae)},{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:l.getEnumType(en)}]),Vd=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:$d,repeated:!0},{no:2,name:"meta",kind:"message",T:qd}]),$d=l.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Yd}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),qd=l.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"}),Wd=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Hd=l.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:l.getEnumType(Xe)}]),Zd=l.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Kd,repeated:!0}]),Kd=l.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:Hd}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"}),Jd=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Xd=l.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}]),ep=l.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:np,repeated:!0}]),np=l.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:Xd}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),tp=l.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:ap},{no:3,name:"moderation",kind:"message",T:Qi}]),ap=l.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]),sp=l.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),rp=l.makeMessageType("streamlayer.interactive.feed.GetResponse",()=>[{no:1,name:"data",kind:"message",T:ip}]),ip=l.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:tp}],{localName:"GetResponse_GetResponseData"}),op=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),cp=l.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}]),lp=l.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:up,repeated:!0}]),up=l.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:cp}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),mp=l.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}]),dp=l.makeMessageType("streamlayer.sdkSettings.game.common.GameMedia",()=>[{no:1,name:"game_icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),pp=l.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),yp=l.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:dp},{no:6,name:"appearance",kind:"message",T:mp},{no:7,name:"prizes",kind:"message",T:pp,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),gp=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),fp=l.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),Tp=l.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:gp},{no:7,name:"appearance",kind:"message",T:fp},{no:8,name:"completed",kind:"scalar",T:8}]),hp=l.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}]),kp=l.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:hp,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),Mp=l.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}]),Np=l.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}]),Ip=l.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:yp},{no:2,name:"title_card",kind:"message",T:Tp},{no:3,name:"onboarding",kind:"message",T:kp},{no:4,name:"rules",kind:"message",T:Mp},{no:5,name:"invite_card",kind:"message",T:Np},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),Sp=l.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:nn,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:nn,repeated:!0}]),Ap=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationNotifications",()=>[{no:1,name:"default_image",kind:"scalar",T:9},{no:2,name:"image_mode",kind:"enum",T:l.getEnumType(Xe)}]),Ep=l.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}]),bp=l.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:Sp},{no:2,name:"notifications",kind:"message",T:Ap},{no:3,name:"sponsorships",kind:"message",T:Ep}]),we=l.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"}]),Dp=l.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"}]),_p=l.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"}]),es=l.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"}]),vp=l.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"}]),Gi=l.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),wp=l.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"}]),jp=l.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"}]),Op=l.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"}]);l.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 Lp=l.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),Rp=l.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:l.getEnumType(Dp)}]),xp=l.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Yi=l.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:Cp}]),Cp=l.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"}),$s=l.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:Rp,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:l.getEnumType(_p)},{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:xp}]),zp=l.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(Gi)},{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:l.getEnumType(es)}]),Tt=l.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:l.getEnumType(es)},{no:5,name:"is_default",kind:"enum",T:l.getEnumType(vp)}]),Up=l.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:l.getEnumType(Gi)},{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:l.getEnumType(es)},{no:5,name:"default_channel",kind:"message",T:Tt},{no:6,name:"channels",kind:"message",T:Tt,repeated:!0}]),Vi=l.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:Yi},{no:10,name:"getstream",kind:"message",T:Up}]),Pp=l.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:Bp,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}]),Bp=l.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"}),$i=l.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:Yi},{no:13,name:"pub",kind:"message",T:Pp},{no:14,name:"getstream",kind:"message",T:zp}]),Qp=l.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:Ip},{no:2,name:"moderation",kind:"message",T:bp},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:l.getEnumType(wp)}]),qs=l.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:Tt},{no:2,name:"channels",kind:"message",T:Tt,repeated:!0}]),bn=l.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:Lp,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:$s,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:$s,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:Qp,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:qs,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:qs,oneof:"overlay_settings"}]),Fp=l.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:bn},{no:2,name:"global_preset",kind:"message",T:bn},{no:3,name:"preset",kind:"message",T:bn},{no:4,name:"stream",kind:"message",T:bn}]),jt=l.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(we)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:bn},{no:6,name:"meta",kind:"message",T:Fp},{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"}]);l.makeMessageType("streamlayer.sdkSettings.SdkOverlayUpdateData",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(we)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:bn},{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"}]);l.makeMessageType("streamlayer.sdkSettings.OverlaysListRequest",[]);l.makeMessageType("streamlayer.sdkSettings.OverlaysListResponse",()=>[{no:1,name:"data",kind:"message",T:Gp}]);const Gp=l.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"});l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GenerateSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Yp}]);const Yp=l.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"});l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RemoveSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:Vp}]);const Vp=l.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"});l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.ListSdkKeyResponse",()=>[{no:1,name:"data",kind:"message",T:$p}]);const $p=l.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"});l.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}]);l.makeMessageType("streamlayer.sdkSettings.RegisterTwitterResponse",[]);l.makeMessageType("streamlayer.sdkSettings.Preset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"rule",kind:"message",T:Wp},{no:3,name:"settings",kind:"message",T:qp}]);const qp=l.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:jt,repeated:!0},{no:2,name:"advertising",kind:"message",T:qi}]),Wp=l.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:l.getEnumType(jp)},{no:2,name:"value",kind:"scalar",T:9}]),Hp=l.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:Ws},{no:2,name:"videos",kind:"message",T:Ws}]),Ws=l.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}]),Zp=l.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:Hp}}]);l.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:Zp,repeated:!0}]);const Kp=l.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:l.getEnumType(Op)}]),Jp=l.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}]),Xp=l.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:Kp,repeated:!0},{no:3,name:"videos",kind:"message",T:Jp,repeated:!0}]),ey=l.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:l.getEnumType(we)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:Xp}},{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}]),qi=l.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:ey}}]);l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GenerateApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:ny}]);const ny=l.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"});l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"token",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.RemoveApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:ty}]);const ty=l.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"});l.makeMessageType("streamlayer.sdkSettings.GetApiKeyRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GetApiKeyResponse",()=>[{no:1,name:"data",kind:"message",T:ay}]);const ay=l.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"});l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.GetApiKeyStudioResponse",()=>[{no:1,name:"data",kind:"message",T:sy}]);const sy=l.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"}),ry="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMTQuODA2MSA2LjczNjg0IDE2IDUuNjA1NzcgMTYgNC4yMTA1M1YyLjUyNjMyQzE2IDEuMTMxMDcgMTQuODA2MSAwIDEzLjMzMzMgMEgyLjY2NjY3Wk00LjQ0NDQ2IDEwLjk0NzNIMTMuMzMzM0MxMy44MjQzIDEwLjk0NzMgMTQuMjIyMiAxMS4zMjQzIDE0LjIyMjIgMTEuNzg5NFYxMy40NzM2QzE0LjIyMjIgMTMuOTM4NyAxMy44MjQzIDE0LjMxNTcgMTMuMzMzMyAxNC4zMTU3SDQuNDQ0NDZWMTAuOTQ3M1pNMCAxMS43ODk0QzAgMTAuMzk0MiAxLjE5MzkxIDkuMjYzMSAyLjY2NjY3IDkuMjYzMUgxMy4zMzMzQzE0LjgwNjEgOS4yNjMxIDE2IDEwLjM5NDIgMTYgMTEuNzg5NFYxMy40NzM2QzE2IDE0Ljg2ODkgMTQuODA2MSAxNS45OTk5IDEzLjMzMzMgMTUuOTk5OUgyLjY2NjY3QzEuMTkzOTEgMTUuOTk5OSAwIDE0Ljg2ODkgMCAxMy40NzM2VjExLjc4OTRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KPC9nPgo8L3N2Zz4K",iy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1ByZWRpY2l0b24iPgo8cGF0aCBpZD0iSWNvbi9QcmVkaWN0aW9uIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE2IDcuMDA1MjJDMTYgNy4wMDUyMiA5LjIwMDQ4IDYuODE2MDcgOS4yMDA0OCAwQzkuMjAwNDggNi4zNjE2OCAzLjI3NzI5IDYuOTUwNTYgMi40ODc1NiA3LjAwMDc4TDIuNDAwOTQgNy4wMDUyMkMyLjQwMDk0IDcuMDA1MjIgOS4yMDA0OCA3LjE5NDM1IDkuMjAwNDggMTQuMDEwNEM5LjIwMDQ4IDcuNjQ4NzcgMTUuMTIzNCA3LjA1OTg5IDE1LjkxMzEgNy4wMDk2NEwxNiA3LjAwNTIyWk02Ljk3MzgyIDEyLjU2NTJDNi45NzM4MiAxMi41NjUyIDMuNDg2OTEgMTIuNDcyNCAzLjQ4NjkxIDkuMTMwMzNDMy40ODY5MSAxMi4yNDk2IDAuNDQ5NDAyIDEyLjUzODQgMC4wNDQ0MTg2IDEyLjU2M0wwIDEyLjU2NTJDMCAxMi41NjUyIDMuNDg2OTEgMTIuNjU3OSAzLjQ4NjkxIDE2QzMuNDg2OTEgMTIuODgwNyA2LjUyNDI5IDEyLjU5MiA2LjkyOTI3IDEyLjU2NzNMNi45NzM4MiAxMi41NjUyWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",oy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1RyaXZpYSI+CjxwYXRoIGlkPSJOb3RpZmljYXRpb24vSWNvbi9Ucml2aWEiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi4wMTY2MyAxLjM4MDhDMC43Mzk5MTMgMS41NTU4NiAtMC4xNTMxNTMgMi43MzI3NiAwLjAyMTkxMiA0LjAwOTQ4TDEuMzgwOCAxMy45MTk2QzEuNTU1ODYgMTUuMTk2MyAyLjczMjc2IDE2LjA4OTQgNC4wMDk0OCAxNS45MTQzTDEzLjkxOTYgMTQuNTU1NEMxNS4xOTYzIDE0LjM4MDMgMTYuMDg5NCAxMy4yMDM0IDE1LjkxNDMgMTEuOTI2N0wxNC41NTU0IDIuMDE2NjNDMTQuMzgwMyAwLjczOTkxMyAxMy4yMDM0IC0wLjE1MzE1MyAxMS45MjY3IDAuMDIxOTEyTDIuMDE2NjMgMS4zODA4Wk05LjU5NjEzIDMuNzg4QzkuMTE0MzEgMy40Njk5MSA4LjQ3ODEzIDMuMzAxNTEgNy43NTY2IDMuMzAxNTFDNy41NDM3NyAzLjMwMTUxIDcuMzI2MjUgMy4zMTY3MSA3LjEwODcyIDMuMzQ0NzhDNi4zODgzNiAzLjQ0MDY3IDUuNjg5MDEgMy43OTAzNCA1LjE4OTY1IDQuMzAxMzhDNC42ODQ0NSA0LjgyMDYyIDQuNDM3NyA1LjQ1NTYzIDQuNTE3MjIgNi4wNDE1MUM0LjU3NDUyIDYuNDc0MiA0LjkwMDc4IDYuNzUzNyA1LjM0NjM1IDYuNzUzN0M1LjM5NDI5IDYuNzUzNyA1LjQ0MzQxIDYuNzUwMiA1LjQ5MTM2IDYuNzQ0MzVDNi4wODc3OCA2LjY2NDgzIDYuMjE2NDIgNi4yNTQzNiA2LjM0MDM2IDUuODU2NzVMNi4zNDA0NSA1Ljg1NjQ4QzYuNDgxOTIgNS40MDQwMSA2LjYxNTM0IDQuOTc3MzEgNy4zODU4NSA0Ljg3NDQ0QzcuNDY1MzcgNC44NjM5MSA3LjU0MTM4IDQuODU4MDYgNy42MTUwNiA0Ljg1ODA2QzguMTY5MzkgNC44NTgwNiA4LjUxNDM2IDUuMTUwNDIgOC41ODQ1NCA1LjY4MjUyQzguNjUzNTMgNi4yMDI5MyA4LjI0MzA3IDYuNjE4MDcgNy44MDY4NCA3LjA1NjZMNy44MDM5MyA3LjA1OTU0QzcuMzE1ODIgNy41NTIzMSA2Ljc2MzkgOC4xMDk1IDYuODY4OTUgOC45MDA4M0M2Ljg5NTg1IDkuMTA1NDggNi45ODU5IDkuMjk0OTMgNy4xMjI3MiA5LjQzNjQ0QzcuMjc4MjYgOS41OTkgNy40ODI5IDkuNjg0MzYgNy43MTMzMSA5LjY4NDM2QzcuNzU1NDEgOS42ODQzNiA3Ljc5ODY4IDkuNjgyMDMgNy44NDMxMSA5LjY3NjE4QzguNDY2OTEgOS41OTMyNCA4LjU1MTYyIDkuMjMxMzkgOC42MzMzOCA4Ljg4MjFMOC42MzM2NSA4Ljg4MDk3TDguNjM2NjEgOC44Njg1OUM4LjY2NzIzIDguNzQwMyA4LjY5ODc3IDguNjA4MTMgOC43NTk5NSA4LjQ4ODA0QzguODQ2NDkgOC4zMTYxMyA5LjA2MjgzIDguMTEyNjUgOS4zMTQyOCA3Ljg3ODc1QzkuOTE0MiA3LjMxODU4IDEwLjczNCA2LjU1MTQzIDEwLjU4MiA1LjQxNTg5QzEwLjQ4NzIgNC43MDYwMyAxMC4xNTUxIDQuMTU3NTcgOS41OTYxMSAzLjc4ODAyTDkuNTk2MTMgMy43ODhaTTguMTE2MDUgMTAuMjhDOC4wNjkyNyAxMC4yOCA4LjAyMTMyIDEwLjI4MzYgNy45NzQ1NCAxMC4yODk0QzcuMzgzOTYgMTAuMzY4OSA2Ljk2NzY1IDEwLjkxMjcgNy4wNDU5OSAxMS41MDMzQzcuMTE3MzMgMTIuMDM3NyA3LjU3ODA4IDEyLjQ0MTIgOC4xMTcyIDEyLjQ0MTJDOC4xNjM5NyAxMi40NDEyIDguMjExOTIgMTIuNDM3NyA4LjI1OTg3IDEyLjQzMThDOC44NTA0NSAxMi4zNTIzIDkuMjY1NiAxMS44MDg1IDkuMTg4NDIgMTEuMjE3OUM5LjExNTkxIDEwLjY4MjMgOC42NTUxNyAxMC4yOCA4LjExNjA1IDEwLjI4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",cy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEzLjQzMTUgMy4xODI0Nkw1LjUzMzIxIDExLjA4MDhMMS45OTc3MSA3LjU0NTI3QzEuNTQwNTYgNy4wODgxMSAwLjc5OTkxMyA3LjA4ODExIDAuMzQyODY0IDcuNTQ1MjdDLTAuMTE0Mjg4IDguMDAyNDIgLTAuMTE0Mjg4IDguNzQzMDcgMC4zNDI4NjQgOS4yMDAxMUw0LjcwNTY3IDEzLjU2MjlDNC45MzMzMSAxMy43OTA2IDUuMjM0MTUgMTMuOTA2MyA1LjUzMzA3IDEzLjkwNjNDNS44MzIwMiAxMy45MDYzIDYuMTMwOTYgMTMuNzkyNCA2LjM2MDQ4IDEzLjU2MjlMMTUuMDg2MSA0LjgzNzMxQzE1LjU0MzIgNC4zODAxNiAxNS41NDMyIDMuNjM5NTEgMTUuMDg2MSAzLjE4MjQ2QzE0LjYyOSAyLjcyNTMxIDEzLjg4ODQgMi43MjUzMSAxMy40MzEyIDMuMTgyNDZIMTMuNDMxNVoiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",ly="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIyIiB5PSIwLjUwNjEwNCIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDIgMC41MDYxMDQpIiBmaWxsPSIjOWUwYTFmIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB4PSIwLjMzMzAwOCIgeT0iMTIuMTcyOSIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwLjMzMzAwOCAxMi4xNzI5KSIgZmlsbD0iIzllMGExZiIvPgo8L2c+Cjwvc3ZnPgo=",va="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const uy=I("div")({name:"Panel",class:"p1fl4kim",propsAsIs:!1}),my=I("div")({name:"QuestionTypeIconWrap",class:"qqhwgfn",propsAsIs:!1}),dy=I("img")({name:"QuestionTypeIcon",class:"q1lyf5nv",propsAsIs:!1}),py=I("div")({name:"QuestionContent",class:"qlmoky7",propsAsIs:!1}),yy=I("div")({name:"QuestionTypeLabel",class:"qp1y7hu",propsAsIs:!1}),gy=I("div")({name:"QuestionSubject",class:"q1de583k",propsAsIs:!1}),fy=I("button")({name:"QuestionActionTitle",class:"ql7tvph",propsAsIs:!1}),Ty=I("button")({name:"QuestionActionIcon",class:"qh0ibjl",propsAsIs:!1}),hy=I("img")({name:"QuestionStatusIcon",class:"q1bdpn1b",propsAsIs:!1}),ky=I("span")({name:"QuestionTypeTitle",class:"q6tdooc",propsAsIs:!1}),My=I("span")({name:"ExpiredQuestion",class:"e1f2al71",propsAsIs:!1}),Ny={[Ae.POLL]:{label:"Poll",icon:ry},[Ae.TRIVIA]:{label:"Trivia",icon:oy},[Ae.PREDICTION]:{label:"Prediction",icon:iy}},Iy={[Gn.LOST]:ly,[Gn.WON]:cy,[Gn.UNSET]:va,[Gn.DNP]:va},Sy=({questionId:n,questionType:e,questionStatus:t,subject:a,openForVoting:s,openQuestion:r,status:o})=>{const c=Ny[e];return c===void 0?null:f.jsxs(uy,{onClick:()=>r==null?void 0:r(n),children:[f.jsx(my,{children:f.jsx(dy,{alt:"question-type-icon",src:c.icon})}),f.jsxs(py,{children:[f.jsxs(yy,{children:[f.jsx(ky,{children:c.label}),e===Ae.TRIVIA&&t===en.RESOLVED&&f.jsx(My,{children:"Expired"})]}),f.jsx(gy,{children:a||""})]}),s?f.jsx(fy,{children:"play"}):f.jsx(Ty,{children:f.jsx(hy,{alt:"question-status-icon",src:Iy[o]})})]})};const Ay=I("div")({name:"Container",class:"c4iwna9",propsAsIs:!1}),Ey=I("div")({name:"Title",class:"th1ieuk",propsAsIs:!1}),by=I("div")({name:"ItemsContainer",class:"iiqbvdu",propsAsIs:!1}),Dy=({questions:n,openQuestion:e})=>f.jsxs(Ay,{children:[f.jsx(Ey,{children:"PICK HISTORY"}),f.jsx(by,{children:n==null?void 0:n.map(t=>f.jsx(Sy,{openQuestion:e,...t},t.questionId))})]}),_y="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0LjU1OTkyIDEwLjg0OTcgNC45NDY2MyAxMC4zOTUzIDUuMzQ3NjhDOS45NDEgNS43NDg3MiA5LjM3NDkgNi4wMTg0NyA4LjY5NzAxIDYuMTU2OTJDOS4wNTI3OCA1LjM4MzQ4IDkuMjMwNjYgNC40OTc4NiA5LjIzMDY2IDMuNTAwMDJIMTEuMDc2OFpNMTIgNC4xODc1VjMuMjcwODNDMTIgMy4wNzk4NiAxMS45MzI3IDIuOTE3NTQgMTEuNzk4MSAyLjc4Mzg1QzExLjY2MzUgMi42NTAxNyAxMS41IDIuNTgzMzMgMTEuMzA3NyAyLjU4MzMzSDkuMjMwNzdWMS44OTU4M0M5LjIzMDc3IDEuNTgwNzMgOS4xMTc3OSAxLjMxMDk4IDguODkxODMgMS4wODY1OUM4LjY2NTg2IDAuODYyMTk1IDguMzk0MjMgMC43NSA4LjA3NjkyIDAuNzVIMy45MjMwOEMzLjYwNTc3IDAuNzUgMy4zMzQxNCAwLjg2MjE5NSAzLjEwODE3IDEuMDg2NTlDMi44ODIyMSAxLjMxMDk4IDIuNzY5MjMgMS41ODA3MyAyLjc2OTIzIDEuODk1ODNWMi41ODMzM0gwLjY5MjMwOEMwLjQ5OTk5OSAyLjU4MzMzIDAuMzM2NTM5IDIuNjUwMTcgMC4yMDE5MjMgMi43ODM4NUMwLjA2NzMwNyAyLjkxNzU0IDAgMy4wNzk4NiAwIDMuMjcwODNWNC4xODc1QzAgNC41MjY0OCAwLjA5OTc1ODYgNC44Njc4NCAwLjI5OTI3OSA1LjIxMTU5QzAuNDk4Nzk5IDUuNTU1MzQgMC43NjgwMjcgNS44NjU2NyAxLjEwNjk3IDYuMTQyNThDMS40NDU5MiA2LjQxOTQ5IDEuODYxNzggNi42NTIyMyAyLjM1NDU3IDYuODQwODJDMi44NDczNiA3LjAyOTQxIDMuMzY1MzggNy4xMzU2MyAzLjkwODY1IDcuMTU5NTFDNC4xMTA1OCA3LjQxNzMyIDQuMzM4OTQgNy42NDQxIDQuNTkzNzUgNy44Mzk4NEM0Ljc3NjQ0IDguMDAyMTcgNC45MDI2NCA4LjE3NTI0IDQuOTcyMzYgOC4zNTkwNUM1LjA0MjA3IDguNTQyODYgNS4wNzY5MiA4Ljc1NjUxIDUuMDc2OTIgOUM1LjA3NjkyIDkuMjU3ODEgNS4wMDM2MSA5LjQ3NTA0IDQuODU2OTcgOS42NTE2OUM0LjcxMDM0IDkuODI4MzQgNC40NzU5NiA5LjkxNjY3IDQuMTUzODUgOS45MTY2N0MzLjc5MzI3IDkuOTE2NjcgMy40NzIzNiAxMC4wMjUzIDMuMTkxMTEgMTAuMjQyNUMyLjkwOTg1IDEwLjQ1OTcgMi43NjkyMyAxMC43MzMxIDIuNzY5MjMgMTEuMDYyNVYxMS41MjA4QzIuNzY5MjMgMTEuNTg3NyAyLjc5MDg3IDExLjY0MjYgMi44MzQxMyAxMS42ODU1QzIuODc3NCAxMS43Mjg1IDIuOTMyNjkgMTEuNzUgMyAxMS43NUg5QzkuMDY3MzEgMTEuNzUgOS4xMjI2IDExLjcyODUgOS4xNjU4NiAxMS42ODU1QzkuMjA5MTMgMTEuNjQyNiA5LjIzMDc3IDExLjU4NzcgOS4yMzA3NyAxMS41MjA4VjExLjA2MjVDOS4yMzA3NyAxMC43MzMxIDkuMDkwMTUgMTAuNDU5NyA4LjgwODg5IDEwLjI0MjVDOC41Mjc2NCAxMC4wMjUzIDguMjA2NzMgOS45MTY2NyA3Ljg0NjE1IDkuOTE2NjdDNy41MjQwNCA5LjkxNjY3IDcuMjg5NjYgOS44MjgzNCA3LjE0MzAzIDkuNjUxNjlDNi45OTYzOSA5LjQ3NTA0IDYuOTIzMDggOS4yNTc4MSA2LjkyMzA4IDlDNi45MjMwOCA4Ljc1NjUxIDYuOTU3OTMgOC41NDI4NiA3LjAyNzY0IDguMzU5MDVDNy4wOTczNiA4LjE3NTI0IDcuMjIzNTYgOC4wMDIxNyA3LjQwNjI1IDcuODM5ODRDNy42NjEwNiA3LjY0NDEgNy44ODk0MiA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",vy=n=>n.split(/\s+/).map(e=>e[0]).join("").toUpperCase();const wy=I("div")({name:"Container",class:"c13i6lze",propsAsIs:!1}),jy=I("div")({name:"Indicator",class:"ix2bv9",propsAsIs:!1}),st=({indicator:n,title:e})=>f.jsxs(wy,{children:[f.jsx(jy,{children:n}),f.jsx("p",{children:e})]});const Oy=I("div")({name:"Container",class:"c5ghaaw",propsAsIs:!1}),Ly=I("div")({name:"Title",class:"txfzjhj",propsAsIs:!1}),Ry=I("div")({name:"Indicator",class:"i1v0wmto",propsAsIs:!1}),Hs=({indicator:n,title:e})=>f.jsxs(Oy,{children:[f.jsx(Ly,{children:e}),f.jsx(Ry,{children:n})]});const xy=I("div")({name:"Container",class:"canai20",propsAsIs:!1}),Cy=I("div")({name:"TopInfo",class:"tda0d57",propsAsIs:!1}),zy=I("div")({name:"BottomInfo",class:"boqy4xv",propsAsIs:!1}),Uy=I("div")({name:"User",class:"u1dtpq3t",propsAsIs:!1}),Py=I("img")({name:"Avatar",class:"ar4jfc",propsAsIs:!1}),By=I("div")({name:"UserInfo",class:"u1trcvj0",propsAsIs:!1}),Qy=I("div")({name:"UserName",class:"u1pie8mc",propsAsIs:!1}),Fy=I("div")({name:"UserRating",class:"ucsljfb",propsAsIs:!1}),Gy=I("img")({name:"TrophyIcon",class:"tyemu1i",propsAsIs:!1}),Yy=I("div")({name:"Rts",class:"rggn4k7",propsAsIs:!1}),Vy=I("div")({name:"RtsIndicator",class:"rnmjsbm",propsAsIs:!1}),$y=I("div")({name:"Top",class:"t1i7e651",propsAsIs:!1}),qy=I("div")({name:"Ranks",class:"r1mt107z",propsAsIs:!1}),Wy=I("div")({name:"AvatarPlaceholder",class:"apag0gc",propsAsIs:!1}),Hy=I("button")({name:"UserAccountBtn",class:"uroanb5",propsAsIs:!1}),Zy=({avatar:n,name:e,points:t,grade:a,friendsRank:s,globalRank:r,winStreak:o,correct:c,incorrect:m,successRate:d})=>f.jsxs(xy,{children:[f.jsxs(Cy,{children:[f.jsxs(Uy,{children:[f.jsxs(Hy,{children:[n&&f.jsx(Py,{alt:"avatar",src:n}),!n&&f.jsx(Wy,{children:vy(e)})]}),f.jsxs(By,{children:[f.jsx(Qy,{children:e}),f.jsxs(Fy,{children:[f.jsx(Gy,{alt:"rank-icon",src:_y}),f.jsxs(Yy,{children:[f.jsx(Vy,{children:t||"-"}),"RTS"]}),f.jsxs($y,{children:["TOP ",a,"%"]})]})]})]}),f.jsxs(qy,{children:[f.jsx(Hs,{title:"Friens rank",indicator:s||"-"}),f.jsx(Hs,{title:"Global rank",indicator:r||"-"})]})]}),f.jsxs(zy,{children:[f.jsx(st,{indicator:o||"-",title:"Win streak"}),f.jsx(st,{indicator:c||"-",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",Ky="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Zs="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const Wi=I("div")({name:"Container",class:"c4emhbe",propsAsIs:!1}),Jy=()=>Wi,Xy=I(Jy())({name:"AnsweredContainer",class:"a1a18ay2",propsAsIs:!0}),Ks=I("div")({name:"ButtonPct",class:"bvdmnzn",propsAsIs:!1}),Js=I("button")({name:"Button",class:"bz55cek",propsAsIs:!1}),Xs=I("img")({name:"Icon",class:"i1u5zlvm",propsAsIs:!1}),er=I("span")({name:"Title",class:"tfilm7j",propsAsIs:!1}),nr=I("span")({name:"Indicators",class:"iqdzfbw",propsAsIs:!1}),tr=I("div")({name:"CheckIconWrap",class:"ciu4mnt",propsAsIs:!1}),Jt=I("div")({name:"Percentage",class:"pl06bzo",propsAsIs:!1}),ar=I("img")({name:"CheckIcon",class:"c5bwq34",propsAsIs:!1}),eg=({icon:n,id:e,title:t,questionId:a,disabled:s,percentage:r,onVote:o,toggleIsLoadingSubmitAnswer:c,correct:m,questionAnswered:d,hasCorrectAnswer:y,answered:h,points:T,questionType:M})=>{var E;return d&&h?f.jsxs(Xy,{"data-answeredCorrect":(E=!y||m)==null?void 0:E.toString(),"data-questionAnswered":"false",children:[f.jsx(Ks,{style:{width:`${r}%`}}),f.jsxs(Js,{disabled:s,onClick:()=>o(a,e),children:[n&&f.jsx(Xs,{alt:"option-icon",src:n}),f.jsx(er,{children:t}),f.jsxs(nr,{children:[y&&m&&f.jsx(tr,{children:f.jsx(ar,{alt:"icon-correct",src:h?Zs:wa})}),f.jsxs(Jt,{children:[r,"%"]})]})]})]}):f.jsxs(Wi,{"data-questionAnswered":d==null?void 0:d.toString(),children:[d&&f.jsx(Ks,{style:{width:`${r}%`}}),f.jsxs(Js,{disabled:s,onClick:()=>{c(!0),o(a,e)},children:[n&&f.jsx(Xs,{alt:"option-icon",src:n}),f.jsx(er,{children:t}),d?f.jsxs(nr,{children:[y&&m&&f.jsx(tr,{children:f.jsx(ar,{alt:"icon-correct",src:h?Zs:wa})}),f.jsxs(Jt,{children:[r,"%"]})]}):M===Ae.PREDICTION?f.jsxs(Jt,{children:[T," pts"]}):null]})]})};const ng=I("div")({name:"Container",class:"cgz6mxc",propsAsIs:!1}),tg=I("div")({name:"Title",class:"ta6van7",propsAsIs:!1}),ag=I("div")({name:"Options",class:"o1msgqq4",propsAsIs:!1}),sg=I("div")({name:"Loader",class:"lq1mbhd",propsAsIs:!1}),rg=I("div")({name:"Feedback",class:"f9kw2xt",propsAsIs:!1}),ig=I("img")({name:"FeedbackIcon",class:"fn7neu6",propsAsIs:!1}),og=I("div")({name:"FeedbackTitle",class:"fpdq7m5",propsAsIs:!1}),cg=I("div")({name:"FeedbackDescription",class:"f1ljy63t",propsAsIs:!1}),lg=({title:n,questionId:e,options:t,questionAnswered:a,feedbackMessages:s,questionAnsweredCorrectly:r,questionType:o})=>{const[c,m]=Q.useState(!1),d=Q.useCallback(y=>{m(y)},[m]);return Q.useEffect(()=>{d(!1)},[t,d]),f.jsxs(ng,{children:[f.jsx(tg,{children:n}),f.jsxs(ag,{children:[c&&f.jsx(sg,{children:"Loading..."}),t.map(y=>f.jsx(eg,{toggleIsLoadingSubmitAnswer:d,questionId:e,questionType:o,...y},y.id))]}),a&&o===Ae.TRIVIA&&f.jsxs(rg,{children:[f.jsx(ig,{alt:"reaction-to-answer",src:r?wa:Ky}),f.jsxs("div",{children:[f.jsx(og,{children:r?s.correctFeedback.title:s.incorrectFeedback.title}),f.jsx(cg,{children:r?s.correctFeedback.description:s.incorrectFeedback.description})]})]})]})};class ug{}window.storeLogger=Object.create(null);class Ot{constructor(e,t){A(this,"store");A(this,"name");this.store=e,this.name=t}getStore(){return this.store}}const mg=n=>{const e=Object.keys(n);return be.computed(e.map(t=>n[t].getStore()),(...t)=>Object.fromEntries(e.map((a,s)=>[a,t[s]])))};class Vn extends Ot{constructor(){super(...arguments);A(this,"getValues",()=>this.getStore().get());A(this,"getValue",t=>this.getStore().get()[t]);A(this,"setValue",(t,a)=>this.getStore().setKey(t,a));A(this,"subscribe",(...t)=>this.getStore().subscribe(...t));A(this,"unsubscribe",()=>this.getStore().off())}}const $n=n=>be.map(n);var Sn=(n=>(n.ORGANIZATION="ORGANIZATION",n.STREAM="STREAM",n))(Sn||{});const dg={[we.BETTING]:"betting",[we.GAMES]:"games",[we.PUBLIC_CHAT]:"publicChat",[we.TWITTER]:"twitter"};var un=(n=>(n.Ready="ready",n.Suspended="suspended",n))(un||{});class Hi{constructor({settings:e,...t},a){A(this,"status");A(this,"source");A(this,"config");A(this,"settings");A(this,"listeners",new Set);A(this,"settingsKey");A(this,"enable",()=>{this.status.set("ready")});A(this,"disable",()=>{this.status.set("suspended")});A(this,"setFeatureConfig",({settings:e,...t})=>{let a;for(a in t)this.config.setValue(a,t[a]);if((e==null?void 0:e.overlaySettings.case)===this.settingsKey){const s=e.overlaySettings.value;if(s!==void 0){let r;for(r in s)console.log(r,s[r]),s[r]!==0&&s[r]!==""&&this.settings.setValue(r,s[r])}}});A(this,"update",(e,t)=>{this.source==="STREAM"&&t==="ORGANIZATION"||(this.setFeatureConfig(e),this.source=t)});this.settingsKey=dg[t.type],this.status=be.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=a}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(a){console.error(a)}}}class _e extends Ot{constructor(){super(...arguments);A(this,"getValue",()=>this.getStore().get());A(this,"setValue",t=>this.getStore().set(t));A(this,"subscribe",t=>this.getStore().subscribe(t));A(this,"unsubscribe",()=>this.getStore().off())}getValues(){throw new Error("not implemented")}listen(t){return this.getStore().listen(t)}get(){return this.getStore().get()}}const ve=n=>be.atom(n),pg=(n,e)=>be.computed(n,e);class xe extends Ot{constructor(t,a,s){super(t,`api:${a}`);A(this,"atomStore");A(this,"getAtomStore",()=>this.atomStore);A(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});A(this,"getValues",()=>{throw new Error("not implemented")});A(this,"setValue",t=>this.getStore().set({loading:!1,data:t==null?void 0:t.data}));A(this,"subscribe",t=>this.getStore().subscribe(t));A(this,"unsubscribe",()=>{throw new Error("not implemented")});A(this,"invalidate",()=>{this.store.invalidate()});A(this,"listen",t=>this.getStore().listen(t));A(this,"key",()=>this.getStore().key);A(this,"off",()=>this.getStore().off());this.atomStore=be.atom(),s&&t.subscribe(r=>{this.atomStore.set(s(r))})}get(){throw new Error("not implemented")}}var ns={exports:{}};function yg(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}var gg=fg;function fg(n,e,t){var a=t&&t.stringify||yg,s=1;if(typeof n=="object"&&n!==null){var r=e.length+s;if(r===1)return n;var o=new Array(r);o[0]=a(n);for(var c=1;c<r;c++)o[c]=a(e[c]);return o.join(" ")}if(typeof n!="string")return n;var m=e.length;if(m===0)return n;for(var d="",y=1-s,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+=a(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 sr=gg;ns.exports=He;const Zn=jg().console||{},Tg={mapHttpRequest:rt,mapHttpResponse:rt,wrapRequestSerializer:Xt,wrapResponseSerializer:Xt,wrapErrorSerializer:Xt,req:rt,res:rt,err:ir,errWithCause:ir};function ht(n,e){return n==="silent"?1/0:e.levels.values[n]}const ts=Symbol("pino.logFuncs"),ja=Symbol("pino.hierarchy"),hg={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function rr(n,e){const t={logger:e,parent:n[ja]};e[ja]=t}function kg(n,e,t){const a={};e.forEach(s=>{a[s]=t[s]?t[s]:Zn[s]||Zn[hg[s]||"log"]||Kn}),n[ts]=a}function Mg(n,e){return Array.isArray(n)?n.filter(function(a){return a!=="!stdSerializers.err"}):n===!0?Object.keys(e):!1}function He(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 a=n.serializers||{},s=Mg(n.browser.serialize,a);let r=n.browser.serialize;Array.isArray(n.browser.serialize)&&n.browser.serialize.indexOf("!stdSerializers.err")>-1&&(r=!1);const o=Object.keys(n.customLevels||{}),c=["error","fatal","warn","info","debug","trace"].concat(o);typeof t=="function"&&c.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),kg(d,c,t),rr({},d),Object.defineProperty(d,"levelVal",{get:h}),Object.defineProperty(d,"level",{get:T,set:M});const y={transmit:e,serialize:s,asObject:n.browser.asObject,levels:c,timestamp:_g(n)};d.levels=Ng(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=a,d._serialize=s,d._stdErrSerialize=r,d.child=E,e&&(d._logEvent=Oa());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,sn(this,y,d,"error"),sn(this,y,d,"fatal"),sn(this,y,d,"warn"),sn(this,y,d,"info"),sn(this,y,d,"debug"),sn(this,y,d,"trace"),o.forEach(L=>{sn(this,y,d,L)})}function E(D,L){if(!D)throw new Error("missing bindings for child Pino");L=L||{},s&&D.serializers&&(L.serializers=D.serializers);const j=L.serializers;if(s&&j){var R=Object.assign({},a,j),x=n.browser.serialize===!0?Object.keys(R):s;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=Oa([].concat(B._logEvent.bindings,D)))}z.prototype=this;const U=new z(this);return rr(this,U),U.level=this.level,U}return d}function Ng(n){const e=n.customLevels||{},t=Object.assign({},He.levels.values,e),a=Object.assign({},He.levels.labels,Ig(e));return{values:t,labels:a}}function Ig(n){const e={};return Object.keys(n).forEach(function(t){e[n[t]]=t}),e}He.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"}};He.stdSerializers=Tg;He.stdTimeFunctions=Object.assign({},{nullTime:Zi,epochTime:Ki,unixTime:vg,isoTime:wg});function Sg(n){const e=[];n.bindings&&e.push(n.bindings);let t=n[ja];for(;t.parent;)t=t.parent,t.logger.bindings&&e.push(t.logger.bindings);return e.reverse()}function sn(n,e,t,a){if(n[a]=ht(n.level,t)>ht(a,t)?Kn:t[ts][a],!e.transmit&&n[a]===Kn)return;n[a]=Eg(n,e,t,a);const s=Sg(n);s.length!==0&&(n[a]=Ag(s,n[a]))}function Ag(n,e){return function(){return e.apply(this,[...n,...arguments])}}function Eg(n,e,t,a){return function(s){return function(){const o=e.timestamp(),c=new Array(arguments.length),m=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Zn?Zn:this;for(var d=0;d<c.length;d++)c[d]=arguments[d];if(e.serialize&&!e.asObject&&Lt(c,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?s.call(m,bg(this,a,c,o)):s.apply(m,c),e.transmit){const y=e.transmit.level||n._level,h=t.levels.values[y],T=t.levels.values[a];if(T<h)return;Dg(this,{ts:o,methodLevel:a,methodValue:T,transmitLevel:y,transmitValue:t.levels.values[e.transmit.level||n._level],send:e.transmit.send,val:ht(n._level,t)},c)}}}(n[ts][a])}function bg(n,e,t,a){n._serialize&&Lt(t,n._serialize,n.serializers,n._stdErrSerialize);const s=t.slice();let r=s[0];const o={};a&&(o.time=a),o.level=n.levels.values[e];let c=(n._childLevel|0)+1;if(c<1&&(c=1),r!==null&&typeof r=="object"){for(;c--&&typeof s[0]=="object";)Object.assign(o,s.shift());r=s.length?sr(s.shift(),s):void 0}else typeof r=="string"&&(r=sr(s.shift(),s));return r!==void 0&&(o.msg=r),o}function Lt(n,e,t,a){for(const s in n)if(a&&n[s]instanceof Error)n[s]=He.stdSerializers.err(n[s]);else if(typeof n[s]=="object"&&!Array.isArray(n[s]))for(const r in n[s])e&&e.indexOf(r)>-1&&r in t&&(n[s][r]=t[r](n[s][r]))}function Dg(n,e,t){const a=e.send,s=e.ts,r=e.methodLevel,o=e.methodValue,c=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=s,n._logEvent.messages=t.filter(function(d){return m.indexOf(d)===-1}),n._logEvent.level.label=r,n._logEvent.level.value=o,a(r,n._logEvent,c),n._logEvent=Oa(m)}function Oa(n){return{ts:0,messages:[],bindings:n||[],level:{label:"",value:0}}}function ir(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 _g(n){return typeof n.timestamp=="function"?n.timestamp:n.timestamp===!1?Zi:Ki}function rt(){return{}}function Xt(n){return n}function Kn(){}function Zi(){return!1}function Ki(){return Date.now()}function vg(){return Math.round(Date.now()/1e3)}function wg(){return new Date(Date.now()).toISOString()}function jg(){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)||{}}}ns.exports.default=He;var Og=ns.exports.pino=He;const Lg=Og({level:"trace"}),Rg=(n,e)=>Lg.child({name:n},e);class xg{constructor(e){A(this,"notificationsList");A(this,"notifications");A(this,"store");A(this,"timeouts");A(this,"waitingQueue");A(this,"activeQueue");A(this,"options");A(this,"logger");A(this,"addToQueue",e=>{if(this.store.has(e.id)){this.logger.debug({notification:e},"skip existed notification: %o");return}const t=e.close,a=e.action;this.store.set(e.id,{...e,close:(...s)=>{t&&t(...s),this.closeNotification(e.id)},action:(...s)=>{a&&a(...s),this.closeNotification(e.id)}}),this.waitingQueue.add(e.id),this.logger.debug({notification:e},"notification added to waiting queue"),this.tickWaitingQueue()});A(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")});A(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 a=setTimeout(()=>{const s=e,r=new Map(this.notifications.getValue());r.set(t.id,t),this.notifications.setValue(r);const o=setTimeout(()=>{this.logger.debug({notificationId:s},"notification hidding by autoHideDuration"),this.closeNotification(s)},t.autoHideDuration||5e3);this.timeouts.set(s,o),this.logger.debug({notificationId:s,queue:[...r.values()]},"notification displayed")},t.delay||0);this.timeouts.set(e,a),this.logger.debug({notificationId:e},"active queue tick completed"),this.tickWaitingQueue()});A(this,"closeNotification",e=>{const t=new Map(this.notifications.getValue()),a=t.get(e);if(a){a.hiding=!0,this.notifications.setValue(t);const s=setTimeout(()=>{const r=new Map(this.notifications.getValue());r.delete(e),this.notifications.setValue(r);const o=this.timeouts.get(e);o!==void 0&&(clearTimeout(o),this.timeouts.delete(e)),this.logger.debug({notificationId:e},"notification hidden")},this.options.animationDelay||0);this.timeouts.set(e,s)}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=Rg("notifications"),this.store=new Map,this.timeouts=new Map,this.waitingQueue=new Set,this.activeQueue=new Set,this.notifications=new _e(ve(new Map),"notifications-queue"),this.notificationsList=pg(this.notifications.getStore(),t=>t?[...t.values()]:[])}}var vn=(n=>(n[n.ONBOARDING=1]="ONBOARDING",n[n.QUESTION=2]="QUESTION",n))(vn||{});let Cg=class{constructor(e={}){A(this,"queue");A(this,"add",e=>{localStorage.getItem(`opened:${e.id}`)||this.queue.addToQueue(e)});A(this,"close",e=>{this.queue.closeNotification(e)});A(this,"getQueueStore",()=>this.queue.notificationsList);A(this,"markAsViewed",e=>{localStorage.setItem(`opened:${e}`,e)});this.queue=new xg({concurrency:1,animationDelay:300,...e})}};const zg=(n,e,t)=>{n.notifications=new Cg,n.addNotification=n.notifications.add,n.sdk.getNotificationsStore=()=>n.notifications.getQueueStore(),t()};let Ug=()=>({events:{},emit(n,...e){let t=this.events[n]||[];for(let a=0,s=t.length;a<s;a++)t[a](...e)},on(n,e){var t;return(t=this.events[n])!=null&&t.push(e)||(this.events[n]=[e]),()=>{var a;this.events[n]=(a=this.events[n])==null?void 0:a.filter(s=>e!==s)}}});const Pg=({cache:n=new Map,fetcher:e,...t}={})=>{const a=Ug();let s=!0;mr("visibilitychange",()=>{s=!document.hidden,s&&a.emit(cr)}),mr("online",()=>a.emit(lr));const r=new Map,o=new Map,c=new Map;let m={};const d=async([j,R],x,z,U)=>{var B;if(!s)return;const C=oe=>{x.key===j&&(x.set(oe),a.emit(ea,j,oe,!0))},H=()=>{C({...x.value,...pr,promise:c.get(j)})},{dedupeTime:ne=4e3,fetcher:se}={...z,...m},ie=dr();if(c.has(j)){x.value.loading||H();return}if(!U){const oe=n.get(j);oe&&x.value.data!==oe&&C({data:oe,...rn});const Z=o.get(j);if(Z&&Z+ne>ie)return}const ue=be.startTask();try{const oe=se(...R);o.set(j,ie),c.set(j,oe),H();const Z=await oe;n.set(j,Z),C({data:Z,...rn}),o.set(j,dr())}catch(oe){(B=z.onError)==null||B.call(z,oe),C({data:x.value.data,error:oe,...rn})}finally{ue(),c.delete(j)}},y=(j,{fetcher:R=e,...x}={})=>{const z=be.map({...rn}),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=[];be.onStart(z,()=>{const Z=!B;[se,B]=Bg(j),ne=se.subscribe(Ie=>{if(Ie){const[K,N]=Ie;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:Me=0,refetchOnFocus:Ve,refetchOnReconnect:Ce}=U,Ne=()=>{C&&d([C,H],z,U)};Me>0&&r.set(j,setInterval(Ne,Me)),Ve&&ie.push(a.on(cr,Ne)),Ce&&ie.push(a.on(lr,Ne)),ie.push(a.on(ur,Ie=>{C&&na(C,Ie)&&d([C,H],z,U,!0)}),a.on(ea,(Ie,K,N)=>{C&&na(C,Ie)&&z.value!==K&&z.value.data!==K&&z.set(N?K:{data:K,...rn})}))});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},be.onStop(z,()=>{z.value={...rn},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),o.delete(j)},T=(j,R)=>{for(const x of n.keys())na(x,j)&&R(x)},M=j=>{T(j,h),a.emit(ur,j)},E=(j,R)=>{T(j,x=>{R===void 0?h(x):n.set(x,R)}),a.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,...pr});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=be.map({mutate:R,...rn});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 or(n){return typeof n=="string"||typeof n=="number"}const Bg=n=>{if(or(n))return[be.atom([""+n,[n]]),()=>{}];let e=be.atom(null),t=[];const a=()=>{t.some(r=>r==null)?e.set(null):e.set([t.join(""),t])},s=[];for(let r=0;r<n.length;r++){const o=n[r];if(or(o)){t.push(o);continue}s.push(o.subscribe(c=>{t[r]=c,a()}))}return a(),[e,()=>s.forEach(r=>r())]},cr=1,lr=2,ur=3,ea=4,mr=(n,e)=>{typeof window>"u"||addEventListener(n,e)},na=(n,e)=>Array.isArray(e)?e.includes(n):typeof e=="function"?e(n):n===e,dr=()=>new Date().getTime(),pr={loading:!0},rn={loading:!1};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));class Qg{constructor(e,t,a,s){A(this,"params");A(this,"stream");A(this,"method");A(this,"name");A(this,"headers");A(this,"listeners");A(this,"state");A(this,"store");A(this,"updateState",e=>{this.state.setValue("status",e),this.state.setValue("ts",new Date),this.addStateLog(`status => ${e}`)});A(this,"addStateLog",e=>{const t=this.state.getStore().get().log;this.state.setValue("log",[...t,`${new Date().toLocaleString()}: ${e}`])});A(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));A(this,"removeListener",e=>{this.listeners.delete(e),this.addStateLog(`listener '${e}' removed`)});A(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")});A(this,"disconnect",()=>{this.stream&&this.stream(),this.listeners.clear(),this.updateState("disconnected")});A(this,"reconnect",()=>{this.updateState("reconnecting"),this.connect()});A(this,"getStore",()=>{var e;return(e=this.store)==null?void 0:e.getStore()});A(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`)});A(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:${s.name}:state`),this.name=s.name,this.headers=e,this.listeners=new Map,this.params=a,this.method=t,s.withStore&&(this.store=new _e(ve(null),`subscription:${s.name}:store`)),"subscribe"in a&&typeof a.subscribe=="function"&&a.subscribe(()=>{this.reconnect()}),this.updateState("ready")}}class Fg{constructor(e){A(this,"toJsonOptions",{emitDefaultValues:!1,enumAsInteger:!0,useProtoFieldName:!1});A(this,"transport");A(this,"nanoquery");A(this,"host");A(this,"interceptors",[]);A(this,"$headers");A(this,"clients");A(this,"callbackClients");A(this,"subscriptions");A(this,"addSubscription",(e,t,a)=>{const s=this.subscriptions.get(t);if(s)return s;const r=new Qg(this.$headers,e,t,a);return this.subscriptions.set(t,r),r});A(this,"removeSubscription",e=>{e.disconnect(),this.subscriptions.delete(e.params)});A(this,"disconnect",()=>{for(const[e,t]of this.subscriptions)t.disconnect(),this.subscriptions.delete(e)});A(this,"registerInterceptor",e=>{this.interceptors.push(e)});A(this,"removeInterceptor",e=>{this.interceptors=this.interceptors.filter(t=>t!==e)});A(this,"getClient",e=>{const t=e.typeName;if(this.clients.has(t))return this.clients.get(t);const a=_t(e,this.transport);return this.clients.set(t,a),a});A(this,"getCallbackClient",e=>{const t=e.typeName;if(this.callbackClients.has(t))return this.callbackClients.get(t);const a=xl(e,this.transport);return this.callbackClients.set(t,a),a});A(this,"createPromiseClient",(e,{params:t=[],method:a})=>{const s=this.getClient(e),r=e.methods[a].name,o=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1),...Array.isArray(t)?t:[t]],c=[e.typeName,r.charAt(0).toLowerCase()+r.slice(1)];return{client:s,queryKey:o,queryKeyStr:c.join("")}});A(this,"createCallbackClient",e=>({client:this.getCallbackClient(e)}));A(this,"setSdkKey",e=>{this.$headers.setValue("sdk",e)});A(this,"setAuth",e=>{this.$headers.setValue("authorization",e)});A(this,"setHeader",(e,t)=>this.$headers.setValue(e,t));A(this,"getHeader",e=>this.$headers.getValue(e));A(this,"getHeaders",()=>this.$headers.getValues());A(this,"initInterceptors",()=>{if(this.interceptors.length!==0)return;const e=t=>a=>{const s=this.$headers.getValues();for(const r in s)a.header.set(r,s[r]);return t(a)};this.interceptors.push(e)});var r,o;this.host=e,this.$headers=new Vn($n({"sl-device-id":((o=(r=G.process)==null?void 0:r.env)==null?void 0:o.NX_DEVICE_ID)||"sdk-web-dev"}),"transport:headers"),this.initInterceptors(),this.clients=new Map,this.callbackClients=new Map,this.subscriptions=new Map;const[t,a,s]=Pg();this.nanoquery={createFetcherStore:t,createMutatorStore:a,utils:s},this.transport=vt({baseUrl:e,interceptors:this.interceptors,useBinaryFormat:!0})}}const Gg=l.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"}]),as=l.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"}]),ss=l.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=l.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),Ji=l.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),xt=l.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=l.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}]);l.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=l.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),Xi=l.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}]);l.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:l.getEnumType(as)},{no:14,name:"periods",kind:"message",T:Xi,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:l.getEnumType(ss)}]);const eo=l.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),Yg=l.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:Vg},{no:7,name:"weight",kind:"message",T:$g},{no:8,name:"birth",kind:"message",T:qg}]),Vg=l.makeMessageType("streamlayer.sports.PlayerAttributes.Height",()=>[{no:1,name:"centimeters",kind:"scalar",T:5},{no:2,name:"inches",kind:"scalar",T:5}],{localName:"PlayerAttributes_Height"}),$g=l.makeMessageType("streamlayer.sports.PlayerAttributes.Weight",()=>[{no:1,name:"kilograms",kind:"scalar",T:5},{no:2,name:"pounds",kind:"scalar",T:5}],{localName:"PlayerAttributes_Weight"}),qg=l.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:eo}],{localName:"PlayerAttributes_Birth"});l.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 Wg=l.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}]);l.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:eo},{no:13,name:"attributes",kind:"message",T:Yg},{no:15,name:"teams",kind:"message",T:Wg,repeated:!0}]);const tn=l.makeMessageType("streamlayer.sports.TeamRecord",()=>[{no:1,name:"wins",kind:"scalar",T:5},{no:2,name:"losses",kind:"scalar",T:5}]);l.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=l.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:l.getEnumType(Gg)}]),Hg=l.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}]),Zg=l.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:Hg}]);l.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:Zg,repeated:!0}]);l.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 Kg=l.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}]),Jg=l.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}]);l.makeMessageType("streamlayer.sports.EventTeamStatistics",()=>[{no:1,name:"football",kind:"message",T:Kg,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:Jg,oneof:"statistics"}]);const an=l.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}]),Xg=l.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}]),ef=l.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}]),nf=l.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:an},{no:6,name:"away",kind:"message",T:an},{no:7,name:"status",kind:"enum",T:l.getEnumType(as)},{no:8,name:"custom_fields",kind:"message",T:Xg},{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:ef,repeated:!0},{no:13,name:"endless",kind:"enum",T:l.getEnumType(ss)}]),yn=l.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:an},{no:8,name:"away_team",kind:"message",T:an},{no:9,name:"status",kind:"enum",T:l.getEnumType(as)},{no:10,name:"periods",kind:"message",T:Xi,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}]),it=l.makeMessageType("streamlayer.sports.QueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]),yr=l.makeMessageType("streamlayer.sports.ArrayQueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9,repeated:!0}]);l.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:yr,repeated:!0},{no:6,name:"includes",kind:"message",T:yr,repeated:!0},{no:7,name:"is",kind:"message",T:it,repeated:!0}]);const tf=l.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"}]),af=l.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"}]),gr=l.makeMessageType("streamlayer.sports.baseball.PitcherSummary",()=>[{no:1,name:"statistics",kind:"message",T:no},{no:2,name:"status",kind:"enum",T:l.getEnumType(tf)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),sf=l.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),rf=l.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:l.getEnumType(af)},{no:2,name:"player",kind:"message",T:sf}]),of=l.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}]),cf=l.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}]),no=l.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}]),fr=l.makeMessageType("streamlayer.sports.baseball.BaseballTeamSummary",()=>[{no:1,name:"hitting",kind:"message",T:of,repeated:!0},{no:2,name:"batting",kind:"message",T:cf,repeated:!0},{no:3,name:"pitching",kind:"message",T:no,repeated:!0}]),lf=l.makeMessageType("streamlayer.sports.baseball.BaseballSummary",()=>[{no:1,name:"home_pitcher",kind:"message",T:gr},{no:2,name:"away_pitcher",kind:"message",T:gr},{no:3,name:"home_statistics",kind:"message",T:fr},{no:4,name:"away_statistics",kind:"message",T:fr}]),uf=l.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:an},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:mf,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}]),mf=l.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"}),df=l.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:rf,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:tn},{no:9,name:"away_team_record",kind:"message",T:tn}]),pf=l.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:uf,repeated:!0}]),yf=l.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:lf}]),gf=l.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:ff},{no:11,name:"rank",kind:"message",T:Tf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),ff=l.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"}),Tf=l.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"}),hf=l.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:gf,repeated:!0}]),kf=l.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"}]),Mf=l.makeMessageType("streamlayer.sports.basketball.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:tn},{no:9,name:"away_team_record",kind:"message",T:tn}]),Tr=l.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}]),hr=l.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}]),Nf=l.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(kf)},{no:2,name:"home_player",kind:"message",T:hr},{no:3,name:"away_player",kind:"message",T:hr}]),If=l.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Tr},{no:2,name:"away_statistics",kind:"message",T:Tr}]),Sf=l.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:If},{no:2,name:"top_performers",kind:"message",T:Nf,repeated:!0},{no:3,name:"last_games",kind:"message",T:to}]),Af=l.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:an},{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}]),Ef=l.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Af,repeated:!0}]),kr=l.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}]),bf=l.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:kr,repeated:!0},{no:2,name:"away_players",kind:"message",T:kr,repeated:!0}]),Df=l.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:_f},{no:11,name:"rank",kind:"message",T:vf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),_f=l.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=l.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"}),wf=l.makeMessageType("streamlayer.sports.basketball.Standings",()=>[{no:1,name:"standings",kind:"message",T:Df,repeated:!0}]),Mr=l.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}]),Nr=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineup",()=>[{no:3,name:"start_players",kind:"message",T:Mr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Mr,repeated:!0}]),jf=l.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Nr},{no:2,name:"away_team",kind:"message",T:Nr}]),ta=l.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:Of}]),Of=l.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"}),to=l.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}]),Lf=l.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"}]),ao=l.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"}]),Rf=l.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:tn},{no:9,name:"away_team_record",kind:"message",T:tn}]),Ir=l.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}]),xf=l.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(Lf)},{no:2,name:"home_player",kind:"message",T:Ir,repeated:!0},{no:3,name:"away_player",kind:"message",T:Ir,repeated:!0}]),Sr=l.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}]),Cf=l.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Sr},{no:2,name:"away_statistics",kind:"message",T:Sr}]),zf=l.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Cf},{no:2,name:"top_performers",kind:"message",T:xf,repeated:!0}]),Uf=l.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:an},{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}]),Pf=l.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Uf,repeated:!0}]),aa=l.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:l.getEnumType(ao)}]),Ar=l.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:l.getEnumType(ao)}]),Er=l.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:aa,repeated:!0},{no:2,name:"goaltender",kind:"message",T:Ar},{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:Ar,repeated:!0}]),Bf=l.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Er},{no:2,name:"away_players",kind:"message",T:Er}]),Qf=l.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:Ff},{no:11,name:"rank",kind:"message",T:Gf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Ff=l.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"}),Gf=l.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"}),Yf=l.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:Qf,repeated:!0}]),Vf=l.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"}]),$f=l.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"}]),qf=l.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:tn},{no:9,name:"away_team_record",kind:"message",T:tn}]),rs=l.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}]),Wf=l.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:rs},{no:2,name:"attack_stats",kind:"message",T:aT}]),Hf=l.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:rs},{no:2,name:"midfield_stats",kind:"message",T:sT}]),Zf=l.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:rs},{no:2,name:"defense_stats",kind:"message",T:rT}]),Kf=l.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:l.getEnumType(Vf)},{no:2,name:"attack_performer",kind:"message",T:Wf},{no:3,name:"midfield_performer",kind:"message",T:Hf},{no:4,name:"defense_performer",kind:"message",T:Zf}]),Jf=l.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}]),Xf=l.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}]),eT=l.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}]),br=l.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:Jf},{no:2,name:"attacking_stats",kind:"message",T:Xf},{no:3,name:"defense_stats",kind:"message",T:eT}]),nT=l.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:br},{no:2,name:"away_statistics",kind:"message",T:br},{no:3,name:"perfomers",kind:"message",T:Kf}]),tT=l.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:nT},{no:2,name:"last_games",kind:"message",T:so}]),aT=l.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}]),sT=l.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}]),rT=l.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}]);l.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 iT=l.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}]),oT=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:iT,repeated:!0}]),Dr=l.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=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineup",()=>[{no:1,name:"formation_string",kind:"scalar",T:9},{no:2,name:"formation_matrix",kind:"message",T:oT,repeated:!0},{no:3,name:"start_players",kind:"message",T:Dr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Dr,repeated:!0}]),cT=l.makeMessageType("streamlayer.sports.soccer.SoccerMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:_r},{no:2,name:"away_team",kind:"message",T:_r}]);l.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 lT=l.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:an},{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:l.getEnumType($f)}]),uT=l.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:lT,repeated:!0}]),mT=l.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}]),dT=l.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:mT,repeated:!0}]),sa=l.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:pT}]),pT=l.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"}),so=l.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}]),gn=l.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"}]),yT=l.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:yn},{no:2,name:"baseball",kind:"message",T:df,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:Mf,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:Rf,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:qf,oneof:"sport"}]),gT=l.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:yT}]),fT=l.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:nf}]),ro=l.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:fT}]),TT=l.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:hT},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"sort",kind:"message",T:Ji},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),hT=l.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:l.getEnumType(ss)}],{localName:"ListRequest_Filter"}),kT=l.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:MT},{no:2,name:"pagination",kind:"message",T:Rt},{no:3,name:"sort",kind:"message",T:Ji}]),MT=l.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"}),NT=l.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:xt},{no:2,name:"data",kind:"message",T:ro,repeated:!0}]),IT=l.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:xt},{no:2,name:"data",kind:"message",T:ro,repeated:!0}]),vr=l.makeMessageType("streamlayer.sports.events.SummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),wr=l.makeMessageType("streamlayer.sports.events.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:ST}]),ST=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:AT}],{localName:"SummaryResponse_ResponseData"}),AT=l.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:yn},{no:2,name:"baseball",kind:"message",T:yf,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Sf,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:zf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:tT,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),ET=l.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),bT=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:DT}]),DT=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:_T}],{localName:"AdminSummaryResponse_ResponseData"}),_T=l.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:yn}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),vT=l.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}]),wT=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse",()=>[{no:1,name:"data",kind:"message",T:jT},{no:2,name:"meta",kind:"message",T:xt}]),jT=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:OT}],{localName:"PlayByPlayResponse_ResponseData"}),OT=l.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:yn},{no:2,name:"baseball",kind:"message",T:pf,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Ef,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:Pf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:uT,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),LT=l.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:RT},{no:2,name:"pagination",kind:"message",T:Rt}]),RT=l.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"}),xT=l.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:gT,repeated:!0},{no:2,name:"meta",kind:"message",T:xt}]),CT=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:zT}]),zT=l.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),UT=l.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),PT=l.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),BT=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:QT}]),QT=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:FT}],{localName:"BoxscoreResponse_ResponseData"}),FT=l.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:yn},{no:2,name:"basketball",kind:"message",T:bf,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Bf,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),GT=l.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),YT=l.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:VT}]),VT=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:2,name:"attributes",kind:"message",T:$T}],{localName:"StandingsResponse_ResponseData"}),$T=l.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData.StandingsResponseAttributes",()=>[{no:2,name:"basketball",kind:"message",T:wf,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Yf,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:hf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:dT,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),qT=l.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),WT=l.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:HT}]),HT=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:ZT}],{localName:"LineupResponse_ResponseData"}),ZT=l.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:yn},{no:2,name:"soccer",kind:"message",T:cT,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:jf,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),KT=l.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),JT=l.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:XT}]),XT=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:l.getEnumType(gn)},{no:3,name:"attributes",kind:"message",T:eh}],{localName:"LastGamesResponse_ResponseData"}),eh=l.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:yn},{no:2,name:"soccer",kind:"message",T:so,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:to,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),nh=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),th=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:ah}]),ah=l.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"}),sh={typeName:"streamlayer.sports.events.Events",methods:{list:{name:"List",I:TT,O:IT,kind:P.Unary},demoList:{name:"DemoList",I:kT,O:NT,kind:P.Unary},summary:{name:"Summary",I:vr,O:wr,kind:P.Unary},adminSummary:{name:"AdminSummary",I:ET,O:bT,kind:P.Unary},boxscore:{name:"Boxscore",I:PT,O:BT,kind:P.Unary},standings:{name:"Standings",I:GT,O:YT,kind:P.Unary},playByPlay:{name:"PlayByPlay",I:vT,O:wT,kind:P.Unary},schedule:{name:"Schedule",I:LT,O:xT,kind:P.Unary},scheduleDates:{name:"ScheduleDates",I:CT,O:UT,kind:P.Unary},lineup:{name:"Lineup",I:qT,O:WT,kind:P.Unary},retrieveEventId:{name:"RetrieveEventId",I:nh,O:th,kind:P.Unary},lastGames:{name:"LastGames",I:KT,O:JT,kind:P.Unary},summarySubscription:{name:"SummarySubscription",I:vr,O:wr,kind:P.ServerStreaming}}},rh=l.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"}]),ih=l.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"}]),oh=l.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"}]),ch=l.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"}]),lh=l.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"}]),uh=l.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"}]),mh=l.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"}]),dh=l.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"}]),io=l.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"}]),ph=l.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"}]),yh=l.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(io)}]),gh=l.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:l.getEnumType(io)}]),ra=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:yh},{no:2,name:"sound",kind:"message",T:gh}]),is=l.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:l.getEnumType(rh)},{no:2,name:"messages_notify",kind:"enum",T:l.getEnumType(ih)},{no:3,name:"friends_notify",kind:"enum",T:l.getEnumType(oh)},{no:4,name:"calls_sound",kind:"enum",T:l.getEnumType(lh)},{no:5,name:"messages_sound",kind:"enum",T:l.getEnumType(uh)},{no:6,name:"friends_sound",kind:"enum",T:l.getEnumType(mh)},{no:7,name:"twitter_notify",kind:"enum",T:l.getEnumType(ch)},{no:8,name:"twitter_sound",kind:"enum",T:l.getEnumType(dh)},{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}]),fh=l.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),Th=l.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:hh}]),hh=l.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:is}],{localName:"GetResponse_GetResponseData"}),kh=l.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:is}]),Mh=l.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:Nh}]),Nh=l.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:is}],{localName:"UpdateResponse_UpdateResponseData"}),Ih=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Sh=l.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:Ah}]),Ah=l.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:Vi}],{localName:"GetStreamResponse_GetResponseData"}),Eh=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),bh=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:Dh}]),Dh=l.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:$i}],{localName:"GetOrganizationResponse_GetResponseData"}),_h=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),vh=l.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:wh}]),wh=l.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:qi}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),jh=l.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:l.getEnumType(ph)}]),oo=l.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:jh},{no:5,name:"external_event_id",kind:"scalar",T:9}]),Oh=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:oo}]),Lh=l.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),Rh=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:xh}]),xh=l.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Lh}],{localName:"GenerateDeepLinkResponse_GenerateDeepLinkResponseData"});l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkRequest",()=>[{no:1,name:"url",kind:"scalar",T:9}]);l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:Ch}]);const Ch=l.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:oo}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),zh=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Uh=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),Ph=l.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Bh}]),Bh=l.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:Vi}],{localName:"StreamSubscriptionResponse_ResponseData"}),Qh=l.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Fh}]),Fh=l.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:$i}],{localName:"OrganizationSubscriptionResponse_ResponseData"}),zt={typeName:"streamlayer.sdkSettings.client.Client",methods:{get:{name:"Get",I:fh,O:Th,kind:P.Unary},update:{name:"Update",I:kh,O:Mh,kind:P.Unary},getStream:{name:"GetStream",I:Ih,O:Sh,kind:P.Unary},getOrganization:{name:"GetOrganization",I:Eh,O:bh,kind:P.Unary},getOrganizationAdvertising:{name:"GetOrganizationAdvertising",I:_h,O:vh,kind:P.Unary},generateDeepLink:{name:"GenerateDeepLink",I:Oh,O:Rh,kind:P.Unary},streamSubscription:{name:"StreamSubscription",I:zh,O:Ph,kind:P.ServerStreaming},organizationSubscription:{name:"OrganizationSubscription",I:Uh,O:Qh,kind:P.ServerStreaming}}},Gh=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(sh,{method:"retrieveEventId",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,o)=>{var c;if(!o||typeof o!="string")return"";try{return((c=(await t.retrieveEventId({id:o})).data)==null?void 0:c.id)||""}catch{return""}}})},Yh=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(zt,{method:"getStream",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,o)=>{var m;return o?(m=(await t.getStream({id:o})).data)==null?void 0:m.attributes:void 0}})},Vh=(n,e)=>{const{queryKey:t,client:a}=e.createPromiseClient(Jn,{method:"me",params:[n]});return e.nanoquery.createFetcherStore(t,{fetcher:()=>a.me({})})},$h=n=>{const{client:e,queryKeyStr:t}=n.createPromiseClient(Jn,{method:"bypassAuth"});return n.nanoquery.createMutatorStore(async({data:{userKey:a,schema:s,init:r},getCacheUpdater:o})=>{const[c]=o(t),m=await e.bypassAuth({userKey:a,schema:s,init:r});return c(m),m})},qh=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(zt,{method:"get",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{var r;return(r=(await t.get({})).data)==null?void 0:r.attributes}})},Wh=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(zt,{method:"getOrganization",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{const s=await t.getOrganization({});return s.data?{...s.data.attributes,id:s.data.id}:void 0}})},Hh=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(zt,{method:"getOrganizationAdvertising",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async()=>{var r;return(r=(await t.getOrganizationAdvertising({})).data)==null?void 0:r.attributes}})},Zh=(n,e,t)=>{n.transport=new Fg(e.host),n.sdk.host=n.transport.host,n.transport.setSdkKey(e.sdkKey),t()};var An=(n=>(n.DISABLED="disabled",n.INITIALIZATION="initialization",n.READY="ready",n.FAILED="failed",n.SUSPENDED="suspended",n))(An||{});const Kh=n=>{const e=new _e(ve(),"enabled"),t=new _e(ve("disabled"),"status"),a=new _e(ve(),"userKey"),s=new _e(ve(),"userToken");s.listen(T=>{T?localStorage.setItem("sl-user-token",T):localStorage.removeItem("sl-user-token")});const r=new _e(ve(),"providerStreamId"),o=new xe(Gh(r.getStore(),n),"slStreamId",T=>T==null?void 0:T.data),c=new xe(Vh(s.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 xe(qh(s.getStore(),n),"userSettings"),d=new xe(Yh(o.getAtomStore(),n),"streamSettings");o.getAtomStore().listen(T=>{(T===""||T===void 0)&&d.getStore().mutate(void 0)});const y=new xe(Wh(e.getStore(),n),"organizationSettings",T=>{var M;return(M=T==null?void 0:T.data)==null?void 0:M.id}),h=new xe(Hh(y.getAtomStore(),n),"organizationAdvertising");return{enabled:e,status:t,providerStreamId:r,slStreamId:o,streamSettings:d,user:c,userKey:a,userToken:s,userSettings:m,organizationSettings:y,organizationAdvertising:h}};class Jh extends Ot{constructor(t){const a=Kh(t),s=mg(a);super(s,"core");A(this,"stores");A(this,"subscribe",t=>{let a;for(a in this.stores){const s=t[a];a in t&&s!==void 0&&this.stores[a].subscribe(t[a])}});A(this,"unsubscribe",()=>this.getStore().off());this.stores=a}getValue(){throw new Error("Not implemented")}getValues(){return this.stores}setValue(){throw new Error("Not implemented")}}const Xh=(n,e,t)=>{n.store=new Jh(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()},Ye={typeName:"streamlayer.interactive.feed.Feed",methods:{get:{name:"Get",I:sp,O:rp,kind:P.Unary},subscription:{name:"Subscription",I:cd,O:ld,kind:P.ServerStreaming},votingSubscription:{name:"VotingSubscription",I:md,O:dd,kind:P.ServerStreaming},questionSubscription:{name:"QuestionSubscription",I:gd,O:fd,kind:P.ServerStreaming},questionByUser:{name:"QuestionByUser",I:kd,O:Md,kind:P.Unary},syncQuestion:{name:"SyncQuestion",I:Id,O:Ad,kind:P.Unary},getQuestion:{name:"GetQuestion",I:bd,O:Dd,kind:P.Unary},questionDetail:{name:"QuestionDetail",I:vd,O:wd,kind:P.Unary},submitAnswer:{name:"SubmitAnswer",I:Od,O:Rd,kind:P.Unary},submitInplay:{name:"SubmitInplay",I:Cd,O:Ud,kind:P.Unary},skipQuestion:{name:"SkipQuestion",I:Pd,O:Qd,kind:P.Unary},pickHistory:{name:"PickHistory",I:Gd,O:Vd,kind:P.Unary},insightHistory:{name:"InsightHistory",I:Wd,O:Zd,kind:P.Unary},tweetHistory:{name:"TweetHistory",I:Jd,O:ep,kind:P.Unary},promotionHistory:{name:"PromotionHistory",I:op,O:lp,kind:P.Unary}}},ek=l.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"}]),co=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:l.getEnumType(ek)},{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:co,repeated:!0},{no:6,name:"created_at",kind:"scalar",T:3}]),os=l.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}]),nk=l.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem",()=>[{no:1,name:"summary",kind:"message",T:os},{no:2,name:"percentage",kind:"message",T:tk}]),tk=l.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"}),ak=l.makeMessageType("streamlayer.interactive.leaderboard.ListRequest",()=>[{no:1,name:"pagination",kind:"message",T:Ka},{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}]),sk=l.makeMessageType("streamlayer.interactive.leaderboard.ListResponse",()=>[{no:1,name:"data",kind:"message",T:rk,repeated:!0},{no:2,name:"meta",kind:"message",T:ik}]),rk=l.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:os}],{localName:"ListResponse_ListResponseData"}),ik=l.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"}),ok=l.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}]),ck=l.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:lk}]),lk=l.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:nk}],{localName:"SummaryResponse_SummaryResponseData"}),uk=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9}]),mk=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse",()=>[{no:2,name:"data",kind:"message",T:dk}]),dk=l.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:co}],{localName:"EventLeaderboardsResponse_EventLeaderboardsResponseData"}),pk=l.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:Ka},{no:4,name:"sort",kind:"message",T:nd}]),yk=l.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse",()=>[{no:1,name:"data",kind:"message",T:gk,repeated:!0},{no:2,name:"meta",kind:"message",T:fk}]),gk=l.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:os}],{localName:"EventLeaderboardResponse_ListResponseData"}),fk=l.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"}),Tk={typeName:"streamlayer.interactive.leaderboard.Leaderboard",methods:{list:{name:"List",I:ak,O:sk,kind:P.Unary},summary:{name:"Summary",I:ok,O:ck,kind:P.Unary},eventLeaderboards:{name:"EventLeaderboards",I:uk,O:mk,kind:P.Unary},eventLeaderboard:{name:"EventLeaderboard",I:pk,O:yk,kind:P.Unary}}},hk=(n,e,t)=>{const{client:a,queryKey:s}=t.createPromiseClient(Tk,{method:"summary",params:[n,e]});return t.nanoquery.createFetcherStore(s,{fetcher:async(r,o,c,m)=>{var y;return(y=(await a.summary({eventId:c,userId:m})).data)==null?void 0:y.attributes}})},kk=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ye,{method:"syncQuestion",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,o)=>{var m;return o?(m=(await t.syncQuestion({filter:{eventId:o}})).data)==null?void 0:m.attributes:void 0}})},Mk=(n,e)=>{const{client:t}=e.createCallbackClient(Ye),a=be.atom({eventId:n.get()||"",feedId:""});return n.subscribe((r="")=>{a.set({eventId:r,feedId:""})}),e.addSubscription(t.subscription,a,{name:"feedSubscription"})},Nk=(n,e)=>{const{client:t}=e.createCallbackClient(Ye);return e.addSubscription(t.questionSubscription,{questionId:n},{name:"questionSubscription"})},Ik=async(n,e)=>{var s,r;const{client:t}=e.createPromiseClient(Ye,{method:"questionByUser",params:[n]});return(r=(s=(await t.questionByUser({questionId:n})).data)==null?void 0:s.attributes)==null?void 0:r.question},Sk=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ye,{method:"questionByUser",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,o)=>{var m,d;return(d=(m=(await t.questionByUser({questionId:o})).data)==null?void 0:m.attributes)==null?void 0:d.question}})},Ak=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ye,{method:"pickHistory",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,o)=>{var m;return o?(m=(await t.pickHistory({eventId:o})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},Ek=(n,e)=>{const{client:t,queryKey:a}=e.createPromiseClient(Ye,{method:"insightHistory",params:[n]});return e.nanoquery.createFetcherStore(a,{fetcher:async(s,r,o)=>{var m;return o?(m=(await t.insightHistory({eventId:o})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},bk=(n,e)=>{const{client:t}=n.createPromiseClient(Ye,{method:"submitAnswer"});return t.submitAnswer({data:e})},Dk=(n,e)=>{const{client:t}=n.createPromiseClient(Ye,{method:"submitInplay"});return t.submitInplay({data:{eventId:+e}})},_k=(n,e)=>{const{client:t}=n.createPromiseClient(Ye,{method:"skipQuestion"});return t.skipQuestion({data:{id:e}})};class lo extends Hi{constructor(t,a,s){super(t,a);A(this,"userSummary");A(this,"questions");A(this,"insights");A(this,"leaderboardId");A(this,"slStreamId");A(this,"userId");A(this,"organizationId");A(this,"openedQuestionId");A(this,"openedQuestion");A(this,"activeQuestionId");A(this,"moderationId");A(this,"feedId");A(this,"onbordingComplete");A(this,"notifications");A(this,"transport");A(this,"questionSubscription");A(this,"feedSubscription");A(this,"closeFeature");A(this,"openFeature");A(this,"showOnbordingInApp",t=>{var o,c,m,d;if(t)return;const{inplayGame:a}=this.featureSettings.get();if(!a)return;const{titleCard:s,overview:r}=a;this.notifications.add({type:vn.ONBOARDING,id:"_",action:this.openFeature,close:this.closeFeature,autoHideDuration:1e5,data:{header:s==null?void 0:s.header,title:s==null?void 0:s.title,subtitle:s==null?void 0:s.subtitle,graphicBg:(o=s==null?void 0:s.appearance)==null?void 0:o.graphic,icon:(c=s==null?void 0:s.media)==null?void 0:c.icon,sponsorLogo:(m=s==null?void 0:s.media)==null?void 0:m.sponsorLogo,primaryColor:(d=r==null?void 0:r.appearance)==null?void 0:d.primaryColor}})});A(this,"getCurrentSessionIdPrefix",t=>{const a=t.eventId||this.slStreamId.get(),s=t.userId||this.userId.get();return`${t.organizationId||this.organizationId.get()}:${s}:${a}:${t.prefix||""}`});A(this,"connect",t=>{var a;this.userSummary=new xe(hk(this.slStreamId,this.userId,t),"gamification:userSummary"),this.questions=new xe(Ak(this.slStreamId,t),"gamification:questions"),this.insights=new xe(Ek(this.slStreamId,t),"gamification:insights"),this.activeQuestionId=new xe(kk(this.slStreamId,t),"gamification:activeQuestionId"),this.openedQuestion=new xe(Sk(this.openedQuestionId,t),"gamification:activeQuestionId"),this.questionSubscription&&(this.questionSubscription.disconnect(),this.questionSubscription=void 0),this.openedQuestionId.listen(s=>{var r;s?(this.questionSubscription=Nk(s,t),this.questionSubscription.addListener("feed-subscription-opened-question",o=>{window.requestAnimationFrame(()=>{var c,m,d,y,h;(d=this.openedQuestion)==null||d.getStore().mutate((m=(c=o.data)==null?void 0:c.attributes)==null?void 0:m.question),(y=this.openedQuestion)==null||y.getStore().invalidate(),(h=this.userSummary)==null||h.getStore().invalidate()})}),this.questionSubscription.connect()):(console.log("cleanup on close question"),(r=this.openedQuestion)==null||r.getStore().mutate(void 0),this.questionSubscription!==void 0&&t.removeSubscription(this.questionSubscription))}),(a=this.activeQuestionId)==null||a.listen(s=>{var r,o;this.onbordingComplete.get()&&(o=(r=s==null?void 0:s.data)==null?void 0:r.notification)!=null&&o.title&&s.data.question.status===en.ACTIVE&&this.notifications.add({type:vn.QUESTION,action:()=>this.openQuestion(s.data.question.id),close:()=>this.closeQuestion(),autoHideDuration:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${s.data.question.id}`}),data:{title:s.data.notification.title,color:s.data.notification.indicatorColor,icon:s.data.notification.image,imageMode:s.data.notification.imageMode,imagePosition:s.data.notification.imagePosition}})}),this.feedSubscription&&(this.feedSubscription.disconnect(),this.feedSubscription=void 0),this.feedSubscription=Mk(this.slStreamId,t),this.feedSubscription.addListener("feed-subscription-active-question",s=>{window.requestAnimationFrame(()=>{var o,c;const r=(o=this.activeQuestionId)==null?void 0:o.getStore();r&&r.mutate((c=s.data)==null?void 0:c.attributes)})}),this.feedSubscription.addListener("feed-subscription-prediction-close",s=>{window.requestAnimationFrame(async()=>{var d,y;const r=(y=(d=s.data)==null?void 0:d.attributes)==null?void 0:y.question;if(!r)return;const{status:o,type:c,id:m}=r;if(o===en.RESOLVED&&c===Ae.PREDICTION){const h=await Ik(m,t),T=h==null?void 0:h.answers.find(({correct:M})=>M);this.notifications.add({type:vn.ONBOARDING,action:()=>this.openQuestion(m),close:()=>this.closeQuestion(),autoHideDuration:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${m}-prediction-close`}),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.feedSubscription.addListener("feed-subscription-questions-list",()=>{window.requestAnimationFrame(()=>{var s;(s=this.questions)==null||s.invalidate()})})});A(this,"disconnect",()=>{var t,a;(t=this.questionSubscription)==null||t.disconnect(),(a=this.feedSubscription)==null||a.disconnect()});A(this,"submitInplay",async()=>{const t=this.slStreamId.get();t&&(await Dk(this.transport,t),this.onbordingComplete.set(!0),localStorage.setItem(`sl-onbording:${this.userId.get()}:${t}`,"true"))});A(this,"submitAnswer",async(t,a)=>{var s;await bk(this.transport,{questionId:t,answerId:a}),(s=this.questions)==null||s.invalidate()});A(this,"skipQuestion",async t=>{var a;await _k(this.transport,t),(a=this.questions)==null||a.invalidate()});A(this,"openQuestion",t=>{this.openedQuestionId.set(t),this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${t}`}))});A(this,"closeQuestion",()=>{this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${this.openedQuestionId.get()}`})),window.requestAnimationFrame(()=>{this.openedQuestionId.set(void 0)})});if(this.leaderboardId=new _e(ve(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.slStreamId=s.stores.slStreamId.getAtomStore(),this.userId=s.stores.user.getAtomStore(),this.organizationId=s.stores.organizationSettings.getAtomStore(),this.moderationId=new _e(ve(),"moderationId").getStore(),this.feedId=new _e(ve(),"feedId").getStore(),this.onbordingComplete=new _e(ve(!1),"onbordingComplete").getStore(),this.openedQuestionId=new _e(ve(),"openedQuestionId").getStore(),this.notifications=s.notifications,this.transport=s.transport,this.closeFeature=s.sdk.closeFeature,this.openFeature=()=>s.sdk.openFeature(we.GAMES),!this.userId.get())this.userId.subscribe(r=>{r&&window.requestAnimationFrame(()=>{const c=!!localStorage.getItem(`sl-onbording:${r}:${this.slStreamId.get()}`);this.onbordingComplete.set(c),this.showOnbordingInApp(c)})});else{const r=this.userId.get(),c=!!localStorage.getItem(`sl-onbording:${r}:${this.slStreamId.get()}`);this.onbordingComplete.set(c),this.showOnbordingInApp(c)}this.status.subscribe(r=>{r===un.Ready?this.connect(s.transport):this.disconnect()}),this.onbordingComplete.subscribe(r=>{var o;r&&((o=this.activeQuestionId)==null||o.invalidate())})}}const vk={[we.GAMES]:!0,[we.HIGHLIGHTS]:!0};class wk extends lo{}class jk extends Hi{}const Ok=(n,e,t)=>n.type===we.GAMES?new lo(n,e,t):n.type===we.HIGHLIGHTS?new wk(n,e,t):new jk(n,e),Lk=(n,e,t)=>{n.features=new Map,n.activeFeature=new _e(ve(),"activeFeature"),n.sdk.getFeatures=()=>n.features,n.sdk.getFeature=a=>n.features.get(a),n.sdk.getActiveFeature=()=>n.activeFeature.getStore(),n.sdk.openFeature=a=>{n.activeFeature.setValue(a)},n.sdk.closeFeature=()=>{n.activeFeature.setValue(void 0)},n.initFeature=(a,s=Sn.ORGANIZATION)=>{const r=Ok(a,s,n);n.features.set(a.type,r)},n.updateFeature=(a,s)=>{var r;(r=n.features.get(a.type))==null||r.update(a,s)},n.destroyFeature=a=>{n.features.delete(a.type)},n.reinitializeFeatures=async()=>{const a=await n.stores.organizationSettings.getValue();n.features.clear();for(const s of(a==null?void 0:a.overlays)||[])n.initFeature(s,Sn.ORGANIZATION)},n.stores.providerStreamId.listen(a=>{a||n.reinitializeFeatures()}),n.storeSubscribe=()=>{const a=(r,o)=>{if(o!=null&&o.overlays){r===Sn.STREAM&&n.features.clear();for(const c of o.overlays)n.features.has(c.type)?n.updateFeature(c,r):n.initFeature(c,r)}},s={organizationSettings:r=>{if(r.data)try{a(Sn.ORGANIZATION,r.data)}catch(o){console.log(o)}},streamSettings:r=>{if(r.data)try{a(Sn.STREAM,r.data)}catch(o){console.log(o)}}};n.store.subscribe(s)},t()},Rk="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=";const xk=I("div")({name:"Container",class:"c1nck5pb",propsAsIs:!1}),Ck=I("div")({name:"BackgroundBlock",class:"b1kix5tm",propsAsIs:!1}),zk=I("img")({name:"Icon",class:"i1ey0b10",propsAsIs:!1}),Uk=I("div")({name:"ContentWrap",class:"cizx07o",propsAsIs:!1}),Pk=I("img")({name:"SponsorLogo",class:"s1pv3lf6",propsAsIs:!1}),Bk=I("span")({name:"SponsorText",class:"s18vymlp",propsAsIs:!1}),Qk=I("div")({name:"ContentTitle",class:"c17v2g7n",propsAsIs:!1}),Fk=I("div")({name:"ContentSubtitle",class:"c146qhfh",propsAsIs:!1}),Gk=I("button")({name:"ActionBtn",class:"aeuxca5",propsAsIs:!1}),Yk=I("button")({name:"CloseBtn",class:"c10v7vcj",propsAsIs:!1}),Vk=I("img")({name:"IconClose",class:"i2g9z26",propsAsIs:!1}),$k=({close:n,action:e,data:{icon:t,header:a,title:s,subtitle:r,graphicBg:o,sponsorLogo:c}})=>f.jsxs(xk,{children:[f.jsx(Yk,{onClick:n,children:f.jsx(Vk,{alt:"icon-close-onboarding-inapp",src:Rk})}),f.jsx(Ck,{style:{backgroundImage:`url(${o||""})`},children:t&&f.jsx(zk,{alt:"onboarding-inapp-icon",src:t})}),f.jsxs(Uk,{children:[f.jsxs("div",{children:[f.jsx("div",{children:c?f.jsxs(f.Fragment,{children:[f.jsx(Pk,{alt:"sponsor-logo",src:c}),f.jsx(Bk,{children:"Presents"})]}):a||""}),f.jsx(Qk,{children:s||""}),f.jsx(Fk,{children:r||""})]}),f.jsx(Gk,{onClick:e,children:"Play"})]})]});const qk=I("div")({name:"NotificationContainer",class:"n1bhrb8h",propsAsIs:!1}),Wk={[vn.ONBOARDING]:$k,[vn.QUESTION]:ri},Hk=({index:n,total:e,...t})=>{const a=Q.useRef(null),s=Wk[t.type]||ri;return Q.useEffect(()=>{a.current!==null&&t.hiding&&a.current.animate([{right:"0"},{right:"-100%"}],{duration:300,fill:"forwards"})},[t.hiding]),f.jsx(qk,{ref:a,style:{zIndex:n+1,transform:`translateY(${100*(e-n-1)}%)`},children:f.jsx(s,{...t})})};const Zk=I("div")({name:"NotificationsContainer",class:"ntlmi04",propsAsIs:!1}),Kk=({notificationsStore:n})=>{const e=De.useStore(n);return f.jsx(Zk,{children:e==null?void 0:e.map((t,a)=>f.jsx(Hk,{index:a,total:e.length,...t},t.id))})},Jk=({store:n})=>{var t;const{data:e}=De.useStore(n);return e!=null&&e.summary?f.jsx(Zy,{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..."})},Xk=({store:n,openQuestion:e})=>{const{data:t}=De.useStore(n);return t?f.jsx(Dy,{openQuestion:e,questions:t}):f.jsx("div",{children:"wait questions..."})},eM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDUuMzgzNDggMy4zMDI4MiA2LjE1NjkyQzIuNjI0OTMgNi4wMTg0NyAyLjA1ODgzIDUuNzQ4NzIgMS42MDQ1IDUuMzQ3NjhDMS4xNTAxNyA0Ljk0NjYzIDAuOTIzMDA4IDQuNTU5OTIgMC45MjMwMDggNC4xODc1MlYzLjUwMDAySDIuNzY5MTZaTTExLjA3NjggMy41MDAwMlY0LjE4NzUyQzExLjA3NjggNC41NTk5MiAxMC44NDk3IDQuOTQ2NjMgMTAuMzk1MyA1LjM0NzY4QzkuOTQxIDUuNzQ4NzIgOS4zNzQ5IDYuMDE4NDcgOC42OTcwMSA2LjE1NjkyQzkuMDUyNzggNS4zODM0OCA5LjIzMDY2IDQuNDk3ODYgOS4yMzA2NiAzLjUwMDAySDExLjA3NjhaTTEyIDQuMTg3NVYzLjI3MDgzQzEyIDMuMDc5ODYgMTEuOTMyNyAyLjkxNzU0IDExLjc5ODEgMi43ODM4NUMxMS42NjM1IDIuNjUwMTcgMTEuNSAyLjU4MzMzIDExLjMwNzcgMi41ODMzM0g5LjIzMDc3VjEuODk1ODNDOS4yMzA3NyAxLjU4MDczIDkuMTE3NzkgMS4zMTA5OCA4Ljg5MTgzIDEuMDg2NTlDOC42NjU4NiAwLjg2MjE5NSA4LjM5NDIzIDAuNzUgOC4wNzY5MiAwLjc1SDMuOTIzMDhDMy42MDU3NyAwLjc1IDMuMzM0MTQgMC44NjIxOTUgMy4xMDgxNyAxLjA4NjU5QzIuODgyMjEgMS4zMTA5OCAyLjc2OTIzIDEuNTgwNzMgMi43NjkyMyAxLjg5NTgzVjIuNTgzMzNIMC42OTIzMDhDMC40OTk5OTkgMi41ODMzMyAwLjMzNjUzOSAyLjY1MDE3IDAuMjAxOTIzIDIuNzgzODVDMC4wNjczMDcgMi45MTc1NCAwIDMuMDc5ODYgMCAzLjI3MDgzVjQuMTg3NUMwIDQuNTI2NDggMC4wOTk3NTg2IDQuODY3ODQgMC4yOTkyNzkgNS4yMTE1OUMwLjQ5ODc5OSA1LjU1NTM0IDAuNzY4MDI3IDUuODY1NjcgMS4xMDY5NyA2LjE0MjU4QzEuNDQ1OTIgNi40MTk0OSAxLjg2MTc4IDYuNjUyMjMgMi4zNTQ1NyA2Ljg0MDgyQzIuODQ3MzYgNy4wMjk0MSAzLjM2NTM4IDcuMTM1NjMgMy45MDg2NSA3LjE1OTUxQzQuMTEwNTggNy40MTczMiA0LjMzODk0IDcuNjQ0MSA0LjU5Mzc1IDcuODM5ODRDNC43NzY0NCA4LjAwMjE3IDQuOTAyNjQgOC4xNzUyNCA0Ljk3MjM2IDguMzU5MDVDNS4wNDIwNyA4LjU0Mjg2IDUuMDc2OTIgOC43NTY1MSA1LjA3NjkyIDlDNS4wNzY5MiA5LjI1NzgxIDUuMDAzNjEgOS40NzUwNCA0Ljg1Njk3IDkuNjUxNjlDNC43MTAzNCA5LjgyODM0IDQuNDc1OTYgOS45MTY2NyA0LjE1Mzg1IDkuOTE2NjdDMy43OTMyNyA5LjkxNjY3IDMuNDcyMzYgMTAuMDI1MyAzLjE5MTExIDEwLjI0MjVDMi45MDk4NSAxMC40NTk3IDIuNzY5MjMgMTAuNzMzMSAyLjc2OTIzIDExLjA2MjVWMTEuNTIwOEMyLjc2OTIzIDExLjU4NzcgMi43OTA4NyAxMS42NDI2IDIuODM0MTMgMTEuNjg1NUMyLjg3NzQgMTEuNzI4NSAyLjkzMjY5IDExLjc1IDMgMTEuNzVIOUM5LjA2NzMxIDExLjc1IDkuMTIyNiAxMS43Mjg1IDkuMTY1ODYgMTEuNjg1NUM5LjIwOTEzIDExLjY0MjYgOS4yMzA3NyAxMS41ODc3IDkuMjMwNzcgMTEuNTIwOFYxMS4wNjI1QzkuMjMwNzcgMTAuNzMzMSA5LjA5MDE1IDEwLjQ1OTcgOC44MDg4OSAxMC4yNDI1QzguNTI3NjQgMTAuMDI1MyA4LjIwNjczIDkuOTE2NjcgNy44NDYxNSA5LjkxNjY3QzcuNTI0MDQgOS45MTY2NyA3LjI4OTY2IDkuODI4MzQgNy4xNDMwMyA5LjY1MTY5QzYuOTk2MzkgOS40NzUwNCA2LjkyMzA4IDkuMjU3ODEgNi45MjMwOCA5QzYuOTIzMDggOC43NTY1MSA2Ljk1NzkzIDguNTQyODYgNy4wMjc2NCA4LjM1OTA1QzcuMDk3MzYgOC4xNzUyNCA3LjIyMzU2IDguMDAyMTcgNy40MDYyNSA3LjgzOTg0QzcuNjYxMDYgNy42NDQxIDcuODg5NDIgNy40MTczMiA4LjA5MTM1IDcuMTU5NTFDOC42MzQ2MiA3LjEzNTYzIDkuMTUyNjQgNy4wMjk0MSA5LjY0NTQzIDYuODQwODJDMTAuMTM4MiA2LjY1MjIzIDEwLjU1NDEgNi40MTk0OSAxMC44OTMgNi4xNDI1OEMxMS4yMzIgNS44NjU2NyAxMS41MDEyIDUuNTU1MzQgMTEuNzAwNyA1LjIxMTU5QzExLjkwMDIgNC44Njc4NCAxMiA0LjUyNjQ4IDEyIDQuMTg3NVpNNS4wNzAzMyA1LjM4NDkxTDYuMDM4MyA0Ljg3NTAzTDcuMDA2MjcgNS4zODQ5MUw2LjgyMTQgNC4zMDQ5N0w3LjYwNDUxIDMuNTQwMTZMNi41MjIyOCAzLjM4MjZMNi4wMzgzIDIuNDAwMDNMNS41NTQzMSAzLjM4MjZMNC40NzIwOSAzLjU0MDE2TDUuMjU1MTkgNC4zMDQ5N0w1LjA3MDMzIDUuMzg0OTFaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogIDwvc3ZnPgo=",nM="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDIyIDIyIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik01LjUgMi43ODg2N1YxMi40MTM3QzUuNSAxMy4xNzI5IDQuODg0MjYgMTMuNzUgNC4xMjUgMTMuNzVIMS4zNzVDMC42MTU3NDIgMTMuNzUgMCAxMy4xMzQzIDAgMTIuNDEzN1YyLjgyNzM0QzAgMi4wNjgwOCAwLjYxNTc0MiAxLjQ5MTAyIDEuMzc1IDEuNDkxMDJINC4xMjVDNC44ODU1NSAxLjQxMzY3IDUuNSAxLjk5Mzc1IDUuNSAyLjc4ODY3Wk0yMiAxMi4zNzA3QzIyIDEzLjUwOTQgMjEuMDc3IDE0LjQzMjMgMTkuOTM3NSAxNC40MzIzSDEzLjY0MjZDMTQuNjIxIDE2LjA2MTMgMTUuMTI1OSAxNy45MDc3IDE1LjEyNTkgMTguNTU4MkMxNS4xMjUgMTkuNTcxNCAxNC4zMzAxIDIwLjYyNSAxMi45OTggMjAuNjI1QzEwLjI4NTQgMjAuNjI1IDExLjg2NTQgMTcuMzUyOSA4LjM0ODgzIDE0LjU0MDZMNy42NDg0NCAxMy45ODJDNy4xNDE0MSAxMy41NzM4IDYuODgzNTkgMTIuOTc2NiA2Ljg3OTMgMTIuMzc1QzYuODc4MjkgMTIuMzc0IDYuODc5MyAxMi4zNzUgNi44NzkzIDEyLjM3NUw2Ljg3NSA1LjVDNi44NzUgNC44NTExNyA3LjE4MDY0IDQuMjM5NzMgNy43IDMuODUwNDNMOS4xNjY5NSAyLjc1MDg2QzEwLjM1NTUgMS44NTYyNSAxMS44MDM1IDEuMzc1IDEzLjI5MDIgMS4zNzVIMTUuODEyNUMxNi45NTIgMS4zNzUgMTcuODc1IDIuMjk3NTQgMTcuODc1IDMuNDM2NjRDMTcuODc1IDMuNTkyODMgMTcuODU0NCAzLjc0MzU3IDE3LjgyMTUgMy44ODk5NkMxOC42NDg0IDQuMTU5MzcgMTkuMjUgNC45MjQyMiAxOS4yNSA1Ljg0Mzc1QzE5LjI1IDYuMjM2ODMgMTkuMTM0MSA2LjYwMDQzIDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=";const tM=I("div")({name:"Container",class:"c1ibttgl",propsAsIs:!1}),aM=I("img")({name:"Logo",class:"l16el447",propsAsIs:!1}),sM=I("div")({name:"RightBlock",class:"rb3jndy",propsAsIs:!1}),rM=I("button")({name:"ExitBtn",class:"e162i9w9",propsAsIs:!1}),iM=I("img")({name:"ExitIcon",class:"e1uh0tpp",propsAsIs:!1}),oM=I("div")({name:"Interactive",class:"i13726cq",propsAsIs:!1}),cM=()=>n=>n.isSuccess?"#f1be1c":"#da3732",jr=I("div")({name:"ReactionIconWrap",class:"r1weckaj",propsAsIs:!1,vars:{"r1weckaj-0":[cM()]}}),Or=I("img")({name:"ReactionIcon",class:"r1u8ekkw",propsAsIs:!1});const lM=I("div")({name:"Container",class:"c1kt0nvm",propsAsIs:!1}),uM=I("div")({name:"Title",class:"tavk3hk",propsAsIs:!1}),mM=I("div")({name:"PointContainer",class:"p1vdx5su",propsAsIs:!1}),dM=I("span")({name:"Point",class:"p68apx3",propsAsIs:!1}),pM=I("span")({name:"PointLabel",class:"p157xd4a",propsAsIs:!1}),ia=({points:n})=>f.jsxs(lM,{children:[f.jsx(uM,{children:"YOU WON"}),f.jsxs(mM,{children:[f.jsx(dM,{children:n}),f.jsx(pM,{children:"PTS"})]})]}),yM=({logo:n,points:e,questionAnswered:t,questionAnsweredCorrectly:a,questionType:s,closeQuestion:r,setTimeToExpire:o})=>{const c=!t&&s!==Ae.PREDICTION,m=t&&s===Ae.TRIVIA,d=m&&a,y=m&&!a,h=t&&s===Ae.PREDICTION;return f.jsxs(tM,{children:[f.jsxs(sM,{children:[f.jsxs(oM,{children:[c&&f.jsx(ci,{setTimeToExpire:o}),d&&f.jsxs(f.Fragment,{children:[f.jsx(ia,{points:e}),f.jsx(jr,{isSuccess:!0,children:f.jsx(Or,{alt:"reaction-icon",src:eM})})]}),y&&f.jsxs(f.Fragment,{children:[f.jsx(ia,{points:0}),f.jsx(jr,{isSuccess:!1,children:f.jsx(Or,{alt:"reaction-icon",src:nM})})]}),h&&f.jsx(ia,{points:e})]}),f.jsx(rM,{onClick:r,children:f.jsx(iM,{alt:"exit-icon",src:Et})})]}),n&&f.jsx(aM,{src:n})]})},gM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAxMy44MzQ4TDY3Ljc2MzYgNy40NDE0Nkg2Mi4wNjA2TDU5LjM4OTcgMTAuNTYwMkw1Ni42MTU1IDcuNDQxNDZaTTYyLjI3MjEgNy45MTY1OUw1OS4zOTY0IDExLjI3NDdMNTYuNDA5MiA3LjkxNjU5SDUxLjc0NDZMNTYuOTMwNyAxMy44NjE1TDUxLjc0NDcgMTkuODA1NEg1Ni4yMjU3TDU5LjE1NzEgMTYuNDIxM0w2Mi4xMTU2IDE5LjgwNTRINjYuNzk4N0w2MS41NjYgMTMuODM1N0w2Ni43MjYxIDcuOTE2NTlINjIuMjcyMVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDQuMzYzNSA3LjQ0MTQ2VjQuNTY0MDZINTAuNzA2NlYwLjA1NTk5OThIMzkuNzAyVjIwLjI4MDVINTAuNzA2NlYxNS43NjAxSDQ0LjM2MzVWMTEuNzc5NEg1MC43MDY2VjcuNDQxNDZINDQuMzYzNVpNNTAuMjQwOCA3LjkxNjU5SDQzLjg5NzhWNC4wODg5M0g1MC4yNDA4VjAuNTMxMTMySDQwLjE2NzhWMTkuODA1NEg1MC4yNDA4VjE2LjIzNTJINDMuODk3OFYxMS4zMDQzSDUwLjI0MDhWNy45MTY1OVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0zNS4wNiAwLjA1NTk5OThWOC4zMzI4MUgzNS4wMDg3QzMzLjk4MDMgNy4xMjc4NyAzMi42OTY2IDYuNzA4ODEgMzEuMjA3IDYuNzA4ODFDMjguMTU1MiA2LjcwODgxIDI1Ljg1NjEgOC44MjYgMjUuMDQ5MyAxMS42MjM2QzI0LjEyOCA4LjU0MDkyIDIxLjc1NDQgNi42NTA4NCAxOC4yMzQ5IDYuNjUwODRDMTUuMzc2OSA2LjY1MDg0IDEzLjExOTcgNy45NTkzNiAxMS45NDIyIDEwLjA5MThWNy40NDE0Nkg2LjAzNDE2VjQuNTY0MDZIMTIuNDgxNVYwLjA1NTk5OThIMC43NjgwMDVWMjAuMjgwNUg2LjAzNDE2VjExLjc3OTRIMTEuMjgzNkMxMS4xMjcgMTIuNDAzNyAxMS4wNDMyIDEzLjA3MjcgMTEuMDQzMiAxMy43Nzg4QzExLjA0MzIgMTcuOTk3IDE0LjIwMzEgMjAuOTU4IDE4LjIzNDkgMjAuOTU4QzIxLjYyNTggMjAuOTU4IDIzLjg2MDcgMTkuMzM0IDI1LjA0MTkgMTYuMzc0SDIwLjUyODRDMTkuOTE4MyAxNy4yNjQ0IDE5LjQ1NTMgMTcuNTI3NiAxOC4yMzQ5IDE3LjUyNzZDMTYuODE5OSAxNy41Mjc2IDE1LjU5OTUgMTYuMjY4NSAxNS41OTk1IDE0Ljc3NTZIMjQuNzg5NEMyNS4xODgxIDE4LjEyNjIgMjcuNzQ3MiAyMS4wMTYgMzEuMjU4MiAyMS4wMTZDMzIuNzczIDIxLjAxNiAzNC4xNjAxIDIwLjI1NTggMzUuMDA3OCAxOC45NzI5SDM1LjA1OVYyMC4yODI0SDM5LjcwMUwzOS43MDIgMC4wNTU5OTk4SDM1LjA2Wk0xNS43NDY3IDExLjgzOTNDMTYuMDM5MiAxMC41NTQ1IDE3LjAxNjQgOS43MTU0NSAxOC4yMzU4IDkuNzE1NDVDMTkuNTc4MiA5LjcxNTQ1IDIwLjUwNTEgMTAuNTI4OSAyMC43NDkyIDExLjgzOTNDMjAuODUxNyAxMS44MzkzIDE1Ljc0NjcgMTEuODM5MyAxNS43NDY3IDExLjgzOTNaTTMyLjI0MiAxNy4yMDE2QzMwLjUzMDcgMTcuMjAxNiAyOS40NjY4IDE1LjU3NDggMjkuNDY2OCAxMy44NzY3QzI5LjQ2NjggMTIuMDYxNyAzMC4zOTE5IDEwLjMxNiAzMi4yNDIgMTAuMzE2QzM0LjE2MDEgMTAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const fM=I("div")({name:"QuestionContainer",class:"q15yq4tu",propsAsIs:!1}),TM=({store:n,closeQuestion:e,vote:t})=>{var d;const{data:a}=De.useStore(n),[s,r]=Q.useState(!1),o=Q.useCallback(y=>{r(y)},[r]),c=Q.useMemo(()=>a==null?void 0:a.answers.find(y=>y.youVoted===!0),[a]),m=Q.useMemo(()=>!!(a!=null&&a.answers.find(y=>y.correct===!0)),[a]);return a?f.jsx(fM,{children:f.jsxs("div",{children:[f.jsx(yM,{points:(c==null?void 0:c.points)||0,questionAnswered:!!c,questionAnsweredCorrectly:c==null?void 0:c.correct,logo:gM,closeQuestion:e,setTimeToExpire:o,questionType:a.type}),f.jsx("div",{children:f.jsx(lg,{title:a.subject,feedbackMessages:(d=a.options)==null?void 0:d.options.value,questionType:a.type,questionId:a.id,questionAnswered:!!c,questionAnsweredCorrectly:c==null?void 0:c.correct,options:a.answers.map(y=>({id:y.id,title:y.text,icon:y.icon,type:a.type,correct:y.correct,percentage:y.percentage,answered:y.youVoted,disabled:!!c||a.marketClosed||s,questionAnswered:!!c,hasCorrectAnswer:m,points:y.points,onVote:t}))})})]})}):null},hM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNNiAxMS45OTlDNiAxMi4xNzI1IDYuMDMxMzQgMTIuMzM0IDYuMDk0MDEgMTIuNDgzN0M2LjE1NjY5IDEyLjYzMzQgNi4yNTQyOCAxMi43NzU2IDYuMzg2OCAxMi45MTAzTDE0LjA0MzYgMjAuNjU2NUMxNC4yNjQ4IDIwLjg4NTUgMTQuNTMyMyAyMSAxNC44NDU5IDIxQzE1LjA2MDcgMjEgMTUuMjU0NCAyMC45NDc1IDE1LjQyNzEgMjAuODQyNkMxNS41OTk4IDIwLjczNzcgMTUuNzM4NCAyMC41OTY1IDE1Ljg0MzEgMjAuNDE5MUMxNS45NDc3IDIwLjI0MTYgMTYgMjAuMDQyNSAxNiAxOS44MjE3QzE2IDE5LjQ5ODkgMTUuODgxNiAxOS4yMTM0IDE1LjY0NDggMTguOTY1NEw4Ljc0MTgzIDExLjk5NzFMMTUuNjQ0OCA1LjAzMjcxQzE1Ljg4MTYgNC43ODcwOSAxNiA0LjUwMjMgMTYgNC4xNzgzNEMxNiAzLjk1NzQ5IDE1Ljk0NzcgMy43NTgzNSAxNS44NDMxIDMuNTgwOTFDMTUuNzM4NCAzLjQwMzQ3IDE1LjU5OTggMy4yNjIyOSAxNS40MjcxIDMuMTU3MzhDMTUuMjU0NCAzLjA1MjQ2IDE1LjA2MDcgMyAxNC44NDU5IDNDMTQuNTMyMyAzIDE0LjI2NDggMy4xMTE2OSAxNC4wNDM2IDMuMzM1MDhMNi4zODY4IDExLjA4NzhDNi4yNTU1MSAxMS4yMjI1IDYuMTU4NTMgMTEuMzY0NCA2LjA5NTg2IDExLjUxMzRDNi4wMzMxOCAxMS42NjI1IDYuMDAxMjMgMTEuODI0NCA2IDExLjk5OVoiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const kM=I("div")({name:"Container",class:"c1n31p0r",propsAsIs:!1}),Lr=I("button")({name:"Button",class:"bh1dfyy",propsAsIs:!1}),MM=I("img")({name:"HeaderIcon",class:"h1gjjnyi",propsAsIs:!1}),uo=({icon:n,comeBack:e,close:t})=>f.jsxs(kM,{children:[f.jsxs("div",{children:[e&&f.jsx(Lr,{onClick:e,children:f.jsx("img",{alt:"header-back-icon",src:hM})}),n&&f.jsx(MM,{alt:"header-icon",src:n})]}),f.jsx("div",{children:t&&f.jsx(Lr,{onClick:t,children:f.jsx("img",{alt:"header-close-icon",src:Et})})})]});const NM=I("div")({name:"Container",class:"cqrci8d",propsAsIs:!1}),IM=I("div")({name:"Content",class:"c1hep1a5",propsAsIs:!1}),SM=I("div")({name:"Graphic",class:"g1s87azu",propsAsIs:!1}),AM=I("img")({name:"InsightIconDefault",class:"i19cupvp",propsAsIs:!1}),EM=I("img")({name:"InsightIconCircle",class:"i7kr6s3",propsAsIs:!1}),bM=I("img")({name:"InsightIconAbsolute",class:"ikea8mb",propsAsIs:!1}),DM=I("div")({name:"Title",class:"tn29zk0",propsAsIs:!1}),_M=I("img")({name:"NextIcon",class:"ni1hvml",propsAsIs:!1}),vM=(n,e)=>{switch(n){case Xe.ROUNDED:return f.jsx(EM,{alt:"insight-icon",src:e});case Xe.TRANSPARENT:return f.jsx(bM,{alt:"insight-icon",src:e});case Xe.CENTERED:return f.jsx(AM,{alt:"insight-icon",src:e});default:return null}},wM=({title:n,image:e,questionId:t,imageMode:a,openQuestion:s})=>f.jsxs(NM,{onClick:()=>s==null?void 0:s(t),children:[f.jsx(SM,{children:e&&vM(a,e)}),f.jsxs(IM,{children:[f.jsx(DM,{children:n||""}),f.jsx(_M,{alt:"next-icon",src:va})]})]});const jM=I("div")({name:"Container",class:"c1ii4cav",propsAsIs:!1}),OM=I("div")({name:"ItemsContainer",class:"irn7lif",propsAsIs:!1}),LM=({insights:n,openQuestion:e,closeInsights:t})=>f.jsxs(jM,{children:[f.jsx(uo,{close:t}),f.jsx(OM,{children:n==null?void 0:n.map(a=>f.jsx(wM,{openQuestion:e,...a},a.questionId))})]}),RM=({store:n,openQuestion:e,closeInsights:t})=>{const{data:a}=De.useStore(n);return a?f.jsx(LM,{insights:a,openQuestion:e,closeInsights:t}):f.jsx("div",{children:"wait insights..."})},xM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=";const CM=I("div")({name:"Container",class:"c2g1lnc",propsAsIs:!1}),zM=I("img")({name:"Image",class:"i1czhbqi",propsAsIs:!1}),UM=I("div")({name:"AdditionalContent",class:"axpm0mb",propsAsIs:!1}),PM=I("div")({name:"Title",class:"t1kppby5",propsAsIs:!1}),BM=I("div")({name:"Description",class:"d18tbzq5",propsAsIs:!1}),QM=I("a")({name:"AdditionalBtn",class:"a6y6po9",propsAsIs:!1}),FM=I("img")({name:"LinkIcon",class:"lii8ybz",propsAsIs:!1}),GM=({image:n,title:e,description:t,webLinkLabel:a,webLink:s,closeQuestion:r,closeInsights:o})=>f.jsxs(CM,{children:[f.jsx(uo,{close:o,comeBack:r}),n&&f.jsx(zM,{alt:"detail-insight-image",src:n}),f.jsxs(UM,{children:[e&&f.jsx(PM,{children:e}),t&&f.jsx(BM,{children:t})]}),s&&a&&f.jsxs(QM,{href:s,target:"_blank",children:[a,f.jsx(FM,{alt:"link-icon",src:xM})]})]}),YM=({store:n,closeQuestion:e,closeInsights:t})=>{var s,r,o,c,m,d,y,h,T,M,E,D;const{data:a}=De.useStore(n);return!a||((r=(s=a.options)==null?void 0:s.options)==null?void 0:r.case)!=="factoid"?null:f.jsx(GM,{image:(c=(o=a.options)==null?void 0:o.options)==null?void 0:c.value.image,title:a.subject,description:(d=(m=a.options)==null?void 0:m.options)==null?void 0:d.value.body,webLink:(T=(h=(y=a.options)==null?void 0:y.options)==null?void 0:h.value.webLink)==null?void 0:T.url,webLinkLabel:(D=(E=(M=a.options)==null?void 0:M.options)==null?void 0:E.value.webLink)==null?void 0:D.label,closeQuestion:e,closeInsights:t})};const Mn=I("div")({name:"DemoContainer",class:"dp9wag8",propsAsIs:!1}),VM=I("div")({name:"UserStatisticsContainer",class:"u15x0q1l",propsAsIs:!1}),$M=I("div")({name:"QuestionsContainer",class:"q13pbrok",propsAsIs:!1}),oa=I("button")({name:"Button",class:"baw537u",propsAsIs:!1}),qM=({gamification:n,sdk:e})=>{var d,y,h,T,M,E,D,L,j,R,x,z,U,B,C,H,ne,se,ie,ue,oe,Z,me;const t=De.useStore(n.status),a=De.useStore(n.onbordingComplete),{slStreamId:s}=De.useStore(e.sdkStore),r=De.useStore(n.featureSettings);if(t!==un.Ready)return f.jsx("div",{children:"wait..."});if(s!=null&&s.loading)return f.jsx(Mn,{children:f.jsx("div",{children:"Event is loading"})});if(!(s!=null&&s.data))return f.jsx(Mn,{children:f.jsx("div",{children:"Event is forbidden"})});if(!a)return f.jsx(Mn,{children:f.jsx(Nm,{closeFeature:e.closeFeature,gamification:n,steps:(y=(d=r.inplayGame)==null?void 0:d.onboarding)==null?void 0:y.steps,gameIcon:(M=(T=(h=r.inplayGame)==null?void 0:h.overview)==null?void 0:T.media)==null?void 0:M.gameIcon,sponsorLogo:(L=(D=(E=r.inplayGame)==null?void 0:E.overview)==null?void 0:D.media)==null?void 0:L.sponsorLogo,rules:(R=(j=r.inplayGame)==null?void 0:j.rules)==null?void 0:R.rules,rulesBtnLabel:(z=(x=r.inplayGame)==null?void 0:x.rules)==null?void 0:z.buttonLabel,rulesTitle:(B=(U=r.inplayGame)==null?void 0:U.rules)==null?void 0:B.heading,primaryColor:(ne=(H=(C=r.inplayGame)==null?void 0:C.overview)==null?void 0:H.appearance)==null?void 0:ne.primaryColor,inviteCardTitle:(ie=(se=r.inplayGame)==null?void 0:se.inviteCard)==null?void 0:ie.heading,inviteCardSubtext:(oe=(ue=r.inplayGame)==null?void 0:ue.inviteCard)==null?void 0:oe.subtext,inviteCardBtnLabel:(me=(Z=r.inplayGame)==null?void 0:Z.inviteCard)==null?void 0:me.buttonLabel})});const o=Me=>{n.openQuestion(Me)},c=()=>{n.closeQuestion()},m=(Me,Ve)=>{n.submitAnswer(Me,Ve)};return n.insights?n.openedQuestion?f.jsx(Mn,{children:f.jsx(YM,{store:n.openedQuestion.getStore(),closeQuestion:c,closeInsights:()=>{}})}):f.jsx(Mn,{children:f.jsx(RM,{store:n.insights.getStore(),openQuestion:o,closeInsights:()=>{}})}):f.jsxs(Mn,{children:[f.jsx(VM,{children:n.userSummary&&f.jsx(Jk,{store:n.userSummary.getStore()})}),f.jsxs($M,{children:[n.questions&&f.jsx(Xk,{openQuestion:o,store:n.questions.getStore()}),n.openedQuestion&&f.jsx(TM,{closeQuestion:c,vote:m,store:n.openedQuestion.getStore()})]})]})},WM=({sdk:n})=>{const e=async t=>{try{await n.authorizationBypass("streamlayer:streamlayer",t)}catch(a){throw console.log("login err",a),a}};return f.jsx(Gu,{login:e,anonymousLogin:n.anonymousAuthorization,host:n.host})},HM=({activeFeature:n,sdk:e})=>{const[t,a]=Q.useState(null),{organizationSettings:s,streamSettings:r}=De.useStore(e.sdkStore),o=Q.useMemo(()=>{const c=(r==null?void 0:r.data)||(s==null?void 0:s.data);return c!=null&&c.overlays?c.overlays:[]},[s,r]);if(Q.useEffect(()=>{const c=e.getFeatures();if(n)for(const[m,d]of c)m===n?d.status.get()===un.Suspended&&(d.enable(),a(d)):d.status.get()===un.Ready&&d.disable();else{for(const[,m]of c)m.status.get()===un.Ready&&m.disable();a(null)}return()=>{for(const[,m]of c)m.status.get()===un.Ready&&m.disable()}},[n,e]),n===we.GAMES){const c=t;return c?f.jsxs("div",{children:[f.jsx(oa,{onClick:()=>e.closeFeature(),children:"close"}),f.jsx(qM,{gamification:c,sdk:e})]}):f.jsx("div",{children:"wait gamification..."})}return f.jsxs("div",{children:[f.jsx(oa,{onClick:()=>e.logout(),children:"logout"}),o.map(c=>f.jsxs(oa,{onClick:()=>e.openFeature(c.type),disabled:!(c.type in vk),children:[f.jsx("img",{src:c.icon,alt:""}),c.name]},c.name))]})},ZM=({sdk:n})=>{const e=De.useStore(n.organizationStore()),t=De.useStore(n.getUserStore()),a=De.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(Kk,{notificationsStore:n.getNotificationsStore()}),f.jsx(HM,{sdk:n,activeFeature:a})]}):f.jsx(WM,{sdk:n}):f.jsx("div",{children:"wrong sdk key..."})};const KM="t12mji3x",JM=({children:n})=>f.jsx("div",{className:KM,children:n});class XM extends ug{constructor(t,a){super();A(this,"$coreStore");A(this,"transport");A(this,"$bypassLogin");A(this,"me",async()=>{const t=await this.$coreStore.getValues().user.getValue();return t==null?void 0:t.data});A(this,"login",async(t,a)=>(this.$coreStore.getValues().userKey.setValue(a),await this.$bypassLogin.mutate({schema:t,userKey:a,init:!1}),this.me()));A(this,"isAuthenticated",()=>this.me());A(this,"logout",()=>{this.$coreStore.getValues().user.setValue(),this.$coreStore.getValues().userKey.setValue(),this.$coreStore.getValues().userToken.setValue(),this.transport.setAuth("")});A(this,"subscribe",()=>{this.$bypassLogin.subscribe((t,a)=>{var s,r,o,c;a==="data"&&(this.transport.setAuth((r=(s=t==null?void 0:t.data)==null?void 0:s.meta)==null?void 0:r.jwt),this.$coreStore.getValues().userToken.setValue((c=(o=t==null?void 0:t.data)==null?void 0:o.meta)==null?void 0:c.jwt))})});this.$coreStore=t,this.transport=a,this.$bypassLogin=$h(this.transport),this.subscribe()}}const eN=async(n,e,t)=>{n.auth=new XM(n.store,n.transport);const a=localStorage.getItem("sl-user-schema"),s=localStorage.getItem("sl-user-token");a&&s&&(console.log("try to login prev user"),await n.auth.login(a,s)),n.sdk.authorizationBypass=async(r,o)=>{await n.auth.login(r,o),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()},nN=(n,e,t)=>{n.sdk=Object.create(null),n.sdk.initializeApp=async()=>{n.storeSubscribe(),n.stores.enabled.setValue("on"),n.stores.status.setValue(An.INITIALIZATION);try{const a=await n.stores.organizationSettings.getValue();return a?(n.stores.status.setValue(An.READY),{enabled:!!a}):(n.stores.status.setValue(An.FAILED),{err:"failed"})}catch(a){return n.stores.enabled.setValue(),n.stores.status.setValue(An.FAILED),{err:`${a}`}}},n.sdk.disableApp=()=>{n.stores.enabled.setValue(),n.stores.status.setValue(An.DISABLED),n.storeUnsubscribe()},n.sdk.createEventSession=a=>{n.stores.providerStreamId.setValue(""),n.stores.providerStreamId.setValue(a)},t()};var cs={exports:{}},ls={exports:{}};function tN(n){var e=new n,t=e;function a(){var r=e;return r.next?e=r.next:(e=new n,t=e),r.next=null,r}function s(r){t.next=r,t=r}return{get:a,release:s}}var aN=tN,sN=aN;function mo(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 a=sN(rN),s=null,r=null,o=0,c=null,m={push:D,drain:Le,saturated:Le,pause:y,paused:!1,concurrency:t,running:d,resume:M,idle:E,length:h,getQueue:T,unshift:L,empty:Le,kill:R,killAndDrain:x,error:z};return m;function d(){return o}function y(){m.paused=!0}function h(){for(var U=s,B=0;U;)U=U.next,B++;return B}function T(){for(var U=s,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++)o++,j()}}function E(){return o===0&&m.length()===0}function D(U,B){var C=a.get();C.context=n,C.release=j,C.value=U,C.callback=B||Le,C.errorHandler=c,o===m.concurrency||m.paused?r?(r.next=C,r=C):(s=C,r=C,m.saturated()):(o++,e.call(n,C.value,C.worked))}function L(U,B){var C=a.get();C.context=n,C.release=j,C.value=U,C.callback=B||Le,o===m.concurrency||m.paused?s?(C.next=s,s=C):(s=C,r=C,m.saturated()):(o++,e.call(n,C.value,C.worked))}function j(U){U&&a.release(U);var B=s;B?m.paused?o--:(r===s&&(r=null),s=B.next,B.next=null,e.call(n,B.value,B.worked),r===null&&m.empty()):--o===0&&m.drain()}function R(){s=null,r=null,m.drain=Le}function x(){s=null,r=null,m.drain(),m.drain=Le}function z(U){c=U}}function Le(){}function rN(){this.value=null,this.callback=Le,this.next=null,this.release=Le,this.context=null,this.errorHandler=null;var n=this;this.worked=function(t,a){var s=n.callback,r=n.errorHandler,o=n.value;n.value=null,n.callback=Le,n.errorHandler&&r(t,o),s.call(n.context,t,a),n.release(n)}}function iN(n,e,t){typeof n=="function"&&(t=e,e=n,n=null);function a(y,h){e.call(this,y).then(function(T){h(null,T)},h)}var s=mo(n,a,t),r=s.push,o=s.unshift;return s.push=c,s.unshift=m,s.drained=d,s;function c(y){var h=new Promise(function(T,M){r(y,function(E,D){if(E){M(E);return}T(D)})});return h.catch(Le),h}function m(y){var h=new Promise(function(T,M){o(y,function(E,D){if(E){M(E);return}T(D)})});return h.catch(Le),h}function d(){if(s.idle())return new Promise(function(T){T()});var y=s.drain,h=new Promise(function(T){s.drain=function(){y(),T()}});return h}}ls.exports=mo;ls.exports.promise=iN;var po=ls.exports,us={exports:{}},wn=typeof Reflect=="object"?Reflect:null,Rr=wn&&typeof wn.apply=="function"?wn.apply:function(e,t,a){return Function.prototype.apply.call(e,t,a)},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 oN(n){console&&console.warn&&console.warn(n)}var yo=Number.isNaN||function(e){return e!==e};function te(){te.init.call(this)}us.exports=te;us.exports.once=mN;te.EventEmitter=te;te.prototype._events=void 0;te.prototype._eventsCount=0;te.prototype._maxListeners=void 0;var xr=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 xr},set:function(n){if(typeof n!="number"||n<0||yo(n))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+n+".");xr=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||yo(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 go(n){return n._maxListeners===void 0?te.defaultMaxListeners:n._maxListeners}te.prototype.getMaxListeners=function(){return go(this)};te.prototype.emit=function(e){for(var t=[],a=1;a<arguments.length;a++)t.push(arguments[a]);var s=e==="error",r=this._events;if(r!==void 0)s=s&&r.error===void 0;else if(!s)return!1;if(s){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var c=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw c.context=o,c}var m=r[e];if(m===void 0)return!1;if(typeof m=="function")Rr(m,this,t);else for(var d=m.length,y=Mo(m,d),a=0;a<d;++a)Rr(y[a],this,t);return!0};function fo(n,e,t,a){var s,r,o;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),o=r[e]),o===void 0)o=r[e]=t,++n._eventsCount;else if(typeof o=="function"?o=r[e]=a?[t,o]:[o,t]:a?o.unshift(t):o.push(t),s=go(n),s>0&&o.length>s&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=n,c.type=e,c.count=o.length,oN(c)}return n}te.prototype.addListener=function(e,t){return fo(this,e,t,!1)};te.prototype.on=te.prototype.addListener;te.prototype.prependListener=function(e,t){return fo(this,e,t,!0)};function cN(){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 To(n,e,t){var a={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},s=cN.bind(a);return s.listener=t,a.wrapFn=s,s}te.prototype.once=function(e,t){return Ut(t),this.on(e,To(this,e,t)),this};te.prototype.prependOnceListener=function(e,t){return Ut(t),this.prependListener(e,To(this,e,t)),this};te.prototype.removeListener=function(e,t){var a,s,r,o,c;if(Ut(t),s=this._events,s===void 0)return this;if(a=s[e],a===void 0)return this;if(a===t||a.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete s[e],s.removeListener&&this.emit("removeListener",e,a.listener||t));else if(typeof a!="function"){for(r=-1,o=a.length-1;o>=0;o--)if(a[o]===t||a[o].listener===t){c=a[o].listener,r=o;break}if(r<0)return this;r===0?a.shift():lN(a,r),a.length===1&&(s[e]=a[0]),s.removeListener!==void 0&&this.emit("removeListener",e,c||t)}return this};te.prototype.off=te.prototype.removeListener;te.prototype.removeAllListeners=function(e){var t,a,s;if(a=this._events,a===void 0)return this;if(a.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):a[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete a[e]),this;if(arguments.length===0){var r=Object.keys(a),o;for(s=0;s<r.length;++s)o=r[s],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=a[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(s=t.length-1;s>=0;s--)this.removeListener(e,t[s]);return this};function ho(n,e,t){var a=n._events;if(a===void 0)return[];var s=a[e];return s===void 0?[]:typeof s=="function"?t?[s.listener||s]:[s]:t?uN(s):Mo(s,s.length)}te.prototype.listeners=function(e){return ho(this,e,!0)};te.prototype.rawListeners=function(e){return ho(this,e,!1)};te.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):ko.call(n,e)};te.prototype.listenerCount=ko;function ko(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 Mo(n,e){for(var t=new Array(e),a=0;a<e;++a)t[a]=n[a];return t}function lN(n,e){for(;e+1<n.length;e++)n[e]=n[e+1];n.pop()}function uN(n){for(var e=new Array(n.length),t=0;t<e.length;++t)e[t]=n[t].listener||n[t];return e}function mN(n,e){return new Promise(function(t,a){function s(o){n.removeListener(e,r),a(o)}function r(){typeof n.removeListener=="function"&&n.removeListener("error",s),t([].slice.call(arguments))}No(n,e,r,{once:!0}),e!=="error"&&dN(n,s,{once:!0})})}function dN(n,e,t){typeof n.on=="function"&&No(n,"error",e,t)}function No(n,e,t,a){if(typeof n.on=="function")a.once?n.once(e,t):n.on(e,t);else if(typeof n.addEventListener=="function")n.addEventListener(e,function s(r){a.once&&n.removeEventListener(e,s),t(r)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof n)}var Io=us.exports,Pt={},So={},Ao=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),a=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var s=42;e[t]=s;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 o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==s||o.enumerable!==!0)return!1}return!0},pN=Ao,ms=function(){return pN()&&!!Symbol.toStringTag},Cr=typeof Symbol<"u"&&Symbol,yN=Ao,gN=function(){return typeof Cr!="function"||typeof Symbol!="function"||typeof Cr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:yN()},zr={foo:{}},fN=Object,TN=function(){return{__proto__:zr}.foo===zr.foo&&!({__proto__:null}instanceof fN)},hN="Function.prototype.bind called on incompatible ",kN=Object.prototype.toString,MN=Math.max,NN="[object Function]",Ur=function(e,t){for(var a=[],s=0;s<e.length;s+=1)a[s]=e[s];for(var r=0;r<t.length;r+=1)a[r+e.length]=t[r];return a},IN=function(e,t){for(var a=[],s=t||0,r=0;s<e.length;s+=1,r+=1)a[r]=e[s];return a},SN=function(n,e){for(var t="",a=0;a<n.length;a+=1)t+=n[a],a+1<n.length&&(t+=e);return t},AN=function(e){var t=this;if(typeof t!="function"||kN.apply(t)!==NN)throw new TypeError(hN+t);for(var a=IN(arguments,1),s,r=function(){if(this instanceof s){var y=t.apply(this,Ur(a,arguments));return Object(y)===y?y:this}return t.apply(e,Ur(a,arguments))},o=MN(0,t.length-a.length),c=[],m=0;m<o;m++)c[m]="$"+m;if(s=Function("binder","return function ("+SN(c,",")+"){ return binder.apply(this,arguments); }")(r),t.prototype){var d=function(){};d.prototype=t.prototype,s.prototype=new d,d.prototype=null}return s},EN=AN,Eo=Function.prototype.bind||EN,Pr={}.hasOwnProperty,ca=Function.prototype.call,bN=ca.bind?ca.bind(Pr):function(n,e){return ca.call(Pr,n,e)},q,Ln=SyntaxError,bo=Function,jn=TypeError,la=function(n){try{return bo('"use strict"; return ('+n+").constructor;")()}catch{}},mn=Object.getOwnPropertyDescriptor;if(mn)try{mn({},"")}catch{mn=null}var ua=function(){throw new jn},DN=mn?function(){try{return arguments.callee,ua}catch{try{return mn(arguments,"callee").get}catch{return ua}}}():ua,Nn=gN(),_N=TN(),ge=Object.getPrototypeOf||(_N?function(n){return n.__proto__}:null),En={},vN=typeof Uint8Array>"u"||!ge?q:ge(Uint8Array),dn={"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":Nn&&ge?ge([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":En,"%AsyncGenerator%":En,"%AsyncGeneratorFunction%":En,"%AsyncIteratorPrototype%":En,"%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%":bo,"%GeneratorFunction%":En,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Nn&&ge?ge(ge([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Nn||!ge?q:ge(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"||!Nn||!ge?q:ge(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Nn&&ge?ge(""[Symbol.iterator]()):q,"%Symbol%":Nn?Symbol:q,"%SyntaxError%":Ln,"%ThrowTypeError%":DN,"%TypedArray%":vN,"%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(ge)try{null.error}catch(n){var wN=ge(ge(n));dn["%Error.prototype%"]=wN}var jN=function n(e){var t;if(e==="%AsyncFunction%")t=la("async function () {}");else if(e==="%GeneratorFunction%")t=la("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=la("async function* () {}");else if(e==="%AsyncGenerator%"){var a=n("%AsyncGeneratorFunction%");a&&(t=a.prototype)}else if(e==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&ge&&(t=ge(s.prototype))}return dn[e]=t,t},Br={"%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=Eo,kt=bN,ON=et.call(Function.call,Array.prototype.concat),LN=et.call(Function.apply,Array.prototype.splice),Qr=et.call(Function.call,String.prototype.replace),Mt=et.call(Function.call,String.prototype.slice),RN=et.call(Function.call,RegExp.prototype.exec),xN=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,CN=/\\(\\)?/g,zN=function(e){var t=Mt(e,0,1),a=Mt(e,-1);if(t==="%"&&a!=="%")throw new Ln("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&t!=="%")throw new Ln("invalid intrinsic syntax, expected opening `%`");var s=[];return Qr(e,xN,function(r,o,c,m){s[s.length]=c?Qr(m,CN,"$1"):o||r}),s},UN=function(e,t){var a=e,s;if(kt(Br,a)&&(s=Br[a],a="%"+s[0]+"%"),kt(dn,a)){var r=dn[a];if(r===En&&(r=jN(a)),typeof r>"u"&&!t)throw new jn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:s,name:a,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(RN(/^%?[^%]*%?$/,e)===null)throw new Ln("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=zN(e),s=a.length>0?a[0]:"",r=UN("%"+s+"%",t),o=r.name,c=r.value,m=!1,d=r.alias;d&&(s=d[0],LN(a,ON([0,1],d)));for(var y=1,h=!0;y<a.length;y+=1){var T=a[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),s+="."+T,o="%"+s+"%",kt(dn,o))c=dn[o];else if(c!=null){if(!(T in c)){if(!t)throw new jn("base intrinsic for "+e+" exists, but the property is not available.");return}if(mn&&y+1>=a.length){var D=mn(c,T);h=!!D,h&&"get"in D&&!("originalValue"in D.get)?c=D.get:c=c[T]}else h=kt(c,T),c=c[T];h&&!m&&(dn[o]=c)}}return c},Do={exports:{}},PN=Cn,La=PN("%Object.defineProperty%",!0),Ra=function(){if(La)try{return La({},"a",{value:1}),!0}catch{return!1}return!1};Ra.hasArrayLengthDefineBug=function(){if(!Ra())return null;try{return La([],"length",{value:1}).length!==1}catch{return!0}};var _o=Ra,BN=Cn,dt=BN("%Object.getOwnPropertyDescriptor%",!0);if(dt)try{dt([],"length")}catch{dt=null}var ds=dt,QN=_o(),ps=Cn,qn=QN&&ps("%Object.defineProperty%",!0);if(qn)try{qn({},"a",{value:1})}catch{qn=!1}var FN=ps("%SyntaxError%"),In=ps("%TypeError%"),Fr=ds,GN=function(e,t,a){if(!e||typeof e!="object"&&typeof e!="function")throw new In("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new In("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new In("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new In("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new In("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new In("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,m=!!Fr&&Fr(e,t);if(qn)qn(e,t,{configurable:o===null&&m?m.configurable:!o,enumerable:s===null&&m?m.enumerable:!s,value:a,writable:r===null&&m?m.writable:!r});else if(c||!s&&!r&&!o)e[t]=a;else throw new FN("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},vo=Cn,Gr=GN,YN=_o(),Yr=ds,Vr=vo("%TypeError%"),VN=vo("%Math.floor%"),$N=function(e,t){if(typeof e!="function")throw new Vr("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||VN(t)!==t)throw new Vr("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],s=!0,r=!0;if("length"in e&&Yr){var o=Yr(e,"length");o&&!o.configurable&&(s=!1),o&&!o.writable&&(r=!1)}return(s||r||!a)&&(YN?Gr(e,"length",t,!0,!0):Gr(e,"length",t)),e};(function(n){var e=Eo,t=Cn,a=$N,s=t("%TypeError%"),r=t("%Function.prototype.apply%"),o=t("%Function.prototype.call%"),c=t("%Reflect.apply%",!0)||e.call(o,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 s("a function is required");var M=c(e,o,arguments);return a(M,1+d(0,T.length-(arguments.length-1)),!0)};var y=function(){return c(e,r,arguments)};m?m(n.exports,"apply",{value:y}):n.exports.apply=y})(Do);var wo=Do.exports,jo=Cn,Oo=wo,qN=Oo(jo("String.prototype.indexOf")),Lo=function(e,t){var a=jo(e,!!t);return typeof a=="function"&&qN(e,".prototype.")>-1?Oo(a):a},WN=ms(),HN=Lo,xa=HN("Object.prototype.toString"),Bt=function(e){return WN&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:xa(e)==="[object Arguments]"},Ro=function(e){return Bt(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&xa(e)!=="[object Array]"&&xa(e.callee)==="[object Function]"},ZN=function(){return Bt(arguments)}();Bt.isLegacyArguments=Ro;var KN=ZN?Bt:Ro,JN=Object.prototype.toString,XN=Function.prototype.toString,eI=/^\s*(?:function)?\*/,xo=ms(),ma=Object.getPrototypeOf,nI=function(){if(!xo)return!1;try{return Function("return function*() {}")()}catch{}},da,tI=function(e){if(typeof e!="function")return!1;if(eI.test(XN.call(e)))return!0;if(!xo){var t=JN.call(e);return t==="[object GeneratorFunction]"}if(!ma)return!1;if(typeof da>"u"){var a=nI();da=a?ma(a):!1}return ma(e)===da},Co=Function.prototype.toString,Dn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ca,pt;if(typeof Dn=="function"&&typeof Object.defineProperty=="function")try{Ca=Object.defineProperty({},"length",{get:function(){throw pt}}),pt={},Dn(function(){throw 42},null,Ca)}catch(n){n!==pt&&(Dn=null)}else Dn=null;var aI=/^\s*class\b/,za=function(e){try{var t=Co.call(e);return aI.test(t)}catch{return!1}},pa=function(e){try{return za(e)?!1:(Co.call(e),!0)}catch{return!1}},yt=Object.prototype.toString,sI="[object Object]",rI="[object Function]",iI="[object GeneratorFunction]",oI="[object HTMLAllCollection]",cI="[object HTML document.all class]",lI="[object HTMLCollection]",uI=typeof Symbol=="function"&&!!Symbol.toStringTag,mI=!(0 in[,]),Ua=function(){return!1};if(typeof document=="object"){var dI=document.all;yt.call(dI)===yt.call(document.all)&&(Ua=function(e){if((mI||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=yt.call(e);return(t===oI||t===cI||t===lI||t===sI)&&e("")==null}catch{}return!1})}var pI=Dn?function(e){if(Ua(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Dn(e,null,Ca)}catch(t){if(t!==pt)return!1}return!za(e)&&pa(e)}:function(e){if(Ua(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(uI)return pa(e);if(za(e))return!1;var t=yt.call(e);return t!==rI&&t!==iI&&!/^\[object HTML/.test(t)?!1:pa(e)},yI=pI,gI=Object.prototype.toString,zo=Object.prototype.hasOwnProperty,fI=function(e,t,a){for(var s=0,r=e.length;s<r;s++)zo.call(e,s)&&(a==null?t(e[s],s,e):t.call(a,e[s],s,e))},TI=function(e,t,a){for(var s=0,r=e.length;s<r;s++)a==null?t(e.charAt(s),s,e):t.call(a,e.charAt(s),s,e)},hI=function(e,t,a){for(var s in e)zo.call(e,s)&&(a==null?t(e[s],s,e):t.call(a,e[s],s,e))},kI=function(e,t,a){if(!yI(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=a),gI.call(e)==="[object Array]"?fI(e,t,s):typeof e=="string"?TI(e,t,s):hI(e,t,s)},MI=kI,ya=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],NI=typeof globalThis>"u"?ni:globalThis,II=function(){for(var e=[],t=0;t<ya.length;t++)typeof NI[ya[t]]=="function"&&(e[e.length]=ya[t]);return e},Nt=MI,SI=II,$r=wo,ys=Lo,gt=ds,AI=ys("Object.prototype.toString"),Uo=ms(),qr=typeof globalThis>"u"?ni:globalThis,Pa=SI(),gs=ys("String.prototype.slice"),ga=Object.getPrototypeOf,EI=ys("Array.prototype.indexOf",!0)||function(e,t){for(var a=0;a<e.length;a+=1)if(e[a]===t)return a;return-1},It={__proto__:null};Uo&&gt&&ga?Nt(Pa,function(n){var e=new qr[n];if(Symbol.toStringTag in e){var t=ga(e),a=gt(t,Symbol.toStringTag);if(!a){var s=ga(t);a=gt(s,Symbol.toStringTag)}It["$"+n]=$r(a.get)}}):Nt(Pa,function(n){var e=new qr[n],t=e.slice||e.set;t&&(It["$"+n]=$r(t))});var bI=function(e){var t=!1;return Nt(It,function(a,s){if(!t)try{"$"+a(e)===s&&(t=gs(s,1))}catch{}}),t},DI=function(e){var t=!1;return Nt(It,function(a,s){if(!t)try{a(e),t=gs(s,1)}catch{}}),t},Po=function(e){if(!e||typeof e!="object")return!1;if(!Uo){var t=gs(AI(e),8,-1);return EI(Pa,t)>-1?t:t!=="Object"?!1:DI(e)}return gt?bI(e):null},_I=Po,vI=function(e){return!!_I(e)};(function(n){var e=KN,t=tI,a=Po,s=vI;function r(w){return w.call.bind(w)}var o=typeof BigInt<"u",c=typeof Symbol<"u",m=r(Object.prototype.toString),d=r(Number.prototype.valueOf),y=r(String.prototype.valueOf),h=r(Boolean.prototype.valueOf);if(o)var T=r(BigInt.prototype.valueOf);if(c)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=s;function D(w){return typeof Promise<"u"&&w instanceof Promise||w!==null&&typeof w=="object"&&typeof w.then=="function"&&typeof w.catch=="function"}n.isPromise=D;function L(w){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(w):s(w)||_(w)}n.isArrayBufferView=L;function j(w){return a(w)==="Uint8Array"}n.isUint8Array=j;function R(w){return a(w)==="Uint8ClampedArray"}n.isUint8ClampedArray=R;function x(w){return a(w)==="Uint16Array"}n.isUint16Array=x;function z(w){return a(w)==="Uint32Array"}n.isUint32Array=z;function U(w){return a(w)==="Int8Array"}n.isInt8Array=U;function B(w){return a(w)==="Int16Array"}n.isInt16Array=B;function C(w){return a(w)==="Int32Array"}n.isInt32Array=C;function H(w){return a(w)==="Float32Array"}n.isFloat32Array=H;function ne(w){return a(w)==="Float64Array"}n.isFloat64Array=ne;function se(w){return a(w)==="BigInt64Array"}n.isBigInt64Array=se;function ie(w){return a(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 Me(w){return m(w)==="[object WeakMap]"}Me.working=typeof WeakMap<"u"&&Me(new WeakMap);function Ve(w){return typeof WeakMap>"u"?!1:Me.working?Me(w):w instanceof WeakMap}n.isWeakMap=Ve;function Ce(w){return m(w)==="[object WeakSet]"}Ce.working=typeof WeakSet<"u"&&Ce(new WeakSet);function Ne(w){return Ce(w)}n.isWeakSet=Ne;function Ie(w){return m(w)==="[object ArrayBuffer]"}Ie.working=typeof ArrayBuffer<"u"&&Ie(new ArrayBuffer);function K(w){return typeof ArrayBuffer>"u"?!1:Ie.working?Ie(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 _(w){return typeof DataView>"u"?!1:N.working?N(w):w instanceof DataView}n.isDataView=_;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 ke(w){return m(w)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=ke;function ze(w){return E(w,d)}n.isNumberObject=ze;function Re(w){return E(w,y)}n.isStringObject=Re;function je(w){return E(w,h)}n.isBooleanObject=je;function fn(w){return o&&E(w,T)}n.isBigIntObject=fn;function nt(w){return c&&E(w,M)}n.isSymbolObject=nt;function Un(w){return ze(w)||Re(w)||je(w)||fn(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")}})})})(So);var wI=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Ba={exports:{}};typeof Object.create=="function"?Ba.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ba.exports=function(e,t){if(t){e.super_=t;var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}};var jI=Ba.exports;(function(n){var e=Object.getOwnPropertyDescriptors||function(_){for(var O=Object.keys(_),F={},W=0;W<O.length;W++)F[O[W]]=Object.getOwnPropertyDescriptor(_,O[W]);return F},t=/%[sdj%]/g;n.format=function(N){if(!U(N)){for(var _=[],O=0;O<arguments.length;O++)_.push(o(arguments[O]));return _.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+=" "+o(Y);return J},n.deprecate=function(N,_){if(typeof G.process<"u"&&G.process.noDeprecation===!0)return N;if(typeof G.process>"u")return function(){return n.deprecate(N,_).apply(this,arguments)};var O=!1;function F(){if(!O){if(G.process.throwDeprecation)throw new Error(_);G.process.traceDeprecation?console.trace(_):console.error(_),O=!0}return N.apply(this,arguments)}return F};var a={},s=/^$/;if(G.process.env.NODE_DEBUG){var r=G.process.env.NODE_DEBUG;r=r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+r+"$","i")}n.debuglog=function(N){if(N=N.toUpperCase(),!a[N])if(s.test(N)){var _=G.process.pid;a[N]=function(){var O=n.format.apply(n,arguments);console.error("%s %d: %s",N,_,O)}}else a[N]=function(){};return a[N]};function o(N,_){var O={seen:[],stylize:m};return arguments.length>=3&&(O.depth=arguments[2]),arguments.length>=4&&(O.colors=arguments[3]),j(_)?O.showHidden=_:_&&n._extend(O,_),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=c),y(O,N,O.depth)}n.inspect=o,o.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]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(N,_){var O=o.styles[_];return O?"\x1B["+o.colors[O][0]+"m"+N+"\x1B["+o.colors[O][1]+"m":N}function m(N,_){return N}function d(N){var _={};return N.forEach(function(O,F){_[O]=!0}),_}function y(N,_,O){if(N.customInspect&&_&&ue(_.inspect)&&_.inspect!==n.inspect&&!(_.constructor&&_.constructor.prototype===_)){var F=_.inspect(O,N);return U(F)||(F=y(N,F,O)),F}var W=h(N,_);if(W)return W;var J=Object.keys(_),Y=d(J);if(N.showHidden&&(J=Object.getOwnPropertyNames(_)),ie(_)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return T(_);if(J.length===0){if(ue(_)){var $=_.name?": "+_.name:"";return N.stylize("[Function"+$+"]","special")}if(H(_))return N.stylize(RegExp.prototype.toString.call(_),"regexp");if(se(_))return N.stylize(Date.prototype.toString.call(_),"date");if(ie(_))return T(_)}var X="",ke=!1,ze=["{","}"];if(L(_)&&(ke=!0,ze=["[","]"]),ue(_)){var Re=_.name?": "+_.name:"";X=" [Function"+Re+"]"}if(H(_)&&(X=" "+RegExp.prototype.toString.call(_)),se(_)&&(X=" "+Date.prototype.toUTCString.call(_)),ie(_)&&(X=" "+T(_)),J.length===0&&(!ke||_.length==0))return ze[0]+X+ze[1];if(O<0)return H(_)?N.stylize(RegExp.prototype.toString.call(_),"regexp"):N.stylize("[Object]","special");N.seen.push(_);var je;return ke?je=M(N,_,O,Y,J):je=J.map(function(fn){return E(N,_,O,Y,fn,ke)}),N.seen.pop(),D(je,X,ze)}function h(N,_){if(C(_))return N.stylize("undefined","undefined");if(U(_)){var O="'"+JSON.stringify(_).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return N.stylize(O,"string")}if(z(_))return N.stylize(""+_,"number");if(j(_))return N.stylize(""+_,"boolean");if(R(_))return N.stylize("null","null")}function T(N){return"["+Error.prototype.toString.call(N)+"]"}function M(N,_,O,F,W){for(var J=[],Y=0,$=_.length;Y<$;++Y)Ce(_,String(Y))?J.push(E(N,_,O,F,String(Y),!0)):J.push("");return W.forEach(function(X){X.match(/^\d+$/)||J.push(E(N,_,O,F,X,!0))}),J}function E(N,_,O,F,W,J){var Y,$,X;if(X=Object.getOwnPropertyDescriptor(_,W)||{value:_[W]},X.get?X.set?$=N.stylize("[Getter/Setter]","special"):$=N.stylize("[Getter]","special"):X.set&&($=N.stylize("[Setter]","special")),Ce(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=Et,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),i={foo:function(){return 42}};return Object.setPrototypeOf(i,Uint8Array.prototype),Object.setPrototypeOf(p,i),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 o(p){if(p>a)throw new RangeError('The value "'+p+'" is invalid for option "size"');const i=new Uint8Array(p);return Object.setPrototypeOf(i,l.prototype),i}function l(p,i,u){if(typeof p=="number"){if(typeof i=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return T(p)}return m(p,i,u)}l.poolSize=8192;function m(p,i,u){if(typeof p=="string")return f(p,i);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(Ue(p,ArrayBuffer)||p&&Ue(p.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ue(p,SharedArrayBuffer)||p&&Ue(p.buffer,SharedArrayBuffer)))return w(p,i,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,i,u);const h=L(p);if(h)return h;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return l.from(p[Symbol.toPrimitive]("string"),i,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,i,u){return m(p,i,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,i,u){return d(p),p<=0?o(p):i!==void 0?typeof u=="string"?o(p).fill(i,u):o(p).fill(i):o(p)}l.alloc=function(p,i,u){return y(p,i,u)};function T(p){return d(p),o(p<0?0:O(p)|0)}l.allocUnsafe=function(p){return T(p)},l.allocUnsafeSlow=function(p){return T(p)};function f(p,i){if((typeof i!="string"||i==="")&&(i="utf8"),!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);const u=x(p,i)|0;let g=o(u);const h=g.write(p,i);return h!==u&&(g=g.slice(0,h)),g}function M(p){const i=p.length<0?0:O(p.length)|0,u=o(i);for(let g=0;g<i;g+=1)u[g]=p[g]&255;return u}function E(p){if(Ue(p,Uint8Array)){const i=new Uint8Array(p);return w(i.buffer,i.byteOffset,i.byteLength)}return M(p)}function w(p,i,u){if(i<0||p.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<i+(u||0))throw new RangeError('"length" is outside of buffer bounds');let g;return i===void 0&&u===void 0?g=new Uint8Array(p):u===void 0?g=new Uint8Array(p,i):g=new Uint8Array(p,i,u),Object.setPrototypeOf(g,l.prototype),g}function L(p){if(l.isBuffer(p)){const i=O(p.length)|0,u=o(i);return u.length===0||p.copy(u,0,0,i),u}if(p.length!==void 0)return typeof p.length!="number"||Qt(p.length)?o(0):M(p);if(p.type==="Buffer"&&Array.isArray(p.data))return M(p.data)}function O(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(i){return i!=null&&i._isBuffer===!0&&i!==l.prototype},l.compare=function(i,u){if(Ue(i,Uint8Array)&&(i=l.from(i,i.offset,i.byteLength)),Ue(u,Uint8Array)&&(u=l.from(u,u.offset,u.byteLength)),!l.isBuffer(i)||!l.isBuffer(u))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(i===u)return 0;let g=i.length,h=u.length;for(let I=0,b=Math.min(g,h);I<b;++I)if(i[I]!==u[I]){g=i[I],h=u[I];break}return g<h?-1:h<g?1:0},l.isEncoding=function(i){switch(String(i).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(i,u){if(!Array.isArray(i))throw new TypeError('"list" argument must be an Array of Buffers');if(i.length===0)return l.alloc(0);let g;if(u===void 0)for(u=0,g=0;g<i.length;++g)u+=i[g].length;const h=l.allocUnsafe(u);let I=0;for(g=0;g<i.length;++g){let b=i[g];if(Ue(b,Uint8Array))I+b.length>h.length?(l.isBuffer(b)||(b=l.from(b)),b.copy(h,I)):Uint8Array.prototype.set.call(h,b,I);else if(l.isBuffer(b))b.copy(h,I);else throw new TypeError('"list" argument must be an Array of Buffers');I+=b.length}return h};function x(p,i){if(l.isBuffer(p))return p.length;if(ArrayBuffer.isView(p)||Ue(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 h=!1;for(;;)switch(i){case"ascii":case"latin1":case"binary":return u;case"utf8":case"utf-8":return Cn(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u*2;case"hex":return u>>>1;case"base64":return nt(p).length;default:if(h)return g?-1:Cn(p).length;i=(""+i).toLowerCase(),h=!0}}l.byteLength=x;function z(p,i,u){let g=!1;if((i===void 0||i<0)&&(i=0),i>this.length||((u===void 0||u>this.length)&&(u=this.length),u<=0)||(u>>>=0,i>>>=0,u<=i))return"";for(p||(p="utf8");;)switch(p){case"hex":return Ne(this,i,u);case"utf8":case"utf-8":return Z(this,i,u);case"ascii":return Ve(this,i,u);case"latin1":case"binary":return Ce(this,i,u);case"base64":return oe(this,i,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ie(this,i,u);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}l.prototype._isBuffer=!0;function U(p,i,u){const g=p[i];p[i]=p[u],p[u]=g}l.prototype.swap16=function(){const i=this.length;if(i%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let u=0;u<i;u+=2)U(this,u,u+1);return this},l.prototype.swap32=function(){const i=this.length;if(i%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let u=0;u<i;u+=4)U(this,u,u+3),U(this,u+1,u+2);return this},l.prototype.swap64=function(){const i=this.length;if(i%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let u=0;u<i;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 i=this.length;return i===0?"":arguments.length===0?Z(this,0,i):z.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(i){if(!l.isBuffer(i))throw new TypeError("Argument must be a Buffer");return this===i?!0:l.compare(this,i)===0},l.prototype.inspect=function(){let i="";const u=n.INSPECT_MAX_BYTES;return i=this.toString("hex",0,u).replace(/(.{2})/g,"$1 ").trim(),this.length>u&&(i+=" ... "),"<Buffer "+i+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(i,u,g,h,I){if(Ue(i,Uint8Array)&&(i=l.from(i,i.offset,i.byteLength)),!l.isBuffer(i))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof i);if(u===void 0&&(u=0),g===void 0&&(g=i?i.length:0),h===void 0&&(h=0),I===void 0&&(I=this.length),u<0||g>i.length||h<0||I>this.length)throw new RangeError("out of range index");if(h>=I&&u>=g)return 0;if(h>=I)return-1;if(u>=g)return 1;if(u>>>=0,g>>>=0,h>>>=0,I>>>=0,this===i)return 0;let b=I-h,V=g-u;const ce=Math.min(b,V),re=this.slice(h,I),le=i.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,i,u,g,h){if(p.length===0)return-1;if(typeof u=="string"?(g=u,u=0):u>2147483647?u=2147483647:u<-2147483648&&(u=-2147483648),u=+u,Qt(u)&&(u=h?0:p.length-1),u<0&&(u=p.length+u),u>=p.length){if(h)return-1;u=p.length-1}else if(u<0)if(h)u=0;else return-1;if(typeof i=="string"&&(i=l.from(i,g)),l.isBuffer(i))return i.length===0?-1:C(p,i,u,g,h);if(typeof i=="number")return i=i&255,typeof Uint8Array.prototype.indexOf=="function"?h?Uint8Array.prototype.indexOf.call(p,i,u):Uint8Array.prototype.lastIndexOf.call(p,i,u):C(p,[i],u,g,h);throw new TypeError("val must be string, number or Buffer")}function C(p,i,u,g,h){let I=1,b=p.length,V=i.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||i.length<2)return-1;I=2,b/=2,V/=2,u/=2}function ce(le,ae){return I===1?le[ae]:le.readUInt16BE(ae*I)}let re;if(h){let le=-1;for(re=u;re<b;re++)if(ce(p,re)===ce(i,le===-1?0:re-le)){if(le===-1&&(le=re),re-le+1===V)return le*I}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(i,ae)){le=!1;break}if(le)return re}return-1}l.prototype.includes=function(i,u,g){return this.indexOf(i,u,g)!==-1},l.prototype.indexOf=function(i,u,g){return B(this,i,u,g,!0)},l.prototype.lastIndexOf=function(i,u,g){return B(this,i,u,g,!1)};function H(p,i,u,g){u=Number(u)||0;const h=p.length-u;g?(g=Number(g),g>h&&(g=h)):g=h;const I=i.length;g>I/2&&(g=I/2);let b;for(b=0;b<g;++b){const V=parseInt(i.substr(b*2,2),16);if(Qt(V))return b;p[u+b]=V}return b}function ne(p,i,u,g){return zn(Cn(i,p.length-u),p,u,g)}function se(p,i,u,g){return zn(Bt(i),p,u,g)}function ie(p,i,u,g){return zn(nt(i),p,u,g)}function ue(p,i,u,g){return zn(v(i,p.length-u),p,u,g)}l.prototype.write=function(i,u,g,h){if(u===void 0)h="utf8",g=this.length,u=0;else if(g===void 0&&typeof u=="string")h=u,g=this.length,u=0;else if(isFinite(u))u=u>>>0,isFinite(g)?(g=g>>>0,h===void 0&&(h="utf8")):(h=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const I=this.length-u;if((g===void 0||g>I)&&(g=I),i.length>0&&(g<0||u<0)||u>this.length)throw new RangeError("Attempt to write outside buffer bounds");h||(h="utf8");let b=!1;for(;;)switch(h){case"hex":return H(this,i,u,g);case"utf8":case"utf-8":return ne(this,i,u,g);case"ascii":case"latin1":case"binary":return se(this,i,u,g);case"base64":return ie(this,i,u,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,i,u,g);default:if(b)throw new TypeError("Unknown encoding: "+h);h=(""+h).toLowerCase(),b=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(p,i,u){return i===0&&u===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(i,u))}function Z(p,i,u){u=Math.min(p.length,u);const g=[];let h=i;for(;h<u;){const I=p[h];let b=null,V=I>239?4:I>223?3:I>191?2:1;if(h+V<=u){let ce,re,le,ae;switch(V){case 1:I<128&&(b=I);break;case 2:ce=p[h+1],(ce&192)===128&&(ae=(I&31)<<6|ce&63,ae>127&&(b=ae));break;case 3:ce=p[h+1],re=p[h+2],(ce&192)===128&&(re&192)===128&&(ae=(I&15)<<12|(ce&63)<<6|re&63,ae>2047&&(ae<55296||ae>57343)&&(b=ae));break;case 4:ce=p[h+1],re=p[h+2],le=p[h+3],(ce&192)===128&&(re&192)===128&&(le&192)===128&&(ae=(I&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),h+=V}return Me(g)}const me=4096;function Me(p){const i=p.length;if(i<=me)return String.fromCharCode.apply(String,p);let u="",g=0;for(;g<i;)u+=String.fromCharCode.apply(String,p.slice(g,g+=me));return u}function Ve(p,i,u){let g="";u=Math.min(p.length,u);for(let h=i;h<u;++h)g+=String.fromCharCode(p[h]&127);return g}function Ce(p,i,u){let g="";u=Math.min(p.length,u);for(let h=i;h<u;++h)g+=String.fromCharCode(p[h]);return g}function Ne(p,i,u){const g=p.length;(!i||i<0)&&(i=0),(!u||u<0||u>g)&&(u=g);let h="";for(let I=i;I<u;++I)h+=Go[p[I]];return h}function Ie(p,i,u){const g=p.slice(i,u);let h="";for(let I=0;I<g.length-1;I+=2)h+=String.fromCharCode(g[I]+g[I+1]*256);return h}l.prototype.slice=function(i,u){const g=this.length;i=~~i,u=u===void 0?g:~~u,i<0?(i+=g,i<0&&(i=0)):i>g&&(i=g),u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),u<i&&(u=i);const h=this.subarray(i,u);return Object.setPrototypeOf(h,l.prototype),h};function K(p,i,u){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+i>u)throw new RangeError("Trying to access beyond buffer length")}l.prototype.readUintLE=l.prototype.readUIntLE=function(i,u,g){i=i>>>0,u=u>>>0,g||K(i,u,this.length);let h=this[i],I=1,b=0;for(;++b<u&&(I*=256);)h+=this[i+b]*I;return h},l.prototype.readUintBE=l.prototype.readUIntBE=function(i,u,g){i=i>>>0,u=u>>>0,g||K(i,u,this.length);let h=this[i+--u],I=1;for(;u>0&&(I*=256);)h+=this[i+--u]*I;return h},l.prototype.readUint8=l.prototype.readUInt8=function(i,u){return i=i>>>0,u||K(i,1,this.length),this[i]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(i,u){return i=i>>>0,u||K(i,2,this.length),this[i]|this[i+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(i,u){return i=i>>>0,u||K(i,2,this.length),this[i]<<8|this[i+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(i,u){return i=i>>>0,u||K(i,4,this.length),(this[i]|this[i+1]<<8|this[i+2]<<16)+this[i+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(i,u){return i=i>>>0,u||K(i,4,this.length),this[i]*16777216+(this[i+1]<<16|this[i+2]<<8|this[i+3])},l.prototype.readBigUInt64LE=Ke(function(i){i=i>>>0,Re(i,"offset");const u=this[i],g=this[i+7];(u===void 0||g===void 0)&&ve(i,this.length-8);const h=u+this[++i]*2**8+this[++i]*2**16+this[++i]*2**24,I=this[++i]+this[++i]*2**8+this[++i]*2**16+g*2**24;return BigInt(h)+(BigInt(I)<<BigInt(32))}),l.prototype.readBigUInt64BE=Ke(function(i){i=i>>>0,Re(i,"offset");const u=this[i],g=this[i+7];(u===void 0||g===void 0)&&ve(i,this.length-8);const h=u*2**24+this[++i]*2**16+this[++i]*2**8+this[++i],I=this[++i]*2**24+this[++i]*2**16+this[++i]*2**8+g;return(BigInt(h)<<BigInt(32))+BigInt(I)}),l.prototype.readIntLE=function(i,u,g){i=i>>>0,u=u>>>0,g||K(i,u,this.length);let h=this[i],I=1,b=0;for(;++b<u&&(I*=256);)h+=this[i+b]*I;return I*=128,h>=I&&(h-=Math.pow(2,8*u)),h},l.prototype.readIntBE=function(i,u,g){i=i>>>0,u=u>>>0,g||K(i,u,this.length);let h=u,I=1,b=this[i+--h];for(;h>0&&(I*=256);)b+=this[i+--h]*I;return I*=128,b>=I&&(b-=Math.pow(2,8*u)),b},l.prototype.readInt8=function(i,u){return i=i>>>0,u||K(i,1,this.length),this[i]&128?(255-this[i]+1)*-1:this[i]},l.prototype.readInt16LE=function(i,u){i=i>>>0,u||K(i,2,this.length);const g=this[i]|this[i+1]<<8;return g&32768?g|4294901760:g},l.prototype.readInt16BE=function(i,u){i=i>>>0,u||K(i,2,this.length);const g=this[i+1]|this[i]<<8;return g&32768?g|4294901760:g},l.prototype.readInt32LE=function(i,u){return i=i>>>0,u||K(i,4,this.length),this[i]|this[i+1]<<8|this[i+2]<<16|this[i+3]<<24},l.prototype.readInt32BE=function(i,u){return i=i>>>0,u||K(i,4,this.length),this[i]<<24|this[i+1]<<16|this[i+2]<<8|this[i+3]},l.prototype.readBigInt64LE=Ke(function(i){i=i>>>0,Re(i,"offset");const u=this[i],g=this[i+7];(u===void 0||g===void 0)&&ve(i,this.length-8);const h=this[i+4]+this[i+5]*2**8+this[i+6]*2**16+(g<<24);return(BigInt(h)<<BigInt(32))+BigInt(u+this[++i]*2**8+this[++i]*2**16+this[++i]*2**24)}),l.prototype.readBigInt64BE=Ke(function(i){i=i>>>0,Re(i,"offset");const u=this[i],g=this[i+7];(u===void 0||g===void 0)&&ve(i,this.length-8);const h=(u<<24)+this[++i]*2**16+this[++i]*2**8+this[++i];return(BigInt(h)<<BigInt(32))+BigInt(this[++i]*2**24+this[++i]*2**16+this[++i]*2**8+g)}),l.prototype.readFloatLE=function(i,u){return i=i>>>0,u||K(i,4,this.length),t.read(this,i,!0,23,4)},l.prototype.readFloatBE=function(i,u){return i=i>>>0,u||K(i,4,this.length),t.read(this,i,!1,23,4)},l.prototype.readDoubleLE=function(i,u){return i=i>>>0,u||K(i,8,this.length),t.read(this,i,!0,52,8)},l.prototype.readDoubleBE=function(i,u){return i=i>>>0,u||K(i,8,this.length),t.read(this,i,!1,52,8)};function N(p,i,u,g,h,I){if(!l.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>h||i<I)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(i,u,g,h){if(i=+i,u=u>>>0,g=g>>>0,!h){const V=Math.pow(2,8*g)-1;N(this,i,u,g,V,0)}let I=1,b=0;for(this[u]=i&255;++b<g&&(I*=256);)this[u+b]=i/I&255;return u+g},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(i,u,g,h){if(i=+i,u=u>>>0,g=g>>>0,!h){const V=Math.pow(2,8*g)-1;N(this,i,u,g,V,0)}let I=g-1,b=1;for(this[u+I]=i&255;--I>=0&&(b*=256);)this[u+I]=i/b&255;return u+g},l.prototype.writeUint8=l.prototype.writeUInt8=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,1,255,0),this[u]=i&255,u+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,2,65535,0),this[u]=i&255,this[u+1]=i>>>8,u+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,2,65535,0),this[u]=i>>>8,this[u+1]=i&255,u+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,4,4294967295,0),this[u+3]=i>>>24,this[u+2]=i>>>16,this[u+1]=i>>>8,this[u]=i&255,u+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,4,4294967295,0),this[u]=i>>>24,this[u+1]=i>>>16,this[u+2]=i>>>8,this[u+3]=i&255,u+4};function D(p,i,u,g,h){ze(i,g,h,p,u,7);let I=Number(i&BigInt(4294967295));p[u++]=I,I=I>>8,p[u++]=I,I=I>>8,p[u++]=I,I=I>>8,p[u++]=I;let b=Number(i>>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 j(p,i,u,g,h){ze(i,g,h,p,u,7);let I=Number(i&BigInt(4294967295));p[u+7]=I,I=I>>8,p[u+6]=I,I=I>>8,p[u+5]=I,I=I>>8,p[u+4]=I;let b=Number(i>>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=Ke(function(i,u=0){return D(this,i,u,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Ke(function(i,u=0){return j(this,i,u,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(i,u,g,h){if(i=+i,u=u>>>0,!h){const ce=Math.pow(2,8*g-1);N(this,i,u,g,ce-1,-ce)}let I=0,b=1,V=0;for(this[u]=i&255;++I<g&&(b*=256);)i<0&&V===0&&this[u+I-1]!==0&&(V=1),this[u+I]=(i/b>>0)-V&255;return u+g},l.prototype.writeIntBE=function(i,u,g,h){if(i=+i,u=u>>>0,!h){const ce=Math.pow(2,8*g-1);N(this,i,u,g,ce-1,-ce)}let I=g-1,b=1,V=0;for(this[u+I]=i&255;--I>=0&&(b*=256);)i<0&&V===0&&this[u+I+1]!==0&&(V=1),this[u+I]=(i/b>>0)-V&255;return u+g},l.prototype.writeInt8=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,1,127,-128),i<0&&(i=255+i+1),this[u]=i&255,u+1},l.prototype.writeInt16LE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,2,32767,-32768),this[u]=i&255,this[u+1]=i>>>8,u+2},l.prototype.writeInt16BE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,2,32767,-32768),this[u]=i>>>8,this[u+1]=i&255,u+2},l.prototype.writeInt32LE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,4,2147483647,-2147483648),this[u]=i&255,this[u+1]=i>>>8,this[u+2]=i>>>16,this[u+3]=i>>>24,u+4},l.prototype.writeInt32BE=function(i,u,g){return i=+i,u=u>>>0,g||N(this,i,u,4,2147483647,-2147483648),i<0&&(i=4294967295+i+1),this[u]=i>>>24,this[u+1]=i>>>16,this[u+2]=i>>>8,this[u+3]=i&255,u+4},l.prototype.writeBigInt64LE=Ke(function(i,u=0){return D(this,i,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Ke(function(i,u=0){return j(this,i,u,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function F(p,i,u,g,h,I){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,i,u,g,h){return i=+i,u=u>>>0,h||F(p,i,u,4),t.write(p,i,u,g,23,4),u+4}l.prototype.writeFloatLE=function(i,u,g){return W(this,i,u,!0,g)},l.prototype.writeFloatBE=function(i,u,g){return W(this,i,u,!1,g)};function J(p,i,u,g,h){return i=+i,u=u>>>0,h||F(p,i,u,8),t.write(p,i,u,g,52,8),u+8}l.prototype.writeDoubleLE=function(i,u,g){return J(this,i,u,!0,g)},l.prototype.writeDoubleBE=function(i,u,g){return J(this,i,u,!1,g)},l.prototype.copy=function(i,u,g,h){if(!l.isBuffer(i))throw new TypeError("argument should be a Buffer");if(g||(g=0),!h&&h!==0&&(h=this.length),u>=i.length&&(u=i.length),u||(u=0),h>0&&h<g&&(h=g),h===g||i.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(h<0)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),i.length-u<h-g&&(h=i.length-u+g);const I=h-g;return this===i&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(u,g,h):Uint8Array.prototype.set.call(i,this.subarray(g,h),u),I},l.prototype.fill=function(i,u,g,h){if(typeof i=="string"){if(typeof u=="string"?(h=u,u=0,g=this.length):typeof g=="string"&&(h=g,g=this.length),h!==void 0&&typeof h!="string")throw new TypeError("encoding must be a string");if(typeof h=="string"&&!l.isEncoding(h))throw new TypeError("Unknown encoding: "+h);if(i.length===1){const b=i.charCodeAt(0);(h==="utf8"&&b<128||h==="latin1")&&(i=b)}}else typeof i=="number"?i=i&255:typeof i=="boolean"&&(i=Number(i));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,i||(i=0);let I;if(typeof i=="number")for(I=u;I<g;++I)this[I]=i;else{const b=l.isBuffer(i)?i:l.from(i,h),V=b.length;if(V===0)throw new TypeError('The value "'+i+'" is invalid for argument "value"');for(I=0;I<g-u;++I)this[I+u]=b[I%V]}return this};const Y={};function $(p,i,u){Y[p]=class extends u{constructor(){super(),Object.defineProperty(this,"message",{value:i.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(h){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:h,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,i){return`The "${p}" argument must be of type number. Received type ${typeof i}`},TypeError),$("ERR_OUT_OF_RANGE",function(p,i,u){let g=`The value of "${p}" is out of range.`,h=u;return Number.isInteger(u)&&Math.abs(u)>2**32?h=X(String(u)):typeof u=="bigint"&&(h=String(u),(u>BigInt(2)**BigInt(32)||u<-(BigInt(2)**BigInt(32)))&&(h=X(h)),h+="n"),g+=` It must be ${i}. Received ${h}`,g},RangeError);function X(p){let i="",u=p.length;const g=p[0]==="-"?1:0;for(;u>=g+4;u-=3)i=`_${p.slice(u-3,u)}${i}`;return`${p.slice(0,u)}${i}`}function he(p,i,u){Re(i,"offset"),(p[i]===void 0||p[i+u]===void 0)&&ve(i,p.length-(u+1))}function ze(p,i,u,g,h,I){if(p>u||p<i){const b=typeof i=="bigint"?"n":"";let V;throw I>3?i===0||i===BigInt(0)?V=`>= 0${b} and < 2${b} ** ${(I+1)*8}${b}`:V=`>= -(2${b} ** ${(I+1)*8-1}${b}) and < 2 ** ${(I+1)*8-1}${b}`:V=`>= ${i}${b} and <= ${u}${b}`,new Y.ERR_OUT_OF_RANGE("value",V,p)}he(g,h,I)}function Re(p,i){if(typeof p!="number")throw new Y.ERR_INVALID_ARG_TYPE(i,"number",p)}function ve(p,i,u){throw Math.floor(p)!==p?(Re(p,u),new Y.ERR_OUT_OF_RANGE(u||"offset","an integer",p)):i<0?new Y.ERR_BUFFER_OUT_OF_BOUNDS:new Y.ERR_OUT_OF_RANGE(u||"offset",`>= ${u?1:0} and <= ${i}`,p)}const gn=/[^+/0-9A-Za-z-_]/g;function et(p){if(p=p.split("=")[0],p=p.trim().replace(gn,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function Cn(p,i){i=i||1/0;let u;const g=p.length;let h=null;const I=[];for(let b=0;b<g;++b){if(u=p.charCodeAt(b),u>55295&&u<57344){if(!h){if(u>56319){(i-=3)>-1&&I.push(239,191,189);continue}else if(b+1===g){(i-=3)>-1&&I.push(239,191,189);continue}h=u;continue}if(u<56320){(i-=3)>-1&&I.push(239,191,189),h=u;continue}u=(h-55296<<10|u-56320)+65536}else h&&(i-=3)>-1&&I.push(239,191,189);if(h=null,u<128){if((i-=1)<0)break;I.push(u)}else if(u<2048){if((i-=2)<0)break;I.push(u>>6|192,u&63|128)}else if(u<65536){if((i-=3)<0)break;I.push(u>>12|224,u>>6&63|128,u&63|128)}else if(u<1114112){if((i-=4)<0)break;I.push(u>>18|240,u>>12&63|128,u>>6&63|128,u&63|128)}else throw new Error("Invalid code point")}return I}function Bt(p){const i=[];for(let u=0;u<p.length;++u)i.push(p.charCodeAt(u)&255);return i}function v(p,i){let u,g,h;const I=[];for(let b=0;b<p.length&&!((i-=2)<0);++b)u=p.charCodeAt(b),g=u>>8,h=u%256,I.push(h),I.push(g);return I}function nt(p){return e.toByteArray(et(p))}function zn(p,i,u,g){let h;for(h=0;h<g&&!(h+u>=i.length||h>=p.length);++h)i[h+u]=p[h];return h}function Ue(p,i){return p instanceof i||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===i.name}function Qt(p){return p!==p}const Go=function(){const p="0123456789abcdef",i=new Array(256);for(let u=0;u<16;++u){const g=u*16;for(let h=0;h<16;++h)i[g+h]=p[u]+p[h]}return i}();function Ke(p){return typeof BigInt>"u"?Yo:p}function Yo(){throw new Error("BigInt not supported")}})(gi);var Ti={exports:{}},pe=Ti.exports={},Pe,Be;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"?Pe=setTimeout:Pe=Sa}catch{Pe=Sa}try{typeof clearTimeout=="function"?Be=clearTimeout:Be=Aa}catch{Be=Aa}})();function ki(n){if(Pe===setTimeout)return setTimeout(n,0);if((Pe===Sa||!Pe)&&setTimeout)return Pe=setTimeout,setTimeout(n,0);try{return Pe(n,0)}catch{try{return Pe.call(null,n,0)}catch{return Pe.call(this,n,0)}}}function Jc(n){if(Be===clearTimeout)return clearTimeout(n);if((Be===Aa||!Be)&&clearTimeout)return Be=clearTimeout,clearTimeout(n);try{return Be(n)}catch{try{return Be.call(null,n)}catch{return Be.call(this,n)}}}var qe=[],bn=!1,on,lt=-1;function Xc(){!bn||!on||(bn=!1,on.length?qe=on.concat(qe):lt=-1,qe.length&&hi())}function hi(){if(!bn){var n=ki(Xc);bn=!0;for(var e=qe.length;e;){for(on=qe,qe=[];++lt<e;)on&&on[lt].run();lt=-1,e=qe.length}on=null,bn=!1,Jc(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 Mi(n,e)),qe.length===1&&!bn&&ki(hi)};function Mi(n,e){this.fun=n,this.array=e}Mi.prototype.run=function(){this.fun.apply(null,this.array)};pe.title="browser";pe.browser=!0;pe.env={};pe.argv=[];pe.version="";pe.versions={};function Ze(){}pe.on=Ze;pe.addListener=Ze;pe.once=Ze;pe.off=Ze;pe.removeListener=Ze;pe.removeAllListeners=Ze;pe.emit=Ze;pe.prependListener=Ze;pe.prependOnceListener=Ze;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 el=Ti.exports;(function(n){Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});const e=gi,t=el,s=o=>o&&o.__esModule?o:{default:o},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 nl(){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"),o=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<o)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=>Ee(/^-?[0-9]+$/.test(a),`int64 invalid: ${a}`),s=a=>Ee(/^[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),Is(a)},uEnc(a){return typeof a!="string"&&(a=a.toString()),s(a),Is(a)},dec(a,r){return Qc(a,r)},uDec(a,r){return pi(a,r)}}}const Te=nl();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 tl{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),As(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){ci(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,As(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),s=new DataView(t.buffer),a=Te.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=Te.uEnc(e);return s.setInt32(0,a.lo,!0),s.setInt32(4,a.hi,!0),this.raw(t)}int64(e){let t=Te.enc(e);return Vt(t.lo,t.hi,this.buf),this}sint64(e){let t=Te.enc(e),s=t.hi>>31,a=t.lo<<1^s,r=(t.hi<<1|t.lo>>>31)^s;return Vt(a,r,this.buf),this}uint64(e){let t=Te.uEnc(e);return Vt(t.lo,t.hi,this.buf),this}}class al{constructor(e,t){this.varint64=Bc,this.uint32=Gc,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 Te.dec(...this.varint64())}uint64(){return Te.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),s=-(e&1);return e=(e>>>1|(t&1)<<31)^s,t=t>>>1^s,Te.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 Te.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Te.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 Ge||!n.fieldWrapper?e:n.fieldWrapper.wrapField(e)}_.DOUBLE,_.FLOAT,_.INT64,_.UINT64,_.INT32,_.UINT32,_.BOOL,_.STRING,_.BYTES;function Je(n,e,t){if(e===t)return!0;if(n==_.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 _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return e==t}return!1}function ba(n,e){switch(n){case _.BOOL:return!1;case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return e==0?Te.zero:"0";case _.DOUBLE:case _.FLOAT:return 0;case _.BYTES:return new Uint8Array(0);case _.STRING:return"";default:return 0}}function Ni(n,e){const t=e===void 0;let s=de.Varint,a=e===0;switch(n){case _.STRING:a=t||!e.length,s=de.LengthDelimited;break;case _.BOOL:a=e===!1;break;case _.DOUBLE:s=de.Bit64;break;case _.FLOAT:s=de.Bit32;break;case _.INT64:a=t||e==0;break;case _.UINT64:a=t||e==0;break;case _.FIXED64:a=t||e==0,s=de.Bit64;break;case _.BYTES:a=t||!e.byteLength,s=de.LengthDelimited;break;case _.FIXED32:s=de.Bit32;break;case _.SFIXED32:s=de.Bit32;break;case _.SFIXED64:a=t||e==0,s=de.Bit64;break;case _.SINT64:a=t||e==0;break}const r=_[n].toLowerCase();return[s,r,t||a]}const Tn=Symbol("@bufbuild/protobuf/unknown-fields"),Es={readUnknownFields:!0,readerFactory:n=>new al(n)},bs={writeUnknownFields:!0,writerFactory:()=>new tl};function sl(n){return n?Object.assign(Object.assign({},Es),n):Es}function rl(n){return n?Object.assign(Object.assign({},bs),n):bs}function il(){return{makeReadOptions:sl,makeWriteOptions:rl,listUnknownFields(n){var e;return(e=n[Tn])!==null&&e!==void 0?e:[]},discardUnknownFields(n){delete n[Tn]},writeUnknownFields(n,e){const s=n[Tn];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[Tn])||(a[Tn]=[]),a[Tn].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[o,l]=e.tag(),m=a.fields.find(o);if(!m){const f=e.skip(l);s.readUnknownFields&&this.onUnknownField(n,o,l,f);continue}let d=n,y=m.repeated,T=m.localName;switch(m.oneof&&(d=d[m.oneof.localName],d.case!=T&&delete d.value,d.case=T,T="value"),m.kind){case"scalar":case"enum":const f=m.kind=="enum"?_.INT32:m.T;let M=ft;if(m.kind=="scalar"&&m.L>0&&(M=cl),y){let O=d[T];if(l==de.LengthDelimited&&f!=_.STRING&&f!=_.BYTES){let R=e.uint32()+e.pos;for(;e.pos<R;)O.push(M(e,f))}else O.push(M(e,f))}else d[T]=M(e,f);break;case"message":const E=m.T;y?d[T].push(ut(e,new E,s)):d[T]instanceof Ge?ut(e,d[T],s):(d[T]=ut(e,new E,s),E.fieldWrapper&&!m.oneof&&!m.repeated&&(d[T]=E.fieldWrapper.unwrapField(d[T])));break;case"map":let[w,L]=ol(m,e,s);d[T][w]=L;break}}}}}function ut(n,e,t){return e.getType().runtime.bin.readMessage(e,n,n.uint32(),t),e}function ol(n,e,t){const s=e.uint32(),a=e.pos+s;let r,o;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":o=ft(e,n.V.T);break;case"enum":o=e.int32();break;case"message":o=ut(e,new n.V.T,t);break}break}}if(r===void 0){let l=ba(n.K,dn.BIGINT);r=n.K==_.BOOL?l.toString():l}if(typeof r!="string"&&typeof r!="number"&&(r=r.toString()),o===void 0)switch(n.V.kind){case"scalar":o=ba(n.V.T,dn.BIGINT);break;case"enum":o=0;break;case"message":o=new n.V.T;break}return[r,o]}function cl(n,e){const t=ft(n,e);return typeof t=="bigint"?t.toString():t}function ft(n,e){switch(e){case _.STRING:return n.string();case _.BOOL:return n.bool();case _.DOUBLE:return n.double();case _.FLOAT:return n.float();case _.INT32:return n.int32();case _.INT64:return n.int64();case _.UINT64:return n.uint64();case _.FIXED64:return n.fixed64();case _.BYTES:return n.bytes();case _.FIXED32:return n.fixed32();case _.SFIXED32:return n.sfixed32();case _.SFIXED64:return n.sfixed64();case _.SINT64:return n.sint64();case _.UINT32:return n.uint32();case _.SINT32:return n.sint32()}}function ll(n,e,t,s,a){n.tag(t.no,de.LengthDelimited),n.fork();let r=s;switch(t.K){case _.INT32:case _.FIXED32:case _.UINT32:case _.SFIXED32:case _.SINT32:r=Number.parseInt(s);break;case _.BOOL:Ee(s=="true"||s=="false"),r=s=="true";break}switch(Fn(n,t.K,1,r,!0),t.V.kind){case"scalar":Fn(n,t.V.T,2,a,!0);break;case"enum":Fn(n,_.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 Fn(n,e,t,s,a){let[r,o,l]=Ni(e,s);(!l||a)&&n.tag(t,r)[o](s)}function ul(n,e,t,s){if(!s.length)return;n.tag(t,de.LengthDelimited).fork();let[,a]=Ni(e);for(let r=0;r<s.length;r++)n[a](s[r]);n.join()}function ml(){return Object.assign(Object.assign({},il()),{writeMessage(n,e,t){const s=n.getType();for(const a of s.fields.byNumber()){let r,o=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"?_.INT32:a.T;if(o)if(a.packed)ul(e,m,a.no,r);else for(const d of r)Fn(e,m,a.no,d,!0);else r!==void 0&&Fn(e,m,a.no,r,!!a.oneof||a.opt);break;case"message":if(o)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))ll(e,t,a,d,y);break}}return t.writeUnknownFields&&this.writeUnknownFields(n,e),e}})}let $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),bt=[];for(let n=0;n<$e.length;n++)bt[$e[n].charCodeAt(0)]=n;bt["-".charCodeAt(0)]=$e.indexOf("+");bt["_".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,o=0;for(let l=0;l<n.length;l++){if(r=bt[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:o=r,a=1;break;case 1:t[s++]=o<<2|(r&48)>>4,o=r,a=2;break;case 2:t[s++]=(o&15)<<4|(r&60)>>2,o=r,a=3;break;case 3:t[s++]=(o&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}},Ds={ignoreUnknownFields:!1},_s={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function dl(n){return n?Object.assign(Object.assign({},Ds),n):Ds}function pl(n){return n?Object.assign(Object.assign({},_s),n):_s}function yl(n){const e=n(gl,ws);return{makeReadOptions:dl,makeWriteOptions:pl,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 o={};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,T=r;if(d.oneof){if(m===null&&d.kind=="scalar")continue;const f=o[d.oneof.localName];if(f)throw new Error(`cannot decode message ${t.typeName} from JSON: multiple keys for oneof "${d.oneof.name}" present: "${f}", "${l}"`);o[d.oneof.localName]=l,T=T[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 f=T[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=qt(d.T,M,a.ignoreUnknownFields),E===void 0)continue;break;case"scalar":try{E=Un(d.T,M,d.L)}catch(w){let L=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(M)}`;throw w instanceof Error&&w.message.length>0&&(L+=`: ${w.message}`),new Error(L)}break}f.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 f=T[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 w;switch(d.V.kind){case"message":w=d.V.T.fromJson(E,a);break;case"enum":if(w=qt(d.V.T,E,a.ignoreUnknownFields),w===void 0)continue;break;case"scalar":try{w=Un(d.V.T,E,dn.BIGINT)}catch(L){let O=`cannot decode map value for field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw L instanceof Error&&L.message.length>0&&(O+=`: ${L.message}`),new Error(O)}break}try{f[Un(d.K,d.K==_.BOOL?M=="true"?!0:M=="false"?!1:M:M,dn.BIGINT).toString()]=w}catch(L){let O=`cannot decode map key for field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw L instanceof Error&&L.message.length>0&&(O+=`: ${L.message}`),new Error(O)}}}else switch(d.kind){case"message":const f=d.T;if(m===null&&f.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}T[y]instanceof Ge?T[y].fromJson(m,a):(T[y]=f.fromJson(m,a),f.fieldWrapper&&!d.oneof&&(T[y]=f.fieldWrapper.unwrapField(T[y])));break;case"enum":const M=qt(d.T,m,a.ignoreUnknownFields);M!==void 0&&(T[y]=M);break;case"scalar":try{T[y]=Un(d.T,m,d.L)}catch(E){let w=`cannot decode field ${t.typeName}.${d.name} from JSON: ${this.debug(m)}`;throw E instanceof Error&&E.message.length>0&&(w+=`: ${E.message}`),new Error(w)}break}}return r},writeMessage(t,s){const a=t.getType(),r={};let o;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(o=l.findField(d.case),!o)throw"oneof case not found: "+d.case;m=e(o,d.value,s)}else o=l,m=e(o,t[o.localName],s);m!==void 0&&(r[s.useProtoFieldName?o.name:o.jsonName]=m)}}catch(l){const m=o?`cannot encode field ${a.typeName}.${o.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:Un,writeScalar:ws,debug:Ii}}function Ii(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 Un(n,e,t){switch(n){case _.DOUBLE:case _.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==_.FLOAT&&ci(s),s;case _.INT32:case _.FIXED32:case _.SFIXED32:case _.SINT32:case _.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==_.UINT32?Ia(a):ot(a),a;case _.INT64:case _.SFIXED64:case _.SINT64:if(e===null)return Te.zero;if(typeof e!="number"&&typeof e!="string")break;const r=Te.parse(e);return t?r.toString():r;case _.FIXED64:case _.UINT64:if(e===null)return Te.zero;if(typeof e!="number"&&typeof e!="string")break;const o=Te.uParse(e);return t?o.toString():o;case _.BOOL:if(e===null)return!1;if(typeof e!="boolean")break;return e;case _.STRING:if(e===null)return"";if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case _.BYTES:if(e===null||e==="")return new Uint8Array(0);if(typeof e!="string")break;return Va.dec(e)}throw new Error}function qt(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: ${Ii(e)}`)}function gl(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 ws(n,e,t){if(e!==void 0)switch(n){case _.INT32:case _.SFIXED32:case _.SINT32:case _.FIXED32:case _.UINT32:return Ee(typeof e=="number"),e!=0||t?e:void 0;case _.FLOAT:case _.DOUBLE:return Ee(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e!==0||t?e:void 0;case _.STRING:return Ee(typeof e=="string"),e.length>0||t?e:void 0;case _.BOOL:return Ee(typeof e=="boolean"),e||t?e:void 0;case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return Ee(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),t||e!=0?e.toString(10):void 0;case _.BYTES:return Ee(e instanceof Uint8Array),t||e.byteLength>0?Va.enc(e):void 0}}function fl(){return yl((n,e)=>function(s,a,r){if(s.kind=="map"){const o={};switch(s.V.kind){case"scalar":for(const[m,d]of Object.entries(a)){const y=e(s.V.T,d,!0);Ee(y!==void 0),o[m.toString()]=y}break;case"message":for(const[m,d]of Object.entries(a))o[m.toString()]=d.toJson(r);break;case"enum":const l=s.V.T;for(const[m,d]of Object.entries(a)){Ee(d===void 0||typeof d=="number");const y=n(l,d,!0,r.enumAsInteger);Ee(y!==void 0),o[m.toString()]=y}break}return r.emitDefaultValues||Object.keys(o).length>0?o:void 0}else if(s.repeated){const o=[];switch(s.kind){case"scalar":for(let l=0;l<a.length;l++)o.push(e(s.T,a[l],!0));break;case"enum":for(let l=0;l<a.length;l++)o.push(n(s.T,a[l],!0,r.enumAsInteger));break;case"message":for(let l=0;l<a.length;l++)o.push(Ea(s.T,a[l]).toJson(r));break}return r.emitDefaultValues||o.length>0?o: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 Tl(){return{setEnumType:ui,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,o=n;if(o[a]!==void 0)switch(s.kind){case"oneof":const l=o[a].case;if(l===void 0)continue;const m=s.findField(l);let d=o[a].value;m&&m.kind=="message"&&!(d instanceof m.T)?d=new m.T(d):m&&m.kind==="scalar"&&m.T===_.BYTES&&(d=Pn(d)),r[a]={case:l,value:d};break;case"scalar":case"enum":let y=o[a];s.T===_.BYTES&&(y=s.repeated?y.map(Pn):Pn(y)),r[a]=y;break;case"map":switch(s.V.kind){case"scalar":case"enum":if(s.V.T===_.BYTES)for(const[M,E]of Object.entries(o[a]))r[a][M]=Pn(E);else Object.assign(r[a],o[a]);break;case"message":const f=s.V.T;for(const M of Object.keys(o[a])){let E=o[a][M];f.fieldWrapper||(E=new f(E)),r[a][M]=E}break}break;case"message":const T=s.T;if(s.repeated)r[a]=o[a].map(f=>f instanceof T?f:new T(f));else if(o[a]!==void 0){const f=o[a];T.fieldWrapper?T.typeName==="google.protobuf.BytesValue"?r[a]=Pn(f):r[a]=f:r[a]=f instanceof T?f:new T(f)}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((o,l)=>s.T.equals(o,r[l]));case"scalar":return a.every((o,l)=>Je(s.T,o,r[l]));case"enum":return a.every((o,l)=>Je(_.INT32,o,r[l]))}throw new Error(`repeated cannot contain ${s.kind}`)}switch(s.kind){case"message":return s.T.equals(a,r);case"enum":return Je(_.INT32,a,r);case"scalar":return Je(s.T,a,r);case"oneof":if(a.case!==r.case)return!1;const o=s.findField(a.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(a.value,r.value);case"enum":return Je(_.INT32,a.value,r.value);case"scalar":return Je(o.T,a.value,r.value)}throw new Error(`oneof cannot contain ${o.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=>Je(_.INT32,a[y],r[y]));case"scalar":const d=s.V.T;return l.every(y=>Je(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 o;if(a.repeated)o=r.map(tt);else if(a.kind=="map"){o=s[a.localName];for(const[l,m]of Object.entries(r))o[l]=tt(m)}else a.kind=="oneof"?o=a.findField(r.case)?{case:r.case,value:tt(r.value)}:{case:void 0}:o=tt(r);s[a.localName]=o}return t}}}function tt(n){if(n===void 0)return n;if(n instanceof Ge)return n.clone();if(n instanceof Uint8Array){const e=new Uint8Array(n.byteLength);return e.set(n),e}return n}function Pn(n){return n instanceof Uint8Array?n:new Uint8Array(n)}class kl{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 Si(n,e){const t=Ai(n);return e?t:Al(Sl(t))}function hl(n){return Si(n,!1)}const Ml=Ai;function Ai(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 Nl=new Set(["constructor","toString","toJSON","valueOf"]),Il=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),Ei=n=>`${n}$`,Sl=n=>Il.has(n)?Ei(n):n,Al=n=>Nl.has(n)?Ei(n):n;class El{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=hl(e)}addField(e){Ee(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=Pc("proto3",fl(),ml(),Object.assign(Object.assign({},Tl()),{newFieldList(n){return new kl(n,bl)},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 bl(n){var e,t,s,a;const r=[];let o;for(const l of typeof n=="function"?n():n){const m=l;if(m.localName=Si(l.name,l.oneof!==void 0),m.jsonName=(e=l.jsonName)!==null&&e!==void 0?e:Ml(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:dn.BIGINT),m.packed=(a=l.packed)!==null&&a!==void 0?a:l.kind=="enum"||l.kind=="scalar"&&l.T!=_.BYTES&&l.T!=_.STRING,l.oneof!==void 0){const d=typeof l.oneof=="string"?l.oneof:l.oneof.name;(!o||o.name!=d)&&(o=new El(d)),m.oneof=o,o.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 vs;(function(n){n[n.NoSideEffects=1]="NoSideEffects",n[n.Idempotent=2]="Idempotent"})(vs||(vs={}));class Se extends Ge{constructor(e){super(),this.seconds=Te.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=Te.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 Se.fromDate(new Date)}static fromDate(e){const t=e.getTime();return new Se({seconds:Te.parse(Math.floor(t/1e3)),nanos:t%1e3*1e6})}static fromBinary(e,t){return new Se().fromBinary(e,t)}static fromJson(e,t){return new Se().fromJson(e,t)}static fromJsonString(e,t){return new Se().fromJsonString(e,t)}static equals(e,t){return c.util.equals(Se,e,t)}}Se.runtime=c;Se.typeName="google.protobuf.Timestamp";Se.fields=c.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class Fe extends Ge{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 o=a.fromBinary(this.value).toJson(e);return(s.startsWith("google.protobuf.")||o===null||Array.isArray(o)||typeof o!="object")&&(o={value:o}),o["@type"]=this.typeUrl,o}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),o=(s=t==null?void 0:t.typeRegistry)===null||s===void 0?void 0:s.findMessage(r);if(!o)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=o.fromJson(e.value,t);else{const m=Object.assign({},e);delete m["@type"],l=o.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 Fe;return t.packFrom(e),t}static fromBinary(e,t){return new Fe().fromBinary(e,t)}static fromJson(e,t){return new Fe().fromJson(e,t)}static fromJsonString(e,t){return new Fe().fromJsonString(e,t)}static equals(e,t){return c.util.equals(Fe,e,t)}}Fe.runtime=c;Fe.typeName="google.protobuf.Any";Fe.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 Os(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(Dl(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 Ge){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 Dl(n,e){return n.length?`[${Os(e)}] ${n}`:`[${Os(e)}]`}function _l(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 bi(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 js(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 o=t.subarray(5,5+r.length);t=t.subarray(5+r.length),a.enqueue({flags:r.flags,data:o})}})}function Ls(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 wl=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(o){return new Promise(function(l,m){o=n[r](o),a(l,m,o.done,o.value)})}}function a(r,o,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},o)}},qn=globalThis&&globalThis.__await||function(n){return this instanceof qn?(this.v=n,this):new qn(n)},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={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a;function o(f){s[f]&&(a[f]=function(M){return new Promise(function(E,w){r.push([f,M,E,w])>1||l(f,M)})})}function l(f,M){try{m(s[f](M))}catch(E){T(r[0][3],E)}}function m(f){f.value instanceof qn?Promise.resolve(f.value.v).then(d,y):T(r[0][2],f)}function d(f){l("next",f)}function y(f){l("throw",f)}function T(f,M){f(M),r.shift(),r.length&&l(r[0][0],r[0][1])}},Ol=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(o){return(t=!t)?{value:qn(n[a](o)),done:!1}:r?r(o):o}:r}};function Di(n){return vl(this,arguments,function*(){yield qn(yield*Ol(wl(n)))})}var jl=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(o){return new Promise(function(l,m){o=n[r](o),a(l,m,o.done,o.value)})}}function a(r,o,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},o)}};function Ll(n,e){return bi(n,t=>{switch(t.kind){case P.Unary:return Rl(e,n,t);case P.ServerStreaming:return xl(e,n,t);default:return null}})}function Rl(n,e,t){return function(s,a,r){const o=new AbortController;return r=_i(o,r),n.unary(e,t,o.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&&o.signal.aborted||a(m,new t.O)}),()=>o.abort()}}function xl(n,e,t){return function(s,a,r,o){const l=new AbortController;async function m(){var d,y,T,f,M,E;o=_i(l,o);const w=await n.stream(e,t,o.signal,o.timeoutMs,o.headers,Di([s]),o.contextValues);(M=o.onHeader)===null||M===void 0||M.call(o,w.header);try{for(var L=!0,O=jl(w.message),R;R=await O.next(),d=R.done,!d;L=!0)f=R.value,L=!1,a(f)}catch(x){y={error:x}}finally{try{!L&&!d&&(T=O.return)&&await T.call(O)}finally{if(y)throw y.error}}(E=o.onTrailer)===null||E===void 0||E.call(o,w.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 _i(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 wi=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(o){return new Promise(function(l,m){o=n[r](o),a(l,m,o.done,o.value)})}}function a(r,o,l,m){Promise.resolve(m).then(function(d){r({value:d,done:l})},o)}},vn=globalThis&&globalThis.__await||function(n){return this instanceof vn?(this.v=n,this):new vn(n)},Cl=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(o){return(t=!t)?{value:vn(n[a](o)),done:!1}:r?r(o):o}:r}},zl=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={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a;function o(f){s[f]&&(a[f]=function(M){return new Promise(function(E,w){r.push([f,M,E,w])>1||l(f,M)})})}function l(f,M){try{m(s[f](M))}catch(E){T(r[0][3],E)}}function m(f){f.value instanceof vn?Promise.resolve(f.value.v).then(d,y):T(r[0][2],f)}function d(f){l("next",f)}function y(f){l("throw",f)}function T(f,M){f(M),r.shift(),r.length&&l(r[0][0],r[0][1])}};function Dt(n,e){return bi(n,t=>{switch(t.kind){case P.Unary:return Ul(e,n,t);case P.ServerStreaming:return Pl(e,n,t);case P.ClientStreaming:return Bl(e,n,t);case P.BiDiStreaming:return Ql(e,n,t);default:return null}})}function Ul(n,e,t){return async function(s,a){var r,o;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),(o=a==null?void 0:a.onTrailer)===null||o===void 0||o.call(a,l.trailer),l.message}}function Pl(n,e,t){return function(s,a){return vi(n.stream(e,t,a==null?void 0:a.signal,a==null?void 0:a.timeoutMs,a==null?void 0:a.headers,Di([s]),a==null?void 0:a.contextValues),a)}}function Bl(n,e,t){return async function(s,a){var r,o,l,m,d,y;const T=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,T.header);let f;try{for(var M=!0,E=wi(T.message),w;w=await E.next(),r=w.done,!r;M=!0)m=w.value,M=!1,f=m}catch(L){o={error:L}}finally{try{!M&&!r&&(l=E.return)&&await l.call(E)}finally{if(o)throw o.error}}if(!f)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,T.trailer),f}}function Ql(n,e,t){return function(s,a){return vi(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 vi(n,e){const t=function(){var s,a;return zl(this,arguments,function*(){const r=yield vn(n);(s=e==null?void 0:e.onHeader)===null||s===void 0||s.call(e,r.header),yield vn(yield*Cl(wi(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 Fl(...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(Oi(this));for(const a of t)a.removeEventListener("abort",s)}return e}function Gl(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 Oi(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 Rs(){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 Wt=128;function xs(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(),o=s.substring(a+1).trim();e.append(r,o)}}return e}const Yl="Content-Type",Vl="Grpc-Timeout",ji="Grpc-Status",Li="Grpc-Message",$l="Grpc-Status-Details-Bin",ql="User-Agent",Wl="X-User-Agent",Hl="X-Grpc-Web",Zl="application/grpc-web+proto",Kl="application/grpc-web+json";class We extends Ge{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:Fe,repeated:!0}]);const Jl="0";function Ri(n){var e;const t=n.get($l);if(t!=null){const a=_l(t,We);if(a.code==0)return;const r=new ye(a.message,a.code,n);return r.details=a.details.map(o=>({type:o.typeUrl.substring(o.typeUrl.lastIndexOf("/")+1),value:o.value})),r}const s=n.get(ji);if(s!=null){if(s===Jl)return;const a=parseInt(s,10);return a in ee?new ye(decodeURIComponent((e=n.get(Li))!==null&&e!==void 0?e:""),a,n):new ye(`invalid grpc-status: ${s}`,ee.Internal,n)}}function Cs(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 xi(n,e){return e instanceof Ge?e:new n(e)}function Xl(n,e){function t(s){return s.done===!0?s:{done:s.done,value:xi(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 eu(n){var e;const t=Object.assign({},n);return(e=t.ignoreUnknownFields)!==null&&e!==void 0||(t.ignoreUnknownFields=!0),t}function zs(n,e,t,s){const a=e?Us(n.I,s):Ps(n.I,t);return{parse:(e?Us(n.O,s):Ps(n.O,t)).parse,serialize:a.serialize}}function Us(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 Ps(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,o=eu(e);return{parse(l){try{const m=r.decode(l);return n.fromJsonString(m,o)}catch(m){throw ye.from(m,ee.InvalidArgument)}},serialize(l){try{const m=l.toJsonString(o);return a.encode(m)}catch(m){throw ye.from(m,ee.Internal)}}}}function nu(n){const e=zi(n.next,n.interceptors),[t,s,a]=Ci(n),r=Object.assign(Object.assign({},n.req),{message:xi(n.req.method.I,n.req.message),signal:t});return e(r).then(o=>(a(),o),s)}function tu(n){const e=zi(n.next,n.interceptors),[t,s,a]=Ci(n),r=Object.assign(Object.assign({},n.req),{message:Xl(n.req.method.I,n.req.message),signal:t});let o=!1;return t.addEventListener("abort",function(){var l,m;const d=n.req.message[Symbol.asyncIterator]();o||(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&&(o=!0,a()),d),s)}}}}}),s)}function Ci(n){const{signal:e,cleanup:t}=Gl(n.timeoutMs),s=Fl(n.signal,e);return[s.signal,function(r){const o=ye.from(e.aborted?Oi(e):r);return s.abort(o),t(),Promise.reject(o)},function(){t(),s.abort()}]}function zi(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 au(){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 Bs(n){const e=Ri(n);if(e)throw e}function Qs(n,e,t){const s=new Headers(t??{});return s.set(Yl,n?Zl:Kl),s.set(Hl,"1"),s.set(Wl,"connect-es/1.1.2"),s.set(ql,"connect-es/1.1.2"),e!==void 0&&s.set(Vl,`${e}m`),s}function su(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 Fs(n,e){var t;if(n>=200&&n<300){const s=Ri(e);if(s)throw s;return{foundStatus:e.has(ji)}}throw new ye(decodeURIComponent((t=e.get(Li))!==null&&t!==void 0?t:`HTTP ${n}`),su(n),e)}var cn=globalThis&&globalThis.__await||function(n){return this instanceof cn?(this.v=n,this):new cn(n)},ru=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={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a;function o(f){s[f]&&(a[f]=function(M){return new Promise(function(E,w){r.push([f,M,E,w])>1||l(f,M)})})}function l(f,M){try{m(s[f](M))}catch(E){T(r[0][3],E)}}function m(f){f.value instanceof cn?Promise.resolve(f.value.v).then(d,y):T(r[0][2],f)}function d(f){l("next",f)}function y(f){l("throw",f)}function T(f,M){f(M),r.shift(),r.length&&l(r[0][0],r[0][1])}};function _t(n){var e;au();const t=(e=n.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(s,a,r,o,l,m,d){var y;const{serialize:T,parse:f}=zs(a,t,n.jsonOptions,n.binaryOptions);return o=o===void 0?n.defaultTimeoutMs:o<=0?void 0:o,await nu({interceptors:n.interceptors,signal:r,timeoutMs:o,req:{stream:!1,service:s,method:a,url:Cs(n.baseUrl,s,a),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Qs(t,o,l),contextValues:d??Rs(),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:Ls(0,T(M.message))}));if(Fs(L.status,L.headers),!L.body)throw"missing response body";const O=js(L.body).getReader();let R,x;for(;;){const z=await O.read();if(z.done)break;const{flags:U,data:B}=z.value;if(U===Wt){if(R!==void 0)throw"extra trailer";R=xs(B);continue}if(x!==void 0)throw"extra message";x=f(B)}if(R===void 0)throw"missing trailer";if(Bs(R),x===void 0)throw"missing message";return{stream:!1,header:L.headers,message:x,trailer:R}}})},async stream(s,a,r,o,l,m,d){var y;const{serialize:T,parse:f}=zs(a,t,n.jsonOptions,n.binaryOptions);function M(w,L,O){return ru(this,arguments,function*(){const x=js(w).getReader();if(L){if(!(yield cn(x.read())).done)throw"extra data for trailers-only";return yield cn(void 0)}let z=!1;for(;;){const U=yield cn(x.read());if(U.done)break;const{flags:B,data:C}=U.value;if((B&Wt)===Wt){if(z)throw"extra trailer";z=!0;const H=xs(C);Bs(H),H.forEach((ne,se)=>O.set(se,ne));continue}if(z)throw"extra message";yield yield cn(f(C))}if(!z)throw"missing trailer"})}async function E(w){if(a.kind!=P.ServerStreaming)throw"The fetch API does not support streaming request bodies";const L=await w[Symbol.asyncIterator]().next();if(L.done==!0)throw"missing request message";return Ls(0,T(L.value))}return o=o===void 0?n.defaultTimeoutMs:o<=0?void 0:o,tu({interceptors:n.interceptors,signal:r,timeoutMs:o,req:{stream:!0,service:s,method:a,url:Cs(n.baseUrl,s,a),init:{method:"POST",credentials:(y=n.credentials)!==null&&y!==void 0?y:"same-origin",redirect:"error",mode:"cors"},header:Qs(t,o,l),contextValues:d??Rs(),message:m},next:async w=>{var L;const R=await((L=n.fetch)!==null&&L!==void 0?L:globalThis.fetch)(w.url,Object.assign(Object.assign({},w.init),{headers:w.header,signal:w.signal,body:await E(w.message)})),{foundStatus:x}=Fs(R.status,R.headers);if(!R.body)throw"missing response body";const z=new Headers;return Object.assign(Object.assign({},w),{header:R.headers,trailer:z,message:M(R.body,x,z)})}})}}}const iu=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"}]),ou=c.makeMessageType("streamlayer.users.PublicChatUser",()=>[{no:1,name:"name",kind:"scalar",T:9}]),cu=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:ou},{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 lu=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(iu)},{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}]),uu=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:lu}]),$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:cu}]);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:uu}]);const mu=c.makeMessageType("streamlayer.users.LoginRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),du=c.makeMessageType("streamlayer.users.AuthResponse",()=>[{no:1,name:"meta",kind:"message",T:pu},{no:2,name:"data",kind:"message",T:$a}]),pu=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"}),yu=c.makeMessageType("streamlayer.users.RegisterRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),gu=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}]),fu=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:gu}]),Tu=c.makeMessageType("streamlayer.users.RequestPasswordRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ku=c.makeMessageType("streamlayer.users.RequestPasswordResponse",()=>[{no:1,name:"requested",kind:"scalar",T:8},{no:2,name:"uid",kind:"scalar",T:9}]),hu=c.makeMessageType("streamlayer.users.MeRequest",[]),Mu=c.makeMessageType("streamlayer.users.MeResponse",()=>[{no:1,name:"data",kind:"message",T:$a}]),Nu=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"}]),Iu=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"}]),Su=c.makeMessageType("streamlayer.users.UpdateAvatarResponse",[]),Au=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"}]),Eu=c.makeMessageType("streamlayer.users.UpdatePublicChatNameResponse",[]),bu=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"}]),Du=c.makeMessageType("streamlayer.users.UpdatePublicNameResponse",[]),_u=c.makeMessageType("streamlayer.users.UpdateMetadataResponse",[]),wu=c.makeMessageType("streamlayer.users.InviteRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"referral",kind:"message",T:vu}]),vu=c.makeMessageType("streamlayer.users.InviteRequest.InviteReferral",()=>[{no:1,name:"watching_game",kind:"scalar",T:9}],{localName:"InviteRequest_InviteReferral"}),Ou=c.makeMessageType("streamlayer.users.InviteResponse",[]),ju=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}]),Lu=c.makeMessageType("streamlayer.users.BypassAuthResponse",()=>[{no:1,name:"meta",kind:"message",T:Ru},{no:2,name:"data",kind:"message",T:$a,opt:!0}]),Ru=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"}),Zn={typeName:"streamlayer.users.Users",methods:{login:{name:"Login",I:mu,O:du,kind:P.Unary},register:{name:"Register",I:yu,O:fu,kind:P.Unary},requestPassword:{name:"RequestPassword",I:Tu,O:ku,kind:P.Unary},me:{name:"Me",I:hu,O:Mu,kind:P.Unary},invite:{name:"Invite",I:wu,O:Ou,kind:P.Unary},bypassAuth:{name:"BypassAuth",I:ju,O:Lu,kind:P.Unary},updateMetadata:{name:"UpdateMetadata",I:Nu,O:_u,kind:P.Unary},updateAvatar:{name:"UpdateAvatar",I:Iu,O:Su,kind:P.Unary},updatePublicChatName:{name:"UpdatePublicChatName",I:Au,O:Eu,kind:P.Unary},updatePublicName:{name:"UpdatePublicName",I:bu,O:Du,kind:P.Unary}}},xu=async(n,e)=>{const t=_t({baseUrl:n});return await Dt(Zn,t).requestPassword({id:e}),!0},Cu=async(n,e)=>{const t=_t({baseUrl:n});return await Dt(Zn,t).register({id:e}),!0},zu=async(n,e,t)=>{var o;const s=_t({baseUrl:n}),r=await Dt(Zn,s).login({id:e,password:t});return(o=r==null?void 0:r.meta)==null?void 0:o.jwt};const Uu=A("div")({name:"Panel",class:"pkueuwk",propsAsIs:!1}),Gs=A("form")({name:"Form",class:"fp66u19",propsAsIs:!1}),Ys=A("div")({name:"FormTitle",class:"fwojs5e",propsAsIs:!1}),Ht=A("div")({name:"FormDescription",class:"fwvt1dc",propsAsIs:!1}),Zt=A("button")({name:"FormSubmit",class:"f16e2wbc",propsAsIs:!1}),Pu=A("div")({name:"FormInputContainer",class:"f1xkchzs",propsAsIs:!1}),Bu=A("div")({name:"Digits",class:"d132q1j",propsAsIs:!1}),Qu=({login:n,anonymousLogin:e,host:t})=>{const[s,a]=Q.useState(""),[r,o]=Q.useState(""),[l,m]=Q.useState(""),d=async T=>{T.preventDefault();try{const f=s.replaceAll("+","");try{await xu(t,f)}catch{await Cu(t,f)}o(f)}catch(f){window.alert(f)}},y=async T=>{if(T.preventDefault(),r&&l)try{const f=await zu(t,r,l);f&&n?await n(f):console.log("token",f)}catch(f){window.alert(f)}};return k.jsxs(Uu,{children:[!r&&k.jsxs("div",{children:[k.jsxs(Gs,{onSubmit:d,children:[k.jsx(Ys,{children:"Enter your phone number"}),k.jsx(Ht,{children:"Enter your phone up for number to log in or sign an account."}),k.jsx(Pu,{children:k.jsx(Ft,{value:s,onChange:T=>a(`${T}`)})}),k.jsx(Zt,{disabled:!Ft.isValidPhoneNumber(s),type:"submit",children:"request code"})]}),e&&k.jsx(Zt,{style:{display:"block",margin:"auto"},onClick:e,children:"anonymous login"})]}),r&&k.jsxs(Gs,{onSubmit:y,children:[k.jsx(Ys,{children:"Enter Verification Code"}),k.jsxs(Ht,{children:["Please enter the verification code ",k.jsx("br",{}),"sent to ",k.jsx("b",{children:Ft.formatPhoneNumberIntl(s)})]}),k.jsx(Bu,{children:k.jsx(qo,{autoFocus:!0,allowedCharacters:"numeric",length:4,onChange:m})}),k.jsx(Zt,{disabled:l.length!==4,type:"submit",children:"login"}),k.jsxs(Ht,{children:["Didn't get 59 the code? ",k.jsx("br",{}),"Resend Code in",k.jsx(oi,{duration:30,setTimeToExpire:()=>{},isPlaying:!0})]})]})]})};const Fu=A("div")({name:"Container",class:"c18fa2p6",propsAsIs:!1}),Gu=A("div")({name:"Content",class:"cthywkn",propsAsIs:!1}),Yu=A("div")({name:"OnboardingHeader",class:"obeaxxh",propsAsIs:!1}),Vu=A("div")({name:"LeftBlock",class:"l1jam9nb",propsAsIs:!1}),$u=A("div")({name:"RightBlock",class:"r17ziiq1",propsAsIs:!1}),qu=A("img")({name:"GameIcon",class:"gxb34q2",propsAsIs:!1}),Wu=A("img")({name:"SponsorLogo",class:"s10k8h8y",propsAsIs:!1}),Hu=A("button")({name:"CloseBtn",class:"ca5j1zk",propsAsIs:!1}),Zu=A("img")({name:"IconClose",class:"i6wd7es",propsAsIs:!1}),Ku=A("button")({name:"OnboardingActionBtn",class:"onaxor0",propsAsIs:!1});const Ju=A("div")({name:"Container",class:"c1tc3ie1",propsAsIs:!1}),Xu=A("div")({name:"Content",class:"cenyr9j",propsAsIs:!1}),em=A("img")({name:"Graphic",class:"g17082th",propsAsIs:!1}),nm=A("div")({name:"Headline",class:"hr58r57",propsAsIs:!1}),tm=({graphic:n,headline:e})=>k.jsx(Ju,{children:k.jsxs(Xu,{children:[k.jsx(em,{alt:"graphic-img-instrucrions",src:n}),k.jsx(nm,{children:e})]})});const am=A("div")({name:"Container",class:"c1k109z3",propsAsIs:!1}),sm=A("div")({name:"Title",class:"tl3o9j9",propsAsIs:!1}),rm=A("div")({name:"RulesList",class:"rp7yn67",propsAsIs:!1}),im=A("div")({name:"RulesItem",class:"r18km3gu",propsAsIs:!1}),om=A("div")({name:"RuleNumber",class:"rtu7hsj",propsAsIs:!1}),cm=A("div")({name:"RuleText",class:"rfkkuag",propsAsIs:!1}),lm=({rules:n,rulesTitle:e,primaryColor:t})=>k.jsxs(am,{children:[k.jsx(sm,{children:e}),k.jsx(rm,{children:n==null?void 0:n.map((s,a)=>k.jsxs(im,{children:[k.jsx(om,{style:{backgroundColor:t},children:a+1}),k.jsx(cm,{children:s})]},a))})]}),um="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyaWVuZHMiPgo8cGF0aCBpZD0iVmVjdG9yIiBkPSJNNC4xOTIzMSA3LjAzMTI1QzIuNjYzNDYgNy4wMzEyNSAxLjQyMzA4IDguMTk5NzMgMS40MjMwOCA5LjYzOTk0QzEuNDIzMDggMTEuMDgwMiAyLjY2MzQ2IDEyLjI0ODYgNC4xOTIzMSAxMi4yNDg2QzUuNzIxMTUgMTIuMjQ4NiA2Ljk2MTU0IDExLjA4MDIgNi45NjE1NCA5LjYzOTk0QzYuOTYxNTQgOC4xOTk3MyA1LjcyMTE1IDcuMDMxMjUgNC4xOTIzMSA3LjAzMTI1Wk00LjE5MjMxIDEyLjI0ODZDMi4xNjIyNiAxMi4yNDg2IDAuNSAxMy44MTQ1IDAuNSAxNS43MjY5VjE3LjYyOUMwLjUgMTcuNjI5IDEuNDIzMDggMTguMzM1NiA0LjE5MjMxIDE4LjMzNTZDNi45NjE1NCAxOC4zMzU2IDcuODg0NjEgMTcuNjI5IDcuODg0NjEgMTcuNjI5VjE1LjcyNjlDNy44ODQ2MSAxMy44MTQ1IDYuMjIyMzYgMTIuMjQ4NiA0LjE5MjMxIDEyLjI0ODZaTTIwLjgwNzcgNy4wMzEyNUMxOS4yNzg4IDcuMDMxMjUgMTguMDM4NSA4LjE5OTczIDE4LjAzODUgOS42Mzk5NEMxOC4wMzg1IDExLjA4MDIgMTkuMjc4OCAxMi4yNDg2IDIwLjgwNzcgMTIuMjQ4NkMyMi4zMzY1IDEyLjI0ODYgMjMuNTc2OSAxMS4wODAyIDIzLjU3NjkgOS42Mzk5NEMyMy41NzY5IDguMTk5NzMgMjIuMzM2NSA3LjAzMTI1IDIwLjgwNzcgNy4wMzEyNVpNMjAuODA3NyAxMi4yNDg2QzE4Ljc3NzYgMTIuMjQ4NiAxNy4xMTU0IDEzLjgxNDUgMTcuMTE1NCAxNS43MjY5VjE3LjYyOUMxNy4xMTU0IDE3LjYyOSAxOC4wMzg1IDE4LjMzNTYgMjAuODA3NyAxOC4zMzU2QzIzLjU3NjkgMTguMzM1NiAyNC41IDE3LjYyOSAyNC41IDE3LjYyOVYxNS43MjY5QzI0LjUgMTMuODE0NSAyMi44Mzc3IDEyLjI0ODYgMjAuODA3NyAxMi4yNDg2Wk0xMi41IDEwLjUwOTVDMTAuOTcxMiAxMC41MDk1IDkuNzMwNzcgMTEuNjc4IDkuNzMwNzcgMTMuMTE4MkM5LjczMDc3IDE0LjU1ODQgMTAuOTcxMiAxNS43MjY5IDEyLjUgMTUuNzI2OUMxNC4wMjg4IDE1LjcyNjkgMTUuMjY5MiAxNC41NTg0IDE1LjI2OTIgMTMuMTE4MkMxNS4yNjkyIDExLjY3OCAxNC4wMjg4IDEwLjUwOTUgMTIuNSAxMC41MDk1Wk0xMi41IDE1LjcyNjlDMTAuNDcgMTUuNzI2OSA4LjgwNzY5IDE3LjI5MjggOC44MDc2OSAxOS4yMDUxVjIxLjEwNzNDOC44MDc2OSAyMS4xMDczIDkuNzMwNzcgMjEuODEzOCAxMi41IDIxLjgxMzhDMTUuMjY5MiAyMS44MTM4IDE2LjE5MjMgMjEuMTA3MyAxNi4xOTIzIDIxLjEwNzNWMTkuMjA1MUMxNi4xOTIzIDE3LjI5MjggMTQuNTMgMTUuNzI2OSAxMi41IDE1LjcyNjlaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik04LjU4NDczIDEuNUM2Ljk2MzkyIDEuNSA1LjY0ODkzIDIuNzM4NzYgNS42NDg5MyA0LjI2NTZDNS42NDg5MyA1Ljc5MjQ1IDYuOTYzOTIgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFDMTAuMjA1NSA3LjAzMTIxIDExLjUyMDUgNS43OTI0NSAxMS41MjA1IDQuMjY1NkMxMS41MjA1IDIuNzM4NzYgMTAuMjA1NSAxLjUgOC41ODQ3MyAxLjVaTTguNTg0NzMgNy4wMzEyMUM4LjI5MDM4IDcuMDMxMjEgNy45OTIyMSA3LjAyNCA3LjY5Nzg3IDcuMTE3NjNDOC4yODY1NiA3Ljg1NTg0IDguNTg0NzMgOC43ODEzMSA4LjU4NDczIDkuNzk2ODFDOC41ODQ3MyAxMC4xNjQxIDguNDkyOTggMTAuNTI0MiA4LjQ5Mjk4IDEwLjg5MTVDOS4yNzY2MyA5Ljc4NjAxIDEwLjU0MTkgOS4wNTg1OSAxMi4wMDk4IDguODc0OTRDMTEuMzI1NiA3Ljc2OTQyIDEwLjA1MjYgNy4wMzEyMSA4LjU4NDczIDcuMDMxMjFaTTE2LjQxMzUgMS41QzE0Ljc5MjcgMS41IDEzLjQ3NzcgMi43Mzg3NiAxMy40Nzc3IDQuMjY1NkMxMy40Nzc3IDUuNzkyNDUgMTQuNzkyNyA3LjAzMTIxIDE2LjQxMzUgNy4wMzEyMUMxOC4wMzQzIDcuMDMxMjEgMTkuMzQ5MyA1Ljc5MjQ1IDE5LjM0OTMgNC4yNjU2QzE5LjM0OTMgMi43Mzg3NiAxOC4wMzQzIDEuNSAxNi40MTM1IDEuNVpNMTYuNDEzNSA3LjAzMTIxQzE0Ljk0NTYgNy4wMzEyMSAxMy42NzI3IDcuNzY5NDIgMTIuOTg4NCA4Ljg3NDk0QzE0LjQ1NjMgOS4wNTg1OSAxNS43MjE2IDkuNzg2MDEgMTYuNTA1MyAxMC44OTE1QzE2LjUwNTMgMTAuNTI0MiAxNi40MTM1IDEwLjE2NDEgMTYuNDEzNSA5Ljc5NjgxQzE2LjQxMzUgOC43ODEzMSAxNi43MTE3IDcuODU1ODQgMTcuMzAwNCA3LjExNzYzQzE3LjAwNiA3LjAyNCAxNi43MDc5IDcuMDMxMjEgMTYuNDEzNSA3LjAzMTIxWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC40Ii8+CjwvZz4KPC9zdmc+Cg==";const mm=A("div")({name:"Container",class:"ckff0a9",propsAsIs:!1}),dm=A("div")({name:"Content",class:"czw1kx1",propsAsIs:!1}),pm=A("div")({name:"InviteGameIconWrap",class:"i2e7ir3",propsAsIs:!1}),ym=A("img")({name:"InviteGameIcon",class:"i2tfvcu",propsAsIs:!1}),gm=A("div")({name:"Heading",class:"hnq23ee",propsAsIs:!1}),fm=A("div")({name:"Subtext",class:"s2drh5v",propsAsIs:!1}),Tm=A("button")({name:"InvateBtn",class:"iiwwayv",propsAsIs:!1}),km=({inviteCardTitle:n,inviteCardSubtext:e,primaryColor:t})=>k.jsx(mm,{children:k.jsxs(dm,{children:[k.jsx(pm,{style:{backgroundColor:t},children:k.jsx(ym,{alt:"invite-game-icon",src:um})}),k.jsx(gm,{children:n||""}),k.jsx(fm,{children:e||""}),k.jsx(Tm,{onClick:()=>{},style:{backgroundColor:t},children:"Invite friends!"})]})}),kn={steps:!1,rules:!1,inviteCard:!1},hm=({gamification:n,closeFeature:e,steps:t,gameIcon:s,sponsorLogo:a,rules:r,rulesBtnLabel:o,rulesTitle:l,primaryColor:m,inviteCardTitle:d,inviteCardSubtext:y,inviteCardBtnLabel:T})=>{const f=async()=>{await n.submitInplay()},M=()=>{e()},[E,w]=Q.useState(0),[L,O]=Q.useState(kn);Q.useEffect(()=>{t!=null&&t.length?O({...kn,steps:!0}):r!=null&&r.length?O({...kn,rules:!0}):O({...kn,inviteCard:!0})},[]);const R=Q.useCallback(()=>{t!=null&&t.length&&E<t.length-1?w(x=>++x):r!=null&&r.length&&L.steps?O({...kn,rules:!0}):L.rules&&O({...kn,inviteCard:!0})},[E,t==null?void 0:t.length,r==null?void 0:r.length,L,w,O]);return k.jsxs(Fu,{children:[k.jsxs(Yu,{children:[k.jsx(Vu,{children:s&&k.jsx(qu,{alt:"sponsor-one-onboarding-icon",src:s})}),k.jsxs($u,{children:[a&&k.jsx(Wu,{alt:"sponsor-two-onboarding-icon",src:a}),k.jsx(Hu,{onClick:M,children:k.jsx(Zu,{alt:"icon-close-onboarding",src:Fa})})]})]}),k.jsxs(Gu,{children:[L.steps&&(t==null?void 0:t.length)&&k.jsx(tm,{graphic:t[E].graphic,headline:t[E].headline}),L.rules&&k.jsx(lm,{rules:r,rulesTitle:l,primaryColor:m}),L.inviteCard&&k.jsx(km,{inviteCardTitle:d,inviteCardSubtext:y,primaryColor:m})]}),k.jsx(Ku,{onClick:L.inviteCard?f:R,children:L.rules?o||"Got it!":L.inviteCard?T||"Play now!":"Next"})]})},Ae=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"}]),Mm=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"}]),Xe=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"}]),Nm=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"}]),Im=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"}]),Kn=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"}]),Ui=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"}]),Sm=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"}]),Am=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"}]),Em=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"}]),bm=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"}]),Dm=c.makeEnum("streamlayer.interactive.QuestionSkipReason",[{no:0,name:"QUESTION_SKIP_REASON_UNSET",localName:"UNSET"},{no:1,name:"QUESTION_SKIP_REASON_OVERDUE",localName:"OVERDUE"}]),_m=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"}]),wm=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(Im)},{no:2,name:"images",kind:"enum",T:c.getEnumType(Kn)},{no:3,name:"primary_color",kind:"scalar",T:9},{no:4,name:"position",kind:"enum",T:c.getEnumType(Nm)},{no:5,name:"auto_hide_interval",kind:"scalar",T:4}]),Ln=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(Ui)},{no:5,name:"body",kind:"scalar",T:9},{no:6,name:"image_mode",kind:"enum",T:c.getEnumType(Kn)}]),vm=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}]),Om=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}]),en=c.makeMessageType("streamlayer.interactive.AnswerFeedback",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9}]),jm=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}]),Lm=c.makeMessageType("streamlayer.interactive.WebLink",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),Rm=c.makeMessageType("streamlayer.interactive.CTAButton",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"color",kind:"scalar",T:9}]),xm=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:Rm}]),Wa=c.makeMessageType("streamlayer.interactive.QuestionOptions",()=>[{no:1,name:"poll",kind:"message",T:Cm,oneof:"options"},{no:2,name:"trivia",kind:"message",T:zm,oneof:"options"},{no:3,name:"prediction",kind:"message",T:Um,oneof:"options"},{no:4,name:"factoid",kind:"message",T:Pm,oneof:"options"},{no:5,name:"tweet",kind:"message",T:Bm,oneof:"options"},{no:6,name:"promotion",kind:"message",T:Fm,oneof:"options"}]),Cm=c.makeMessageType("streamlayer.interactive.QuestionOptions.PollOptions",[],{localName:"QuestionOptions_PollOptions"}),zm=c.makeMessageType("streamlayer.interactive.QuestionOptions.TriviaOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:en},{no:2,name:"incorrect_feedback",kind:"message",T:en},{no:3,name:"points",kind:"scalar",T:4}],{localName:"QuestionOptions_TriviaOptions"}),Um=c.makeMessageType("streamlayer.interactive.QuestionOptions.PredictionOptions",()=>[{no:1,name:"correct_feedback",kind:"message",T:en},{no:2,name:"incorrect_feedback",kind:"message",T:en}],{localName:"QuestionOptions_PredictionOptions"}),Pm=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:jm},{no:4,name:"web_link",kind:"message",T:Lm}],{localName:"QuestionOptions_FactoidOptions"}),Bm=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"}),Fm=c.makeMessageType("streamlayer.interactive.QuestionOptions.PromotionOptions",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(Sm)},{no:2,name:"sponsor",kind:"message",T:Ln},{no:3,name:"banner",kind:"message",T:xm},{no:4,name:"enable_wallet",kind:"enum",T:c.getEnumType(Am)}],{localName:"QuestionOptions_PromotionOptions"}),Gm=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}]),Ym=c.makeMessageType("streamlayer.interactive.QuestionAi",()=>[{no:1,name:"verified",kind:"scalar",T:8}]),Pi=c.makeMessageType("streamlayer.interactive.Question",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(Ae)},{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:Ln},{no:7,name:"notification",kind:"message",T:wt},{no:8,name:"answers",kind:"message",T:vm,repeated:!0},{no:9,name:"status",kind:"enum",T:c.getEnumType(Xe)},{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:Se},{no:17,name:"tags",kind:"message",T:Gm,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(Mm)},{no:22,name:"ai",kind:"message",T:Ym}]),Ha=c.makeMessageType("streamlayer.interactive.ExtendedQuestion",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(Ae)},{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:Ln},{no:7,name:"notification",kind:"message",T:wt},{no:8,name:"answers",kind:"message",T:Om,repeated:!0},{no:9,name:"status",kind:"enum",T:c.getEnumType(Xe)},{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(Ae)},{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(Xe)},{no:6,name:"options",kind:"message",T:Wa},{no:7,name:"notification",kind:"message",T:wt}]);const Bi=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:Ln},{no:4,name:"onboarding_enabled",kind:"scalar",T:8},{no:5,name:"question",kind:"message",T:Vm},{no:6,name:"sponsors",kind:"message",T:Wm},{no:7,name:"notification",kind:"message",T:Hm},{no:8,name:"activated_at",kind:"message",T:Se},{no:9,name:"deactivated_at",kind:"message",T:Se},{no:10,name:"question_auto_post",kind:"message",T:Zm},{no:11,name:"bypass_notifications",kind:"message",T:Ka},{no:12,name:"importer_collaboration",kind:"message",T:rd}]),Vm=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings",()=>[{no:1,name:"appearance",kind:"message",T:qa},{no:2,name:"trivia",kind:"message",T:$m},{no:3,name:"prediction",kind:"message",T:qm},{no:4,name:"correct_feedbacks",kind:"message",T:en,repeated:!0},{no:5,name:"incorrect_feedbacks",kind:"message",T:en,repeated:!0}],{localName:"EventModeration_QuestionSettings"}),$m=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.TriviaCardSettings",()=>[{no:1,name:"points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_TriviaCardSettings"}),qm=c.makeMessageType("streamlayer.interactive.EventModeration.QuestionSettings.PredictionCardSettings",()=>[{no:1,name:"max_points",kind:"scalar",T:13}],{localName:"EventModeration_QuestionSettings_PredictionCardSettings"}),Wm=c.makeMessageType("streamlayer.interactive.EventModeration.SponsorshipSettings",()=>[{no:1,name:"sponsors",kind:"message",T:Ln,repeated:!0}],{localName:"EventModeration_SponsorshipSettings"}),Hm=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(Ui)},{no:4,name:"image_mode",kind:"enum",T:c.getEnumType(Kn)}],{localName:"EventModeration_NotificationSettings"}),Zm=c.makeMessageType("streamlayer.interactive.QuestionAutoPost",()=>[{no:1,name:"state",kind:"enum",T:c.getEnumType(Em)},{no:2,name:"interval",kind:"scalar",T:13},{no:3,name:"next_post_time",kind:"message",T:Se},{no:4,name:"start_mode",kind:"enum",T:c.getEnumType(bm)},{no:5,name:"start_options",kind:"message",T:Km}]),Km=c.makeMessageType("streamlayer.interactive.QuestionAutoPostStartOptions",()=>[{no:1,name:"time",kind:"message",T:Jm,oneof:"options"}]),Jm=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}]),Xm=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:ed},{no:3,name:"statistics",kind:"message",T:nd,repeated:!0}]);const ed=c.makeMessageType("streamlayer.interactive.QuestionStats.QuestionData",()=>[{no:1,name:"status",kind:"enum",T:c.getEnumType(Xe)}],{localName:"QuestionStats_QuestionData"}),nd=c.makeMessageType("streamlayer.interactive.AnswerVotesStats",()=>[{no:1,name:"answer_id",kind:"scalar",T:9},{no:2,name:"votes",kind:"message",T:td}]),td=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(_m)}]),ad=c.makeMessageType("streamlayer.interactive.ImportError",()=>[{no:1,name:"row_id",kind:"scalar",T:9},{no:2,name:"message",kind:"scalar",T:9}]),sd=c.makeMessageType("streamlayer.interactive.ImportProgress",()=>[{no:1,name:"import_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:c.getEnumType(wm)},{no:3,name:"errors",kind:"message",T:ad,repeated:!0},{no:4,name:"last_updated",kind:"message",T:Se}]),rd=c.makeMessageType("streamlayer.interactive.ImporterCollaboration",()=>[{no:1,name:"imports",kind:"map",K:9,V:{kind:"message",T:sd}}]),Qn=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"}]),Qi=c.makeMessageType("streamlayer.interactive.feed.FeedQuestion",()=>[{no:1,name:"question",kind:"message",T:Pi},{no:2,name:"notification",kind:"message",T:wt},{no:3,name:"moderation",kind:"message",T:Bi}]),id=c.makeMessageType("streamlayer.interactive.feed.SubscriptionRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9},{no:2,name:"feed_id",kind:"scalar",T:9}]),od=c.makeMessageType("streamlayer.interactive.feed.SubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:cd}]),cd=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:Qi}],{localName:"SubscriptionResponse_SubscriptionResponseData"}),ld=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionRequest",()=>[{no:1,name:"feed_id",kind:"scalar",T:9},{no:2,name:"question_id",kind:"scalar",T:9}]),ud=c.makeMessageType("streamlayer.interactive.feed.VotingSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:md}]),md=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"}),dd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscription",()=>[{no:1,name:"question",kind:"message",T:Ha}]),pd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),yd=c.makeMessageType("streamlayer.interactive.feed.QuestionSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:gd}]),gd=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:dd}],{localName:"QuestionSubscriptionResponse_QuestionSubscriptionResponseData"}),fd=c.makeMessageType("streamlayer.interactive.feed.QuestionByUser",()=>[{no:1,name:"question",kind:"message",T:Ha}]),Td=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserRequest",()=>[{no:1,name:"question_id",kind:"scalar",T:9}]),kd=c.makeMessageType("streamlayer.interactive.feed.QuestionByUserResponse",()=>[{no:1,name:"data",kind:"message",T:hd}]),hd=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:fd}],{localName:"QuestionByUserResponse_QuestionByUserResponseData"}),Md=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest",()=>[{no:1,name:"filter",kind:"message",T:Nd}]),Nd=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionRequest.SyncQuestionRequestFilter",()=>[{no:1,name:"event_id",kind:"scalar",T:9}],{localName:"SyncQuestionRequest_SyncQuestionRequestFilter"}),Id=c.makeMessageType("streamlayer.interactive.feed.SyncQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Sd}]),Sd=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:Qi}],{localName:"SyncQuestionResponse_SyncQuestionResponseData"}),Ad=c.makeMessageType("streamlayer.interactive.feed.GetQuestionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ed=c.makeMessageType("streamlayer.interactive.feed.GetQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:bd}]),bd=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:Pi}],{localName:"GetQuestionResponse_GetQuestionResponseData"}),Dd=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),_d=c.makeMessageType("streamlayer.interactive.feed.QuestionDetailResponse",()=>[{no:1,name:"data",kind:"message",T:wd}]),wd=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}]),vd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerRequest",()=>[{no:1,name:"data",kind:"message",T:Od}]),Od=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"}),jd=c.makeMessageType("streamlayer.interactive.feed.SubmitAnswerResponse",()=>[{no:1,name:"data",kind:"message",T:Ld}]),Ld=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"}),Rd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest",()=>[{no:1,name:"data",kind:"message",T:xd}]),xd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayRequest.SubmitRequestData",()=>[{no:1,name:"event_id",kind:"scalar",T:13}],{localName:"SubmitInplayRequest_SubmitRequestData"}),Cd=c.makeMessageType("streamlayer.interactive.feed.SubmitInplayResponse",[]),zd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest",()=>[{no:1,name:"data",kind:"message",T:Ud}]),Ud=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionRequest.SkipQuestionRequestData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"reason",kind:"enum",T:c.getEnumType(Dm)}],{localName:"SkipQuestionRequest_SkipQuestionRequestData"}),Pd=c.makeMessageType("streamlayer.interactive.feed.SkipQuestionResponse",()=>[{no:1,name:"data",kind:"message",T:Bd}]),Bd=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(Ae),repeated:!0},{no:3,name:"event_id",kind:"scalar",T:9},{no:2,name:"pagination",kind:"message",T:Za}]),Fd=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(Qn)},{no:4,name:"question_type",kind:"enum",T:c.getEnumType(Ae)},{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(Xe)}]),Gd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Yd,repeated:!0},{no:2,name:"meta",kind:"message",T:Vd}]),Yd=c.makeMessageType("streamlayer.interactive.feed.PickHistoryResponse.PickHistoryResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Fd}],{localName:"PickHistoryResponse_PickHistoryResponseData"}),Vd=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"}),$d=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),qd=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(Kn)}]),Wd=c.makeMessageType("streamlayer.interactive.feed.InsightHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Hd,repeated:!0}]),Hd=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:qd}],{localName:"InsightHistoryResponse_InsightHistoryResponseData"}),Zd=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),Kd=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}]),Jd=c.makeMessageType("streamlayer.interactive.feed.TweetHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:Xd,repeated:!0}]),Xd=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:Kd}],{localName:"TweetHistoryResponse_TweetHistoryResponseData"}),ep=c.makeMessageType("streamlayer.interactive.feed.InteractiveFeed",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"options",kind:"message",T:np},{no:3,name:"moderation",kind:"message",T:Bi}]),np=c.makeMessageType("streamlayer.interactive.feed.FeedOptions",()=>[{no:1,name:"onboarding_enabled",kind:"scalar",T:8}]),tp=c.makeMessageType("streamlayer.interactive.feed.GetRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),ap=c.makeMessageType("streamlayer.interactive.feed.GetResponse",()=>[{no:1,name:"data",kind:"message",T:sp}]),sp=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:ep}],{localName:"GetResponse_GetResponseData"}),rp=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9}]),ip=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}]),op=c.makeMessageType("streamlayer.interactive.feed.PromotionHistoryResponse",()=>[{no:1,name:"data",kind:"message",T:cp,repeated:!0}]),cp=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:ip}],{localName:"PromotionHistoryResponse_PromotionHistoryResponseData"}),lp=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}]),up=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}]),mp=c.makeMessageType("streamlayer.sdkSettings.game.common.GamePrize",()=>[{no:1,name:"title",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:9}]),dp=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:up},{no:6,name:"appearance",kind:"message",T:lp},{no:7,name:"prizes",kind:"message",T:mp,repeated:!0},{no:8,name:"completed",kind:"scalar",T:8}]),pp=c.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardMedia",()=>[{no:1,name:"icon",kind:"scalar",T:9},{no:2,name:"sponsor_logo",kind:"scalar",T:9}]),yp=c.makeMessageType("streamlayer.sdkSettings.game.common.TitleCardAppearance",()=>[{no:1,name:"graphic",kind:"scalar",T:9}]),gp=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:pp},{no:7,name:"appearance",kind:"message",T:yp},{no:8,name:"completed",kind:"scalar",T:8}]),fp=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}]),Tp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameOnboarding",()=>[{no:1,name:"steps",kind:"message",T:fp,repeated:!0},{no:2,name:"completed",kind:"scalar",T:8}]),kp=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}]),hp=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}]),Mp=c.makeMessageType("streamlayer.sdkSettings.game.common.GameSettings",()=>[{no:1,name:"overview",kind:"message",T:dp},{no:2,name:"title_card",kind:"message",T:gp},{no:3,name:"onboarding",kind:"message",T:Tp},{no:4,name:"rules",kind:"message",T:kp},{no:5,name:"invite_card",kind:"message",T:hp},{no:6,name:"completed",kind:"scalar",T:8},{no:7,name:"enable",kind:"scalar",T:8}]),Np=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:en,repeated:!0},{no:7,name:"incorrect_feedbacks",kind:"message",T:en,repeated:!0}]),Ip=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(Kn)}]),Sp=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:Ln,repeated:!0}]),Ap=c.makeMessageType("streamlayer.sdkSettings.moderation.common.ModerationSettings",()=>[{no:1,name:"general",kind:"message",T:Np},{no:2,name:"notifications",kind:"message",T:Ip},{no:3,name:"sponsorships",kind:"message",T:Sp}]),we=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"}]),Ep=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"}]),bp=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"}]),Dp=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"}]),Fi=c.makeEnum("streamlayer.sdkSettings.GetStreamEnabled",[{no:0,name:"GETSTREAM_ENABLED_UNSET"},{no:1,name:"GETSTREAM_ENABLED_TRUE"},{no:2,name:"GETSTREAM_ENABLED_FALSE"}]),_p=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"}]),wp=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"}]),vp=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 Op=c.makeMessageType("streamlayer.sdkSettings.TwitterOverlaySettings",()=>[{no:1,name:"accounts",kind:"scalar",T:9,repeated:!0}]),jp=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(Ep)}]),Lp=c.makeMessageType("streamlayer.sdkSettings.CtaImage",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Gi=c.makeMessageType("streamlayer.sdkSettings.BrandDefaults",()=>[{no:1,name:"appearance",kind:"message",T:Rp}]),Rp=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"}),Vs=c.makeMessageType("streamlayer.sdkSettings.BettingOverlaySettings",()=>[{no:1,name:"favorites",kind:"message",T:jp,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(bp)},{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:Lp}]),xp=c.makeMessageType("streamlayer.sdkSettings.GetStreamSettingsClient",()=>[{no:1,name:"enabled",kind:"enum",T:c.getEnumType(Fi)},{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(Dp)}]),Cp=c.makeMessageType("streamlayer.sdkSettings.GetStreamChannels",()=>[{no:1,name:"enabled",kind:"enum",T:c.getEnumType(Fi)},{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}]),Yi=c.makeMessageType("streamlayer.sdkSettings.StreamSettings",()=>[{no:1,name:"overlays",kind:"message",T:vt,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:Gi},{no:10,name:"getstream",kind:"message",T:Cp}]),zp=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:Up,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}]),Up=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"}),Vi=c.makeMessageType("streamlayer.sdkSettings.OrganizationSettings",()=>[{no:1,name:"overlays",kind:"message",T:vt,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:Gi},{no:13,name:"pub",kind:"message",T:zp},{no:14,name:"getstream",kind:"message",T:xp}]),Pp=c.makeMessageType("streamlayer.sdkSettings.GamesOverlaySettings",()=>[{no:1,name:"inplay_game",kind:"message",T:Mp},{no:2,name:"moderation",kind:"message",T:Ap},{no:3,name:"pinned_leaderboard_id",kind:"scalar",T:9},{no:4,name:"leaderboard_kind",kind:"enum",T:c.getEnumType(_p)}]),$s=c.makeMessageType("streamlayer.sdkSettings.GetStreamOverlaySettings",()=>[{no:1,name:"default_channel",kind:"message",T:Tt},{no:2,name:"channels",kind:"message",T:Tt,repeated:!0}]),An=c.makeMessageType("streamlayer.sdkSettings.SdkOverlaySettings",()=>[{no:4,name:"twitter",kind:"message",T:Op,oneof:"overlay_settings"},{no:5,name:"betting",kind:"message",T:Vs,oneof:"overlay_settings"},{no:6,name:"inplay",kind:"message",T:Vs,oneof:"overlay_settings"},{no:7,name:"games",kind:"message",T:Pp,oneof:"overlay_settings"},{no:8,name:"getstream",kind:"message",T:$s,oneof:"overlay_settings"},{no:9,name:"public_chat",kind:"message",T:$s,oneof:"overlay_settings"}]),Bp=c.makeMessageType("streamlayer.sdkSettings.SdkOverlayMeta",()=>[{no:1,name:"organization",kind:"message",T:An},{no:2,name:"global_preset",kind:"message",T:An},{no:3,name:"preset",kind:"message",T:An},{no:4,name:"stream",kind:"message",T:An}]),vt=c.makeMessageType("streamlayer.sdkSettings.SdkOverlay",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(we)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:An},{no:6,name:"meta",kind:"message",T:Bp},{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"}]);c.makeMessageType("streamlayer.sdkSettings.SdkOverlayUpdateData",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(we)},{no:3,name:"position",kind:"scalar",T:5},{no:4,name:"overwrite",kind:"scalar",T:8},{no:5,name:"settings",kind:"message",T:An},{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:vt,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:Fp}]);const Fp=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:Gp}]);const Gp=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:Yp}]);const Yp=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:$p},{no:3,name:"settings",kind:"message",T:Vp}]);const Vp=c.makeMessageType("streamlayer.sdkSettings.PresetSettings",()=>[{no:1,name:"overlays",kind:"message",T:vt,repeated:!0},{no:2,name:"advertising",kind:"message",T:$i}]),$p=c.makeMessageType("streamlayer.sdkSettings.PresetRule",()=>[{no:1,name:"key",kind:"enum",T:c.getEnumType(wp)},{no:2,name:"value",kind:"scalar",T:9}]),qp=c.makeMessageType("streamlayer.sdkSettings.AdvertisingConstraints",()=>[{no:1,name:"images",kind:"message",T:qs},{no:2,name:"videos",kind:"message",T:qs}]),qs=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}]),Wp=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:qp}}]);c.makeMessageType("streamlayer.sdkSettings.AdvertisingTemplates",()=>[{no:1,name:"templates",kind:"message",T:Wp,repeated:!0}]);const Hp=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(vp)}]),Zp=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}]),Kp=c.makeMessageType("streamlayer.sdkSettings.AdvertisingSettings",()=>[{no:1,name:"frequency",kind:"scalar",T:5},{no:2,name:"images",kind:"message",T:Hp,repeated:!0},{no:3,name:"videos",kind:"message",T:Zp,repeated:!0}]),Jp=c.makeMessageType("streamlayer.sdkSettings.AdvertisingOverlaySettings",()=>[{no:1,name:"overlay_type",kind:"enum",T:c.getEnumType(we)},{no:2,name:"settings",kind:"map",K:9,V:{kind:"message",T:Kp}},{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}]),$i=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:Jp}}]);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:Xp}]);const Xp=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:ey}]);const ey=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:ny}]);const ny=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:ty}]);const ty=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"}),ay="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlBvbGwiPgo8cGF0aCBpZD0iTm90aWZpY2F0aW9uL0ljb24vUG9sbCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05Ljc3NzggMS42ODQyMVY1LjA1MjYzSDEzLjMzMzNDMTMuODI0MyA1LjA1MjYzIDE0LjIyMjIgNC42NzU2MSAxNC4yMjIyIDQuMjEwNTNWMi41MjYzMkMxNC4yMjIyIDIuMDYxMjMgMTMuODI0MyAxLjY4NDIxIDEzLjMzMzMgMS42ODQyMUg5Ljc3NzhaTTIuNjY2NjcgMEMxLjE5MzkxIDAgMCAxLjEzMTA3IDAgMi41MjYzMlY0LjIxMDUzQzAgNS42MDU3NyAxLjE5MzkxIDYuNzM2ODQgMi42NjY2NyA2LjczNjg0SDEzLjMzMzNDMTQuODA2MSA2LjczNjg0IDE2IDUuNjA1NzcgMTYgNC4yMTA1M1YyLjUyNjMyQzE2IDEuMTMxMDcgMTQuODA2MSAwIDEzLjMzMzMgMEgyLjY2NjY3Wk00LjQ0NDQ2IDEwLjk0NzNIMTMuMzMzM0MxMy44MjQzIDEwLjk0NzMgMTQuMjIyMiAxMS4zMjQzIDE0LjIyMjIgMTEuNzg5NFYxMy40NzM2QzE0LjIyMjIgMTMuOTM4NyAxMy44MjQzIDE0LjMxNTcgMTMuMzMzMyAxNC4zMTU3SDQuNDQ0NDZWMTAuOTQ3M1pNMCAxMS43ODk0QzAgMTAuMzk0MiAxLjE5MzkxIDkuMjYzMSAyLjY2NjY3IDkuMjYzMUgxMy4zMzMzQzE0LjgwNjEgOS4yNjMxIDE2IDEwLjM5NDIgMTYgMTEuNzg5NFYxMy40NzM2QzE2IDE0Ljg2ODkgMTQuODA2MSAxNS45OTk5IDEzLjMzMzMgMTUuOTk5OUgyLjY2NjY3QzEuMTkzOTEgMTUuOTk5OSAwIDE0Ljg2ODkgMCAxMy40NzM2VjExLjc4OTRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KPC9nPgo8L3N2Zz4K",sy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1ByZWRpY2l0b24iPgo8cGF0aCBpZD0iSWNvbi9QcmVkaWN0aW9uIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTE2IDcuMDA1MjJDMTYgNy4wMDUyMiA5LjIwMDQ4IDYuODE2MDcgOS4yMDA0OCAwQzkuMjAwNDggNi4zNjE2OCAzLjI3NzI5IDYuOTUwNTYgMi40ODc1NiA3LjAwMDc4TDIuNDAwOTQgNy4wMDUyMkMyLjQwMDk0IDcuMDA1MjIgOS4yMDA0OCA3LjE5NDM1IDkuMjAwNDggMTQuMDEwNEM5LjIwMDQ4IDcuNjQ4NzcgMTUuMTIzNCA3LjA1OTg5IDE1LjkxMzEgNy4wMDk2NEwxNiA3LjAwNTIyWk02Ljk3MzgyIDEyLjU2NTJDNi45NzM4MiAxMi41NjUyIDMuNDg2OTEgMTIuNDcyNCAzLjQ4NjkxIDkuMTMwMzNDMy40ODY5MSAxMi4yNDk2IDAuNDQ5NDAyIDEyLjUzODQgMC4wNDQ0MTg2IDEyLjU2M0wwIDEyLjU2NTJDMCAxMi41NjUyIDMuNDg2OTEgMTIuNjU3OSAzLjQ4NjkxIDE2QzMuNDg2OTEgMTIuODgwNyA2LjUyNDI5IDEyLjU5MiA2LjkyOTI3IDEyLjU2NzNMNi45NzM4MiAxMi41NjUyWiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",ry="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikljb24vTm90aWZpY2F0aW9uL1RyaXZpYSI+CjxwYXRoIGlkPSJOb3RpZmljYXRpb24vSWNvbi9Ucml2aWEiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi4wMTY2MyAxLjM4MDhDMC43Mzk5MTMgMS41NTU4NiAtMC4xNTMxNTMgMi43MzI3NiAwLjAyMTkxMiA0LjAwOTQ4TDEuMzgwOCAxMy45MTk2QzEuNTU1ODYgMTUuMTk2MyAyLjczMjc2IDE2LjA4OTQgNC4wMDk0OCAxNS45MTQzTDEzLjkxOTYgMTQuNTU1NEMxNS4xOTYzIDE0LjM4MDMgMTYuMDg5NCAxMy4yMDM0IDE1LjkxNDMgMTEuOTI2N0wxNC41NTU0IDIuMDE2NjNDMTQuMzgwMyAwLjczOTkxMyAxMy4yMDM0IC0wLjE1MzE1MyAxMS45MjY3IDAuMDIxOTEyTDIuMDE2NjMgMS4zODA4Wk05LjU5NjEzIDMuNzg4QzkuMTE0MzEgMy40Njk5MSA4LjQ3ODEzIDMuMzAxNTEgNy43NTY2IDMuMzAxNTFDNy41NDM3NyAzLjMwMTUxIDcuMzI2MjUgMy4zMTY3MSA3LjEwODcyIDMuMzQ0NzhDNi4zODgzNiAzLjQ0MDY3IDUuNjg5MDEgMy43OTAzNCA1LjE4OTY1IDQuMzAxMzhDNC42ODQ0NSA0LjgyMDYyIDQuNDM3NyA1LjQ1NTYzIDQuNTE3MjIgNi4wNDE1MUM0LjU3NDUyIDYuNDc0MiA0LjkwMDc4IDYuNzUzNyA1LjM0NjM1IDYuNzUzN0M1LjM5NDI5IDYuNzUzNyA1LjQ0MzQxIDYuNzUwMiA1LjQ5MTM2IDYuNzQ0MzVDNi4wODc3OCA2LjY2NDgzIDYuMjE2NDIgNi4yNTQzNiA2LjM0MDM2IDUuODU2NzVMNi4zNDA0NSA1Ljg1NjQ4QzYuNDgxOTIgNS40MDQwMSA2LjYxNTM0IDQuOTc3MzEgNy4zODU4NSA0Ljg3NDQ0QzcuNDY1MzcgNC44NjM5MSA3LjU0MTM4IDQuODU4MDYgNy42MTUwNiA0Ljg1ODA2QzguMTY5MzkgNC44NTgwNiA4LjUxNDM2IDUuMTUwNDIgOC41ODQ1NCA1LjY4MjUyQzguNjUzNTMgNi4yMDI5MyA4LjI0MzA3IDYuNjE4MDcgNy44MDY4NCA3LjA1NjZMNy44MDM5MyA3LjA1OTU0QzcuMzE1ODIgNy41NTIzMSA2Ljc2MzkgOC4xMDk1IDYuODY4OTUgOC45MDA4M0M2Ljg5NTg1IDkuMTA1NDggNi45ODU5IDkuMjk0OTMgNy4xMjI3MiA5LjQzNjQ0QzcuMjc4MjYgOS41OTkgNy40ODI5IDkuNjg0MzYgNy43MTMzMSA5LjY4NDM2QzcuNzU1NDEgOS42ODQzNiA3Ljc5ODY4IDkuNjgyMDMgNy44NDMxMSA5LjY3NjE4QzguNDY2OTEgOS41OTMyNCA4LjU1MTYyIDkuMjMxMzkgOC42MzMzOCA4Ljg4MjFMOC42MzM2NSA4Ljg4MDk3TDguNjM2NjEgOC44Njg1OUM4LjY2NzIzIDguNzQwMyA4LjY5ODc3IDguNjA4MTMgOC43NTk5NSA4LjQ4ODA0QzguODQ2NDkgOC4zMTYxMyA5LjA2MjgzIDguMTEyNjUgOS4zMTQyOCA3Ljg3ODc1QzkuOTE0MiA3LjMxODU4IDEwLjczNCA2LjU1MTQzIDEwLjU4MiA1LjQxNTg5QzEwLjQ4NzIgNC43MDYwMyAxMC4xNTUxIDQuMTU3NTcgOS41OTYxMSAzLjc4ODAyTDkuNTk2MTMgMy43ODhaTTguMTE2MDUgMTAuMjhDOC4wNjkyNyAxMC4yOCA4LjAyMTMyIDEwLjI4MzYgNy45NzQ1NCAxMC4yODk0QzcuMzgzOTYgMTAuMzY4OSA2Ljk2NzY1IDEwLjkxMjcgNy4wNDU5OSAxMS41MDMzQzcuMTE3MzMgMTIuMDM3NyA3LjU3ODA4IDEyLjQ0MTIgOC4xMTcyIDEyLjQ0MTJDOC4xNjM5NyAxMi40NDEyIDguMjExOTIgMTIuNDM3NyA4LjI1OTg3IDEyLjQzMThDOC44NTA0NSAxMi4zNTIzIDkuMjY1NiAxMS44MDg1IDkuMTg4NDIgMTEuMjE3OUM5LjExNTkxIDEwLjY4MjMgOC42NTUxNyAxMC4yOCA4LjExNjA1IDEwLjI4WiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC41Ii8+CjwvZz4KPC9zdmc+Cg==",iy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEzLjQzMTUgMy4xODI0Nkw1LjUzMzIxIDExLjA4MDhMMS45OTc3MSA3LjU0NTI3QzEuNTQwNTYgNy4wODgxMSAwLjc5OTkxMyA3LjA4ODExIDAuMzQyODY0IDcuNTQ1MjdDLTAuMTE0Mjg4IDguMDAyNDIgLTAuMTE0Mjg4IDguNzQzMDcgMC4zNDI4NjQgOS4yMDAxMUw0LjcwNTY3IDEzLjU2MjlDNC45MzMzMSAxMy43OTA2IDUuMjM0MTUgMTMuOTA2MyA1LjUzMzA3IDEzLjkwNjNDNS44MzIwMiAxMy45MDYzIDYuMTMwOTYgMTMuNzkyNCA2LjM2MDQ4IDEzLjU2MjlMMTUuMDg2MSA0LjgzNzMxQzE1LjU0MzIgNC4zODAxNiAxNS41NDMyIDMuNjM5NTEgMTUuMDg2MSAzLjE4MjQ2QzE0LjYyOSAyLjcyNTMxIDEzLjg4ODQgMi43MjUzMSAxMy40MzEyIDMuMTgyNDZIMTMuNDMxNVoiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",oy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIyIiB5PSIwLjUwNjEwNCIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDIgMC41MDYxMDQpIiBmaWxsPSIjOWUwYTFmIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB4PSIwLjMzMzAwOCIgeT0iMTIuMTcyOSIgd2lkdGg9IjE2LjQ5OTIiIGhlaWdodD0iMi4zNTcwMiIgcng9IjEuMTc4NTEiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwLjMzMzAwOCAxMi4xNzI5KSIgZmlsbD0iIzllMGExZiIvPgo8L2c+Cjwvc3ZnPgo=",Ws="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTciIHZpZXdCb3g9IjAgMCAxNiAxNyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZXZyb24iPgo8cGF0aCBpZD0iQ2hldnJvbl8yIiBkPSJNMTIgOC4xNzIyMkMxMiA4LjI4NzgzIDExLjk3ODEgOC4zOTU1MyAxMS45MzQyIDguNDk1MzNDMTEuODkwMyA4LjU5NTEzIDExLjgyMiA4LjY4OTkyIDExLjcyOTIgOC43Nzk3TDYuMzY5NDkgMTMuOTQzOUM2LjIxNDYyIDE0LjA5NjUgNi4wMjc0MiAxNC4xNzI5IDUuODA3ODcgMTQuMTcyOUM1LjY1NzUyIDE0LjE3MjkgNS41MjE5MSAxNC4xMzc5IDUuNDAxMDQgMTQuMDY3OUM1LjI4MDE2IDEzLjk5OCA1LjE4MzEgMTMuOTAzOSA1LjEwOTg2IDEzLjc4NTZDNS4wMzY2MiAxMy42NjczIDUgMTMuNTM0NSA1IDEzLjM4NzNDNSAxMy4xNzIxIDUuMDgyODggMTIuOTgxOCA1LjI0ODYzIDEyLjgxNjRMMTAuMDgwNyA4LjE3MDk1TDUuMjQ4NjMgMy41Mjc5OUM1LjA4Mjg4IDMuMzY0MjUgNSAzLjE3NDM5IDUgMi45NTg0MUM1IDIuODExMTggNS4wMzY2MiAyLjY3ODQyIDUuMTA5ODYgMi41NjAxM0M1LjE4MzEgMi40NDE4MyA1LjI4MDE2IDIuMzQ3NzEgNS40MDEwNCAyLjI3Nzc3QzUuNTIxOTEgMi4yMDc4MiA1LjY1NzUyIDIuMTcyODUgNS44MDc4NyAyLjE3Mjg1QzYuMDI3NDIgMi4xNzI4NSA2LjIxNDYyIDIuMjQ3MzEgNi4zNjk0OSAyLjM5NjI0TDExLjcyOTIgNy41NjQ3M0MxMS44MjExIDcuNjU0NTEgMTEuODg5IDcuNzQ5MDkgMTEuOTMyOSA3Ljg0ODQ2QzExLjk3NjggNy45NDc4NCAxMS45OTkxIDguMDU1NzYgMTIgOC4xNzIyMloiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const cy=A("div")({name:"Panel",class:"p1fl4kim",propsAsIs:!1}),ly=A("div")({name:"QuestionTypeIconWrap",class:"qqhwgfn",propsAsIs:!1}),uy=A("img")({name:"QuestionTypeIcon",class:"q1lyf5nv",propsAsIs:!1}),my=A("div")({name:"QuestionContent",class:"qlmoky7",propsAsIs:!1}),dy=A("div")({name:"QuestionTypeLabel",class:"qp1y7hu",propsAsIs:!1}),py=A("div")({name:"QuestionSubject",class:"q1de583k",propsAsIs:!1}),yy=A("button")({name:"QuestionActionTitle",class:"ql7tvph",propsAsIs:!1}),gy=A("button")({name:"QuestionActionIcon",class:"qh0ibjl",propsAsIs:!1}),fy=A("img")({name:"QuestionStatusIcon",class:"q1bdpn1b",propsAsIs:!1}),Ty=A("span")({name:"QuestionTypeTitle",class:"q6tdooc",propsAsIs:!1}),ky=A("span")({name:"ExpiredQuestion",class:"e1f2al71",propsAsIs:!1}),hy={[Ae.POLL]:{label:"Poll",icon:ay},[Ae.TRIVIA]:{label:"Trivia",icon:ry},[Ae.PREDICTION]:{label:"Prediction",icon:sy}},My={[Qn.LOST]:oy,[Qn.WON]:iy,[Qn.UNSET]:Ws,[Qn.DNP]:Ws},Ny=({questionId:n,questionType:e,questionStatus:t,subject:s,openForVoting:a,openQuestion:r,status:o})=>{const l=hy[e];return l===void 0?null:k.jsxs(cy,{onClick:()=>r==null?void 0:r(n),children:[k.jsx(ly,{children:k.jsx(uy,{alt:"question-type-icon",src:l.icon})}),k.jsxs(my,{children:[k.jsxs(dy,{children:[k.jsx(Ty,{children:l.label}),e===Ae.TRIVIA&&t===Xe.RESOLVED&&k.jsx(ky,{children:"Expired"})]}),k.jsx(py,{children:s||""})]}),a?k.jsx(yy,{children:"play"}):k.jsx(gy,{children:k.jsx(fy,{alt:"question-status-icon",src:My[o]})})]})};const Iy=A("div")({name:"Container",class:"c4iwna9",propsAsIs:!1}),Sy=A("div")({name:"Title",class:"th1ieuk",propsAsIs:!1}),Ay=A("div")({name:"ItemsContainer",class:"iiqbvdu",propsAsIs:!1}),Ey=({questions:n,openQuestion:e})=>k.jsxs(Iy,{children:[k.jsx(Sy,{children:"PICK HISTORY"}),k.jsx(Ay,{children:n==null?void 0:n.map(t=>k.jsx(Ny,{openQuestion:e,...t},t.questionId))})]}),by="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjc2OTE2IDMuNTAwMDJDMi43NjkxNiA0LjQ5Nzg2IDIuOTQ3MDUgNS4zODM0OCAzLjMwMjgyIDYuMTU2OTJDMi42MjQ5MyA2LjAxODQ3IDIuMDU4ODMgNS43NDg3MiAxLjYwNDUgNS4zNDc2OEMxLjE1MDE3IDQuOTQ2NjMgMC45MjMwMDggNC41NTk5MiAwLjkyMzAwOCA0LjE4NzUyVjMuNTAwMDJIMi43NjkxNlpNMTEuMDc2OCAzLjUwMDAyVjQuMTg3NTJDMTEuMDc2OCA0LjU1OTkyIDEwLjg0OTcgNC45NDY2MyAxMC4zOTUzIDUuMzQ3NjhDOS45NDEgNS43NDg3MiA5LjM3NDkgNi4wMTg0NyA4LjY5NzAxIDYuMTU2OTJDOS4wNTI3OCA1LjM4MzQ4IDkuMjMwNjYgNC40OTc4NiA5LjIzMDY2IDMuNTAwMDJIMTEuMDc2OFpNMTIgNC4xODc1VjMuMjcwODNDMTIgMy4wNzk4NiAxMS45MzI3IDIuOTE3NTQgMTEuNzk4MSAyLjc4Mzg1QzExLjY2MzUgMi42NTAxNyAxMS41IDIuNTgzMzMgMTEuMzA3NyAyLjU4MzMzSDkuMjMwNzdWMS44OTU4M0M5LjIzMDc3IDEuNTgwNzMgOS4xMTc3OSAxLjMxMDk4IDguODkxODMgMS4wODY1OUM4LjY2NTg2IDAuODYyMTk1IDguMzk0MjMgMC43NSA4LjA3NjkyIDAuNzVIMy45MjMwOEMzLjYwNTc3IDAuNzUgMy4zMzQxNCAwLjg2MjE5NSAzLjEwODE3IDEuMDg2NTlDMi44ODIyMSAxLjMxMDk4IDIuNzY5MjMgMS41ODA3MyAyLjc2OTIzIDEuODk1ODNWMi41ODMzM0gwLjY5MjMwOEMwLjQ5OTk5OSAyLjU4MzMzIDAuMzM2NTM5IDIuNjUwMTcgMC4yMDE5MjMgMi43ODM4NUMwLjA2NzMwNyAyLjkxNzU0IDAgMy4wNzk4NiAwIDMuMjcwODNWNC4xODc1QzAgNC41MjY0OCAwLjA5OTc1ODYgNC44Njc4NCAwLjI5OTI3OSA1LjIxMTU5QzAuNDk4Nzk5IDUuNTU1MzQgMC43NjgwMjcgNS44NjU2NyAxLjEwNjk3IDYuMTQyNThDMS40NDU5MiA2LjQxOTQ5IDEuODYxNzggNi42NTIyMyAyLjM1NDU3IDYuODQwODJDMi44NDczNiA3LjAyOTQxIDMuMzY1MzggNy4xMzU2MyAzLjkwODY1IDcuMTU5NTFDNC4xMTA1OCA3LjQxNzMyIDQuMzM4OTQgNy42NDQxIDQuNTkzNzUgNy44Mzk4NEM0Ljc3NjQ0IDguMDAyMTcgNC45MDI2NCA4LjE3NTI0IDQuOTcyMzYgOC4zNTkwNUM1LjA0MjA3IDguNTQyODYgNS4wNzY5MiA4Ljc1NjUxIDUuMDc2OTIgOUM1LjA3NjkyIDkuMjU3ODEgNS4wMDM2MSA5LjQ3NTA0IDQuODU2OTcgOS42NTE2OUM0LjcxMDM0IDkuODI4MzQgNC40NzU5NiA5LjkxNjY3IDQuMTUzODUgOS45MTY2N0MzLjc5MzI3IDkuOTE2NjcgMy40NzIzNiAxMC4wMjUzIDMuMTkxMTEgMTAuMjQyNUMyLjkwOTg1IDEwLjQ1OTcgMi43NjkyMyAxMC43MzMxIDIuNzY5MjMgMTEuMDYyNVYxMS41MjA4QzIuNzY5MjMgMTEuNTg3NyAyLjc5MDg3IDExLjY0MjYgMi44MzQxMyAxMS42ODU1QzIuODc3NCAxMS43Mjg1IDIuOTMyNjkgMTEuNzUgMyAxMS43NUg5QzkuMDY3MzEgMTEuNzUgOS4xMjI2IDExLjcyODUgOS4xNjU4NiAxMS42ODU1QzkuMjA5MTMgMTEuNjQyNiA5LjIzMDc3IDExLjU4NzcgOS4yMzA3NyAxMS41MjA4VjExLjA2MjVDOS4yMzA3NyAxMC43MzMxIDkuMDkwMTUgMTAuNDU5NyA4LjgwODg5IDEwLjI0MjVDOC41Mjc2NCAxMC4wMjUzIDguMjA2NzMgOS45MTY2NyA3Ljg0NjE1IDkuOTE2NjdDNy41MjQwNCA5LjkxNjY3IDcuMjg5NjYgOS44MjgzNCA3LjE0MzAzIDkuNjUxNjlDNi45OTYzOSA5LjQ3NTA0IDYuOTIzMDggOS4yNTc4MSA2LjkyMzA4IDlDNi45MjMwOCA4Ljc1NjUxIDYuOTU3OTMgOC41NDI4NiA3LjAyNzY0IDguMzU5MDVDNy4wOTczNiA4LjE3NTI0IDcuMjIzNTYgOC4wMDIxNyA3LjQwNjI1IDcuODM5ODRDNy42NjEwNiA3LjY0NDEgNy44ODk0MiA3LjQxNzMyIDguMDkxMzUgNy4xNTk1MUM4LjYzNDYyIDcuMTM1NjMgOS4xNTI2NCA3LjAyOTQxIDkuNjQ1NDMgNi44NDA4MkMxMC4xMzgyIDYuNjUyMjMgMTAuNTU0MSA2LjQxOTQ5IDEwLjg5MyA2LjE0MjU4QzExLjIzMiA1Ljg2NTY3IDExLjUwMTIgNS41NTUzNCAxMS43MDA3IDUuMjExNTlDMTEuOTAwMiA0Ljg2Nzg0IDEyIDQuNTI2NDggMTIgNC4xODc1Wk01LjA3MDMzIDUuMzg0OTFMNi4wMzgzIDQuODc1MDNMNy4wMDYyNyA1LjM4NDkxTDYuODIxNCA0LjMwNDk3TDcuNjA0NTEgMy41NDAxNkw2LjUyMjI4IDMuMzgyNkw2LjAzODMgMi40MDAwM0w1LjU1NDMxIDMuMzgyNkw0LjQ3MjA5IDMuNTQwMTZMNS4yNTUxOSA0LjMwNDk3TDUuMDcwMzMgNS4zODQ5MVoiIGZpbGw9IiNGMkM5NEMiLz4KPC9nPgo8L3N2Zz4K",Dy=n=>n.split(/\s+/).map(e=>e[0]).join("").toUpperCase();const _y=A("div")({name:"Container",class:"c13i6lze",propsAsIs:!1}),wy=A("div")({name:"Indicator",class:"ix2bv9",propsAsIs:!1}),at=({indicator:n,title:e})=>k.jsxs(_y,{children:[k.jsx(wy,{children:n}),k.jsx("p",{children:e})]});const vy=A("div")({name:"Container",class:"c5ghaaw",propsAsIs:!1}),Oy=A("div")({name:"Title",class:"txfzjhj",propsAsIs:!1}),jy=A("div")({name:"Indicator",class:"i1v0wmto",propsAsIs:!1}),Hs=({indicator:n,title:e})=>k.jsxs(vy,{children:[k.jsx(Oy,{children:e}),k.jsx(jy,{children:n})]});const Ly=A("div")({name:"Container",class:"canai20",propsAsIs:!1}),Ry=A("div")({name:"TopInfo",class:"tda0d57",propsAsIs:!1}),xy=A("div")({name:"BottomInfo",class:"boqy4xv",propsAsIs:!1}),Cy=A("div")({name:"User",class:"u1dtpq3t",propsAsIs:!1}),zy=A("img")({name:"Avatar",class:"ar4jfc",propsAsIs:!1}),Uy=A("div")({name:"UserInfo",class:"u1trcvj0",propsAsIs:!1}),Py=A("div")({name:"UserName",class:"u1pie8mc",propsAsIs:!1}),By=A("div")({name:"UserRating",class:"ucsljfb",propsAsIs:!1}),Qy=A("img")({name:"TrophyIcon",class:"tyemu1i",propsAsIs:!1}),Fy=A("div")({name:"Rts",class:"rggn4k7",propsAsIs:!1}),Gy=A("div")({name:"RtsIndicator",class:"rnmjsbm",propsAsIs:!1}),Yy=A("div")({name:"Top",class:"t1i7e651",propsAsIs:!1}),Vy=A("div")({name:"Ranks",class:"r1mt107z",propsAsIs:!1}),$y=A("div")({name:"AvatarPlaceholder",class:"apag0gc",propsAsIs:!1}),qy=A("button")({name:"UserAccountBtn",class:"uroanb5",propsAsIs:!1}),Wy=({avatar:n,name:e,points:t,grade:s,friendsRank:a,globalRank:r,winStreak:o,correct:l,incorrect:m,successRate:d})=>k.jsxs(Ly,{children:[k.jsxs(Ry,{children:[k.jsxs(Cy,{children:[k.jsxs(qy,{children:[n&&k.jsx(zy,{alt:"avatar",src:n}),!n&&k.jsx($y,{children:Dy(e)})]}),k.jsxs(Uy,{children:[k.jsx(Py,{children:e}),k.jsxs(By,{children:[k.jsx(Qy,{alt:"rank-icon",src:by}),k.jsxs(Fy,{children:[k.jsx(Gy,{children:t||"-"}),"RTS"]}),k.jsxs(Yy,{children:["TOP ",s,"%"]})]})]})]}),k.jsxs(Vy,{children:[k.jsx(Hs,{title:"Friens rank",indicator:a||"-"}),k.jsx(Hs,{title:"Global rank",indicator:r||"-"})]})]}),k.jsxs(xy,{children:[k.jsx(at,{indicator:o||"-",title:"Win streak"}),k.jsx(at,{indicator:l||"-",title:"Correct"}),k.jsx(at,{indicator:m||"-",title:"Incorrect"}),k.jsx(at,{indicator:`${d||"-"}%`,title:"Success rate"})]})]}),_a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiMwMEJENjAiLz4KPC9nPgo8L3N2Zz4K",Hy="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeT0iMC4wMDE5NTMxMiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iMTIiIGZpbGw9IiNGODAwMjIiLz4KPHJlY3QgeD0iOC4yNSIgeT0iNy4wMDE5NSIgd2lkdGg9IjEyLjM3NDQiIGhlaWdodD0iMS43Njc3NyIgcng9IjAuODgzODg0IiB0cmFuc2Zvcm09InJvdGF0ZSg0NSA4LjI1IDcuMDAxOTUpIiBmaWxsPSJ3aGl0ZSIvPgo8cmVjdCB4PSI3IiB5PSIxNS43NTIiIHdpZHRoPSIxMi4zNzQ0IiBoZWlnaHQ9IjEuNzY3NzciIHJ4PSIwLjg4Mzg4NCIgdHJhbnNmb3JtPSJyb3RhdGUoLTQ1IDcgMTUuNzUyKSIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==",Zs="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkNoZWNrbWFyayI+CjxwYXRoIGlkPSJTZWxlY3RlZCIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yNCAxMi4wMDJDMjQgMTguNjI5NCAxOC42Mjc0IDI0LjAwMiAxMiAyNC4wMDJDNS4zNzI1OCAyNC4wMDIgMCAxOC42Mjk0IDAgMTIuMDAyQzAgNS4zNzQ1NCA1LjM3MjU4IDAuMDAxOTUzMTIgMTIgMC4wMDE5NTMxMkMxOC42Mjc0IDAuMDAxOTUzMTIgMjQgNS4zNzQ1NCAyNCAxMi4wMDJaTTE3LjQwODYgOC4xNTM1N0MxNi45NCA3LjY4NDk0IDE2LjE4MDIgNy42ODQ5NCAxNS43MTE2IDguMTUzNTdMMTAuNDA3MiAxNC45NTc5TDcuNjI1NzMgMTMuMTAzNkM3LjA3NDI5IDEyLjczNiA2LjMyOTI1IDEyLjg4NSA1Ljk2MTYzIDEzLjQzNjVDNS41OTQwMSAxMy45ODc5IDUuNzQzMDEgMTQuNzMyOSA2LjI5NDQ1IDE1LjEwMDZMOS44OTQ0NSAxNy41MDA2QzEwLjM3MDQgMTcuODE3OSAxMS4wMDQxIDE3Ljc1NTEgMTEuNDA4NiAxNy4zNTA2TDE3LjQwODYgOS44NTA2M0MxNy44NzcyIDkuMzgyIDE3Ljg3NzIgOC42MjIyIDE3LjQwODYgOC4xNTM1N1oiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8L3N2Zz4K";const qi=A("div")({name:"Container",class:"c4emhbe",propsAsIs:!1}),Zy=()=>qi,Ky=A(Zy())({name:"AnsweredContainer",class:"a1a18ay2",propsAsIs:!0}),Ks=A("div")({name:"ButtonPct",class:"bvdmnzn",propsAsIs:!1}),Js=A("button")({name:"Button",class:"bz55cek",propsAsIs:!1}),Xs=A("img")({name:"Icon",class:"i1u5zlvm",propsAsIs:!1}),er=A("span")({name:"Title",class:"tfilm7j",propsAsIs:!1}),nr=A("span")({name:"Indicators",class:"iqdzfbw",propsAsIs:!1}),tr=A("div")({name:"CheckIconWrap",class:"ciu4mnt",propsAsIs:!1}),Kt=A("div")({name:"Percentage",class:"pl06bzo",propsAsIs:!1}),ar=A("img")({name:"CheckIcon",class:"c5bwq34",propsAsIs:!1}),Jy=({icon:n,id:e,title:t,questionId:s,disabled:a,percentage:r,onVote:o,toggleIsLoadingSubmitAnswer:l,correct:m,questionAnswered:d,hasCorrectAnswer:y,answered:T,points:f,questionType:M})=>{var E;return d&&T?k.jsxs(Ky,{"data-answeredCorrect":(E=!y||m)==null?void 0:E.toString(),"data-questionAnswered":"false",children:[k.jsx(Ks,{style:{width:`${r}%`}}),k.jsxs(Js,{disabled:a,onClick:()=>o(s,e),children:[n&&k.jsx(Xs,{alt:"option-icon",src:n}),k.jsx(er,{children:t}),k.jsxs(nr,{children:[y&&m&&k.jsx(tr,{children:k.jsx(ar,{alt:"icon-correct",src:T?Zs:_a})}),k.jsxs(Kt,{children:[r,"%"]})]})]})]}):k.jsxs(qi,{"data-questionAnswered":d==null?void 0:d.toString(),children:[d&&k.jsx(Ks,{style:{width:`${r}%`}}),k.jsxs(Js,{disabled:a,onClick:()=>{l(!0),o(s,e)},children:[n&&k.jsx(Xs,{alt:"option-icon",src:n}),k.jsx(er,{children:t}),d?k.jsxs(nr,{children:[y&&m&&k.jsx(tr,{children:k.jsx(ar,{alt:"icon-correct",src:T?Zs:_a})}),k.jsxs(Kt,{children:[r,"%"]})]}):M===Ae.PREDICTION?k.jsxs(Kt,{children:[f," pts"]}):null]})]})};const Xy=A("div")({name:"Container",class:"cgz6mxc",propsAsIs:!1}),eg=A("div")({name:"Title",class:"ta6van7",propsAsIs:!1}),ng=A("div")({name:"Options",class:"o1msgqq4",propsAsIs:!1}),tg=A("div")({name:"Loader",class:"lq1mbhd",propsAsIs:!1}),ag=A("div")({name:"Feedback",class:"f9kw2xt",propsAsIs:!1}),sg=A("img")({name:"FeedbackIcon",class:"fn7neu6",propsAsIs:!1}),rg=A("div")({name:"FeedbackTitle",class:"fpdq7m5",propsAsIs:!1}),ig=A("div")({name:"FeedbackDescription",class:"f1ljy63t",propsAsIs:!1}),og=({title:n,questionId:e,options:t,questionAnswered:s,feedbackMessages:a,questionAnsweredCorrectly:r,questionType:o})=>{const[l,m]=Q.useState(!1),d=Q.useCallback(y=>{m(y)},[m]);return Q.useEffect(()=>{d(!1)},[t,d]),k.jsxs(Xy,{children:[k.jsx(eg,{children:n}),k.jsxs(ng,{children:[l&&k.jsx(tg,{children:"Loading..."}),t.map(y=>k.jsx(Jy,{toggleIsLoadingSubmitAnswer:d,questionId:e,questionType:o,...y},y.id))]}),s&&o===Ae.TRIVIA&&k.jsxs(ag,{children:[k.jsx(sg,{alt:"reaction-to-answer",src:r?_a:Hy}),k.jsxs("div",{children:[k.jsx(rg,{children:r?a.correctFeedback.title:a.incorrectFeedback.title}),k.jsx(ig,{children:r?a.correctFeedback.description:a.incorrectFeedback.description})]})]})]})};class cg{}window.storeLogger=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 lg=n=>{const e=Object.keys(n);return be.computed(e.map(t=>n[t].getStore()),(...t)=>Object.fromEntries(e.map((s,a)=>[s,t[a]])))};class Gn 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 Yn=n=>be.map(n);var Nn=(n=>(n.ORGANIZATION="ORGANIZATION",n.STREAM="STREAM",n))(Nn||{});const ug={[we.BETTING]:"betting",[we.GAMES]:"games",[we.PUBLIC_CHAT]:"publicChat",[we.TWITTER]:"twitter"};var ln=(n=>(n.Ready="ready",n.Suspended="suspended",n))(ln||{});class Wi{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=ug[t.type],this.status=be.atom("suspended"),this.config=new Gn(Yn(t),`feature:config:${this.settingsKey}`),this.settingsKey!==void 0&&(e==null?void 0:e.overlaySettings.case)===this.settingsKey?this.settings=new Gn(Yn(e.overlaySettings.value),`feature:settings:${this.settingsKey}`):this.settings=new Gn(Yn({}),`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 De 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 _e=n=>be.atom(n),mg=(n,e)=>be.computed(n,e);class xe 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=be.atom(),a&&t.subscribe(r=>{this.atomStore.set(a(r))})}get(){throw new Error("not implemented")}}var es={exports:{}};function dg(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}var pg=yg;function yg(n,e,t){var s=t&&t.stringify||dg,a=1;if(typeof n=="object"&&n!==null){var r=e.length+a;if(r===1)return n;var o=new Array(r);o[0]=s(n);for(var l=1;l<r;l++)o[l]=s(e[l]);return o.join(" ")}if(typeof n!="string")return n;var m=e.length;if(m===0)return n;for(var d="",y=1-a,T=-1,f=n&&n.length||0,M=0;M<f;){if(n.charCodeAt(M)===37&&M+1<f){switch(T=T>-1?T:0,n.charCodeAt(M+1)){case 100:case 102:if(y>=m||e[y]==null)break;T<M&&(d+=n.slice(T,M)),d+=Number(e[y]),T=M+2,M++;break;case 105:if(y>=m||e[y]==null)break;T<M&&(d+=n.slice(T,M)),d+=Math.floor(Number(e[y])),T=M+2,M++;break;case 79:case 111:case 106:if(y>=m||e[y]===void 0)break;T<M&&(d+=n.slice(T,M));var E=typeof e[y];if(E==="string"){d+="'"+e[y]+"'",T=M+2,M++;break}if(E==="function"){d+=e[y].name||"<anonymous>",T=M+2,M++;break}d+=s(e[y]),T=M+2,M++;break;case 115:if(y>=m)break;T<M&&(d+=n.slice(T,M)),d+=String(e[y]),T=M+2,M++;break;case 37:T<M&&(d+=n.slice(T,M)),d+="%",T=M+2,M++,y--;break}++y}++M}return T===-1?n:(T<f&&(d+=n.slice(T)),d)}const sr=pg;es.exports=He;const Wn=wg().console||{},gg={mapHttpRequest:st,mapHttpResponse:st,wrapRequestSerializer:Jt,wrapResponseSerializer:Jt,wrapErrorSerializer:Jt,req:st,res:st,err:ir,errWithCause:ir};function kt(n,e){return n==="silent"?1/0:e.levels.values[n]}const ns=Symbol("pino.logFuncs"),wa=Symbol("pino.hierarchy"),fg={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function rr(n,e){const t={logger:e,parent:n[wa]};e[wa]=t}function Tg(n,e,t){const s={};e.forEach(a=>{s[a]=t[a]?t[a]:Wn[a]||Wn[fg[a]||"log"]||Hn}),n[ns]=s}function kg(n,e){return Array.isArray(n)?n.filter(function(s){return s!=="!stdSerializers.err"}):n===!0?Object.keys(e):!1}function He(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||Wn;n.browser.write&&(n.browser.asObject=!0);const s=n.serializers||{},a=kg(n.browser.serialize,s);let r=n.browser.serialize;Array.isArray(n.browser.serialize)&&n.browser.serialize.indexOf("!stdSerializers.err")>-1&&(r=!1);const o=Object.keys(n.customLevels||{}),l=["error","fatal","warn","info","debug","trace"].concat(o);typeof t=="function"&&l.forEach(function(w){t[w]=t}),(n.enabled===!1||n.browser.disabled)&&(n.level="silent");const m=n.level||"info",d=Object.create(t);d.log||(d.log=Hn),Tg(d,l,t),rr({},d),Object.defineProperty(d,"levelVal",{get:T}),Object.defineProperty(d,"level",{get:f,set:M});const y={transmit:e,serialize:a,asObject:n.browser.asObject,levels:l,timestamp:bg(n)};d.levels=hg(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=Hn,d.serializers=s,d._serialize=a,d._stdErrSerialize=r,d.child=E,e&&(d._logEvent=va());function T(){return kt(this.level,this)}function f(){return this._level}function M(w){if(w!=="silent"&&!this.levels.values[w])throw Error("unknown level "+w);this._level=w,an(this,y,d,"error"),an(this,y,d,"fatal"),an(this,y,d,"warn"),an(this,y,d,"info"),an(this,y,d,"debug"),an(this,y,d,"trace"),o.forEach(L=>{an(this,y,d,L)})}function E(w,L){if(!w)throw new Error("missing bindings for child Pino");L=L||{},a&&w.serializers&&(L.serializers=w.serializers);const O=L.serializers;if(a&&O){var R=Object.assign({},s,O),x=n.browser.serialize===!0?Object.keys(R):a;delete w.serializers,jt([w],x,R,this._stdErrSerialize)}function z(B){this._childLevel=(B._childLevel|0)+1,this.bindings=w,R&&(this.serializers=R,this._serialize=x),e&&(this._logEvent=va([].concat(B._logEvent.bindings,w)))}z.prototype=this;const U=new z(this);return rr(this,U),U.level=this.level,U}return d}function hg(n){const e=n.customLevels||{},t=Object.assign({},He.levels.values,e),s=Object.assign({},He.levels.labels,Mg(e));return{values:t,labels:s}}function Mg(n){const e={};return Object.keys(n).forEach(function(t){e[n[t]]=t}),e}He.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"}};He.stdSerializers=gg;He.stdTimeFunctions=Object.assign({},{nullTime:Hi,epochTime:Zi,unixTime:Dg,isoTime:_g});function Ng(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 an(n,e,t,s){if(n[s]=kt(n.level,t)>kt(s,t)?Hn:t[ns][s],!e.transmit&&n[s]===Hn)return;n[s]=Sg(n,e,t,s);const a=Ng(n);a.length!==0&&(n[s]=Ig(a,n[s]))}function Ig(n,e){return function(){return e.apply(this,[...n,...arguments])}}function Sg(n,e,t,s){return function(a){return function(){const o=e.timestamp(),l=new Array(arguments.length),m=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Wn?Wn:this;for(var d=0;d<l.length;d++)l[d]=arguments[d];if(e.serialize&&!e.asObject&&jt(l,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?a.call(m,Ag(this,s,l,o)):a.apply(m,l),e.transmit){const y=e.transmit.level||n._level,T=t.levels.values[y],f=t.levels.values[s];if(f<T)return;Eg(this,{ts:o,methodLevel:s,methodValue:f,transmitLevel:y,transmitValue:t.levels.values[e.transmit.level||n._level],send:e.transmit.send,val:kt(n._level,t)},l)}}}(n[ns][s])}function Ag(n,e,t,s){n._serialize&&jt(t,n._serialize,n.serializers,n._stdErrSerialize);const a=t.slice();let r=a[0];const o={};s&&(o.time=s),o.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(o,a.shift());r=a.length?sr(a.shift(),a):void 0}else typeof r=="string"&&(r=sr(a.shift(),a));return r!==void 0&&(o.msg=r),o}function jt(n,e,t,s){for(const a in n)if(s&&n[a]instanceof Error)n[a]=He.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 Eg(n,e,t){const s=e.send,a=e.ts,r=e.methodLevel,o=e.methodValue,l=e.val,m=n._logEvent.bindings;jt(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=o,s(r,n._logEvent,l),n._logEvent=va(m)}function va(n){return{ts:0,messages:[],bindings:n||[],level:{label:"",value:0}}}function ir(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 bg(n){return typeof n.timestamp=="function"?n.timestamp:n.timestamp===!1?Hi:Zi}function st(){return{}}function Jt(n){return n}function Hn(){}function Hi(){return!1}function Zi(){return Date.now()}function Dg(){return Math.round(Date.now()/1e3)}function _g(){return new Date(Date.now()).toISOString()}function wg(){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)||{}}}es.exports.default=He;var vg=es.exports.pino=He;const Og=vg({level:"trace"}),jg=(n,e)=>Og.child({name:n},e);class Lg{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 o=setTimeout(()=>{this.logger.debug({notificationId:a},"notification hidding by autoHideDuration"),this.closeNotification(a)},t.autoHideDuration||5e3);this.timeouts.set(a,o),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 o=this.timeouts.get(e);o!==void 0&&(clearTimeout(o),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=jg("notifications"),this.store=new Map,this.timeouts=new Map,this.waitingQueue=new Set,this.activeQueue=new Set,this.notifications=new De(_e(new Map),"notifications-queue"),this.notificationsList=mg(this.notifications.getStore(),t=>t?[...t.values()]:[])}}var Dn=(n=>(n[n.ONBOARDING=1]="ONBOARDING",n[n.QUESTION=2]="QUESTION",n))(Dn||{});let Rg=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)});S(this,"getQueueStore",()=>this.queue.notificationsList);S(this,"markAsViewed",e=>{localStorage.setItem(`opened:${e}`,e)});this.queue=new Lg({concurrency:1,animationDelay:300,...e})}};const xg=(n,e,t)=>{n.notifications=new Rg,n.addNotification=n.notifications.add,n.sdk.getNotificationsStore=()=>n.notifications.getQueueStore(),t()};let Cg=()=>({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 zg=({cache:n=new Map,fetcher:e,...t}={})=>{const s=Cg();let a=!0;mr("visibilitychange",()=>{a=!document.hidden,a&&s.emit(cr)}),mr("online",()=>s.emit(lr));const r=new Map,o=new Map,l=new Map;let m={};const d=async([O,R],x,z,U)=>{var B;if(!a)return;const C=oe=>{x.key===O&&(x.set(oe),s.emit(Xt,O,oe,!0))},H=()=>{C({...x.value,...pr,promise:l.get(O)})},{dedupeTime:ne=4e3,fetcher:se}={...z,...m},ie=dr();if(l.has(O)){x.value.loading||H();return}if(!U){const oe=n.get(O);oe&&x.value.data!==oe&&C({data:oe,...sn});const Z=o.get(O);if(Z&&Z+ne>ie)return}const ue=be.startTask();try{const oe=se(...R);o.set(O,ie),l.set(O,oe),H();const Z=await oe;n.set(O,Z),C({data:Z,...sn}),o.set(O,dr())}catch(oe){(B=z.onError)==null||B.call(z,oe),C({data:x.value.data,error:oe,...sn})}finally{ue(),l.delete(O)}},y=(O,{fetcher:R=e,...x}={})=>{const z=be.map({...sn}),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=[];be.onStart(z,()=>{const Z=!B;[se,B]=Ug(O),ne=se.subscribe(Ie=>{if(Ie){const[K,N]=Ie;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:Me=0,refetchOnFocus:Ve,refetchOnReconnect:Ce}=U,Ne=()=>{C&&d([C,H],z,U)};Me>0&&r.set(O,setInterval(Ne,Me)),Ve&&ie.push(s.on(cr,Ne)),Ce&&ie.push(s.on(lr,Ne)),ie.push(s.on(ur,Ie=>{C&&ea(C,Ie)&&d([C,H],z,U,!0)}),s.on(Xt,(Ie,K,N)=>{C&&ea(C,Ie)&&z.value!==K&&z.value.data!==K&&z.set(N?K:{data:K,...sn})}))});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},be.onStop(z,()=>{z.value={...sn},B==null||B(),ie.forEach(me=>me()),ie=[],ne==null||ne();const Z=r.get(O);Z&&clearInterval(Z)}),z},T=O=>{n.delete(O),o.delete(O)},f=(O,R)=>{for(const x of n.keys())ea(x,O)&&R(x)},M=O=>{f(O,T),s.emit(ur,O)},E=(O,R)=>{f(O,x=>{R===void 0?T(x):n.set(x,R)}),s.emit(Xt,O,R)};function w(O){const R=async z=>{var U,B;const C=(U=m.fetcher)!=null?U:O,H=[];try{x.set({error:void 0,data:void 0,mutate:R,...pr});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=be.map({mutate:R,...sn});return x.mutate=R,x}return[y,w,{__unsafeOverruleSettings:O=>{console.warn("You should only use __unsafeOverruleSettings in test environment"),m=O},invalidateKeys:M,mutateCache:E}]};function or(n){return typeof n=="string"||typeof n=="number"}const Ug=n=>{if(or(n))return[be.atom([""+n,[n]]),()=>{}];let e=be.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 o=n[r];if(or(o)){t.push(o);continue}a.push(o.subscribe(l=>{t[r]=l,s()}))}return s(),[e,()=>a.forEach(r=>r())]},cr=1,lr=2,ur=3,Xt=4,mr=(n,e)=>{typeof window>"u"||addEventListener(n,e)},ea=(n,e)=>Array.isArray(e)?e.includes(n):typeof e=="function"?e(n):n===e,dr=()=>new Date().getTime(),pr={loading:!0},sn={loading:!1};window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));class Pg{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 Gn(Yn(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 De(_e(null),`subscription:${a.name}:store`)),"subscribe"in s&&typeof s.subscribe=="function"&&s.subscribe(()=>{this.reconnect()}),this.updateState("ready")}}class Bg{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 Pg(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=Dt(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=Ll(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,o=[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:o,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,o;this.host=e,this.$headers=new Gn(Yn({"sl-device-id":((o=(r=G.process)==null?void 0:r.env)==null?void 0:o.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]=zg();this.nanoquery={createFetcherStore:t,createMutatorStore:s,utils:a},this.transport=_t({baseUrl:e,interceptors:this.interceptors,useBinaryFormat:!0})}}const Qg=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"}]),ts=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"}]),as=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"}]),Lt=c.makeMessageType("streamlayer.sports.Pagination",()=>[{no:1,name:"page",kind:"scalar",T:5},{no:2,name:"page_size",kind:"scalar",T:5}]),Ki=c.makeMessageType("streamlayer.sports.Sort",()=>[{no:1,name:"field",kind:"scalar",T:9},{no:2,name:"order",kind:"scalar",T:9}]),Rt=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}]),xt=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:xt}]);const Jn=c.makeMessageType("streamlayer.sports.EventTime",()=>[{no:1,name:"clock",kind:"scalar",T:9},{no:2,name:"period",kind:"scalar",T:5}]),Ji=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:xt},{no:12,name:"event_time",kind:"message",T:Jn},{no:13,name:"status",kind:"enum",T:c.getEnumType(ts)},{no:14,name:"periods",kind:"message",T:Ji,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(as)}]);const Xi=c.makeMessageType("streamlayer.sports.Country",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"abbreviation",kind:"scalar",T:9}]),Fg=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:Gg},{no:7,name:"weight",kind:"message",T:Yg},{no:8,name:"birth",kind:"message",T:Vg}]),Gg=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"}),Yg=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"}),Vg=c.makeMessageType("streamlayer.sports.PlayerAttributes.Birth",()=>[{no:1,name:"city",kind:"scalar",T:9},{no:2,name:"country",kind:"message",T:Xi}],{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 $g=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:Xi},{no:13,name:"attributes",kind:"message",T:Fg},{no:15,name:"teams",kind:"message",T:$g,repeated:!0}]);const nn=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 Bn=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(Qg)}]),qg=c.makeMessageType("streamlayer.sports.SyncStatus",()=>[{no:1,name:"teams",kind:"message",T:Bn},{no:2,name:"event",kind:"message",T:Bn},{no:3,name:"events",kind:"message",T:Bn},{no:4,name:"players",kind:"message",T:Bn},{no:5,name:"leagues",kind:"message",T:Bn}]),Wg=c.makeMessageType("streamlayer.sports.SyncStatusProvider",()=>[{no:1,name:"provider",kind:"scalar",T:9},{no:2,name:"status",kind:"message",T:qg}]);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:Wg,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 Hg=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}]),Zg=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:Hg,oneof:"statistics"},{no:2,name:"soccer",kind:"message",T:Zg,oneof:"statistics"}]);const tn=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}]),Kg=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}]),Jg=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}]),Xg=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:tn},{no:6,name:"away",kind:"message",T:tn},{no:7,name:"status",kind:"enum",T:c.getEnumType(ts)},{no:8,name:"custom_fields",kind:"message",T:Kg},{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:xt},{no:12,name:"schedule",kind:"message",T:Jg,repeated:!0},{no:13,name:"endless",kind:"enum",T:c.getEnumType(as)}]),pn=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:xt},{no:6,name:"event_time",kind:"message",T:Jn},{no:7,name:"home_team",kind:"message",T:tn},{no:8,name:"away_team",kind:"message",T:tn},{no:9,name:"status",kind:"enum",T:c.getEnumType(ts)},{no:10,name:"periods",kind:"message",T:Ji,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}]),rt=c.makeMessageType("streamlayer.sports.QueryOption",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:9}]),yr=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:rt,repeated:!0},{no:3,name:"ne",kind:"message",T:rt,repeated:!0},{no:4,name:"eq",kind:"message",T:rt,repeated:!0},{no:5,name:"between",kind:"message",T:yr,repeated:!0},{no:6,name:"includes",kind:"message",T:yr,repeated:!0},{no:7,name:"is",kind:"message",T:rt,repeated:!0}]);const ef=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"}]),nf=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"}]),gr=c.makeMessageType("streamlayer.sports.baseball.PitcherSummary",()=>[{no:1,name:"statistics",kind:"message",T:eo},{no:2,name:"status",kind:"enum",T:c.getEnumType(ef)},{no:3,name:"win_rate",kind:"scalar",T:5},{no:4,name:"loss_rate",kind:"scalar",T:5}]),tf=c.makeMessageType("streamlayer.sports.baseball.Runner",()=>[{no:1,name:"player_name",kind:"scalar",T:9},{no:2,name:"jersey_number",kind:"scalar",T:9}]),af=c.makeMessageType("streamlayer.sports.baseball.RunnerOnBase",()=>[{no:1,name:"base_number",kind:"enum",T:c.getEnumType(nf)},{no:2,name:"player",kind:"message",T:tf}]),sf=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}]),rf=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}]),eo=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}]),fr=c.makeMessageType("streamlayer.sports.baseball.BaseballTeamSummary",()=>[{no:1,name:"hitting",kind:"message",T:sf,repeated:!0},{no:2,name:"batting",kind:"message",T:rf,repeated:!0},{no:3,name:"pitching",kind:"message",T:eo,repeated:!0}]),of=c.makeMessageType("streamlayer.sports.baseball.BaseballSummary",()=>[{no:1,name:"home_pitcher",kind:"message",T:gr},{no:2,name:"away_pitcher",kind:"message",T:gr},{no:3,name:"home_statistics",kind:"message",T:fr},{no:4,name:"away_statistics",kind:"message",T:fr}]),cf=c.makeMessageType("streamlayer.sports.baseball.BaseballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:tn},{no:2,name:"inning",kind:"scalar",T:9},{no:3,name:"play_text",kind:"scalar",T:9},{no:4,name:"detail",kind:"message",T:lf,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}]),lf=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"}),uf=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:af,repeated:!0},{no:7,name:"taken_bases",kind:"scalar",T:5},{no:8,name:"home_team_record",kind:"message",T:nn},{no:9,name:"away_team_record",kind:"message",T:nn}]),mf=c.makeMessageType("streamlayer.sports.baseball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:cf,repeated:!0}]),df=c.makeMessageType("streamlayer.sports.baseball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:of}]),pf=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:yf},{no:11,name:"rank",kind:"message",T:gf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),yf=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"}),gf=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"}),ff=c.makeMessageType("streamlayer.sports.baseball.Standings",()=>[{no:1,name:"standings",kind:"message",T:pf,repeated:!0}]),Tf=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:nn},{no:9,name:"away_team_record",kind:"message",T:nn}]),Tr=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}]),hf=c.makeMessageType("streamlayer.sports.basketball.BasketballPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(Tf)},{no:2,name:"home_player",kind:"message",T:kr},{no:3,name:"away_player",kind:"message",T:kr}]),Mf=c.makeMessageType("streamlayer.sports.basketball.BasketballSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Tr},{no:2,name:"away_statistics",kind:"message",T:Tr}]),Nf=c.makeMessageType("streamlayer.sports.basketball.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Mf},{no:2,name:"top_performers",kind:"message",T:hf,repeated:!0},{no:3,name:"last_games",kind:"message",T:no}]),If=c.makeMessageType("streamlayer.sports.basketball.BasketballPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:tn},{no:2,name:"event_time",kind:"message",T:Jn},{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}]),Sf=c.makeMessageType("streamlayer.sports.basketball.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:If,repeated:!0}]),hr=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}]),Af=c.makeMessageType("streamlayer.sports.basketball.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:hr,repeated:!0},{no:2,name:"away_players",kind:"message",T:hr,repeated:!0}]),Ef=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:bf},{no:11,name:"rank",kind:"message",T:Df},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),bf=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"}),Df=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:Ef,repeated:!0}]),Mr=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}]),Nr=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineup",()=>[{no:3,name:"start_players",kind:"message",T:Mr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Mr,repeated:!0}]),wf=c.makeMessageType("streamlayer.sports.basketball.BasketballMatchLineups",()=>[{no:1,name:"home_team",kind:"message",T:Nr},{no:2,name:"away_team",kind:"message",T:Nr}]),na=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:vf}]),vf=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"}),no=c.makeMessageType("streamlayer.sports.basketball.BasketballLastGames",()=>[{no:1,name:"home",kind:"message",T:na,repeated:!0},{no:2,name:"away",kind:"message",T:na,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:na,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"}]),to=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"}]),jf=c.makeMessageType("streamlayer.sports.hockey.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:nn},{no:9,name:"away_team_record",kind:"message",T:nn}]),Ir=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}]),Lf=c.makeMessageType("streamlayer.sports.hockey.HockeyPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(Of)},{no:2,name:"home_player",kind:"message",T:Ir,repeated:!0},{no:3,name:"away_player",kind:"message",T:Ir,repeated:!0}]),Sr=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}]),Rf=c.makeMessageType("streamlayer.sports.hockey.HockeySummary",()=>[{no:1,name:"home_statistics",kind:"message",T:Sr},{no:2,name:"away_statistics",kind:"message",T:Sr}]),xf=c.makeMessageType("streamlayer.sports.hockey.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Rf},{no:2,name:"top_performers",kind:"message",T:Lf,repeated:!0}]),Cf=c.makeMessageType("streamlayer.sports.hockey.HockeyPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:tn},{no:2,name:"event_time",kind:"message",T:Jn},{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}]),zf=c.makeMessageType("streamlayer.sports.hockey.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:Cf,repeated:!0}]),ta=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(to)}]),Ar=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(to)}]),Er=c.makeMessageType("streamlayer.sports.hockey.PlayerScores",()=>[{no:1,name:"skaters",kind:"message",T:ta,repeated:!0},{no:2,name:"goaltender",kind:"message",T:Ar},{no:3,name:"forwards",kind:"message",T:ta,repeated:!0},{no:4,name:"defensemen",kind:"message",T:ta,repeated:!0},{no:5,name:"goaltenders",kind:"message",T:Ar,repeated:!0}]),Uf=c.makeMessageType("streamlayer.sports.hockey.Boxscore",()=>[{no:1,name:"home_players",kind:"message",T:Er},{no:2,name:"away_players",kind:"message",T:Er}]),Pf=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:Bf},{no:11,name:"rank",kind:"message",T:Qf},{no:12,name:"division",kind:"scalar",T:9},{no:13,name:"conference",kind:"scalar",T:9}]),Bf=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"}),Qf=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"}),Ff=c.makeMessageType("streamlayer.sports.hockey.Standings",()=>[{no:1,name:"standings",kind:"message",T:Pf,repeated:!0}]),Gf=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"}]),Yf=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"}]),Vf=c.makeMessageType("streamlayer.sports.soccer.EventScore",()=>[{no:8,name:"home_team_record",kind:"message",T:nn},{no:9,name:"away_team_record",kind:"message",T:nn}]),ss=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}]),$f=c.makeMessageType("streamlayer.sports.soccer.SoccerAttackPerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:ss},{no:2,name:"attack_stats",kind:"message",T:nT}]),qf=c.makeMessageType("streamlayer.sports.soccer.SoccerMidfieldPerformer",()=>[{no:1,name:"perfomer",kind:"message",T:ss},{no:2,name:"midfield_stats",kind:"message",T:tT}]),Wf=c.makeMessageType("streamlayer.sports.soccer.SoccerDefensePerfomer",()=>[{no:1,name:"perfomer",kind:"message",T:ss},{no:2,name:"defense_stats",kind:"message",T:aT}]),Hf=c.makeMessageType("streamlayer.sports.soccer.SoccerPerformers",()=>[{no:1,name:"category",kind:"enum",T:c.getEnumType(Gf)},{no:2,name:"attack_performer",kind:"message",T:$f},{no:3,name:"midfield_performer",kind:"message",T:qf},{no:4,name:"defense_performer",kind:"message",T:Wf}]),Zf=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}]),Kf=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}]),Jf=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}]),br=c.makeMessageType("streamlayer.sports.soccer.SoccerTeamSummary",()=>[{no:1,name:"top_match_stats",kind:"message",T:Zf},{no:2,name:"attacking_stats",kind:"message",T:Kf},{no:3,name:"defense_stats",kind:"message",T:Jf}]),Xf=c.makeMessageType("streamlayer.sports.soccer.SoccerSummary",()=>[{no:1,name:"home_statistics",kind:"message",T:br},{no:2,name:"away_statistics",kind:"message",T:br},{no:3,name:"perfomers",kind:"message",T:Hf}]),eT=c.makeMessageType("streamlayer.sports.soccer.EventSummary",()=>[{no:1,name:"statistics",kind:"message",T:Xf},{no:2,name:"last_games",kind:"message",T:ao}]),nT=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}]),tT=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}]),aT=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 sT=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}]),rT=c.makeMessageType("streamlayer.sports.soccer.SoccerMatchFormationMatrix",()=>[{no:1,name:"row_players",kind:"message",T:sT,repeated:!0}]),Dr=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:rT,repeated:!0},{no:3,name:"start_players",kind:"message",T:Dr,repeated:!0},{no:4,name:"substitutes",kind:"message",T:Dr,repeated:!0}]),iT=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 oT=c.makeMessageType("streamlayer.sports.soccer.SoccerPlayByPlayStatistics",()=>[{no:1,name:"team",kind:"message",T:tn},{no:2,name:"event_time",kind:"message",T:Jn},{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(Yf)}]),cT=c.makeMessageType("streamlayer.sports.soccer.PlayByPlay",()=>[{no:1,name:"statistics",kind:"message",T:oT,repeated:!0}]),lT=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}]),uT=c.makeMessageType("streamlayer.sports.soccer.Standings",()=>[{no:1,name:"standings",kind:"message",T:lT,repeated:!0}]),aa=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGame",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:mT}]),mT=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"}),ao=c.makeMessageType("streamlayer.sports.soccer.SoccerLastGames",()=>[{no:1,name:"home",kind:"message",T:aa,repeated:!0},{no:2,name:"away",kind:"message",T:aa,repeated:!0},{no:3,name:"head_to_head",kind:"message",T:aa,repeated:!0}]),yn=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"}]),dT=c.makeMessageType("streamlayer.sports.events.ScheduleAttributes",()=>[{no:1,name:"summary",kind:"message",T:pn},{no:2,name:"baseball",kind:"message",T:uf,oneof:"sport"},{no:3,name:"basketball",kind:"message",T:kf,oneof:"sport"},{no:4,name:"hockey",kind:"message",T:jf,oneof:"sport"},{no:5,name:"soccer",kind:"message",T:Vf,oneof:"sport"}]),pT=c.makeMessageType("streamlayer.sports.events.ScheduleResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(yn)},{no:3,name:"attributes",kind:"message",T:dT}]),yT=c.makeMessageType("streamlayer.sports.events.ListResponseAttributes",()=>[{no:1,name:"common",kind:"message",T:Xg}]),so=c.makeMessageType("streamlayer.sports.events.ListResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:yT}]),gT=c.makeMessageType("streamlayer.sports.events.ListRequest",()=>[{no:1,name:"filter",kind:"message",T:fT},{no:2,name:"pagination",kind:"message",T:Lt},{no:3,name:"sort",kind:"message",T:Ki},{no:4,name:"ids",kind:"scalar",T:4,repeated:!0},{no:5,name:"organization_id",kind:"scalar",T:9}]),fT=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(as)}],{localName:"ListRequest_Filter"}),TT=c.makeMessageType("streamlayer.sports.events.DemoListRequest",()=>[{no:1,name:"filter",kind:"message",T:kT},{no:2,name:"pagination",kind:"message",T:Lt},{no:3,name:"sort",kind:"message",T:Ki}]),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"}),hT=c.makeMessageType("streamlayer.sports.events.DemoListResponse",()=>[{no:1,name:"meta",kind:"message",T:Rt},{no:2,name:"data",kind:"message",T:so,repeated:!0}]),MT=c.makeMessageType("streamlayer.sports.events.ListResponse",()=>[{no:1,name:"meta",kind:"message",T:Rt},{no:2,name:"data",kind:"message",T:so,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}]),vr=c.makeMessageType("streamlayer.sports.events.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:NT}]),NT=c.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(yn)},{no:3,name:"attributes",kind:"message",T:IT}],{localName:"SummaryResponse_ResponseData"}),IT=c.makeMessageType("streamlayer.sports.events.SummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:pn},{no:2,name:"baseball",kind:"message",T:df,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Nf,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:xf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:eT,oneof:"sports"}],{localName:"SummaryResponse_ResponseData_SummaryResponseAttributes"}),ST=c.makeMessageType("streamlayer.sports.events.AdminSummaryRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"organization_id",kind:"scalar",T:9}]),AT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse",()=>[{no:1,name:"data",kind:"message",T:ET}]),ET=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"attributes",kind:"message",T:bT}],{localName:"AdminSummaryResponse_ResponseData"}),bT=c.makeMessageType("streamlayer.sports.events.AdminSummaryResponse.ResponseData.SummaryResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:pn}],{localName:"AdminSummaryResponse_ResponseData_SummaryResponseAttributes"}),DT=c.makeMessageType("streamlayer.sports.events.PlayByPlayRequest",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"pagination",kind:"message",T:Lt},{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:Rt}]),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(yn)},{no:3,name:"attributes",kind:"message",T:vT}],{localName:"PlayByPlayResponse_ResponseData"}),vT=c.makeMessageType("streamlayer.sports.events.PlayByPlayResponse.ResponseData.PlayByPlayResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:pn},{no:2,name:"baseball",kind:"message",T:mf,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:Sf,oneof:"sports"},{no:4,name:"hockey",kind:"message",T:zf,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:cT,oneof:"sports"}],{localName:"PlayByPlayResponse_ResponseData_PlayByPlayResponseAttributes"}),OT=c.makeMessageType("streamlayer.sports.events.ScheduleRequest",()=>[{no:1,name:"filter",kind:"message",T:jT},{no:2,name:"pagination",kind:"message",T:Lt}]),jT=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"}),LT=c.makeMessageType("streamlayer.sports.events.ScheduleResponse",()=>[{no:1,name:"data",kind:"message",T:pT,repeated:!0},{no:2,name:"meta",kind:"message",T:Rt}]),RT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest",()=>[{no:1,name:"filter",kind:"message",T:xT}]),xT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesRequest.Filter",()=>[{no:2,name:"league",kind:"scalar",T:9}],{localName:"ScheduleDatesRequest_Filter"}),CT=c.makeMessageType("streamlayer.sports.events.ScheduleDatesResponse",()=>[{no:1,name:"data",kind:"scalar",T:9,repeated:!0}]),zT=c.makeMessageType("streamlayer.sports.events.BoxscoreRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),UT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse",()=>[{no:1,name:"data",kind:"message",T:PT}]),PT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(yn)},{no:3,name:"attributes",kind:"message",T:BT}],{localName:"BoxscoreResponse_ResponseData"}),BT=c.makeMessageType("streamlayer.sports.events.BoxscoreResponse.ResponseData.BoxscoreResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:pn},{no:2,name:"basketball",kind:"message",T:Af,oneof:"sports"},{no:3,name:"hockey",kind:"message",T:Uf,oneof:"sports"}],{localName:"BoxscoreResponse_ResponseData_BoxscoreResponseAttributes"}),QT=c.makeMessageType("streamlayer.sports.events.StandingsRequest",()=>[{no:1,name:"league",kind:"scalar",T:9}]),FT=c.makeMessageType("streamlayer.sports.events.StandingsResponse",()=>[{no:1,name:"data",kind:"message",T:GT}]),GT=c.makeMessageType("streamlayer.sports.events.StandingsResponse.ResponseData",()=>[{no:1,name:"type",kind:"enum",T:c.getEnumType(yn)},{no:2,name:"attributes",kind:"message",T:YT}],{localName:"StandingsResponse_ResponseData"}),YT=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:Ff,oneof:"sports"},{no:4,name:"baseball",kind:"message",T:ff,oneof:"sports"},{no:5,name:"soccer",kind:"message",T:uT,oneof:"sports"}],{localName:"StandingsResponse_ResponseData_StandingsResponseAttributes"}),VT=c.makeMessageType("streamlayer.sports.events.LineupRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),$T=c.makeMessageType("streamlayer.sports.events.LineupResponse",()=>[{no:1,name:"data",kind:"message",T:qT}]),qT=c.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(yn)},{no:3,name:"attributes",kind:"message",T:WT}],{localName:"LineupResponse_ResponseData"}),WT=c.makeMessageType("streamlayer.sports.events.LineupResponse.ResponseData.LineupResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:pn},{no:2,name:"soccer",kind:"message",T:iT,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:wf,oneof:"sports"}],{localName:"LineupResponse_ResponseData_LineupResponseAttributes"}),HT=c.makeMessageType("streamlayer.sports.events.LastGamesRequest",()=>[{no:1,name:"id",kind:"scalar",T:4}]),ZT=c.makeMessageType("streamlayer.sports.events.LastGamesResponse",()=>[{no:1,name:"data",kind:"message",T:KT}]),KT=c.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4},{no:2,name:"type",kind:"enum",T:c.getEnumType(yn)},{no:3,name:"attributes",kind:"message",T:JT}],{localName:"LastGamesResponse_ResponseData"}),JT=c.makeMessageType("streamlayer.sports.events.LastGamesResponse.ResponseData.LastGamesResponseAttributes",()=>[{no:1,name:"summary",kind:"message",T:pn},{no:2,name:"soccer",kind:"message",T:ao,oneof:"sports"},{no:3,name:"basketball",kind:"message",T:no,oneof:"sports"}],{localName:"LastGamesResponse_ResponseData_LastGamesResponseAttributes"}),XT=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ek=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse",()=>[{no:1,name:"data",kind:"message",T:nk}]),nk=c.makeMessageType("streamlayer.sports.events.RetrieveEventIdResponse.RetrieveEventIdResponseData",()=>[{no:1,name:"id",kind:"scalar",T:4}],{localName:"RetrieveEventIdResponse_RetrieveEventIdResponseData"}),tk={typeName:"streamlayer.sports.events.Events",methods:{list:{name:"List",I:gT,O:MT,kind:P.Unary},demoList:{name:"DemoList",I:TT,O:hT,kind:P.Unary},summary:{name:"Summary",I:wr,O:vr,kind:P.Unary},adminSummary:{name:"AdminSummary",I:ST,O:AT,kind:P.Unary},boxscore:{name:"Boxscore",I:zT,O:UT,kind:P.Unary},standings:{name:"Standings",I:QT,O:FT,kind:P.Unary},playByPlay:{name:"PlayByPlay",I:DT,O:_T,kind:P.Unary},schedule:{name:"Schedule",I:OT,O:LT,kind:P.Unary},scheduleDates:{name:"ScheduleDates",I:RT,O:CT,kind:P.Unary},lineup:{name:"Lineup",I:VT,O:$T,kind:P.Unary},retrieveEventId:{name:"RetrieveEventId",I:XT,O:ek,kind:P.Unary},lastGames:{name:"LastGames",I:HT,O:ZT,kind:P.Unary},summarySubscription:{name:"SummarySubscription",I:wr,O:vr,kind:P.ServerStreaming}}},ak=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"}]),sk=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"}]),rk=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"}]),ik=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"}]),ok=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"}]),ck=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"}]),lk=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"}]),uk=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"}]),ro=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"}]),mk=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"}]),dk=c.makeMessageType("streamlayer.sdkSettings.client.NotifySettings",()=>[{no:1,name:"allow",kind:"enum",T:c.getEnumType(ro)}]),pk=c.makeMessageType("streamlayer.sdkSettings.client.SoundSettings",()=>[{no:1,name:"allow",kind:"enum",T:c.getEnumType(ro)}]),sa=c.makeMessageType("streamlayer.sdkSettings.client.ClientSettingsNotifications",()=>[{no:1,name:"notify",kind:"message",T:dk},{no:2,name:"sound",kind:"message",T:pk}]),rs=c.makeMessageType("streamlayer.sdkSettings.client.ClientSettings",()=>[{no:1,name:"visible_status",kind:"enum",T:c.getEnumType(ak)},{no:2,name:"messages_notify",kind:"enum",T:c.getEnumType(sk)},{no:3,name:"friends_notify",kind:"enum",T:c.getEnumType(rk)},{no:4,name:"calls_sound",kind:"enum",T:c.getEnumType(ok)},{no:5,name:"messages_sound",kind:"enum",T:c.getEnumType(ck)},{no:6,name:"friends_sound",kind:"enum",T:c.getEnumType(lk)},{no:7,name:"twitter_notify",kind:"enum",T:c.getEnumType(ik)},{no:8,name:"twitter_sound",kind:"enum",T:c.getEnumType(uk)},{no:9,name:"gamification",kind:"message",T:sa},{no:10,name:"watch_party_invitation",kind:"message",T:sa},{no:11,name:"twitter_question",kind:"message",T:sa}]),yk=c.makeMessageType("streamlayer.sdkSettings.client.GetRequest",[]),gk=c.makeMessageType("streamlayer.sdkSettings.client.GetResponse",()=>[{no:1,name:"data",kind:"message",T:fk}]),fk=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:rs}],{localName:"GetResponse_GetResponseData"}),Tk=c.makeMessageType("streamlayer.sdkSettings.client.UpdateRequest",()=>[{no:2,name:"settings",kind:"message",T:rs}]),kk=c.makeMessageType("streamlayer.sdkSettings.client.UpdateResponse",()=>[{no:1,name:"data",kind:"message",T:hk}]),hk=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:rs}],{localName:"UpdateResponse_UpdateResponseData"}),Mk=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Nk=c.makeMessageType("streamlayer.sdkSettings.client.GetStreamResponse",()=>[{no:1,name:"data",kind:"message",T:Ik}]),Ik=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:Yi}],{localName:"GetStreamResponse_GetResponseData"}),Sk=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationRequest",[]),Ak=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationResponse",()=>[{no:1,name:"data",kind:"message",T:Ek}]),Ek=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:Vi}],{localName:"GetOrganizationResponse_GetResponseData"}),bk=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingRequest",()=>[{no:1,name:"event_id",kind:"scalar",T:9,opt:!0}]),Dk=c.makeMessageType("streamlayer.sdkSettings.client.GetOrganizationAdvertisingResponse",()=>[{no:1,name:"data",kind:"message",T:_k}]),_k=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:$i}],{localName:"GetOrganizationAdvertisingResponse_GetOrganizationAdvertisingResponseData"}),wk=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(mk)}]),io=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:wk},{no:5,name:"external_event_id",kind:"scalar",T:9}]),vk=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkRequest",()=>[{no:1,name:"data",kind:"message",T:io}]),Ok=c.makeMessageType("streamlayer.sdkSettings.client.DeepLink",()=>[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"link_id",kind:"scalar",T:9}]),jk=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse",()=>[{no:1,name:"data",kind:"message",T:Lk}]),Lk=c.makeMessageType("streamlayer.sdkSettings.client.GenerateDeepLinkResponse.GenerateDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:Ok}],{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:Rk}]);const Rk=c.makeMessageType("streamlayer.sdkSettings.client.RetreiveDeepLinkResponse.RetreiveDeepLinkResponseData",()=>[{no:1,name:"attributes",kind:"message",T:io}],{localName:"RetreiveDeepLinkResponse_RetreiveDeepLinkResponseData"}),xk=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ck=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionRequest",[]),zk=c.makeMessageType("streamlayer.sdkSettings.client.StreamSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Uk}]),Uk=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:Yi}],{localName:"StreamSubscriptionResponse_ResponseData"}),Pk=c.makeMessageType("streamlayer.sdkSettings.client.OrganizationSubscriptionResponse",()=>[{no:1,name:"data",kind:"message",T:Bk}]),Bk=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:Vi}],{localName:"OrganizationSubscriptionResponse_ResponseData"}),Ct={typeName:"streamlayer.sdkSettings.client.Client",methods:{get:{name:"Get",I:yk,O:gk,kind:P.Unary},update:{name:"Update",I:Tk,O:kk,kind:P.Unary},getStream:{name:"GetStream",I:Mk,O:Nk,kind:P.Unary},getOrganization:{name:"GetOrganization",I:Sk,O:Ak,kind:P.Unary},getOrganizationAdvertising:{name:"GetOrganizationAdvertising",I:bk,O:Dk,kind:P.Unary},generateDeepLink:{name:"GenerateDeepLink",I:vk,O:jk,kind:P.Unary},streamSubscription:{name:"StreamSubscription",I:xk,O:zk,kind:P.ServerStreaming},organizationSubscription:{name:"OrganizationSubscription",I:Ck,O:Pk,kind:P.ServerStreaming}}},Qk=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(tk,{method:"retrieveEventId",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,o)=>{var l;if(!o||typeof o!="string")return"";try{return((l=(await t.retrieveEventId({id:o})).data)==null?void 0:l.id)||""}catch{return""}}})},Fk=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ct,{method:"getStream",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,o)=>{var m;return o?(m=(await t.getStream({id:o})).data)==null?void 0:m.attributes:void 0}})},Gk=(n,e)=>{const{queryKey:t,client:s}=e.createPromiseClient(Zn,{method:"me",params:[n]});return e.nanoquery.createFetcherStore(t,{fetcher:()=>s.me({})})},Yk=n=>{const{client:e,queryKeyStr:t}=n.createPromiseClient(Zn,{method:"bypassAuth"});return n.nanoquery.createMutatorStore(async({data:{userKey:s,schema:a,init:r},getCacheUpdater:o})=>{const[l]=o(t),m=await e.bypassAuth({userKey:s,schema:a,init:r});return l(m),m})},Vk=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ct,{method:"get",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async()=>{var r;return(r=(await t.get({})).data)==null?void 0:r.attributes}})},$k=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ct,{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}})},qk=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ct,{method:"getOrganizationAdvertising",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async()=>{var r;return(r=(await t.getOrganizationAdvertising({})).data)==null?void 0:r.attributes}})},Wk=(n,e,t)=>{n.transport=new Bg(e.host),n.sdk.host=n.transport.host,n.transport.setSdkKey(e.sdkKey),t()};var In=(n=>(n.DISABLED="disabled",n.INITIALIZATION="initialization",n.READY="ready",n.FAILED="failed",n.SUSPENDED="suspended",n))(In||{});const Hk=n=>{const e=new De(_e(),"enabled"),t=new De(_e("disabled"),"status"),s=new De(_e(),"userKey"),a=new De(_e(),"userToken");a.listen(f=>{f?localStorage.setItem("sl-user-token",f):localStorage.removeItem("sl-user-token")});const r=new De(_e(),"providerStreamId"),o=new xe(Qk(r.getStore(),n),"slStreamId",f=>f==null?void 0:f.data),l=new xe(Gk(a.getStore(),n),"user",f=>{var M,E;return(E=(M=f==null?void 0:f.data)==null?void 0:M.data)==null?void 0:E.id}),m=new xe(Vk(a.getStore(),n),"userSettings"),d=new xe(Fk(o.getAtomStore(),n),"streamSettings");o.getAtomStore().listen(f=>{(f===""||f===void 0)&&d.getStore().mutate(void 0)});const y=new xe($k(e.getStore(),n),"organizationSettings",f=>{var M;return(M=f==null?void 0:f.data)==null?void 0:M.id}),T=new xe(qk(y.getAtomStore(),n),"organizationAdvertising");return{enabled:e,status:t,providerStreamId:r,slStreamId:o,streamSettings:d,user:l,userKey:s,userToken:a,userSettings:m,organizationSettings:y,organizationAdvertising:T}};class Zk extends Ot{constructor(t){const s=Hk(t),a=lg(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 Kk=(n,e,t)=>{n.store=new Zk(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()},Ye={typeName:"streamlayer.interactive.feed.Feed",methods:{get:{name:"Get",I:tp,O:ap,kind:P.Unary},subscription:{name:"Subscription",I:id,O:od,kind:P.ServerStreaming},votingSubscription:{name:"VotingSubscription",I:ld,O:ud,kind:P.ServerStreaming},questionSubscription:{name:"QuestionSubscription",I:pd,O:yd,kind:P.ServerStreaming},questionByUser:{name:"QuestionByUser",I:Td,O:kd,kind:P.Unary},syncQuestion:{name:"SyncQuestion",I:Md,O:Id,kind:P.Unary},getQuestion:{name:"GetQuestion",I:Ad,O:Ed,kind:P.Unary},questionDetail:{name:"QuestionDetail",I:Dd,O:_d,kind:P.Unary},submitAnswer:{name:"SubmitAnswer",I:vd,O:jd,kind:P.Unary},submitInplay:{name:"SubmitInplay",I:Rd,O:Cd,kind:P.Unary},skipQuestion:{name:"SkipQuestion",I:zd,O:Pd,kind:P.Unary},pickHistory:{name:"PickHistory",I:Qd,O:Gd,kind:P.Unary},insightHistory:{name:"InsightHistory",I:$d,O:Wd,kind:P.Unary},tweetHistory:{name:"TweetHistory",I:Zd,O:Jd,kind:P.Unary},promotionHistory:{name:"PromotionHistory",I:rp,O:op,kind:P.Unary}}},Jk=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"}]),oo=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardData",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:c.getEnumType(Jk)},{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:oo,repeated:!0},{no:6,name:"created_at",kind:"scalar",T:3}]),is=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}]),Xk=c.makeMessageType("streamlayer.interactive.leaderboard.LeaderboardSummaryItem",()=>[{no:1,name:"summary",kind:"message",T:is},{no:2,name:"percentage",kind:"message",T:eh}]),eh=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"}),nh=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}]),th=c.makeMessageType("streamlayer.interactive.leaderboard.ListResponse",()=>[{no:1,name:"data",kind:"message",T:ah,repeated:!0},{no:2,name:"meta",kind:"message",T:sh}]),ah=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:is}],{localName:"ListResponse_ListResponseData"}),sh=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"}),rh=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}]),ih=c.makeMessageType("streamlayer.interactive.leaderboard.SummaryResponse",()=>[{no:1,name:"data",kind:"message",T:oh}]),oh=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:Xk}],{localName:"SummaryResponse_SummaryResponseData"}),ch=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"event_id",kind:"scalar",T:9}]),lh=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardsResponse",()=>[{no:2,name:"data",kind:"message",T:uh}]),uh=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:oo}],{localName:"EventLeaderboardsResponse_EventLeaderboardsResponseData"}),mh=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:Xm}]),dh=c.makeMessageType("streamlayer.interactive.leaderboard.EventLeaderboardResponse",()=>[{no:1,name:"data",kind:"message",T:ph,repeated:!0},{no:2,name:"meta",kind:"message",T:yh}]),ph=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:is}],{localName:"EventLeaderboardResponse_ListResponseData"}),yh=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"}),gh={typeName:"streamlayer.interactive.leaderboard.Leaderboard",methods:{list:{name:"List",I:nh,O:th,kind:P.Unary},summary:{name:"Summary",I:rh,O:ih,kind:P.Unary},eventLeaderboards:{name:"EventLeaderboards",I:ch,O:lh,kind:P.Unary},eventLeaderboard:{name:"EventLeaderboard",I:mh,O:dh,kind:P.Unary}}},fh=(n,e,t)=>{const{client:s,queryKey:a}=t.createPromiseClient(gh,{method:"summary",params:[n,e]});return t.nanoquery.createFetcherStore(a,{fetcher:async(r,o,l,m)=>{var y;return(y=(await s.summary({eventId:l,userId:m})).data)==null?void 0:y.attributes}})},Th=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ye,{method:"syncQuestion",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,o)=>{var m;return o?(m=(await t.syncQuestion({filter:{eventId:o}})).data)==null?void 0:m.attributes:void 0}})},kh=(n,e)=>{const{client:t}=e.createCallbackClient(Ye),s=be.atom({eventId:n.get()||"",feedId:""});return n.subscribe((r="")=>{s.set({eventId:r,feedId:""})}),e.addSubscription(t.subscription,s,{name:"feedSubscription"})},hh=(n,e)=>{const{client:t}=e.createCallbackClient(Ye);return e.addSubscription(t.questionSubscription,{questionId:n},{name:"questionSubscription"})},Mh=async(n,e)=>{var a,r;const{client:t}=e.createPromiseClient(Ye,{method:"questionByUser",params:[n]});return(r=(a=(await t.questionByUser({questionId:n})).data)==null?void 0:a.attributes)==null?void 0:r.question},Nh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ye,{method:"questionByUser",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,o)=>{var m,d;return(d=(m=(await t.questionByUser({questionId:o})).data)==null?void 0:m.attributes)==null?void 0:d.question}})},Ih=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ye,{method:"pickHistory",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,o)=>{var m;return o?(m=(await t.pickHistory({eventId:o})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},Sh=(n,e)=>{const{client:t,queryKey:s}=e.createPromiseClient(Ye,{method:"insightHistory",params:[n]});return e.nanoquery.createFetcherStore(s,{fetcher:async(a,r,o)=>{var m;return o?(m=(await t.insightHistory({eventId:o})).data)==null?void 0:m.map(({attributes:d})=>d):void 0}})},Ah=(n,e)=>{const{client:t}=n.createPromiseClient(Ye,{method:"submitAnswer"});return t.submitAnswer({data:e})},Eh=(n,e)=>{const{client:t}=n.createPromiseClient(Ye,{method:"submitInplay"});return t.submitInplay({data:{eventId:+e}})},bh=(n,e)=>{const{client:t}=n.createPromiseClient(Ye,{method:"skipQuestion"});return t.skipQuestion({data:{id:e}})};class co extends Wi{constructor(t,s,a){super(t,s);S(this,"userSummary");S(this,"questions");S(this,"insights");S(this,"leaderboardId");S(this,"slStreamId");S(this,"userId");S(this,"organizationId");S(this,"openedQuestionId");S(this,"openedQuestion");S(this,"activeQuestionId");S(this,"moderationId");S(this,"feedId");S(this,"onbordingComplete");S(this,"notifications");S(this,"transport");S(this,"questionSubscription");S(this,"feedSubscription");S(this,"closeFeature");S(this,"openFeature");S(this,"showOnbordingInApp",t=>{var o,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:"_",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:(o=a==null?void 0:a.appearance)==null?void 0:o.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,"getCurrentSessionIdPrefix",t=>{const s=t.eventId||this.slStreamId.get(),a=t.userId||this.userId.get();return`${t.organizationId||this.organizationId.get()}:${a}:${s}:${t.prefix||""}`});S(this,"connect",t=>{var s;this.userSummary=new xe(fh(this.slStreamId,this.userId,t),"gamification:userSummary"),this.questions=new xe(Ih(this.slStreamId,t),"gamification:questions"),this.insights=new xe(Sh(this.slStreamId,t),"gamification:insights"),this.activeQuestionId=new xe(Th(this.slStreamId,t),"gamification:activeQuestionId"),this.openedQuestion=new xe(Nh(this.openedQuestionId,t),"gamification:activeQuestionId"),this.questionSubscription&&(this.questionSubscription.disconnect(),this.questionSubscription=void 0),this.openedQuestionId.listen(a=>{var r;a?(this.questionSubscription=hh(a,t),this.questionSubscription.addListener("feed-subscription-opened-question",o=>{window.requestAnimationFrame(()=>{var l,m,d,y,T;(d=this.openedQuestion)==null||d.getStore().mutate((m=(l=o.data)==null?void 0:l.attributes)==null?void 0:m.question),(y=this.openedQuestion)==null||y.getStore().invalidate(),(T=this.userSummary)==null||T.getStore().invalidate()})}),this.questionSubscription.connect()):(console.log("cleanup on close question"),(r=this.openedQuestion)==null||r.getStore().mutate(void 0),this.questionSubscription!==void 0&&t.removeSubscription(this.questionSubscription))}),(s=this.activeQuestionId)==null||s.listen(a=>{var r,o;this.onbordingComplete.get()&&(o=(r=a==null?void 0:a.data)==null?void 0:r.notification)!=null&&o.title&&a.data.question.status===Xe.ACTIVE&&this.notifications.add({type:Dn.QUESTION,action:()=>this.openQuestion(a.data.question.id),close:()=>this.closeQuestion(),autoHideDuration:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${a.data.question.id}`}),data:{title:a.data.notification.title,color:a.data.notification.indicatorColor,icon:a.data.notification.image,imageMode:a.data.notification.imageMode,imagePosition:a.data.notification.imagePosition}})}),this.feedSubscription&&(this.feedSubscription.disconnect(),this.feedSubscription=void 0),this.feedSubscription=kh(this.slStreamId,t),this.feedSubscription.addListener("feed-subscription-active-question",a=>{window.requestAnimationFrame(()=>{var o,l;const r=(o=this.activeQuestionId)==null?void 0:o.getStore();r&&r.mutate((l=a.data)==null?void 0:l.attributes)})}),this.feedSubscription.addListener("feed-subscription-prediction-close",a=>{window.requestAnimationFrame(async()=>{var d,y;const r=(y=(d=a.data)==null?void 0:d.attributes)==null?void 0:y.question;if(!r)return;const{status:o,type:l,id:m}=r;if(o===Xe.RESOLVED&&l===Ae.PREDICTION){const T=await Mh(m,t),f=T==null?void 0:T.answers.find(({correct:M})=>M);this.notifications.add({type:Dn.ONBOARDING,action:()=>this.openQuestion(m),close:()=>this.closeQuestion(),autoHideDuration:5e3,id:this.getCurrentSessionIdPrefix({prefix:`notification-id:${m}-prediction-close`}),data:{title:f!=null&&f.youVoted?`Congratulations! You answered correctly! You won ${f.points} pts!`:`Better luck next time! Correct: ${f==null?void 0:f.text}!`}})}})}),this.feedSubscription.addListener("feed-subscription-questions-list",()=>{window.requestAnimationFrame(()=>{var a;(a=this.questions)==null||a.invalidate()})})});S(this,"disconnect",()=>{var t,s;(t=this.questionSubscription)==null||t.disconnect(),(s=this.feedSubscription)==null||s.disconnect()});S(this,"submitInplay",async()=>{const t=this.slStreamId.get();t&&(await Eh(this.transport,t),this.onbordingComplete.set(!0),localStorage.setItem(`sl-onbording:${this.userId.get()}:${t}`,"true"))});S(this,"submitAnswer",async(t,s)=>{var a;await Ah(this.transport,{questionId:t,answerId:s}),(a=this.questions)==null||a.invalidate()});S(this,"skipQuestion",async t=>{var s;await bh(this.transport,t),(s=this.questions)==null||s.invalidate()});S(this,"openQuestion",t=>{this.openedQuestionId.set(t),this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${t}`}))});S(this,"closeQuestion",()=>{this.notifications.markAsViewed(this.getCurrentSessionIdPrefix({prefix:`notification-id:${this.openedQuestionId.get()}`})),window.requestAnimationFrame(()=>{this.openedQuestionId.set(void 0)})});if(this.leaderboardId=new De(_e(this.settings.getValue("pinnedLeaderboardId")),"pinnedLeaderboardId").getStore(),this.slStreamId=a.stores.slStreamId.getAtomStore(),this.userId=a.stores.user.getAtomStore(),this.organizationId=a.stores.organizationSettings.getAtomStore(),this.moderationId=new De(_e(),"moderationId").getStore(),this.feedId=new De(_e(),"feedId").getStore(),this.onbordingComplete=new De(_e(!1),"onbordingComplete").getStore(),this.openedQuestionId=new De(_e(),"openedQuestionId").getStore(),this.notifications=a.notifications,this.transport=a.transport,this.closeFeature=a.sdk.closeFeature,this.openFeature=()=>a.sdk.openFeature(we.GAMES),!this.userId.get())this.userId.subscribe(r=>{r&&window.requestAnimationFrame(()=>{const l=!!localStorage.getItem(`sl-onbording:${r}:${this.slStreamId.get()}`);this.onbordingComplete.set(l),this.showOnbordingInApp(l)})});else{const r=this.userId.get(),l=!!localStorage.getItem(`sl-onbording:${r}:${this.slStreamId.get()}`);this.onbordingComplete.set(l),this.showOnbordingInApp(l)}this.status.subscribe(r=>{r===ln.Ready?this.connect(a.transport):this.disconnect()}),this.onbordingComplete.subscribe(r=>{var o;r&&((o=this.activeQuestionId)==null||o.invalidate())})}}const Dh={[we.GAMES]:!0,[we.HIGHLIGHTS]:!0};class _h extends co{}class wh extends Wi{}const vh=(n,e,t)=>n.type===we.GAMES?new co(n,e,t):n.type===we.HIGHLIGHTS?new _h(n,e,t):new wh(n,e),Oh=(n,e,t)=>{n.features=new Map,n.activeFeature=new De(_e(),"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=Nn.ORGANIZATION)=>{const r=vh(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,Nn.ORGANIZATION)},n.stores.providerStreamId.listen(s=>{s||n.reinitializeFeatures()}),n.storeSubscribe=()=>{const s=(r,o)=>{if(o!=null&&o.overlays){r===Nn.STREAM&&n.features.clear();for(const l of o.overlays)n.features.has(l.type)?n.updateFeature(l,r):n.initFeature(l,r)}},a={organizationSettings:r=>{if(r.data)try{s(Nn.ORGANIZATION,r.data)}catch(o){console.log(o)}},streamSettings:r=>{if(r.data)try{s(Nn.STREAM,r.data)}catch(o){console.log(o)}}};n.store.subscribe(a)},t()},jh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=";const Lh=A("div")({name:"Container",class:"c1nck5pb",propsAsIs:!1}),Rh=A("div")({name:"BackgroundBlock",class:"b1kix5tm",propsAsIs:!1}),xh=A("img")({name:"Icon",class:"i1ey0b10",propsAsIs:!1}),Ch=A("div")({name:"ContentWrap",class:"cizx07o",propsAsIs:!1}),zh=A("img")({name:"SponsorLogo",class:"s1pv3lf6",propsAsIs:!1}),Uh=A("span")({name:"SponsorText",class:"s18vymlp",propsAsIs:!1}),Ph=A("div")({name:"ContentTitle",class:"c17v2g7n",propsAsIs:!1}),Bh=A("div")({name:"ContentSubtitle",class:"c146qhfh",propsAsIs:!1}),Qh=A("button")({name:"ActionBtn",class:"aeuxca5",propsAsIs:!1}),Fh=A("button")({name:"CloseBtn",class:"c10v7vcj",propsAsIs:!1}),Gh=A("img")({name:"IconClose",class:"i2g9z26",propsAsIs:!1}),Yh=({close:n,action:e,data:{icon:t,header:s,title:a,subtitle:r,graphicBg:o,sponsorLogo:l}})=>k.jsxs(Lh,{children:[k.jsx(Fh,{onClick:n,children:k.jsx(Gh,{alt:"icon-close-onboarding-inapp",src:jh})}),k.jsx(Rh,{style:{backgroundImage:`url(${o||""})`},children:t&&k.jsx(xh,{alt:"onboarding-inapp-icon",src:t})}),k.jsxs(Ch,{children:[k.jsxs("div",{children:[k.jsx("div",{children:l?k.jsxs(k.Fragment,{children:[k.jsx(zh,{alt:"sponsor-logo",src:l}),k.jsx(Uh,{children:"Presents"})]}):s||""}),k.jsx(Ph,{children:a||""}),k.jsx(Bh,{children:r||""})]}),k.jsx(Qh,{onClick:e,children:"Play"})]})]});const Vh=A("div")({name:"NotificationContainer",class:"n1bhrb8h",propsAsIs:!1}),$h={[Dn.ONBOARDING]:Yh,[Dn.QUESTION]:si},qh=({index:n,total:e,...t})=>{const s=Q.useRef(null),a=$h[t.type]||si;return Q.useEffect(()=>{s.current!==null&&t.hiding&&s.current.animate([{right:"0"},{right:"-100%"}],{duration:300,fill:"forwards"})},[t.hiding]),k.jsx(Vh,{ref:s,style:{zIndex:n+1,transform:`translateY(${100*(e-n-1)}%)`},children:k.jsx(a,{...t})})};const Wh=A("div")({name:"NotificationsContainer",class:"ntlmi04",propsAsIs:!1}),Hh=({notificationsStore:n})=>{const e=Le.useStore(n);return k.jsx(Wh,{children:e==null?void 0:e.map((t,s)=>k.jsx(qh,{index:s,total:e.length,...t},t.id))})},Zh=({store:n})=>{var t;const{data:e}=Le.useStore(n);return e!=null&&e.summary?k.jsx(Wy,{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}):k.jsx("div",{children:"wait user..."})},Kh=({store:n,openQuestion:e})=>{const{data:t}=Le.useStore(n);return t?k.jsx(Ey,{openQuestion:e,questions:t}):k.jsx("div",{children:"wait questions..."})},Jh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxnIGlkPSJUcm9waHkiPgogICAgICA8cGF0aCBpZD0iQ29tYmluZWQgU2hhcGUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMi43NjkxNiAzLjUwMDAyQzIuNzY5MTYgNC40OTc4NiAyLjk0NzA1IDUuMzgzNDggMy4zMDI4MiA2LjE1NjkyQzIuNjI0OTMgNi4wMTg0NyAyLjA1ODgzIDUuNzQ4NzIgMS42MDQ1IDUuMzQ3NjhDMS4xNTAxNyA0Ljk0NjYzIDAuOTIzMDA4IDQuNTU5OTIgMC45MjMwMDggNC4xODc1MlYzLjUwMDAySDIuNzY5MTZaTTExLjA3NjggMy41MDAwMlY0LjE4NzUyQzExLjA3NjggNC41NTk5MiAxMC44NDk3IDQuOTQ2NjMgMTAuMzk1MyA1LjM0NzY4QzkuOTQxIDUuNzQ4NzIgOS4zNzQ5IDYuMDE4NDcgOC42OTcwMSA2LjE1NjkyQzkuMDUyNzggNS4zODM0OCA5LjIzMDY2IDQuNDk3ODYgOS4yMzA2NiAzLjUwMDAySDExLjA3NjhaTTEyIDQuMTg3NVYzLjI3MDgzQzEyIDMuMDc5ODYgMTEuOTMyNyAyLjkxNzU0IDExLjc5ODEgMi43ODM4NUMxMS42NjM1IDIuNjUwMTcgMTEuNSAyLjU4MzMzIDExLjMwNzcgMi41ODMzM0g5LjIzMDc3VjEuODk1ODNDOS4yMzA3NyAxLjU4MDczIDkuMTE3NzkgMS4zMTA5OCA4Ljg5MTgzIDEuMDg2NTlDOC42NjU4NiAwLjg2MjE5NSA4LjM5NDIzIDAuNzUgOC4wNzY5MiAwLjc1SDMuOTIzMDhDMy42MDU3NyAwLjc1IDMuMzM0MTQgMC44NjIxOTUgMy4xMDgxNyAxLjA4NjU5QzIuODgyMjEgMS4zMTA5OCAyLjc2OTIzIDEuNTgwNzMgMi43NjkyMyAxLjg5NTgzVjIuNTgzMzNIMC42OTIzMDhDMC40OTk5OTkgMi41ODMzMyAwLjMzNjUzOSAyLjY1MDE3IDAuMjAxOTIzIDIuNzgzODVDMC4wNjczMDcgMi45MTc1NCAwIDMuMDc5ODYgMCAzLjI3MDgzVjQuMTg3NUMwIDQuNTI2NDggMC4wOTk3NTg2IDQuODY3ODQgMC4yOTkyNzkgNS4yMTE1OUMwLjQ5ODc5OSA1LjU1NTM0IDAuNzY4MDI3IDUuODY1NjcgMS4xMDY5NyA2LjE0MjU4QzEuNDQ1OTIgNi40MTk0OSAxLjg2MTc4IDYuNjUyMjMgMi4zNTQ1NyA2Ljg0MDgyQzIuODQ3MzYgNy4wMjk0MSAzLjM2NTM4IDcuMTM1NjMgMy45MDg2NSA3LjE1OTUxQzQuMTEwNTggNy40MTczMiA0LjMzODk0IDcuNjQ0MSA0LjU5Mzc1IDcuODM5ODRDNC43NzY0NCA4LjAwMjE3IDQuOTAyNjQgOC4xNzUyNCA0Ljk3MjM2IDguMzU5MDVDNS4wNDIwNyA4LjU0Mjg2IDUuMDc2OTIgOC43NTY1MSA1LjA3NjkyIDlDNS4wNzY5MiA5LjI1NzgxIDUuMDAzNjEgOS40NzUwNCA0Ljg1Njk3IDkuNjUxNjlDNC43MTAzNCA5LjgyODM0IDQuNDc1OTYgOS45MTY2NyA0LjE1Mzg1IDkuOTE2NjdDMy43OTMyNyA5LjkxNjY3IDMuNDcyMzYgMTAuMDI1MyAzLjE5MTExIDEwLjI0MjVDMi45MDk4NSAxMC40NTk3IDIuNzY5MjMgMTAuNzMzMSAyLjc2OTIzIDExLjA2MjVWMTEuNTIwOEMyLjc2OTIzIDExLjU4NzcgMi43OTA4NyAxMS42NDI2IDIuODM0MTMgMTEuNjg1NUMyLjg3NzQgMTEuNzI4NSAyLjkzMjY5IDExLjc1IDMgMTEuNzVIOUM5LjA2NzMxIDExLjc1IDkuMTIyNiAxMS43Mjg1IDkuMTY1ODYgMTEuNjg1NUM5LjIwOTEzIDExLjY0MjYgOS4yMzA3NyAxMS41ODc3IDkuMjMwNzcgMTEuNTIwOFYxMS4wNjI1QzkuMjMwNzcgMTAuNzMzMSA5LjA5MDE1IDEwLjQ1OTcgOC44MDg4OSAxMC4yNDI1QzguNTI3NjQgMTAuMDI1MyA4LjIwNjczIDkuOTE2NjcgNy44NDYxNSA5LjkxNjY3QzcuNTI0MDQgOS45MTY2NyA3LjI4OTY2IDkuODI4MzQgNy4xNDMwMyA5LjY1MTY5QzYuOTk2MzkgOS40NzUwNCA2LjkyMzA4IDkuMjU3ODEgNi45MjMwOCA5QzYuOTIzMDggOC43NTY1MSA2Ljk1NzkzIDguNTQyODYgNy4wMjc2NCA4LjM1OTA1QzcuMDk3MzYgOC4xNzUyNCA3LjIyMzU2IDguMDAyMTcgNy40MDYyNSA3LjgzOTg0QzcuNjYxMDYgNy42NDQxIDcuODg5NDIgNy40MTczMiA4LjA5MTM1IDcuMTU5NTFDOC42MzQ2MiA3LjEzNTYzIDkuMTUyNjQgNy4wMjk0MSA5LjY0NTQzIDYuODQwODJDMTAuMTM4MiA2LjY1MjIzIDEwLjU1NDEgNi40MTk0OSAxMC44OTMgNi4xNDI1OEMxMS4yMzIgNS44NjU2NyAxMS41MDEyIDUuNTU1MzQgMTEuNzAwNyA1LjIxMTU5QzExLjkwMDIgNC44Njc4NCAxMiA0LjUyNjQ4IDEyIDQuMTg3NVpNNS4wNzAzMyA1LjM4NDkxTDYuMDM4MyA0Ljg3NTAzTDcuMDA2MjcgNS4zODQ5MUw2LjgyMTQgNC4zMDQ5N0w3LjYwNDUxIDMuNTQwMTZMNi41MjIyOCAzLjM4MjZMNi4wMzgzIDIuNDAwMDNMNS41NTQzMSAzLjM4MjZMNC40NzIwOSAzLjU0MDE2TDUuMjU1MTkgNC4zMDQ5N0w1LjA3MDMzIDUuMzg0OTFaIiBmaWxsPSJ3aGl0ZSIvPgogICAgPC9nPgogIDwvc3ZnPgo=",Xh="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMiIgdmlld0JveD0iMCAwIDIyIDIyIiBmaWxsPSJub25lIj4KICAgIDxwYXRoIGQ9Ik01LjUgMi43ODg2N1YxMi40MTM3QzUuNSAxMy4xNzI5IDQuODg0MjYgMTMuNzUgNC4xMjUgMTMuNzVIMS4zNzVDMC42MTU3NDIgMTMuNzUgMCAxMy4xMzQzIDAgMTIuNDEzN1YyLjgyNzM0QzAgMi4wNjgwOCAwLjYxNTc0MiAxLjQ5MTAyIDEuMzc1IDEuNDkxMDJINC4xMjVDNC44ODU1NSAxLjQxMzY3IDUuNSAxLjk5Mzc1IDUuNSAyLjc4ODY3Wk0yMiAxMi4zNzA3QzIyIDEzLjUwOTQgMjEuMDc3IDE0LjQzMjMgMTkuOTM3NSAxNC40MzIzSDEzLjY0MjZDMTQuNjIxIDE2LjA2MTMgMTUuMTI1OSAxNy45MDc3IDE1LjEyNTkgMTguNTU4MkMxNS4xMjUgMTkuNTcxNCAxNC4zMzAxIDIwLjYyNSAxMi45OTggMjAuNjI1QzEwLjI4NTQgMjAuNjI1IDExLjg2NTQgMTcuMzUyOSA4LjM0ODgzIDE0LjU0MDZMNy42NDg0NCAxMy45ODJDNy4xNDE0MSAxMy41NzM4IDYuODgzNTkgMTIuOTc2NiA2Ljg3OTMgMTIuMzc1QzYuODc4MjkgMTIuMzc0IDYuODc5MyAxMi4zNzUgNi44NzkzIDEyLjM3NUw2Ljg3NSA1LjVDNi44NzUgNC44NTExNyA3LjE4MDY0IDQuMjM5NzMgNy43IDMuODUwNDNMOS4xNjY5NSAyLjc1MDg2QzEwLjM1NTUgMS44NTYyNSAxMS44MDM1IDEuMzc1IDEzLjI5MDIgMS4zNzVIMTUuODEyNUMxNi45NTIgMS4zNzUgMTcuODc1IDIuMjk3NTQgMTcuODc1IDMuNDM2NjRDMTcuODc1IDMuNTkyODMgMTcuODU0NCAzLjc0MzU3IDE3LjgyMTUgMy44ODk5NkMxOC42NDg0IDQuMTU5MzcgMTkuMjUgNC45MjQyMiAxOS4yNSA1Ljg0Mzc1QzE5LjI1IDYuMjM2ODMgMTkuMTM0MSA2LjYwMDQzIDE4Ljk0MzIgNi45MTI4MUMxOS44OTg4IDcuMDg5ODQgMjAuNjI1IDcuOTI3NzMgMjAuNjI1IDguOTMzMkMyMC42MjUgOS40NzAzMSAyMC40MTQ4IDkuOTU1IDIwLjA3ODQgMTAuMzIyQzIxLjE0OTIgMTAuMzk0MSAyMiAxMS4yNzkzIDIyIDEyLjM3MDdaIiBmaWxsPSJ3aGl0ZSIvPgogIDwvc3ZnPgo=";const eM=A("div")({name:"Container",class:"c1ibttgl",propsAsIs:!1}),nM=A("img")({name:"Logo",class:"l16el447",propsAsIs:!1}),tM=A("div")({name:"RightBlock",class:"rb3jndy",propsAsIs:!1}),aM=A("button")({name:"ExitBtn",class:"e162i9w9",propsAsIs:!1}),sM=A("img")({name:"ExitIcon",class:"e1uh0tpp",propsAsIs:!1}),rM=A("div")({name:"Interactive",class:"i13726cq",propsAsIs:!1}),iM=()=>n=>n.isSuccess?"#f1be1c":"#da3732",Or=A("div")({name:"ReactionIconWrap",class:"r1weckaj",propsAsIs:!1,vars:{"r1weckaj-0":[iM()]}}),jr=A("img")({name:"ReactionIcon",class:"r1u8ekkw",propsAsIs:!1});const oM=A("div")({name:"Container",class:"c1kt0nvm",propsAsIs:!1}),cM=A("div")({name:"Title",class:"tavk3hk",propsAsIs:!1}),lM=A("div")({name:"PointContainer",class:"p1vdx5su",propsAsIs:!1}),uM=A("span")({name:"Point",class:"p68apx3",propsAsIs:!1}),mM=A("span")({name:"PointLabel",class:"p157xd4a",propsAsIs:!1}),ra=({points:n})=>k.jsxs(oM,{children:[k.jsx(cM,{children:"YOU WON"}),k.jsxs(lM,{children:[k.jsx(uM,{children:n}),k.jsx(mM,{children:"PTS"})]})]}),dM=({logo:n,points:e,questionAnswered:t,questionAnsweredCorrectly:s,questionType:a,closeQuestion:r,setTimeToExpire:o})=>{const l=!t&&a!==Ae.PREDICTION,m=t&&a===Ae.TRIVIA,d=m&&s,y=m&&!s,T=t&&a===Ae.PREDICTION;return k.jsxs(eM,{children:[k.jsxs(tM,{children:[k.jsxs(rM,{children:[l&&k.jsx(oi,{setTimeToExpire:o}),d&&k.jsxs(k.Fragment,{children:[k.jsx(ra,{points:e}),k.jsx(Or,{isSuccess:!0,children:k.jsx(jr,{alt:"reaction-icon",src:Jh})})]}),y&&k.jsxs(k.Fragment,{children:[k.jsx(ra,{points:0}),k.jsx(Or,{isSuccess:!1,children:k.jsx(jr,{alt:"reaction-icon",src:Xh})})]}),T&&k.jsx(ra,{points:e})]}),k.jsx(aM,{onClick:r,children:k.jsx(sM,{alt:"exit-icon",src:Fa})})]}),n&&k.jsx(nM,{src:n})]})},pM="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAxMy44MzQ4TDY3Ljc2MzYgNy40NDE0Nkg2Mi4wNjA2TDU5LjM4OTcgMTAuNTYwMkw1Ni42MTU1IDcuNDQxNDZaTTYyLjI3MjEgNy45MTY1OUw1OS4zOTY0IDExLjI3NDdMNTYuNDA5MiA3LjkxNjU5SDUxLjc0NDZMNTYuOTMwNyAxMy44NjE1TDUxLjc0NDcgMTkuODA1NEg1Ni4yMjU3TDU5LjE1NzEgMTYuNDIxM0w2Mi4xMTU2IDE5LjgwNTRINjYuNzk4N0w2MS41NjYgMTMuODM1N0w2Ni43MjYxIDcuOTE2NTlINjIuMjcyMVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDQuMzYzNSA3LjQ0MTQ2VjQuNTY0MDZINTAuNzA2NlYwLjA1NTk5OThIMzkuNzAyVjIwLjI4MDVINTAuNzA2NlYxNS43NjAxSDQ0LjM2MzVWMTEuNzc5NEg1MC43MDY2VjcuNDQxNDZINDQuMzYzNVpNNTAuMjQwOCA3LjkxNjU5SDQzLjg5NzhWNC4wODg5M0g1MC4yNDA4VjAuNTMxMTMySDQwLjE2NzhWMTkuODA1NEg1MC4yNDA4VjE2LjIzNTJINDMuODk3OFYxMS4zMDQzSDUwLjI0MDhWNy45MTY1OVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGQ9Ik0zNS4wNiAwLjA1NTk5OThWOC4zMzI4MUgzNS4wMDg3QzMzLjk4MDMgNy4xMjc4NyAzMi42OTY2IDYuNzA4ODEgMzEuMjA3IDYuNzA4ODFDMjguMTU1MiA2LjcwODgxIDI1Ljg1NjEgOC44MjYgMjUuMDQ5MyAxMS42MjM2QzI0LjEyOCA4LjU0MDkyIDIxLjc1NDQgNi42NTA4NCAxOC4yMzQ5IDYuNjUwODRDMTUuMzc2OSA2LjY1MDg0IDEzLjExOTcgNy45NTkzNiAxMS45NDIyIDEwLjA5MThWNy40NDE0Nkg2LjAzNDE2VjQuNTY0MDZIMTIuNDgxNVYwLjA1NTk5OThIMC43NjgwMDVWMjAuMjgwNUg2LjAzNDE2VjExLjc3OTRIMTEuMjgzNkMxMS4xMjcgMTIuNDAzNyAxMS4wNDMyIDEzLjA3MjcgMTEuMDQzMiAxMy43Nzg4QzExLjA0MzIgMTcuOTk3IDE0LjIwMzEgMjAuOTU4IDE4LjIzNDkgMjAuOTU4QzIxLjYyNTggMjAuOTU4IDIzLjg2MDcgMTkuMzM0IDI1LjA0MTkgMTYuMzc0SDIwLjUyODRDMTkuOTE4MyAxNy4yNjQ0IDE5LjQ1NTMgMTcuNTI3NiAxOC4yMzQ5IDE3LjUyNzZDMTYuODE5OSAxNy41Mjc2IDE1LjU5OTUgMTYuMjY4NSAxNS41OTk1IDE0Ljc3NTZIMjQuNzg5NEMyNS4xODgxIDE4LjEyNjIgMjcuNzQ3MiAyMS4wMTYgMzEuMjU4MiAyMS4wMTZDMzIuNzczIDIxLjAxNiAzNC4xNjAxIDIwLjI1NTggMzUuMDA3OCAxOC45NzI5SDM1LjA1OVYyMC4yODI0SDM5LjcwMUwzOS43MDIgMC4wNTU5OTk4SDM1LjA2Wk0xNS43NDY3IDExLjgzOTNDMTYuMDM5MiAxMC41NTQ1IDE3LjAxNjQgOS43MTU0NSAxOC4yMzU4IDkuNzE1NDVDMTkuNTc4MiA5LjcxNTQ1IDIwLjUwNTEgMTAuNTI4OSAyMC43NDkyIDExLjgzOTNDMjAuODUxNyAxMS44MzkzIDE1Ljc0NjcgMTEuODM5MyAxNS43NDY3IDExLjgzOTNaTTMyLjI0MiAxNy4yMDE2QzMwLjUzMDcgMTcuMjAxNiAyOS40NjY4IDE1LjU3NDggMjkuNDY2OCAxMy44NzY3QzI5LjQ2NjggMTIuMDYxNyAzMC4zOTE5IDEwLjMxNiAzMi4yNDIgMTAuMzE2QzM0LjE2MDEgMTAuMzE2IDM0LjkyNCAxMi4wNjE3IDM0LjkyNCAxMy44NzY3QzM0LjkyNCAxNS41OTc2IDM0LjExNDQgMTcuMjAxNiAzMi4yNDIgMTcuMjAxNloiIGZpbGw9IndoaXRlIi8+CjwvZz4KPC9zdmc+Cg==";const yM=A("div")({name:"QuestionContainer",class:"q15yq4tu",propsAsIs:!1}),gM=({store:n,closeQuestion:e,vote:t})=>{var d;const{data:s}=Le.useStore(n),[a,r]=Q.useState(!1),o=Q.useCallback(y=>{r(y)},[r]),l=Q.useMemo(()=>s==null?void 0:s.answers.find(y=>y.youVoted===!0),[s]),m=Q.useMemo(()=>!!(s!=null&&s.answers.find(y=>y.correct===!0)),[s]);return s?k.jsx(yM,{children:k.jsxs("div",{children:[k.jsx(dM,{points:(l==null?void 0:l.points)||0,questionAnswered:!!l,questionAnsweredCorrectly:l==null?void 0:l.correct,logo:pM,closeQuestion:e,setTimeToExpire:o,questionType:s.type}),k.jsx("div",{children:k.jsx(og,{title:s.subject,feedbackMessages:(d=s.options)==null?void 0:d.options.value,questionType:s.type,questionId:s.id,questionAnswered:!!l,questionAnsweredCorrectly:l==null?void 0:l.correct,options:s.answers.map(y=>({id:y.id,title:y.text,icon:y.icon,type:s.type,correct:y.correct,percentage:y.percentage,answered:y.youVoted,disabled:!!l||s.marketClosed||a,questionAnswered:!!l,hasCorrectAnswer:m,points:y.points,onVote:t}))})})]})}):null};const it=A("div")({name:"DemoContainer",class:"dp9wag8",propsAsIs:!1}),fM=A("div")({name:"UserStatisticsContainer",class:"u15x0q1l",propsAsIs:!1}),TM=A("div")({name:"QuestionsContainer",class:"q13pbrok",propsAsIs:!1}),ia=A("button")({name:"Button",class:"baw537u",propsAsIs:!1}),kM=({gamification:n,sdk:e})=>{var d,y,T,f,M,E,w,L,O,R,x,z,U,B,C,H,ne,se,ie,ue,oe,Z,me;const t=Le.useStore(n.status),s=Le.useStore(n.onbordingComplete),{slStreamId:a}=Le.useStore(e.sdkStore),r=Le.useStore(n.featureSettings);if(t!==ln.Ready)return k.jsx("div",{children:"wait..."});if(a!=null&&a.loading)return k.jsx(it,{children:k.jsx("div",{children:"Event is loading"})});if(!(a!=null&&a.data))return k.jsx(it,{children:k.jsx("div",{children:"Event is forbidden"})});if(!s)return k.jsx(it,{children:k.jsx(hm,{closeFeature:e.closeFeature,gamification:n,steps:(y=(d=r.inplayGame)==null?void 0:d.onboarding)==null?void 0:y.steps,gameIcon:(M=(f=(T=r.inplayGame)==null?void 0:T.overview)==null?void 0:f.media)==null?void 0:M.gameIcon,sponsorLogo:(L=(w=(E=r.inplayGame)==null?void 0:E.overview)==null?void 0:w.media)==null?void 0:L.sponsorLogo,rules:(R=(O=r.inplayGame)==null?void 0:O.rules)==null?void 0:R.rules,rulesBtnLabel:(z=(x=r.inplayGame)==null?void 0:x.rules)==null?void 0:z.buttonLabel,rulesTitle:(B=(U=r.inplayGame)==null?void 0:U.rules)==null?void 0:B.heading,primaryColor:(ne=(H=(C=r.inplayGame)==null?void 0:C.overview)==null?void 0:H.appearance)==null?void 0:ne.primaryColor,inviteCardTitle:(ie=(se=r.inplayGame)==null?void 0:se.inviteCard)==null?void 0:ie.heading,inviteCardSubtext:(oe=(ue=r.inplayGame)==null?void 0:ue.inviteCard)==null?void 0:oe.subtext,inviteCardBtnLabel:(me=(Z=r.inplayGame)==null?void 0:Z.inviteCard)==null?void 0:me.buttonLabel})});const o=Me=>{n.openQuestion(Me)},l=()=>{n.closeQuestion()},m=(Me,Ve)=>{n.submitAnswer(Me,Ve)};return k.jsxs(it,{children:[k.jsx(fM,{children:n.userSummary&&k.jsx(Zh,{store:n.userSummary.getStore()})}),k.jsxs(TM,{children:[n.questions&&k.jsx(Kh,{openQuestion:o,store:n.questions.getStore()}),n.openedQuestion&&k.jsx(gM,{closeQuestion:l,vote:m,store:n.openedQuestion.getStore()})]})]})},hM=({sdk:n})=>{const e=async t=>{try{await n.authorizationBypass("streamlayer:streamlayer",t)}catch(s){throw console.log("login err",s),s}};return k.jsx(Qu,{login:e,anonymousLogin:n.anonymousAuthorization,host:n.host})},MM=({activeFeature:n,sdk:e})=>{const[t,s]=Q.useState(null),{organizationSettings:a,streamSettings:r}=Le.useStore(e.sdkStore),o=Q.useMemo(()=>{const l=(r==null?void 0:r.data)||(a==null?void 0:a.data);return l!=null&&l.overlays?l.overlays:[]},[a,r]);if(Q.useEffect(()=>{const l=e.getFeatures();if(n)for(const[m,d]of l)m===n?d.status.get()===ln.Suspended&&(d.enable(),s(d)):d.status.get()===ln.Ready&&d.disable();else{for(const[,m]of l)m.status.get()===ln.Ready&&m.disable();s(null)}return()=>{for(const[,m]of l)m.status.get()===ln.Ready&&m.disable()}},[n,e]),n===we.GAMES){const l=t;return l?k.jsxs("div",{children:[k.jsx(ia,{onClick:()=>e.closeFeature(),children:"close"}),k.jsx(kM,{gamification:l,sdk:e})]}):k.jsx("div",{children:"wait gamification..."})}return k.jsxs("div",{children:[k.jsx(ia,{onClick:()=>e.logout(),children:"logout"}),o.map(l=>k.jsxs(ia,{onClick:()=>e.openFeature(l.type),disabled:!(l.type in Dh),children:[k.jsx("img",{src:l.icon,alt:""}),l.name]},l.name))]})},NM=({sdk:n})=>{const e=Le.useStore(n.organizationStore()),t=Le.useStore(n.getUserStore()),s=Le.useStore(n.getActiveFeature());return e.loading?k.jsx("div",{children:"authentificating..."}):e.data?t.loading?k.jsx("div",{children:"authentificating..."}):t.data?k.jsxs(k.Fragment,{children:[k.jsx(Hh,{notificationsStore:n.getNotificationsStore()}),k.jsx(MM,{sdk:n,activeFeature:s})]}):k.jsx(hM,{sdk:n}):k.jsx("div",{children:"wrong sdk key..."})};const IM="t12mji3x",SM=({children:n})=>k.jsx("div",{className:IM,children:n});class AM extends cg{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,o,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=(o=t==null?void 0:t.data)==null?void 0:o.meta)==null?void 0:l.jwt))})});this.$coreStore=t,this.transport=s,this.$bypassLogin=Yk(this.transport),this.subscribe()}}const EM=async(n,e,t)=>{n.auth=new AM(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,o)=>{await n.auth.login(r,o),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()},bM=(n,e,t)=>{n.sdk=Object.create(null),n.sdk.initializeApp=async()=>{n.storeSubscribe(),n.stores.enabled.setValue("on"),n.stores.status.setValue(In.INITIALIZATION);try{const s=await n.stores.organizationSettings.getValue();return s?(n.stores.status.setValue(In.READY),{enabled:!!s}):(n.stores.status.setValue(In.FAILED),{err:"failed"})}catch(s){return n.stores.enabled.setValue(),n.stores.status.setValue(In.FAILED),{err:`${s}`}}},n.sdk.disableApp=()=>{n.stores.enabled.setValue(),n.stores.status.setValue(In.DISABLED),n.storeUnsubscribe()},n.sdk.createEventSession=s=>{n.stores.providerStreamId.setValue(""),n.stores.providerStreamId.setValue(s)},t()};var os={exports:{}},cs={exports:{}};function DM(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 _M=DM,wM=_M;function lo(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=wM(vM),a=null,r=null,o=0,l=null,m={push:w,drain:je,saturated:je,pause:y,paused:!1,concurrency:t,running:d,resume:M,idle:E,length:T,getQueue:f,unshift:L,empty:je,kill:R,killAndDrain:x,error:z};return m;function d(){return o}function y(){m.paused=!0}function T(){for(var U=a,B=0;U;)U=U.next,B++;return B}function f(){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++)o++,O()}}function E(){return o===0&&m.length()===0}function w(U,B){var C=s.get();C.context=n,C.release=O,C.value=U,C.callback=B||je,C.errorHandler=l,o===m.concurrency||m.paused?r?(r.next=C,r=C):(a=C,r=C,m.saturated()):(o++,e.call(n,C.value,C.worked))}function L(U,B){var C=s.get();C.context=n,C.release=O,C.value=U,C.callback=B||je,o===m.concurrency||m.paused?a?(C.next=a,a=C):(a=C,r=C,m.saturated()):(o++,e.call(n,C.value,C.worked))}function O(U){U&&s.release(U);var B=a;B?m.paused?o--:(r===a&&(r=null),a=B.next,B.next=null,e.call(n,B.value,B.worked),r===null&&m.empty()):--o===0&&m.drain()}function R(){a=null,r=null,m.drain=je}function x(){a=null,r=null,m.drain(),m.drain=je}function z(U){l=U}}function je(){}function vM(){this.value=null,this.callback=je,this.next=null,this.release=je,this.context=null,this.errorHandler=null;var n=this;this.worked=function(t,s){var a=n.callback,r=n.errorHandler,o=n.value;n.value=null,n.callback=je,n.errorHandler&&r(t,o),a.call(n.context,t,s),n.release(n)}}function OM(n,e,t){typeof n=="function"&&(t=e,e=n,n=null);function s(y,T){e.call(this,y).then(function(f){T(null,f)},T)}var a=lo(n,s,t),r=a.push,o=a.unshift;return a.push=l,a.unshift=m,a.drained=d,a;function l(y){var T=new Promise(function(f,M){r(y,function(E,w){if(E){M(E);return}f(w)})});return T.catch(je),T}function m(y){var T=new Promise(function(f,M){o(y,function(E,w){if(E){M(E);return}f(w)})});return T.catch(je),T}function d(){if(a.idle())return new Promise(function(f){f()});var y=a.drain,T=new Promise(function(f){a.drain=function(){y(),f()}});return T}}cs.exports=lo;cs.exports.promise=OM;var uo=cs.exports,ls={exports:{}},_n=typeof Reflect=="object"?Reflect:null,Lr=_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 jM(n){console&&console.warn&&console.warn(n)}var mo=Number.isNaN||function(e){return e!==e};function te(){te.init.call(this)}ls.exports=te;ls.exports.once=CM;te.EventEmitter=te;te.prototype._events=void 0;te.prototype._eventsCount=0;te.prototype._maxListeners=void 0;var Rr=10;function zt(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 Rr},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+".");Rr=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 po(n){return n._maxListeners===void 0?te.defaultMaxListeners:n._maxListeners}te.prototype.getMaxListeners=function(){return po(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 o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var m=r[e];if(m===void 0)return!1;if(typeof m=="function")Lr(m,this,t);else for(var d=m.length,y=ko(m,d),s=0;s<d;++s)Lr(y[s],this,t);return!0};function yo(n,e,t,s){var a,r,o;if(zt(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),o=r[e]),o===void 0)o=r[e]=t,++n._eventsCount;else if(typeof o=="function"?o=r[e]=s?[t,o]:[o,t]:s?o.unshift(t):o.push(t),a=po(n),a>0&&o.length>a&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=n,l.type=e,l.count=o.length,jM(l)}return n}te.prototype.addListener=function(e,t){return yo(this,e,t,!1)};te.prototype.on=te.prototype.addListener;te.prototype.prependListener=function(e,t){return yo(this,e,t,!0)};function LM(){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 go(n,e,t){var s={fired:!1,wrapFn:void 0,target:n,type:e,listener:t},a=LM.bind(s);return a.listener=t,s.wrapFn=a,a}te.prototype.once=function(e,t){return zt(t),this.on(e,go(this,e,t)),this};te.prototype.prependOnceListener=function(e,t){return zt(t),this.prependListener(e,go(this,e,t)),this};te.prototype.removeListener=function(e,t){var s,a,r,o,l;if(zt(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,o=s.length-1;o>=0;o--)if(s[o]===t||s[o].listener===t){l=s[o].listener,r=o;break}if(r<0)return this;r===0?s.shift():RM(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),o;for(a=0;a<r.length;++a)o=r[a],o!=="removeListener"&&this.removeAllListeners(o);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 fo(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?xM(a):ko(a,a.length)}te.prototype.listeners=function(e){return fo(this,e,!0)};te.prototype.rawListeners=function(e){return fo(this,e,!1)};te.listenerCount=function(n,e){return typeof n.listenerCount=="function"?n.listenerCount(e):To.call(n,e)};te.prototype.listenerCount=To;function To(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 ko(n,e){for(var t=new Array(e),s=0;s<e;++s)t[s]=n[s];return t}function RM(n,e){for(;e+1<n.length;e++)n[e]=n[e+1];n.pop()}function xM(n){for(var e=new Array(n.length),t=0;t<e.length;++t)e[t]=n[t].listener||n[t];return e}function CM(n,e){return new Promise(function(t,s){function a(o){n.removeListener(e,r),s(o)}function r(){typeof n.removeListener=="function"&&n.removeListener("error",a),t([].slice.call(arguments))}ho(n,e,r,{once:!0}),e!=="error"&&zM(n,a,{once:!0})})}function zM(n,e,t){typeof n.on=="function"&&ho(n,"error",e,t)}function ho(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 Mo=ls.exports,Ut={},No={},Io=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 o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==a||o.enumerable!==!0)return!1}return!0},UM=Io,us=function(){return UM()&&!!Symbol.toStringTag},xr=typeof Symbol<"u"&&Symbol,PM=Io,BM=function(){return typeof xr!="function"||typeof Symbol!="function"||typeof xr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:PM()},Cr={foo:{}},QM=Object,FM=function(){return{__proto__:Cr}.foo===Cr.foo&&!({__proto__:null}instanceof QM)},GM="Function.prototype.bind called on incompatible ",YM=Object.prototype.toString,VM=Math.max,$M="[object Function]",zr=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},qM=function(e,t){for(var s=[],a=t||0,r=0;a<e.length;a+=1,r+=1)s[r]=e[a];return s},WM=function(n,e){for(var t="",s=0;s<n.length;s+=1)t+=n[s],s+1<n.length&&(t+=e);return t},HM=function(e){var t=this;if(typeof t!="function"||YM.apply(t)!==$M)throw new TypeError(GM+t);for(var s=qM(arguments,1),a,r=function(){if(this instanceof a){var y=t.apply(this,zr(s,arguments));return Object(y)===y?y:this}return t.apply(e,zr(s,arguments))},o=VM(0,t.length-s.length),l=[],m=0;m<o;m++)l[m]="$"+m;if(a=Function("binder","return function ("+WM(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},ZM=HM,So=Function.prototype.bind||ZM,Ur={}.hasOwnProperty,oa=Function.prototype.call,KM=oa.bind?oa.bind(Ur):function(n,e){return oa.call(Ur,n,e)},q,On=SyntaxError,Ao=Function,wn=TypeError,ca=function(n){try{return Ao('"use strict"; return ('+n+").constructor;")()}catch{}},un=Object.getOwnPropertyDescriptor;if(un)try{un({},"")}catch{un=null}var la=function(){throw new wn},JM=un?function(){try{return arguments.callee,la}catch{try{return un(arguments,"callee").get}catch{return la}}}():la,hn=BM(),XM=FM(),ge=Object.getPrototypeOf||(XM?function(n){return n.__proto__}:null),Sn={},eN=typeof Uint8Array>"u"||!ge?q:ge(Uint8Array),mn={"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":hn&&ge?ge([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":Sn,"%AsyncGenerator%":Sn,"%AsyncGeneratorFunction%":Sn,"%AsyncIteratorPrototype%":Sn,"%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%":Ao,"%GeneratorFunction%":Sn,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hn&&ge?ge(ge([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hn||!ge?q:ge(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"||!hn||!ge?q:ge(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hn&&ge?ge(""[Symbol.iterator]()):q,"%Symbol%":hn?Symbol:q,"%SyntaxError%":On,"%ThrowTypeError%":JM,"%TypedArray%":eN,"%TypeError%":wn,"%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(ge)try{null.error}catch(n){var nN=ge(ge(n));mn["%Error.prototype%"]=nN}var tN=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&&ge&&(t=ge(a.prototype))}return mn[e]=t,t},Pr={"%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"]},Xn=So,ht=KM,aN=Xn.call(Function.call,Array.prototype.concat),sN=Xn.call(Function.apply,Array.prototype.splice),Br=Xn.call(Function.call,String.prototype.replace),Mt=Xn.call(Function.call,String.prototype.slice),rN=Xn.call(Function.call,RegExp.prototype.exec),iN=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oN=/\\(\\)?/g,cN=function(e){var t=Mt(e,0,1),s=Mt(e,-1);if(t==="%"&&s!=="%")throw new On("invalid intrinsic syntax, expected closing `%`");if(s==="%"&&t!=="%")throw new On("invalid intrinsic syntax, expected opening `%`");var a=[];return Br(e,iN,function(r,o,l,m){a[a.length]=l?Br(m,oN,"$1"):o||r}),a},lN=function(e,t){var s=e,a;if(ht(Pr,s)&&(a=Pr[s],s="%"+a[0]+"%"),ht(mn,s)){var r=mn[s];if(r===Sn&&(r=tN(s)),typeof r>"u"&&!t)throw new wn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:a,name:s,value:r}}throw new On("intrinsic "+e+" does not exist!")},Rn=function(e,t){if(typeof e!="string"||e.length===0)throw new wn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new wn('"allowMissing" argument must be a boolean');if(rN(/^%?[^%]*%?$/,e)===null)throw new On("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var s=cN(e),a=s.length>0?s[0]:"",r=lN("%"+a+"%",t),o=r.name,l=r.value,m=!1,d=r.alias;d&&(a=d[0],sN(s,aN([0,1],d)));for(var y=1,T=!0;y<s.length;y+=1){var f=s[y],M=Mt(f,0,1),E=Mt(f,-1);if((M==='"'||M==="'"||M==="`"||E==='"'||E==="'"||E==="`")&&M!==E)throw new On("property names with quotes must have matching quotes");if((f==="constructor"||!T)&&(m=!0),a+="."+f,o="%"+a+"%",ht(mn,o))l=mn[o];else if(l!=null){if(!(f in l)){if(!t)throw new wn("base intrinsic for "+e+" exists, but the property is not available.");return}if(un&&y+1>=s.length){var w=un(l,f);T=!!w,T&&"get"in w&&!("originalValue"in w.get)?l=w.get:l=l[f]}else T=ht(l,f),l=l[f];T&&!m&&(mn[o]=l)}}return l},Eo={exports:{}},uN=Rn,Oa=uN("%Object.defineProperty%",!0),ja=function(){if(Oa)try{return Oa({},"a",{value:1}),!0}catch{return!1}return!1};ja.hasArrayLengthDefineBug=function(){if(!ja())return null;try{return Oa([],"length",{value:1}).length!==1}catch{return!0}};var bo=ja,mN=Rn,dt=mN("%Object.getOwnPropertyDescriptor%",!0);if(dt)try{dt([],"length")}catch{dt=null}var ms=dt,dN=bo(),ds=Rn,Vn=dN&&ds("%Object.defineProperty%",!0);if(Vn)try{Vn({},"a",{value:1})}catch{Vn=!1}var pN=ds("%SyntaxError%"),Mn=ds("%TypeError%"),Qr=ms,yN=function(e,t,s){if(!e||typeof e!="object"&&typeof e!="function")throw new Mn("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Mn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Mn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Mn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Mn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Mn("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,m=!!Qr&&Qr(e,t);if(Vn)Vn(e,t,{configurable:o===null&&m?m.configurable:!o,enumerable:a===null&&m?m.enumerable:!a,value:s,writable:r===null&&m?m.writable:!r});else if(l||!a&&!r&&!o)e[t]=s;else throw new pN("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Do=Rn,Fr=yN,gN=bo(),Gr=ms,Yr=Do("%TypeError%"),fN=Do("%Math.floor%"),TN=function(e,t){if(typeof e!="function")throw new Yr("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||fN(t)!==t)throw new Yr("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],a=!0,r=!0;if("length"in e&&Gr){var o=Gr(e,"length");o&&!o.configurable&&(a=!1),o&&!o.writable&&(r=!1)}return(a||r||!s)&&(gN?Fr(e,"length",t,!0,!0):Fr(e,"length",t)),e};(function(n){var e=So,t=Rn,s=TN,a=t("%TypeError%"),r=t("%Function.prototype.apply%"),o=t("%Function.prototype.call%"),l=t("%Reflect.apply%",!0)||e.call(o,r),m=t("%Object.defineProperty%",!0),d=t("%Math.max%");if(m)try{m({},"a",{value:1})}catch{m=null}n.exports=function(f){if(typeof f!="function")throw new a("a function is required");var M=l(e,o,arguments);return s(M,1+d(0,f.length-(arguments.length-1)),!0)};var y=function(){return l(e,r,arguments)};m?m(n.exports,"apply",{value:y}):n.exports.apply=y})(Eo);var _o=Eo.exports,wo=Rn,vo=_o,kN=vo(wo("String.prototype.indexOf")),Oo=function(e,t){var s=wo(e,!!t);return typeof s=="function"&&kN(e,".prototype.")>-1?vo(s):s},hN=us(),MN=Oo,La=MN("Object.prototype.toString"),Pt=function(e){return hN&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:La(e)==="[object Arguments]"},jo=function(e){return Pt(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&La(e)!=="[object Array]"&&La(e.callee)==="[object Function]"},NN=function(){return Pt(arguments)}();Pt.isLegacyArguments=jo;var IN=NN?Pt:jo,SN=Object.prototype.toString,AN=Function.prototype.toString,EN=/^\s*(?:function)?\*/,Lo=us(),ua=Object.getPrototypeOf,bN=function(){if(!Lo)return!1;try{return Function("return function*() {}")()}catch{}},ma,DN=function(e){if(typeof e!="function")return!1;if(EN.test(AN.call(e)))return!0;if(!Lo){var t=SN.call(e);return t==="[object GeneratorFunction]"}if(!ua)return!1;if(typeof ma>"u"){var s=bN();ma=s?ua(s):!1}return ua(e)===ma},Ro=Function.prototype.toString,En=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ra,pt;if(typeof En=="function"&&typeof Object.defineProperty=="function")try{Ra=Object.defineProperty({},"length",{get:function(){throw pt}}),pt={},En(function(){throw 42},null,Ra)}catch(n){n!==pt&&(En=null)}else En=null;var _N=/^\s*class\b/,xa=function(e){try{var t=Ro.call(e);return _N.test(t)}catch{return!1}},da=function(e){try{return xa(e)?!1:(Ro.call(e),!0)}catch{return!1}},yt=Object.prototype.toString,wN="[object Object]",vN="[object Function]",ON="[object GeneratorFunction]",jN="[object HTMLAllCollection]",LN="[object HTML document.all class]",RN="[object HTMLCollection]",xN=typeof Symbol=="function"&&!!Symbol.toStringTag,CN=!(0 in[,]),Ca=function(){return!1};if(typeof document=="object"){var zN=document.all;yt.call(zN)===yt.call(document.all)&&(Ca=function(e){if((CN||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=yt.call(e);return(t===jN||t===LN||t===RN||t===wN)&&e("")==null}catch{}return!1})}var UN=En?function(e){if(Ca(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{En(e,null,Ra)}catch(t){if(t!==pt)return!1}return!xa(e)&&da(e)}:function(e){if(Ca(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(xN)return da(e);if(xa(e))return!1;var t=yt.call(e);return t!==vN&&t!==ON&&!/^\[object HTML/.test(t)?!1:da(e)},PN=UN,BN=Object.prototype.toString,xo=Object.prototype.hasOwnProperty,QN=function(e,t,s){for(var a=0,r=e.length;a<r;a++)xo.call(e,a)&&(s==null?t(e[a],a,e):t.call(s,e[a],a,e))},FN=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)},GN=function(e,t,s){for(var a in e)xo.call(e,a)&&(s==null?t(e[a],a,e):t.call(s,e[a],a,e))},YN=function(e,t,s){if(!PN(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=s),BN.call(e)==="[object Array]"?QN(e,t,a):typeof e=="string"?FN(e,t,a):GN(e,t,a)},VN=YN,pa=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],$N=typeof globalThis>"u"?ei:globalThis,qN=function(){for(var e=[],t=0;t<pa.length;t++)typeof $N[pa[t]]=="function"&&(e[e.length]=pa[t]);return e},Nt=VN,WN=qN,Vr=_o,ps=Oo,gt=ms,HN=ps("Object.prototype.toString"),Co=us(),$r=typeof globalThis>"u"?ei:globalThis,za=WN(),ys=ps("String.prototype.slice"),ya=Object.getPrototypeOf,ZN=ps("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};Co&&gt&&ya?Nt(za,function(n){var e=new $r[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]=Vr(s.get)}}):Nt(za,function(n){var e=new $r[n],t=e.slice||e.set;t&&(It["$"+n]=Vr(t))});var KN=function(e){var t=!1;return Nt(It,function(s,a){if(!t)try{"$"+s(e)===a&&(t=ys(a,1))}catch{}}),t},JN=function(e){var t=!1;return Nt(It,function(s,a){if(!t)try{s(e),t=ys(a,1)}catch{}}),t},zo=function(e){if(!e||typeof e!="object")return!1;if(!Co){var t=ys(HN(e),8,-1);return ZN(za,t)>-1?t:t!=="Object"?!1:JN(e)}return gt?KN(e):null},XN=zo,eI=function(e){return!!XN(e)};(function(n){var e=IN,t=DN,s=zo,a=eI;function r(v){return v.call.bind(v)}var o=typeof BigInt<"u",l=typeof Symbol<"u",m=r(Object.prototype.toString),d=r(Number.prototype.valueOf),y=r(String.prototype.valueOf),T=r(Boolean.prototype.valueOf);if(o)var f=r(BigInt.prototype.valueOf);if(l)var M=r(Symbol.prototype.valueOf);function E(v,nt){if(typeof v!="object")return!1;try{return nt(v),!0}catch{return!1}}n.isArgumentsObject=e,n.isGeneratorFunction=t,n.isTypedArray=a;function w(v){return typeof Promise<"u"&&v instanceof Promise||v!==null&&typeof v=="object"&&typeof v.then=="function"&&typeof v.catch=="function"}n.isPromise=w;function L(v){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(v):a(v)||D(v)}n.isArrayBufferView=L;function O(v){return s(v)==="Uint8Array"}n.isUint8Array=O;function R(v){return s(v)==="Uint8ClampedArray"}n.isUint8ClampedArray=R;function x(v){return s(v)==="Uint16Array"}n.isUint16Array=x;function z(v){return s(v)==="Uint32Array"}n.isUint32Array=z;function U(v){return s(v)==="Int8Array"}n.isInt8Array=U;function B(v){return s(v)==="Int16Array"}n.isInt16Array=B;function C(v){return s(v)==="Int32Array"}n.isInt32Array=C;function H(v){return s(v)==="Float32Array"}n.isFloat32Array=H;function ne(v){return s(v)==="Float64Array"}n.isFloat64Array=ne;function se(v){return s(v)==="BigInt64Array"}n.isBigInt64Array=se;function ie(v){return s(v)==="BigUint64Array"}n.isBigUint64Array=ie;function ue(v){return m(v)==="[object Map]"}ue.working=typeof Map<"u"&&ue(new Map);function oe(v){return typeof Map>"u"?!1:ue.working?ue(v):v instanceof Map}n.isMap=oe;function Z(v){return m(v)==="[object Set]"}Z.working=typeof Set<"u"&&Z(new Set);function me(v){return typeof Set>"u"?!1:Z.working?Z(v):v instanceof Set}n.isSet=me;function Me(v){return m(v)==="[object WeakMap]"}Me.working=typeof WeakMap<"u"&&Me(new WeakMap);function Ve(v){return typeof WeakMap>"u"?!1:Me.working?Me(v):v instanceof WeakMap}n.isWeakMap=Ve;function Ce(v){return m(v)==="[object WeakSet]"}Ce.working=typeof WeakSet<"u"&&Ce(new WeakSet);function Ne(v){return Ce(v)}n.isWeakSet=Ne;function Ie(v){return m(v)==="[object ArrayBuffer]"}Ie.working=typeof ArrayBuffer<"u"&&Ie(new ArrayBuffer);function K(v){return typeof ArrayBuffer>"u"?!1:Ie.working?Ie(v):v instanceof ArrayBuffer}n.isArrayBuffer=K;function N(v){return m(v)==="[object DataView]"}N.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&N(new DataView(new ArrayBuffer(1),0,1));function D(v){return typeof DataView>"u"?!1:N.working?N(v):v instanceof DataView}n.isDataView=D;var j=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function F(v){return m(v)==="[object SharedArrayBuffer]"}function W(v){return typeof j>"u"?!1:(typeof F.working>"u"&&(F.working=F(new j)),F.working?F(v):v instanceof j)}n.isSharedArrayBuffer=W;function J(v){return m(v)==="[object AsyncFunction]"}n.isAsyncFunction=J;function Y(v){return m(v)==="[object Map Iterator]"}n.isMapIterator=Y;function $(v){return m(v)==="[object Set Iterator]"}n.isSetIterator=$;function X(v){return m(v)==="[object Generator]"}n.isGeneratorObject=X;function he(v){return m(v)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=he;function ze(v){return E(v,d)}n.isNumberObject=ze;function Re(v){return E(v,y)}n.isStringObject=Re;function ve(v){return E(v,T)}n.isBooleanObject=ve;function gn(v){return o&&E(v,f)}n.isBigIntObject=gn;function et(v){return l&&E(v,M)}n.isSymbolObject=et;function Cn(v){return ze(v)||Re(v)||ve(v)||gn(v)||et(v)}n.isBoxedPrimitive=Cn;function Bt(v){return typeof Uint8Array<"u"&&(K(v)||W(v))}n.isAnyArrayBuffer=Bt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(v){Object.defineProperty(n,v,{enumerable:!1,value:function(){throw new Error(v+" is not supported in userland")}})})})(No);var nI=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Ua={exports:{}};typeof Object.create=="function"?Ua.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ua.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 tI=Ua.exports;(function(n){var e=Object.getOwnPropertyDescriptors||function(D){for(var j=Object.keys(D),F={},W=0;W<j.length;W++)F[j[W]]=Object.getOwnPropertyDescriptor(D,j[W]);return F},t=/%[sdj%]/g;n.format=function(N){if(!U(N)){for(var D=[],j=0;j<arguments.length;j++)D.push(o(arguments[j]));return D.join(" ")}for(var j=1,F=arguments,W=F.length,J=String(N).replace(t,function($){if($==="%%")return"%";if(j>=W)return $;switch($){case"%s":return String(F[j++]);case"%d":return Number(F[j++]);case"%j":try{return JSON.stringify(F[j++])}catch{return"[Circular]"}default:return $}}),Y=F[j];j<W;Y=F[++j])R(Y)||!ne(Y)?J+=" "+Y:J+=" "+o(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 j=!1;function F(){if(!j){if(G.process.throwDeprecation)throw new Error(D);G.process.traceDeprecation?console.trace(D):console.error(D),j=!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 j=n.format.apply(n,arguments);console.error("%s %d: %s",N,D,j)}}else s[N]=function(){};return s[N]};function o(N,D){var j={seen:[],stylize:m};return arguments.length>=3&&(j.depth=arguments[2]),arguments.length>=4&&(j.colors=arguments[3]),O(D)?j.showHidden=D:D&&n._extend(j,D),C(j.showHidden)&&(j.showHidden=!1),C(j.depth)&&(j.depth=2),C(j.colors)&&(j.colors=!1),C(j.customInspect)&&(j.customInspect=!0),j.colors&&(j.stylize=l),y(j,N,j.depth)}n.inspect=o,o.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]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(N,D){var j=o.styles[D];return j?"\x1B["+o.colors[j][0]+"m"+N+"\x1B["+o.colors[j][1]+"m":N}function m(N,D){return N}function d(N){var D={};return N.forEach(function(j,F){D[j]=!0}),D}function y(N,D,j){if(N.customInspect&&D&&ue(D.inspect)&&D.inspect!==n.inspect&&!(D.constructor&&D.constructor.prototype===D)){var F=D.inspect(j,N);return U(F)||(F=y(N,F,j)),F}var W=T(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 f(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 f(D)}var X="",he=!1,ze=["{","}"];if(L(D)&&(he=!0,ze=["[","]"]),ue(D)){var Re=D.name?": "+D.name:"";X=" [Function"+Re+"]"}if(H(D)&&(X=" "+RegExp.prototype.toString.call(D)),se(D)&&(X=" "+Date.prototype.toUTCString.call(D)),ie(D)&&(X=" "+f(D)),J.length===0&&(!he||D.length==0))return ze[0]+X+ze[1];if(j<0)return H(D)?N.stylize(RegExp.prototype.toString.call(D),"regexp"):N.stylize("[Object]","special");N.seen.push(D);var ve;return he?ve=M(N,D,j,Y,J):ve=J.map(function(gn){return E(N,D,j,Y,gn,he)}),N.seen.pop(),w(ve,X,ze)}function T(N,D){if(C(D))return N.stylize("undefined","undefined");if(U(D)){var j="'"+JSON.stringify(D).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return N.stylize(j,"string")}if(z(D))return N.stylize(""+D,"number");if(O(D))return N.stylize(""+D,"boolean");if(R(D))return N.stylize("null","null")}function f(N){return"["+Error.prototype.toString.call(N)+"]"}function M(N,D,j,F,W){for(var J=[],Y=0,$=D.length;Y<$;++Y)Ce(D,String(Y))?J.push(E(N,D,j,F,String(Y),!0)):J.push("");return W.forEach(function(X){X.match(/^\d+$/)||J.push(E(N,D,j,F,X,!0))}),J}function E(N,D,j,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")),Ce(F,W)||(Y="["+W+"]"),$||(N.seen.indexOf(X.value)<0?(R(j)?$=y(N,X.value,null):$=y(N,X.value,j-1),$.indexOf(`
17
17
  `)>-1&&(J?$=$.split(`
18
- `).map(function(ke){return" "+ke}).join(`
18
+ `).map(function(he){return" "+he}).join(`
19
19
  `).slice(2):$=`
20
20
  `+$.split(`
21
- `).map(function(ke){return" "+ke}).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 D(N,_,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]+(_===""?"":_+`
21
+ `).map(function(he){return" "+he}).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 w(N,D,j){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?j[0]+(D===""?"":D+`
24
24
  `)+" "+N.join(`,
25
- `)+" "+O[1]:O[0]+_+" "+N.join(", ")+" "+O[1]}n.types=So;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=wI;function Z(N){return Object.prototype.toString.call(N)}function me(N){return N<10?"0"+N.toString(10):N.toString(10)}var Me=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ve(){var N=new Date,_=[me(N.getHours()),me(N.getMinutes()),me(N.getSeconds())].join(":");return[N.getDate(),Me[N.getMonth()],_].join(" ")}n.log=function(){console.log("%s - %s",Ve(),n.format.apply(n,arguments))},n.inherits=jI,n._extend=function(N,_){if(!_||!ne(_))return N;for(var O=Object.keys(_),F=O.length;F--;)N[O[F]]=_[O[F]];return N};function Ce(N,_){return Object.prototype.hasOwnProperty.call(N,_)}var Ne=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(_){if(typeof _!="function")throw new TypeError('The "original" argument must be of type Function');if(Ne&&_[Ne]){var O=_[Ne];if(typeof O!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(O,Ne,{value:O,enumerable:!1,writable:!1,configurable:!0}),O}function O(){for(var F,W,J=new Promise(function(X,ke){F=X,W=ke}),Y=[],$=0;$<arguments.length;$++)Y.push(arguments[$]);Y.push(function(X,ke){X?W(X):F(ke)});try{_.apply(this,Y)}catch(X){W(X)}return J}return Object.setPrototypeOf(O,Object.getPrototypeOf(_)),Ne&&Object.defineProperty(O,Ne,{value:O,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(O,e(_))},n.promisify.custom=Ne;function Ie(N,_){if(!N){var O=new Error("Promise was rejected with a falsy value");O.reason=N,N=O}return _(N)}function K(N){if(typeof N!="function")throw new TypeError('The "original" argument must be of type Function');function _(){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(Ie.bind(null,$,Y))})}return Object.setPrototypeOf(_,Object.getPrototypeOf(N)),Object.defineProperties(_,e(N)),_}n.callbackify=K})(Pt);const{inherits:OI,format:fa}=Pt;function on(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 a(s,r,o){if(!new.target)return new a(s,r,o);Error.captureStackTrace(this,a),this.code=n,this.message=e,this.name="AvvioError",s&&r&&o?this.message=fa(e,s,r,o):s&&r?this.message=fa(e,s,r):s?this.message=fa(e,s):this.message=e}return a.prototype[Symbol.toStringTag]="Error",a.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},OI(a,t),a}var Bo={createError:on,AVV_ERR_EXPOSE_ALREADY_DEFINED:on("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:on("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:on("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:on("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:on("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:on("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},LI=function n(e,t,a){t===void 0&&(t=""),a||(a={});var s=function(m){var d={"│":"|","└":"`","├":"+","─":"-","┬":"-"};return a.unicode===!1?d[m]:m};typeof e=="string"&&(e={label:e});var r=e.nodes||[],o=(e.label||"").split(`
26
- `),c=`
27
- `+t+(r.length?s("│"):" ")+" ";return t+o.join(c)+`
28
- `+r.map(function(m,d){var y=d===r.length-1,h=m.nodes&&m.nodes.length,T=t+(y?" ":s("│"))+" ";return t+s(y?"└":"├")+s("─")+s(h?"┬":"─")+" "+n(m,T,a).slice(t.length+2)}).join("")};const RI=LI,Wr=Symbol("avvio.TimeTree.untrackNode"),Ta=Symbol("avvio.TimeTree.trackNode"),Hr=Symbol("avvio.TimeTree.getParent"),Zr=Symbol("avvio.TimeTree.getNode"),Kr=Symbol("avvio.TimeTree.addNode");let xI=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Ta](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])}[Wr](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)}[Hr](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[Zr](e){return this.tableId.get(e)}[Kr](e,t,a){if(e===null)return this.root={id:"root",label:t,start:a,nodes:[]},this[Ta](this.root),this.root.id;const r=this[Hr](e),o=`${t}-${Math.random()}`,c={id:o,parent:e,start:a,label:t,nodes:[]};return r.nodes.push(c),this[Ta](c),o}start(e,t,a=Date.now()){return this[Kr](e,t,a)}stop(e,t=Date.now()){const a=this[Zr](e);a&&(a.stop=t,a.diff=a.stop-a.start||0,this[Wr](a))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const e=a=>(a.label=`${a.label} ${a.diff} ms`,a.nodes.length>0&&(a.nodes=a.nodes.map(s=>e(s))),a),t=e(this.toJSON());return RI(t)}};var CI=xI,fs={exports:{}},Qa={exports:{}},ha,Jr;function zI(){if(Jr)return ha;Jr=1;var n=1e3,e=n*60,t=e*60,a=t*24,s=a*7,r=a*365.25;ha=function(y,h){h=h||{};var T=typeof y;if(T==="string"&&y.length>0)return o(y);if(T==="number"&&isFinite(y))return h.long?m(y):c(y);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(y))};function o(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*s;case"days":case"day":case"d":return T*a;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 c(y){var h=Math.abs(y);return h>=a?Math.round(y/a)+"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>=a?d(y,h,a,"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 ha}function UI(n){t.debug=t,t.default=t,t.coerce=m,t.disable=r,t.enable=s,t.enabled=o,t.humanize=zI(),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=a,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 a(y,h){const T=t(this.namespace+(typeof h>"u"?":":h)+y);return T.log=this.log,T}function s(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(c),...t.skips.map(c).map(h=>"-"+h)].join(",");return t.enable(""),y}function o(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 c(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 PI=UI;(function(n,e){e.formatArgs=a,e.save=s,e.load=r,e.useColors=t,e.storage=o(),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 a(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 s(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 o(){try{return localStorage}catch{}}n.exports=PI(e);const{formatters:c}=n.exports;c.j=function(m){try{return JSON.stringify(m)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(Qa,Qa.exports);var Qo=Qa.exports;const BI=po,QI=Io.EventEmitter,FI=Pt.inherits,fe=Qo("avvio"),{AVV_ERR_READY_TIMEOUT:GI}=Bo,ka=Symbol.for("plugin-meta");function YI(n,e){return n[ka]&&n[ka].name?n[ka].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 VI(){const n={};return n.promise=new Promise((e,t)=>{n.resolve=e,n.reject=t}),n}function zn(n,e,t,a,s){this.started=!1,this.func=e,this.opts=t,this.onFinish=null,this.parent=n,this.timeout=s===void 0?n._timeout:s,this.name=YI(e,t),this.isAfter=a,this.q=BI(n,$I,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}FI(zn,QI);zn.prototype.exec=function(n,e){const t=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){fe("skipping loading of plugin as parent errored and it is not an after",s),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 fe("override errored",s),e(m)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,fe("exec",s);let r;const o=m=>{if(a){fe("loading complete",s);return}this._error=m,fe(m?"exec errored":"exec completed",s),a=!0,r&&clearTimeout(r),e(m)};this.timeout>0&&(fe("setting up timeout",s,this.timeout),r=setTimeout(function(){fe("timed out",s),r=null;const m=new GI(s);m.fn=t,o(m)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const c=t(this.server,this.opts,o);c&&typeof c.then=="function"&&(fe("exec: resolving promise",s),c.then(()=>G.process.nextTick(o),m=>G.process.nextTick(o,m)))};zn.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const n=()=>{this.server.after((t,a)=>{this._error=t,this.q.pause(),t?(fe("rejecting promise",this.name,t),this._promise.reject(t)):(fe("resolving promise",this.name),this._promise.resolve()),this._promise=null,G.process.nextTick(a,t)}),this.q.resume()};let e;return this._promise?e=Promise.resolve():(this._promise=VI(),e=this._promise.promise,this.server?n():this.on("start",n)),e};zn.prototype.enqueue=function(n,e){fe("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){fe("finish",this.name,n);const t=()=>{this.loaded||(fe("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 a=()=>{if(fe("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{fe("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else t();else fe("delayed",this.name),this.q.drain=()=>{fe("drain",this.name),this.q.drain=qI,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function $I(n,e){const t=this;G.process.nextTick(Ts.bind(t),n,e)}function Ts(n,e){if(typeof n.func.then=="function"){n.func.then(a=>{typeof a.default=="function"&&(a=a.default),n.func=a,Ts.call(this,n,e)},e);return}const t=this._current[0];this._current.unshift(n),n.exec(t&&t.server||this._server,a=>{n.finish(a,s=>{this._current.shift(),e(s)})})}function qI(){}fs.exports=zn;fs.exports.loadPlugin=Ts;var WI=fs.exports;const Xr=po,HI=Io.EventEmitter,ZI=Pt.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ma,AVV_ERR_CALLBACK_NOT_FN:Wn,AVV_ERR_PLUGIN_NOT_VALID:KI,AVV_ERR_ROOT_PLG_BOOTED:JI,AVV_ERR_READY_TIMEOUT:XI}=Bo,eS=CI,Fa=WI,Rn=Qo("avvio"),St=Symbol("kAvvio"),Na=Symbol("kThenifyDoNotWrap");function nS(n,e,t){const a=e.expose||{},s=a.use||"use",r=a.after||"after",o=a.ready||"ready",c=a.onClose||"onClose",m=a.close||"close";if(n[s])throw new Ma(s);if(n[r])throw new Ma(r);if(n[o])throw new Ma(o);n[s]=function(d,y){return t.use(d,y),this},Object.defineProperty(n,"then",{get:Fo.bind(t)}),n[St]=!0,n[r]=function(d){return typeof d!="function"?t._loadRegistered():(t.after(Ia(d,this)),this)},n[o]=function(d){if(d&&typeof d!="function")throw new Wn(o,typeof d);return t.ready(d?Ia(d,this):void 0)},n[c]=function(d){if(typeof d!="function")throw new Wn(c,typeof d);return t.onClose(iS(d,this)),this},n[m]=function(d){if(d&&typeof d!="function")throw new Wn(m,typeof d);return d?(t.close(Ia(d,this)),this):t.close()}}function he(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 he)){const a=new he(n,e,t);return n&&nS(n,e,a),a}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 eS,this._readyQ=Xr(this,Go,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=ei},this._closeQ=Xr(this,rS,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=ei},this._doStart=null,this._root=new Fa(this,tS.bind(this),e,!1,0),this._root.once("start",(a,s,r)=>{const o=this.pluginTree.start(null,s,r);this._root.once("loaded",(c,m,d)=>{this.pluginTree.stop(o,d)})}),Fa.loadPlugin.call(this,this._root,a=>{Rn("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){a=a||this._error||s}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function tS(n,e,t){this._doStart=t,e.autostart&&this.start()}ZI(he,HI);he.prototype.start=function(){return this.started=!0,G.process.nextTick(this._doStart),this};he.prototype.override=function(n,e,t){return n};function aS(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new KI(typeof n);return n}he.prototype[St]=!0;he.prototype.use=function(n,e){return this._lastUsed=this._addPlugin(n,e,!1),this};he.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(he.prototype,"then",{get:Fo});he.prototype._addPlugin=function(n,e,t){if(n=aS(n),e=e||{},this.booted)throw new JI;const a=this._current[0],s=new Fa(this,n,e,t);if(s.once("start",(r,o,c)=>{const m=this.pluginTree.start(a.name,o,c);s.once("loaded",(d,y,h)=>{this.pluginTree.stop(m,h)})}),a.loaded)throw new Error(s.name,a.name);return a.enqueue(s,r=>{r&&(this._error=r)}),s};he.prototype.after=function(n){if(!n)return this._loadRegistered();this._addPlugin(e.bind(this),{},!0);function e(t,a,s){Go.call(this,n,s)}return this};he.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};he.prototype.close=function(n){let e;if(n){if(typeof n!="function")throw new Wn("close",typeof n)}else e=new Promise(function(t,a){n=function(s){if(s)return a(s);t()}});return this.ready(()=>{this._error=null,this._closeQ.push(n),G.process.nextTick(this._closeQ.resume.bind(this._closeQ))}),e};he.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(s),this.start();const a=this._current[0].server;function s(r,o,c){r?t(r):e(a),G.process.nextTick(c)}})};he.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};he.prototype.toJSON=function(){return this.pluginTree.toJSON()};function ei(){}function Fo(){if(this.booted){Rn("thenify returning null because we are already booted");return}if(this[Na]){this[Na]=!1;return}return Rn("thenify"),(n,e)=>this._loadRegistered().then(()=>(this[Na]=!0,n(this._server)),e)}function Go(n,e){const t=this._server,a=this._error;let s;if(this._error=null,n.length===0)this._error=a,s=n(),s&&!s[St]&&typeof s.then=="function"?s.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r)):G.process.nextTick(e);else if(n.length===1)s=n(a),s&&!s[St]&&typeof s.then=="function"?s.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r)):G.process.nextTick(e);else if(this._timeout===0){const r=o=>{this._error=o,e(this._error)};n.length===2?n(a,r):n(a,t,r)}else sS.call(this,n,a,t,e)}function sS(n,e,t,a){const s=n.name;Rn("setting up ready timeout",s,this._timeout);let r=setTimeout(()=>{Rn("timed out",s),r=null;const c=new XI(s);c.fn=n,this._error=c,a(c)},this._timeout);n.length===2?n(e,o.bind(this)):n(e,t,o.bind(this));function o(c){r&&(clearTimeout(r),this._error=c,a(this._error))}}function rS(n,e){const t=this._server,a=n[this._isOnCloseHandlerKey];if(n.length===0||n.length===1){let s;a?s=n(t):s=n(this._error),s&&typeof s.then=="function"?(Rn("resolving close/onClose promise"),s.then(()=>G.process.nextTick(e),r=>G.process.nextTick(e,r))):G.process.nextTick(e)}else n.length===2?n(a?t:this._error,e):a?n(t,e):n(this._error,t,e)}function iS(n,e){return t.bind(e);function t(a,s){let r;n.length===0?(r=n(),r&&r.then?r.then(function(){G.process.nextTick(s)},s):G.process.nextTick(s)):n.length===1?(r=n(this),r&&r.then?r.then(function(){G.process.nextTick(s)},s):G.process.nextTick(s)):n(this,s)}}function Ia(n,e){return t.bind(e);function t(a,s){let r;n?n.length===0?(r=n(),r&&r.then?r.then(function(){G.process.nextTick(s,a)},s):G.process.nextTick(s,a)):n.length===1?(r=n(a),r&&r.then?r.then(function(){G.process.nextTick(s)},s):G.process.nextTick(s)):n.length===2?n(a,s):n(a,this,s):G.process.nextTick(s)}}cs.exports=he;cs.exports.express=function(n){return he(n,{expose:{use:"load"}})};var oS=cs.exports;const cS=Zo(oS);function lS(n,e=!0){const t=e?"https://grpc-web.streamlayer.io:443":"https://grpc-web.next.streamlayer.io:443",a=cS(Object.create(null),{autostart:!1});return a.use(nN),a.use(Zh,{sdkKey:n,host:t}),a.use(Xh),a.use(eN),a.use(Lk),a.use(zg),a.after(async(s,r,o)=>{if(s)throw s;await r.sdk.initializeApp(),o()}),a.onClose(()=>{console.log("close")}),a}const Yo=(n,e,t)=>{const[a,s]=Q.useState(null);return Q.useEffect(()=>{let r=!1;if(!n)return console.error("streamlayer sdk key should be provided"),s(c=>(c!==null&&typeof c.disableApp=="function"&&c.disableApp(),null)),()=>{r=!0};const o=lS(n,t);if(e)for(const c of e)o.use(c);return o.ready().then(c=>{r||s(c.sdk)}).catch(c=>console.log(c)),()=>{r=!0,o.close(function(c){if(c)throw c})}},[n]),a};var Ga=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(Ga||{});const hs=Q.createContext({status:0,sdk:null}),uS=({sdkKey:n,plugins:e,children:t,production:a=!0})=>{const s=Yo(n,e,a),r=Q.useMemo(()=>s?{sdk:s,status:2}:{status:1,sdk:null},[s]);return f.jsx(JM,{children:f.jsx(hs.Provider,{value:r,children:t})})},mS=()=>{const{sdk:n}=Q.useContext(hs);return n},dS=()=>{const{sdk:n,status:e}=Q.useContext(hs);if(e===Ga.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return e===Ga.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(ZM,{sdk:n})})};exports.StreamLayerProvider=uS;exports.StreamLayerSDKReact=dS;exports.useStreamLayer=mS;exports.useStreamLayerApp=Yo;
25
+ `)+" "+j[1]:j[0]+D+" "+N.join(", ")+" "+j[1]}n.types=No;function L(N){return Array.isArray(N)}n.isArray=L;function O(N){return typeof N=="boolean"}n.isBoolean=O;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=nI;function Z(N){return Object.prototype.toString.call(N)}function me(N){return N<10?"0"+N.toString(10):N.toString(10)}var Me=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ve(){var N=new Date,D=[me(N.getHours()),me(N.getMinutes()),me(N.getSeconds())].join(":");return[N.getDate(),Me[N.getMonth()],D].join(" ")}n.log=function(){console.log("%s - %s",Ve(),n.format.apply(n,arguments))},n.inherits=tI,n._extend=function(N,D){if(!D||!ne(D))return N;for(var j=Object.keys(D),F=j.length;F--;)N[j[F]]=D[j[F]];return N};function Ce(N,D){return Object.prototype.hasOwnProperty.call(N,D)}var Ne=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(Ne&&D[Ne]){var j=D[Ne];if(typeof j!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(j,Ne,{value:j,enumerable:!1,writable:!1,configurable:!0}),j}function j(){for(var F,W,J=new Promise(function(X,he){F=X,W=he}),Y=[],$=0;$<arguments.length;$++)Y.push(arguments[$]);Y.push(function(X,he){X?W(X):F(he)});try{D.apply(this,Y)}catch(X){W(X)}return J}return Object.setPrototypeOf(j,Object.getPrototypeOf(D)),Ne&&Object.defineProperty(j,Ne,{value:j,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(j,e(D))},n.promisify.custom=Ne;function Ie(N,D){if(!N){var j=new Error("Promise was rejected with a falsy value");j.reason=N,N=j}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 j=[],F=0;F<arguments.length;F++)j.push(arguments[F]);var W=j.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,j).then(function($){G.process.nextTick(Y.bind(null,null,$))},function($){G.process.nextTick(Ie.bind(null,$,Y))})}return Object.setPrototypeOf(D,Object.getPrototypeOf(N)),Object.defineProperties(D,e(N)),D}n.callbackify=K})(Ut);const{inherits:aI,format:ga}=Ut;function rn(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,o){if(!new.target)return new s(a,r,o);Error.captureStackTrace(this,s),this.code=n,this.message=e,this.name="AvvioError",a&&r&&o?this.message=ga(e,a,r,o):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}`},aI(s,t),s}var Uo={createError:rn,AVV_ERR_EXPOSE_ALREADY_DEFINED:rn("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:rn("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:rn("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:rn("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:rn("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:rn("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")},sI=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||[],o=(e.label||"").split(`
26
+ `),l=`
27
+ `+t+(r.length?a("│"):" ")+" ";return t+o.join(l)+`
28
+ `+r.map(function(m,d){var y=d===r.length-1,T=m.nodes&&m.nodes.length,f=t+(y?" ":a("│"))+" ";return t+a(y?"└":"├")+a("─")+a(T?"┬":"─")+" "+n(m,f,s).slice(t.length+2)}).join("")};const rI=sI,qr=Symbol("avvio.TimeTree.untrackNode"),fa=Symbol("avvio.TimeTree.trackNode"),Wr=Symbol("avvio.TimeTree.getParent"),Hr=Symbol("avvio.TimeTree.getNode"),Zr=Symbol("avvio.TimeTree.addNode");let iI=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])}[qr](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)}[Wr](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[Hr](e){return this.tableId.get(e)}[Zr](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[Wr](e),o=`${t}-${Math.random()}`,l={id:o,parent:e,start:s,label:t,nodes:[]};return r.nodes.push(l),this[fa](l),o}start(e,t,s=Date.now()){return this[Zr](e,t,s)}stop(e,t=Date.now()){const s=this[Hr](e);s&&(s.stop=t,s.diff=s.stop-s.start||0,this[qr](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 rI(t)}};var oI=iI,gs={exports:{}},Pa={exports:{}},Ta,Kr;function cI(){if(Kr)return Ta;Kr=1;var n=1e3,e=n*60,t=e*60,s=t*24,a=s*7,r=s*365.25;Ta=function(y,T){T=T||{};var f=typeof y;if(f==="string"&&y.length>0)return o(y);if(f==="number"&&isFinite(y))return T.long?m(y):l(y);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(y))};function o(y){if(y=String(y),!(y.length>100)){var T=/^(-?(?:\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(T){var f=parseFloat(T[1]),M=(T[2]||"ms").toLowerCase();switch(M){case"years":case"year":case"yrs":case"yr":case"y":return f*r;case"weeks":case"week":case"w":return f*a;case"days":case"day":case"d":return f*s;case"hours":case"hour":case"hrs":case"hr":case"h":return f*t;case"minutes":case"minute":case"mins":case"min":case"m":return f*e;case"seconds":case"second":case"secs":case"sec":case"s":return f*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function l(y){var T=Math.abs(y);return T>=s?Math.round(y/s)+"d":T>=t?Math.round(y/t)+"h":T>=e?Math.round(y/e)+"m":T>=n?Math.round(y/n)+"s":y+"ms"}function m(y){var T=Math.abs(y);return T>=s?d(y,T,s,"day"):T>=t?d(y,T,t,"hour"):T>=e?d(y,T,e,"minute"):T>=n?d(y,T,n,"second"):y+" ms"}function d(y,T,f,M){var E=T>=f*1.5;return Math.round(y/f)+" "+M+(E?"s":"")}return Ta}function lI(n){t.debug=t,t.default=t,t.coerce=m,t.disable=r,t.enable=a,t.enabled=o,t.humanize=cI(),t.destroy=d,Object.keys(n).forEach(y=>{t[y]=n[y]}),t.names=[],t.skips=[],t.formatters={};function e(y){let T=0;for(let f=0;f<y.length;f++)T=(T<<5)-T+y.charCodeAt(f),T|=0;return t.colors[Math.abs(T)%t.colors.length]}t.selectColor=e;function t(y){let T,f=null,M,E;function w(...L){if(!w.enabled)return;const O=w,R=Number(new Date),x=R-(T||R);O.diff=x,O.prev=T,O.curr=R,T=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(O,ne),L.splice(z,1),z--}return B}),t.formatArgs.call(O,L),(O.log||t.log).apply(O,L)}return w.namespace=y,w.useColors=t.useColors(),w.color=t.selectColor(y),w.extend=s,w.destroy=t.destroy,Object.defineProperty(w,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(M!==t.namespaces&&(M=t.namespaces,E=t.enabled(y)),E),set:L=>{f=L}}),typeof t.init=="function"&&t.init(w),w}function s(y,T){const f=t(this.namespace+(typeof T>"u"?":":T)+y);return f.log=this.log,f}function a(y){t.save(y),t.namespaces=y,t.names=[],t.skips=[];let T;const f=(typeof y=="string"?y:"").split(/[\s,]+/),M=f.length;for(T=0;T<M;T++)f[T]&&(y=f[T].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(T=>"-"+T)].join(",");return t.enable(""),y}function o(y){if(y[y.length-1]==="*")return!0;let T,f;for(T=0,f=t.skips.length;T<f;T++)if(t.skips[T].test(y))return!1;for(T=0,f=t.names.length;T<f;T++)if(t.names[T].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 uI=lI;(function(n,e){e.formatArgs=s,e.save=a,e.load=r,e.useColors=t,e.storage=o(),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,T=0;m[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(y++,f==="%c"&&(T=y))}),m.splice(T,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 o(){try{return localStorage}catch{}}n.exports=uI(e);const{formatters:l}=n.exports;l.j=function(m){try{return JSON.stringify(m)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}}})(Pa,Pa.exports);var Po=Pa.exports;const mI=uo,dI=Mo.EventEmitter,pI=Ut.inherits,fe=Po("avvio"),{AVV_ERR_READY_TIMEOUT:yI}=Uo,ka=Symbol.for("plugin-meta");function gI(n,e){return n[ka]&&n[ka].name?n[ka].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 fI(){const n={};return n.promise=new Promise((e,t)=>{n.resolve=e,n.reject=t}),n}function xn(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=gI(e,t),this.isAfter=s,this.q=mI(n,TI,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}pI(xn,dI);xn.prototype.exec=function(n,e){const t=this.func;let s=!1;const a=this.name;if(this.parent._error&&!this.isAfter){fe("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 fe("override errored",a),e(m)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,fe("exec",a);let r;const o=m=>{if(s){fe("loading complete",a);return}this._error=m,fe(m?"exec errored":"exec completed",a),s=!0,r&&clearTimeout(r),e(m)};this.timeout>0&&(fe("setting up timeout",a,this.timeout),r=setTimeout(function(){fe("timed out",a),r=null;const m=new yI(a);m.fn=t,o(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,o);l&&typeof l.then=="function"&&(fe("exec: resolving promise",a),l.then(()=>G.process.nextTick(o),m=>G.process.nextTick(o,m)))};xn.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const n=()=>{this.server.after((t,s)=>{this._error=t,this.q.pause(),t?(fe("rejecting promise",this.name,t),this._promise.reject(t)):(fe("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=fI(),e=this._promise.promise,this.server?n():this.on("start",n)),e};xn.prototype.enqueue=function(n,e){fe("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,e)};xn.prototype.finish=function(n,e){fe("finish",this.name,n);const t=()=>{this.loaded||(fe("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(fe("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const a=()=>{fe("wrap"),queueMicrotask(s)};this._promise.resolve(),this._promise.promise.then(a,a),this._promise=null}else t();else fe("delayed",this.name),this.q.drain=()=>{fe("drain",this.name),this.q.drain=kI,queueMicrotask(s)}};queueMicrotask(s),this.q.resume()};function TI(n,e){const t=this;G.process.nextTick(fs.bind(t),n,e)}function fs(n,e){if(typeof n.func.then=="function"){n.func.then(s=>{typeof s.default=="function"&&(s=s.default),n.func=s,fs.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 kI(){}gs.exports=xn;gs.exports.loadPlugin=fs;var hI=gs.exports;const Jr=uo,MI=Mo.EventEmitter,NI=Ut.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:ha,AVV_ERR_CALLBACK_NOT_FN:$n,AVV_ERR_PLUGIN_NOT_VALID:II,AVV_ERR_ROOT_PLG_BOOTED:SI,AVV_ERR_READY_TIMEOUT:AI}=Uo,EI=oI,Ba=hI,jn=Po("avvio"),St=Symbol("kAvvio"),Ma=Symbol("kThenifyDoNotWrap");function bI(n,e,t){const s=e.expose||{},a=s.use||"use",r=s.after||"after",o=s.ready||"ready",l=s.onClose||"onClose",m=s.close||"close";if(n[a])throw new ha(a);if(n[r])throw new ha(r);if(n[o])throw new ha(o);n[a]=function(d,y){return t.use(d,y),this},Object.defineProperty(n,"then",{get:Bo.bind(t)}),n[St]=!0,n[r]=function(d){return typeof d!="function"?t._loadRegistered():(t.after(Na(d,this)),this)},n[o]=function(d){if(d&&typeof d!="function")throw new $n(o,typeof d);return t.ready(d?Na(d,this):void 0)},n[l]=function(d){if(typeof d!="function")throw new $n(l,typeof d);return t.onClose(OI(d,this)),this},n[m]=function(d){if(d&&typeof d!="function")throw new $n(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&&bI(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 EI,this._readyQ=Jr(this,Qo,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=Xr},this._closeQ=Jr(this,vI,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=Xr},this._doStart=null,this._root=new Ba(this,DI.bind(this),e,!1,0),this._root.once("start",(s,a,r)=>{const o=this.pluginTree.start(null,a,r);this._root.once("loaded",(l,m,d)=>{this.pluginTree.stop(o,d)})}),Ba.loadPlugin.call(this,this._root,s=>{jn("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 DI(n,e,t){this._doStart=t,e.autostart&&this.start()}NI(ke,MI);ke.prototype.start=function(){return this.started=!0,G.process.nextTick(this._doStart),this};ke.prototype.override=function(n,e,t){return n};function _I(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new II(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:Bo});ke.prototype._addPlugin=function(n,e,t){if(n=_I(n),e=e||{},this.booted)throw new SI;const s=this._current[0],a=new Ba(this,n,e,t);if(a.once("start",(r,o,l)=>{const m=this.pluginTree.start(s.name,o,l);a.once("loaded",(d,y,T)=>{this.pluginTree.stop(m,T)})}),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 $n("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 $n("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,o,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 Xr(){}function Bo(){if(this.booted){jn("thenify returning null because we are already booted");return}if(this[Ma]){this[Ma]=!1;return}return jn("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=o=>{this._error=o,e(this._error)};n.length===2?n(s,r):n(s,t,r)}else wI.call(this,n,s,t,e)}function wI(n,e,t,s){const a=n.name;jn("setting up ready timeout",a,this._timeout);let r=setTimeout(()=>{jn("timed out",a),r=null;const l=new AI(a);l.fn=n,this._error=l,s(l)},this._timeout);n.length===2?n(e,o.bind(this)):n(e,t,o.bind(this));function o(l){r&&(clearTimeout(r),this._error=l,s(this._error))}}function vI(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"?(jn("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 OI(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)}}os.exports=ke;os.exports.express=function(n){return ke(n,{expose:{use:"load"}})};var jI=os.exports;const LI=Wo(jI);function RI(n,e=!0){const t=e?"https://grpc-web.streamlayer.io:443":"https://grpc-web.next.streamlayer.io:443",s=LI(Object.create(null),{autostart:!1});return s.use(bM),s.use(Wk,{sdkKey:n,host:t}),s.use(Kk),s.use(EM),s.use(Oh),s.use(xg),s.after(async(a,r,o)=>{if(a)throw a;await r.sdk.initializeApp(),o()}),s.onClose(()=>{console.log("close")}),s}const Fo=(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 o=RI(n,t);if(e)for(const l of e)o.use(l);return o.ready().then(l=>{r||a(l.sdk)}).catch(l=>console.log(l)),()=>{r=!0,o.close(function(l){if(l)throw l})}},[n]),s};var Qa=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(Qa||{});const Ts=Q.createContext({status:0,sdk:null}),xI=({sdkKey:n,plugins:e,children:t,production:s=!0})=>{const a=Fo(n,e,s),r=Q.useMemo(()=>a?{sdk:a,status:2}:{status:1,sdk:null},[a]);return k.jsx(SM,{children:k.jsx(Ts.Provider,{value:r,children:t})})},CI=()=>{const{sdk:n}=Q.useContext(Ts);return n},zI=()=>{const{sdk:n,status:e}=Q.useContext(Ts);if(e===Qa.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return e===Qa.CONNECTED?k.jsx("div",{className:"StreamLayerSDK",children:"wait"}):n===null?k.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):k.jsx("div",{className:"StreamLayerSDK",children:k.jsx(NM,{sdk:n})})};exports.StreamLayerProvider=xI;exports.StreamLayerSDKReact=zI;exports.useStreamLayer=CI;exports.useStreamLayerApp=Fo;