fansunited-management-components 1.49.1 → 1.49.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.es.js +826 -826
- package/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/services/https/HttpsService.d.ts +1 -1
package/index.umd.js
CHANGED
|
@@ -2322,7 +2322,7 @@
|
|
|
2322
2322
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2323
2323
|
* See the License for the specific language governing permissions and
|
|
2324
2324
|
* limitations under the License.
|
|
2325
|
-
*/const uI="auth-compat";function dI(e){e.INTERNAL.registerComponent(new Wn(uI,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Ol(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:Dr.EMAIL_SIGNIN,PASSWORD_RESET:Dr.PASSWORD_RESET,RECOVER_EMAIL:Dr.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:Dr.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:Dr.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:Dr.VERIFY_EMAIL}},EmailAuthProvider:Jn,FacebookAuthProvider:gn,GithubAuthProvider:vn,GoogleAuthProvider:mn,OAuthProvider:Nr,SAMLAuthProvider:No,PhoneAuthProvider:Rl,PhoneMultiFactorGenerator:Af,RecaptchaVerifier:cI,TwitterAuthProvider:bn,Auth:Ol,AuthCredential:Br,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Hw,Ww)}dI(qn);let Ff=!1;const Ui=e=>{if(Ff)return qn.auth();if(e&&e==="dev"){qn.initializeApp({apiKey:"api_key"});const n=ww();ll(n,"http://localhost:39199")}else{const n={apiKey:e&&e==="staging"?"AIzaSyBKhAYwkvkmjm16FxCMvCUQjSRpKC0DbM8":"AIzaSyDPD_SETLswR_U3dKawYkAyRhbzVXziD_4",authDomain:"fans-united-clients.firebaseapp.com",projectId:"fans-united-clients",messagingSenderId:"78627953958",appId:"1:78627953958:web:2ee87d5b274e0e7685f5e7",measurementId:"G-RH90B03KJG"};qn.initializeApp(n)}return Ff=!0,qn.auth()},fI=e=>e==="dev"?"http://localhost:8070/v1":e==="staging"?"https://client.fansunitedstagingapi.com/v1":e==="watg"?"https://client.watg.fansunitedapi.com/v1":e==="yolo"?"https://client.yolo.fansunitedapi.com/v1":e==="cska"?"https://client.cska.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class hI{constructor(t,n){te(this,"apiKey","");te(this,"clientId","");te(this,"environment","");te(this,"mainQueryParams",{key:"",client_id:""});te(this,"headers",{"Content-Type":"application/json"});te(this,"clientApiBaseUrl","");te(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");te(this,"sportal365Config",null);te(this,"generateSignedInUrl",t=>k(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));te(this,"storeInBucket",(t,n,r)=>k(this,null,function*(){const i=yield fetch(t,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));te(this,"fetchImagesFromSportal365",(t,n,r)=>k(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:t,page:r.toString()};return n&&(n.from&&(o=Q(N({},o),{from:n.from})),n.to&&(o=Q(N({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));te(this,"getSchedulersByEntityId",t=>k(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:t},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"setSchedulers",(t,n,r)=>k(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s}),body:JSON.stringify(t),method:o})}));te(this,"deleteScheduledTask",t=>k(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${t}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLoggedInStaffMember",()=>k(this,null,function*(){const r=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(r).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}));te(this,"constructAssetsUrl",t=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${t}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${t}`:`https://uploads.fansunitedassets.com/${this.clientId}/${t}`);te(this,"throwErrorFromXmlResponse",t=>{const n=new window.DOMParser().parseFromString(t,"text/xml"),r=n.getElementsByTagName("Message")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Message")[0].textContent:"",i=n.getElementsByTagName("Details")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Details")[0].textContent:"";throw new Error(r+" "+i)});te(this,"getToken",()=>k(this,null,function*(){const t=Ui(this.environment).currentUser;return t?yield t.getIdToken():""}));this.apiKey=t.apiKey,this.clientId=t.clientId,this.environment=t.environment,this.mainQueryParams={key:t.apiKey,client_id:t.clientId},this.sportal365Config=n,this.clientApiBaseUrl=fI(this.environment)}}const pI=e=>e==="dev"?"http://localhost:8060/v1":e==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":e==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":e==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":e==="cska"?"https://loyalty.cska.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",gI=e=>e==="dev"?"http://localhost:8040/v1":e==="staging"?"https://prediction.fansunitedstagingapi.com/v1":e==="watg"?"https://prediction.watg.fansunitedapi.com/v1":e==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":e==="cska"?"https://prediction.cska.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",mI=e=>e==="dev"?"http://localhost:9040/v1":e==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":e==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":e==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":e==="cska"?"https://mini-games.cska.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",vI=e=>e==="dev"?"http://localhost:8020/v1":e==="staging"?"https://reporting.fansunitedstagingapi.com/v1":e==="watg"?"https://reporting.watg.fansunitedapi.com/v1":e==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":e==="cska"?"https://reporting.cska.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",bI=e=>e==="dev"?"http://localhost:9030/v1":e==="staging"?"https://voting.fansunitedstagingapi.com/v1":e==="watg"?"https://voting.watg.fansunitedapi.com/v1":e==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":e==="cska"?"https://voting.cska.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",yI=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":e==="cska"?"https://custom-games-resolver-414330847655.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",xI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://profile.fansunitedstagingapi.com/v1":e==="watg"?"https://profile.watg.fansunitedapi.com/v1":e==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":e==="cska"?"https://profile.cska.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",CI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://discussions.fansunitedstagingapi.com/v1":e==="watg"?"https://discussions.watg.fansunitedapi.com/v1":e==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":e==="cska"?"https://discussions.cska.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class wI extends hI{constructor(n,r){super(n,r);te(this,"loyaltyBaseUrl","");te(this,"predictionBaseUrl","");te(this,"miniGamesApiBaseUrl","");te(this,"reportingApiBaseUrl","");te(this,"votingApiBaseUrl","");te(this,"profileApiBaseUrl","");te(this,"customResolverUrl","");te(this,"discussionsApiBaseUrl","");te(this,"getClientById",()=>k(this,null,function*(){const n=`/clients/${this.clientId}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createTemplate",n=>k(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editTemplate",(n,r)=>k(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteTemplate",n=>k(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"setWinners",n=>k(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"exportDetailedLeaderboard",(n,r,i)=>k(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken(),s=N({},this.mainQueryParams);return r&&(s.group_id=r),yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(Q(N({},s),{limit:i.toString()})),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a})})}));te(this,"exportDetailedGameLeaderboard",(n,r)=>k(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(Q(N({},this.mainQueryParams),{limit:r.toString()})),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"createGame",n=>k(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editGame",(n,r)=>k(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getEntityFeature",(n,r)=>k(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o={key:this.apiKey};return r&&(o.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o))}));te(this,"getClientFeatures",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features?`,i={key:this.apiKey};return n&&(i.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i))}));te(this,"updateEntityFeatures",(n,r)=>k(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getClassicQuizFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getEitherOrFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getPollFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"createClassicQuiz",n=>k(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateClassicQuiz",(n,r)=>k(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"getClassicQuizById",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"deleteClassicQuiz",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"calculateQuestionsReport",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}/questions-report?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));te(this,"exportUsers",n=>k(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"getClassicQuizParticipations",(n,r,i,o)=>k(this,null,function*(){const a="/classic-quizzes/participations?",s=Q(N({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(s),{headers:Q(N({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"getEntityParticipations",(n,r,i)=>k(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=Q(N({},this.mainQueryParams),{from_date:r,to_date:i}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"createPoll",n=>k(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updatePoll",(n,r)=>k(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deletePoll",n=>k(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getEitherOrById",(n,r)=>k(this,null,function*(){const i=`/either-or/${n}/staff?`,o=yield this.getToken();let a=null;return r&&(a=Q(N({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getEitherOrByIdReadOnlyClient",(n,r,i)=>k(this,null,function*(){const o="https://mini-games.fansunitedapi.com/v1",a=`/either-or/${n}/staff?`,s=yield this.getToken(),l={key:r,client_id:i};return yield fetch(o+a+new URLSearchParams(l),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"createEitherOr",n=>k(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateEitherOr",(n,r)=>k(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteEitherOr",n=>k(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLists",(n,r,i="DESC")=>k(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"getListById",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getListContent",(n,r,i="DESC",o)=>k(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,s={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(s.page=o.toString());const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(s),{headers:Q(N({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"createList",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/lists/?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateList",(n,r)=>k(this,null,function*(){const i=`/clients/${this.clientId}/lists/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteList",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getLanguageConfig",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateLanguageConfig",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));te(this,"createBracketGame",n=>k(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateBracketGame",(n,r)=>k(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolvePredictions",n=>k(this,null,function*(){const r="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"exportLeadsPerEntity",n=>k(this,null,function*(){const r="/leads/export?",i=Q(N({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getLeadStatistics",n=>k(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(N(N({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"exportLeads",n=>k(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(N(N({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createStandingGame",n=>k(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateStandingGame",(n,r)=>k(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolveStandingPredictions",n=>k(this,null,function*(){const r="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"moderateUserPosts",(n,r)=>k(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=Q(N({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));te(this,"getUserBanStatus",n=>k(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"banUser",(n,r,i)=>k(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),s={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));te(this,"unbanUser",(n,r)=>k(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken(),a={unban_reason:r};return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));te(this,"updateUser",(n,r,i)=>k(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),s=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));te(this,"deleteUserProfile",n=>k(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"createDiscussion",n=>k(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"deleteDiscussion",n=>k(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"moderatePosts",(...o)=>k(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",s=yield this.getToken();let l={};if(r.length>0){const c=r.join(",");l=Q(N({},this.mainQueryParams),{post_ids:c,reason:i})}else l=Q(N({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(l),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s}),method:"POST"})}));te(this,"pinDiscussionPosts",(n,r)=>k(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q(N({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));te(this,"unpinDiscussionPosts",(n,r)=>k(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q(N({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getPostsByStaffMember",n=>k(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(N(N({},this.mainQueryParams),n)),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"getReportedPosts",n=>k(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(N(N({},this.mainQueryParams),n)),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateDiscussionsFeature",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features/discussions?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"updateProfilePreferences",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features/profile_preferences?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"getClientBadges",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/loyalty/badges?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateClientBadges",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features/loyalty/badges?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));te(this,"getEngagementThroughPredictionsReport",(n,r,i)=>k(this,null,function*(){const o="/predictions/football/engagements?",a=Q(N({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));this.loyaltyBaseUrl=pI(n.environment),this.predictionBaseUrl=gI(n.environment),this.miniGamesApiBaseUrl=mI(n.environment),this.reportingApiBaseUrl=vI(n.environment),this.votingApiBaseUrl=bI(n.environment),this.profileApiBaseUrl=xI(n.environment),this.customResolverUrl=yI(n.environment),this.discussionsApiBaseUrl=CI(n.environment)}}const II=(e,t)=>!e&&!t?null:!e&&t?(console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null):{project:e,authorization:`Bearer ${t&&t==="betway"?"24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K":"dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}`},Zo=C.createContext(null),SI=({config:e,children:t})=>{const n={apiKey:e.apiKey,clientId:e.clientId,environment:e.environment,lang:e.language,errorHandlingMode:e.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=II(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new wI(n,r);return u.jsx(Zo.Provider,{value:{sdk:i,https:o},children:t})},zf=C.createContext(null),AI=({children:e,environment:t})=>{const[n,r]=C.useState(null),[i,o]=C.useState(!0);return C.useEffect(()=>Ui(t).onAuthStateChanged(s=>{Re.unstable_batchedUpdates(()=>{o(!1),r(s)})}),[t]),u.jsx(zf.Provider,{value:n,children:!i&&e})};function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(null,arguments)}function Ae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var jf={exports:{}},TI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",EI=TI,kI=EI;function Uf(){}function Vf(){}Vf.resetWarningCache=Uf;var _I=function(){function e(r,i,o,a,s,l){if(l!==kI){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Vf,resetWarningCache:Uf};return n.PropTypes=n,n};jf.exports=_I();var PI=jf.exports;function DI(e){return typeof e=="string"}function OI(e,t,n){return e===void 0||DI(e)?t:O({},t,{ownerState:O({},t.ownerState,n)})}function Hf(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Mn(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function RI(e,t,n){return typeof e=="function"?e(t,n):e}function LI(e){const{rootElementName:t="",componentName:n}=e,[r,i]=U.useState(t.toUpperCase()),o=U.useCallback(a=>{var s;i((s=a==null?void 0:a.tagName)!=null?s:"")},[]);return[r,o]}function MI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return U.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{MI(n,t)})},e)}function Wf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Wf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Wf(e))&&(r&&(r+=" "),r+=t);return r}function Gf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function BI(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=Bn(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=O({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=O({},n,i,r);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=Mn(O({},i,r)),s=Gf(r),l=Gf(i),c=t(a),d=Bn(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=O({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=O({},c,n,l,s);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function er(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yf(e){if(U.isValidElement(e)||!er(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Yf(e[n])}),t}function $n(e,t,n={clone:!0}){const r=n.clone?O({},e):e;return er(e)&&er(t)&&Object.keys(t).forEach(i=>{U.isValidElement(t[i])?r[i]=t[i]:er(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&er(e[i])?r[i]=$n(e[i],t[i],n):n.clone?r[i]=er(t[i])?Yf(t[i]):t[i]:r[i]=t[i]}),r}function ea(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Kf={exports:{}},$e={};/**
|
|
2325
|
+
*/const uI="auth-compat";function dI(e){e.INTERNAL.registerComponent(new Wn(uI,t=>{const n=t.getProvider("app-compat").getImmediate(),r=t.getProvider("auth");return new Ol(n,r)},"PUBLIC").setServiceProps({ActionCodeInfo:{Operation:{EMAIL_SIGNIN:Dr.EMAIL_SIGNIN,PASSWORD_RESET:Dr.PASSWORD_RESET,RECOVER_EMAIL:Dr.RECOVER_EMAIL,REVERT_SECOND_FACTOR_ADDITION:Dr.REVERT_SECOND_FACTOR_ADDITION,VERIFY_AND_CHANGE_EMAIL:Dr.VERIFY_AND_CHANGE_EMAIL,VERIFY_EMAIL:Dr.VERIFY_EMAIL}},EmailAuthProvider:Jn,FacebookAuthProvider:gn,GithubAuthProvider:vn,GoogleAuthProvider:mn,OAuthProvider:Nr,SAMLAuthProvider:No,PhoneAuthProvider:Rl,PhoneMultiFactorGenerator:Af,RecaptchaVerifier:cI,TwitterAuthProvider:bn,Auth:Ol,AuthCredential:Br,Error:$t}).setInstantiationMode("LAZY").setMultipleInstances(!1)),e.registerVersion(Hw,Ww)}dI(qn);let Ff=!1;const Ui=e=>{if(Ff)return qn.auth();if(e&&e==="dev"){qn.initializeApp({apiKey:"api_key"});const n=ww();ll(n,"http://localhost:39199")}else{const n={apiKey:e&&e==="staging"?"AIzaSyBKhAYwkvkmjm16FxCMvCUQjSRpKC0DbM8":"AIzaSyDPD_SETLswR_U3dKawYkAyRhbzVXziD_4",authDomain:"fans-united-clients.firebaseapp.com",projectId:"fans-united-clients",messagingSenderId:"78627953958",appId:"1:78627953958:web:2ee87d5b274e0e7685f5e7",measurementId:"G-RH90B03KJG"};qn.initializeApp(n)}return Ff=!0,qn.auth()},fI=e=>e==="dev"?"http://localhost:8070/v1":e==="staging"?"https://client.fansunitedstagingapi.com/v1":e==="watg"?"https://client.watg.fansunitedapi.com/v1":e==="yolo"?"https://client.yolo.fansunitedapi.com/v1":e==="cska"?"https://client.cska.fansunitedapi.com/v1":"https://client.fansunitedapi.com/v1";class hI{constructor(t,n){te(this,"apiKey","");te(this,"clientId","");te(this,"environment","");te(this,"mainQueryParams",{key:"",client_id:""});te(this,"headers",{"Content-Type":"application/json"});te(this,"clientApiBaseUrl","");te(this,"sportal365ImagesSearchURL","https://content.api.sportal365.com/v2/images/search?");te(this,"sportal365Config",null);te(this,"generateSignedInUrl",t=>k(this,null,function*(){const n=`/clients/${this.clientId}/generate-signed-url?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(t)})}));te(this,"storeInBucket",(t,n,r)=>k(this,null,function*(){const i=yield fetch(t,{headers:r,method:"PUT",body:n});if(i.ok)return this.constructAssetsUrl(n.name);const o=yield i.text();this.throwErrorFromXmlResponse(o)}));te(this,"fetchImagesFromSportal365",(t,n,r)=>k(this,null,function*(){if(this.sportal365Config){const i={Project:this.sportal365Config.project,Authorization:this.sportal365Config.authorization};let o={query:t,page:r.toString()};return n&&(n.from&&(o=Q(N({},o),{from:n.from})),n.to&&(o=Q(N({},o),{to:n.to}))),yield fetch(this.sportal365ImagesSearchURL+new URLSearchParams(o),{headers:i})}}));te(this,"getSchedulersByEntityId",t=>k(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks?`,r={key:this.apiKey,limit:"50",entity_id:t},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"setSchedulers",(t,n,r)=>k(this,null,function*(){let i="",o="";n==="CREATE"?(i=`/clients/${this.clientId}/scheduler/tasks?`,o="POST"):(i=`/clients/${this.clientId}/scheduler/tasks/${r}?`,o="PUT");const a={key:this.apiKey},s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s}),body:JSON.stringify(t),method:o})}));te(this,"deleteScheduledTask",t=>k(this,null,function*(){const n=`/clients/${this.clientId}/scheduler/tasks/${t}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLoggedInStaffMember",()=>k(this,null,function*(){const r=(yield this.getToken()).split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(window.atob(r).split("").map(function(o){return"%"+("00"+o.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}));te(this,"constructAssetsUrl",t=>this.environment==="dev"?`https://storage.googleapis.com/client_images_cms_fans-united-dev/${this.clientId}/${t}`:this.environment==="staging"?`https://storage.googleapis.com/client_images_cms_fans-united-stage/${this.clientId}/${t}`:`https://uploads.fansunitedassets.com/${this.clientId}/${t}`);te(this,"throwErrorFromXmlResponse",t=>{const n=new window.DOMParser().parseFromString(t,"text/xml"),r=n.getElementsByTagName("Message")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Message")[0].textContent:"",i=n.getElementsByTagName("Details")&&n.getElementsByTagName("Code").length>0?n.getElementsByTagName("Details")[0].textContent:"";throw new Error(r+" "+i)});te(this,"getToken",()=>k(this,null,function*(){const t=Ui(this.environment).currentUser;return t?yield t.getIdToken():""}));this.apiKey=t.apiKey,this.clientId=t.clientId,this.environment=t.environment,this.mainQueryParams={key:t.apiKey,client_id:t.clientId},this.sportal365Config=n,this.clientApiBaseUrl=fI(this.environment)}}const pI=e=>e==="dev"?"http://localhost:8060/v1":e==="staging"?"https://loyalty.fansunitedstagingapi.com/v1":e==="watg"?"https://loyalty.watg.fansunitedapi.com/v1":e==="yolo"?"https://loyalty.yolo.fansunitedapi.com/v1":e==="cska"?"https://loyalty.cska.fansunitedapi.com/v1":"https://loyalty.fansunitedapi.com/v1",gI=e=>e==="dev"?"http://localhost:8040/v1":e==="staging"?"https://prediction.fansunitedstagingapi.com/v1":e==="watg"?"https://prediction.watg.fansunitedapi.com/v1":e==="yolo"?"https://prediction.yolo.fansunitedapi.com/v1":e==="cska"?"https://prediction.cska.fansunitedapi.com/v1":"https://prediction.fansunitedapi.com/v1",mI=e=>e==="dev"?"http://localhost:9040/v1":e==="staging"?"https://mini-games.fansunitedstagingapi.com/v1":e==="watg"?"https://mini-games.watg.fansunitedapi.com/v1":e==="yolo"?"https://mini-games.yolo.fansunitedapi.com/v1":e==="cska"?"https://mini-games.cska.fansunitedapi.com/v1":"https://mini-games.fansunitedapi.com/v1",vI=e=>e==="dev"?"http://localhost:8020/v1":e==="staging"?"https://reporting.fansunitedstagingapi.com/v1":e==="watg"?"https://reporting.watg.fansunitedapi.com/v1":e==="yolo"?"https://reporting.yolo.fansunitedapi.com/v1":e==="cska"?"https://reporting.cska.fansunitedapi.com/v1":"https://reporting.fansunitedapi.com/v1",bI=e=>e==="dev"?"http://localhost:9030/v1":e==="staging"?"https://voting.fansunitedstagingapi.com/v1":e==="watg"?"https://voting.watg.fansunitedapi.com/v1":e==="yolo"?"https://voting.yolo.fansunitedapi.com/v1":e==="cska"?"https://voting.cska.fansunitedapi.com/v1":"https://voting.fansunitedapi.com/v1",yI=e=>e==="staging"?"https://custom-games-resolver-131809830171.europe-west1.run.app/v1":e==="watg"?"https://custom-games-resolver-1045682138584.southamerica-east1.run.app/v1":e==="yolo"?"https://custom-games-resolver-1054597592566.europe-west1.run.app/v1":e==="cska"?"https://custom-games-resolver-414330847655.europe-west1.run.app/v1":"https://custom-games-resolver-150199313674.europe-west1.run.app/v1",xI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://profile.fansunitedstagingapi.com/v1":e==="watg"?"https://profile.watg.fansunitedapi.com/v1":e==="yolo"?"https://profile.yolo.fansunitedapi.com/v1":e==="cska"?"https://profile.cska.fansunitedapi.com/v1":"https://profile.fansunitedapi.com/v1",CI=e=>e==="dev"?"http://localhost:8010/v1":e==="staging"?"https://discussions.fansunitedstagingapi.com/v1":e==="watg"?"https://discussions.watg.fansunitedapi.com/v1":e==="yolo"?"https://discussions.yolo.fansunitedapi.com/v1":e==="cska"?"https://discussions.cska.fansunitedapi.com/v1":"https://discussions.fansunitedapi.com/v1";class wI extends hI{constructor(n,r){super(n,r);te(this,"loyaltyBaseUrl","");te(this,"predictionBaseUrl","");te(this,"miniGamesApiBaseUrl","");te(this,"reportingApiBaseUrl","");te(this,"votingApiBaseUrl","");te(this,"profileApiBaseUrl","");te(this,"customResolverUrl","");te(this,"discussionsApiBaseUrl","");te(this,"getClientById",()=>k(this,null,function*(){const n=`/clients/${this.clientId}?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createTemplate",n=>k(this,null,function*(){const r="/leaderboard/templates?",i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editTemplate",(n,r)=>k(this,null,function*(){const i=`/leaderboard/templates/${n}?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteTemplate",n=>k(this,null,function*(){const r=`/leaderboard/templates/${n}?`,i=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"setWinners",n=>k(this,null,function*(){const r="/winners?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"exportDetailedLeaderboard",(n,r,i)=>k(this,null,function*(){const o=`/leaderboard/${n}/detailed?`,a=yield this.getToken(),s=N({},this.mainQueryParams);return r&&(s.group_id=r),yield fetch(this.loyaltyBaseUrl+o+new URLSearchParams(Q(N({},s),{limit:i.toString()})),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a})})}));te(this,"exportDetailedGameLeaderboard",(n,r)=>k(this,null,function*(){const i=`/leaderboard/games/${n}/detailed?`,o=yield this.getToken();return yield fetch(this.loyaltyBaseUrl+i+new URLSearchParams(Q(N({},this.mainQueryParams),{limit:r.toString()})),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"createGame",n=>k(this,null,function*(){const r="/games?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"editGame",(n,r)=>k(this,null,function*(){const i=`/games/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getEntityFeature",(n,r)=>k(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o={key:this.apiKey};return r&&(o.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o))}));te(this,"getClientFeatures",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features?`,i={key:this.apiKey};return n&&(i.disable_cache=Date.now().toString()),yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i))}));te(this,"updateEntityFeatures",(n,r)=>k(this,null,function*(){const i=`/clients/${this.clientId}/features/${n}?`,o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH",body:JSON.stringify(r)})}));te(this,"getClassicQuizFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/classic_quiz?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getEitherOrFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/either_or?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"getPollFeature",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/poll?`,r={key:this.apiKey};return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r))}));te(this,"createClassicQuiz",n=>k(this,null,function*(){const r="/classic-quizzes?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateClassicQuiz",(n,r)=>k(this,null,function*(){const i=`/classic-quizzes/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"getClassicQuizById",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}/staff?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"deleteClassicQuiz",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"calculateQuestionsReport",n=>k(this,null,function*(){const r=`/classic-quizzes/${n}/questions-report?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST"})}));te(this,"exportUsers",n=>k(this,null,function*(){const r="/exports/users?",i=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"getClassicQuizParticipations",(n,r,i,o)=>k(this,null,function*(){const a="/classic-quizzes/participations?",s=Q(N({},this.mainQueryParams),{classic_quiz_ids:n,from_date:r,to_date:i,group_by:o}),l=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+a+new URLSearchParams(s),{headers:Q(N({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"getEntityParticipations",(n,r,i)=>k(this,null,function*(){const o=`/participations/${n}/breakdown?`,a=Q(N({},this.mainQueryParams),{from_date:r,to_date:i}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"createPoll",n=>k(this,null,function*(){const r="/polls?",i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updatePoll",(n,r)=>k(this,null,function*(){const i=`/polls/${n}?`,o=yield this.getToken();return yield fetch(this.votingApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deletePoll",n=>k(this,null,function*(){const r=`/polls/${n}?`,i=yield this.getToken();return yield fetch(this.votingApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getEitherOrById",(n,r)=>k(this,null,function*(){const i=`/either-or/${n}/staff?`,o=yield this.getToken();let a=null;return r&&(a=Q(N({},this.mainQueryParams),{client_id:r})),yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(a||this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getEitherOrByIdReadOnlyClient",(n,r)=>k(this,null,function*(){const i="https://mini-games.fansunitedapi.com/v1",o=`/either-or/${n}/staff?`,a=yield this.getToken(),s={key:"AIzaSyBDsY25nJ4VZz0iiLLQpPRnjMRnIHkyqg4",client_id:r};return yield fetch(i+o+new URLSearchParams(s),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a})})}));te(this,"createEitherOr",n=>k(this,null,function*(){const r="/either-or?",i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateEitherOr",(n,r)=>k(this,null,function*(){const i=`/either-or/${n}?`,o=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteEitherOr",n=>k(this,null,function*(){const r=`/either-or/${n}?`,i=yield this.getToken();return yield fetch(this.miniGamesApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"getLists",(n,r,i="DESC")=>k(this,null,function*(){const o=`/clients/${this.clientId}/lists?`,a={key:this.apiKey,limit:n.toString(),sort_order:i};r&&(a.start_after=r);const s=yield this.getToken();return yield fetch(this.clientApiBaseUrl+o+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));te(this,"getListById",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getListContent",(n,r,i="DESC",o)=>k(this,null,function*(){const a=`/clients/${this.clientId}/lists/${n}/content?`,s={key:this.apiKey,limit:r.toString(),sort_order:i};o&&(s.page=o.toString());const l=yield this.getToken();return yield fetch(this.clientApiBaseUrl+a+new URLSearchParams(s),{headers:Q(N({},this.headers),{Authorization:"Bearer "+l})})}));te(this,"createList",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/lists/?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateList",(n,r)=>k(this,null,function*(){const i=`/clients/${this.clientId}/lists/${n}?`,o={key:this.apiKey},a=yield this.getToken();return yield fetch(this.clientApiBaseUrl+i+new URLSearchParams(o),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a}),method:"PUT",body:JSON.stringify(r)})}));te(this,"deleteList",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/lists/${n}?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getLanguageConfig",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/config/language?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateLanguageConfig",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/config/language?`,i={key:this.apiKey},o=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(n)})}));te(this,"createBracketGame",n=>k(this,null,function*(){const r="/custom/bracket?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateBracketGame",(n,r)=>k(this,null,function*(){const i=`/custom/bracket/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolvePredictions",n=>k(this,null,function*(){const r="/custom/bracket/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"exportLeadsPerEntity",n=>k(this,null,function*(){const r="/leads/export?",i=Q(N({},this.mainQueryParams),{content_id:n}),o=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(i),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o})})}));te(this,"getLeadStatistics",n=>k(this,null,function*(){const r="/leads/statistics?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(N(N({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"exportLeads",n=>k(this,null,function*(){const r="/leads/export?",i=yield this.getToken();let o=null;return n?o=new URLSearchParams(N(N({},this.mainQueryParams),n)):o=new URLSearchParams(this.mainQueryParams),yield fetch(this.profileApiBaseUrl+r+o,{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"createStandingGame",n=>k(this,null,function*(){const r="/custom/standing?",i=yield this.getToken();return yield fetch(this.predictionBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"updateStandingGame",(n,r)=>k(this,null,function*(){const i=`/custom/standing/${n}?`,o=yield this.getToken();return yield fetch(this.predictionBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PUT",body:JSON.stringify(r)})}));te(this,"resolveStandingPredictions",n=>k(this,null,function*(){const r="/custom/standing/resolve?",o=yield this.getToken();return yield fetch(this.customResolverUrl+r+new URLSearchParams({client_id:this.clientId,game_id:n}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),signal:AbortSignal.timeout(6e5)})}));te(this,"moderateUserPosts",(n,r)=>k(this,null,function*(){const i="/moderation/bulk?",o=yield this.getToken(),a=Q(N({},this.mainQueryParams),{user_id:n,reason:r});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"POST"})}));te(this,"getUserBanStatus",n=>k(this,null,function*(){const r=`/discussions/users/${n}/ban?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"banUser",(n,r,i)=>k(this,null,function*(){const o=`/discussions/users/${n}/ban?`,a=yield this.getToken(),s={banned_period_in_days:r,banned_reason:i};return yield fetch(this.discussionsApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));te(this,"unbanUser",(n,r)=>k(this,null,function*(){const i=`/discussions/users/${n}/ban?`,o=yield this.getToken(),a={unban_reason:r};return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE",body:JSON.stringify(a)})}));te(this,"updateUser",(n,r,i)=>k(this,null,function*(){const o=`/profiles/${n}/verify?`,a=yield this.getToken(),s=r==="verify"?{verified:i}:{staff_member:i};return yield fetch(this.profileApiBaseUrl+o+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+a}),method:"POST",body:JSON.stringify(s)})}));te(this,"deleteUserProfile",n=>k(this,null,function*(){const r=`/profiles/${n}?`,i=yield this.getToken();return yield fetch(this.profileApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"createDiscussion",n=>k(this,null,function*(){const r="/discussions?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"POST",body:JSON.stringify(n)})}));te(this,"deleteDiscussion",n=>k(this,null,function*(){const r=`/discussions/${n}?`,i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(this.mainQueryParams),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"DELETE"})}));te(this,"moderatePosts",(...o)=>k(this,[...o],function*(n="",r=[],i){const a="/moderation/bulk?",s=yield this.getToken();let l={};if(r.length>0){const c=r.join(",");l=Q(N({},this.mainQueryParams),{post_ids:c,reason:i})}else l=Q(N({},this.mainQueryParams),{discussion_id:n,reason:i});return yield fetch(this.discussionsApiBaseUrl+a+new URLSearchParams(l),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s}),method:"POST"})}));te(this,"pinDiscussionPosts",(n,r)=>k(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q(N({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"PATCH"})}));te(this,"unpinDiscussionPosts",(n,r)=>k(this,null,function*(){const i=`/discussions/${n}/pins?`,o=yield this.getToken(),a=Q(N({},this.mainQueryParams),{pin_post_ids:r.join(",")});return yield fetch(this.discussionsApiBaseUrl+i+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+o}),method:"DELETE"})}));te(this,"getPostsByStaffMember",n=>k(this,null,function*(){const r="/posts/staff?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(N(N({},this.mainQueryParams),n)),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"getReportedPosts",n=>k(this,null,function*(){const r="/posts/staff/reported?",i=yield this.getToken();return yield fetch(this.discussionsApiBaseUrl+r+new URLSearchParams(N(N({},this.mainQueryParams),n)),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateDiscussionsFeature",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features/discussions?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"updateProfilePreferences",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features/profile_preferences?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"PATCH",body:JSON.stringify(n)})}));te(this,"getClientBadges",()=>k(this,null,function*(){const n=`/clients/${this.clientId}/features/loyalty/badges?`,r={key:this.apiKey},i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+n+new URLSearchParams(r),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i})})}));te(this,"updateClientBadges",n=>k(this,null,function*(){const r=`/clients/${this.clientId}/features/loyalty/badges?`,i=yield this.getToken();return yield fetch(this.clientApiBaseUrl+r+new URLSearchParams({key:this.apiKey}),{headers:Q(N({},this.headers),{Authorization:"Bearer "+i}),method:"PUT",body:JSON.stringify(n)})}));te(this,"getEngagementThroughPredictionsReport",(n,r,i)=>k(this,null,function*(){const o="/predictions/football/engagements?",a=Q(N({},this.mainQueryParams),{from_date:r,to_date:i,type:n}),s=yield this.getToken();return yield fetch(this.reportingApiBaseUrl+o+new URLSearchParams(a),{headers:Q(N({},this.headers),{Authorization:"Bearer "+s})})}));this.loyaltyBaseUrl=pI(n.environment),this.predictionBaseUrl=gI(n.environment),this.miniGamesApiBaseUrl=mI(n.environment),this.reportingApiBaseUrl=vI(n.environment),this.votingApiBaseUrl=bI(n.environment),this.profileApiBaseUrl=xI(n.environment),this.customResolverUrl=yI(n.environment),this.discussionsApiBaseUrl=CI(n.environment)}}const II=(e,t)=>!e&&!t?null:!e&&t?(console.warn("'sportal365Project' prop is not provided. The prop is required when 'sportal365Infrastructure' prop is provided. Functionalities with Sportal365 API will not be exposed"),null):{project:e,authorization:`Bearer ${t&&t==="betway"?"24PkUfW1ce63mH9jvAAug2QQzdASj9k5smngepPUZD2KUq5cbTFGE98KgZ0zg2wCtuQcoJrHElW7Dr0K":"dEZS1V21veHBIDIik8Y33dDkZAoCmxgge5MBnAORN7IKbltA79giTZLaXJ6OVgQkGnYxwtyRv8ObRSvY"}`},Zo=C.createContext(null),SI=({config:e,children:t})=>{const n={apiKey:e.apiKey,clientId:e.clientId,environment:e.environment,lang:e.language,errorHandlingMode:e.errorHandlingMode,authProvider:{getIdToken:()=>"",logout:()=>{}}},r=II(e.sportal365Project,e.sportal365Infrastructure),i=Me.FansUnitedSDK(n),o=new wI(n,r);return u.jsx(Zo.Provider,{value:{sdk:i,https:o},children:t})},zf=C.createContext(null),AI=({children:e,environment:t})=>{const[n,r]=C.useState(null),[i,o]=C.useState(!0);return C.useEffect(()=>Ui(t).onAuthStateChanged(s=>{Re.unstable_batchedUpdates(()=>{o(!1),r(s)})}),[t]),u.jsx(zf.Provider,{value:n,children:!i&&e})};function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(null,arguments)}function Ae(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var jf={exports:{}},TI="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",EI=TI,kI=EI;function Uf(){}function Vf(){}Vf.resetWarningCache=Uf;var _I=function(){function e(r,i,o,a,s,l){if(l!==kI){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Vf,resetWarningCache:Uf};return n.PropTypes=n,n};jf.exports=_I();var PI=jf.exports;function DI(e){return typeof e=="string"}function OI(e,t,n){return e===void 0||DI(e)?t:O({},t,{ownerState:O({},t.ownerState,n)})}function Hf(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Mn(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function RI(e,t,n){return typeof e=="function"?e(t,n):e}function LI(e){const{rootElementName:t="",componentName:n}=e,[r,i]=U.useState(t.toUpperCase()),o=U.useCallback(a=>{var s;i((s=a==null?void 0:a.tagName)!=null?s:"")},[]);return[r,o]}function MI(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function sn(...e){return U.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{MI(n,t)})},e)}function Wf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Wf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Wf(e))&&(r&&(r+=" "),r+=t);return r}function Gf(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function BI(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=Bn(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),m=O({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),g=O({},n,i,r);return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=Mn(O({},i,r)),s=Gf(r),l=Gf(i),c=t(a),d=Bn(c==null?void 0:c.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),f=O({},c==null?void 0:c.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=O({},c,n,l,s);return d.length>0&&(h.className=d),Object.keys(f).length>0&&(h.style=f),{props:h,internalRef:c.ref}}function er(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yf(e){if(U.isValidElement(e)||!er(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Yf(e[n])}),t}function $n(e,t,n={clone:!0}){const r=n.clone?O({},e):e;return er(e)&&er(t)&&Object.keys(t).forEach(i=>{U.isValidElement(t[i])?r[i]=t[i]:er(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&er(e[i])?r[i]=$n(e[i],t[i],n):n.clone?r[i]=er(t[i])?Yf(t[i]):t[i]:r[i]=t[i]}),r}function ea(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Kf={exports:{}},$e={};/**
|
|
2326
2326
|
* @license React
|
|
2327
2327
|
* react-is.production.js
|
|
2328
2328
|
*
|
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@ export default class HttpsService extends Https {
|
|
|
50
50
|
updatePoll: (id: string, requestBody: PollRequestBody) => Promise<Response>;
|
|
51
51
|
deletePoll: (pollId: string) => Promise<Response>;
|
|
52
52
|
getEitherOrById: (id: string, clientId?: string) => Promise<Response>;
|
|
53
|
-
getEitherOrByIdReadOnlyClient: (id: string,
|
|
53
|
+
getEitherOrByIdReadOnlyClient: (id: string, readOnlyClient: string) => Promise<Response>;
|
|
54
54
|
createEitherOr: (requestBody: EitherOrRequestBody) => Promise<Response>;
|
|
55
55
|
updateEitherOr: (id: string, requestBody: EitherOrRequestBody) => Promise<Response>;
|
|
56
56
|
deleteEitherOr: (eitherOrId: string) => Promise<Response>;
|