fansunited-management-components 1.43.0-RC1 → 1.43.0-RC2
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 +37 -23
- package/index.umd.js +2 -2
- package/package.json +1 -1
- package/src/components/Flags/Flags.d.ts +2 -0
- package/src/services/https/HttpsService.d.ts +2 -0
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":"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":"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":"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":"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":"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":"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":"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":"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":"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)=>k(this,null,function*(){const i=`/leaderboard/${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,"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,"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)})}));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})},jf=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(jf.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 zf={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};zf.exports=_I();var PI=zf.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":"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":"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":"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":"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":"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":"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":"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":"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":"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)=>k(this,null,function*(){const i=`/leaderboard/${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,"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,"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)})}));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})},jf=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(jf.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 zf={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};zf.exports=_I();var PI=zf.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
|
*
|
|
@@ -2460,7 +2460,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2460
2460
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vn(e,t){return qP(e)||JP(e,t)||Cg(e,t)||XP()}function Cn(e,t){if(e==null)return{};var n,r,i=Ae(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function ZP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Zc=C.useLayoutEffect,eD=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],rs=function(){};function tD(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function nD(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&o.push("".concat(tD(e,a)));return o.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var is=function(t){return dD(t)?t.filter(Boolean):br(t)==="object"&&t!==null?[t]:[]},wg=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Cn(t,eD);return ve({},n)},tt=function(t,n,r){var i=t.cx,o=t.getStyles,a=t.getClassNames,s=t.className;return{css:o(n,t),className:i(r!=null?r:{},a(n,t),s)}};function os(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function rD(e){return os(e)?window.innerHeight:e.clientHeight}function Ig(e){return os(e)?window.pageYOffset:e.scrollTop}function as(e,t){if(os(e)){window.scrollTo(0,t);return}e.scrollTop=t}function iD(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function oD(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ss(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:rs,i=Ig(e),o=t-i,a=10,s=0;function l(){s+=a;var c=oD(s,i,o,n);as(e,c),s<n?window.requestAnimationFrame(l):r(e)}l()}function Sg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?as(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&as(e,Math.max(t.offsetTop-i,0))}function aD(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Ag(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function sD(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}var Tg=!1,lD={get passive(){return Tg=!0}},ls=typeof window!="undefined"?window:{};ls.addEventListener&&ls.removeEventListener&&(ls.addEventListener("p",rs,lD),ls.removeEventListener("p",rs,!1));var cD=Tg;function uD(e){return e!=null}function dD(e){return Array.isArray(e)}function ao(e,t,n){return e?t:n}function FF(e){return e}function jF(e){return e}var fD=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(a){var s=Vn(a,1),l=s[0];return!r.includes(l)});return o.reduce(function(a,s){var l=Vn(s,2),c=l[0],d=l[1];return a[c]=d,a},{})},hD=["children","innerProps"],pD=["children","innerProps"];function gD(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=iD(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var d=l.getBoundingClientRect(),f=d.height,h=n.getBoundingClientRect(),p=h.bottom,m=h.height,g=h.top,v=n.offsetParent.getBoundingClientRect(),I=v.top,S=a?window.innerHeight:rD(l),x=Ig(l),w=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),A=I-y,E=S-g,_=A+x,D=f-x-g,G=p-S+x+w,F=x+g-y,T=160;switch(i){case"auto":case"bottom":if(E>=m)return{placement:"bottom",maxHeight:t};if(D>=m&&!a)return o&&ss(l,G,T),{placement:"bottom",maxHeight:t};if(!a&&D>=r||a&&E>=r){o&&ss(l,G,T);var W=a?E-w:D-w;return{placement:"bottom",maxHeight:W}}if(i==="auto"||a){var Y=t,j=a?A:_;return j>=r&&(Y=Math.min(j-w-s,t)),{placement:"top",maxHeight:Y}}if(i==="bottom")return o&&as(l,G),{placement:"bottom",maxHeight:t};break;case"top":if(A>=m)return{placement:"top",maxHeight:t};if(_>=m&&!a)return o&&ss(l,F,T),{placement:"top",maxHeight:t};if(!a&&_>=r||a&&A>=r){var $=t;return(!a&&_>=r||a&&A>=r)&&($=a?A-y:_-y),o&&ss(l,F,T),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function mD(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Eg=function(t){return t==="auto"?"bottom":t},vD=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,s=o.spacing,l=o.colors;return ve((r={label:"menu"},oo(r,mD(i),"100%"),oo(r,"position","absolute"),oo(r,"width","100%"),oo(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},kg=C.createContext(null),bD=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,c=C.useContext(kg)||{},d=c.setPortalPlacement,f=C.useRef(null),h=C.useState(i),p=Vn(h,2),m=p[0],g=p[1],v=C.useState(null),I=Vn(v,2),S=I[0],x=I[1],w=l.spacing.controlHeight;return Zc(function(){var y=f.current;if(y){var A=a==="fixed",E=s&&!A,_=gD({maxHeight:i,menuEl:y,minHeight:r,placement:o,shouldScroll:E,isFixedPosition:A,controlHeight:w});g(_.maxHeight),x(_.placement),d==null||d(_.placement)}},[i,o,a,s,r,d,w]),n({ref:f,placerProps:ve(ve({},t),{},{placement:S||Eg(o),maxHeight:m})})},yD=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return pe.jsx("div",O({},tt(t,"menu",{menu:!0}),{ref:r},i),n)},xD=yD,CD=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return ve({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},wD=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return pe.jsx("div",O({},tt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},_g=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return ve({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},ID=_g,SD=_g,AD=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Cn(t,hD);return pe.jsx("div",O({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},TD=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Cn(t,pD);return pe.jsx("div",O({},tt(ve(ve({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},ED=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},kD=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,s=t.menuPosition,l=C.useRef(null),c=C.useRef(null),d=C.useState(Eg(a)),f=Vn(d,2),h=f[0],p=f[1],m=C.useMemo(function(){return{setPortalPlacement:p}},[]),g=C.useState(null),v=Vn(g,2),I=v[0],S=v[1],x=C.useCallback(function(){if(i){var E=aD(i),_=s==="fixed"?0:window.pageYOffset,D=E[h]+_;(D!==(I==null?void 0:I.offset)||E.left!==(I==null?void 0:I.rect.left)||E.width!==(I==null?void 0:I.rect.width))&&S({offset:D,rect:E})}},[i,s,h,I==null?void 0:I.offset,I==null?void 0:I.rect.left,I==null?void 0:I.rect.width]);Zc(function(){x()},[x]);var w=C.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&l.current&&(c.current=BS(i,l.current,x,{elementResize:"ResizeObserver"in window}))},[i,x]);Zc(function(){w()},[w]);var y=C.useCallback(function(E){l.current=E,w()},[w]);if(!n&&s!=="fixed"||!I)return null;var A=pe.jsx("div",O({ref:y},tt(ve(ve({},t),{},{offset:I.offset,position:s,rect:I.rect}),"menuPortal",{"menu-portal":!0}),o),r);return pe.jsx(kg.Provider,{value:m},n?Re.createPortal(A,n):A)},_D=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},PD=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return pe.jsx("div",O({},tt(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},DD=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ve({alignItems:"center",display:i&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},OD=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return pe.jsx("div",O({},tt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},RD=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},LD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",O({},tt(t,"indicatorsContainer",{indicators:!0}),r),n)},Pg,MD=["size"],BD=["innerProps","isRtl","size"],$D={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Dg=function(t){var n=t.size,r=Cn(t,MD);return pe.jsx("svg",O({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:$D},r))},eu=function(t){return pe.jsx(Dg,O({size:20},t),pe.jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Og=function(t){return pe.jsx(Dg,O({size:20},t),pe.jsx("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Rg=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return ve({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},ND=Rg,FD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",O({},tt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||pe.jsx(Og,null))},jD=Rg,zD=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",O({},tt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||pe.jsx(eu,null))},UD=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return ve({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},VD=function(t){var n=t.innerProps;return pe.jsx("span",O({},n,tt(t,"indicatorSeparator",{"indicator-separator":!0})))},HD=pe.keyframes(Pg||(Pg=ZP([`
|
|
2461
2461
|
0%, 80%, 100% { opacity: 0; }
|
|
2462
2462
|
40% { opacity: 1; }
|
|
2463
|
-
`]))),WD=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return ve({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},tu=function(t){var n=t.delay,r=t.offset;return pe.jsx("span",{css:pe.css({animation:"".concat(HD," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},GD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,BD);return pe.jsx("div",O({},tt(ve(ve({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),pe.jsx(tu,{delay:0,offset:r}),pe.jsx(tu,{delay:160,offset:!0}),pe.jsx(tu,{delay:320,offset:!r}))},YD=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,l=o.spacing;return ve({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},KD=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return pe.jsx("div",O({ref:o},tt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a,{"aria-disabled":r||void 0}),n)},QD=KD,qD=["data"],JD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},XD=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,l=t.innerProps,c=t.label,d=t.theme,f=t.selectProps;return pe.jsx("div",O({},tt(t,"group",{group:!0}),l),pe.jsx(a,O({},s,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),c),pe.jsx("div",null,n))},ZD=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return ve({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},eO=function(t){var n=wg(t);n.data;var r=Cn(n,qD);return pe.jsx("div",O({},tt(t,"groupHeading",{"group-heading":!0}),r))},tO=XD,nO=["innerRef","isDisabled","isHidden","inputClassName"],rO=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return ve(ve({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},iO),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Lg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},iO={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ve({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Lg)},oO=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Lg)},aO=function(t){var n=t.cx,r=t.value,i=wg(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,c=Cn(i,nO);return pe.jsx("div",O({},tt(t,"input",{"input-container":!0}),{"data-value":r||""}),pe.jsx("input",O({className:n({input:!0},l),ref:o,style:oO(s),disabled:a},c)))},sO=aO,lO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return ve({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},cO=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return ve({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},uO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return ve({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Mg=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",r,n)},dO=Mg,fO=Mg;function hO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",O({role:"button"},n),t||pe.jsx(eu,{size:14}))}var pO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,l=t.selectProps,c=r.Container,d=r.Label,f=r.Remove;return pe.jsx(c,{data:i,innerProps:ve(ve({},tt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},pe.jsx(d,{data:i,innerProps:ve({},tt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),pe.jsx(f,{data:i,innerProps:ve(ve({},tt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},gO=pO,mO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,l=a.colors;return ve({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},vO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return pe.jsx("div",O({},tt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},bO=vO,yO=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return ve({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},xO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",O({},tt(t,"placeholder",{placeholder:!0}),r),n)},CO=xO,wO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return ve({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},IO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return pe.jsx("div",O({},tt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},SO=IO,AO={ClearIndicator:zD,Control:QD,DropdownIndicator:FD,DownChevron:Og,CrossIcon:eu,Group:tO,GroupHeading:eO,IndicatorsContainer:LD,IndicatorSeparator:VD,Input:sO,LoadingIndicator:GD,Menu:xD,MenuList:wD,MenuPortal:kD,LoadingMessage:TD,NoOptionsMessage:AD,MultiValue:gO,MultiValueContainer:dO,MultiValueLabel:fO,MultiValueRemove:hO,Option:bO,Placeholder:CO,SelectContainer:PD,SingleValue:SO,ValueContainer:OD},TO=function(t){return ve(ve({},AO),t.components)},Bg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function EO(e,t){return!!(e===t||Bg(e)&&Bg(t))}function kO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!EO(e[n],t[n]))return!1;return!0}function _O(e,t){t===void 0&&(t=kO);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}for(var PO={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},DO=function(t){return pe.jsx("span",O({css:PO},t))},$g=DO,OO={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,a=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,l=t.isDisabled,c=t.isSelected,d=t.isAppleDevice,f=function(g,v){return g&&g.length?"".concat(g.indexOf(v)+1," of ").concat(g.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(f(s,r),".");if(n==="menu"&&d){var h=l?" disabled":"",p="".concat(c?" selected":"").concat(h);return"".concat(a).concat(p,", ").concat(f(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},RO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,c=t.id,d=t.isAppleDevice,f=l.ariaLiveMessages,h=l.getOptionLabel,p=l.inputValue,m=l.isMulti,g=l.isOptionDisabled,v=l.isSearchable,I=l.menuIsOpen,S=l.options,x=l.screenReaderStatus,w=l.tabSelectsValue,y=l.isLoading,A=l["aria-label"],E=l["aria-live"],_=C.useMemo(function(){return ve(ve({},OO),f||{})},[f]),D=C.useMemo(function(){var j="";if(n&&_.onChange){var $=n.option,B=n.options,H=n.removedValue,Q=n.removedValues,ee=n.value,R=function(X){return Array.isArray(X)?null:X},M=H||$||R(ee),z=M?h(M):"",V=B||Q||void 0,ne=V?V.map(h):[],se=ve({isDisabled:M&&g(M,s),label:z,labels:ne},n);j=_.onChange(se)}return j},[n,_,g,s,h]),G=C.useMemo(function(){var j="",$=r||i,B=!!(r&&s&&s.includes(r));if($&&_.onFocus){var H={focused:$,label:h($),isDisabled:g($,s),isSelected:B,options:o,context:$===r?"menu":"value",selectValue:s,isAppleDevice:d};j=_.onFocus(H)}return j},[r,i,h,g,_,o,s,d]),F=C.useMemo(function(){var j="";if(I&&S.length&&!y&&_.onFilter){var $=x({count:o.length});j=_.onFilter({inputValue:p,resultsMessage:$})}return j},[o,p,I,_,S,x,y]),T=(n==null?void 0:n.action)==="initial-input-focus",W=C.useMemo(function(){var j="";if(_.guidance){var $=i?"value":I?"menu":"input";j=_.guidance({"aria-label":A,context:$,isDisabled:r&&g(r,s),isMulti:m,isSearchable:v,tabSelectsValue:w,isInitialFocus:T})}return j},[A,r,i,m,g,v,I,_,s,w,T]),Y=pe.jsx(C.Fragment,null,pe.jsx("span",{id:"aria-selection"},D),pe.jsx("span",{id:"aria-focused"},G),pe.jsx("span",{id:"aria-results"},F),pe.jsx("span",{id:"aria-guidance"},W));return pe.jsx(C.Fragment,null,pe.jsx($g,{id:c},T&&Y),pe.jsx($g,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&Y))},LO=RO,nu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],MO=new RegExp("["+nu.map(function(e){return e.letters}).join("")+"]","g"),Ng={},ru=0;ru<nu.length;ru++)for(var iu=nu[ru],ou=0;ou<iu.letters.length;ou++)Ng[iu.letters[ou]]=iu.base;var Fg=function(t){return t.replace(MO,function(n){return Ng[n]})},BO=_O(Fg),jg=function(t){return t.replace(/^\s+|\s+$/g,"")},$O=function(t){return"".concat(t.label," ").concat(t.value)},NO=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:$O,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,s=i.stringify,l=i.trim,c=i.matchFrom,d=l?jg(r):r,f=l?jg(s(n)):s(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=BO(d),f=Fg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},FO=["innerRef"];function jO(e){var t=e.innerRef,n=Cn(e,FO),r=fD(n,"onExited","in","enter","exit","appear");return pe.jsx("input",O({ref:t},r,{css:pe.css({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var zO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function UO(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=C.useRef(!1),s=C.useRef(!1),l=C.useRef(0),c=C.useRef(null),d=C.useCallback(function(v,I){if(c.current!==null){var S=c.current,x=S.scrollTop,w=S.scrollHeight,y=S.clientHeight,A=c.current,E=I>0,_=w-y-x,D=!1;_>I&&a.current&&(r&&r(v),a.current=!1),E&&s.current&&(o&&o(v),s.current=!1),E&&I>_?(n&&!a.current&&n(v),A.scrollTop=w,D=!0,a.current=!0):!E&&-I>x&&(i&&!s.current&&i(v),A.scrollTop=0,D=!0,s.current=!0),D&&zO(v)}},[n,r,i,o]),f=C.useCallback(function(v){d(v,v.deltaY)},[d]),h=C.useCallback(function(v){l.current=v.changedTouches[0].clientY},[]),p=C.useCallback(function(v){var I=l.current-v.changedTouches[0].clientY;d(v,I)},[d]),m=C.useCallback(function(v){if(v){var I=cD?{passive:!1}:!1;v.addEventListener("wheel",f,I),v.addEventListener("touchstart",h,I),v.addEventListener("touchmove",p,I)}},[p,h,f]),g=C.useCallback(function(v){v&&(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",h,!1),v.removeEventListener("touchmove",p,!1))},[p,h,f]);return C.useEffect(function(){if(t){var v=c.current;return m(v),function(){g(v)}}},[t,m,g]),function(v){c.current=v}}var zg=["boxSizing","height","overflow","paddingRight","position"],Ug={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Vg(e){e.preventDefault()}function Hg(e){e.stopPropagation()}function Wg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Gg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Yg=!!(typeof window!="undefined"&&window.document&&window.document.createElement),so=0,si={capture:!1,passive:!1};function VO(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=C.useRef({}),o=C.useRef(null),a=C.useCallback(function(l){if(Yg){var c=document.body,d=c&&c.style;if(r&&zg.forEach(function(m){var g=d&&d[m];i.current[m]=g}),r&&so<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Ug).forEach(function(m){var g=Ug[m];d&&(d[m]=g)}),d&&(d.paddingRight="".concat(p,"px"))}c&&Gg()&&(c.addEventListener("touchmove",Vg,si),l&&(l.addEventListener("touchstart",Wg,si),l.addEventListener("touchmove",Hg,si))),so+=1}},[r]),s=C.useCallback(function(l){if(Yg){var c=document.body,d=c&&c.style;so=Math.max(so-1,0),r&&so<1&&zg.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&Gg()&&(c.removeEventListener("touchmove",Vg,si),l&&(l.removeEventListener("touchstart",Wg,si),l.removeEventListener("touchmove",Hg,si)))}},[r]);return C.useEffect(function(){if(t){var l=o.current;return a(l),function(){s(l)}}},[t,a,s]),function(l){o.current=l}}var HO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},WO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function GO(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,c=UO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),d=VO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(C.Fragment,null,n&&pe.jsx("div",{onClick:HO,css:WO}),t(f))}var YO={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},KO=function(t){var n=t.name,r=t.onFocus;return pe.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:YO,value:"",onChange:function(){}})},QO=KO;function au(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function qO(){return au(/^iPhone/i)}function Kg(){return au(/^Mac/i)}function JO(){return au(/^iPad/i)||Kg()&&navigator.maxTouchPoints>1}function XO(){return qO()||JO()}function ZO(){return Kg()||XO()}var eR=function(t){return t.label},Qg=function(t){return t.label},qg=function(t){return t.value},tR=function(t){return!!t.isDisabled},nR={clearIndicator:jD,container:_D,control:YD,dropdownIndicator:ND,group:JD,groupHeading:ZD,indicatorsContainer:RD,indicatorSeparator:UD,input:rO,loadingIndicator:WD,loadingMessage:SD,menu:vD,menuList:CD,menuPortal:ED,multiValue:lO,multiValueLabel:cO,multiValueRemove:uO,noOptionsMessage:ID,option:mO,placeholder:yO,singleValue:wO,valueContainer:DD},rR={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},iR=4,Jg=4,oR=38,aR=Jg*2,sR={baseUnit:Jg,controlHeight:oR,menuGutter:aR},su={borderRadius:iR,colors:rR,spacing:sR},lR={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Ag(),captureMenuScroll:!Ag(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:NO(),formatGroupLabel:eR,getOptionLabel:Qg,getOptionValue:qg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:tR,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!sD(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Xg(e,t,n,r){var i=rm(e,t,n),o=im(e,t,n),a=nm(e,t),s=us(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function cs(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return Xg(e,a,t,s)}).filter(function(a){return tm(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Xg(e,n,t,r);return tm(e,o)?o:void 0}).filter(uD)}function Zg(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ai(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function em(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ai(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function cR(e,t){return Zg(cs(e,t))}function tm(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!am(e)||!o)&&om(e,{label:a,value:s,data:i},r)}function uR(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function dR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var lu=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},nm=function(t,n){return t.getOptionLabel(n)},us=function(t,n){return t.getOptionValue(n)};function rm(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function im(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=us(e,t);return n.some(function(i){return us(e,i)===r})}function om(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var am=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},fR=1,sm=function(e){VP(n,e);var t=GP(n);function n(r){var i;if(zP(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=ZO(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,c){var d=i.props,f=d.onChange,h=d.name;c.name=h,i.ariaOnChange(l,c),f(l,c)},i.setValue=function(l,c,d){var f=i.props,h=f.closeMenuOnSelect,p=f.isMulti,m=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:m}),h&&(i.setState({inputIsHiddenAfterUpdate:!p}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:c,option:d})},i.selectOption=function(l){var c=i.props,d=c.blurInputOnSelect,f=c.isMulti,h=c.name,p=i.state.selectValue,m=f&&i.isOptionSelected(l,p),g=i.isOptionDisabled(l,p);if(m){var v=i.getOptionValue(l);i.setValue(p.filter(function(I){return i.getOptionValue(I)!==v}),"deselect-option",l)}else if(!g)f?i.setValue([].concat(ai(p),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:h});return}d&&i.blurInput()},i.removeValue=function(l){var c=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(l),h=d.filter(function(m){return i.getOptionValue(m)!==f}),p=ao(c,h,h[0]||null);i.onChange(p,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(ao(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),h=ao(l,f,f[0]||null);i.onChange(h,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(l){return lu(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return em(cs(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return nD.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return nm(i.props,l)},i.getOptionValue=function(l){return us(i.props,l)},i.getStyles=function(l,c){var d=i.props.unstyled,f=nR[l](c,d);f.boxSizing="border-box";var h=i.props.styles[l];return h?h(f,c):f},i.getClassNames=function(l,c){var d,f;return(d=(f=i.props.classNames)[l])===null||d===void 0?void 0:d.call(f,c)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return TO(i.props)},i.buildCategorizedOptions=function(){return cs(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return Zg(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:ve({value:l},c)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&os(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var c=l.touches,d=c&&c.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var c=l.touches,d=c&&c.item(0);if(d){var f=Math.abs(d.clientX-i.initialTouchX),h=Math.abs(d.clientY-i.initialTouchY),p=5;i.userIsDragging=f>p||h>p}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var c=i.props.inputValue,d=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var c=i.getFocusableOptions(),d=c.indexOf(l);i.setState({focusedOption:l,focusedOptionId:d>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return am(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var c=i.props,d=c.isMulti,f=c.backspaceRemovesValue,h=c.escapeClearsValue,p=c.inputValue,m=c.isClearable,g=c.isDisabled,v=c.menuIsOpen,I=c.onKeyDown,S=c.tabSelectsValue,x=c.openMenuOnFocus,w=i.state,y=w.focusedOption,A=w.focusedValue,E=w.selectValue;if(!g&&!(typeof I=="function"&&(I(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!d||p)return;i.focusValue("previous");break;case"ArrowRight":if(!d||p)return;i.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(A)i.removeValue(A);else{if(!f)return;d?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!v||!S||!y||x&&i.isOptionSelected(y,E))return;i.selectOption(y);break;case"Enter":if(l.keyCode===229)break;if(v){if(!y||i.isComposing)return;i.selectOption(y);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:p}),i.onMenuClose()):m&&h&&i.clearValue();break;case" ":if(p)return;if(!v){i.openMenu("first");break}if(!y)return;i.selectOption(y);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++fR),i.state.selectValue=is(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),s=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[s],i.state.focusedOptionId=lu(o,a[s])}return i}return UP(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Sg(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Sg(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,l=a.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(s[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var c=a.length-1,d=-1;if(a.length){switch(i){case"previous":l===0?d=0:l===-1?d=c:d=l-1;break;case"next":l>-1&&l<c&&(d=l+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:a[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,c=s.indexOf(a);a||(c=-1),i==="up"?l=c>0?c-1:s.length-1:i==="down"?l=(c+1)%s.length:i==="pageup"?(l=c-o,l<0&&(l=0)):i==="pagedown"?(l=c+o,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(su):ve(ve({},su),this.props.theme):su}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,l=this.getValue,c=this.selectOption,d=this.setValue,f=this.props,h=f.isMulti,p=f.isRtl,m=f.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:l,hasValue:g,isMulti:h,isRtl:p,options:m,selectOption:c,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return rm(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return im(this.props,i,o)}},{key:"filterOption",value:function(i,o){return om(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,l=i.inputValue,c=i.tabIndex,d=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),m=p.Input,g=this.state,v=g.inputIsHidden,I=g.ariaSelection,S=this.commonProps,x=s||this.getElementId("input"),w=ve(ve(ve({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(I==null?void 0:I.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?U.createElement(m,O({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:o,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:l},w)):U.createElement(jO,O({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:rs,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:d,value:""},w))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,l=o.MultiValueLabel,c=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,h=this.commonProps,p=this.props,m=p.controlShouldRenderValue,g=p.isDisabled,v=p.isMulti,I=p.inputValue,S=p.placeholder,x=this.state,w=x.selectValue,y=x.focusedValue,A=x.isFocused;if(!this.hasValue()||!m)return I?null:U.createElement(f,O({},h,{key:"placeholder",isDisabled:g,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),S);if(v)return w.map(function(_,D){var G=_===y,F="".concat(i.getOptionLabel(_),"-").concat(i.getOptionValue(_));return U.createElement(a,O({},h,{components:{Container:s,Label:l,Remove:c},isFocused:G,isDisabled:g,key:F,index:D,removeProps:{onClick:function(){return i.removeValue(_)},onTouchEnd:function(){return i.removeValue(_)},onMouseDown:function(W){W.preventDefault()}},data:_}),i.formatOptionLabel(_,"value"))});if(I)return null;var E=w[0];return U.createElement(d,O({},h,{data:E,isDisabled:g}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,c=s.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return U.createElement(o,O({},a,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,c=s.isLoading,d=this.state.isFocused;if(!o||!c)return null;var f={"aria-hidden":"true"};return U.createElement(o,O({},a,{innerProps:f,isDisabled:l,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return U.createElement(a,O({},s,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return U.createElement(o,O({},a,{innerProps:c,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,l=o.Menu,c=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,p=o.Option,m=this.commonProps,g=this.state.focusedOption,v=this.props,I=v.captureMenuScroll,S=v.inputValue,x=v.isLoading,w=v.loadingMessage,y=v.minMenuHeight,A=v.maxMenuHeight,E=v.menuIsOpen,_=v.menuPlacement,D=v.menuPosition,G=v.menuPortalTarget,F=v.menuShouldBlockScroll,T=v.menuShouldScrollIntoView,W=v.noOptionsMessage,Y=v.onMenuScrollToTop,j=v.onMenuScrollToBottom;if(!E)return null;var $=function(z,V){var ne=z.type,se=z.data,ae=z.isDisabled,X=z.isSelected,le=z.label,re=z.value,ge=g===se,Se=ae?void 0:function(){return i.onOptionHover(se)},Ve=ae?void 0:function(){return i.selectOption(se)},wt="".concat(i.getElementId("option"),"-").concat(V),lt={id:wt,onClick:Ve,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:X};return U.createElement(p,O({},m,{innerProps:lt,data:se,isDisabled:ae,isSelected:X,key:wt,label:le,type:ne,value:re,isFocused:ge,innerRef:ge?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(z.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(M){if(M.type==="group"){var z=M.data,V=M.options,ne=M.index,se="".concat(i.getElementId("group"),"-").concat(ne),ae="".concat(se,"-heading");return U.createElement(a,O({},m,{key:se,data:z,options:V,Heading:s,headingProps:{id:ae,data:M.data},label:i.formatGroupLabel(M.data)}),M.options.map(function(X){return $(X,"".concat(ne,"-").concat(X.index))}))}else if(M.type==="option")return $(M,"".concat(M.index))});else if(x){var H=w({inputValue:S});if(H===null)return null;B=U.createElement(f,m,H)}else{var Q=W({inputValue:S});if(Q===null)return null;B=U.createElement(h,m,Q)}var ee={minMenuHeight:y,maxMenuHeight:A,menuPlacement:_,menuPosition:D,menuShouldScrollIntoView:T},R=U.createElement(bD,O({},m,ee),function(M){var z=M.ref,V=M.placerProps,ne=V.placement,se=V.maxHeight;return U.createElement(l,O({},m,ee,{innerRef:z,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:x,placement:ne}),U.createElement(GO,{captureEnabled:I,onTopArrive:Y,onBottomArrive:j,lockEnabled:F},function(ae){return U.createElement(c,O({},m,{innerRef:function(le){i.getMenuListRef(le),ae(le)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:i.getElementId("listbox")},isLoading:x,maxHeight:se,focusedOption:g}),B)}))});return G||D==="fixed"?U.createElement(d,O({},m,{appendTo:G,controlElement:this.controlRef,menuPlacement:_,menuPosition:D}),R):R}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,l=o.isMulti,c=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!s)return U.createElement(QO,{name:c,onFocus:this.onValueInputFocus});if(!(!c||s))if(l)if(a){var h=f.map(function(g){return i.getOptionValue(g)}).join(a);return U.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,v){return U.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(g)})}):U.createElement("input",{name:c,type:"hidden",value:""});return U.createElement("div",null,p)}else{var m=f[0]?this.getOptionValue(f[0]):"";return U.createElement("input",{name:c,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,l=o.focusedValue,c=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return U.createElement(LO,O({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,c=this.props,d=c.className,f=c.id,h=c.isDisabled,p=c.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return U.createElement(s,O({},g,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),U.createElement(o,O({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p}),U.createElement(l,O({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),U.createElement(a,O({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,h=o.instancePrefix,p=i.options,m=i.value,g=i.menuIsOpen,v=i.inputValue,I=i.isMulti,S=is(m),x={};if(a&&(m!==a.value||p!==a.options||g!==a.menuIsOpen||v!==a.inputValue)){var w=g?cR(i,S):[],y=g?em(cs(i,S),"".concat(h,"-option")):[],A=s?uR(o,S):null,E=dR(o,w),_=lu(y,E);x={selectValue:S,focusedOption:E,focusedOptionId:_,focusableOptionsWithIds:y,focusedValue:A,clearFocusValueOnUpdate:!1}}var D=l!=null&&i!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},G=c,F=d&&f;return d&&!F&&(G={value:ao(I,S,S[0]||null),options:S,action:"initial-input-focus"},F=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(G=null),ve(ve(ve({},x),D),{},{prevProps:i,ariaSelection:G,prevWasFocused:F})}}]),n}(C.Component);sm.defaultProps=lR;var hR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function pR(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,a=o===void 0?null:o,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,p=e.value,m=Cn(e,hR),g=C.useState(s!==void 0?s:n),v=Vn(g,2),I=v[0],S=v[1],x=C.useState(l!==void 0?l:i),w=Vn(x,2),y=w[0],A=w[1],E=C.useState(p!==void 0?p:a),_=Vn(E,2),D=_[0],G=_[1],F=C.useCallback(function(H,Q){typeof c=="function"&&c(H,Q),G(H)},[c]),T=C.useCallback(function(H,Q){var ee;typeof d=="function"&&(ee=d(H,Q)),S(ee!==void 0?ee:H)},[d]),W=C.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),Y=C.useCallback(function(){typeof f=="function"&&f(),A(!1)},[f]),j=s!==void 0?s:I,$=l!==void 0?l:y,B=p!==void 0?p:D;return ve(ve({},m),{},{inputValue:j,menuIsOpen:$,onChange:F,onInputChange:T,onMenuClose:Y,onMenuOpen:W,value:B})}var gR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],lm=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return o===i||a===i},cu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return lm(t,o,i)})||r.some(function(o){return lm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function mR(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,a=o===void 0?cu.formatCreateLabel:o,s=e.isValidNewOption,l=s===void 0?cu.isValidNewOption:s,c=e.getNewOptionData,d=c===void 0?cu.getNewOptionData:c,f=e.onCreateOption,h=e.options,p=h===void 0?[]:h,m=e.onChange,g=Cn(e,gR),v=g.getOptionValue,I=v===void 0?qg:v,S=g.getOptionLabel,x=S===void 0?Qg:S,w=g.inputValue,y=g.isLoading,A=g.isMulti,E=g.value,_=g.name,D=C.useMemo(function(){return l(w,is(E),p,{getOptionValue:I,getOptionLabel:x})?d(w,a(w)):void 0},[a,d,x,I,w,l,p,E]),G=C.useMemo(function(){return(n||!y)&&D?i==="first"?[D].concat(ai(p)):[].concat(ai(p),[D]):p},[n,i,y,D,p]),F=C.useCallback(function(T,W){if(W.action!=="select-option")return m(T,W);var Y=Array.isArray(T)?T:[T];if(Y[Y.length-1]===D){if(f)f(w);else{var j=d(w,w),$={action:"create-option",name:_,option:j};m(ao(A,[].concat(ai(is(E)),[j]),j),$)}return}m(T,W)},[d,w,A,_,D,f,m,E]);return ve(ve({},g),{},{options:G,onChange:F})}var vR=C.forwardRef(function(e,t){var n=pR(e),r=mR(n);return U.createElement(sm,O({ref:t},r))}),cm=vR;const bR={control:(e,t)=>q(N({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px",fontFamily:'var(--joy-fontFamily-body, "Inter", var(--joy-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"));',"&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(N({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(N({},e),{minHeight:"36px"}),menu:e=>q(N({},e),{position:"relative"}),clearIndicator:e=>q(N({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(N({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(N({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(N({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>q(N({},e),{color:"#333"})},yR=e=>e.map(t=>({label:t,value:t})),xR=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=yR(e.flags),a=()=>i(!r),s=f=>{e.onChange(f.map(h=>h.value))},l=f=>{n(f)},c=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const p=[...e.flags,t];e.onChange(p)}if(e.flags&&e.flags.length>0&&d()){const p=[...e.flags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.flags.length&&e.flags.includes(t)?(a(),f):(f=!0,f)};return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{marginBottom:"16px"},children:u.jsx(cm,{styles:bR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:s,onInputChange:l,onKeyDown:c,placeholder:e.labels.flagsPlaceholder,value:o})}),u.jsx(at,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},lo=e=>{const[t,n]=C.useState(!1),[r,i]=C.useState(!1),[o,a]=C.useState(!1),[s,l]=C.useState(!1),[c,d]=C.useState(""),[f,h]=C.useState("primary"),[p,m]=C.useState(""),g=C.useRef(null),v=()=>{g.current&&g.current.click()},I=new Bp,S=ft(),x=()=>{d(""),i(!1)},w=W=>{let Y="",j="primary";switch(W){case"copy_url":Y=e.labels.urlCopiedToClipboardMessage,j="primary";break;case"image_deleted":Y=e.labels.imageDeletedMessage,j="primary";break;case"image_reset":Y=e.labels.imageResetMessage,j="primary";break;case"upload_success":Y=e.labels.uploadingImageMessage,j="success";break;case"upload_failed":Y=e.labels.uploadingImageErrorMessage,j="danger";break;case"sign_in_url_failed":Y=e.labels.generateSignedInUrlErrorMessage,j="danger";break;case"encrypting_file_failed":Y=e.labels.encryptingImageErrorMessage,j="danger";break}h(j),d(Y),i(!0)},y=()=>a(!o),A=()=>l(!s),E=()=>{e.clearImage(),w("image_deleted")},_=W=>{navigator.clipboard.writeText(W),w("copy_url")},D=W=>k(this,null,function*(){W.persist();const Y=W.target.files?W.target.files[0]:null;if(Y){n(!0);try{const j=Y.type.split("/")[1],$=yield I.readFileAndHash(Y),B=(yield I.generateHashFileName(Y))+"."+j,H={image_type:j,image_file_name:B,image_size:Y.size,base64_sum:$},Q=yield S==null?void 0:S.https.generateSignedInUrl(H);if(Q!=null&&Q.ok){const ee=yield Q.json(),R={"Content-Type":Y.type,"Content-MD5":$};try{const M=new File([Y],B,{type:Y.type}),z=yield S==null?void 0:S.https.storeInBucket(ee.data.signed_url,M,R);e.onChangeImages(z||""),m(z),w("upload_success")}catch(M){console.error("There was a problem with uploading the file: ",M),w("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield Q==null?void 0:Q.json()),w("sign_in_url_failed")}catch(j){console.error("There was a problem with encrypting file...",j),w("encrypting_file_failed")}n(!1)}}),G=W=>k(this,null,function*(){if(W){n(!0);try{const Y=W.type.split("/")[1],j=yield I.readFileAndHash(W),$=(yield I.generateHashFileName(W))+"."+Y,B={image_type:Y,image_file_name:$,image_size:W.size,base64_sum:j},H=yield S==null?void 0:S.https.generateSignedInUrl(B);if(H!=null&&H.ok){const Q=yield H.json(),ee={"Content-Type":W.type,"Content-MD5":j};try{const R=new File([W],$,{type:W.type}),M=yield S==null?void 0:S.https.storeInBucket(Q.data.signed_url,R,ee);e.onChangeImages(M||""),w("upload_success")}catch(R){console.error("There was a problem with uploading the file: ",R),w("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield H==null?void 0:H.json()),w("sign_in_url_failed")}catch(Y){console.error("There was a problem with encrypting file...",Y),w("encrypting_file_failed")}n(!1)}}),F=()=>{e.onChangeImages(p),w("image_reset")},T=W=>{e.onChangeImages(W),m(W)};return u.jsxs(u.Fragment,{children:[u.jsxs(b.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(b.Typography,{level:"title-lg",children:e.title}),u.jsx(b.Tooltip,{title:e.labels.clearImage,children:u.jsx(b.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:u.jsx(Sp,{})})})]}),u.jsxs(b.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(b.Skeleton,{loading:t,animation:"wave",children:[e.image?u.jsx(b.Box,{component:"img",src:e.image,loading:"lazy",alt:e.title,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):u.jsx(Pc,{sx:{fontSize:"3rem",opacity:.2}}),e.image?u.jsx(b.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:u.jsx(Np,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(b.Tooltip,{title:e.labels.copyUrl,children:u.jsx(b.Button,{onClick:()=>_(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Oe.ContentCopy,{})})}),u.jsx(b.Tooltip,{title:e.labels.viewImage,children:u.jsx(b.Button,{onClick:y,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(jp,{})})}),u.jsx(b.Tooltip,{title:e.labels.cropImage,children:u.jsx(b.Button,{onClick:A,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(ig,{})})})]}),u.jsx(b.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(b.Button,{sx:{width:"100%"},onClick:v,children:[u.jsx(Oe.Upload,{})," ",e.labels.uploadImage,u.jsx(zp,{type:"file",accept:"image/*",onChange:D,ref:g})]})}),S.https.sportal365Config?u.jsx(b.AccordionGroup,{variant:"soft",children:u.jsxs(b.Accordion,{children:[u.jsx(b.AccordionSummary,{children:u.jsx(b.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),u.jsx(b.AccordionDetails,{children:u.jsx(Fp,{labels:e.labels,onChangeImages:T})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(at,{showToast:r,message:c,color:f,hideToast:x}),u.jsx($p,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:y}),u.jsx(rg,{labels:e.labels,open:s,imageSrc:e.image,toggleModal:A,uploadImage:G,resetDefaultImageUrl:F})]})},CR=["cover","mobile"],wR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),IR=e=>e?N({},e):{main:"",mobile:"",cover:""},SR=e=>{const[t,n]=C.useState(!1),r=IR(e.defaultValue),i=wR(e.labels),o=(s,l)=>{r[l]=s,e.onChange(r)},a=s=>{r[s]="",e.onChange(r)};return u.jsxs(b.Box,{sx:{marginBottom:"10px"},children:[u.jsx(lo,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:s=>o(s,"main"),clearImage:()=>a("main")}),u.jsx(b.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(u.Fragment,{children:CR.map(s=>u.jsx(lo,{labels:e.labels,title:i.get(s),image:r[s],onChangeImages:l=>o(l,s),clearImage:()=>a(s)},`images-${s}`))}):u.jsx(u.Fragment,{})]})};function AR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const TR=["className","color","component","variant","invertedColors","slots","slotProps"],ER=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return ut(r,AR,{})},kR=be("div",{name:"JoySheet",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r;const i=(n=e.variants[t.variant])==null?void 0:n[t.color],{borderRadius:o,bgcolor:a,backgroundColor:s,background:l}=ac({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),c=tr(e,`palette.${a}`)||a||tr(e,`palette.${s}`)||s||l||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||e.vars.palette.background.surface;return[O({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":c==="transparent"?"initial":c,"--Sheet-background":c==="transparent"?"initial":c},o!==void 0&&{"--List-radius":`calc(${o} - var(--variant-borderWidth, 0px))`,"--unstable_actionRadius":`calc(${o} - var(--variant-borderWidth, 0px))`},{backgroundColor:e.vars.palette.background.surface,position:"relative"}),O({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&r_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&i_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),_R=U.forwardRef(function(t,n){const r=dt({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:s="plain",invertedColors:l=!1,slots:c={},slotProps:d={}}=r,f=Ae(r,TR),h=O({},r,{color:o,component:a,invertedColors:l,variant:s}),p=ER(h),m=O({},f,{component:a,slots:c,slotProps:d}),[g,v]=Ie("root",{ref:n,className:Bn(p.root,i),elementType:kR,externalForwardedProps:m,ownerState:h});return u.jsx(g,O({},v))});function PR(e){return it("MuiTypography",e)}Xe("MuiTypography",["root","h1","h2","h3","h4","title-lg","title-md","title-sm","body-lg","body-md","body-sm","body-xs","noWrap","gutterBottom","startDecorator","endDecorator","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const DR=["color","textColor"],OR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],uu=U.createContext(!1),RR=U.createContext(!1),LR=e=>{const{gutterBottom:t,noWrap:n,level:r,color:i,variant:o}=e,a={root:["root",r,t&&"gutterBottom",n&&"noWrap",i&&`color${ye(i)}`,o&&`variant${ye(o)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return ut(a,PR,{})},MR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),BR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),$R=be("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return O({"--Icon-fontSize":`calc(1em * ${s})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:O({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&O({display:"flex",alignItems:"center"},t.nesting&&O({display:"inline-flex"},t.startDecorator&&{verticalAlign:"bottom"})),t.level&&t.level!=="inherit"&&e.typography[t.level],{fontSize:`var(--Typography-fontSize, ${t.level&&t.level!=="inherit"&&(r=(i=e.typography[t.level])==null?void 0:i.fontSize)!=null?r:"inherit"})`},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.color&&{color:`var(--variant-plainColor, rgba(${(o=e.vars.palette[t.color])==null?void 0:o.mainChannel} / 1))`},t.variant&&O({borderRadius:e.vars.radius.xs,paddingBlock:"min(0.1em, 4px)",paddingInline:"0.25em"},!t.nesting&&{marginInline:"-0.25em"},(a=e.variants[t.variant])==null?void 0:a[t.color]))}),um={h1:"h1",h2:"h2",h3:"h3",h4:"h4","title-lg":"p","title-md":"p","title-sm":"p","body-lg":"p","body-md":"p","body-sm":"p","body-xs":"span",inherit:"p"},du=U.forwardRef(function(t,n){var r;const i=dt({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,s=Ae(i,DR),l=U.useContext(uu),c=U.useContext(RR),d=YA(O({},s,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:m="body-md",levelMapping:g=um,children:v,endDecorator:I,startDecorator:S,variant:x,slots:w={},slotProps:y={}}=d,A=Ae(d,OR),E=(r=t.color)!=null?r:x?o!=null?o:"neutral":o,_=l||c?t.level||"inherit":m,D=qf(v,["Skeleton"]),G=f||(l?"span":g[_]||um[_]||"span"),F=O({},d,{level:_,component:G,color:E,gutterBottom:h,noWrap:p,nesting:l,variant:x,unstable_hasSkeleton:D}),T=LR(F),W=O({},A,{component:G,slots:w,slotProps:y}),[Y,j]=Ie("root",{ref:n,className:T.root,elementType:$R,externalForwardedProps:W,ownerState:F}),[$,B]=Ie("startDecorator",{className:T.startDecorator,elementType:MR,externalForwardedProps:W,ownerState:F}),[H,Q]=Ie("endDecorator",{className:T.endDecorator,elementType:BR,externalForwardedProps:W,ownerState:F});return u.jsx(uu.Provider,{value:!0,children:u.jsxs(Y,O({},j,{children:[S&&u.jsx($,O({},B,{children:S})),D?U.cloneElement(v,{variant:v.props.variant||"inline"}):v,I&&u.jsx(H,O({},Q,{children:I}))]}))})});du.muiName="Typography";function NR(e){return it("MuiFormControl",e)}const dm=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),FR=Xe("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),jR=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],zR=e=>{const{disabled:t,error:n,size:r,color:i,orientation:o}=e,a={root:["root",o,t&&"disabled",n&&"error",i&&`color${ye(i)}`,r&&`size${ye(r)}`]};return ut(a,NR,{})},UR=be("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return O({"--unstable_RadioGroup-margin":"0.5rem 0","--FormLabel-alignSelf":t.orientation==="horizontal"?"align-items":"flex-start","--FormLabel-asteriskColor":e.vars.palette.danger[500]},t.size==="sm"&&{"--FormLabel-fontSize":e.vars.fontSize.xs,"--FormLabel-lineHeight":e.vars.lineHeight.xl,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.5rem 0 0":"0 0 0.25rem 0","--FormHelperText-fontSize":e.vars.fontSize.xs,"--FormHelperText-lineHeight":e.vars.lineHeight.xl},t.size==="md"&&{"--FormLabel-fontSize":e.vars.fontSize.sm,"--FormLabel-lineHeight":e.vars.lineHeight.sm,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.75rem 0 0":"0 0 0.375rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.size==="lg"&&{"--FormLabel-fontSize":e.vars.fontSize.md,"--FormLabel-lineHeight":e.vars.lineHeight.md,"--FormLabel-margin":t.orientation==="horizontal"?"0 1rem 0 0":"0 0 0.5rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.color&&{"--FormHelperText-color":(n=e.vars.palette[t.color])==null?void 0:n[500]},{"--FormHelperText-margin":"0.375rem 0 0 0",[`&.${dm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${dm.disabled}`]:{"--FormLabel-color":(r=e.variants.plainDisabled)==null||(r=r[t.color||"neutral"])==null?void 0:r.color,"--FormHelperText-color":(i=e.variants.plainDisabled)==null||(i=i[t.color||"neutral"])==null?void 0:i.color},display:"flex",position:"relative",flexDirection:t.orientation==="horizontal"?"row":"column"},t.orientation==="horizontal"&&{[`& > label ~ .${FR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),fu=U.forwardRef(function(t,n){const r=dt({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:s=!1,required:l=!1,error:c=!1,color:d,size:f="md",orientation:h="vertical",slots:p={},slotProps:m={}}=r,g=Ae(r,jR),v=Vi(i),[I,S]=U.useState(null),x=O({},r,{id:v,component:a,color:d,disabled:s,error:c,required:l,size:f,orientation:h});let w;const y=zR(x),[A,E]=Ie("root",{ref:n,className:Bn(y.root,o),elementType:UR,externalForwardedProps:O({},g,{component:a,slots:p,slotProps:m}),ownerState:x}),_=U.useMemo(()=>({disabled:s,required:l,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":I?`${v}-helper-text`:void 0,setHelperText:S,registerEffect:w}),[d,s,c,I,v,w,l,f]);return u.jsx(Ha.Provider,{value:_,children:u.jsx(A,O({},E))})});function VR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const HR=["children","component","htmlFor","id","slots","slotProps"],WR=()=>ut({root:["root"],asterisk:["asterisk"]},VR,{}),GR=be("label",{name:"JoyFormLabel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({"--Icon-fontSize":"calc(var(--FormLabel-lineHeight) * 1em)",WebkitTapHighlightColor:"transparent",alignSelf:"var(--FormLabel-alignSelf)",display:"flex",gap:"2px",alignItems:"center",flexWrap:"wrap",userSelect:"none",fontFamily:e.vars.fontFamily.body,fontSize:`var(--FormLabel-fontSize, ${e.vars.fontSize.sm})`,fontWeight:e.vars.fontWeight.md,lineHeight:`var(--FormLabel-lineHeight, ${e.vars.lineHeight.sm})`,color:`var(--FormLabel-color, ${e.vars.palette.text.primary})`,margin:"var(--FormLabel-margin, 0px)"})),YR=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),hu=U.forwardRef(function(t,n){var r,i;const o=dt({props:t,name:"JoyFormLabel"}),{children:a,component:s="label",htmlFor:l,id:c,slots:d={},slotProps:f={}}=o,h=Ae(o,HR),p=U.useContext(Ha),m=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,g=O({},o,{required:m}),v=WR(),I=O({},h,{component:s,slots:d,slotProps:f}),[S,x]=Ie("root",{additionalProps:{htmlFor:l!=null?l:p==null?void 0:p.htmlFor,id:c!=null?c:p==null?void 0:p.labelId},ref:n,className:v.root,elementType:GR,externalForwardedProps:I,ownerState:g}),[w,y]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:YR,externalForwardedProps:I,ownerState:g});return u.jsxs(S,O({},x,{children:[a,m&&u.jsxs(w,O({},y,{children:[" ","*"]}))]}))}),KR=({environment:e,userNotFound:t})=>{const[n,r]=C.useState(""),[i,o]=C.useState(""),[a,s]=C.useState(!1),l=()=>{s(!a)},c=h=>{h.persist(),r(h.target.value)},d=h=>{h.persist(),o(h.target.value)},f=()=>k(this,null,function*(){try{yield Ui(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),l()}});return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:u.jsxs(_R,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[u.jsxs("div",{children:[u.jsx(du,{level:"h4",component:"h1",children:u.jsx("b",{children:"Sign in"})}),u.jsx(du,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),u.jsxs(fu,{children:[u.jsx(hu,{children:"Email"}),u.jsx(Wa,{name:"email",type:"email",onChange:c})]}),u.jsxs(fu,{children:[u.jsx(hu,{children:"Password"}),u.jsx(Wa,{name:"password",type:"password",onChange:d})]}),u.jsx(ti,{sx:{mt:1},onClick:f,children:"Log in"})]})}),u.jsx(at,{showToast:a,message:t,color:"danger",hideToast:l})]})};function QR(e){return it("MuiCheckbox",e)}const li=Xe("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),qR=cc(u.jsx("path",{d:"M9 16.17 5.53 12.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L9 16.17z"}),"Check"),JR=cc(u.jsx("path",{d:"M19 13H5c-.55 0-1-.45-1-1s.45-1 1-1h14c.55 0 1 .45 1 1s-.45 1-1 1z"}),"HorizontalRule"),XR=["checked","uncheckedIcon","checkedIcon","label","defaultChecked","disabled","disableIcon","overlay","id","indeterminate","indeterminateIcon","name","onBlur","onChange","onFocus","onFocusVisible","readOnly","required","value","color","variant","size","component","slots","slotProps"],ZR=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:s,indeterminate:l}=e,c={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${ye(a)}`,o&&`color${ye(o)}`,s&&`size${ye(s)}`],checkbox:["checkbox",t&&"checked",l&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return ut(c,QR,{})},eL=be("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return O({"--Icon-fontSize":"var(--Checkbox-size)"},e.size==="sm"&&{"--Checkbox-size":"1rem","& ~ *":{"--FormHelperText-margin":"0 0 0 1.5rem"},fontSize:t.vars.fontSize.sm,gap:"var(--Checkbox-gap, 0.5rem)"},e.size==="md"&&{"--Checkbox-size":"1.25rem","& ~ *":{"--FormHelperText-margin":"0.25rem 0 0 1.875rem"},fontSize:t.vars.fontSize.md,gap:"var(--Checkbox-gap, 0.625rem)"},e.size==="lg"&&{"--Checkbox-size":"1.5rem","& ~ *":{"--FormHelperText-margin":"0.375rem 0 0 2.25rem"},fontSize:t.vars.fontSize.lg,gap:"var(--Checkbox-gap, 0.75rem)"},{position:e.overlay?"initial":"relative",display:"inline-flex",fontFamily:t.vars.fontFamily.body,lineHeight:"var(--Checkbox-size)",color:t.vars.palette.text.primary,[`&.${li.disabled}`]:{color:(n=t.variants.plainDisabled)==null||(n=n[e.color])==null?void 0:n.color}},e.disableIcon&&{color:(r=t.variants[e.variant])==null||(r=r[e.color])==null?void 0:r.color,[`&.${li.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),tL=be("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[O({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,boxSizing:"border-box",borderRadius:`min(${e.vars.radius.sm}, 0.25rem)`,width:"var(--Checkbox-size)",height:"var(--Checkbox-size)",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0},t.disableIcon&&{display:"contents"},{[`&.${li.checked}, &.${li.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[O({},s,{backgroundColor:(r=s==null?void 0:s.backgroundColor)!=null?r:e.vars.palette.background.surface}),{"&:hover":{"@media (hover: hover)":(i=e.variants[`${t.variant}Hover`])==null?void 0:i[t.color]}},{"&:active":(o=e.variants[`${t.variant}Active`])==null?void 0:o[t.color]},{[`&.${li.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),nL=be("span",{name:"JoyCheckbox",slot:"Action",overridesResolver:(e,t)=>t.action})(({theme:e,ownerState:t})=>{var n,r,i,o;return[{borderRadius:`var(--Checkbox-actionRadius, ${t.overlay?"var(--unstable_actionRadius, inherit)":"inherit"})`,textAlign:"left",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))",bottom:"calc(-1 * var(--variant-borderWidth, 0px))",right:"calc(-1 * var(--variant-borderWidth, 0px))",zIndex:1,[e.focus.selector]:e.focus.default},...t.disableIcon?[(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},{"&:active":(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]},{[`&.${li.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),rL=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),iL=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>O({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),oL=u.jsx(qR,{}),aL=u.jsx(JR,{}),sL=U.forwardRef(function(t,n){var r,i,o,a,s;const l=dt({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=oL,label:h,defaultChecked:p,disabled:m,disableIcon:g=!1,overlay:v,id:I,indeterminate:S=!1,indeterminateIcon:x=aL,name:w,onBlur:y,onChange:A,onFocus:E,onFocusVisible:_,readOnly:D,required:G,value:F,color:T,variant:W,size:Y="md",component:j,slots:$={},slotProps:B={}}=l,H=Ae(l,XR),Q=U.useContext(Ha),ee=(r=(i=t.disabled)!=null?i:Q==null?void 0:Q.disabled)!=null?r:m,R=(o=(a=t.size)!=null?a:Q==null?void 0:Q.size)!=null?o:Y,M=Vi(I!=null?I:Q==null?void 0:Q.htmlFor),z={checked:c,defaultChecked:p,disabled:ee,onBlur:y,onChange:A,onFocus:E,onFocusVisible:_},{getInputProps:V,checked:ne,disabled:se,focusVisible:ae}=$S(z),X=ne||S,ge=X?W||"solid":W||"outlined",Se=t.color||(Q!=null&&Q.error?"danger":(s=Q==null?void 0:Q.color)!=null?s:T),lt=O({},l,{checked:ne,disabled:se,disableIcon:g,overlay:v,focusVisible:ae,color:X?Se||"primary":Se||"neutral",variant:ge,size:R}),_t=ZR(lt),de=O({},H,{component:j,slots:$,slotProps:B}),[he,xe]=Ie("root",{ref:n,className:_t.root,elementType:eL,externalForwardedProps:de,ownerState:lt}),[Te,He]=Ie("checkbox",{className:_t.checkbox,elementType:tL,externalForwardedProps:de,ownerState:lt}),[Pe,Ee]=Ie("action",{className:_t.action,elementType:nL,externalForwardedProps:de,ownerState:lt}),[It,St]=Ie("input",{additionalProps:O({id:M,name:w,value:F,readOnly:D,role:void 0,required:G!=null?G:Q==null?void 0:Q.required,"aria-describedby":Q==null?void 0:Q["aria-describedby"]},S&&{"aria-checked":"mixed"}),className:_t.input,elementType:rL,externalForwardedProps:de,getSlotProps:V,ownerState:lt}),[zt,Lt]=Ie("label",{additionalProps:{htmlFor:M},className:_t.label,elementType:iL,externalForwardedProps:de,ownerState:lt});let Qt=d;return g?Qt=null:S?Qt=x:ne&&(Qt=f),u.jsxs(he,O({},xe,{children:[u.jsxs(Te,O({},He,{children:[u.jsx(Pe,O({},Ee,{children:u.jsx(It,O({},St))})),Qt]})),h&&u.jsx(uu.Provider,{value:!0,children:u.jsx(zt,O({},Lt,{children:h}))})]}))}),lL=Ue(u.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),Ir=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:s})=>{const l=(c,d)=>{c.persist();let f=[...t];if(c.target.checked){f.push(d),a(f);return}f=t.filter(h=>h!==d),a(f)};return u.jsxs(b.Box,{sx:{mb:2},children:[u.jsx(b.Typography,{level:"body-sm",mb:1,children:e}),u.jsxs(U1,{orientation:"horizontal",wrap:!0,sx:{columnGap:"12px","--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(c=>u.jsxs(Fh,{children:[t.includes(c)&&u.jsx(lL,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(sL,{checked:t.includes(c),variant:t.includes(c)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[c]||"N/A",onChange:d=>l(d,c),slotProps:{action:({checked:d})=>({sx:d?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${c}`)),i===!1?u.jsx(Fh,{children:u.jsx(b.Link,{onClick:s,children:o})}):u.jsx(u.Fragment,{})]})]})},ci={popular:["FT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","CORRECT_SCORE","OVER_CORNERS_9_5"],playerRelated:["PLAYER_YELLOW_CARD","PLAYER_RED_CARD","PLAYER_SCORE","PLAYER_SCORE_FIRST_GOAL","PLAYER_SCORE_TWICE","PLAYER_SCORE_HATTRICK"],goals:["OVER_GOALS_0_5","OVER_GOALS_1_5","OVER_GOALS_2_5","OVER_GOALS_3_5","OVER_GOALS_4_5","OVER_GOALS_5_5","OVER_GOALS_6_5"],corners:["CORNERS_MATCH","OVER_CORNERS_6_5","OVER_CORNERS_7_5","OVER_CORNERS_8_5","OVER_CORNERS_9_5","OVER_CORNERS_10_5","OVER_CORNERS_11_5","OVER_CORNERS_12_5","OVER_CORNERS_13_5"],correctScores:["CORRECT_SCORE","CORRECT_SCORE_HT","CORRECT_SCORE_ADVANCED"],misc:["FT_1X2","HT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","HT_FT","RED_CARD_MATCH","PENALTY_MATCH"]},cL=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=C.useState(!1);return u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e.marketSelection}),u.jsx(b.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),u.jsx(Ir,{label:"Popular",values:t,allValues:ci.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?u.jsxs(u.Fragment,{children:[u.jsx(Ir,{label:e.playerRelated,values:t,allValues:ci.playerRelated,valuesMap:n,onChange:r}),u.jsx(Ir,{label:e.goals,values:t,allValues:ci.goals,valuesMap:n,onChange:r}),u.jsx(Ir,{label:e.corners,values:t,allValues:ci.corners,valuesMap:n,onChange:r}),u.jsx(Ir,{label:e.correctScores,values:t,allValues:ci.correctScores,valuesMap:n,onChange:r}),u.jsx(Ir,{label:e.misc,values:t,allValues:ci.misc,valuesMap:n,onChange:r})]}):u.jsx(u.Fragment,{})]})},st={avatar:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMA+h6XBeOBCz4ozafvc/W9X+nD29ROsWmINjBVRxC4F3uPnhL6/TMAAAygSURBVHja7N0JkqJAEIXhAsEFEEVs9z3vf8eZmI6J3mxFZamq/L8zaC2ZrxKjTzTaLfu9xWweZ7n8FeRFmRwuq+XbZmDgs2gzPR9iuaGYpOl4yO/AQ+G0lwRSUXJ+40fgkXCaxvKgYDIeGXhgvZrLk8rVxsBp63MsLyn7rAPOCvul1GB+Cg2cE20nUpvDNjJwybpXSK2KPsu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HRTl7aIhuACGGWSFVzBMpCNaP8HghdxAgTn+WyJBWCggj0aNwU3ICgZlBo/lEop/CgCB/XreFIqn7Sgcf6tauWBYyRAM1RA63O7XH7Kp63zhhuBwgWIhI5zA8LBLsXL3KOZQJ7JCk+g+q3m5gQKB+Q3u1DH23r6RWtqngy4EAMeaRhaaBAB7o8bQw3AhrPa1ITMQCDzlBgoA0RhSMq0IXjceFUwB740ZQw/GzOwzAGU3UvwYZgIT+PshAHQE6z9gZs+x/qAaLxxABhiF34poA6wuWI9tb++NpsL4+40hta8Z56DppCi5geJiYu8nIMDLAUp7IBxvX9NrdHQFdVhbsI51ZnswkliODLAMw0Ibr3aSHMhLKEg1IgdQHCYo6kQItN2vVCYo6kUEBalCBAWpQgQFqUIEBalCDqGg9xrqQQi03Z9pICjqRQQFqUIEBalCBAWpQgQFqUIItN1f+TlCUNSJCApShQgKUoUIClKFCApShRxCQR+grQch0HZ/OZCgqBcRFKQKERSkChEUJBKJRCKRHOh7LktbCRuu/n0AAAAASUVORK5CYII="},uL=({match:e,timeFormat:t})=>{var n,r,i,o;return u.jsxs(b.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[u.jsxs(b.Typography,{mr:1,children:["[",kt(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?u.jsx(b.Tooltip,{title:e.homeTeam.name,children:u.jsxs(b.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[u.jsx(b.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(b.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||st.team,sx:{width:"20px",height:"20px"}})]})}):u.jsxs(u.Fragment,{children:[u.jsx(b.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(b.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||st.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?u.jsx(b.Tooltip,{title:e.awayTeam.name,children:u.jsxs(b.Box,{display:"flex",gap:.5,alignItems:"center",children:[u.jsx(b.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||st.team,sx:{width:"20px",height:"20px"}})," ",u.jsx(b.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):u.jsxs(u.Fragment,{children:[u.jsx(b.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||st.team,sx:{width:"20px",height:"20px"}}),u.jsx(b.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},fm=Ue(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),dL=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),{sdk:s}=ft(),l=()=>k(this,null,function*(){try{const h=yield s.topX.getGames({limit:50},!0),p=yield s.matchQuiz.getGames({limit:50},!0),m=[...h.data,...p.data];if(e.related&&e.related.length>0){const g=m.filter(v=>{var I;return(I=e.related)==null?void 0:I.some(S=>S.entity_id===v.id)}).map(v=>v.id);n(g)}i(m)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"GAME",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return C.useEffect(()=>{l()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e.label}),u.jsx(b.Select,{multiple:!0,indicator:u.jsx(fm,{}),defaultValue:t,renderValue:f=>u.jsx(b.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(b.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${b.selectClasses.indicator}`]:{transition:"0.2s",[`&.${b.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(b.Option,{value:f.id,children:f.title?f.title+` (${f.type})`:`Game with no title (${f.type}). ID: ${f.id}`},`related-game-title-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(at,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},fL=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),{sdk:s}=ft(),l=()=>k(this,null,function*(){try{const h=yield s.loyalty.getTemplates(void 0,!0);if(e.related&&e.related.length>0){const p=h.data.filter(m=>{var g;return(g=e.related)==null?void 0:g.some(v=>v.entity_id===m.id)}).map(m=>m.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"TEMPLATE",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return C.useEffect(()=>{l()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e.label}),u.jsx(b.Select,{multiple:!0,indicator:u.jsx(fm,{}),defaultValue:t,renderValue:f=>u.jsx(b.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(b.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${b.selectClasses.indicator}`]:{transition:"0.2s",[`&.${b.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(b.Option,{value:f.id,children:f.name||`Template with no name. ID: ${f.id}`},`related-template-name-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(at,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},hm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),pm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),hL=e=>{const t=(n,r)=>{if(r==="games"){const i=pm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=hm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(dL,{label:e.labels.games,related:hm(e.related),onChange:n=>t(n,"games")}),u.jsx(fL,{label:e.labels.templates,related:pm(e.related),onChange:n=>t(n,"templates")})]})},pL=(e,t)=>{const[n,r]=C.useState(null),{https:i}=ft(),o=()=>k(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const s=yield a.json();r(s.data);return}r([])});return C.useEffect(()=>(o(),()=>r(null)),[e,t]),n},ds=({my:e})=>u.jsx(b.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:u.jsx(b.CircularProgress,{variant:"solid",color:"neutral"})}),gL=["PENDING","LIVE","SETTLED"],mL=["OPEN"],vL=["ACTIVE","INACTIVE","EXPIRED"],bL=new Map().set("PENDING","Pending").set("LIVE","Live").set("SETTLED","Settled").set("CANCELED","Canceled").set("OPEN","Open").set("ACTIVE","Active").set("INACTIVE","Inactive").set("PENDING","Pending").set("EXPIRED","Expired"),gm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(vL):e.entityType==="TEMPLATE"?t=Array.from(gL):t=Array.from(mL),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(b.Option,{value:n,children:bL.get(n)},`${e.entityType}-${n}-status`))})};class yL{constructor(){te(this,"name","");te(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});te(this,"trigger",{trigger_type:"DATETIME",date:""})}}const xL=Ue(u.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded"),CL=e=>{const[t,n]=C.useState(!1),{https:r}=ft(),i=o=>k(this,null,function*(){if(o.stopPropagation(),n(!0),(yield r.deleteScheduledTask(e.taskId)).ok){n(!1),e.toggleToast("success",e.labels.deleteScheduledTaskMessage),e.refetchTasks(),e.toggleModal();return}n(!1),e.toggleToast("danger",e.labels.deleteScheduledTaskErrorMessage)});return u.jsx(u.Fragment,{children:u.jsx(b.Modal,{open:e.isOpen,onClose:e.toggleModal,children:u.jsxs(b.ModalDialog,{children:[u.jsxs(b.DialogTitle,{children:[u.jsx(xL,{}),e.labels.deleteScheduledTaskModalTitle]}),u.jsx(b.Divider,{}),u.jsx(b.DialogContent,{children:u.jsxs(b.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,u.jsx(b.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),u.jsxs(b.DialogActions,{children:[u.jsx(b.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),u.jsx(b.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},wL=e=>{const[t,n]=C.useState(null),[r,i]=C.useState(""),[o,a]=C.useState(""),[s,l]=C.useState(""),[c,d]=C.useState(""),[f,h]=C.useState(!1),[p,m]=C.useState(!1),[g,v]=C.useState(!1),[I,S]=C.useState("success"),[x,w]=C.useState(""),[y,A]=C.useState(!1),E=C.useRef(!1),_=pL(e.entityId,E.current),{https:D}=ft();if(!_)return u.jsx(ds,{my:10});const G=()=>A(!y),F=(B,H)=>{v(!0),S(B),w(H)},T=(B,H)=>{i(H.scheduled_task_config.change.status),l(H.trigger.date),n(B)},W=()=>k(this,null,function*(){h(!0);const B=$("CREATE","");if((yield D.setSchedulers(B,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,F("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),F("danger",e.labels.createScheduledTaskErrorMessage)}),Y=(B,H)=>k(this,null,function*(){m(!0);const Q=$("UPDATE",H);if((yield D.setSchedulers(Q,"UPDATE",B)).ok){m(!1),n(null),i(""),l(""),E.current=!E.current,F("success",e.labels.updateScheduledTaskMessage);return}m(!1),F("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),l("")}),j=()=>{E.current=!E.current},$=(B,H)=>{const Q=new yL,ee=B==="CREATE"?o:r,R=B==="CREATE"?null:H,M=B==="CREATE"?c:s;return Q.scheduled_task_config.entity_id=e.entityId,Q.scheduled_task_config.entity_type=e.entityType,Q.scheduled_task_config.change.status=ee,Q.trigger.date=M,Q.name=R,Q};return u.jsxs(u.Fragment,{children:[_.map((B,H)=>u.jsx(b.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(b.CardContent,{children:t===H?u.jsxs(b.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[u.jsxs(b.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(b.Select,{value:r,size:"sm",name:"status",onChange:(Q,ee)=>i(ee),sx:{minHeight:"36px"},children:u.jsx(gm,{entityType:e.entityType})})]}),u.jsxs(b.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Qc,{defaultDate:s,onChange:Q=>l(Q)})]}),r&&s?u.jsx(b.Button,{onClick:()=>Y(B.id,B.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):u.jsx(b.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):u.jsxs(b.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[u.jsxs(b.Box,{children:[u.jsxs(b.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",u.jsx(b.Typography,{whiteSpace:"wrap",children:B.name})]}),u.jsxs(b.Typography,{style:{color:"gray"},children:[e.labels.status,": ",u.jsx(b.Typography,{whiteSpace:"wrap",children:B.status})]})]}),!e.readOnly&&u.jsxs(b.Box,{children:[u.jsx(b.Tooltip,{title:e.labels.edit,children:u.jsx(b.IconButton,{onClick:()=>T(H,B),children:u.jsx(Oe.Edit,{})})}),u.jsx(b.Tooltip,{title:e.labels.delete,children:u.jsx(b.IconButton,{onClick:G,children:u.jsx(Oe.Delete,{})})})]}),u.jsx(CL,{labels:e.labels,isOpen:y,taskId:B.id,taskName:B.name,toggleModal:G,refetchTasks:j,toggleToast:F})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${B.id}`)),!e.readOnly&&u.jsxs(b.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:_&&_.length?2:0},children:[u.jsxs(b.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(b.Select,{value:o,size:"sm",name:"status",onChange:(B,H)=>a(H),sx:{minHeight:"37px"},children:u.jsx(gm,{entityType:e.entityType})})]}),u.jsxs(b.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Qc,{defaultDate:c,onChange:B=>d(B)})]}),o&&c?u.jsx(b.Button,{onClick:W,loading:f,sx:{mt:"auto"},children:e.labels.create}):u.jsx(b.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),u.jsx(at,{showToast:g,message:x,color:I,hideToast:()=>v(!1)})]})};function IL(e){return it("MuiIconButton",e)}Xe("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const SL=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],AL=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:s}=e,l={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${ye(a)}`,t&&`color${ye(t)}`,o&&`size${ye(o)}`,s&&"loading"],loadingIndicator:["loadingIndicator"]},c=ut(l,IL,{});return r&&i&&(c.root+=` ${i}`),c},TL=be("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[O({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.instanceSize&&{"--IconButton-size":{sm:"2rem",md:"2.25rem",lg:"2.75rem"}[t.instanceSize]},t.size==="sm"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2rem) / 1.6)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2rem)",minHeight:"var(--IconButton-size, 2rem)",fontSize:e.vars.fontSize.sm,paddingInline:"2px"},t.size==="md"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.25rem) / 1.5)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2.25rem)",minHeight:"var(--IconButton-size, 2.25rem)",fontSize:e.vars.fontSize.md,paddingInline:"0.25rem"},t.size==="lg"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.75rem) / 1.571)","--CircularProgress-size":"28px","--CircularProgress-thickness":"4px",minWidth:"var(--IconButton-size, 2.75rem)",minHeight:"var(--IconButton-size, 2.75rem)",fontSize:e.vars.fontSize.lg,paddingInline:"0.375rem"},{WebkitTapHighlightColor:"transparent",paddingBlock:0,fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,margin:"var(--IconButton-margin)",borderRadius:`var(--IconButton-radius, ${e.vars.radius.sm})`,border:"none",boxSizing:"border-box",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",[e.focus.selector]:O({"--Icon-color":"currentColor"},e.focus.default)}),O({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":O({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':O({"--Icon-color":"currentColor"},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]),"&:disabled":(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]})]}),EL=be(TL,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),kL=be("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return O({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),mm=U.forwardRef(function(t,n){var r;const i=dt({props:t,name:"JoyIconButton"}),{children:o,action:a,component:s="button",color:l="neutral",disabled:c,variant:d="plain",loading:f=!1,loadingIndicator:h,size:p="md",slots:m={},slotProps:g={}}=i,v=Ae(i,SL),I=U.useContext(kp),S=U.useContext(_p),x=t.variant||I.variant||d,w=t.size||I.size||p,y=t.color||I.color||l,A=(r=t.loading||t.disabled)!=null?r:I.disabled||f||c,E=U.useRef(null),_=sn(E,n),{focusVisible:D,setFocusVisible:G,getRootProps:F}=jl(O({},i,{disabled:A,rootRef:_})),T=h!=null?h:u.jsx(Tp,{color:y,thickness:{sm:2,md:3,lg:4}[w]||3});U.useImperativeHandle(a,()=>({focusVisible:()=>{var M;G(!0),(M=E.current)==null||M.focus()}}),[G]);const W=O({},i,{component:s,color:y,disabled:A,variant:x,loading:f,size:w,focusVisible:D,instanceSize:t.size}),Y=AL(W),j=M=>{var z;let V=i.onClick;if(typeof g.root=="function"?V=g.root(W).onClick:g.root&&(V=g.root.onClick),(z=V)==null||z(M),S){var ne;(ne=S.onClick)==null||ne.call(S,M,i.value)}};let $=i["aria-pressed"];typeof g.root=="function"?$=g.root(W)["aria-pressed"]:g.root&&($=g.root["aria-pressed"]),S!=null&&S.value&&(Array.isArray(S.value)?$=S.value.indexOf(i.value)!==-1:$=S.value===i.value);const B=O({},v,{component:s,slots:m,slotProps:g}),[H,Q]=Ie("root",{ref:n,className:Y.root,elementType:EL,getSlotProps:F,externalForwardedProps:B,ownerState:W,additionalProps:{onClick:j,"aria-pressed":$}}),[ee,R]=Ie("loadingIndicator",{className:Y.loadingIndicator,elementType:kL,externalForwardedProps:B,ownerState:W});return u.jsx(H,O({},Q,{children:f?u.jsx(ee,O({},R,{children:T})):o}))});mm.muiName="IconButton";const vm=Ue(u.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),_L=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(l){var c,d;return l?u.jsxs(u.Fragment,{children:[u.jsx(b.ListItemDecorator,{children:u.jsx(b.Avatar,{size:"sm",src:((d=(c=n.find(f=>f.id===l.value))==null?void 0:c.assets)==null?void 0:d.logo)||st.competition})}),l.label]}):null}const a=C.useRef(null),s=(l,c)=>{i(c)};return u.jsxs(b.FormControl,{sx:{mb:1},children:[u.jsx(b.FormLabel,{required:r,color:"primary",children:e}),u.jsx(b.Select,q(N({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:s},t&&{endDecorator:u.jsx(mm,{variant:"plain",color:"neutral",onMouseDown:l=>{l.stopPropagation()},onClick:()=>{var l;i(""),(l=a.current)==null||l.focusVisible()},sx:{width:"18px",height:"18px"},children:u.jsx(vm,{})}),indicator:null}),{children:n.map((l,c)=>{var d;return u.jsxs(C.Fragment,{children:[c!==0?u.jsx(b.ListDivider,{role:"none"}):null,u.jsxs(b.Option,{value:l.id,label:l.name,children:[u.jsx(b.ListItemDecorator,{children:u.jsx(b.Avatar,{size:"sm",src:((d=l.assets)==null?void 0:d.logo)||st.competition})}),l.name]})]},`${l.id}-${c}`)})}))]})};function PL(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bm=PL,DL=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,OL=DL,RL=OL,LL=typeof self=="object"&&self&&self.Object===Object&&self,ML=RL||LL||Function("return this")(),ym=ML,BL=ym,$L=function(){return BL.Date.now()},NL=$L,FL=/\s/;function jL(e){for(var t=e.length;t--&&FL.test(e.charAt(t)););return t}var zL=jL,UL=zL,VL=/^\s+/;function HL(e){return e&&e.slice(0,UL(e)+1).replace(VL,"")}var WL=HL,GL=ym,YL=GL.Symbol,pu=YL,xm=pu,Cm=Object.prototype,KL=Cm.hasOwnProperty,QL=Cm.toString,co=xm?xm.toStringTag:void 0;function qL(e){var t=KL.call(e,co),n=e[co];try{e[co]=void 0;var r=!0}catch(o){}var i=QL.call(e);return r&&(t?e[co]=n:delete e[co]),i}var JL=qL,XL=Object.prototype,ZL=XL.toString;function eM(e){return ZL.call(e)}var tM=eM,wm=pu,nM=JL,rM=tM,iM="[object Null]",oM="[object Undefined]",Im=wm?wm.toStringTag:void 0;function aM(e){return e==null?e===void 0?oM:iM:Im&&Im in Object(e)?nM(e):rM(e)}var sM=aM;function lM(e){return e!=null&&typeof e=="object"}var cM=lM,uM=sM,dM=cM,fM="[object Symbol]";function hM(e){return typeof e=="symbol"||dM(e)&&uM(e)==fM}var Sm=hM,pM=WL,Am=bm,gM=Sm,Tm=NaN,mM=/^[-+]0x[0-9a-f]+$/i,vM=/^0b[01]+$/i,bM=/^0o[0-7]+$/i,yM=parseInt;function xM(e){if(typeof e=="number")return e;if(gM(e))return Tm;if(Am(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Am(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pM(e);var n=vM.test(e);return n||bM.test(e)?yM(e.slice(2),n?2:8):mM.test(e)?Tm:+e}var CM=xM,wM=bm,gu=NL,Em=CM,IM="Expected a function",SM=Math.max,AM=Math.min;function TM(e,t,n){var r,i,o,a,s,l,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(IM);t=Em(t)||0,wM(n)&&(d=!!n.leading,f="maxWait"in n,o=f?SM(Em(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(A){var E=r,_=i;return r=i=void 0,c=A,a=e.apply(_,E),a}function m(A){return c=A,s=setTimeout(I,t),d?p(A):a}function g(A){var E=A-l,_=A-c,D=t-E;return f?AM(D,o-_):D}function v(A){var E=A-l,_=A-c;return l===void 0||E>=t||E<0||f&&_>=o}function I(){var A=gu();if(v(A))return S(A);s=setTimeout(I,g(A))}function S(A){return s=void 0,h&&r?p(A):(r=i=void 0,a)}function x(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function w(){return s===void 0?a:S(gu())}function y(){var A=gu(),E=v(A);if(r=arguments,i=this,l=A,E){if(s===void 0)return m(l);if(f)return clearTimeout(s),s=setTimeout(I,t),p(l)}return s===void 0&&(s=setTimeout(I,t)),a}return y.cancel=x,y.flush=w,y}var EM=TM;const Sr=fn(EM),wn=({option:e})=>u.jsxs(b.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(b.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),u.jsx(b.Typography,{children:e.label}),u.jsx(b.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),km=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||st.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||st.flag}}))||[],kM=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=C.useState([]),[s,l]=C.useState([]),[c,d]=C.useState(!1),[f,h]=C.useState(""),[p,m]=C.useState(!1),{sdk:g}=ft(),v=()=>m(!p),I=(y,A)=>{a(A),i(A[0]?[A[0].id]:[])},S=3;C.useEffect(()=>{!f&&n&&n.length&&g.football.getCompetitions({competitionIds:n}).then(y=>{a(km(y))}).catch(y=>{console.error(y),v(),a([])})},[]);const x=C.useMemo(()=>Sr(y=>{d(!0),g.football.getCompetitions({name:y}).then(A=>{l([...km(A)]),d(!1)}).catch(A=>{console.error(A),v(),l([]),d(!1)})},300),[]);C.useEffect(()=>{if(!f||f.length<S){l([]);return}return x(f),()=>x.cancel()},[f,x]);const w=(y,A)=>y.map((E,_)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:D=>A({index:_}).onClick(D),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(wn,{option:E},`option_${E.id}`)},E.id));return u.jsxs(b.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{required:r,color:"primary",children:t}),u.jsx(b.Box,{children:u.jsx(b.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(y,A)=>y.id===A.id,endDecorator:c?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:s,disabled:o.length===1,filterOptions:y=>y.filter(A=>!o.some(E=>E.value===A.value)),onInputChange:(y,A)=>{h(A)},onChange:I,getOptionKey:y=>y.id,value:o,renderTags:w,renderOption:(y,A)=>u.jsx(b.AutocompleteOption,q(N({},y),{children:u.jsx(wn,{option:A})}))})}),u.jsx(at,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:v})]})},_m=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||st.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||st.flag}}))||[],_M=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=C.useState([]),[a,s]=C.useState([]),[l,c]=C.useState(!1),[d,f]=C.useState(""),[h,p]=C.useState(!1),{sdk:m}=ft(),g=()=>p(!h),v=(w,y)=>{o(y);const A=y.map(E=>E.id);r(A&&A.length?A:null)},I=3;C.useEffect(()=>{!d&&t&&t.length&&m.football.getCompetitions({competitionIds:t}).then(w=>{o(_m(w))}).catch(w=>{console.error(w),g(),o([])})},[]);const S=C.useMemo(()=>Sr(w=>{c(!0);const y={name:w,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?y.competitionIds=Array.from(n):delete y.competitionIds,m.football.getCompetitions(y).then(A=>{s([..._m(A)]),c(!1)}).catch(A=>{console.error(A),g(),s([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<I){s([]);return}return S(d),()=>S.cancel()},[d,S]);const x=(w,y)=>w.map((A,E)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:_=>y({index:E}).onClick(_),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(wn,{option:A},`option_${A.id}`)},A.id));return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{marginBottom:"16px"},children:u.jsx(b.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(w,y)=>w.id===y.id,endDecorator:l?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:w=>w.filter(y=>!i.some(A=>A.value===y.value)),onInputChange:(w,y)=>{f(y)},onChange:v,getOptionKey:w=>w.id,value:i,renderTags:x,renderOption:(w,y)=>u.jsx(b.AutocompleteOption,q(N({},w),{children:u.jsx(wn,{option:y})}))})}),u.jsx(at,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:g})]})},Pm=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],PM=({labels:e,ids:t,onChange:n})=>{const[r,i]=C.useState([]),[o,a]=C.useState([]),[s,l]=C.useState(!1),[c,d]=C.useState(""),[f,h]=C.useState(!1),{sdk:p}=ft(),m=()=>h(!f),g=(x,w)=>{i(w);const y=w.map(A=>A.id);n(y&&y.length?y:null)},v=3;C.useEffect(()=>{!c&&t&&t.length&&p.profile.getByIds(t).then(x=>{i(Pm(x))}).catch(x=>{m(),console.error(x),i([])})},[]);const I=C.useMemo(()=>Sr(x=>{l(!0),p.profile.getByIds([],x).then(w=>{a([...Pm(w)]),l(!1)}).catch(w=>{console.error(w),m(),a([]),l(!1)})},300),[]);C.useEffect(()=>{if(!c||c.length<v){a([]);return}return I(c),()=>I.cancel()},[c,I]);const S=(x,w)=>x.map((y,A)=>{var E;return u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:_=>w({index:A}).onClick(_),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsxs(b.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(b.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=y.avatar)!=null?E:st.avatar}),u.jsx(b.Typography,{children:y.label})]})},y.id)});return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{marginBottom:"16px"},children:u.jsx(b.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(x,w)=>x.id===w.id,endDecorator:s?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:x=>x.filter(w=>!r.some(y=>y.value===w.value)),onInputChange:(x,w)=>{d(w)},onChange:g,getOptionKey:x=>x.id,value:r,renderTags:S,renderOption:(x,w)=>{var y;return u.jsx(b.AutocompleteOption,q(N({},x),{children:u.jsxs(b.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(b.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(y=w.avatar)!=null?y:st.avatar}),u.jsx(b.Typography,{children:w.label})]})}))}})}),u.jsx(at,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:m})]})},Dm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Team with no name",label:t.name?t.name:"Team with no name",logo:((n=t.assets)==null?void 0:n.logo)||st.team,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||st.flag}}))||[],DM=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=C.useState([]),[a,s]=C.useState([]),[l,c]=C.useState(!1),[d,f]=C.useState(""),[h,p]=C.useState(!1),{sdk:m}=ft(),g=()=>p(!h),v=(w,y)=>{o(y);const A=y.map(E=>E.id);r(A&&A.length?A:null)},I=3;C.useEffect(()=>{!d&&t&&t.length&&m.football.getTeams({teamIds:t,scope:n}).then(w=>{const y=w.data.filter(A=>!A.name.includes("/"));o(Dm(y))}).catch(w=>{console.error(w),g(),o([])})},[]);const S=C.useMemo(()=>Sr((w,y)=>{c(!0),m.football.getTeams({name:w,scope:y}).then(A=>{const E=A.data.filter(_=>!_.name.includes("/"));s([...Dm(E)]),c(!1)}).catch(A=>{console.error(A),g(),s([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<I){s([]);return}return S(d,n),()=>S.cancel()},[d,S]);const x=(w,y)=>w.map((A,E)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:_=>y({index:E}).onClick(_),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(wn,{option:A},`option_${A.id}`)},A.id));return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{marginBottom:"16px"},children:u.jsx(b.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(w,y)=>w.id===y.id,endDecorator:l?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:w=>w.filter(y=>!i.some(A=>A.value===y.value)),onInputChange:(w,y)=>{f(y)},onChange:v,getOptionKey:w=>w.id,value:i,renderTags:x,renderOption:(w,y)=>u.jsx(b.AutocompleteOption,q(N({},w),{children:u.jsx(wn,{option:y})}))})}),u.jsx(at,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:g})]})},OM=({checked:e,disabled:t,onChange:n})=>u.jsx(b.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:r=>n(r.target.checked),sx:{ml:1,"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${b.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}}}),fs=({label:e,labelPosition:t="start",defaultValue:n,description:r,disabled:i,descriptionColor:o,onChange:a})=>{const s=u.jsx(OM,{checked:n,disabled:i,onChange:a});return r?u.jsxs(b.Box,{mb:2,children:[u.jsx(b.Typography,{component:"label",startDecorator:t=="start"?void 0:s,endDecorator:t=="start"?s:void 0,children:e}),u.jsx(b.Typography,{level:"body-sm",color:o||"neutral",children:r})]}):u.jsx(b.Typography,{sx:{mb:2},component:"label",startDecorator:t=="start"?void 0:s,endDecorator:t=="start"?s:void 0,children:e})},RM={control:(e,t)=>q(N({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px","&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(N({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(N({},e),{minHeight:"36px"}),menu:e=>q(N({},e),{position:"relative"}),clearIndicator:e=>q(N({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(N({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(N({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(N({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>q(N({},e),{color:"#333"})},LM=e=>e.map(t=>({label:t,value:t})),Om=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=LM(e.tags),a=()=>i(!r),s=f=>{e.onChange(f.map(h=>h.value))},l=f=>{n(f)},c=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.tags&&e.tags.length===0){const p=[...e.tags,t];e.onChange(p)}if(e.tags&&e.tags.length>0&&d()){const p=[...e.tags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.tags&&e.tags.length&&e.tags.includes(t)?(a(),f):(f=!0,f)};return u.jsxs(u.Fragment,{children:[u.jsx(cm,{styles:RM,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:s,onInputChange:l,onKeyDown:c,placeholder:e.labels.tagsPlaceholder,value:o}),u.jsx(at,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},MM=Ue(u.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class Rm{constructor(){te(this,"contestId","");te(this,"contestType","");te(this,"description","");te(this,"userList",[])}}const BM=(e,t,n)=>{const[r,i]=C.useState(null),{sdk:o}=ft(),a=()=>k(this,null,function*(){try{let s;switch(t){case"top_x":s=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":s=yield o.matchQuiz.getGameWinners(e,!0);break;default:s=yield o.loyalty.getTemplateWinners(e,!0)}s.userList&&s.userList.forEach(l=>{l.tags||(l.tags=[])}),i(s)}catch(s){const l=s;console.error(s),l.error.code!==404&&l.error.status!=="code_unknown_contest"&&n(),i(new Rm)}});return C.useEffect(()=>{a()},[]),r};class $M{constructor(){te(this,"position","");te(this,"profileId","");te(this,"note","");te(this,"tags",[])}}function NM(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var FM=NM,jM=Array.isArray,zM=jM,Lm=pu,UM=FM,VM=zM,HM=Sm,WM=1/0,Mm=Lm?Lm.prototype:void 0,Bm=Mm?Mm.toString:void 0;function $m(e){if(typeof e=="string")return e;if(VM(e))return UM(e,$m)+"";if(HM(e))return Bm?Bm.call(e):"";var t=e+"";return t=="0"&&1/e==-WM?"-0":t}var GM=$m,YM=GM;function KM(e){return e==null?"":YM(e)}var Nm=KM;function QM(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}var qM=QM;function JM(e){return function(t){return e==null?void 0:e[t]}}var XM=JM,ZM=XM,e2={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",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b2(e){return v2.test(e)}var y2=b2,Fm="\\ud800-\\udfff",x2="\\u0300-\\u036f",C2="\\ufe20-\\ufe2f",w2="\\u20d0-\\u20ff",I2=x2+C2+w2,jm="\\u2700-\\u27bf",zm="a-z\\xdf-\\xf6\\xf8-\\xff",S2="\\xac\\xb1\\xd7\\xf7",A2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",T2="\\u2000-\\u206f",E2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Um="A-Z\\xc0-\\xd6\\xd8-\\xde",k2="\\ufe0e\\ufe0f",Vm=S2+A2+T2+E2,Hm="['’]",Wm="["+Vm+"]",_2="["+I2+"]",Gm="\\d+",P2="["+jm+"]",Ym="["+zm+"]",Km="[^"+Fm+Vm+Gm+jm+zm+Um+"]",D2="\\ud83c[\\udffb-\\udfff]",O2="(?:"+_2+"|"+D2+")",R2="[^"+Fm+"]",Qm="(?:\\ud83c[\\udde6-\\uddff]){2}",qm="[\\ud800-\\udbff][\\udc00-\\udfff]",ui="["+Um+"]",L2="\\u200d",Jm="(?:"+Ym+"|"+Km+")",M2="(?:"+ui+"|"+Km+")",Xm="(?:"+Hm+"(?:d|ll|m|re|s|t|ve))?",Zm="(?:"+Hm+"(?:D|LL|M|RE|S|T|VE))?",ev=O2+"?",tv="["+k2+"]?",B2="(?:"+L2+"(?:"+[R2,Qm,qm].join("|")+")"+tv+ev+")*",$2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",N2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",F2=tv+ev+B2,j2="(?:"+[P2,Qm,qm].join("|")+")"+F2,z2=RegExp([ui+"?"+Ym+"+"+Xm+"(?="+[Wm,ui,"$"].join("|")+")",M2+"+"+Zm+"(?="+[Wm,ui+Jm,"$"].join("|")+")",ui+"?"+Jm+"+"+Xm,ui+"+"+Zm,N2,$2,Gm,j2].join("|"),"g");function U2(e){return e.match(z2)||[]}var V2=U2,H2=m2,W2=y2,G2=Nm,Y2=V2;function K2(e,t,n){return e=G2(e),t=n?void 0:t,t===void 0?W2(e)?Y2(e):H2(e):e.match(t)||[]}var Q2=K2,q2=qM,J2=h2,X2=Q2,Z2="['’]",eB=RegExp(Z2,"g");function tB(e){return function(t){return q2(X2(J2(t).replace(eB,"")),e,"")}}var nB=tB,rB=nB,iB=rB(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),oB=iB;const aB=fn(oB);class sB{constructor(){te(this,"id","");te(this,"value","");te(this,"label","")}}class lB extends sB{constructor(){super(...arguments);te(this,"logo","");te(this,"countryFlag","");te(this,"countryName","")}}class nv extends lB{constructor(){super(...arguments);te(this,"group","")}}const cB=(e,t)=>t||e||"-------------",mu=(e,t)=>Array.isArray(e)?e.map(n=>mu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>q(N({},n),{[aB(r)]:mu(e[r])}),{}):e,rv=e=>{const t=[];return e.competitions.forEach(n=>{t.push(vu(n,"competition"))}),e.teams.forEach(n=>{t.push(vu(n,"team"))}),e.players.forEach(n=>{t.push(vu(n,"player"))}),t},vu=(e,t)=>{var r,i,o,a,s;const n=new nv;return n.label=e.name,n.value=e.id,n.id=e.id,n.group=t,t==="player"?n.logo=((r=e.assets)==null?void 0:r.headshot)||st.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||st.team:n.logo=((o=e.assets)==null?void 0:o.logo)||st.competition,n.countryName=e.country.name,n.countryFlag=((s=(a=e.country)==null?void 0:a.assets)==null?void 0:s.flag)||st.country,n},uB=e=>{switch(e){case"CLASSIC_QUIZ":return"success";case"EITHER_OR":return"success";case"POLL":return"warning";case"TOP_X":return"primary";case"MATCH_QUIZ":return"primary";case"LEADERBOARD_TEMPLATES":return"neutral";default:return"neutral"}},dB=e=>{switch(e){case"CLASSIC_QUIZ":return"CLASSIC QUIZ";case"EITHER_OR":return"EITHER/OR";case"POLL":return"POLL";case"TOP_X":return"TOP X";case"MATCH_QUIZ":return"MATCH QUIZ";case"LEADERBOARD_TEMPLATES":return"LEADERBOARD TEMPLATES"}},fB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,I,S,x,w,y;const[o,a]=C.useState(t.position),[s,l]=C.useState(t.note),[c,d]=C.useState(t.tags),f=o||s||c.length>0,h=A=>{A.persist();const{value:E}=A.target;a(E),r("position",E)},p=A=>{A.persist();const{value:E}=A.target;l(E),r("note",E)},m=A=>{d(A),r("tags",A)},g=()=>{a(""),l(""),d([]),i()};return u.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[u.jsx("td",{children:u.jsxs(b.Box,{display:"flex",alignItems:"center",children:[u.jsx(b.Avatar,{src:((v=e.profileModel)==null?void 0:v.avatar)||"",alt:((I=e.profileModel)==null?void 0:I.name)||"Unknown",sx:{mr:1}}),u.jsxs(b.Box,{children:[u.jsxs(b.Typography,{fontWeight:"md",children:[cB((S=e.profileModel)==null?void 0:S.name,(x=e.profileModel)==null?void 0:x.nickname)," ",(w=e.profileModel)!=null&&w.name?u.jsxs(b.Typography,{children:["(",(y=e.profileModel)==null?void 0:y.name,")"]}):u.jsx(u.Fragment,{})]}),u.jsx(b.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),u.jsx("td",{style:{textAlign:"center"},children:e.points}),u.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),u.jsx("td",{children:u.jsx(b.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(b.Input,{name:"note",value:s,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(Om,{labels:n,tags:c,onChange:m})}),u.jsx("td",{children:u.jsx(b.Tooltip,{title:n.clearWinner,children:u.jsx(b.IconButton,{onClick:g,variant:"outlined",color:"danger",disabled:!f,children:u.jsx(Oe.Remove,{})})})})]})},hB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?q(N({},f),{[o]:a}):f);r(d);return}const l=new $M;l.profileId=i,l[o]=a;const c=[...e.winners,l];r(c)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>q(N({},o),{userList:i}))};return e.leaderboard?u.jsxs(u.Fragment,{children:[u.jsx(b.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?u.jsx(b.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):u.jsx(u.Fragment,{}),u.jsxs(b.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:last-child, & > tbody > tr > td:last-child":{textAlign:"center",width:"50px"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"}},children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.nicknameAndName}),u.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),u.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),u.jsx("th",{style:{width:"100px"},children:e.labels.position}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags}),u.jsx("th",{children:e.labels.actions})]})}),u.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>u.jsx(fB,{winner:e.winners.find(o=>o.profileId===i.profileId)||{position:"",profileId:"",note:"",tags:[]},profile:i,labels:e.labels,onChange:(o,a)=>t(i.profileId,o,a),onRemove:()=>n(i.profileId)},`winner-profile-${i.profileId}`)):u.jsx(u.Fragment,{}),u.jsx("tr",{children:u.jsx("td",{colSpan:7,children:e.hasMoreParticipants?u.jsx(b.Box,{textAlign:"center",my:1,children:u.jsx(b.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):u.jsx(u.Fragment,{})})})]})]})]}):u.jsx(ds,{my:40})},pB=(e,t,n,r,i)=>{const[o,a]=C.useState(null),[s,l]=C.useState(!1),[c,d]=C.useState(!1),{sdk:f}=ft(),h=()=>k(this,null,function*(){d(!0);const p={limit:10,page:r},m=!0;try{let g;t==="template"?g=yield f.loyalty.getLeaderboard(e,p,m):g=yield f.loyalty.getLeaderboardForGame(e,p,m),g.meta.pagination.numberOfPages>r?l(!0):l(!1),o&&o.length?a(v=>[...v,...g.data]):a(g.data)}catch(g){console.error(g),i("danger",n),a([])}d(!1)});return C.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:s,isLeaderboardLoading:c}};class gB{constructor(){te(this,"isValid",!0);te(this,"message","");te(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));te(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});te(this,"validateWinnerIds",(t,n)=>{const r=t.map(o=>o.profileId),i=new Set(r);r.length!==i.size&&(this.isValid=!1,this.message=n)})}}const mB=e=>{const t=e.winners.userList.length>0&&(e.winners.userList[0].position||e.winners.userList[0].profileId||e.winners.userList[0].note||e.winners.userList[0].tags.length);return u.jsx(b.Card,{variant:"plain",children:t?u.jsxs(u.Fragment,{children:[u.jsx(b.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),u.jsx(b.Sheet,{children:u.jsxs(b.Table,{sx:{"& > thead > tr > th:nth-of-type(n + 3), & > tbody > tr > td:nth-of-type(n + 3)":{textAlign:"right"},"& > thead > tr > th:nth-of-type(3), & > thead > tr > th:nth-of-type(4), & > tbody > tr > td:nth-of-type(3), & > tbody > tr > td:nth-of-type(4)":{fontSize:"sm",display:{xs:"none",md:"table-cell"}}},children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{style:{width:"3%"},children:"#"}),u.jsx("th",{children:e.labels.name}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags})]})}),u.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return u.jsxs("tr",{children:[u.jsx("td",{children:n.position}),u.jsx("td",{children:u.jsxs(b.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[u.jsx(b.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),u.jsxs(b.Box,{textAlign:"left",children:[u.jsxs(b.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",u.jsxs(b.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),u.jsx(b.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),u.jsx("td",{children:n.note}),u.jsx("td",{children:n.tags.map(o=>u.jsx(b.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):u.jsx(b.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},vB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Rm,bB=e=>{var y;const[t,n]=C.useState(vB(e.winners)),[r,i]=C.useState(((y=e.winners)==null?void 0:y.description)||""),[o,a]=C.useState(!1),[s,l]=C.useState(1),[c,d]=C.useState(!1),[f,h]=C.useState("danger"),[p,m]=C.useState(""),g=(A,E)=>{h(A),m(E),d(!0)},{leaderboard:v,hasMoreParticipants:I,isLeaderboardLoading:S}=pB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,s,g),{https:x}=ft(),w=()=>k(this,null,function*(){a(!0);const A=JSON.parse(JSON.stringify(t));if(A.contestId=e.entityId,A.contestType=e.entityType==="template"?"TEMPLATE":"GAME",A.description=r,delete A.contestModel,A.userList.length>0){const _=new gB().validate(A.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!_.isValid){g("danger",_.message),a(!1);return}}else delete A.userList;const E=mu(A);try{yield x.setWinners(E),g("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(_){console.error(_),g("danger",Object.keys(e.winners).length?e.labels.editWinnersErrorMessage:e.labels.createWinnersErrorMessage)}a(!1)});return u.jsxs(u.Fragment,{children:[u.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:u.jsx(b.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:u.jsxs(b.Box,{width:"100%",sx:{overflowX:"auto"},children:[u.jsxs(b.Card,{variant:"plain",children:[u.jsx(dc,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:A=>{i(A)}}),u.jsx(hB,{winners:t.userList,leaderboard:v,hasMoreParticipants:I,isLoading:S,setPage:l,setWinnersRequestBody:n,labels:e.labels}),u.jsx(b.Box,{textAlign:"center",my:3,children:u.jsx(b.Button,{variant:"solid",color:"primary",onClick:w,loading:o,children:e.labels.save})}),u.jsx(b.Divider,{sx:{my:4}})]}),v?u.jsx(mB,{winners:t,profiles:v.map(A=>A.profileModel),labels:e.labels}):u.jsx(u.Fragment,{})]})})}),u.jsx(at,{showToast:c,color:f,message:p,hideToast:()=>d(!1)})]})},yB=e=>{const[t,n]=C.useState(!1),r=()=>n(!0),i=BM(e.entityId,e.entityType,r);return i?u.jsxs(u.Fragment,{children:[u.jsxs(b.Box,{p:2,children:[u.jsx(b.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:u.jsx(MM,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),u.jsxs(b.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",u.jsx(b.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),u.jsx(bB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),u.jsx(at,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):u.jsx(ds,{my:50})},xB=10,CB=e=>{var f;const[t,n]=C.useState([]),[r,i]=C.useState(!1),[o,a]=C.useState(""),{sdk:s}=ft(),l=C.useMemo(()=>Sr(h=>{if(!h){n([]),i(!1);return}i(!0),s.football.search({query:h}).then(p=>{n([...rv(p)]),i(!1)}).catch(p=>{console.error(p),n([]),i(!1)})},300),[]);C.useEffect(()=>(l(o),()=>l.cancel()),[o,l]);const c=(h,p)=>{const m=p.map(g=>g.id);e.setOptions(p),e.handleResetData(),e.setFilters(g=>q(N({},g),{entityIds:m}))},d=(h,p)=>h.map((m,g)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:v=>p({index:g}).onClick(v),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(wn,{option:m},`option_${m.id}`)},m.id));return u.jsxs(b.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),u.jsx(b.Autocomplete,{getOptionDisabled:()=>e.options.length===xB,forcePopupIcon:!1,multiple:!0,loading:r,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(h,p)=>h.id===p.id,endDecorator:r?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.options.length>0?"":e.labels.typeContextTagNamePlaceholder,options:t,filterOptions:h=>h.filter(p=>!e.options.some(m=>m.value===p.value)),onInputChange:(h,p)=>{a(p)},onChange:c,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(f=e.options)!=null?f:[],renderTags:d,renderOption:(h,p)=>u.jsx(b.AutocompleteOption,q(N({},h),{children:u.jsx(wn,{option:p})}))})]})};function iv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var uo;(function(e){e.event="event",e.props="prop"})(uo||(uo={}));function ir(){}function wB(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(o,a){return o===t[a]})||(t=r,n=e.apply(void 0,r)),n}}function fo(e){return!!(e||"").match(/\d/)}function di(e){return e==null}function IB(e){return typeof e=="number"&&isNaN(e)}function ov(e){return di(e)||IB(e)||typeof e=="number"&&!isFinite(e)}function av(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function SB(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function AB(e,t,n){var r=SB(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function TB(e){var t=C.useRef(e);t.current=e;var n=C.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function bu(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),o=i[0],a=i[1]||"";return{beforeDecimal:o,afterDecimal:a,hasNegation:n,addNegation:r}}function EB(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function sv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function lv(e,t){return Array(t+1).join(e)}function cv(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],o=r[1];if(o=Number(o),!o)return n+i;i=i.replace(".","");var a=1+o,s=i.length;return a<0?i="0."+lv("0",Math.abs(a))+i:a>=s?i=i+lv("0",a-s):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function uv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=bu(e),o=i.beforeDecimal,a=i.afterDecimal,s=i.hasNegation,l=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:l.toFixed(t),d=c.split("."),f=o;o&&Number(d[0])&&(f=o.split("").reverse().reduce(function(g,v,I){return g.length>I?(Number(g[0])+Number(v)).toString()+g.substring(1,g.length):v+g},d[0]));var h=sv(d[1]||"",t,n),p=s?"-":"",m=r?".":"";return""+p+f+m+h}function Ar(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var dv=wB(function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[o-1-r]&&o-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}}),kB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function _B(e,t,n){return Math.min(Math.max(e,t),n)}function yu(e){return Math.max(e.selectionStart,e.selectionEnd)}function PB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function DB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function OB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function RB(e,t,n,r,i,o,a){a===void 0&&(a=OB);var s=i.findIndex(function(w){return w}),l=e.slice(0,s);!t&&!n.startsWith(l)&&(t=l,n=l+n,r=r+l.length);for(var c=n.length,d=e.length,f={},h=new Array(c),p=0;p<c;p++){h[p]=-1;for(var m=0,g=d;m<g;m++){var v=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m});if(v&&f[m]!==!0){h[p]=m,f[m]=!0;break}}}for(var I=r;I<c&&(h[I]===-1||!o(n[I]));)I++;var S=I===c||h[I]===-1?d:h[I];for(I=r-1;I>0&&h[I]===-1;)I--;var x=I===-1||h[I]===-1?0:h[I]+1;return x>S?S:r-x<S-r?x:S}function fv(e,t,n,r){var i=e.length;if(t=_B(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function LB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(fo(e[n])||fo(e[n-1]));return t}function hv(e,t,n,r,i,o){o===void 0&&(o=ir);var a=TB(function(m,g){var v,I;return ov(m)?(I="",v=""):typeof m=="number"||g?(I=typeof m=="number"?cv(m):m,v=r(I)):(I=i(m,void 0),v=r(I)),{formattedValue:v,numAsString:I}}),s=C.useState(function(){return a(di(e)?t:e,n)}),l=s[0],c=s[1],d=function(m,g){m.formattedValue!==l.formattedValue&&c({formattedValue:m.formattedValue,numAsString:m.value}),o(m,g)},f=e,h=n;di(e)&&(f=l.numAsString,h=!0);var p=a(f,h);return C.useMemo(function(){c(p)},[p.formattedValue]),[l,d]}function MB(e){return e.replace(/[^0-9]/g,"")}function BB(e){return e}function $B(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,o=e.getInputRef,a=e.format;a===void 0&&(a=BB);var s=e.removeFormatting;s===void 0&&(s=MB);var l=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,h=e.onChange;h===void 0&&(h=ir);var p=e.onKeyDown;p===void 0&&(p=ir);var m=e.onMouseUp;m===void 0&&(m=ir);var g=e.onFocus;g===void 0&&(g=ir);var v=e.onBlur;v===void 0&&(v=ir);var I=e.value,S=e.getCaretBoundary;S===void 0&&(S=LB);var x=e.isValidInputCharacter;x===void 0&&(x=fo);var w=e.isCharacterSame,y=iv(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=hv(I,l,!!c,a,s,d),E=A[0],_=E.formattedValue,D=E.numAsString,G=A[1],F=C.useRef(),T=C.useRef({formattedValue:_,numAsString:D}),W=function(de,he){T.current={formattedValue:de.formattedValue,numAsString:de.value},G(de,he)},Y=C.useState(!1),j=Y[0],$=Y[1],B=C.useRef(null),H=C.useRef({setCaretTimeout:null,focusTimeout:null});C.useEffect(function(){return $(!0),function(){clearTimeout(H.current.setCaretTimeout),clearTimeout(H.current.focusTimeout)}},[]);var Q=a,ee=function(de,he){var xe=parseFloat(he);return{formattedValue:de,value:he,floatValue:isNaN(xe)?void 0:xe}},R=function(de,he,xe){de.selectionStart===0&&de.selectionEnd===de.value.length||(Ar(de,he),H.current.setCaretTimeout=setTimeout(function(){de.value===xe&&de.selectionStart!==he&&Ar(de,he)},0))},M=function(de,he,xe){return fv(de,he,S(de),xe)},z=function(de,he,xe){var Te=S(he),He=RB(he,_,de,xe,Te,x,w);return He=fv(he,He,Te),He},V=function(de){var he=de.formattedValue;he===void 0&&(he="");var xe=de.input,Te=de.source,He=de.event,Pe=de.numAsString,Ee;if(xe){var It=de.inputValue||xe.value,St=yu(xe);xe.value=he,Ee=z(It,he,St),Ee!==void 0&&R(xe,Ee,he)}he!==_&&W(ee(he,Pe),{event:He,source:Te})};C.useEffect(function(){var de=T.current,he=de.formattedValue,xe=de.numAsString;(_!==he||D!==xe)&&W(ee(_,D),{event:void 0,source:uo.props})},[_,D]);var ne=B.current?yu(B.current):void 0,se=typeof window!="undefined"?C.useLayoutEffect:C.useEffect;se(function(){var de=B.current;if(_!==T.current.formattedValue&&de){var he=z(T.current.formattedValue,_,ne);de.value=_,R(de,he,_)}},[_]);var ae=function(de,he,xe){var Te=he.target,He=F.current?kB(F.current,Te.selectionEnd):dv(_,de),Pe=Object.assign(Object.assign({},He),{lastValue:_}),Ee=s(de,Pe),It=Q(Ee);if(Ee=s(It,void 0),f&&!f(ee(It,Ee))){var St=he.target,zt=yu(St),Lt=z(de,_,zt);return St.value=_,R(St,Lt,_),!1}return V({formattedValue:It,numAsString:Ee,inputValue:de,event:he,source:xe,input:he.target}),!0},X=function(de,he){he===void 0&&(he=0);var xe=de.selectionStart,Te=de.selectionEnd;F.current={selectionStart:xe,selectionEnd:Te+he}},le=function(de){var he=de.target,xe=he.value,Te=ae(xe,de,uo.event);Te&&h(de),F.current=void 0},re=function(de){var he=de.target,xe=de.key,Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee;xe==="ArrowLeft"||xe==="Backspace"?Ee=Math.max(Te-1,0):xe==="ArrowRight"?Ee=Math.min(Te+1,Pe.length):xe==="Delete"&&(Ee=Te);var It=0;xe==="Delete"&&Te===He&&(It=1);var St=xe==="ArrowLeft"||xe==="ArrowRight";if(Ee===void 0||Te!==He&&!St){p(de),X(he,It);return}var zt=Ee;if(St){var Lt=xe==="ArrowLeft"?"left":"right";zt=M(Pe,Ee,Lt),zt!==Ee&&de.preventDefault()}else xe==="Delete"&&!x(Pe[Ee])?zt=M(Pe,Ee,"right"):xe==="Backspace"&&!x(Pe[Ee])&&(zt=M(Pe,Ee,"left"));zt!==Ee&&R(he,zt,Pe),p(de),X(he,It)},ge=function(de){var he=de.target,xe=function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;if(Pe===void 0&&(Pe=""),Te===He){var Ee=M(Pe,Te);Ee!==Te&&R(he,Ee,Pe)}};xe(),requestAnimationFrame(function(){xe()}),m(de),X(he)},Se=function(de){de.persist&&de.persist();var he=de.target,xe=de.currentTarget;B.current=he,H.current.focusTimeout=setTimeout(function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee=M(Pe,Te);Ee!==Te&&!(Te===0&&He===Pe.length)&&R(he,Ee,Pe),g(Object.assign(Object.assign({},de),{currentTarget:xe}))},0)},Ve=function(de){B.current=null,clearTimeout(H.current.focusTimeout),clearTimeout(H.current.setCaretTimeout),v(de)},wt=j&&PB()?"numeric":void 0,lt=Object.assign({inputMode:wt},y,{type:t,value:_,onChange:le,onKeyDown:re,onMouseUp:ge,onFocus:Se,onBlur:Ve});if(n==="text")return i?C.createElement(C.Fragment,null,i(_,y)||null):C.createElement("span",Object.assign({},y,{ref:o}),_);if(r){var _t=r;return C.createElement(_t,Object.assign({},lt,{ref:o}))}return C.createElement("input",Object.assign({},lt,{ref:o}))}function pv(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var o=t.suffix;o===void 0&&(o="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=hs(t),c=l.thousandSeparator,d=l.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=bu(e,a),p=h.beforeDecimal,m=h.afterDecimal,g=h.addNegation;return n!==void 0&&(m=sv(m,n,!!r)),c&&(p=AB(p,c,s)),i&&(p=i+p),o&&(m=m+o),g&&(p="-"+p),e=p+(f&&d||"")+m,e}function hs(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function NB(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),i&&!o&&t&&(e="-"+e),e}function FB(e,t){return new RegExp("(^-)|[0-9]|"+av(e),"g")}function jB(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function zB(e,t,n){var r;t===void 0&&(t=DB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var s=n.decimalScale,l=t.from,c=t.to,d=c.start,f=c.end,h=hs(n),p=h.allowedDecimalSeparators,m=h.decimalSeparator,g=e[f]===m;if(fo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var v=s===0?"":m;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var I=function(B,H,Q){var ee=!1,R=!1;o.startsWith("-")?ee=!1:B.startsWith("--")?(ee=!1,R=!0):a.startsWith("-")&&B.length===a.length?ee=!1:B[0]==="-"&&(ee=!0);var M=ee?1:0;return R&&(M=2),M&&(B=B.substring(M),H-=M,Q-=M),{value:B,start:H,end:Q,hasNegation:ee}},S=I(e,d,f),x=S.hasNegation;r=S,e=r.value,d=r.start,f=r.end;var w=I(t.lastValue,l.start,l.end),y=w.start,A=w.end,E=w.value,_=e.substring(d,f);e.length&&E.length&&(y>E.length-a.length||A<o.length)&&!(_&&a.startsWith(_))&&(e=E);var D=0;e.startsWith(o)?D+=o.length:d<o.length&&(D=d),e=e.substring(D),f-=D;var G=e.length,F=e.length-a.length;e.endsWith(a)?G=F:(f>F||f>e.length-a.length)&&(G=f),e=e.substring(0,G),e=NB(x?"-"+e:e,i),e=(e.match(FB(m))||[]).join("");var T=e.indexOf(m);e=e.replace(new RegExp(av(m),"g"),function(B,H){return H===T?".":""});var W=bu(e,i),Y=W.beforeDecimal,j=W.afterDecimal,$=W.addNegation;return c.end-c.start<l.end-l.start&&Y===""&&g&&!parseFloat(j)&&(e=$?"-":""),e}function UB(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";i.fill(!1,0,n.length+(o?1:0));var a=e.length;return i.fill(!1,a-r.length+1,a+1),i}function VB(e){var t=hs(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var o=e.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
|
|
2463
|
+
`]))),WD=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return ve({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},tu=function(t){var n=t.delay,r=t.offset;return pe.jsx("span",{css:pe.css({animation:"".concat(HD," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},GD=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Cn(t,BD);return pe.jsx("div",O({},tt(ve(ve({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),pe.jsx(tu,{delay:0,offset:r}),pe.jsx(tu,{delay:160,offset:!0}),pe.jsx(tu,{delay:320,offset:!r}))},YD=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,l=o.spacing;return ve({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},KD=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return pe.jsx("div",O({ref:o},tt(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a,{"aria-disabled":r||void 0}),n)},QD=KD,qD=["data"],JD=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},XD=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,l=t.innerProps,c=t.label,d=t.theme,f=t.selectProps;return pe.jsx("div",O({},tt(t,"group",{group:!0}),l),pe.jsx(a,O({},s,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),c),pe.jsx("div",null,n))},ZD=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return ve({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},eO=function(t){var n=wg(t);n.data;var r=Cn(n,qD);return pe.jsx("div",O({},tt(t,"groupHeading",{"group-heading":!0}),r))},tO=XD,nO=["innerRef","isDisabled","isHidden","inputClassName"],rO=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return ve(ve({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},iO),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Lg={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},iO={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ve({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Lg)},oO=function(t){return ve({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Lg)},aO=function(t){var n=t.cx,r=t.value,i=wg(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,c=Cn(i,nO);return pe.jsx("div",O({},tt(t,"input",{"input-container":!0}),{"data-value":r||""}),pe.jsx("input",O({className:n({input:!0},l),ref:o,style:oO(s),disabled:a},c)))},sO=aO,lO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return ve({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},cO=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return ve({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},uO=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return ve({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Mg=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",r,n)},dO=Mg,fO=Mg;function hO(e){var t=e.children,n=e.innerProps;return pe.jsx("div",O({role:"button"},n),t||pe.jsx(eu,{size:14}))}var pO=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,l=t.selectProps,c=r.Container,d=r.Label,f=r.Remove;return pe.jsx(c,{data:i,innerProps:ve(ve({},tt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},pe.jsx(d,{data:i,innerProps:ve({},tt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),pe.jsx(f,{data:i,innerProps:ve(ve({},tt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},gO=pO,mO=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,l=a.colors;return ve({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},vO=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return pe.jsx("div",O({},tt(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},bO=vO,yO=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return ve({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},xO=function(t){var n=t.children,r=t.innerProps;return pe.jsx("div",O({},tt(t,"placeholder",{placeholder:!0}),r),n)},CO=xO,wO=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return ve({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},IO=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return pe.jsx("div",O({},tt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},SO=IO,AO={ClearIndicator:zD,Control:QD,DropdownIndicator:FD,DownChevron:Og,CrossIcon:eu,Group:tO,GroupHeading:eO,IndicatorsContainer:LD,IndicatorSeparator:VD,Input:sO,LoadingIndicator:GD,Menu:xD,MenuList:wD,MenuPortal:kD,LoadingMessage:TD,NoOptionsMessage:AD,MultiValue:gO,MultiValueContainer:dO,MultiValueLabel:fO,MultiValueRemove:hO,Option:bO,Placeholder:CO,SelectContainer:PD,SingleValue:SO,ValueContainer:OD},TO=function(t){return ve(ve({},AO),t.components)},Bg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function EO(e,t){return!!(e===t||Bg(e)&&Bg(t))}function kO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!EO(e[n],t[n]))return!1;return!0}function _O(e,t){t===void 0&&(t=kO);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}for(var PO={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},DO=function(t){return pe.jsx("span",O({css:PO},t))},$g=DO,OO={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,a=t.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,l=t.isDisabled,c=t.isSelected,d=t.isAppleDevice,f=function(g,v){return g&&g.length?"".concat(g.indexOf(v)+1," of ").concat(g.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(f(s,r),".");if(n==="menu"&&d){var h=l?" disabled":"",p="".concat(c?" selected":"").concat(h);return"".concat(a).concat(p,", ").concat(f(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},RO=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,c=t.id,d=t.isAppleDevice,f=l.ariaLiveMessages,h=l.getOptionLabel,p=l.inputValue,m=l.isMulti,g=l.isOptionDisabled,v=l.isSearchable,I=l.menuIsOpen,S=l.options,x=l.screenReaderStatus,w=l.tabSelectsValue,y=l.isLoading,A=l["aria-label"],E=l["aria-live"],_=C.useMemo(function(){return ve(ve({},OO),f||{})},[f]),D=C.useMemo(function(){var j="";if(n&&_.onChange){var $=n.option,B=n.options,H=n.removedValue,Q=n.removedValues,ee=n.value,R=function(X){return Array.isArray(X)?null:X},M=H||$||R(ee),z=M?h(M):"",V=B||Q||void 0,ne=V?V.map(h):[],se=ve({isDisabled:M&&g(M,s),label:z,labels:ne},n);j=_.onChange(se)}return j},[n,_,g,s,h]),G=C.useMemo(function(){var j="",$=r||i,B=!!(r&&s&&s.includes(r));if($&&_.onFocus){var H={focused:$,label:h($),isDisabled:g($,s),isSelected:B,options:o,context:$===r?"menu":"value",selectValue:s,isAppleDevice:d};j=_.onFocus(H)}return j},[r,i,h,g,_,o,s,d]),F=C.useMemo(function(){var j="";if(I&&S.length&&!y&&_.onFilter){var $=x({count:o.length});j=_.onFilter({inputValue:p,resultsMessage:$})}return j},[o,p,I,_,S,x,y]),T=(n==null?void 0:n.action)==="initial-input-focus",W=C.useMemo(function(){var j="";if(_.guidance){var $=i?"value":I?"menu":"input";j=_.guidance({"aria-label":A,context:$,isDisabled:r&&g(r,s),isMulti:m,isSearchable:v,tabSelectsValue:w,isInitialFocus:T})}return j},[A,r,i,m,g,v,I,_,s,w,T]),Y=pe.jsx(C.Fragment,null,pe.jsx("span",{id:"aria-selection"},D),pe.jsx("span",{id:"aria-focused"},G),pe.jsx("span",{id:"aria-results"},F),pe.jsx("span",{id:"aria-guidance"},W));return pe.jsx(C.Fragment,null,pe.jsx($g,{id:c},T&&Y),pe.jsx($g,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!T&&Y))},LO=RO,nu=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],MO=new RegExp("["+nu.map(function(e){return e.letters}).join("")+"]","g"),Ng={},ru=0;ru<nu.length;ru++)for(var iu=nu[ru],ou=0;ou<iu.letters.length;ou++)Ng[iu.letters[ou]]=iu.base;var Fg=function(t){return t.replace(MO,function(n){return Ng[n]})},BO=_O(Fg),jg=function(t){return t.replace(/^\s+|\s+$/g,"")},$O=function(t){return"".concat(t.label," ").concat(t.value)},NO=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=ve({ignoreCase:!0,ignoreAccents:!0,stringify:$O,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,s=i.stringify,l=i.trim,c=i.matchFrom,d=l?jg(r):r,f=l?jg(s(n)):s(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),a&&(d=BO(d),f=Fg(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},FO=["innerRef"];function jO(e){var t=e.innerRef,n=Cn(e,FO),r=fD(n,"onExited","in","enter","exit","appear");return pe.jsx("input",O({ref:t},r,{css:pe.css({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var zO=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function UO(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=C.useRef(!1),s=C.useRef(!1),l=C.useRef(0),c=C.useRef(null),d=C.useCallback(function(v,I){if(c.current!==null){var S=c.current,x=S.scrollTop,w=S.scrollHeight,y=S.clientHeight,A=c.current,E=I>0,_=w-y-x,D=!1;_>I&&a.current&&(r&&r(v),a.current=!1),E&&s.current&&(o&&o(v),s.current=!1),E&&I>_?(n&&!a.current&&n(v),A.scrollTop=w,D=!0,a.current=!0):!E&&-I>x&&(i&&!s.current&&i(v),A.scrollTop=0,D=!0,s.current=!0),D&&zO(v)}},[n,r,i,o]),f=C.useCallback(function(v){d(v,v.deltaY)},[d]),h=C.useCallback(function(v){l.current=v.changedTouches[0].clientY},[]),p=C.useCallback(function(v){var I=l.current-v.changedTouches[0].clientY;d(v,I)},[d]),m=C.useCallback(function(v){if(v){var I=cD?{passive:!1}:!1;v.addEventListener("wheel",f,I),v.addEventListener("touchstart",h,I),v.addEventListener("touchmove",p,I)}},[p,h,f]),g=C.useCallback(function(v){v&&(v.removeEventListener("wheel",f,!1),v.removeEventListener("touchstart",h,!1),v.removeEventListener("touchmove",p,!1))},[p,h,f]);return C.useEffect(function(){if(t){var v=c.current;return m(v),function(){g(v)}}},[t,m,g]),function(v){c.current=v}}var zg=["boxSizing","height","overflow","paddingRight","position"],Ug={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Vg(e){e.preventDefault()}function Hg(e){e.stopPropagation()}function Wg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Gg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Yg=!!(typeof window!="undefined"&&window.document&&window.document.createElement),so=0,si={capture:!1,passive:!1};function VO(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=C.useRef({}),o=C.useRef(null),a=C.useCallback(function(l){if(Yg){var c=document.body,d=c&&c.style;if(r&&zg.forEach(function(m){var g=d&&d[m];i.current[m]=g}),r&&so<1){var f=parseInt(i.current.paddingRight,10)||0,h=document.body?document.body.clientWidth:0,p=window.innerWidth-h+f||0;Object.keys(Ug).forEach(function(m){var g=Ug[m];d&&(d[m]=g)}),d&&(d.paddingRight="".concat(p,"px"))}c&&Gg()&&(c.addEventListener("touchmove",Vg,si),l&&(l.addEventListener("touchstart",Wg,si),l.addEventListener("touchmove",Hg,si))),so+=1}},[r]),s=C.useCallback(function(l){if(Yg){var c=document.body,d=c&&c.style;so=Math.max(so-1,0),r&&so<1&&zg.forEach(function(f){var h=i.current[f];d&&(d[f]=h)}),c&&Gg()&&(c.removeEventListener("touchmove",Vg,si),l&&(l.removeEventListener("touchstart",Wg,si),l.removeEventListener("touchmove",Hg,si)))}},[r]);return C.useEffect(function(){if(t){var l=o.current;return a(l),function(){s(l)}}},[t,a,s]),function(l){o.current=l}}var HO=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},WO={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function GO(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,c=UO({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),d=VO({isEnabled:n}),f=function(p){c(p),d(p)};return pe.jsx(C.Fragment,null,n&&pe.jsx("div",{onClick:HO,css:WO}),t(f))}var YO={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},KO=function(t){var n=t.name,r=t.onFocus;return pe.jsx("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:YO,value:"",onChange:function(){}})},QO=KO;function au(e){var t;return typeof window!="undefined"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function qO(){return au(/^iPhone/i)}function Kg(){return au(/^Mac/i)}function JO(){return au(/^iPad/i)||Kg()&&navigator.maxTouchPoints>1}function XO(){return qO()||JO()}function ZO(){return Kg()||XO()}var eR=function(t){return t.label},Qg=function(t){return t.label},qg=function(t){return t.value},tR=function(t){return!!t.isDisabled},nR={clearIndicator:jD,container:_D,control:YD,dropdownIndicator:ND,group:JD,groupHeading:ZD,indicatorsContainer:RD,indicatorSeparator:UD,input:rO,loadingIndicator:WD,loadingMessage:SD,menu:vD,menuList:CD,menuPortal:ED,multiValue:lO,multiValueLabel:cO,multiValueRemove:uO,noOptionsMessage:ID,option:mO,placeholder:yO,singleValue:wO,valueContainer:DD},rR={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},iR=4,Jg=4,oR=38,aR=Jg*2,sR={baseUnit:Jg,controlHeight:oR,menuGutter:aR},su={borderRadius:iR,colors:rR,spacing:sR},lR={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Ag(),captureMenuScroll:!Ag(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:NO(),formatGroupLabel:eR,getOptionLabel:Qg,getOptionValue:qg,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:tR,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!sD(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Xg(e,t,n,r){var i=rm(e,t,n),o=im(e,t,n),a=nm(e,t),s=us(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function cs(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return Xg(e,a,t,s)}).filter(function(a){return tm(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Xg(e,n,t,r);return tm(e,o)?o:void 0}).filter(uD)}function Zg(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,ai(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function em(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,ai(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function cR(e,t){return Zg(cs(e,t))}function tm(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!am(e)||!o)&&om(e,{label:a,value:s,data:i},r)}function uR(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function dR(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var lu=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},nm=function(t,n){return t.getOptionLabel(n)},us=function(t,n){return t.getOptionValue(n)};function rm(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function im(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=us(e,t);return n.some(function(i){return us(e,i)===r})}function om(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var am=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},fR=1,sm=function(e){VP(n,e);var t=GP(n);function n(r){var i;if(zP(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.isAppleDevice=ZO(),i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,c){var d=i.props,f=d.onChange,h=d.name;c.name=h,i.ariaOnChange(l,c),f(l,c)},i.setValue=function(l,c,d){var f=i.props,h=f.closeMenuOnSelect,p=f.isMulti,m=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:m}),h&&(i.setState({inputIsHiddenAfterUpdate:!p}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:c,option:d})},i.selectOption=function(l){var c=i.props,d=c.blurInputOnSelect,f=c.isMulti,h=c.name,p=i.state.selectValue,m=f&&i.isOptionSelected(l,p),g=i.isOptionDisabled(l,p);if(m){var v=i.getOptionValue(l);i.setValue(p.filter(function(I){return i.getOptionValue(I)!==v}),"deselect-option",l)}else if(!g)f?i.setValue([].concat(ai(p),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:h});return}d&&i.blurInput()},i.removeValue=function(l){var c=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(l),h=d.filter(function(m){return i.getOptionValue(m)!==f}),p=ao(c,h,h[0]||null);i.onChange(p,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(ao(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),h=ao(l,f,f[0]||null);i.onChange(h,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(l){return lu(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return em(cs(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return nD.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return nm(i.props,l)},i.getOptionValue=function(l){return us(i.props,l)},i.getStyles=function(l,c){var d=i.props.unstyled,f=nR[l](c,d);f.boxSizing="border-box";var h=i.props.styles[l];return h?h(f,c):f},i.getClassNames=function(l,c){var d,f;return(d=(f=i.props.classNames)[l])===null||d===void 0?void 0:d.call(f,c)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return TO(i.props)},i.buildCategorizedOptions=function(){return cs(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return Zg(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:ve({value:l},c)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&os(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var c=l.touches,d=c&&c.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var c=l.touches,d=c&&c.item(0);if(d){var f=Math.abs(d.clientX-i.initialTouchX),h=Math.abs(d.clientY-i.initialTouchY),p=5;i.userIsDragging=f>p||h>p}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var c=i.props.inputValue,d=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var c=i.getFocusableOptions(),d=c.indexOf(l);i.setState({focusedOption:l,focusedOptionId:d>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return am(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var c=i.props,d=c.isMulti,f=c.backspaceRemovesValue,h=c.escapeClearsValue,p=c.inputValue,m=c.isClearable,g=c.isDisabled,v=c.menuIsOpen,I=c.onKeyDown,S=c.tabSelectsValue,x=c.openMenuOnFocus,w=i.state,y=w.focusedOption,A=w.focusedValue,E=w.selectValue;if(!g&&!(typeof I=="function"&&(I(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!d||p)return;i.focusValue("previous");break;case"ArrowRight":if(!d||p)return;i.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(A)i.removeValue(A);else{if(!f)return;d?i.popValue():m&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!v||!S||!y||x&&i.isOptionSelected(y,E))return;i.selectOption(y);break;case"Enter":if(l.keyCode===229)break;if(v){if(!y||i.isComposing)return;i.selectOption(y);break}return;case"Escape":v?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:p}),i.onMenuClose()):m&&h&&i.clearValue();break;case" ":if(p)return;if(!v){i.openMenu("first");break}if(!y)return;i.selectOption(y);break;case"ArrowUp":v?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":v?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!v)return;i.focusOption("pageup");break;case"PageDown":if(!v)return;i.focusOption("pagedown");break;case"Home":if(!v)return;i.focusOption("first");break;case"End":if(!v)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++fR),i.state.selectValue=is(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),a=i.buildFocusableOptions(),s=a.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=a[s],i.state.focusedOptionId=lu(o,a[s])}return i}return UP(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Sg(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Sg(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,l=a.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(s[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var c=a.length-1,d=-1;if(a.length){switch(i){case"previous":l===0?d=0:l===-1?d=c:d=l-1;break;case"next":l>-1&&l<c&&(d=l+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:a[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,c=s.indexOf(a);a||(c=-1),i==="up"?l=c>0?c-1:s.length-1:i==="down"?l=(c+1)%s.length:i==="pageup"?(l=c-o,l<0&&(l=0)):i==="pagedown"?(l=c+o,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(su):ve(ve({},su),this.props.theme):su}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,l=this.getValue,c=this.selectOption,d=this.setValue,f=this.props,h=f.isMulti,p=f.isRtl,m=f.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:l,hasValue:g,isMulti:h,isRtl:p,options:m,selectOption:c,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return rm(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return im(this.props,i,o)}},{key:"filterOption",value:function(i,o){return om(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,l=i.inputValue,c=i.tabIndex,d=i.form,f=i.menuIsOpen,h=i.required,p=this.getComponents(),m=p.Input,g=this.state,v=g.inputIsHidden,I=g.ariaSelection,S=this.commonProps,x=s||this.getElementId("input"),w=ve(ve(ve({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":h,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(I==null?void 0:I.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?U.createElement(m,O({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:o,isHidden:v,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:l},w)):U.createElement(jO,O({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:rs,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:d,value:""},w))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,l=o.MultiValueLabel,c=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,h=this.commonProps,p=this.props,m=p.controlShouldRenderValue,g=p.isDisabled,v=p.isMulti,I=p.inputValue,S=p.placeholder,x=this.state,w=x.selectValue,y=x.focusedValue,A=x.isFocused;if(!this.hasValue()||!m)return I?null:U.createElement(f,O({},h,{key:"placeholder",isDisabled:g,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),S);if(v)return w.map(function(_,D){var G=_===y,F="".concat(i.getOptionLabel(_),"-").concat(i.getOptionValue(_));return U.createElement(a,O({},h,{components:{Container:s,Label:l,Remove:c},isFocused:G,isDisabled:g,key:F,index:D,removeProps:{onClick:function(){return i.removeValue(_)},onTouchEnd:function(){return i.removeValue(_)},onMouseDown:function(W){W.preventDefault()}},data:_}),i.formatOptionLabel(_,"value"))});if(I)return null;var E=w[0];return U.createElement(d,O({},h,{data:E,isDisabled:g}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,c=s.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return U.createElement(o,O({},a,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,c=s.isLoading,d=this.state.isFocused;if(!o||!c)return null;var f={"aria-hidden":"true"};return U.createElement(o,O({},a,{innerProps:f,isDisabled:l,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return U.createElement(a,O({},s,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return U.createElement(o,O({},a,{innerProps:c,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,l=o.Menu,c=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,h=o.NoOptionsMessage,p=o.Option,m=this.commonProps,g=this.state.focusedOption,v=this.props,I=v.captureMenuScroll,S=v.inputValue,x=v.isLoading,w=v.loadingMessage,y=v.minMenuHeight,A=v.maxMenuHeight,E=v.menuIsOpen,_=v.menuPlacement,D=v.menuPosition,G=v.menuPortalTarget,F=v.menuShouldBlockScroll,T=v.menuShouldScrollIntoView,W=v.noOptionsMessage,Y=v.onMenuScrollToTop,j=v.onMenuScrollToBottom;if(!E)return null;var $=function(z,V){var ne=z.type,se=z.data,ae=z.isDisabled,X=z.isSelected,le=z.label,re=z.value,ge=g===se,Se=ae?void 0:function(){return i.onOptionHover(se)},Ve=ae?void 0:function(){return i.selectOption(se)},wt="".concat(i.getElementId("option"),"-").concat(V),lt={id:wt,onClick:Ve,onMouseMove:Se,onMouseOver:Se,tabIndex:-1,role:"option","aria-selected":i.isAppleDevice?void 0:X};return U.createElement(p,O({},m,{innerProps:lt,data:se,isDisabled:ae,isSelected:X,key:wt,label:le,type:ne,value:re,isFocused:ge,innerRef:ge?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(z.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(M){if(M.type==="group"){var z=M.data,V=M.options,ne=M.index,se="".concat(i.getElementId("group"),"-").concat(ne),ae="".concat(se,"-heading");return U.createElement(a,O({},m,{key:se,data:z,options:V,Heading:s,headingProps:{id:ae,data:M.data},label:i.formatGroupLabel(M.data)}),M.options.map(function(X){return $(X,"".concat(ne,"-").concat(X.index))}))}else if(M.type==="option")return $(M,"".concat(M.index))});else if(x){var H=w({inputValue:S});if(H===null)return null;B=U.createElement(f,m,H)}else{var Q=W({inputValue:S});if(Q===null)return null;B=U.createElement(h,m,Q)}var ee={minMenuHeight:y,maxMenuHeight:A,menuPlacement:_,menuPosition:D,menuShouldScrollIntoView:T},R=U.createElement(bD,O({},m,ee),function(M){var z=M.ref,V=M.placerProps,ne=V.placement,se=V.maxHeight;return U.createElement(l,O({},m,ee,{innerRef:z,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:x,placement:ne}),U.createElement(GO,{captureEnabled:I,onTopArrive:Y,onBottomArrive:j,lockEnabled:F},function(ae){return U.createElement(c,O({},m,{innerRef:function(le){i.getMenuListRef(le),ae(le)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:i.getElementId("listbox")},isLoading:x,maxHeight:se,focusedOption:g}),B)}))});return G||D==="fixed"?U.createElement(d,O({},m,{appendTo:G,controlElement:this.controlRef,menuPlacement:_,menuPosition:D}),R):R}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,l=o.isMulti,c=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!s)return U.createElement(QO,{name:c,onFocus:this.onValueInputFocus});if(!(!c||s))if(l)if(a){var h=f.map(function(g){return i.getOptionValue(g)}).join(a);return U.createElement("input",{name:c,type:"hidden",value:h})}else{var p=f.length>0?f.map(function(g,v){return U.createElement("input",{key:"i-".concat(v),name:c,type:"hidden",value:i.getOptionValue(g)})}):U.createElement("input",{name:c,type:"hidden",value:""});return U.createElement("div",null,p)}else{var m=f[0]?this.getOptionValue(f[0]):"";return U.createElement("input",{name:c,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,l=o.focusedValue,c=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return U.createElement(LO,O({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,c=this.props,d=c.className,f=c.id,h=c.isDisabled,p=c.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return U.createElement(s,O({},g,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:m}),this.renderLiveRegion(),U.createElement(o,O({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:m,menuIsOpen:p}),U.createElement(l,O({},g,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),U.createElement(a,O({},g,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,h=o.instancePrefix,p=i.options,m=i.value,g=i.menuIsOpen,v=i.inputValue,I=i.isMulti,S=is(m),x={};if(a&&(m!==a.value||p!==a.options||g!==a.menuIsOpen||v!==a.inputValue)){var w=g?cR(i,S):[],y=g?em(cs(i,S),"".concat(h,"-option")):[],A=s?uR(o,S):null,E=dR(o,w),_=lu(y,E);x={selectValue:S,focusedOption:E,focusedOptionId:_,focusableOptionsWithIds:y,focusedValue:A,clearFocusValueOnUpdate:!1}}var D=l!=null&&i!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},G=c,F=d&&f;return d&&!F&&(G={value:ao(I,S,S[0]||null),options:S,action:"initial-input-focus"},F=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(G=null),ve(ve(ve({},x),D),{},{prevProps:i,ariaSelection:G,prevWasFocused:F})}}]),n}(C.Component);sm.defaultProps=lR;var hR=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function pR(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,a=o===void 0?null:o,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,p=e.value,m=Cn(e,hR),g=C.useState(s!==void 0?s:n),v=Vn(g,2),I=v[0],S=v[1],x=C.useState(l!==void 0?l:i),w=Vn(x,2),y=w[0],A=w[1],E=C.useState(p!==void 0?p:a),_=Vn(E,2),D=_[0],G=_[1],F=C.useCallback(function(H,Q){typeof c=="function"&&c(H,Q),G(H)},[c]),T=C.useCallback(function(H,Q){var ee;typeof d=="function"&&(ee=d(H,Q)),S(ee!==void 0?ee:H)},[d]),W=C.useCallback(function(){typeof h=="function"&&h(),A(!0)},[h]),Y=C.useCallback(function(){typeof f=="function"&&f(),A(!1)},[f]),j=s!==void 0?s:I,$=l!==void 0?l:y,B=p!==void 0?p:D;return ve(ve({},m),{},{inputValue:j,menuIsOpen:$,onChange:F,onInputChange:T,onMenuClose:Y,onMenuOpen:W,value:B})}var gR=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],lm=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return o===i||a===i},cu={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return lm(t,o,i)})||r.some(function(o){return lm(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function mR(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,a=o===void 0?cu.formatCreateLabel:o,s=e.isValidNewOption,l=s===void 0?cu.isValidNewOption:s,c=e.getNewOptionData,d=c===void 0?cu.getNewOptionData:c,f=e.onCreateOption,h=e.options,p=h===void 0?[]:h,m=e.onChange,g=Cn(e,gR),v=g.getOptionValue,I=v===void 0?qg:v,S=g.getOptionLabel,x=S===void 0?Qg:S,w=g.inputValue,y=g.isLoading,A=g.isMulti,E=g.value,_=g.name,D=C.useMemo(function(){return l(w,is(E),p,{getOptionValue:I,getOptionLabel:x})?d(w,a(w)):void 0},[a,d,x,I,w,l,p,E]),G=C.useMemo(function(){return(n||!y)&&D?i==="first"?[D].concat(ai(p)):[].concat(ai(p),[D]):p},[n,i,y,D,p]),F=C.useCallback(function(T,W){if(W.action!=="select-option")return m(T,W);var Y=Array.isArray(T)?T:[T];if(Y[Y.length-1]===D){if(f)f(w);else{var j=d(w,w),$={action:"create-option",name:_,option:j};m(ao(A,[].concat(ai(is(E)),[j]),j),$)}return}m(T,W)},[d,w,A,_,D,f,m,E]);return ve(ve({},g),{},{options:G,onChange:F})}var vR=C.forwardRef(function(e,t){var n=pR(e),r=mR(n);return U.createElement(sm,O({ref:t},r))}),cm=vR;const bR={control:(e,t)=>q(N({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px",fontFamily:'var(--joy-fontFamily-body, "Inter", var(--joy-fontFamily-fallback, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"));',"&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(N({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(N({},e),{minHeight:"36px"}),menu:e=>q(N({},e),{position:"relative"}),clearIndicator:e=>q(N({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(N({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(N({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(N({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"14px"}),multiValueLabel:e=>q(N({},e),{color:"#333"})},yR=e=>e.map(t=>({label:t,value:t})),xR=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=e.sx||{marginBottom:"16px"},a=yR(e.flags),s=()=>i(!r),l=h=>{e.onChange(h.map(p=>p.value))},c=h=>{n(h)},d=h=>{h.persist();const{key:p}=h;if(t)switch(p){case"Enter":case"Tab":if(e.flags&&e.flags.length===0){const m=[...e.flags,t];e.onChange(m)}if(e.flags&&e.flags.length>0&&f()){const m=[...e.flags,t];e.onChange(m)}n(""),h.preventDefault()}},f=()=>{let h=!1;return e.flags.length&&e.flags.includes(t)?(s(),h):(h=!0,h)};return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:o,children:u.jsx(cm,{styles:bR,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:l,onInputChange:c,onKeyDown:d,placeholder:e.labels.flagsPlaceholder,value:a})}),u.jsx(at,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:s})]})},lo=e=>{const[t,n]=C.useState(!1),[r,i]=C.useState(!1),[o,a]=C.useState(!1),[s,l]=C.useState(!1),[c,d]=C.useState(""),[f,h]=C.useState("primary"),[p,m]=C.useState(""),g=C.useRef(null),v=()=>{g.current&&g.current.click()},I=new Bp,S=ft(),x=()=>{d(""),i(!1)},w=W=>{let Y="",j="primary";switch(W){case"copy_url":Y=e.labels.urlCopiedToClipboardMessage,j="primary";break;case"image_deleted":Y=e.labels.imageDeletedMessage,j="primary";break;case"image_reset":Y=e.labels.imageResetMessage,j="primary";break;case"upload_success":Y=e.labels.uploadingImageMessage,j="success";break;case"upload_failed":Y=e.labels.uploadingImageErrorMessage,j="danger";break;case"sign_in_url_failed":Y=e.labels.generateSignedInUrlErrorMessage,j="danger";break;case"encrypting_file_failed":Y=e.labels.encryptingImageErrorMessage,j="danger";break}h(j),d(Y),i(!0)},y=()=>a(!o),A=()=>l(!s),E=()=>{e.clearImage(),w("image_deleted")},_=W=>{navigator.clipboard.writeText(W),w("copy_url")},D=W=>k(this,null,function*(){W.persist();const Y=W.target.files?W.target.files[0]:null;if(Y){n(!0);try{const j=Y.type.split("/")[1],$=yield I.readFileAndHash(Y),B=(yield I.generateHashFileName(Y))+"."+j,H={image_type:j,image_file_name:B,image_size:Y.size,base64_sum:$},Q=yield S==null?void 0:S.https.generateSignedInUrl(H);if(Q!=null&&Q.ok){const ee=yield Q.json(),R={"Content-Type":Y.type,"Content-MD5":$};try{const M=new File([Y],B,{type:Y.type}),z=yield S==null?void 0:S.https.storeInBucket(ee.data.signed_url,M,R);e.onChangeImages(z||""),m(z),w("upload_success")}catch(M){console.error("There was a problem with uploading the file: ",M),w("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield Q==null?void 0:Q.json()),w("sign_in_url_failed")}catch(j){console.error("There was a problem with encrypting file...",j),w("encrypting_file_failed")}n(!1)}}),G=W=>k(this,null,function*(){if(W){n(!0);try{const Y=W.type.split("/")[1],j=yield I.readFileAndHash(W),$=(yield I.generateHashFileName(W))+"."+Y,B={image_type:Y,image_file_name:$,image_size:W.size,base64_sum:j},H=yield S==null?void 0:S.https.generateSignedInUrl(B);if(H!=null&&H.ok){const Q=yield H.json(),ee={"Content-Type":W.type,"Content-MD5":j};try{const R=new File([W],$,{type:W.type}),M=yield S==null?void 0:S.https.storeInBucket(Q.data.signed_url,R,ee);e.onChangeImages(M||""),w("upload_success")}catch(R){console.error("There was a problem with uploading the file: ",R),w("upload_failed")}}else console.error("There was a problem with generating signed in URL: ",yield H==null?void 0:H.json()),w("sign_in_url_failed")}catch(Y){console.error("There was a problem with encrypting file...",Y),w("encrypting_file_failed")}n(!1)}}),F=()=>{e.onChangeImages(p),w("image_reset")},T=W=>{e.onChangeImages(W),m(W)};return u.jsxs(u.Fragment,{children:[u.jsxs(b.Card,{sx:{marginBottom:"10px"},children:[u.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsx(b.Typography,{level:"title-lg",children:e.title}),u.jsx(b.Tooltip,{title:e.labels.clearImage,children:u.jsx(b.IconButton,{variant:"plain",color:"danger",size:"sm",onClick:E,children:u.jsx(Sp,{})})})]}),u.jsxs(b.AspectRatio,{maxHeight:"200px",ratio:"16/9",sx:{position:"relative"},children:[u.jsxs(b.Skeleton,{loading:t,animation:"wave",children:[e.image?u.jsx(b.Box,{component:"img",src:e.image,loading:"lazy",alt:e.title,sx:{width:"100%",height:"100%",position:"relative",transition:"background-color 0.3s ease","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.3)"}}}):u.jsx(Pc,{sx:{fontSize:"3rem",opacity:.2}}),e.image?u.jsx(b.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease","&:hover":{opacity:1}},children:u.jsx(Np,{sx:{fontSize:"3rem",color:"#fff"}})}):u.jsx(u.Fragment,{})]}),u.jsx(b.Tooltip,{title:e.labels.copyUrl,children:u.jsx(b.Button,{onClick:()=>_(e.image),disabled:!e.image,sx:{position:"absolute",top:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(Oe.ContentCopy,{})})}),u.jsx(b.Tooltip,{title:e.labels.viewImage,children:u.jsx(b.Button,{onClick:y,disabled:!e.image,sx:{position:"absolute",top:"10px",right:"10px"},variant:"soft",color:"neutral",children:u.jsx(jp,{})})}),u.jsx(b.Tooltip,{title:e.labels.cropImage,children:u.jsx(b.Button,{onClick:A,disabled:!e.image,sx:{position:"absolute",bottom:"10px",left:"10px"},variant:"soft",color:"neutral",children:u.jsx(ig,{})})})]}),u.jsx(b.CardContent,{orientation:"horizontal",sx:{justifyContent:"space-between"},children:u.jsxs(b.Button,{sx:{width:"100%"},onClick:v,children:[u.jsx(Oe.Upload,{})," ",e.labels.uploadImage,u.jsx(zp,{type:"file",accept:"image/*",onChange:D,ref:g})]})}),S.https.sportal365Config?u.jsx(b.AccordionGroup,{variant:"soft",children:u.jsxs(b.Accordion,{children:[u.jsx(b.AccordionSummary,{children:u.jsx(b.Typography,{fontWeight:"bold",sx:{color:"#ef8b34"},children:e.labels.sportal365Images})}),u.jsx(b.AccordionDetails,{children:u.jsx(Fp,{labels:e.labels,onChangeImages:T})})]})}):u.jsx(u.Fragment,{})]}),u.jsx(at,{showToast:r,message:c,color:f,hideToast:x}),u.jsx($p,{title:e.labels.viewImage,open:o,imageSrc:e.image,toggleModal:y}),u.jsx(rg,{labels:e.labels,open:s,imageSrc:e.image,toggleModal:A,uploadImage:G,resetDefaultImageUrl:F})]})},CR=["cover","mobile"],wR=e=>new Map().set("main",e.mainImage).set("cover",e.coverImage).set("mobile",e.mobileImage),IR=e=>e?N({},e):{main:"",mobile:"",cover:""},SR=e=>{const[t,n]=C.useState(!1),r=IR(e.defaultValue),i=wR(e.labels),o=(s,l)=>{r[l]=s,e.onChange(r)},a=s=>{r[s]="",e.onChange(r)};return u.jsxs(b.Box,{sx:{marginBottom:"10px"},children:[u.jsx(lo,{labels:e.labels,title:e.labels.mainImage,image:r.main,onChangeImages:s=>o(s,"main"),clearImage:()=>a("main")}),u.jsx(b.Link,{underline:"hover",onClick:()=>n(!t),sx:{marginBottom:"10px"},children:t?e.labels.hideMoreImages:e.labels.showMoreImages}),t?u.jsx(u.Fragment,{children:CR.map(s=>u.jsx(lo,{labels:e.labels,title:i.get(s),image:r[s],onChangeImages:l=>o(l,s),clearImage:()=>a(s)},`images-${s}`))}):u.jsx(u.Fragment,{})]})};function AR(e){return it("MuiSheet",e)}Xe("MuiSheet",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const TR=["className","color","component","variant","invertedColors","slots","slotProps"],ER=e=>{const{variant:t,color:n}=e,r={root:["root",t&&`variant${ye(t)}`,n&&`color${ye(n)}`]};return ut(r,AR,{})},kR=be("div",{name:"JoySheet",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r;const i=(n=e.variants[t.variant])==null?void 0:n[t.color],{borderRadius:o,bgcolor:a,backgroundColor:s,background:l}=ac({theme:e,ownerState:t},["borderRadius","bgcolor","backgroundColor","background"]),c=tr(e,`palette.${a}`)||a||tr(e,`palette.${s}`)||s||l||(i==null?void 0:i.backgroundColor)||(i==null?void 0:i.background)||e.vars.palette.background.surface;return[O({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,"--ListItem-stickyBackground":c==="transparent"?"initial":c,"--Sheet-background":c==="transparent"?"initial":c},o!==void 0&&{"--List-radius":`calc(${o} - var(--variant-borderWidth, 0px))`,"--unstable_actionRadius":`calc(${o} - var(--variant-borderWidth, 0px))`},{backgroundColor:e.vars.palette.background.surface,position:"relative"}),O({},e.typography["body-md"],t.variant==="solid"&&t.color&&t.invertedColors&&r_(t.color)(e),t.variant==="soft"&&t.color&&t.invertedColors&&i_(t.color)(e),(r=e.variants[t.variant])==null?void 0:r[t.color],i)]}),_R=U.forwardRef(function(t,n){const r=dt({props:t,name:"JoySheet"}),{className:i,color:o="neutral",component:a="div",variant:s="plain",invertedColors:l=!1,slots:c={},slotProps:d={}}=r,f=Ae(r,TR),h=O({},r,{color:o,component:a,invertedColors:l,variant:s}),p=ER(h),m=O({},f,{component:a,slots:c,slotProps:d}),[g,v]=Ie("root",{ref:n,className:Bn(p.root,i),elementType:kR,externalForwardedProps:m,ownerState:h});return u.jsx(g,O({},v))});function PR(e){return it("MuiTypography",e)}Xe("MuiTypography",["root","h1","h2","h3","h4","title-lg","title-md","title-sm","body-lg","body-md","body-sm","body-xs","noWrap","gutterBottom","startDecorator","endDecorator","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid"]);const DR=["color","textColor"],OR=["component","gutterBottom","noWrap","level","levelMapping","children","endDecorator","startDecorator","variant","slots","slotProps"],uu=U.createContext(!1),RR=U.createContext(!1),LR=e=>{const{gutterBottom:t,noWrap:n,level:r,color:i,variant:o}=e,a={root:["root",r,t&&"gutterBottom",n&&"noWrap",i&&`color${ye(i)}`,o&&`variant${ye(o)}`],startDecorator:["startDecorator"],endDecorator:["endDecorator"]};return ut(a,PR,{})},MR=be("span",{name:"JoyTypography",slot:"StartDecorator",overridesResolver:(e,t)=>t.startDecorator})({display:"inline-flex",marginInlineEnd:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),BR=be("span",{name:"JoyTypography",slot:"endDecorator",overridesResolver:(e,t)=>t.endDecorator})({display:"inline-flex",marginInlineStart:"clamp(4px, var(--Typography-gap, 0.375em), 0.75rem)"}),$R=be("span",{name:"JoyTypography",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=t.level!=="inherit"?(n=e.typography[t.level])==null?void 0:n.lineHeight:"1";return O({"--Icon-fontSize":`calc(1em * ${s})`},t.color&&{"--Icon-color":"currentColor"},{margin:"var(--Typography-margin, 0px)"},t.nesting?{display:"inline"}:O({display:"block"},t.unstable_hasSkeleton&&{position:"relative"}),(t.startDecorator||t.endDecorator)&&O({display:"flex",alignItems:"center"},t.nesting&&O({display:"inline-flex"},t.startDecorator&&{verticalAlign:"bottom"})),t.level&&t.level!=="inherit"&&e.typography[t.level],{fontSize:`var(--Typography-fontSize, ${t.level&&t.level!=="inherit"&&(r=(i=e.typography[t.level])==null?void 0:i.fontSize)!=null?r:"inherit"})`},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.color&&{color:`var(--variant-plainColor, rgba(${(o=e.vars.palette[t.color])==null?void 0:o.mainChannel} / 1))`},t.variant&&O({borderRadius:e.vars.radius.xs,paddingBlock:"min(0.1em, 4px)",paddingInline:"0.25em"},!t.nesting&&{marginInline:"-0.25em"},(a=e.variants[t.variant])==null?void 0:a[t.color]))}),um={h1:"h1",h2:"h2",h3:"h3",h4:"h4","title-lg":"p","title-md":"p","title-sm":"p","body-lg":"p","body-md":"p","body-sm":"p","body-xs":"span",inherit:"p"},du=U.forwardRef(function(t,n){var r;const i=dt({props:t,name:"JoyTypography"}),{color:o,textColor:a}=i,s=Ae(i,DR),l=U.useContext(uu),c=U.useContext(RR),d=YA(O({},s,{color:a})),{component:f,gutterBottom:h=!1,noWrap:p=!1,level:m="body-md",levelMapping:g=um,children:v,endDecorator:I,startDecorator:S,variant:x,slots:w={},slotProps:y={}}=d,A=Ae(d,OR),E=(r=t.color)!=null?r:x?o!=null?o:"neutral":o,_=l||c?t.level||"inherit":m,D=qf(v,["Skeleton"]),G=f||(l?"span":g[_]||um[_]||"span"),F=O({},d,{level:_,component:G,color:E,gutterBottom:h,noWrap:p,nesting:l,variant:x,unstable_hasSkeleton:D}),T=LR(F),W=O({},A,{component:G,slots:w,slotProps:y}),[Y,j]=Ie("root",{ref:n,className:T.root,elementType:$R,externalForwardedProps:W,ownerState:F}),[$,B]=Ie("startDecorator",{className:T.startDecorator,elementType:MR,externalForwardedProps:W,ownerState:F}),[H,Q]=Ie("endDecorator",{className:T.endDecorator,elementType:BR,externalForwardedProps:W,ownerState:F});return u.jsx(uu.Provider,{value:!0,children:u.jsxs(Y,O({},j,{children:[S&&u.jsx($,O({},B,{children:S})),D?U.cloneElement(v,{variant:v.props.variant||"inline"}):v,I&&u.jsx(H,O({},Q,{children:I}))]}))})});du.muiName="Typography";function NR(e){return it("MuiFormControl",e)}const dm=Xe("MuiFormControl",["root","error","disabled","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","sizeSm","sizeMd","sizeLg","horizontal","vertical"]),FR=Xe("MuiSwitch",["root","checked","disabled","action","input","thumb","track","focusVisible","readOnly","colorPrimary","colorDanger","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid","startDecorator","endDecorator"]),jR=["id","className","component","disabled","required","error","color","size","orientation","slots","slotProps"],zR=e=>{const{disabled:t,error:n,size:r,color:i,orientation:o}=e,a={root:["root",o,t&&"disabled",n&&"error",i&&`color${ye(i)}`,r&&`size${ye(r)}`]};return ut(a,NR,{})},UR=be("div",{name:"JoyFormControl",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>{var n,r,i;return O({"--unstable_RadioGroup-margin":"0.5rem 0","--FormLabel-alignSelf":t.orientation==="horizontal"?"align-items":"flex-start","--FormLabel-asteriskColor":e.vars.palette.danger[500]},t.size==="sm"&&{"--FormLabel-fontSize":e.vars.fontSize.xs,"--FormLabel-lineHeight":e.vars.lineHeight.xl,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.5rem 0 0":"0 0 0.25rem 0","--FormHelperText-fontSize":e.vars.fontSize.xs,"--FormHelperText-lineHeight":e.vars.lineHeight.xl},t.size==="md"&&{"--FormLabel-fontSize":e.vars.fontSize.sm,"--FormLabel-lineHeight":e.vars.lineHeight.sm,"--FormLabel-margin":t.orientation==="horizontal"?"0 0.75rem 0 0":"0 0 0.375rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.size==="lg"&&{"--FormLabel-fontSize":e.vars.fontSize.md,"--FormLabel-lineHeight":e.vars.lineHeight.md,"--FormLabel-margin":t.orientation==="horizontal"?"0 1rem 0 0":"0 0 0.5rem 0","--FormHelperText-fontSize":e.vars.fontSize.sm,"--FormHelperText-lineHeight":e.vars.lineHeight.sm},t.color&&{"--FormHelperText-color":(n=e.vars.palette[t.color])==null?void 0:n[500]},{"--FormHelperText-margin":"0.375rem 0 0 0",[`&.${dm.error}`]:{"--FormHelperText-color":e.vars.palette.danger[500]},[`&.${dm.disabled}`]:{"--FormLabel-color":(r=e.variants.plainDisabled)==null||(r=r[t.color||"neutral"])==null?void 0:r.color,"--FormHelperText-color":(i=e.variants.plainDisabled)==null||(i=i[t.color||"neutral"])==null?void 0:i.color},display:"flex",position:"relative",flexDirection:t.orientation==="horizontal"?"row":"column"},t.orientation==="horizontal"&&{[`& > label ~ .${FR.root}`]:{"--unstable_Switch-margin":"0 0 0 auto"}})}),fu=U.forwardRef(function(t,n){const r=dt({props:t,name:"JoyFormControl"}),{id:i,className:o,component:a="div",disabled:s=!1,required:l=!1,error:c=!1,color:d,size:f="md",orientation:h="vertical",slots:p={},slotProps:m={}}=r,g=Ae(r,jR),v=Vi(i),[I,S]=U.useState(null),x=O({},r,{id:v,component:a,color:d,disabled:s,error:c,required:l,size:f,orientation:h});let w;const y=zR(x),[A,E]=Ie("root",{ref:n,className:Bn(y.root,o),elementType:UR,externalForwardedProps:O({},g,{component:a,slots:p,slotProps:m}),ownerState:x}),_=U.useMemo(()=>({disabled:s,required:l,error:c,color:d,size:f,htmlFor:v,labelId:`${v}-label`,"aria-describedby":I?`${v}-helper-text`:void 0,setHelperText:S,registerEffect:w}),[d,s,c,I,v,w,l,f]);return u.jsx(Ha.Provider,{value:_,children:u.jsx(A,O({},E))})});function VR(e){return it("MuiFormLabel",e)}Xe("MuiFormLabel",["root","asterisk"]);const HR=["children","component","htmlFor","id","slots","slotProps"],WR=()=>ut({root:["root"],asterisk:["asterisk"]},VR,{}),GR=be("label",{name:"JoyFormLabel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({"--Icon-fontSize":"calc(var(--FormLabel-lineHeight) * 1em)",WebkitTapHighlightColor:"transparent",alignSelf:"var(--FormLabel-alignSelf)",display:"flex",gap:"2px",alignItems:"center",flexWrap:"wrap",userSelect:"none",fontFamily:e.vars.fontFamily.body,fontSize:`var(--FormLabel-fontSize, ${e.vars.fontSize.sm})`,fontWeight:e.vars.fontWeight.md,lineHeight:`var(--FormLabel-lineHeight, ${e.vars.lineHeight.sm})`,color:`var(--FormLabel-color, ${e.vars.palette.text.primary})`,margin:"var(--FormLabel-margin, 0px)"})),YR=be("span",{name:"JoyFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})({color:"var(--FormLabel-asteriskColor)"}),hu=U.forwardRef(function(t,n){var r,i;const o=dt({props:t,name:"JoyFormLabel"}),{children:a,component:s="label",htmlFor:l,id:c,slots:d={},slotProps:f={}}=o,h=Ae(o,HR),p=U.useContext(Ha),m=(r=(i=t.required)!=null?i:p==null?void 0:p.required)!=null?r:!1,g=O({},o,{required:m}),v=WR(),I=O({},h,{component:s,slots:d,slotProps:f}),[S,x]=Ie("root",{additionalProps:{htmlFor:l!=null?l:p==null?void 0:p.htmlFor,id:c!=null?c:p==null?void 0:p.labelId},ref:n,className:v.root,elementType:GR,externalForwardedProps:I,ownerState:g}),[w,y]=Ie("asterisk",{additionalProps:{"aria-hidden":!0},className:v.asterisk,elementType:YR,externalForwardedProps:I,ownerState:g});return u.jsxs(S,O({},x,{children:[a,m&&u.jsxs(w,O({},y,{children:[" ","*"]}))]}))}),KR=({environment:e,userNotFound:t})=>{const[n,r]=C.useState(""),[i,o]=C.useState(""),[a,s]=C.useState(!1),l=()=>{s(!a)},c=h=>{h.persist(),r(h.target.value)},d=h=>{h.persist(),o(h.target.value)},f=()=>k(this,null,function*(){try{yield Ui(e).signInWithEmailAndPassword(n,i)}catch(h){console.error(h),l()}});return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:u.jsxs(_R,{sx:{width:300,mx:"auto",py:3,px:2,display:"flex",flexDirection:"column",justifyContent:"center",gap:2,borderRadius:"sm",boxShadow:"md"},variant:"outlined",children:[u.jsxs("div",{children:[u.jsx(du,{level:"h4",component:"h1",children:u.jsx("b",{children:"Sign in"})}),u.jsx(du,{level:"body-sm",children:"Use your account in the Fans United platform."})]}),u.jsxs(fu,{children:[u.jsx(hu,{children:"Email"}),u.jsx(Wa,{name:"email",type:"email",onChange:c})]}),u.jsxs(fu,{children:[u.jsx(hu,{children:"Password"}),u.jsx(Wa,{name:"password",type:"password",onChange:d})]}),u.jsx(ti,{sx:{mt:1},onClick:f,children:"Log in"})]})}),u.jsx(at,{showToast:a,message:t,color:"danger",hideToast:l})]})};function QR(e){return it("MuiCheckbox",e)}const li=Xe("MuiCheckbox",["root","checkbox","action","input","label","checked","disabled","focusVisible","indeterminate","colorPrimary","colorDanger","colorNeutral","colorSuccess","colorWarning","colorContext","sizeSm","sizeMd","sizeLg","variantOutlined","variantSoft","variantSolid"]),qR=cc(u.jsx("path",{d:"M9 16.17 5.53 12.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.18 4.18c.39.39 1.02.39 1.41 0L20.29 7.71c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L9 16.17z"}),"Check"),JR=cc(u.jsx("path",{d:"M19 13H5c-.55 0-1-.45-1-1s.45-1 1-1h14c.55 0 1 .45 1 1s-.45 1-1 1z"}),"HorizontalRule"),XR=["checked","uncheckedIcon","checkedIcon","label","defaultChecked","disabled","disableIcon","overlay","id","indeterminate","indeterminateIcon","name","onBlur","onChange","onFocus","onFocusVisible","readOnly","required","value","color","variant","size","component","slots","slotProps"],ZR=e=>{const{checked:t,disabled:n,disableIcon:r,focusVisible:i,color:o,variant:a,size:s,indeterminate:l}=e,c={root:["root",t&&"checked",n&&"disabled",i&&"focusVisible",a&&`variant${ye(a)}`,o&&`color${ye(o)}`,s&&`size${ye(s)}`],checkbox:["checkbox",t&&"checked",l&&"indeterminate",n&&"disabled"],action:["action",t&&"checked",r&&n&&"disabled",i&&"focusVisible"],input:["input"],label:["label"]};return ut(c,QR,{})},eL=be("span",{name:"JoyCheckbox",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>{var n,r,i;return O({"--Icon-fontSize":"var(--Checkbox-size)"},e.size==="sm"&&{"--Checkbox-size":"1rem","& ~ *":{"--FormHelperText-margin":"0 0 0 1.5rem"},fontSize:t.vars.fontSize.sm,gap:"var(--Checkbox-gap, 0.5rem)"},e.size==="md"&&{"--Checkbox-size":"1.25rem","& ~ *":{"--FormHelperText-margin":"0.25rem 0 0 1.875rem"},fontSize:t.vars.fontSize.md,gap:"var(--Checkbox-gap, 0.625rem)"},e.size==="lg"&&{"--Checkbox-size":"1.5rem","& ~ *":{"--FormHelperText-margin":"0.375rem 0 0 2.25rem"},fontSize:t.vars.fontSize.lg,gap:"var(--Checkbox-gap, 0.75rem)"},{position:e.overlay?"initial":"relative",display:"inline-flex",fontFamily:t.vars.fontFamily.body,lineHeight:"var(--Checkbox-size)",color:t.vars.palette.text.primary,[`&.${li.disabled}`]:{color:(n=t.variants.plainDisabled)==null||(n=n[e.color])==null?void 0:n.color}},e.disableIcon&&{color:(r=t.variants[e.variant])==null||(r=r[e.color])==null?void 0:r.color,[`&.${li.disabled}`]:{color:(i=t.variants[`${e.variant}Disabled`])==null||(i=i[e.color])==null?void 0:i.color}})}),tL=be("span",{name:"JoyCheckbox",slot:"Checkbox",overridesResolver:(e,t)=>t.checkbox})(({theme:e,ownerState:t})=>{var n,r,i,o,a;const s=(n=e.variants[`${t.variant}`])==null?void 0:n[t.color];return[O({"--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon,boxSizing:"border-box",borderRadius:`min(${e.vars.radius.sm}, 0.25rem)`,width:"var(--Checkbox-size)",height:"var(--Checkbox-size)",display:"inline-flex",justifyContent:"center",alignItems:"center",flexShrink:0},t.disableIcon&&{display:"contents"},{[`&.${li.checked}, &.${li.indeterminate}`]:{"--Icon-color":"currentColor"}}),...t.disableIcon?[]:[O({},s,{backgroundColor:(r=s==null?void 0:s.backgroundColor)!=null?r:e.vars.palette.background.surface}),{"&:hover":{"@media (hover: hover)":(i=e.variants[`${t.variant}Hover`])==null?void 0:i[t.color]}},{"&:active":(o=e.variants[`${t.variant}Active`])==null?void 0:o[t.color]},{[`&.${li.disabled}`]:(a=e.variants[`${t.variant}Disabled`])==null?void 0:a[t.color]}]]}),nL=be("span",{name:"JoyCheckbox",slot:"Action",overridesResolver:(e,t)=>t.action})(({theme:e,ownerState:t})=>{var n,r,i,o;return[{borderRadius:`var(--Checkbox-actionRadius, ${t.overlay?"var(--unstable_actionRadius, inherit)":"inherit"})`,textAlign:"left",position:"absolute",top:"calc(-1 * var(--variant-borderWidth, 0px))",left:"calc(-1 * var(--variant-borderWidth, 0px))",bottom:"calc(-1 * var(--variant-borderWidth, 0px))",right:"calc(-1 * var(--variant-borderWidth, 0px))",zIndex:1,[e.focus.selector]:e.focus.default},...t.disableIcon?[(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color]},{"&:active":(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]},{[`&.${li.disabled}`]:(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]}]:[]]}),rL=be("input",{name:"JoyCheckbox",slot:"Input",overridesResolver:(e,t)=>t.input})(()=>({margin:0,opacity:0,position:"absolute",width:"100%",height:"100%",cursor:"pointer"})),iL=be("label",{name:"JoyCheckbox",slot:"Label",overridesResolver:(e,t)=>t.label})(({ownerState:e})=>O({flex:1,minWidth:0},e.disableIcon&&{zIndex:1,pointerEvents:"none"})),oL=u.jsx(qR,{}),aL=u.jsx(JR,{}),sL=U.forwardRef(function(t,n){var r,i,o,a,s;const l=dt({props:t,name:"JoyCheckbox"}),{checked:c,uncheckedIcon:d,checkedIcon:f=oL,label:h,defaultChecked:p,disabled:m,disableIcon:g=!1,overlay:v,id:I,indeterminate:S=!1,indeterminateIcon:x=aL,name:w,onBlur:y,onChange:A,onFocus:E,onFocusVisible:_,readOnly:D,required:G,value:F,color:T,variant:W,size:Y="md",component:j,slots:$={},slotProps:B={}}=l,H=Ae(l,XR),Q=U.useContext(Ha),ee=(r=(i=t.disabled)!=null?i:Q==null?void 0:Q.disabled)!=null?r:m,R=(o=(a=t.size)!=null?a:Q==null?void 0:Q.size)!=null?o:Y,M=Vi(I!=null?I:Q==null?void 0:Q.htmlFor),z={checked:c,defaultChecked:p,disabled:ee,onBlur:y,onChange:A,onFocus:E,onFocusVisible:_},{getInputProps:V,checked:ne,disabled:se,focusVisible:ae}=$S(z),X=ne||S,ge=X?W||"solid":W||"outlined",Se=t.color||(Q!=null&&Q.error?"danger":(s=Q==null?void 0:Q.color)!=null?s:T),lt=O({},l,{checked:ne,disabled:se,disableIcon:g,overlay:v,focusVisible:ae,color:X?Se||"primary":Se||"neutral",variant:ge,size:R}),_t=ZR(lt),de=O({},H,{component:j,slots:$,slotProps:B}),[he,xe]=Ie("root",{ref:n,className:_t.root,elementType:eL,externalForwardedProps:de,ownerState:lt}),[Te,He]=Ie("checkbox",{className:_t.checkbox,elementType:tL,externalForwardedProps:de,ownerState:lt}),[Pe,Ee]=Ie("action",{className:_t.action,elementType:nL,externalForwardedProps:de,ownerState:lt}),[It,St]=Ie("input",{additionalProps:O({id:M,name:w,value:F,readOnly:D,role:void 0,required:G!=null?G:Q==null?void 0:Q.required,"aria-describedby":Q==null?void 0:Q["aria-describedby"]},S&&{"aria-checked":"mixed"}),className:_t.input,elementType:rL,externalForwardedProps:de,getSlotProps:V,ownerState:lt}),[zt,Lt]=Ie("label",{additionalProps:{htmlFor:M},className:_t.label,elementType:iL,externalForwardedProps:de,ownerState:lt});let Qt=d;return g?Qt=null:S?Qt=x:ne&&(Qt=f),u.jsxs(he,O({},xe,{children:[u.jsxs(Te,O({},He,{children:[u.jsx(Pe,O({},Ee,{children:u.jsx(It,O({},St))})),Qt]})),h&&u.jsx(uu.Provider,{value:!0,children:u.jsx(zt,O({},Lt,{children:h}))})]}))}),lL=Ue(u.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),Ir=({label:e,values:t,allValues:n,valuesMap:r,showAll:i,showAllLabel:o,onChange:a,toggleShowAll:s})=>{const l=(c,d)=>{c.persist();let f=[...t];if(c.target.checked){f.push(d),a(f);return}f=t.filter(h=>h!==d),a(f)};return u.jsxs(b.Box,{sx:{mb:2},children:[u.jsx(b.Typography,{level:"body-sm",mb:1,children:e}),u.jsxs(U1,{orientation:"horizontal",wrap:!0,sx:{columnGap:"12px","--List-gap":"8px","--ListItem-radius":"20px","--ListItem-minHeight":"32px","--ListItem-gap":"4px"},children:[n.map(c=>u.jsxs(Fh,{children:[t.includes(c)&&u.jsx(lL,{fontSize:"medium",color:"primary",sx:{ml:-.5,zIndex:2,pointerEvents:"none"}}),u.jsx(sL,{checked:t.includes(c),variant:t.includes(c)?"soft":"outlined",overlay:!0,disableIcon:!0,label:r[c]||"N/A",onChange:d=>l(d,c),slotProps:{action:({checked:d})=>({sx:d?{border:"1px solid",borderColor:"primary.500"}:{backgroundColor:"#fff"}})}})]},`checkbox-value-${e}-${c}`)),i===!1?u.jsx(Fh,{children:u.jsx(b.Link,{onClick:s,children:o})}):u.jsx(u.Fragment,{})]})]})},ci={popular:["FT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","CORRECT_SCORE","OVER_CORNERS_9_5"],playerRelated:["PLAYER_YELLOW_CARD","PLAYER_RED_CARD","PLAYER_SCORE","PLAYER_SCORE_FIRST_GOAL","PLAYER_SCORE_TWICE","PLAYER_SCORE_HATTRICK"],goals:["OVER_GOALS_0_5","OVER_GOALS_1_5","OVER_GOALS_2_5","OVER_GOALS_3_5","OVER_GOALS_4_5","OVER_GOALS_5_5","OVER_GOALS_6_5"],corners:["CORNERS_MATCH","OVER_CORNERS_6_5","OVER_CORNERS_7_5","OVER_CORNERS_8_5","OVER_CORNERS_9_5","OVER_CORNERS_10_5","OVER_CORNERS_11_5","OVER_CORNERS_12_5","OVER_CORNERS_13_5"],correctScores:["CORRECT_SCORE","CORRECT_SCORE_HT","CORRECT_SCORE_ADVANCED"],misc:["FT_1X2","HT_1X2","BOTH_TEAMS_SCORE","DOUBLE_CHANCE","HT_FT","RED_CARD_MATCH","PENALTY_MATCH"]},cL=({labels:e,values:t,valuesMap:n,onChange:r})=>{const[i,o]=C.useState(!1);return u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e.marketSelection}),u.jsx(b.FormHelperText,{sx:{mb:2},children:e.marketSelectionDescription}),u.jsx(Ir,{label:"Popular",values:t,allValues:ci.popular,valuesMap:n,showAll:i,showAllLabel:e.showAll,onChange:r,toggleShowAll:()=>o(!0)}),i?u.jsxs(u.Fragment,{children:[u.jsx(Ir,{label:e.playerRelated,values:t,allValues:ci.playerRelated,valuesMap:n,onChange:r}),u.jsx(Ir,{label:e.goals,values:t,allValues:ci.goals,valuesMap:n,onChange:r}),u.jsx(Ir,{label:e.corners,values:t,allValues:ci.corners,valuesMap:n,onChange:r}),u.jsx(Ir,{label:e.correctScores,values:t,allValues:ci.correctScores,valuesMap:n,onChange:r}),u.jsx(Ir,{label:e.misc,values:t,allValues:ci.misc,valuesMap:n,onChange:r})]}):u.jsx(u.Fragment,{})]})},st={avatar:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAbFBMVEUAAAA4Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk04Pk3VGBMfAAAAI3RSTlMA+h6XBeOBCz4ozafvc/W9X+nD29ROsWmINjBVRxC4F3uPnhL6/TMAAAygSURBVHja7N0JkqJAEIXhAsEFEEVs9z3vf8eZmI6J3mxFZamq/L8zaC2ZrxKjTzTaLfu9xWweZ7n8FeRFmRwuq+XbZmDgs2gzPR9iuaGYpOl4yO/AQ+G0lwRSUXJ+40fgkXCaxvKgYDIeGXhgvZrLk8rVxsBp63MsLyn7rAPOCvul1GB+Cg2cE20nUpvDNjJwybpXSK2KPsuAM8J+LPULUk6EbjgF0pDD0MB2w0QaNOMnYLfhRL7iJ6DJaCEtOHAWsNO+F0g7Um4EFlpm0pq8T6/IMptEWhVPDewxWAXSthlNAltEu1I6EKyoD9sgOufSkZIrYfeOM+lQj8NgxzaxdKpcG3RonEvHgpNBV8KDWGByNOjENBMrFJwFu7BPxRbB2KBtw1gsknIbaNk4EKskHATaNLBn+f8vpjLcnn0i9skue4NWHOdipYRfwHUa/v//JBwFWzCYibUm9AebtxCLpQYN64nVVgaNGovllgYN2or13gwaM7Ss/ndNTmuoMevOu/9VZGREGrKxpP17T8bToUaMC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",downArrow:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAgklEQVR4nO2UOwrAIBAF5xKReP+bJFV+TSxynATBQiSI0TXVDggW7htesYKiKIogE7ADRiDLZxzAXPJ4BW7ANcpNyPBZS8nAAJxh4AJshTTNGGsH7R/SFnmztEYuJv0iF5eWyLtJc/Lu0rfddMld4sPJErfs3jTFt9vC6d5UURSFmAePTDtnrV72/QAAAABJRU5ErkJggg==",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAABvUlEQVR4nO2XTUrDQBSAPwXBn7ps0TO4EFfd24obEfQQHqOt4qIewAt4BkFci+610IIW7MpFXQtWxJGRNxBK02k0qTPpfDCUvDbJ+/LezDQQCARmBpWTQe5EfEUFEcdQoSKOoUJFMmIZOAG6wEA+G8CSTxXRyd7F7A+3FhmnRI4lh2egAqwAVaAn8bovIl3JYXsoXpX4ky8iA8mhMBRflfh7miIlYJNsK1IZiu9I/DEtES3RAtrAIunTkBx60k4FkTBzpJaGiJEwvztL3+NnVdKr06hV68by8CYSiUroCfcpo5yBjE62LvcZyGdtgg6wihSBB/muA6xJNcyxbaOaFmqcSLQSLTlGnk5b4s2YCy/giEgpRsJQjrTYHnAAnAJXQD/mnKmLFEe00yialtdOfe76f4mULJWIYlqsL5XQFTmUfWbSa2Qm0kqYQNxqkuSBZCKiLO2UhGiLjmu/rSxEOilJJJH5kF19Pu05Mi30HnQOfMm9r/+wOCgX/v3uAi9y/1dg31cRpBMuI3lcyIuVdyKaOeAIeLPMqXHDCRHDBnCfB5HfEERcQ4XWcgwVKuIYKrcVUZ4PciMSCARmgG9mLvK/OR2iiQAAAABJRU5ErkJggg==",flag:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIUAAACBCAYAAADuS3kqAAAAAXNSR0IB2cksfwAAAAlw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xvX9NrdHQFdVhbsI51ZnswkliODLAMw0Ibr3aSHMhLKEg1IgdQHCYo6kQItN2vVCYo6kUEBalCBAWpQgQFqUIEBalCDqGg9xrqQQi03Z9pICjqRQQFqUIEBalCBAWpQgQFqUIItN1f+TlCUNSJCApShQgKUoUIClKFCApShRxCQR+grQch0HZ/OZCgqBcRFKQKERSkChEUJBKJRCKRHOh7LktbCRuu/n0AAAAASUVORK5CYII="},uL=({match:e,timeFormat:t})=>{var n,r,i,o;return u.jsxs(b.Box,{display:"flex",alignItems:"center",gap:.5,fontSize:"xs",children:[u.jsxs(b.Typography,{mr:1,children:["[",kt(e.kickoffAt).format(t),"]"]}),e.homeTeam.code?u.jsx(b.Tooltip,{title:e.homeTeam.name,children:u.jsxs(b.Box,{display:"flex",gap:.5,alignItems:"center",minWidth:"60px",justifyContent:"flex-end",children:[u.jsx(b.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(b.Avatar,{src:((n=e.homeTeam.assets)==null?void 0:n.logo)||st.team,sx:{width:"20px",height:"20px"}})]})}):u.jsxs(u.Fragment,{children:[u.jsx(b.Typography,{children:e.homeTeam.code||e.homeTeam.name}),u.jsx(b.Avatar,{src:((r=e.homeTeam.assets)==null?void 0:r.logo)||st.team,sx:{width:"20px",height:"20px"}})]}),"-",e.awayTeam.code?u.jsx(b.Tooltip,{title:e.awayTeam.name,children:u.jsxs(b.Box,{display:"flex",gap:.5,alignItems:"center",children:[u.jsx(b.Avatar,{src:((i=e.awayTeam.assets)==null?void 0:i.logo)||st.team,sx:{width:"20px",height:"20px"}})," ",u.jsx(b.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})}):u.jsxs(u.Fragment,{children:[u.jsx(b.Avatar,{src:((o=e.awayTeam.assets)==null?void 0:o.logo)||st.team,sx:{width:"20px",height:"20px"}}),u.jsx(b.Typography,{children:e.awayTeam.code||e.awayTeam.name})]})]})},fm=Ue(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),dL=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),{sdk:s}=ft(),l=()=>k(this,null,function*(){try{const h=yield s.topX.getGames({limit:50},!0),p=yield s.matchQuiz.getGames({limit:50},!0),m=[...h.data,...p.data];if(e.related&&e.related.length>0){const g=m.filter(v=>{var I;return(I=e.related)==null?void 0:I.some(S=>S.entity_id===v.id)}).map(v=>v.id);n(g)}i(m)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"GAME",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return C.useEffect(()=>{l()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e.label}),u.jsx(b.Select,{multiple:!0,indicator:u.jsx(fm,{}),defaultValue:t,renderValue:f=>u.jsx(b.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(b.Chip,{variant:"soft",color:"primary",children:h.label},`related-game-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${b.selectClasses.indicator}`]:{transition:"0.2s",[`&.${b.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(b.Option,{value:f.id,children:f.title?f.title+` (${f.type})`:`Game with no title (${f.type}). ID: ${f.id}`},`related-game-title-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(at,{showToast:o,message:"There was a problem witch fetching games for related options",color:"danger",hideToast:d})]})},fL=e=>{const[t,n]=C.useState([]),[r,i]=C.useState([]),[o,a]=C.useState(!1),{sdk:s}=ft(),l=()=>k(this,null,function*(){try{const h=yield s.loyalty.getTemplates(void 0,!0);if(e.related&&e.related.length>0){const p=h.data.filter(m=>{var g;return(g=e.related)==null?void 0:g.some(v=>v.entity_id===m.id)}).map(m=>m.id);n(p)}i(h.data)}catch(f){console.error(f),d()}}),c=(f,h)=>{const p=h.map(m=>({entity_id:m,entity_type:"TEMPLATE",entity_relationship:"relatedTo"}));e.onChange(p)},d=()=>a(!o);return C.useEffect(()=>{l()},[]),u.jsxs(u.Fragment,{children:[r.length>0?u.jsxs(b.FormControl,{sx:()=>({marginBottom:"16px"}),children:[u.jsx(b.FormLabel,{color:"primary",children:e.label}),u.jsx(b.Select,{multiple:!0,indicator:u.jsx(fm,{}),defaultValue:t,renderValue:f=>u.jsx(b.Box,{sx:{display:"flex",gap:"0.25rem",flexWrap:"wrap"},children:f.map((h,p)=>u.jsx(b.Chip,{variant:"soft",color:"primary",children:h.label},`related-template-${h.label}-${p}`))}),onChange:c,sx:{minWidth:"15rem",[`& .${b.selectClasses.indicator}`]:{transition:"0.2s",[`&.${b.selectClasses.expanded}`]:{transform:"rotate(-180deg)"}}},slotProps:{listbox:{sx:{width:"100%"}}},children:r.map(f=>u.jsx(b.Option,{value:f.id,children:f.name||`Template with no name. ID: ${f.id}`},`related-template-name-${f.id}`))})]}):u.jsx(u.Fragment,{}),u.jsx(at,{showToast:o,message:"There was a problem witch fetching templates for related options",color:"danger",hideToast:d})]})},hm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="game"),pm=e=>e.filter(t=>t.entity_type.toLocaleLowerCase()==="template"),hL=e=>{const t=(n,r)=>{if(r==="games"){const i=pm(e.related);e.onChange([...n,...i])}if(r==="templates"){const i=hm(e.related);e.onChange([...n,...i])}};return u.jsxs(u.Fragment,{children:[u.jsx(dL,{label:e.labels.games,related:hm(e.related),onChange:n=>t(n,"games")}),u.jsx(fL,{label:e.labels.templates,related:pm(e.related),onChange:n=>t(n,"templates")})]})},pL=(e,t)=>{const[n,r]=C.useState(null),{https:i}=ft(),o=()=>k(this,null,function*(){const a=yield i.getSchedulersByEntityId(e);if(a.ok){const s=yield a.json();r(s.data);return}r([])});return C.useEffect(()=>(o(),()=>r(null)),[e,t]),n},ds=({my:e})=>u.jsx(b.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",my:e},children:u.jsx(b.CircularProgress,{variant:"solid",color:"neutral"})}),gL=["PENDING","LIVE","SETTLED"],mL=["OPEN"],vL=["ACTIVE","INACTIVE","EXPIRED"],bL=new Map().set("PENDING","Pending").set("LIVE","Live").set("SETTLED","Settled").set("CANCELED","Canceled").set("OPEN","Open").set("ACTIVE","Active").set("INACTIVE","Inactive").set("PENDING","Pending").set("EXPIRED","Expired"),gm=e=>{let t=[];return e.entityType==="CLASSIC_QUIZ"||e.entityType==="EITHER_OR"||e.entityType==="POLL"?t=Array.from(vL):e.entityType==="TEMPLATE"?t=Array.from(gL):t=Array.from(mL),u.jsx(u.Fragment,{children:t.map(n=>u.jsx(b.Option,{value:n,children:bL.get(n)},`${e.entityType}-${n}-status`))})};class yL{constructor(){te(this,"name","");te(this,"scheduled_task_config",{entity_id:"",entity_type:"",change:{status:""}});te(this,"trigger",{trigger_type:"DATETIME",date:""})}}const xL=Ue(u.jsx("path",{d:"M4.47 21h15.06c1.54 0 2.5-1.67 1.73-3L13.73 4.99c-.77-1.33-2.69-1.33-3.46 0L2.74 18c-.77 1.33.19 3 1.73 3M12 14c-.55 0-1-.45-1-1v-2c0-.55.45-1 1-1s1 .45 1 1v2c0 .55-.45 1-1 1m1 4h-2v-2h2z"}),"WarningRounded"),CL=e=>{const[t,n]=C.useState(!1),{https:r}=ft(),i=o=>k(this,null,function*(){if(o.stopPropagation(),n(!0),(yield r.deleteScheduledTask(e.taskId)).ok){n(!1),e.toggleToast("success",e.labels.deleteScheduledTaskMessage),e.refetchTasks(),e.toggleModal();return}n(!1),e.toggleToast("danger",e.labels.deleteScheduledTaskErrorMessage)});return u.jsx(u.Fragment,{children:u.jsx(b.Modal,{open:e.isOpen,onClose:e.toggleModal,children:u.jsxs(b.ModalDialog,{children:[u.jsxs(b.DialogTitle,{children:[u.jsx(xL,{}),e.labels.deleteScheduledTaskModalTitle]}),u.jsx(b.Divider,{}),u.jsx(b.DialogContent,{children:u.jsxs(b.Typography,{children:[e.labels.deleteScheduledTaskModalParagraph,u.jsx(b.Typography,{fontWeight:"bold",children:e.taskName}),"?"]})}),u.jsxs(b.DialogActions,{children:[u.jsx(b.Button,{loading:t,variant:"solid",color:"danger",onClick:o=>i(o),children:e.labels.delete}),u.jsx(b.Button,{variant:"plain",color:"neutral",onClick:o=>{o.stopPropagation(),e.toggleModal()},children:e.labels.close})]})]})})})},wL=e=>{const[t,n]=C.useState(null),[r,i]=C.useState(""),[o,a]=C.useState(""),[s,l]=C.useState(""),[c,d]=C.useState(""),[f,h]=C.useState(!1),[p,m]=C.useState(!1),[g,v]=C.useState(!1),[I,S]=C.useState("success"),[x,w]=C.useState(""),[y,A]=C.useState(!1),E=C.useRef(!1),_=pL(e.entityId,E.current),{https:D}=ft();if(!_)return u.jsx(ds,{my:10});const G=()=>A(!y),F=(B,H)=>{v(!0),S(B),w(H)},T=(B,H)=>{i(H.scheduled_task_config.change.status),l(H.trigger.date),n(B)},W=()=>k(this,null,function*(){h(!0);const B=$("CREATE","");if((yield D.setSchedulers(B,"CREATE",null)).ok){h(!1),a(""),d(""),E.current=!E.current,F("success",e.labels.createScheduledTaskMessage);return}h(!1),a(""),d(""),F("danger",e.labels.createScheduledTaskErrorMessage)}),Y=(B,H)=>k(this,null,function*(){m(!0);const Q=$("UPDATE",H);if((yield D.setSchedulers(Q,"UPDATE",B)).ok){m(!1),n(null),i(""),l(""),E.current=!E.current,F("success",e.labels.updateScheduledTaskMessage);return}m(!1),F("danger",e.labels.updateScheduledTaskErrorMessage),n(null),i(""),l("")}),j=()=>{E.current=!E.current},$=(B,H)=>{const Q=new yL,ee=B==="CREATE"?o:r,R=B==="CREATE"?null:H,M=B==="CREATE"?c:s;return Q.scheduled_task_config.entity_id=e.entityId,Q.scheduled_task_config.entity_type=e.entityType,Q.scheduled_task_config.change.status=ee,Q.trigger.date=M,Q.name=R,Q};return u.jsxs(u.Fragment,{children:[_.map((B,H)=>u.jsx(b.Card,{style:{marginBottom:"10px",display:"flex",padding:"10px"},children:u.jsx(b.CardContent,{children:t===H?u.jsxs(b.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%"},children:[u.jsxs(b.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(b.Select,{value:r,size:"sm",name:"status",onChange:(Q,ee)=>i(ee),sx:{minHeight:"36px"},children:u.jsx(gm,{entityType:e.entityType})})]}),u.jsxs(b.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Qc,{defaultDate:s,onChange:Q=>l(Q)})]}),r&&s?u.jsx(b.Button,{onClick:()=>Y(B.id,B.name),loading:p,sx:{mt:"auto"},children:e.labels.save}):u.jsx(b.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.save})]}):u.jsxs(b.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"}},children:[u.jsxs(b.Box,{children:[u.jsxs(b.Typography,{style:{fontWeight:"bold"},children:[e.labels.name,": ",u.jsx(b.Typography,{whiteSpace:"wrap",children:B.name})]}),u.jsxs(b.Typography,{style:{color:"gray"},children:[e.labels.status,": ",u.jsx(b.Typography,{whiteSpace:"wrap",children:B.status})]})]}),!e.readOnly&&u.jsxs(b.Box,{children:[u.jsx(b.Tooltip,{title:e.labels.edit,children:u.jsx(b.IconButton,{onClick:()=>T(H,B),children:u.jsx(Oe.Edit,{})})}),u.jsx(b.Tooltip,{title:e.labels.delete,children:u.jsx(b.IconButton,{onClick:G,children:u.jsx(Oe.Delete,{})})})]}),u.jsx(CL,{labels:e.labels,isOpen:y,taskId:B.id,taskName:B.name,toggleModal:G,refetchTasks:j,toggleToast:F})]})})},`scheduled-task-${e.entityId}-${e.entityType}-${B.id}`)),!e.readOnly&&u.jsxs(b.Box,{sx:{display:"flex",flexDirection:{xs:"column",xl:"row"},width:"100%",mt:_&&_.length?2:0},children:[u.jsxs(b.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:e.labels.changeStatusTo}),u.jsx(b.Select,{value:o,size:"sm",name:"status",onChange:(B,H)=>a(H),sx:{minHeight:"37px"},children:u.jsx(gm,{entityType:e.entityType})})]}),u.jsxs(b.FormControl,{sx:{mr:{xl:1},width:"100%",mb:{xs:1,xl:0}},children:[u.jsx(b.FormLabel,{required:!0,color:"primary",children:e.labels.at}),u.jsx(Qc,{defaultDate:c,onChange:B=>d(B)})]}),o&&c?u.jsx(b.Button,{onClick:W,loading:f,sx:{mt:"auto"},children:e.labels.create}):u.jsx(b.Button,{disabled:!0,sx:{mt:"auto"},children:e.labels.create})]}),u.jsx(at,{showToast:g,message:x,color:I,hideToast:()=>v(!1)})]})};function IL(e){return it("MuiIconButton",e)}Xe("MuiIconButton",["root","colorPrimary","colorNeutral","colorDanger","colorSuccess","colorWarning","colorContext","variantPlain","variantOutlined","variantSoft","variantSolid","focusVisible","disabled","sizeSm","sizeMd","sizeLg","loading","loadingIndicator"]);const SL=["children","action","component","color","disabled","variant","loading","loadingIndicator","size","slots","slotProps"],AL=e=>{const{color:t,disabled:n,focusVisible:r,focusVisibleClassName:i,size:o,variant:a,loading:s}=e,l={root:["root",n&&"disabled",r&&"focusVisible",a&&`variant${ye(a)}`,t&&`color${ye(t)}`,o&&`size${ye(o)}`,s&&"loading"],loadingIndicator:["loadingIndicator"]},c=ut(l,IL,{});return r&&i&&(c.root+=` ${i}`),c},TL=be("button")(({theme:e,ownerState:t})=>{var n,r,i,o;return[O({"--Icon-margin":"initial","--Icon-color":t.color!=="neutral"||t.variant==="solid"?"currentColor":e.vars.palette.text.icon},t.instanceSize&&{"--IconButton-size":{sm:"2rem",md:"2.25rem",lg:"2.75rem"}[t.instanceSize]},t.size==="sm"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2rem) / 1.6)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2rem)",minHeight:"var(--IconButton-size, 2rem)",fontSize:e.vars.fontSize.sm,paddingInline:"2px"},t.size==="md"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.25rem) / 1.5)","--CircularProgress-size":"20px","--CircularProgress-thickness":"2px",minWidth:"var(--IconButton-size, 2.25rem)",minHeight:"var(--IconButton-size, 2.25rem)",fontSize:e.vars.fontSize.md,paddingInline:"0.25rem"},t.size==="lg"&&{"--Icon-fontSize":"calc(var(--IconButton-size, 2.75rem) / 1.571)","--CircularProgress-size":"28px","--CircularProgress-thickness":"4px",minWidth:"var(--IconButton-size, 2.75rem)",minHeight:"var(--IconButton-size, 2.75rem)",fontSize:e.vars.fontSize.lg,paddingInline:"0.375rem"},{WebkitTapHighlightColor:"transparent",paddingBlock:0,fontFamily:e.vars.fontFamily.body,fontWeight:e.vars.fontWeight.md,margin:"var(--IconButton-margin)",borderRadius:`var(--IconButton-radius, ${e.vars.radius.sm})`,border:"none",boxSizing:"border-box",backgroundColor:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",[e.focus.selector]:O({"--Icon-color":"currentColor"},e.focus.default)}),O({},(n=e.variants[t.variant])==null?void 0:n[t.color],{"&:hover":{"@media (hover: hover)":O({"--Icon-color":"currentColor"},(r=e.variants[`${t.variant}Hover`])==null?void 0:r[t.color])},'&:active, &[aria-pressed="true"]':O({"--Icon-color":"currentColor"},(i=e.variants[`${t.variant}Active`])==null?void 0:i[t.color]),"&:disabled":(o=e.variants[`${t.variant}Disabled`])==null?void 0:o[t.color]})]}),EL=be(TL,{name:"JoyIconButton",slot:"Root",overridesResolver:(e,t)=>t.root})({}),kL=be("span",{name:"JoyIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e,ownerState:t})=>{var n,r;return O({display:"inherit",position:"absolute",left:"50%",transform:"translateX(-50%)",color:(n=e.variants[t.variant])==null||(n=n[t.color])==null?void 0:n.color},t.disabled&&{color:(r=e.variants[`${t.variant}Disabled`])==null||(r=r[t.color])==null?void 0:r.color})}),mm=U.forwardRef(function(t,n){var r;const i=dt({props:t,name:"JoyIconButton"}),{children:o,action:a,component:s="button",color:l="neutral",disabled:c,variant:d="plain",loading:f=!1,loadingIndicator:h,size:p="md",slots:m={},slotProps:g={}}=i,v=Ae(i,SL),I=U.useContext(kp),S=U.useContext(_p),x=t.variant||I.variant||d,w=t.size||I.size||p,y=t.color||I.color||l,A=(r=t.loading||t.disabled)!=null?r:I.disabled||f||c,E=U.useRef(null),_=sn(E,n),{focusVisible:D,setFocusVisible:G,getRootProps:F}=jl(O({},i,{disabled:A,rootRef:_})),T=h!=null?h:u.jsx(Tp,{color:y,thickness:{sm:2,md:3,lg:4}[w]||3});U.useImperativeHandle(a,()=>({focusVisible:()=>{var M;G(!0),(M=E.current)==null||M.focus()}}),[G]);const W=O({},i,{component:s,color:y,disabled:A,variant:x,loading:f,size:w,focusVisible:D,instanceSize:t.size}),Y=AL(W),j=M=>{var z;let V=i.onClick;if(typeof g.root=="function"?V=g.root(W).onClick:g.root&&(V=g.root.onClick),(z=V)==null||z(M),S){var ne;(ne=S.onClick)==null||ne.call(S,M,i.value)}};let $=i["aria-pressed"];typeof g.root=="function"?$=g.root(W)["aria-pressed"]:g.root&&($=g.root["aria-pressed"]),S!=null&&S.value&&(Array.isArray(S.value)?$=S.value.indexOf(i.value)!==-1:$=S.value===i.value);const B=O({},v,{component:s,slots:m,slotProps:g}),[H,Q]=Ie("root",{ref:n,className:Y.root,elementType:EL,getSlotProps:F,externalForwardedProps:B,ownerState:W,additionalProps:{onClick:j,"aria-pressed":$}}),[ee,R]=Ie("loadingIndicator",{className:Y.loadingIndicator,elementType:kL,externalForwardedProps:B,ownerState:W});return u.jsx(H,O({},Q,{children:f?u.jsx(ee,O({},R,{children:T})):o}))});mm.muiName="IconButton";const vm=Ue(u.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),_L=({label:e,defaultValue:t,options:n,required:r,onChange:i})=>{function o(l){var c,d;return l?u.jsxs(u.Fragment,{children:[u.jsx(b.ListItemDecorator,{children:u.jsx(b.Avatar,{size:"sm",src:((d=(c=n.find(f=>f.id===l.value))==null?void 0:c.assets)==null?void 0:d.logo)||st.competition})}),l.label]}):null}const a=C.useRef(null),s=(l,c)=>{i(c)};return u.jsxs(b.FormControl,{sx:{mb:1},children:[u.jsx(b.FormLabel,{required:r,color:"primary",children:e}),u.jsx(b.Select,q(N({slotProps:{button:{sx:{whiteSpace:"nowrap"}}},sx:{"--ListItemDecorator-size":"44px",minHeight:"37px"},renderValue:o,value:t,onChange:s},t&&{endDecorator:u.jsx(mm,{variant:"plain",color:"neutral",onMouseDown:l=>{l.stopPropagation()},onClick:()=>{var l;i(""),(l=a.current)==null||l.focusVisible()},sx:{width:"18px",height:"18px"},children:u.jsx(vm,{})}),indicator:null}),{children:n.map((l,c)=>{var d;return u.jsxs(C.Fragment,{children:[c!==0?u.jsx(b.ListDivider,{role:"none"}):null,u.jsxs(b.Option,{value:l.id,label:l.name,children:[u.jsx(b.ListItemDecorator,{children:u.jsx(b.Avatar,{size:"sm",src:((d=l.assets)==null?void 0:d.logo)||st.competition})}),l.name]})]},`${l.id}-${c}`)})}))]})};function PL(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bm=PL,DL=typeof Bt=="object"&&Bt&&Bt.Object===Object&&Bt,OL=DL,RL=OL,LL=typeof self=="object"&&self&&self.Object===Object&&self,ML=RL||LL||Function("return this")(),ym=ML,BL=ym,$L=function(){return BL.Date.now()},NL=$L,FL=/\s/;function jL(e){for(var t=e.length;t--&&FL.test(e.charAt(t)););return t}var zL=jL,UL=zL,VL=/^\s+/;function HL(e){return e&&e.slice(0,UL(e)+1).replace(VL,"")}var WL=HL,GL=ym,YL=GL.Symbol,pu=YL,xm=pu,Cm=Object.prototype,KL=Cm.hasOwnProperty,QL=Cm.toString,co=xm?xm.toStringTag:void 0;function qL(e){var t=KL.call(e,co),n=e[co];try{e[co]=void 0;var r=!0}catch(o){}var i=QL.call(e);return r&&(t?e[co]=n:delete e[co]),i}var JL=qL,XL=Object.prototype,ZL=XL.toString;function eM(e){return ZL.call(e)}var tM=eM,wm=pu,nM=JL,rM=tM,iM="[object Null]",oM="[object Undefined]",Im=wm?wm.toStringTag:void 0;function aM(e){return e==null?e===void 0?oM:iM:Im&&Im in Object(e)?nM(e):rM(e)}var sM=aM;function lM(e){return e!=null&&typeof e=="object"}var cM=lM,uM=sM,dM=cM,fM="[object Symbol]";function hM(e){return typeof e=="symbol"||dM(e)&&uM(e)==fM}var Sm=hM,pM=WL,Am=bm,gM=Sm,Tm=NaN,mM=/^[-+]0x[0-9a-f]+$/i,vM=/^0b[01]+$/i,bM=/^0o[0-7]+$/i,yM=parseInt;function xM(e){if(typeof e=="number")return e;if(gM(e))return Tm;if(Am(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Am(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pM(e);var n=vM.test(e);return n||bM.test(e)?yM(e.slice(2),n?2:8):mM.test(e)?Tm:+e}var CM=xM,wM=bm,gu=NL,Em=CM,IM="Expected a function",SM=Math.max,AM=Math.min;function TM(e,t,n){var r,i,o,a,s,l,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(IM);t=Em(t)||0,wM(n)&&(d=!!n.leading,f="maxWait"in n,o=f?SM(Em(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(A){var E=r,_=i;return r=i=void 0,c=A,a=e.apply(_,E),a}function m(A){return c=A,s=setTimeout(I,t),d?p(A):a}function g(A){var E=A-l,_=A-c,D=t-E;return f?AM(D,o-_):D}function v(A){var E=A-l,_=A-c;return l===void 0||E>=t||E<0||f&&_>=o}function I(){var A=gu();if(v(A))return S(A);s=setTimeout(I,g(A))}function S(A){return s=void 0,h&&r?p(A):(r=i=void 0,a)}function x(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function w(){return s===void 0?a:S(gu())}function y(){var A=gu(),E=v(A);if(r=arguments,i=this,l=A,E){if(s===void 0)return m(l);if(f)return clearTimeout(s),s=setTimeout(I,t),p(l)}return s===void 0&&(s=setTimeout(I,t)),a}return y.cancel=x,y.flush=w,y}var EM=TM;const Sr=fn(EM),wn=({option:e})=>u.jsxs(b.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(b.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:e.logo}),u.jsx(b.Typography,{children:e.label}),u.jsx(b.Typography,{ml:.5,level:"body-xs",children:`(${e.countryName})`})]}),km=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||st.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||st.flag}}))||[],kM=({labels:e,label:t,ids:n,required:r,onChange:i})=>{const[o,a]=C.useState([]),[s,l]=C.useState([]),[c,d]=C.useState(!1),[f,h]=C.useState(""),[p,m]=C.useState(!1),{sdk:g}=ft(),v=()=>m(!p),I=(y,A)=>{a(A),i(A[0]?[A[0].id]:[])},S=3;C.useEffect(()=>{!f&&n&&n.length&&g.football.getCompetitions({competitionIds:n}).then(y=>{a(km(y))}).catch(y=>{console.error(y),v(),a([])})},[]);const x=C.useMemo(()=>Sr(y=>{d(!0),g.football.getCompetitions({name:y}).then(A=>{l([...km(A)]),d(!1)}).catch(A=>{console.error(A),v(),l([]),d(!1)})},300),[]);C.useEffect(()=>{if(!f||f.length<S){l([]);return}return x(f),()=>x.cancel()},[f,x]);const w=(y,A)=>y.map((E,_)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:D=>A({index:_}).onClick(D),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(wn,{option:E},`option_${E.id}`)},E.id));return u.jsxs(b.FormControl,{sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{required:r,color:"primary",children:t}),u.jsx(b.Box,{children:u.jsx(b.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:c,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(y,A)=>y.id===A.id,endDecorator:c?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.competitionsSelectionPlaceholder,options:s,disabled:o.length===1,filterOptions:y=>y.filter(A=>!o.some(E=>E.value===A.value)),onInputChange:(y,A)=>{h(A)},onChange:I,getOptionKey:y=>y.id,value:o,renderTags:w,renderOption:(y,A)=>u.jsx(b.AutocompleteOption,q(N({},y),{children:u.jsx(wn,{option:A})}))})}),u.jsx(at,{showToast:p,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:v})]})},_m=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Competition with no name",label:t.name?t.name:"Competition with no name",logo:((n=t.assets)==null?void 0:n.logo)||st.competition,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||st.flag}}))||[],_M=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=C.useState([]),[a,s]=C.useState([]),[l,c]=C.useState(!1),[d,f]=C.useState(""),[h,p]=C.useState(!1),{sdk:m}=ft(),g=()=>p(!h),v=(w,y)=>{o(y);const A=y.map(E=>E.id);r(A&&A.length?A:null)},I=3;C.useEffect(()=>{!d&&t&&t.length&&m.football.getCompetitions({competitionIds:t}).then(w=>{o(_m(w))}).catch(w=>{console.error(w),g(),o([])})},[]);const S=C.useMemo(()=>Sr(w=>{c(!0);const y={name:w,competitionIds:[""]};n&&Array.isArray(n)&&n.length>0?y.competitionIds=Array.from(n):delete y.competitionIds,m.football.getCompetitions(y).then(A=>{s([..._m(A)]),c(!1)}).catch(A=>{console.error(A),g(),s([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<I){s([]);return}return S(d),()=>S.cancel()},[d,S]);const x=(w,y)=>w.map((A,E)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:_=>y({index:E}).onClick(_),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(wn,{option:A},`option_${A.id}`)},A.id));return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{marginBottom:"16px"},children:u.jsx(b.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(w,y)=>w.id===y.id,endDecorator:l?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.competitionsSelectionPlaceholder,options:a,filterOptions:w=>w.filter(y=>!i.some(A=>A.value===y.value)),onInputChange:(w,y)=>{f(y)},onChange:v,getOptionKey:w=>w.id,value:i,renderTags:x,renderOption:(w,y)=>u.jsx(b.AutocompleteOption,q(N({},w),{children:u.jsx(wn,{option:y})}))})}),u.jsx(at,{showToast:h,message:e.searchCompetitionsErrorMessage,color:"danger",hideToast:g})]})},Pm=e=>(e==null?void 0:e.map(t=>({id:t.id,value:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,label:t.nickname?t.nickname:t.name||`No name ${t.id.slice(0,5)}`,avatar:t.avatar})))||[],PM=({labels:e,ids:t,onChange:n})=>{const[r,i]=C.useState([]),[o,a]=C.useState([]),[s,l]=C.useState(!1),[c,d]=C.useState(""),[f,h]=C.useState(!1),{sdk:p}=ft(),m=()=>h(!f),g=(x,w)=>{i(w);const y=w.map(A=>A.id);n(y&&y.length?y:null)},v=3;C.useEffect(()=>{!c&&t&&t.length&&p.profile.getByIds(t).then(x=>{i(Pm(x))}).catch(x=>{m(),console.error(x),i([])})},[]);const I=C.useMemo(()=>Sr(x=>{l(!0),p.profile.getByIds([],x).then(w=>{a([...Pm(w)]),l(!1)}).catch(w=>{console.error(w),m(),a([]),l(!1)})},300),[]);C.useEffect(()=>{if(!c||c.length<v){a([]);return}return I(c),()=>I.cancel()},[c,I]);const S=(x,w)=>x.map((y,A)=>{var E;return u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:_=>w({index:A}).onClick(_),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsxs(b.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(b.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(E=y.avatar)!=null?E:st.avatar}),u.jsx(b.Typography,{children:y.label})]})},y.id)});return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{marginBottom:"16px"},children:u.jsx(b.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:s,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(x,w)=>x.id===w.id,endDecorator:s?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:r.length>0?"":e.excludedProfilesPlaceholder,options:o,filterOptions:x=>x.filter(w=>!r.some(y=>y.value===w.value)),onInputChange:(x,w)=>{d(w)},onChange:g,getOptionKey:x=>x.id,value:r,renderTags:S,renderOption:(x,w)=>{var y;return u.jsx(b.AutocompleteOption,q(N({},x),{children:u.jsxs(b.Box,{display:"flex",alignItems:"center",mr:1,children:[u.jsx(b.Avatar,{sx:{width:"1.5rem",height:" 1.5rem",mr:.5,borderRadius:"0.75rem"},src:(y=w.avatar)!=null?y:st.avatar}),u.jsx(b.Typography,{children:w.label})]})}))}})}),u.jsx(at,{showToast:f,message:e.searchProfilesErrorMessage,color:"danger",hideToast:m})]})},Dm=e=>(e==null?void 0:e.map(t=>{var n,r,i,o;return{id:t.id,value:t.name?t.name:"Team with no name",label:t.name?t.name:"Team with no name",logo:((n=t.assets)==null?void 0:n.logo)||st.team,countryName:((r=t.country)==null?void 0:r.name)||"No country",countryFlag:((o=(i=t.country)==null?void 0:i.assets)==null?void 0:o.flag)||st.flag}}))||[],DM=({labels:e,ids:t,scope:n,onChange:r})=>{const[i,o]=C.useState([]),[a,s]=C.useState([]),[l,c]=C.useState(!1),[d,f]=C.useState(""),[h,p]=C.useState(!1),{sdk:m}=ft(),g=()=>p(!h),v=(w,y)=>{o(y);const A=y.map(E=>E.id);r(A&&A.length?A:null)},I=3;C.useEffect(()=>{!d&&t&&t.length&&m.football.getTeams({teamIds:t,scope:n}).then(w=>{const y=w.data.filter(A=>!A.name.includes("/"));o(Dm(y))}).catch(w=>{console.error(w),g(),o([])})},[]);const S=C.useMemo(()=>Sr((w,y)=>{c(!0),m.football.getTeams({name:w,scope:y}).then(A=>{const E=A.data.filter(_=>!_.name.includes("/"));s([...Dm(E)]),c(!1)}).catch(A=>{console.error(A),g(),s([]),c(!1)})},300),[]);C.useEffect(()=>{if(!d||d.length<I){s([]);return}return S(d,n),()=>S.cancel()},[d,S]);const x=(w,y)=>w.map((A,E)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:_=>y({index:E}).onClick(_),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(wn,{option:A},`option_${A.id}`)},A.id));return u.jsxs(u.Fragment,{children:[u.jsx(b.Box,{sx:{marginBottom:"16px"},children:u.jsx(b.Autocomplete,{forcePopupIcon:!1,multiple:!0,loading:l,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(w,y)=>w.id===y.id,endDecorator:l?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:i.length>0?"":e.teamsSelectionPlaceholder,options:a,filterOptions:w=>w.filter(y=>!i.some(A=>A.value===y.value)),onInputChange:(w,y)=>{f(y)},onChange:v,getOptionKey:w=>w.id,value:i,renderTags:x,renderOption:(w,y)=>u.jsx(b.AutocompleteOption,q(N({},w),{children:u.jsx(wn,{option:y})}))})}),u.jsx(at,{showToast:h,message:e.searchTeamsErrorMessage,color:"danger",hideToast:g})]})},OM=({checked:e,disabled:t,onChange:n})=>u.jsx(b.Switch,{color:e?"success":"danger",checked:e,disabled:t,onChange:r=>n(r.target.checked),sx:{ml:1,"--Switch-thumbSize":"16px","--Switch-trackWidth":"40px","--Switch-trackHeight":"24px","--Switch-trackBackground":"#EE5E52","&:hover":{"--Switch-trackBackground":"#EE5E52"},[`&.${b.switchClasses.checked}`]:{"--Switch-trackBackground":"#5CB176","&:hover":{"--Switch-trackBackground":"#5CB176"}}}}),fs=({label:e,labelPosition:t="start",defaultValue:n,description:r,disabled:i,descriptionColor:o,onChange:a})=>{const s=u.jsx(OM,{checked:n,disabled:i,onChange:a});return r?u.jsxs(b.Box,{mb:2,children:[u.jsx(b.Typography,{component:"label",startDecorator:t=="start"?void 0:s,endDecorator:t=="start"?s:void 0,children:e}),u.jsx(b.Typography,{level:"body-sm",color:o||"neutral",children:r})]}):u.jsx(b.Typography,{sx:{mb:2},component:"label",startDecorator:t=="start"?void 0:s,endDecorator:t=="start"?s:void 0,children:e})},RM={control:(e,t)=>q(N({},e),{minHeight:"36px",borderColor:t.isFocused?"#0b6bcb":"#ced4da",boxShadow:t.isFocused?"0 0 0 0px 1px 2px 0px rgba(25, 118, 210, 0.25)":"none",borderRadius:"6px","&:hover":{borderColor:t.isFocused?"#1976d2":"#ced4da"}}),valueContainer:e=>q(N({},e),{minHeight:"36px",marginTop:"0px"}),indicatorsContainer:e=>q(N({},e),{minHeight:"36px"}),menu:e=>q(N({},e),{position:"relative"}),clearIndicator:e=>q(N({},e),{"&:hover":{backGroundColor:"gray"},cursor:"pointer"}),input:e=>q(N({},e),{"input:focus":{boxShadow:"none"}}),placeholder:e=>q(N({},e),{color:"rgba(0, 0, 0, 0.54)",fontSize:"14px"}),multiValue:e=>q(N({},e),{backgroundColor:"#e0f3ff",borderRadius:"4px",fontSize:"13px"}),multiValueLabel:e=>q(N({},e),{color:"#333"})},LM=e=>e.map(t=>({label:t,value:t})),Om=e=>{const[t,n]=C.useState(""),[r,i]=C.useState(!1),o=LM(e.tags),a=()=>i(!r),s=f=>{e.onChange(f.map(h=>h.value))},l=f=>{n(f)},c=f=>{f.persist();const{key:h}=f;if(t)switch(h){case"Enter":case"Tab":if(e.tags&&e.tags.length===0){const p=[...e.tags,t];e.onChange(p)}if(e.tags&&e.tags.length>0&&d()){const p=[...e.tags,t];e.onChange(p)}n(""),f.preventDefault()}},d=()=>{let f=!1;return e.tags&&e.tags.length&&e.tags.includes(t)?(a(),f):(f=!0,f)};return u.jsxs(u.Fragment,{children:[u.jsx(cm,{styles:RM,components:{DropdownIndicator:null},inputValue:t,isClearable:!0,isMulti:!0,menuIsOpen:!1,onChange:s,onInputChange:l,onKeyDown:c,placeholder:e.labels.tagsPlaceholder,value:o}),u.jsx(at,{showToast:r,message:e.labels.repeatedValueMessage,color:"warning",hideToast:a})]})},MM=Ue(u.jsx("path",{d:"M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"}),"ArrowBackIos");class Rm{constructor(){te(this,"contestId","");te(this,"contestType","");te(this,"description","");te(this,"userList",[])}}const BM=(e,t,n)=>{const[r,i]=C.useState(null),{sdk:o}=ft(),a=()=>k(this,null,function*(){try{let s;switch(t){case"top_x":s=yield o.topX.getGameWinners(e,!0);break;case"match_quiz":s=yield o.matchQuiz.getGameWinners(e,!0);break;default:s=yield o.loyalty.getTemplateWinners(e,!0)}s.userList&&s.userList.forEach(l=>{l.tags||(l.tags=[])}),i(s)}catch(s){const l=s;console.error(s),l.error.code!==404&&l.error.status!=="code_unknown_contest"&&n(),i(new Rm)}});return C.useEffect(()=>{a()},[]),r};class $M{constructor(){te(this,"position","");te(this,"profileId","");te(this,"note","");te(this,"tags",[])}}function NM(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var FM=NM,jM=Array.isArray,zM=jM,Lm=pu,UM=FM,VM=zM,HM=Sm,WM=1/0,Mm=Lm?Lm.prototype:void 0,Bm=Mm?Mm.toString:void 0;function $m(e){if(typeof e=="string")return e;if(VM(e))return UM(e,$m)+"";if(HM(e))return Bm?Bm.call(e):"";var t=e+"";return t=="0"&&1/e==-WM?"-0":t}var GM=$m,YM=GM;function KM(e){return e==null?"":YM(e)}var Nm=KM;function QM(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,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Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},t2=ZM(e2),n2=t2,r2=n2,i2=Nm,o2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a2="\\u0300-\\u036f",s2="\\ufe20-\\ufe2f",l2="\\u20d0-\\u20ff",c2=a2+s2+l2,u2="["+c2+"]",d2=RegExp(u2,"g");function f2(e){return e=i2(e),e&&e.replace(o2,r2).replace(d2,"")}var h2=f2,p2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function g2(e){return e.match(p2)||[]}var m2=g2,v2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function b2(e){return v2.test(e)}var y2=b2,Fm="\\ud800-\\udfff",x2="\\u0300-\\u036f",C2="\\ufe20-\\ufe2f",w2="\\u20d0-\\u20ff",I2=x2+C2+w2,jm="\\u2700-\\u27bf",zm="a-z\\xdf-\\xf6\\xf8-\\xff",S2="\\xac\\xb1\\xd7\\xf7",A2="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",T2="\\u2000-\\u206f",E2=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Um="A-Z\\xc0-\\xd6\\xd8-\\xde",k2="\\ufe0e\\ufe0f",Vm=S2+A2+T2+E2,Hm="['’]",Wm="["+Vm+"]",_2="["+I2+"]",Gm="\\d+",P2="["+jm+"]",Ym="["+zm+"]",Km="[^"+Fm+Vm+Gm+jm+zm+Um+"]",D2="\\ud83c[\\udffb-\\udfff]",O2="(?:"+_2+"|"+D2+")",R2="[^"+Fm+"]",Qm="(?:\\ud83c[\\udde6-\\uddff]){2}",qm="[\\ud800-\\udbff][\\udc00-\\udfff]",ui="["+Um+"]",L2="\\u200d",Jm="(?:"+Ym+"|"+Km+")",M2="(?:"+ui+"|"+Km+")",Xm="(?:"+Hm+"(?:d|ll|m|re|s|t|ve))?",Zm="(?:"+Hm+"(?:D|LL|M|RE|S|T|VE))?",ev=O2+"?",tv="["+k2+"]?",B2="(?:"+L2+"(?:"+[R2,Qm,qm].join("|")+")"+tv+ev+")*",$2="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",N2="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",F2=tv+ev+B2,j2="(?:"+[P2,Qm,qm].join("|")+")"+F2,z2=RegExp([ui+"?"+Ym+"+"+Xm+"(?="+[Wm,ui,"$"].join("|")+")",M2+"+"+Zm+"(?="+[Wm,ui+Jm,"$"].join("|")+")",ui+"?"+Jm+"+"+Xm,ui+"+"+Zm,N2,$2,Gm,j2].join("|"),"g");function U2(e){return e.match(z2)||[]}var V2=U2,H2=m2,W2=y2,G2=Nm,Y2=V2;function K2(e,t,n){return e=G2(e),t=n?void 0:t,t===void 0?W2(e)?Y2(e):H2(e):e.match(t)||[]}var Q2=K2,q2=qM,J2=h2,X2=Q2,Z2="['’]",eB=RegExp(Z2,"g");function tB(e){return function(t){return q2(X2(J2(t).replace(eB,"")),e,"")}}var nB=tB,rB=nB,iB=rB(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),oB=iB;const aB=fn(oB);class sB{constructor(){te(this,"id","");te(this,"value","");te(this,"label","")}}class lB extends sB{constructor(){super(...arguments);te(this,"logo","");te(this,"countryFlag","");te(this,"countryName","")}}class nv extends lB{constructor(){super(...arguments);te(this,"group","")}}const cB=(e,t)=>t||e||"-------------",mu=(e,t)=>Array.isArray(e)?e.map(n=>mu(n)):e!=null&&e.constructor===Object?Object.keys(e).reduce((n,r)=>q(N({},n),{[aB(r)]:mu(e[r])}),{}):e,rv=e=>{const t=[];return e.competitions.forEach(n=>{t.push(vu(n,"competition"))}),e.teams.forEach(n=>{t.push(vu(n,"team"))}),e.players.forEach(n=>{t.push(vu(n,"player"))}),t},vu=(e,t)=>{var r,i,o,a,s;const n=new nv;return n.label=e.name,n.value=e.id,n.id=e.id,n.group=t,t==="player"?n.logo=((r=e.assets)==null?void 0:r.headshot)||st.avatar:t==="team"?n.logo=((i=e.assets)==null?void 0:i.logo)||st.team:n.logo=((o=e.assets)==null?void 0:o.logo)||st.competition,n.countryName=e.country.name,n.countryFlag=((s=(a=e.country)==null?void 0:a.assets)==null?void 0:s.flag)||st.country,n},uB=e=>{switch(e){case"CLASSIC_QUIZ":return"success";case"EITHER_OR":return"success";case"POLL":return"warning";case"TOP_X":return"primary";case"MATCH_QUIZ":return"primary";case"LEADERBOARD_TEMPLATES":return"neutral";default:return"neutral"}},dB=e=>{switch(e){case"CLASSIC_QUIZ":return"CLASSIC QUIZ";case"EITHER_OR":return"EITHER/OR";case"POLL":return"POLL";case"TOP_X":return"TOP X";case"MATCH_QUIZ":return"MATCH QUIZ";case"LEADERBOARD_TEMPLATES":return"LEADERBOARD TEMPLATES"}},fB=({profile:e,winner:t,labels:n,onChange:r,onRemove:i})=>{var v,I,S,x,w,y;const[o,a]=C.useState(t.position),[s,l]=C.useState(t.note),[c,d]=C.useState(t.tags),f=o||s||c.length>0,h=A=>{A.persist();const{value:E}=A.target;a(E),r("position",E)},p=A=>{A.persist();const{value:E}=A.target;l(E),r("note",E)},m=A=>{d(A),r("tags",A)},g=()=>{a(""),l(""),d([]),i()};return u.jsxs("tr",{style:{backgroundColor:f?"rgb(255 237 213)":""},children:[u.jsx("td",{children:u.jsxs(b.Box,{display:"flex",alignItems:"center",children:[u.jsx(b.Avatar,{src:((v=e.profileModel)==null?void 0:v.avatar)||"",alt:((I=e.profileModel)==null?void 0:I.name)||"Unknown",sx:{mr:1}}),u.jsxs(b.Box,{children:[u.jsxs(b.Typography,{fontWeight:"md",children:[cB((S=e.profileModel)==null?void 0:S.name,(x=e.profileModel)==null?void 0:x.nickname)," ",(w=e.profileModel)!=null&&w.name?u.jsxs(b.Typography,{children:["(",(y=e.profileModel)==null?void 0:y.name,")"]}):u.jsx(u.Fragment,{})]}),u.jsx(b.Typography,{fontSize:"sm",sx:{opacity:"0.5"},children:e.profileModel&&e.profileModel.country?e.profileModel.country.name:""})]})]})}),u.jsx("td",{style:{textAlign:"center"},children:e.points}),u.jsx("td",{style:{textAlign:"center"},children:e.predictionsMade}),u.jsx("td",{children:u.jsx(b.Input,{name:"position",placeholder:"#",value:o,onChange:h,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(b.Input,{name:"note",value:s,placeholder:"This user has...",onChange:p,sx:{backgroundColor:"#fff"}})}),u.jsx("td",{children:u.jsx(Om,{labels:n,tags:c,onChange:m})}),u.jsx("td",{children:u.jsx(b.Tooltip,{title:n.clearWinner,children:u.jsx(b.IconButton,{onClick:g,variant:"outlined",color:"danger",disabled:!f,children:u.jsx(Oe.Remove,{})})})})]})},hB=e=>{const t=(i,o,a)=>{if(e.winners.find(d=>d.profileId===i)){const d=e.winners.map(f=>f.profileId===i?q(N({},f),{[o]:a}):f);r(d);return}const l=new $M;l.profileId=i,l[o]=a;const c=[...e.winners,l];r(c)},n=i=>{const o=e.winners.filter(a=>a.profileId!==i);r(o)},r=i=>{e.setWinnersRequestBody(o=>q(N({},o),{userList:i}))};return e.leaderboard?u.jsxs(u.Fragment,{children:[u.jsx(b.Typography,{level:"h4",children:e.labels.configureWinners}),e.leaderboard.length===0?u.jsx(b.Typography,{level:"body-lg",textAlign:"center",fontWeight:"bold",children:e.labels.noStandingsAvailable}):u.jsx(u.Fragment,{}),u.jsxs(b.Table,{variant:"outlined",hoverRow:!1,borderAxis:"bothBetween",size:"sm",sx:{backgroundColor:"#fff","& > thead > tr > th:last-child, & > tbody > tr > td:last-child":{textAlign:"center",width:"50px"},"--TableCell-paddingX":"0.5rem",cursor:"default","& > tbody > tr:hover":{backgroundColor:"transparent"},"& > thead > tr > th":{backgroundColor:"#fff",verticalAlign:"middle"}},children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.labels.nicknameAndName}),u.jsx("th",{style:{width:"70px",textAlign:"center"},children:e.labels.points}),u.jsx("th",{style:{width:"100px",textAlign:"center"},children:e.labels.predictions}),u.jsx("th",{style:{width:"100px"},children:e.labels.position}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags}),u.jsx("th",{children:e.labels.actions})]})}),u.jsxs("tbody",{children:[e.leaderboard.length>0?e.leaderboard.map(i=>u.jsx(fB,{winner:e.winners.find(o=>o.profileId===i.profileId)||{position:"",profileId:"",note:"",tags:[]},profile:i,labels:e.labels,onChange:(o,a)=>t(i.profileId,o,a),onRemove:()=>n(i.profileId)},`winner-profile-${i.profileId}`)):u.jsx(u.Fragment,{}),u.jsx("tr",{children:u.jsx("td",{colSpan:7,children:e.hasMoreParticipants?u.jsx(b.Box,{textAlign:"center",my:1,children:u.jsx(b.Button,{variant:"plain",sx:{width:"100%"},onClick:()=>e.setPage(i=>i+1),loading:e.isLoading,children:e.labels.loadMore})}):u.jsx(u.Fragment,{})})})]})]})]}):u.jsx(ds,{my:40})},pB=(e,t,n,r,i)=>{const[o,a]=C.useState(null),[s,l]=C.useState(!1),[c,d]=C.useState(!1),{sdk:f}=ft(),h=()=>k(this,null,function*(){d(!0);const p={limit:10,page:r},m=!0;try{let g;t==="template"?g=yield f.loyalty.getLeaderboard(e,p,m):g=yield f.loyalty.getLeaderboardForGame(e,p,m),g.meta.pagination.numberOfPages>r?l(!0):l(!1),o&&o.length?a(v=>[...v,...g.data]):a(g.data)}catch(g){console.error(g),i("danger",n),a([])}d(!1)});return C.useEffect(()=>{h()},[r]),{leaderboard:o,hasMoreParticipants:s,isLeaderboardLoading:c}};class gB{constructor(){te(this,"isValid",!0);te(this,"message","");te(this,"validate",(t,n,r)=>(this.validateField(t,n),this.validateWinnerIds(t,r),this));te(this,"validateField",(t,n)=>{const r=t.every(i=>i.position&&i.profileId);r||(this.isValid=r,this.message=n)});te(this,"validateWinnerIds",(t,n)=>{const r=t.map(o=>o.profileId),i=new Set(r);r.length!==i.size&&(this.isValid=!1,this.message=n)})}}const mB=e=>{const t=e.winners.userList.length>0&&(e.winners.userList[0].position||e.winners.userList[0].profileId||e.winners.userList[0].note||e.winners.userList[0].tags.length);return u.jsx(b.Card,{variant:"plain",children:t?u.jsxs(u.Fragment,{children:[u.jsx(b.Typography,{level:"body-lg",mb:2,fontWeight:"bold",children:e.labels.preview}),u.jsx(b.Sheet,{children:u.jsxs(b.Table,{sx:{"& > thead > tr > th:nth-of-type(n + 3), & > tbody > tr > td:nth-of-type(n + 3)":{textAlign:"right"},"& > thead > tr > th:nth-of-type(3), & > thead > tr > th:nth-of-type(4), & > tbody > tr > td:nth-of-type(3), & > tbody > tr > td:nth-of-type(4)":{fontSize:"sm",display:{xs:"none",md:"table-cell"}}},children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{style:{width:"3%"},children:"#"}),u.jsx("th",{children:e.labels.name}),u.jsx("th",{children:e.labels.note}),u.jsx("th",{children:e.labels.tags})]})}),u.jsx("tbody",{children:e.winners.userList.map(n=>{var i;const r=e.profiles.find(o=>o.id===n.profileId);return u.jsxs("tr",{children:[u.jsx("td",{children:n.position}),u.jsx("td",{children:u.jsxs(b.Box,{display:"flex",alignItems:"center",justifyContent:{xs:"center",md:"flex-start"},gap:2,children:[u.jsx(b.Avatar,{src:(r==null?void 0:r.avatar)||"",alt:(r==null?void 0:r.name)||"Unknown"}),u.jsxs(b.Box,{textAlign:"left",children:[u.jsxs(b.Typography,{fontWeight:"bold",children:[(r==null?void 0:r.nickname)||"-------------"," ",u.jsxs(b.Typography,{children:["(",(r==null?void 0:r.name)||"-------------",")"]})]}),u.jsx(b.Typography,{fontSize:"sm",color:"neutral",children:(i=r==null?void 0:r.country)==null?void 0:i.name})]})]})}),u.jsx("td",{children:n.note}),u.jsx("td",{children:n.tags.map(o=>u.jsx(b.Chip,{variant:"soft",color:"neutral",size:"sm",sx:{mr:1},children:o},`preview-winner-${n.profileId}-tag-${o}`))})]},`preview-winner-${n.profileId}`)})})]})})]}):u.jsx(b.Typography,{textAlign:"center",fontWeight:"bold",children:e.labels.noSetWinnersMessage})})},vB=e=>Object.keys(e).length?(e.userList||(e.userList=[]),e):new Rm,bB=e=>{var y;const[t,n]=C.useState(vB(e.winners)),[r,i]=C.useState(((y=e.winners)==null?void 0:y.description)||""),[o,a]=C.useState(!1),[s,l]=C.useState(1),[c,d]=C.useState(!1),[f,h]=C.useState("danger"),[p,m]=C.useState(""),g=(A,E)=>{h(A),m(E),d(!0)},{leaderboard:v,hasMoreParticipants:I,isLeaderboardLoading:S}=pB(e.entityId,e.entityType,e.labels.leaderboardErrorMessage,s,g),{https:x}=ft(),w=()=>k(this,null,function*(){a(!0);const A=JSON.parse(JSON.stringify(t));if(A.contestId=e.entityId,A.contestType=e.entityType==="template"?"TEMPLATE":"GAME",A.description=r,delete A.contestModel,A.userList.length>0){const _=new gB().validate(A.userList,e.labels.positionAndWinnerRequiredMessage,e.labels.sameChosenWinnerMessage);if(!_.isValid){g("danger",_.message),a(!1);return}}else delete A.userList;const E=mu(A);try{yield x.setWinners(E),g("success",Object.keys(e.winners).length?e.labels.editWinnersMessage:e.labels.createWinnersMessage)}catch(_){console.error(_),g("danger",Object.keys(e.winners).length?e.labels.editWinnersErrorMessage:e.labels.createWinnersErrorMessage)}a(!1)});return u.jsxs(u.Fragment,{children:[u.jsx("section",{style:{marginRight:"auto",marginLeft:"auto"},children:u.jsx(b.Box,{width:"100%",overflow:"hidden",borderRadius:"4px",bgcolor:"#fff",children:u.jsxs(b.Box,{width:"100%",sx:{overflowX:"auto"},children:[u.jsxs(b.Card,{variant:"plain",children:[u.jsx(dc,{property:"description",label:e.labels.description,defaultValue:r,placeholder:e.labels.winnersDescription,onChange:A=>{i(A)}}),u.jsx(hB,{winners:t.userList,leaderboard:v,hasMoreParticipants:I,isLoading:S,setPage:l,setWinnersRequestBody:n,labels:e.labels}),u.jsx(b.Box,{textAlign:"center",my:3,children:u.jsx(b.Button,{variant:"solid",color:"primary",onClick:w,loading:o,children:e.labels.save})}),u.jsx(b.Divider,{sx:{my:4}})]}),v?u.jsx(mB,{winners:t,profiles:v.map(A=>A.profileModel),labels:e.labels}):u.jsx(u.Fragment,{})]})})}),u.jsx(at,{showToast:c,color:f,message:p,hideToast:()=>d(!1)})]})},yB=e=>{const[t,n]=C.useState(!1),r=()=>n(!0),i=BM(e.entityId,e.entityType,r);return i?u.jsxs(u.Fragment,{children:[u.jsxs(b.Box,{p:2,children:[u.jsx(b.Typography,{fontSize:"12px",sx:{cursor:"pointer"},startDecorator:u.jsx(MM,{fontSize:"inherit"}),onClick:e.onClickBack,children:e.labels.back}),u.jsxs(b.Typography,{level:"h3",children:[e.labels.manageWinners,":"," ",u.jsx(b.Typography,{level:"title-lg",fontWeight:"italic",children:e.entityName})]})]}),u.jsx(bB,{labels:e.labels,winners:i,entityId:e.entityId,entityType:e.entityType}),u.jsx(at,{showToast:t,color:"danger",message:e.labels.winnersErrorMessage,hideToast:()=>n(!1)})]}):u.jsx(ds,{my:50})},xB=10,CB=e=>{var f;const[t,n]=C.useState([]),[r,i]=C.useState(!1),[o,a]=C.useState(""),{sdk:s}=ft(),l=C.useMemo(()=>Sr(h=>{if(!h){n([]),i(!1);return}i(!0),s.football.search({query:h}).then(p=>{n([...rv(p)]),i(!1)}).catch(p=>{console.error(p),n([]),i(!1)})},300),[]);C.useEffect(()=>(l(o),()=>l.cancel()),[o,l]);const c=(h,p)=>{const m=p.map(g=>g.id);e.setOptions(p),e.handleResetData(),e.setFilters(g=>q(N({},g),{entityIds:m}))},d=(h,p)=>h.map((m,g)=>u.jsx(b.Chip,{variant:"solid",endDecorator:u.jsx(b.ChipDelete,{color:"danger",sx:{marginRight:.5},variant:"plain",onClick:v=>p({index:g}).onClick(v),children:u.jsx(Oe.Close,{fontSize:"small"})}),sx:{marginLeft:"3px",marginY:"1px",backgroundColor:"#e0f3ff",padding:"2px",borderRadius:4,"&:hover":{cursor:"default"}},children:u.jsx(wn,{option:m},`option_${m.id}`)},m.id));return u.jsxs(b.FormControl,{size:"sm",sx:{marginBottom:"16px"},children:[u.jsx(b.FormLabel,{sx:{fontSize:12},color:"primary",children:e.labels.contextEntityTag}),u.jsx(b.Autocomplete,{getOptionDisabled:()=>e.options.length===xB,forcePopupIcon:!1,multiple:!0,loading:r,slotProps:{input:{sx:{"&::placeholder":{fontSize:"14px"}}},root:{sx:{boxShadow:"none",backgroundColor:"white",minHeight:38}}},isOptionEqualToValue:(h,p)=>h.id===p.id,endDecorator:r?u.jsx(b.CircularProgress,{size:"sm",sx:{bgcolor:"primary"}}):null,placeholder:e.options.length>0?"":e.labels.typeContextTagNamePlaceholder,options:t,filterOptions:h=>h.filter(p=>!e.options.some(m=>m.value===p.value)),onInputChange:(h,p)=>{a(p)},onChange:c,getOptionKey:h=>h.id,groupBy:h=>h.group+"s",value:(f=e.options)!=null?f:[],renderTags:d,renderOption:(h,p)=>u.jsx(b.AutocompleteOption,q(N({},h),{children:u.jsx(wn,{option:p})}))})]})};function iv(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var uo;(function(e){e.event="event",e.props="prop"})(uo||(uo={}));function ir(){}function wB(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(o,a){return o===t[a]})||(t=r,n=e.apply(void 0,r)),n}}function fo(e){return!!(e||"").match(/\d/)}function di(e){return e==null}function IB(e){return typeof e=="number"&&isNaN(e)}function ov(e){return di(e)||IB(e)||typeof e=="number"&&!isFinite(e)}function av(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function SB(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function AB(e,t,n){var r=SB(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,"$1"+t)}function TB(e){var t=C.useRef(e);t.current=e;var n=C.useRef(function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t.current.apply(t,r)});return n.current}function bu(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var i=e.split("."),o=i[0],a=i[1]||"";return{beforeDecimal:o,afterDecimal:a,hasNegation:n,addNegation:r}}function EB(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",i=n[1]||"";return(t?"-":"")+r+(i?"."+i:"")}function sv(e,t,n){for(var r="",i=n?"0":"",o=0;o<=t-1;o++)r+=e[o]||i;return r}function lv(e,t){return Array(t+1).join(e)}function cv(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],o=r[1];if(o=Number(o),!o)return n+i;i=i.replace(".","");var a=1+o,s=i.length;return a<0?i="0."+lv("0",Math.abs(a))+i:a>=s?i=i+lv("0",a-s):i=(i.substring(0,a)||"0")+"."+i.substring(a),n+i}function uv(e,t,n){if(["","-"].indexOf(e)!==-1)return e;var r=(e.indexOf(".")!==-1||n)&&t,i=bu(e),o=i.beforeDecimal,a=i.afterDecimal,s=i.hasNegation,l=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:l.toFixed(t),d=c.split("."),f=o;o&&Number(d[0])&&(f=o.split("").reverse().reduce(function(g,v,I){return g.length>I?(Number(g[0])+Number(v)).toString()+g.substring(1,g.length):v+g},d[0]));var h=sv(d[1]||"",t,n),p=s?"-":"",m=r?".":"";return""+p+f+m+h}function Ar(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var dv=wB(function(e,t){for(var n=0,r=0,i=e.length,o=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[o-1-r]&&o-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:o-r}}}),kB=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function _B(e,t,n){return Math.min(Math.max(e,t),n)}function yu(e){return Math.max(e.selectionStart,e.selectionEnd)}function PB(){return typeof navigator!="undefined"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function DB(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function OB(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function RB(e,t,n,r,i,o,a){a===void 0&&(a=OB);var s=i.findIndex(function(w){return w}),l=e.slice(0,s);!t&&!n.startsWith(l)&&(t=l,n=l+n,r=r+l.length);for(var c=n.length,d=e.length,f={},h=new Array(c),p=0;p<c;p++){h[p]=-1;for(var m=0,g=d;m<g;m++){var v=a({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m});if(v&&f[m]!==!0){h[p]=m,f[m]=!0;break}}}for(var I=r;I<c&&(h[I]===-1||!o(n[I]));)I++;var S=I===c||h[I]===-1?d:h[I];for(I=r-1;I>0&&h[I]===-1;)I--;var x=I===-1||h[I]===-1?0:h[I]+1;return x>S?S:r-x<S-r?x:S}function fv(e,t,n,r){var i=e.length;if(t=_B(t,0,i),r==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function LB(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(fo(e[n])||fo(e[n-1]));return t}function hv(e,t,n,r,i,o){o===void 0&&(o=ir);var a=TB(function(m,g){var v,I;return ov(m)?(I="",v=""):typeof m=="number"||g?(I=typeof m=="number"?cv(m):m,v=r(I)):(I=i(m,void 0),v=r(I)),{formattedValue:v,numAsString:I}}),s=C.useState(function(){return a(di(e)?t:e,n)}),l=s[0],c=s[1],d=function(m,g){m.formattedValue!==l.formattedValue&&c({formattedValue:m.formattedValue,numAsString:m.value}),o(m,g)},f=e,h=n;di(e)&&(f=l.numAsString,h=!0);var p=a(f,h);return C.useMemo(function(){c(p)},[p.formattedValue]),[l,d]}function MB(e){return e.replace(/[^0-9]/g,"")}function BB(e){return e}function $B(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var r=e.customInput,i=e.renderText,o=e.getInputRef,a=e.format;a===void 0&&(a=BB);var s=e.removeFormatting;s===void 0&&(s=MB);var l=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,f=e.isAllowed,h=e.onChange;h===void 0&&(h=ir);var p=e.onKeyDown;p===void 0&&(p=ir);var m=e.onMouseUp;m===void 0&&(m=ir);var g=e.onFocus;g===void 0&&(g=ir);var v=e.onBlur;v===void 0&&(v=ir);var I=e.value,S=e.getCaretBoundary;S===void 0&&(S=LB);var x=e.isValidInputCharacter;x===void 0&&(x=fo);var w=e.isCharacterSame,y=iv(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=hv(I,l,!!c,a,s,d),E=A[0],_=E.formattedValue,D=E.numAsString,G=A[1],F=C.useRef(),T=C.useRef({formattedValue:_,numAsString:D}),W=function(de,he){T.current={formattedValue:de.formattedValue,numAsString:de.value},G(de,he)},Y=C.useState(!1),j=Y[0],$=Y[1],B=C.useRef(null),H=C.useRef({setCaretTimeout:null,focusTimeout:null});C.useEffect(function(){return $(!0),function(){clearTimeout(H.current.setCaretTimeout),clearTimeout(H.current.focusTimeout)}},[]);var Q=a,ee=function(de,he){var xe=parseFloat(he);return{formattedValue:de,value:he,floatValue:isNaN(xe)?void 0:xe}},R=function(de,he,xe){de.selectionStart===0&&de.selectionEnd===de.value.length||(Ar(de,he),H.current.setCaretTimeout=setTimeout(function(){de.value===xe&&de.selectionStart!==he&&Ar(de,he)},0))},M=function(de,he,xe){return fv(de,he,S(de),xe)},z=function(de,he,xe){var Te=S(he),He=RB(he,_,de,xe,Te,x,w);return He=fv(he,He,Te),He},V=function(de){var he=de.formattedValue;he===void 0&&(he="");var xe=de.input,Te=de.source,He=de.event,Pe=de.numAsString,Ee;if(xe){var It=de.inputValue||xe.value,St=yu(xe);xe.value=he,Ee=z(It,he,St),Ee!==void 0&&R(xe,Ee,he)}he!==_&&W(ee(he,Pe),{event:He,source:Te})};C.useEffect(function(){var de=T.current,he=de.formattedValue,xe=de.numAsString;(_!==he||D!==xe)&&W(ee(_,D),{event:void 0,source:uo.props})},[_,D]);var ne=B.current?yu(B.current):void 0,se=typeof window!="undefined"?C.useLayoutEffect:C.useEffect;se(function(){var de=B.current;if(_!==T.current.formattedValue&&de){var he=z(T.current.formattedValue,_,ne);de.value=_,R(de,he,_)}},[_]);var ae=function(de,he,xe){var Te=he.target,He=F.current?kB(F.current,Te.selectionEnd):dv(_,de),Pe=Object.assign(Object.assign({},He),{lastValue:_}),Ee=s(de,Pe),It=Q(Ee);if(Ee=s(It,void 0),f&&!f(ee(It,Ee))){var St=he.target,zt=yu(St),Lt=z(de,_,zt);return St.value=_,R(St,Lt,_),!1}return V({formattedValue:It,numAsString:Ee,inputValue:de,event:he,source:xe,input:he.target}),!0},X=function(de,he){he===void 0&&(he=0);var xe=de.selectionStart,Te=de.selectionEnd;F.current={selectionStart:xe,selectionEnd:Te+he}},le=function(de){var he=de.target,xe=he.value,Te=ae(xe,de,uo.event);Te&&h(de),F.current=void 0},re=function(de){var he=de.target,xe=de.key,Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee;xe==="ArrowLeft"||xe==="Backspace"?Ee=Math.max(Te-1,0):xe==="ArrowRight"?Ee=Math.min(Te+1,Pe.length):xe==="Delete"&&(Ee=Te);var It=0;xe==="Delete"&&Te===He&&(It=1);var St=xe==="ArrowLeft"||xe==="ArrowRight";if(Ee===void 0||Te!==He&&!St){p(de),X(he,It);return}var zt=Ee;if(St){var Lt=xe==="ArrowLeft"?"left":"right";zt=M(Pe,Ee,Lt),zt!==Ee&&de.preventDefault()}else xe==="Delete"&&!x(Pe[Ee])?zt=M(Pe,Ee,"right"):xe==="Backspace"&&!x(Pe[Ee])&&(zt=M(Pe,Ee,"left"));zt!==Ee&&R(he,zt,Pe),p(de),X(he,It)},ge=function(de){var he=de.target,xe=function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;if(Pe===void 0&&(Pe=""),Te===He){var Ee=M(Pe,Te);Ee!==Te&&R(he,Ee,Pe)}};xe(),requestAnimationFrame(function(){xe()}),m(de),X(he)},Se=function(de){de.persist&&de.persist();var he=de.target,xe=de.currentTarget;B.current=he,H.current.focusTimeout=setTimeout(function(){var Te=he.selectionStart,He=he.selectionEnd,Pe=he.value;Pe===void 0&&(Pe="");var Ee=M(Pe,Te);Ee!==Te&&!(Te===0&&He===Pe.length)&&R(he,Ee,Pe),g(Object.assign(Object.assign({},de),{currentTarget:xe}))},0)},Ve=function(de){B.current=null,clearTimeout(H.current.focusTimeout),clearTimeout(H.current.setCaretTimeout),v(de)},wt=j&&PB()?"numeric":void 0,lt=Object.assign({inputMode:wt},y,{type:t,value:_,onChange:le,onKeyDown:re,onMouseUp:ge,onFocus:Se,onBlur:Ve});if(n==="text")return i?C.createElement(C.Fragment,null,i(_,y)||null):C.createElement("span",Object.assign({},y,{ref:o}),_);if(r){var _t=r;return C.createElement(_t,Object.assign({},lt,{ref:o}))}return C.createElement("input",Object.assign({},lt,{ref:o}))}function pv(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i="");var o=t.suffix;o===void 0&&(o="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=hs(t),c=l.thousandSeparator,d=l.decimalSeparator,f=n!==0&&e.indexOf(".")!==-1||n&&r,h=bu(e,a),p=h.beforeDecimal,m=h.afterDecimal,g=h.addNegation;return n!==void 0&&(m=sv(m,n,!!r)),c&&(p=AB(p,c,s)),i&&(p=i+p),o&&(m=m+o),g&&(p="-"+p),e=p+(f&&d||"")+m,e}function hs(e){var t=e.decimalSeparator;t===void 0&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function NB(e,t){e===void 0&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),i=n.test(e),o=r.test(e);return e=e.replace(/-/g,""),i&&!o&&t&&(e="-"+e),e}function FB(e,t){return new RegExp("(^-)|[0-9]|"+av(e),"g")}function jB(e,t,n){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function zB(e,t,n){var r;t===void 0&&(t=DB(e));var i=n.allowNegative,o=n.prefix;o===void 0&&(o="");var a=n.suffix;a===void 0&&(a="");var s=n.decimalScale,l=t.from,c=t.to,d=c.start,f=c.end,h=hs(n),p=h.allowedDecimalSeparators,m=h.decimalSeparator,g=e[f]===m;if(fo(e)&&(e===o||e===a)&&t.lastValue==="")return e;if(f-d===1&&p.indexOf(e[d])!==-1){var v=s===0?"":m;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var I=function(B,H,Q){var ee=!1,R=!1;o.startsWith("-")?ee=!1:B.startsWith("--")?(ee=!1,R=!0):a.startsWith("-")&&B.length===a.length?ee=!1:B[0]==="-"&&(ee=!0);var M=ee?1:0;return R&&(M=2),M&&(B=B.substring(M),H-=M,Q-=M),{value:B,start:H,end:Q,hasNegation:ee}},S=I(e,d,f),x=S.hasNegation;r=S,e=r.value,d=r.start,f=r.end;var w=I(t.lastValue,l.start,l.end),y=w.start,A=w.end,E=w.value,_=e.substring(d,f);e.length&&E.length&&(y>E.length-a.length||A<o.length)&&!(_&&a.startsWith(_))&&(e=E);var D=0;e.startsWith(o)?D+=o.length:d<o.length&&(D=d),e=e.substring(D),f-=D;var G=e.length,F=e.length-a.length;e.endsWith(a)?G=F:(f>F||f>e.length-a.length)&&(G=f),e=e.substring(0,G),e=NB(x?"-"+e:e,i),e=(e.match(FB(m))||[]).join("");var T=e.indexOf(m);e=e.replace(new RegExp(av(m),"g"),function(B,H){return H===T?".":""});var W=bu(e,i),Y=W.beforeDecimal,j=W.afterDecimal,$=W.addNegation;return c.end-c.start<l.end-l.start&&Y===""&&g&&!parseFloat(j)&&(e=$?"-":""),e}function UB(e,t){var n=t.prefix;n===void 0&&(n="");var r=t.suffix;r===void 0&&(r="");var i=Array.from({length:e.length+1}).map(function(){return!0}),o=e[0]==="-";i.fill(!1,0,n.length+(o?1:0));var a=e.length;return i.fill(!1,a-r.length+1,a+1),i}function VB(e){var t=hs(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i="");var o=e.allowNegative;if(o===void 0&&(o=!0),n===r)throw new Error(`
|
|
2464
2464
|
Decimal separator can't be same as thousand separator.
|
|
2465
2465
|
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
2466
2466
|
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|